/* Light reading surfaces; preserve the original palette inside the screens. */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --ink: #0d1117;
  --muted: #5b6670;
  --line: #0d11171a;
  --accent: #1f4e79;
  --paper: #f7f8fa;
}

.hero, .system-map, .system-console, .output {
  color-scheme: dark;
  --bg: #080c10;
  --ink: #eeefeb;
  --muted: #9aa3aa;
  --line: #ffffff24;
  --accent: #c9dce8;
  color: var(--ink);
}
.hero { background: var(--bg); border-bottom-color: transparent; }
/* Below the HUD and the bottom labels, soften the change to the paper. */
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 26px;
  background: linear-gradient(180deg, #080c1000, #f7f8fa);
  pointer-events: none;
}
.belief, .operations, .faq, .contact { background: #f7f8fa; }
.system, .stack, .start { background: #eef1f4; }
.belief { color: var(--ink); }
/* The original animated dark veil would reduce text contrast on paper. */
.belief .section-veil { display: none; }
.belief .eyebrow, .belief .copy, .belief-foot p { color: var(--muted); }
.belief-foot { border-color: var(--line); }

.header::before {
  background: #f7f8faf2;
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity .35s;
}
.header .brand img { transition: filter .35s; }
.header.is-past-hero .brand img, .footer-brand img { filter: invert(1); }

.day-track::before { background: #0d111733; }
.day-progress { background: var(--accent); }
.day-step::before { background: #f7f8fa; border-color: var(--muted); }
.day-step.active::before { background: var(--accent); border-color: var(--accent); }
.day-step time, .day-step .who { color: var(--muted); }
.day-step p { color: var(--ink); }
.day-step.active p { color: var(--accent); }

.stack-register { border-color: #0d111733; }
.stack-row::before { background: linear-gradient(90deg, #1f4e7908, transparent); }
.connection-state { color: var(--accent); }
.stack-pending .connection-state, .stack-spec dt { color: var(--muted); }
.stack-tools li { background: #fff; border-color: #0d111733; color: var(--ink); }
.faq-number, summary::after { color: var(--muted); }
.faq-list details[open] summary, details[open] > summary::after { color: var(--accent); }
.faq-list details[open] { background: #1f4e7905; }
.faq-list summary:hover, .preparation summary:hover { color: var(--accent); }
.step { border-color: #0d111733; }

.contact-index, .required { color: var(--muted); }
.field label { color: var(--ink); }
.field input, .field select, .field textarea {
  background: #fff;
  color: var(--ink);
  border-color: #7b8792;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--accent); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field select option { background: #fff; color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.consent input { background: #fff; border-color: #7b8792; }
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent input:checked::after { color: #fff; }
.consent > span { color: var(--muted); }
.consent a { color: var(--accent); }
.contact .button { background: var(--ink); color: #fff; border-radius: 999px; }
.contact .button:hover, .contact .button:focus-visible { background: #1f4e79; }
.contact .magnetic::before { background: linear-gradient(110deg, transparent 38%, #ffffff18 49%, transparent 68%); }
.form-status { color: var(--ink); }

.company h2, .company dd { color: var(--ink); }
.company dt, .footer small, .footer-links { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
/* Dark screens retain their original focus color, too. */
:where(.belief, .system, .operations, .stack, .faq, .start, .contact, .company, .footer)
  :is(a, button, input, select, textarea, summary):focus-visible { outline-color: #1f4e79; }
.system-map :focus-visible, .output :focus-visible { outline-color: #8eb7d5; }

@media (prefers-reduced-motion: reduce) {
  .header::before, .header .brand img { transition: none; }
}
