/* The four Console themes (R18). A theme is a palette + density swap driven entirely by
   the data-theme attribute on <html>, set by js/themes.js. Switching is instant, no
   reload, and never changes markup or data (R18.97/98/100). Palettes match the approved
   mockups in design/mission-control-directions.html.

   Semantic colours (--go / --caution / --anomaly) keep their meaning in every theme, and
   are deliberately separate from the brand accent (R18.101). */

:root, [data-theme="launch_sequence"] {
  /* Launch Sequence — guided, warm, calm (the default; Appendix E.12) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;
  --bg: #f6f1ea; --bg-2: #fffdf9; --bg-3: #fdf3e4; --surface: #ffffff;
  --text: #241c12; --text-dim: #6b5d49; --text-faint: #9a8a72;
  --border: #ece1d2; --border-strong: #ddcdb6;
  --accent: #e8620f; --accent-ink: #ffffff; --accent-soft: #fff0e6; --accent-ink-on-soft: #c2410c;
  --go: #12a150; --go-ink: #ffffff; --go-soft: #eafaf2;
  --caution: #b7791f; --caution-soft: #fff5e6;
  --anomaly: #d64550; --anomaly-soft: #fdecee;
  --link: #c2410c;
  --radius: 8px; --radius-lg: 14px; --shadow: 0 1px 3px rgba(90,60,20,.08);
}

[data-theme="flight_deck"] {
  /* Flight Deck — dark NASA cockpit, amber telemetry */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;
  --bg: #0b1017; --bg-2: #0f1620; --bg-3: #131a24; --surface: #0f141d;
  --text: #d6dde7; --text-dim: #93a1b3; --text-faint: #7c8798;
  --border: #2c3a4b; --border-strong: #33465a;
  --accent: #ffb020; --accent-ink: #1a1205; --accent-soft: rgba(255,176,32,.14); --accent-ink-on-soft: #ffcf6e;
  --go: #37e07f; --go-ink: #04160b; --go-soft: rgba(55,224,127,.13);
  --caution: #f4a52b; --caution-soft: rgba(244,165,43,.13);
  --anomaly: #ff5f6d; --anomaly-soft: rgba(255,95,109,.13);
  --link: #22d3ee;
  --radius: 6px; --radius-lg: 10px; --shadow: 0 1px 2px rgba(0,0,0,.45);
}

[data-theme="clean_room"] {
  /* Clean Room — light, airy, reassuring; least visual noise */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;
  --bg: #f4f7fb; --bg-2: #fbfcfe; --bg-3: #eef2f8; --surface: #ffffff;
  --text: #1c2733; --text-dim: #54627c; --text-faint: #8593aa;
  --border: #e6ebf2; --border-strong: #d6dde7;
  --accent: #2f5bff; --accent-ink: #ffffff; --accent-soft: #eef2ff; --accent-ink-on-soft: #2f5bff;
  --go: #12a150; --go-ink: #ffffff; --go-soft: #eafaf2;
  --caution: #b7791f; --caution-soft: #fff5e6;
  --anomaly: #d64550; --anomaly-soft: #fdecee;
  --link: #2f5bff;
  --radius: 9px; --radius-lg: 14px; --shadow: 0 1px 3px rgba(20,40,80,.07);
}

[data-theme="big_board"] {
  /* Big Board — a wall of monitors; vivid scoreboard on dark */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;
  --bg: #0a0e15; --bg-2: #0e1520; --bg-3: #131c28; --surface: #101826;
  --text: #e7edf5; --text-dim: #9aa6ba; --text-faint: #7c8798;
  --border: #22303f; --border-strong: #33465a;
  --accent: #a3e635; --accent-ink: #10210a; --accent-soft: rgba(163,230,53,.15); --accent-ink-on-soft: #bef264;
  --go: #37e07f; --go-ink: #04160b; --go-soft: rgba(55,224,127,.14);
  --caution: #ff8c5a; --caution-soft: rgba(255,140,90,.15);
  --anomaly: #ff5f6d; --anomaly-soft: rgba(255,95,109,.15);
  --link: #22d3ee;
  --radius: 8px; --radius-lg: 12px; --shadow: 0 2px 8px rgba(0,0,0,.4);
}
/* Big Board leans into the scoreboard feel: brighter, larger telemetry numbers. */
[data-theme="big_board"] .score b { color: var(--accent); font-size: 20px; }
[data-theme="big_board"] .brandmark .dot { box-shadow: 0 0 14px var(--accent); }

/* ---- guided layout (Launch Sequence's one-decision-at-a-time Launchpad, R18.97) ----
   Structural classes the Launchpad view renders when MC.theme.guided() is true. Same
   data, same draft component — just a left sequence rail and a single focused card. */
.guided { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.guided-rail { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 78px; }
.guided-step {
  padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; display: flex; gap: 8px; align-items: center;
}
.guided-step .n { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.guided-step.current { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.guided-step.current .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.guided-step.done { color: var(--go); }
.guided-step.done .n { background: var(--go); color: var(--go-ink); border-color: var(--go); }
.guided-focus { max-width: 640px; }
.guided-focus .draft { padding: 20px; }
.guided-progress { font-size: 13px; color: var(--text-faint); margin-bottom: 12px; }
@media (max-width: 820px) { .guided { grid-template-columns: 1fr; } .guided-rail { position: static; flex-direction: row; overflow-x: auto; } }
