/* mission-console.css -- the homepage mission console (Wave 3).
   Everything mission-console.js renders: the strip under the entry paths, the
   lit mission tree (wing rows, wing header, arch dots), the next-action block
   in each chapter card, and the dossier's mission line. Homepage only.
   Loaded after styles.css and arch-nav.css so its selectors win on equal
   specificity. Bump ?v= in index.html on every edit. */

/* ── strip under the entry paths ─────────────────────────────────── */
.mc-strip {
  margin: 12px 0 0; padding: 10px 0 0;
  border-top: 1px solid rgba(212, 160, 74, 0.35);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .12em; line-height: 1.6;
  color: rgba(232, 223, 208, 0.82);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  max-width: 74ch;
}
.mc-strip .mc-k { font-size: 9px; letter-spacing: .3em; color: rgba(232, 223, 208, 0.45); text-transform: uppercase; }
.mc-strip .mc-v { color: var(--gold); text-transform: uppercase; letter-spacing: .18em; }
.mc-strip .mc-guide { flex-basis: 100%; letter-spacing: .02em; color: rgba(232, 223, 208, 0.62); }
.mc-strip .mc-path { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 2px; }
.mc-chip {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: inherit; letter-spacing: .06em; text-transform: none;
  color: #ece7dd; background: rgba(6, 8, 14, 0.55);
  border: 1px solid rgba(0, 229, 255, 0.35); border-radius: 2px;
  padding: 4px 9px 4px 7px; max-width: 100%; text-align: left;
  transition: border-color .16s, background .16s, color .16s;
}
.mc-chip b { color: var(--gold); font-weight: 600; letter-spacing: .14em; margin-right: 4px; }
.mc-chip:hover, .mc-chip:focus-visible { border-color: var(--cyan); background: rgba(0, 229, 255, 0.12); color: #fff; outline: none; }
.mc-reset {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: inherit; font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cyan); background: none; border: 1px solid rgba(0, 229, 255, 0.35); border-radius: 2px;
  padding: 3px 8px; margin-left: auto;
}
.mc-reset:hover, .mc-reset:focus-visible { border-color: var(--cyan); background: rgba(0, 229, 255, 0.12); outline: none; }

/* ── the lit tree ────────────────────────────────────────────────── */
.so-wing-line.wl.is-mission > .wl-row { border-bottom-color: rgba(212, 160, 74, 0.55); }
.so-wing-line.wl.is-mission > .wl-row .wk { color: var(--gold); }
.so-wing-line.wl.is-mission > .wl-row .wk::before {
  content: "\25C6"; font-size: 8px; margin-right: 5px; color: var(--gold);
  text-shadow: 0 0 8px rgba(212, 160, 74, 0.8); vertical-align: 1px;
}
.so-wing-line.wl.is-mission > .wl-row::after {
  content: "STEP " attr(data-mission-step); order: 3;
  font-size: 8px; letter-spacing: .2em; color: var(--gold); opacity: .85;
  border: 1px solid rgba(212, 160, 74, 0.45); border-radius: 2px; padding: 1px 4px; margin-left: 6px;
  align-self: center; white-space: nowrap;
}
.so-wing-line.wl.is-mission { position: relative; }
.so-wing-line.wl.is-mission > .wl-row::after { content: "STEP " attr(data-mission-step); }
.so-wing-line.wl.is-mission > .wl-row .wk::before { content: "\25C6"; }
/* data-mission-step lives on the wrapper; the badge reads it from there. */
.so-wing-line.wl.is-mission[data-mission-step="1"] > .wl-row::after { content: "STEP 1"; }
.so-wing-line.wl.is-mission[data-mission-step="2"] > .wl-row::after { content: "STEP 2"; }
.so-wing-line.wl.is-mission[data-mission-step="3"] > .wl-row::after { content: "STEP 3"; }
.so-wing-line.wl.is-mission[data-mission-step="4"] > .wl-row::after { content: "STEP 4"; }
.so-wing.has-mission .so-wing-hd::after {
  content: " \00B7 MISSION"; color: var(--gold); text-shadow: 0 0 8px rgba(212, 160, 74, 0.6);
}
.nav-rail .nav-dot.is-mission .roman { color: var(--gold); text-shadow: 0 0 8px rgba(212, 160, 74, 0.8); }
.nav-rail .nav-dot.is-mission .label::after { content: " \25C6"; font-size: 7px; color: var(--gold); vertical-align: 2px; }

/* ── next action block in a chapter card ─────────────────────────── */
.so-next {
  margin-top: 18px; padding: 12px 14px 12px 16px;
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(212, 160, 74, 0.10), rgba(212, 160, 74, 0.02) 70%, transparent);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  width: 100%; max-width: 560px;
}
.so-next-head {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .28em; text-transform: uppercase;
}
.so-next-k { color: var(--gold); }
.so-next-step { color: rgba(232, 223, 208, 0.55); }
.so-next-mission { color: var(--cyan); }
.so-next .so-cta { margin: 0; }
.so-next-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.so-next-row + .so-next-row { padding-top: 8px; border-top: 1px solid rgba(212, 160, 74, 0.18); }
.so-next-n { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .2em; color: var(--gold); border: 1px solid rgba(212, 160, 74, 0.45); border-radius: 2px; padding: 1px 5px; }
.so-next .mc-open { border-color: rgba(212, 160, 74, 0.45); color: rgba(236, 231, 221, 0.9); }
.so-next .mc-open:hover { border-color: var(--gold); color: #ffd87a; }

/* ── dossier head ────────────────────────────────────────────────── */
html.mode-immersive .so-detail-mission {
  display: block; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}

/* ── static and phone ────────────────────────────────────────────── */
.mob .mc-strip { font-size: 11.5px; max-width: 100%; }
.mob .mc-chip { padding: 9px 11px; min-height: 44px; font-size: 12px; }
.mob .mc-reset { min-height: 36px; padding: 6px 12px; }
.mob .so-next { max-width: 100%; padding: 12px; }
.mob .so-next .so-cta { width: 100%; justify-content: center; }
.so-detail-mission:empty { display: none; }

/* ── inner-page console strip (Wave 4) ───────────────────────────── */
/* Sits in flow directly under the sticky nav.nav of the cyan inner pages.
   Semantic readouts only: PATH, MISSION, STATUS, NEXT, SESSION. */
.mc-console {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px;
  padding: 9px 28px; margin: 0;
  background: linear-gradient(180deg, rgba(8, 6, 14, 0.92), rgba(8, 6, 14, 0.78));
  border-bottom: 1px solid rgba(212, 160, 74, 0.28);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: .08em; line-height: 1.5;
  color: rgba(232, 223, 208, 0.82);
}
.mc-console .mc-cell { display: inline-flex; align-items: baseline; gap: 7px; min-height: 22px; white-space: nowrap; }
.mc-console .mc-k { font-size: 8.5px; letter-spacing: .3em; color: rgba(232, 223, 208, 0.45); text-transform: uppercase; }
.mc-console b { font-weight: 500; color: var(--gold, #d4a04a); letter-spacing: .12em; text-transform: uppercase; }
.mc-console a { color: var(--cyan, #00e5ff); text-decoration: none; }
.mc-console a:hover, .mc-console a:focus-visible { color: #fff; text-decoration: underline; outline: none; }
.mc-console .mc-sep { color: rgba(232, 223, 208, 0.35); }
.mc-console .mc-reset, .mc-console .mc-choose { margin-left: 4px; font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; }
.mc-console .mc-reset { padding: 2px 7px; }
.mc-console .mc-next { flex: 1 1 auto; }
.mc-console .mc-next-link { color: var(--gold, #d4a04a); }
.mc-console .mc-next-link:hover, .mc-console .mc-next-link:focus-visible { color: #ffd87a; }
.mc-console .mc-session b { color: rgba(232, 223, 208, 0.7); }
@media (max-width: 720px) {
  .mc-console { padding: 8px 18px; gap: 4px 16px; font-size: 10px; }
  .mc-console .mc-cell { white-space: normal; }
  .mc-console .mc-session { display: none; }
}
@media print { .mc-console { display: none; } }

/* ── tool shell (Wave 5) ─────────────────────────────────────────── */
/* The TOOL row under the console strip and the actions block a result
   gains. tool-shell.js renders both; the tools keep their own layout. */
.mc-tool { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 6px; border-top: 1px solid rgba(212, 160, 74, 0.16); }
.mc-tool .mc-cell { display: inline-flex; align-items: center; gap: 7px; min-height: 20px; }
.mc-tool[data-state="result"] .mc-tool-state b, .mc-tool[data-state="sent"] .mc-tool-state b { color: var(--cyan, #00e5ff); }
.mc-tool-bar { display: inline-block; width: 110px; height: 3px; background: rgba(232, 223, 208, 0.12); overflow: hidden; vertical-align: middle; }
.mc-tool-fill { display: block; height: 100%; width: 0; background: var(--gold, #d4a04a); box-shadow: 0 0 6px rgba(212, 160, 74, 0.6); transition: width .35s ease; }
.mc-tool-notice { color: rgba(232, 223, 208, 0.7); font-size: 9.5px; letter-spacing: .08em; }
.ts-actions {
  margin-top: 18px; padding: 12px 14px; border-top: 1px solid rgba(212, 160, 74, 0.28);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.ts-actions .mc-k { flex-basis: 100%; font-size: 8.5px; letter-spacing: .3em; color: rgba(232, 223, 208, 0.45); text-transform: uppercase; }
.ts-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan, #00e5ff); background: rgba(6, 8, 14, 0.55); border: 1px solid rgba(0, 229, 255, 0.4); border-radius: 2px; padding: 8px 12px; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center;
}
.ts-btn:hover, .ts-btn:focus-visible { border-color: var(--cyan, #00e5ff); background: rgba(0, 229, 255, 0.12); color: #fff; outline: none; }
.ts-handoff { color: var(--gold, #d4a04a); border-color: rgba(212, 160, 74, 0.5); }
.ts-handoff:hover, .ts-handoff:focus-visible { color: #ffd87a; border-color: var(--gold, #d4a04a); background: rgba(212, 160, 74, 0.12); }
@media (max-width: 720px) { .mc-tool { gap: 4px 14px; } .mc-tool-bar { width: 70px; } .ts-actions .ts-btn { width: 100%; justify-content: center; } }
@media print { .mc-tool, .ts-actions { display: none; } }

/* ── the hero as a path chooser (avenue v2) ──────────────────────── */
#overlay-0 .hp-line { margin-top: 6px; }
#overlay-0 .entry-paths {
  margin: 14px 0 4px; width: 100%; max-width: 80ch;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
#overlay-0 .entry-paths .ep-head { grid-column: 1 / -1; font-size: 9px; letter-spacing: .3em; color: rgba(232, 223, 208, 0.55); }
#overlay-0 .entry-paths a {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 11px;
  border: 1px solid rgba(0, 229, 255, 0.28); border-radius: 3px; background: rgba(0, 229, 255, 0.035);
  color: rgba(232, 223, 208, 0.78); text-decoration: none; font-size: 10.5px; line-height: 1.4;
  transition: border-color .2s, background .2s, color .2s;
}
#overlay-0 .entry-paths a:hover, #overlay-0 .entry-paths a:focus-visible { border-color: rgba(0, 229, 255, 0.75); background: rgba(0, 229, 255, 0.09); color: #ece7dd; }
#overlay-0 .entry-paths a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
#overlay-0 .entry-paths b { color: var(--cyan); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: 10px; }
html.has-mission #overlay-0 .entry-paths { display: none; }
/* One screen: the hero card is wider than the chapter cards in immersive
   mode, so the seven tiles sit four and three on two rows instead of three
   rows of wrapped text; the tiles' own label ("WHO ARE YOU?") makes the
   unset guidance line redundant on the hero. */
html.mode-immersive #overlay-0 .so-card { max-width: 880px; }
html.mode-immersive #overlay-0 .entry-paths { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
#overlay-0 .mc-strip.is-unset { display: none; }
/* In the wide card the name fits on one line, and the secure channel and the
   credentials share a row; short laptop screens tighten the tiles too. */
html.mode-immersive #overlay-0 .so-title br { display: none; }
html.mode-immersive #overlay-0 .so-title { white-space: nowrap; }
#overlay-0 .hp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
#overlay-0 .hp-foot .so-actions, #overlay-0 .hp-foot .so-creds { margin-top: 0; }
@media (max-height: 820px) {
  html.mode-immersive #overlay-0 .so-title { font-size: 40px; }
  html.mode-immersive #overlay-0 .entry-paths { margin-top: 10px; gap: 6px; }
  html.mode-immersive #overlay-0 .entry-paths a { padding: 7px 10px; gap: 2px; }
}
@media (max-width: 1100px) { html.mode-immersive #overlay-0 .entry-paths, #overlay-0 .entry-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mob #overlay-0 .entry-paths { grid-template-columns: 1fr; }
.mob #overlay-0 .entry-paths a { min-height: 44px; font-size: 12.5px; }
/* Where reveal() in mission-console.js brings the tiles or the briefing back
   into view: a little air above them, not flush with the top of the screen. */
.mob #overlay-0 .entry-paths, .mob #overlay-0 .mc-strip { scroll-margin-top: 14px; }
/* A route chip lands on the row it opened (goTo in mission-console.js). */
.mob .so-wing-line.wl { scroll-margin-top: 12px; }
/* The tiles sat on a 3.5% tint over the hero photo: their lines measured 2.4
   to 3.1:1 and the names 2.6 to 3.7:1. A dark tile carries them on any part
   of the photo; tap and focus still light it. */
.mob #overlay-0 .entry-paths a { background: rgba(6, 4, 12, .74); color: rgba(232, 223, 208, .92); }
.mob #overlay-0 .entry-paths a:hover, .mob #overlay-0 .entry-paths a:focus-visible { background: rgba(4, 22, 30, .86); border-color: rgba(0, 229, 255, .75); color: #ece7dd; }
.mob #overlay-0 .entry-paths .ep-head { color: var(--bone); }
/* "About Salian Defense" was a 12px-tall target in 9px text at 60%. */
.mob #overlay-0 .hp-about > summary { display: flex; align-items: center; min-height: 44px; font-size: 11px; color: rgba(232, 223, 208, .78); }

#overlay-0 .hp-about { margin-top: 12px; width: 100%; max-width: 74ch; }
#overlay-0 .hp-about > summary {
  cursor: pointer; list-style: none;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .28em; text-transform: uppercase;
  color: rgba(232, 223, 208, 0.6);
}
#overlay-0 .hp-about > summary::-webkit-details-marker { display: none; }
#overlay-0 .hp-about > summary::before { content: "+ "; color: var(--cyan); }
#overlay-0 .hp-about[open] > summary::before { content: "- "; }
#overlay-0 .hp-about > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
#overlay-0 .hp-about .so-body:first-of-type { margin-top: 10px; }

/* ── the briefing ────────────────────────────────────────────────── */
.mc-strip.mc-brief { border-top-color: rgba(212, 160, 74, 0.55); padding-top: 12px; max-width: 80ch; }
.mc-brief .mc-brief-h { flex-basis: 100%; font-size: 10px; letter-spacing: .28em; color: var(--gold); }
.mc-brief .mc-brief-h:focus { outline: none; }
.mc-brief .mc-brief-h:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.mc-brief .mc-brief-need { flex-basis: 100%; margin: 2px 0 4px; font-family: inherit; font-size: 13px; letter-spacing: .02em; line-height: 1.45; color: #ece7dd; }
.mc-brief .mc-route { flex-basis: 100%; list-style: none; margin: 4px 0 0; padding: 0 0 0 10px; border-left: 1px solid rgba(0, 229, 255, 0.4); display: flex; flex-direction: column; gap: 6px; }
.mc-brief .mc-route { align-items: stretch; }
.mc-brief .mc-route .mc-chip { display: block; width: 100%; }
.mc-brief .mc-route .is-done .mc-chip { opacity: .55; }
.mc-brief .mc-route .is-current .mc-chip { border-color: rgba(212, 160, 74, 0.8); }
.mc-brief .mc-brief-actions { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mc-brief .mc-brief-actions .mc-reset { margin-left: 0; font-size: 10px; letter-spacing: .14em; padding: 7px 12px; }
@media (prefers-reduced-motion: reduce) { #overlay-0 .entry-paths a, .mc-chip { transition: none; } }

/* ── 2026-10-01, mobile audit ───────────────────────────────────────── */
/* The console's labels (PATH, MISSION, NEXT, TOOL...) were 8.5px at 3.7:1,
   and the .mob phone sizing above never reaches the inner pages (only the
   homepage has .mob). The colour applies at every width (3.7:1 fails on
   desktop too): 6.1:1. On phones the labels are 10px and the controls at
   least 24px tall (WCAG 2.5.8; Choose was 41x13); inline links grow their
   tap area with padding, which leaves the line box alone. Without a mission
   STATUS only repeats "Unset", so it steps aside there. */
.mc-strip .mc-k, .mc-console .mc-k, .ts-actions .mc-k { color: rgba(232, 223, 208, .62); }
@media (max-width: 720px) {
  .mc-console .mc-k { font-size: 10px; }
  /* Page zoom and large text: the PATH row wraps whole crumbs instead of
     widening the page (a 390px phone at 150 to 200% zoom lays out 195 to
     260px); it also stops a long crumb breaking into columns. */
  .mc-console .mc-cell { flex-wrap: wrap; min-width: 0; }
  .mc-console .mc-reset, .mc-console .mc-choose { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; font-size: 10px; border: 1px solid rgba(0, 229, 255, .35); border-radius: 2px; }
  .mc-console .mc-path a, .mc-console .mc-next-link { padding-block: 5px; }
  .mc-console:not(.has-mission) .mc-status { display: none; }
}
/* 2026-10-14: the inner strip shows only a chosen mission or a tool's row;
   with neither it takes no room. */
.mc-console:not(.has-mission):not(:has(.mc-tool)) { display: none; }
