/* ═══════════════════════════════════════════════════════════
   Interactive Research Report · base theme (copy verbatim as css/style.css)
   White surface / deep-navy ink / electric-blue accent.
   Editorial quote/note system (no left-border cards), magazine
   term columns, borderless right rail, tightened per-chart palette.
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper: #ffffff;
  --paper-hi: #f7f9fc;      /* panel */
  --ink: #051c2c;           /* deep navy */
  --ink-md: #42566a;
  --ink-lo: #8595a6;
  --line: #dbe2ea;
  --line-lo: #eef1f6;
  --red: #2251ff;           /* LEGACY ACCENT SLOT → electric blue */
  --red-hi: #1233b8;
  --blue: #1233b8;          /* deep blue (links, secondary emphasis) */
  --blue-soft: #7d9bff;     /* light blue (tertiary series) */
  --copper: #b07a10;
  --green: #008a6d;
  --gold: #b07a10;
  --neg: #c22f4e;           /* semantic negative — declines, risk, missing */
  --serif: "et-book", "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: Menlo, Consolas, "SF Mono", "Liberation Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(5,28,44,.05), 0 8px 28px rgba(5,28,44,.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  --railw: 460px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: 0.001em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(34,81,255,.15); }
b, strong { font-weight: 700; }
em { font-style: normal; color: var(--red); font-weight: 700; }
a { color: var(--blue); }

/* ── Era progress rail (top) ── */
#era-rail {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  visibility: hidden; transform: translateY(-110%);
  transition: transform .4s ease, visibility 0s linear .4s;
}
#era-rail.on { visibility: visible; transform: none; transition: transform .4s ease; }
.rail-year {
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 2px 10px; background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.rail-track { flex: 1; height: 18px; position: relative; }
.rail-track .seg {
  position: absolute; top: 8px; height: 2px; background: var(--line);
  pointer-events: auto; cursor: pointer;
}
.rail-track .seg.active { background: var(--red); height: 4px; top: 7px; }
.rail-track .seg .seg-label {
  position: absolute; top: -14px; left: 0; font-family: var(--mono);
  font-size: 9px; color: var(--ink-lo); white-space: nowrap; letter-spacing: .04em;
}
.rail-track .seg.active .seg-label { color: var(--red); font-weight: 700; }

/* ── Cover ── */
#cover { position: relative; min-height: 100vh; overflow: hidden; }
#cover-canvas, #cover-canvas-x, #cover-canvas-w { position: absolute; inset: 0; width: 100%; height: 100%; }

/* cover artwork variant switch */
.cover-mode { margin-top: 22px; display: flex; gap: 8px; align-items: center; }
.cover-mode::before {
  content: "COVER"; font-family: var(--mono); font-size: 9px;
  letter-spacing: .22em; color: var(--ink-lo); margin-right: 4px;
}
.cover-mode button {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em;
  color: var(--ink-md); background: rgba(255,255,255,.7);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.cover-mode button.on { border-color: var(--red); color: var(--red); }
.cover-mode button:hover { border-color: var(--ink); color: var(--ink); }
.cover-inner {
  position: relative; z-index: 2; max-width: 1120px;
  margin: 0 auto; padding: 11vh 24px 60px;
}
.cover-kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .28em;
  color: var(--red); margin-bottom: 26px; text-transform: uppercase;
}
.cover-title {
  font-size: clamp(44px, 6.6vw, 78px); font-weight: 700;
  line-height: 1.08; letter-spacing: -0.008em;
}
.cover-title .cover-num { color: var(--red); }
.cover-sub {
  font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; color: var(--ink-md);
  margin: 20px 0 26px; letter-spacing: 0;
}
.cover-lede { max-width: 620px; font-size: 16.5px; color: var(--ink-md); line-height: 1.75; }
.chain {
  font-family: var(--mono); font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: var(--paper-hi); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 8px; white-space: nowrap;
}
.cover-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 26px; }
.chip {
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 6px; padding: 8px 18px; cursor: pointer;
  transition: all .15s;
}
.chip:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cover-anchor { font-size: 12.5px; color: var(--ink-lo); font-family: var(--mono); letter-spacing: .01em; display: block; max-width: 660px; }
.scroll-hint {
  margin-top: 7vh; font-family: var(--mono); font-size: 11px; color: var(--ink-lo);
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; letter-spacing: .3em;
  width: max-content;
}
.scroll-hint span { margin-left: 22px; }
.scroll-hint span {
  display: block; width: 1px; height: 44px;
  background: linear-gradient(var(--red), transparent);
}

/* ── Section band ── */
.band { padding: 72px 0 64px; border-top: 1px solid var(--line-lo); }
.prose {
  max-width: 692px;
  margin: 0 auto;
  padding: 0 28px;
}
.wide {
  /* symmetric figure bleed around the 692px prose column (V3 pattern) */
  max-width: 800px;
  margin: 36px auto;
  padding: 0 28px;
}
.wide.xl { max-width: 924px; }
.sec-no {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  color: var(--red); margin-bottom: 14px; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.sec-no::before {
  content: ""; flex: 0 0 26px; height: 3px;
  background: var(--red);
}
h2 { font-family: var(--serif); font-size: clamp(27px, 3.1vw, 38px); font-weight: 700; line-height: 1.22; letter-spacing: -0.005em; margin-bottom: 22px; max-width: 20em; }
h3 { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 14px; }
.sub-h { margin-top: 26px; }
.prose p { margin-bottom: 18px; }
.muted { color: var(--ink-lo); font-size: 14px; }
.hint-click { font-size: 13px; color: var(--blue); border-bottom: 1px dashed var(--blue); white-space: nowrap; }
.era-tag {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  color: var(--red); margin-bottom: 8px; font-weight: 400; text-transform: uppercase;
  padding-left: 14px; position: relative;
}
.era-tag::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--red);
}
.laws { list-style: none; margin: 8px 0 16px; }
.laws li {
  padding: 11px 0; border-bottom: 1px solid var(--line-lo);
  margin: 0;
}
.laws li:first-child { border-top: 1px solid var(--line-lo); }

/* ── Analyst note · editorial rules, no card chrome ── */
.note-box {
  border: 0; background: transparent; box-shadow: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 30px 0 26px;
  padding: 14px 0 16px;
  font-size: 14.5px; color: var(--ink-md); line-height: 1.8;
}
.note-box::before {
  content: "Analyst note";
  display: block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-lo); margin-bottom: 8px;
}
.note-box p { margin-bottom: 10px; }
.note-box p:last-child { margin-bottom: 0; }
.degrade-note {
  font-family: var(--mono); font-size: 12px; color: var(--neg);
  border: 1px dashed var(--neg); border-radius: 4px; padding: 8px 12px; background: rgba(194,47,78,.04);
}

/* ── Rail cross-reference note (hidden when the rail is hidden) ── */
.rail-note {
  font-family: var(--mono); font-size: 11px; color: var(--ink-lo);
  line-height: 1.7; letter-spacing: .02em;
  margin: 22px 0 18px; padding-left: 16px; position: relative;
}
.rail-note::before { content: "→"; position: absolute; left: 0; color: var(--red); }
@media (max-width: 1180px) { .rail-note { display: none; } }

/* Chart containers */
.chart-frame {
  background: transparent; border: 0; box-shadow: none;
  padding: 8px 0 4px; position: relative;
}
.chart-title { font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em; margin: 0 0 3px 0; }
.chart-sub { font-family: var(--mono); font-size: 10.5px; color: var(--ink-lo); margin: 0 0 14px 0; letter-spacing: .04em; padding-bottom: 8px; border-bottom: 1px solid var(--line-lo); }
.chart-src { font-family: var(--mono); font-size: 10px; color: var(--ink-lo); margin: 10px 0 4px; }
.chart-frame svg text { font-family: var(--mono); }

/* metric strip */
.metric-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  margin-top: 14px; box-shadow: var(--shadow);
}
.metric-strip .m {
  background: var(--paper); padding: 14px 16px; cursor: pointer; transition: background .15s;
}
.metric-strip .m:hover { background: var(--paper-hi); }
.metric-strip .m .v { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.metric-strip .m .k { font-size: 12px; color: var(--ink-md); margin-top: 3px; line-height: 1.5; }

/* source button ◆ */
.src {
  border: 0; background: none; color: var(--red); cursor: pointer;
  font-size: 10px; vertical-align: super; padding: 0 2px; font-family: var(--mono);
}
.src:hover { color: var(--red-hi); }

/* ── Chronicle sticky layout ── */
#chronicle { position: relative; border-top: 1px solid var(--line-lo); }
.chron-grid {
  display: grid; grid-template-columns: minmax(380px, 44%) 1fr;
  max-width: 1440px; margin: 0 auto; gap: 0;
}
.chron-text { padding: 40px 20px 40px 40px; }
.step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding: 44px 24px 44px 0; max-width: 620px; }
.step.active-step h3 { color: var(--ink); }
.chron-dash { position: relative; }
.dash-inner {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 28px;
}

/* Chronicle inline mini-charts */
.inline-chart {
  margin: 20px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 14px 12px 8px;
}
.inline-chart svg text { font-family: var(--mono); }
.inline-chart .ic-title { font-weight: 700; font-size: 13.5px; margin: 0 0 2px 4px; font-family: var(--sans); }
.inline-chart .ic-src { font-family: var(--mono); font-size: 9.5px; color: var(--ink-lo); margin: 6px 4px 2px; }

/* ── Pull-quote · editorial (heavy top rule, hairline bottom — no tinted card) ── */
.quote-card {
  margin: 46px 0 40px; position: relative;
  background: transparent;
  border: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 24px 2px 20px;
  transform: none;
}
.quote-card::after { content: none; }
.quote-card::before {
  content: "From the record";
  display: block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-lo); margin-bottom: 14px;
}
.quote-card:nth-of-type(even) { transform: none; }
.quote-card .q-mark { display: none; }
.quote-card .q-badges { display: none; }
.quote-card .q-zh { display: none; }
.quote-card .q-text {
  font-size: 22px; font-style: italic;
  font-family: var(--serif); color: var(--ink);
  line-height: 1.52; margin-bottom: 14px; letter-spacing: -0.005em;
  text-wrap: balance;
}
.quote-card .q-who {
  font-family: var(--sans); font-size: 12px; color: var(--ink-md);
  text-transform: uppercase; letter-spacing: .08em;
}
.quote-card .q-who b { color: var(--ink); font-weight: 700; }
.quote-card .q-why {
  margin-top: 14px; padding-top: 12px; border-top: 1px dotted var(--line);
  font-size: 13.5px; color: var(--ink-md); line-height: 1.7; display: block;
}
.quote-card .q-lab {
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-lo);
  margin-right: 6px; letter-spacing: .12em; text-transform: uppercase;
}
.quote-card .q-lab.why { color: var(--red); margin-left: 10px; }
.quote-card .q-src { font-family: var(--mono); font-size: 10px; color: var(--ink-lo); margin-left: 8px; }

/* drill card */
#drill-card {
  position: fixed; z-index: 200; min-width: 240px; max-width: 340px;
  background: var(--ink); color: #eef2f6; padding: 14px 18px; border-radius: 6px;
  box-shadow: 0 12px 40px rgba(5,28,44,.4); font-size: 13px; line-height: 1.65;
  border-top: 3px solid var(--red);
}
#drill-card .d-title { font-family: var(--mono); font-size: 10.5px; color: #9fb0c0; letter-spacing: .08em; text-transform: uppercase; }
#drill-card .d-val { font-family: var(--mono); font-size: 25px; font-weight: 700; color: #fff; margin: 2px 0; font-variant-numeric: tabular-nums; }
#drill-card .d-val .pos { color: #6fd0b2; } #drill-card .d-val .neg { color: #ef9aae; }
#drill-card .d-sub { color: #c6d1db; font-size: 12.5px; }
#drill-card .d-src { font-family: var(--mono); font-size: 10px; color: #8595a6; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); }
#drill-card .d-close { position: absolute; top: 6px; right: 10px; color: #8595a6; cursor: pointer; background: none; border: 0; font-size: 14px; }

/* appendix */
#sec-sources { padding: 100px 0 80px; border-top: 1px solid var(--line-lo); }
#source-list { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; align-items: start; }
@media (max-width: 1420px) { #source-list { grid-template-columns: 1fr; } }
.src-row { display: block; padding: 10px 0 11px; border-bottom: 1px solid var(--line-lo); font-size: 13.5px; }
.src-row .s-fact { display: block; color: var(--ink); line-height: 1.55; }
.src-row .s-cite { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-md); margin-top: 4px; line-height: 1.6; }
.colophon { margin-top: 40px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-lo); line-height: 2; }
@media (max-width: 900px) { #source-list { column-count: 1; } }

/* source-category badge (four-source rule) */
.src-cat {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 3px;
  padding: 0 5px; margin-right: 6px; color: var(--ink-md); vertical-align: 1px;
}
.src-cat.kimi { border-color: var(--red); color: var(--red); }
.src-cat.broker { border-color: var(--copper); color: var(--copper); }
.src-cat.company { border-color: var(--green); color: var(--green); }
.src-cat.industry { border-color: var(--blue); color: var(--blue); }

/* data tables (lineage, comparisons) */
table.dt {
  border-collapse: collapse; width: 100%;
  font-family: var(--sans); font-size: 13.5px; line-height: 1.55;
}
.dt-scroll { overflow-x: auto; }
table.dt th {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-md); text-align: left; padding: 7px 12px 7px 0;
  border-bottom: 1.5px solid var(--ink); white-space: nowrap;
}
table.dt td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-lo); vertical-align: top; }
table.dt td.num { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt tr:hover td { background: var(--paper-hi); }
table.dt tr.hl td { background: rgba(34,81,255,.05); }

/* ── §0.5 three terms · magazine columns (no cards, hover to unfold) ── */
.term-mag {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.term-mag .term {
  padding: 6px 26px 14px;
  cursor: default; outline: none;
}
.term-mag .term + .term { border-left: 1px solid var(--line-lo); }
.term-mag .term:first-child { padding-left: 2px; }
.term-mag .t-abbr {
  font-family: var(--serif); font-weight: 700; font-size: 34px;
  letter-spacing: -0.01em; color: var(--ink); line-height: 1.1;
  transition: color .2s ease;
}
.term-mag .term:hover .t-abbr, .term-mag .term:focus-within .t-abbr { color: var(--red); }
.term-mag .t-full {
  font-family: var(--mono); font-size: 10px; color: var(--ink-lo);
  text-transform: uppercase; letter-spacing: .1em; margin: 6px 0 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-lo);
}
.term-mag .t-gist { font-size: 14px; color: var(--ink); line-height: 1.65; margin: 0; }
.term-mag .term { position: relative; }
.term-mag .t-more {
  /* Desktop: overlay expansion, never pushes content below (QA: hover once made the whole section twitch +217px) */
  position: absolute; left: 26px; right: 26px; top: 100%; z-index: 6;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 16px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(.25,.7,.3,1), opacity .3s ease .05s;
  pointer-events: none;
}
.term-mag .term:first-child .t-more { left: 2px; }
.term-mag .term:hover .t-more, .term-mag .term:focus-within .t-more,
.term-mag .term.open .t-more { max-height: 340px; opacity: 1; pointer-events: auto; }
.term-mag .t-more p { font-size: 13.5px; color: var(--ink-md); line-height: 1.72; margin: 0; }
.term-mag .t-hint {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-lo); margin-top: 12px; transition: opacity .25s ease;
}
.term-mag .term:hover .t-hint, .term-mag .term:focus-within .t-hint, .term-mag .term.open .t-hint { opacity: 0; }
@media (max-width: 760px) {
  .term-mag { grid-template-columns: 1fr; }
  .term-mag .term { padding: 18px 2px; border-left: 0 !important; border-top: 1px solid var(--line-lo); }
  .term-mag .term:first-child { border-top: 0; }
  .term-mag .t-more { position: static; max-height: none; opacity: 1; margin-top: 10px; padding: 0; border-bottom: 0; pointer-events: auto; }
  .term-mag .t-hint { display: none; }
}

/* tooltip */
.tip {
  position: fixed; z-index: 150; pointer-events: none;
  background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11px;
  padding: 5px 10px; border-radius: 4px; opacity: 0; transition: opacity .12s; white-space: nowrap;
}

@media (max-width: 980px) {
  .chron-grid { grid-template-columns: 1fr; }
  .chron-dash { display: none; }
  .step { min-height: 0; }
}

/* ── Narrative column yields to right rail ── */
main, footer#sec-sources { margin-right: var(--railw); }
#cover { margin-right: 0; }
.cover-inner { max-width: 1180px; margin: 0 auto; }
#era-rail { right: var(--railw); }

/* ── Persistent dashboard rail · borderless, part of the page surface ── */
#dash-rail {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--railw);
  border: 0;
  background: transparent;
  z-index: 60;
  /* fully hidden on the cover; slides in after the reader enters the chapters */
  opacity: 0; visibility: hidden; transform: translateX(24px);
  transition: opacity .55s ease, transform .55s ease, visibility 0s linear .55s;
}
#dash-rail.on { opacity: 1; visibility: visible; transform: none; transition: opacity .55s ease, transform .55s ease; }
#dash-rail canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
#dash-rail #dash-canvas {
  max-height: none; border: 0; border-radius: 0; box-shadow: none;
  background: transparent;
}

/* ── dek · italic serif deck, no border chrome ── */
.dek {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.62; color: var(--ink-md);
  margin: -2px 0 28px; max-width: 600px;
  border: 0; padding: 0;
}
.dek strong, .dek b { color: var(--ink); font-style: normal; }

/* chronicle single-column */
.chron-text { max-width: 760px; margin: 0 auto; padding: 40px 24px; }
.step { min-height: 78vh; }

@media (max-width: 1180px) {
  body { --railw: 0px; }
  #dash-rail { display: none; }
}

/* section hairline */
hr.sep { border: 0; height: 1px; background: var(--line); margin: 0 auto; max-width: 860px; }

/* ── Round 3 · V04 pipeline modules ── */

/* journey note strip */
.jp-note {
  margin-top: 18px; padding: 14px 18px;
  background: rgba(34,81,255,.05); border-left: 3px solid var(--red);
}
.jp-note p { font-family: var(--serif); font-size: 15px; line-height: 1.65; color: var(--ink-md); margin: 0; }
.jp-note b { color: var(--ink); }
.jp-note code { font-family: var(--mono); font-size: 12.5px; background: rgba(5,28,44,.07); padding: 1px 5px; border-radius: 3px; }

/* machines cards */
.mc-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.mc-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red);
  padding: 16px 16px 14px; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease;
}
.mc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(5,28,44,.09); }
.mc-card.gated { border-top-color: var(--ink-lo); background: rgba(255,255,255,.6); border-style: dashed; }
.mc-card h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; margin: 0 0 4px; color: var(--ink); }
.mc-card .mc-role { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--red); margin: 0 0 8px; }
.mc-card .mc-gist { font-family: var(--serif); font-size: 14px; line-height: 1.6; color: var(--ink-md); margin: 0 0 10px; }
.mc-card ul { margin: 0 0 10px; padding-left: 16px; }
.mc-card li { font-family: var(--mono); font-size: 10.5px; line-height: 1.7; color: var(--ink-md); }
.mc-card .mc-rule { font-family: var(--serif); font-size: 12.5px; font-style: italic; color: var(--ink); margin: 0; border-top: 1px solid var(--line-lo); padding-top: 8px; }
@media (max-width: 1100px) { .mc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mc-cards { grid-template-columns: 1fr; } }

/* oslab — OS tracks */
.osl-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.osl-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 16px !important; }
.osl-tab b { font-size: 12px; }
.osl-tab span { font-family: var(--mono); font-size: 8.6px; letter-spacing: .08em; opacity: .75; }
.osl-tab.on { border-color: var(--trk, var(--red)); color: var(--trk, var(--red)); background: rgba(34,81,255,.05); }
.osl-stage { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 900px) { .osl-stage { grid-template-columns: 1fr; } }
.osl-intro { font-family: var(--serif); font-size: 15px; line-height: 1.65; color: var(--ink-md); margin: 0 0 18px; }
.osl-vibe { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; border: 1px solid; padding: 2px 8px; border-radius: 3px; white-space: nowrap; margin-right: 6px; }
.osl-step {
  display: flex; gap: 14px; margin-bottom: 14px;
  opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease;
}
.osl-step.in { opacity: 1; transform: none; }
.osl-no {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.osl-body h4 { font-family: var(--serif); font-size: 16.5px; margin: 4px 0 4px; color: var(--ink); }
.osl-body p { font-family: var(--serif); font-size: 14.5px; line-height: 1.62; color: var(--ink-md); margin: 0; }
pre.osl-term {
  background: var(--ink); color: #dfe7ff; font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  padding: 12px 16px; border-radius: 6px; margin: -4px 0 16px 44px; overflow-x: auto; white-space: pre-wrap;
}
pre.osl-term .t-prompt { color: #7fd4a8; }
pre.osl-term .t-cur { color: #7fd4a8; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.osl-done { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); padding: 16px 18px; position: sticky; top: 20px; }
.osl-done h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink); margin: 0 0 12px; }
.osl-done ul { list-style: none; margin: 0; padding: 0; }
.osl-done li { display: flex; gap: 10px; align-items: flex-start; font-family: var(--serif); font-size: 13.5px; line-height: 1.55; color: var(--ink-md); margin-bottom: 9px; }
.osl-done li input { margin-top: 3px; accent-color: var(--red); }
.osl-done li.done span { text-decoration: line-through; opacity: .55; }
.osl-count { font-family: var(--mono); font-size: 10.5px; color: var(--ink-lo); margin: 10px 0 0; border-top: 1px solid var(--line-lo); padding-top: 10px; }

/* appslab */
.appc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .appc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .appc-grid { grid-template-columns: 1fr; } }
.appc-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--ink);
  padding: 14px 15px; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease, border-color .2s;
}
.appc-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(5,28,44,.09); }
.appc-card.on { border-top-color: var(--red); box-shadow: 0 8px 22px rgba(34,81,255,.12); }
.appc-top { display: flex; justify-content: space-between; align-items: baseline; }
.appc-card h3 { font-family: var(--serif); font-size: 17px; margin: 0; color: var(--ink); }
.appc-port { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--red); }
.appc-role { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--red); margin: 2px 0 8px; }
.appc-gist { font-family: var(--serif); font-size: 13.5px; line-height: 1.58; color: var(--ink-md); margin: 0 0 10px; }
.appc-meta { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.appc-meta span { font-family: var(--mono); font-size: 9px; letter-spacing: .05em; color: var(--ink-lo); text-transform: uppercase; }
.appc-sheet { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .45s cubic-bezier(.25,.7,.3,1), opacity .3s ease; }
.appc-sheet.on { max-height: 900px; opacity: 1; margin-top: 18px; }
.appc-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; }
@media (max-width: 900px) { .appc-cols { grid-template-columns: 1fr; } }
.appc-compose h4, .appc-run h4 { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink); margin: 0 0 10px; }
.appc-compose pre {
  background: var(--ink); color: #dfe7ff; font-family: var(--mono); font-size: 11px; line-height: 1.55;
  padding: 14px 16px; border-radius: 6px; overflow-x: auto; white-space: pre; margin: 0;
}
.appc-run p { font-family: var(--serif); font-size: 14px; line-height: 1.65; color: var(--ink-md); margin: 0 0 16px; }
.appc-run .appc-done { color: var(--ink); border-left: 3px solid var(--red); padding-left: 12px; font-style: italic; }

/* flowlab */
.fl-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.fl-meta span { font-family: var(--mono); font-size: 10px; color: var(--ink-md); }
.fl-meta b { color: var(--ink-lo); letter-spacing: .1em; margin-right: 5px; }
.fl-why { font-family: var(--serif); font-size: 14.5px; font-style: italic; line-height: 1.6; color: var(--ink-md); margin: 0 0 6px; max-width: 720px; }
.fl-done { margin-top: 20px; }
.fl-arr { margin-top: 14px; }

/* ten steps */
.ten-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 22px; counter-reset: ten; }
@media (max-width: 760px) { .ten-steps { grid-template-columns: 1fr; } }
.ten-step { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); padding: 13px 15px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.ten-step:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(5,28,44,.08); }
.ten-no {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--red); color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ten-step p { font-family: var(--serif); font-size: 13.5px; line-height: 1.58; color: var(--ink-md); margin: 3px 0 0; }


/* ═══════════ Round 7 · The Crew + Sons Mode ═══════════ */

/* cover chip that leads the sons in */
.chip-crew { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.chip-crew:hover { background: rgba(176,122,16,.08); }

/* ── The Crew section ── */
.crew-wrap { display: grid; gap: 26px; }
.crew-loop { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; }
.crew-loop-step {
  flex: 1 1 130px; cursor: pointer; text-align: left;
  background: var(--paper-hi); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-family: var(--sans); transition: transform .15s ease, box-shadow .15s ease;
}
.crew-loop-step:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red); }
.crew-loop-step b { display: block; font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; color: var(--red); margin-bottom: 4px; }
.crew-loop-step span { font-size: 12.5px; color: var(--ink-md); line-height: 1.45; display: block; }
.crew-loop-step.hot { border-color: var(--neg); background: rgba(194,47,78,.05); }
.crew-loop-step.hot b { color: var(--neg); }
.crew-loop-arrow { align-self: center; color: var(--ink-lo); font-family: var(--mono); font-size: 15px; }

.crew-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crew-station {
  cursor: pointer; background: #fff; border: 1.5px solid var(--line); border-top: 5px solid var(--st-color, var(--red));
  border-radius: 12px; padding: 18px 20px; transition: transform .15s ease, box-shadow .15s ease;
}
.crew-station:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cs-name { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .1em; color: var(--st-color, var(--red)); }
.cs-who { font-size: 15.5px; font-weight: 700; margin: 4px 0 8px; }
.cs-does { font-size: 14.5px; color: var(--ink-md); line-height: 1.6; }
.cs-learns { font-size: 13px; color: var(--ink-lo); margin-top: 10px; line-height: 1.5; }
.cs-learns b { color: var(--ink-md); }
.crew-rotate { font-size: 14px; color: var(--ink-md); font-style: italic; margin-top: -10px; }

.crew-rules { background: var(--paper-hi); border-radius: 12px; padding: 18px 20px; display: grid; gap: 12px; }
.crew-h { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--ink-lo); }
.crew-rule b { display: block; font-family: var(--sans); font-size: 14.5px; color: var(--ink); margin-bottom: 3px; }
.crew-rule span { font-size: 13.5px; color: var(--ink-md); line-height: 1.55; }

/* mission log */
.crew-log { border: 2px dashed var(--red); border-radius: 14px; padding: 20px 22px; background: rgba(34,81,255,.03); }
.crew-xp { position: relative; height: 26px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; margin: 12px 0 6px; overflow: hidden; }
.crew-xp-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), #0e9f6e); border-radius: 999px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.crew-xp-label { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--ink); mix-blend-mode: multiply; }
.crew-rank { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--gold); margin-bottom: 12px; }
.crew-quests { display: grid; gap: 7px; }
.crew-quest {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.crew-quest:hover { border-color: var(--red); }
.crew-quest.gate { border-color: var(--gold); background: rgba(176,122,16,.05); }
.crew-quest input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--red); cursor: pointer; flex: none; }
.cq-w { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--red); padding-top: 2px; flex: none; width: 34px; }
.crew-quest.gate .cq-w { color: var(--gold); }
.cq-body b { display: block; font-family: var(--sans); font-size: 14.5px; line-height: 1.4; }
.cq-body i { display: block; font-style: normal; font-size: 13px; color: var(--ink-md); line-height: 1.5; margin-top: 2px; }
.cq-check { margin-left: auto; color: var(--green); font-size: 16px; opacity: 0; transition: opacity .2s ease; flex: none; }
.crew-quest.done { background: rgba(0,138,109,.06); border-color: rgba(0,138,109,.4); }
.crew-quest.done .cq-check { opacity: 1; }
.crew-quest.done .cq-body b { text-decoration: line-through; text-decoration-color: rgba(0,138,109,.5); }

/* ── kid briefing cards (Sons Mode only) ── */
.kid-brief {
  display: none; margin: 18px 0 4px; padding: 14px 18px;
  border: 2px dashed var(--gold); border-radius: 12px; background: rgba(176,122,16,.05);
}
body.sons .kid-brief { display: block; }
.kb-head { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--gold); margin-bottom: 6px; }
.kb-say { font-size: 16.5px; line-height: 1.65; }
.kb-do { font-family: var(--sans); font-size: 14px; color: var(--ink-md); margin-top: 6px; }
.kb-do b { color: var(--red); }

/* ── the floating Sons Mode toggle ── */
#sons-toggle {
  position: fixed; right: 18px; bottom: 18px; z-index: 95; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  padding: 11px 16px; border-radius: 999px; border: 2px solid var(--gold);
  background: var(--paper); color: var(--gold); box-shadow: var(--shadow);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
#sons-toggle:hover { transform: translateY(-2px); }
#sons-toggle.on { background: var(--gold); color: #fff; }

/* ── Sons Mode reskin: bigger, airier, warmer ── */
body.sons { font-size: 19.5px; line-height: 1.82; }
body.sons h2 { line-height: 1.28; }
body.sons .dek { font-size: 19px; }
body.sons .sec-no { letter-spacing: .22em; }
body.sons .band { scroll-margin-top: 64px; }
body.sons .mc-card, body.sons .appc, body.sons .crew-station { border-radius: 14px; }
body.sons .chart-frame { border-radius: 14px; }

@media (max-width: 900px) {
  .crew-stations { grid-template-columns: 1fr; }
  .crew-loop-arrow { display: none; }
}
