/* Movaci CISSP Study. Design spec: DESIGN.md.
   Layout concept: a quiet instrument. Sidebar shell, left-aligned content, hairline structure, mono data. */

@font-face { font-family: "Geist"; src: url("../assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --mv-blue: #0066b3; --mv-navy: #003b6f; --mv-sky: #93b4d7; --mv-grey: #e9e8e7; --mv-mid: #939596; --mv-pale: #eff0f1; --mv-black: #231f20;
  --bg: #ffffff;
  --sidebar: #f6f7f8;
  --surface: #ffffff;
  --sunken: #f6f7f8;
  --hover: rgba(35, 31, 32, .045);
  --active: rgba(35, 31, 32, .07);
  --line: #e9e8e7;
  --line-strong: #d8d7d7;
  --track: #eff0f1;
  --text: #231f20;
  --text-2: #504e4f;
  --text-3: #6b6c6d;
  --heading: #231f20;
  --accent: #0066b3;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 102, 179, .08);
  --accent-line: rgba(0, 102, 179, .32);
  --strong: #003b6f;
  --sky: #93b4d7;
  --root: #003b6f;
  --dot: rgba(35, 31, 32, .09);
  --mm-line: #c9cfd6;
  --focus: #0066b3;
  --ok: #17784a; --ok-soft: rgba(23, 120, 74, .09); --ok-line: rgba(23, 120, 74, .45);
  --bad: #b42318; --bad-soft: rgba(180, 35, 24, .07); --bad-line: rgba(180, 35, 24, .42);
  --accent-solid: #0066b3; --accent-solid-ink: #ffffff;
  --scrim: rgba(8, 18, 28, .38);
  --shadow: 0 1px 2px rgba(0, 30, 60, .06), 0 16px 48px rgba(0, 30, 60, .16);
  --shadow-sm: 0 1px 2px rgba(0, 30, 60, .06), 0 4px 14px rgba(0, 30, 60, .07);
  --font: "Geist", "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 6px; --r-lg: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sbw: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08121c; --sidebar: #0a1622; --surface: #0d1a28; --sunken: #0b1723;
    --hover: rgba(147, 180, 215, .07); --active: rgba(147, 180, 215, .11);
    --line: rgba(147, 180, 215, .15); --line-strong: rgba(147, 180, 215, .26); --track: rgba(147, 180, 215, .12);
    --text: #e9e8e7; --text-2: #b9bcc0; --text-3: #a3a6aa; --heading: #f3f3f2;
    --accent: #4a8dc5; --accent-ink: #06121e; --accent-soft: rgba(74, 141, 197, .14); --accent-line: rgba(74, 141, 197, .45);
    --strong: #93b4d7; --root: #0f4c86; --dot: rgba(147, 180, 215, .10); --mm-line: rgba(147, 180, 215, .30);
    --focus: #93b4d7; --scrim: rgba(2, 6, 10, .6); --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .12); --ok-line: rgba(76, 195, 138, .5); --bad: #f97066; --bad-soft: rgba(249, 112, 102, .1); --bad-line: rgba(249, 112, 102, .5); --accent-solid: #1f6fbf; --accent-solid-ink: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 56px rgba(0, 0, 0, .5); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08121c; --sidebar: #0a1622; --surface: #0d1a28; --sunken: #0b1723;
  --hover: rgba(147, 180, 215, .07); --active: rgba(147, 180, 215, .11);
  --line: rgba(147, 180, 215, .15); --line-strong: rgba(147, 180, 215, .26); --track: rgba(147, 180, 215, .12);
  --text: #e9e8e7; --text-2: #b9bcc0; --text-3: #a3a6aa; --heading: #f3f3f2;
  --accent: #4a8dc5; --accent-ink: #06121e; --accent-soft: rgba(74, 141, 197, .14); --accent-line: rgba(74, 141, 197, .45);
  --strong: #93b4d7; --root: #0f4c86; --dot: rgba(147, 180, 215, .10); --mm-line: rgba(147, 180, 215, .30);
  --focus: #93b4d7; --scrim: rgba(2, 6, 10, .6); --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .12); --ok-line: rgba(76, 195, 138, .5); --bad: #f97066; --bad-soft: rgba(249, 112, 102, .1); --bad-line: rgba(249, 112, 102, .5); --accent-solid: #1f6fbf; --accent-solid-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 56px rgba(0, 0, 0, .5); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
h1, h2, h3, h4 { color: var(--heading); margin: 0 0 .4em; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 18px; letter-spacing: -.015em; }
h3 { font-size: 14px; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); }
.skip:focus { left: 8px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { flex: none; display: block; }
.eyebrow { display: block; font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.eyebrow.accent, .accent-text { color: var(--accent); }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; font: 500 11px/1 var(--mono); color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pre { white-space: pre-wrap; }
.only-mobile { display: none !important; }
.small-note { font-size: 12.5px; color: var(--text-3); margin-top: 16px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px 12px; gap: 4px; z-index: 40; scrollbar-width: thin; }
.sb-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 16px; width: auto; display: block; }
.logo-white { display: none !important; }
:root[data-theme="dark"] .logo-blue { display: none !important; }
:root[data-theme="dark"] .logo-white { display: block !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-blue { display: none !important; } :root:not([data-theme="light"]) .logo-white { display: block !important; } }
.product { font: 500 12.5px/1 var(--font); color: var(--text-2); padding-left: 10px; border-left: 1px solid var(--line-strong); white-space: nowrap; }
.sb-close { margin-left: auto; display: none !important; }
.sb-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px 0 10px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--text-3); cursor: pointer; transition: border-color .12s; text-align: left; }
.sb-search:hover { border-color: var(--line-strong); color: var(--text-2); }
.sb-search span { flex: 1; font-size: 13px; }
.sb-nav, .sb-domains { display: flex; flex-direction: column; gap: 1px; }
.sb-nav a, .sb-foot > a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 13.5px; transition: background-color .12s, color .12s; }
.sb-nav a:hover, .sb-foot > a:hover, .sb-domains a:hover { background: var(--hover); color: var(--text); }
.sb-nav a.active, .sb-foot > a.active, .sb-domains a.active { background: var(--active); color: var(--text); }
.sb-nav a.active .ico, .sb-foot > a.active .ico { color: var(--accent); }
.sb-nav a .ico, .sb-foot > a .ico { color: var(--text-3); }
.badge { margin-left: auto; font: 500 11px/18px var(--mono); padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.sb-section { margin-top: 18px; }
.sb-label { display: block; padding: 0 10px 6px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sb-domains a { display: grid; grid-template-columns: 16px 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); text-decoration: none; font-size: 13px; }
.sb-domains .n { font: 500 11px var(--mono); color: var(--text-3); }
.sb-domains .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-domains .p { font: 500 11px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.ring { display: block; }
.ring .tr { stroke: var(--line-strong); }
.ring .fg { stroke: var(--accent); transition: stroke-dashoffset .4s var(--ease); }
.sb-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.sb-tools { display: flex; align-items: center; gap: 2px; padding: 2px 4px 0 10px; }
.clock { font: 500 11.5px var(--mono); color: var(--text-3); margin-right: auto; font-variant-numeric: tabular-nums; white-space: nowrap; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.clock:hover { color: var(--text); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: var(--r); background: transparent; color: var(--text-2); cursor: pointer; transition: background-color .12s, color .12s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.mobilebar { display: none; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
.content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 44px 48px 72px; outline: none; }
main.wide { max-width: none; padding: 0; display: flex; height: 100vh; }
main > * { animation: enter .22s var(--ease) both; }
main > *:nth-child(2) { animation-delay: .03s; } main > *:nth-child(3) { animation-delay: .06s; } main > *:nth-child(4) { animation-delay: .09s; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.footer { border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 22px 48px 28px; display: grid; gap: 10px; }
.foot-brand { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.foot-brand strong { color: var(--text); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.foot-links a { color: var(--text-2); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.foot-links a:first-child { color: var(--text); font-weight: 500; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s, transform .08s; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.btn:hover { background: var(--sunken); border-color: var(--text-3); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--mv-navy); border-color: var(--mv-navy); color: #fff; }
:root[data-theme="dark"] .btn.primary:hover { background: var(--sky); border-color: var(--sky); color: #06121e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:hover { background: var(--sky); border-color: var(--sky); color: #06121e; } }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); box-shadow: none; padding: 0 8px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.small.ghost { padding: 0 6px; }
.btn.icon { width: 32px; padding: 0; }
.btn.small.icon { width: 28px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.danger:hover { border-color: var(--text); }
.field { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .12s, box-shadow .12s; }
textarea.field { height: auto; min-height: 120px; padding: 10px; line-height: 1.55; resize: vertical; }
.field:focus, .field:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); flex-wrap: nowrap; }
.seg button { border: 0; border-left: 1px solid var(--line); background: transparent; padding: 0 12px; height: 30px; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--hover); color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.notice { border: 1px solid var(--line-strong); border-left: 2px solid var(--strong); background: var(--sunken); padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font: 500 11px/1 var(--mono); letter-spacing: .02em; border: 1px solid var(--line-strong); color: var(--text-2); white-space: nowrap; }
.tag.ok { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.tag.no { border-color: var(--text-3); color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 8px; border: 1px solid var(--line-strong); border-radius: 999px; font: 500 11.5px/1 var(--mono); color: var(--text-2); background: var(--surface); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Page structure ---------- */
.page-head { margin-bottom: 28px; max-width: 760px; }
.page-head h1 { margin-bottom: 8px; }
.page-head p { color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 64ch; margin: 0; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 52px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-title h2 { margin: 0; }
.section-title .eyebrow { margin-bottom: 6px; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; background: var(--surface); }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin-bottom: 8px; }
.panel > p:last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.list { margin: 0; padding-left: 1.2em; }
.list li { margin: 4px 0; }
.list.plain { list-style: none; padding: 0; }
.list.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.list.plain li:last-child { border-bottom: 0; }
.bar { display: flex; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.bar .wip { background: var(--sky); }
.empty-state { padding: 56px 0; max-width: 460px; }
.empty-state svg { color: var(--text-3); margin-bottom: 14px; }
.empty-state p { color: var(--text-2); }
.lede { font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 64ch; }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; padding: 4px 0 44px; }
.hero h1 { font-size: clamp(34px, 2.4vw + 18px, 52px); line-height: 1.04; letter-spacing: -.038em; margin: 18px 0 18px; max-width: 14ch; }
.hero .lede { font-size: 16.5px; margin-bottom: 26px; max-width: 46ch; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hero .meta { margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; font: 500 12px var(--mono); color: var(--text-3); }
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta .ico { color: var(--accent); }
.preview { position: relative; border: 1px solid var(--line); border-radius: 12px; background-color: var(--surface); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: block; color: inherit; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font: 500 11.5px var(--mono); color: var(--text-3); }
.preview-bar b { color: var(--text); font-weight: 500; }
.preview svg { display: block; width: 100%; height: auto; }
.facts-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; }
.facts-strip > div { padding: 16px 18px 16px 0; }
.facts-strip > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.facts-strip dt { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.facts-strip dd { margin: 0; font: 500 15px/1.3 var(--font); color: var(--text); letter-spacing: -.01em; }

/* ---------- Home: readiness instrument ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; }
.instrument .score { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 18px; }
.instrument .score b { font: 500 64px/1 var(--mono); letter-spacing: -.04em; color: var(--heading); font-variant-numeric: tabular-nums; }
.instrument .score span { font: 500 13px var(--mono); color: var(--text-3); }
.instrument .score em { font-style: normal; margin-left: auto; font-size: 12.5px; color: var(--text-2); max-width: 30ch; text-align: right; line-height: 1.45; }
.weights { display: flex; gap: 3px; height: 76px; align-items: stretch; }
.weights .w { position: relative; display: flex; flex-direction: column; justify-content: flex-end; background: var(--track); border-radius: 3px; overflow: hidden; text-decoration: none; transition: filter .12s; min-width: 0; }
.weights .w:hover { filter: brightness(.96); }
.weights .w i { display: block; background: var(--accent); transition: height .6s var(--ease); }
.weights .w b { position: absolute; left: 7px; top: 6px; font: 500 11px var(--mono); color: var(--text-2); }
.weights-axis { display: flex; gap: 3px; margin-top: 6px; }
.weights-axis span { font: 500 10.5px var(--mono); color: var(--text-3); overflow: hidden; white-space: nowrap; min-width: 0; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.meter .v { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.meter .v span { font-size: 13px; color: var(--text-2); }
.meter .v b { font: 500 14px var(--mono); color: var(--text); }
.meter .bar { height: 3px; }
.meter small { display: block; margin-top: 6px; font: 500 10.5px var(--mono); color: var(--text-3); letter-spacing: .02em; }
.today-list > a, .today-list > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.today-list > :first-child { border-top: 1px solid var(--line); }
.today-list .ico { color: var(--text-3); }
.today-list a:hover .k { color: var(--accent); }
.today-list .k { font-weight: 500; color: var(--text); font-size: 13.5px; }
.today-list .s { display: block; font-size: 12.5px; color: var(--text-3); }
.today-list .v { font: 500 22px/1 var(--mono); color: var(--heading); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- Domain ledger ---------- */
.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger tbody tr:hover { background: var(--hover); }
.ledger .no { font: 500 12px var(--mono); color: var(--text-3); width: 40px; padding-left: 4px; }
.ledger .name a { color: var(--heading); font-weight: 600; text-decoration: none; font-size: 14.5px; letter-spacing: -.01em; }
.ledger .name a:hover { color: var(--accent); }
.ledger .name small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.ledger .w { width: 90px; font: 500 12.5px var(--mono); color: var(--text-2); }
.wbar { height: 2px; background: var(--sky); margin-top: 6px; border-radius: 1px; }
.ledger .prog { width: 240px; }
.ledger .lbl { display: flex; justify-content: space-between; font: 500 11.5px var(--mono); color: var(--text-3); margin-bottom: 6px; }
.ledger .acts { width: 1%; white-space: nowrap; text-align: right; }
.ledger .acts .btn { margin-left: 2px; }
.strip { display: flex; gap: 2px; height: 14px; }
.strip i { flex: 1; border-radius: 2px; background: var(--track); min-width: 4px; position: relative; overflow: hidden; }
.strip i b { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); }
.num-cell { font: 500 12.5px var(--mono); color: var(--text-2); text-align: right; white-space: nowrap; }

/* ---------- Workflow ---------- */
.workflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow a { display: block; padding: 22px 22px 24px 0; text-decoration: none; color: inherit; }
.workflow a + a { padding-left: 22px; border-left: 1px solid var(--line); }
.workflow .step { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font: 500 11px var(--mono); color: var(--text-3); }
.workflow .step .ico { color: var(--accent); }
.workflow h3 { font-size: 15px; margin-bottom: 6px; }
.workflow p { color: var(--text-2); font-size: 13.5px; margin: 0 0 12px; }
.workflow .go { font: 500 12.5px var(--font); color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.workflow a:hover h3 { color: var(--accent); }
.workflow .go .ico { transition: transform .15s; }
.workflow a:hover .go .ico { transform: translateX(2px); }

/* ---------- Focus list, activity ---------- */
.focus { list-style: none; margin: 0; padding: 0; }
.focus li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.focus .t { font-weight: 500; color: var(--text); }
.focus small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.focus li.done .t { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.chk { width: 18px; height: 18px; padding: 0; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: background-color .15s, border-color .15s; flex: none; }
.chk:hover { border-color: var(--accent); }
.chk[aria-pressed="true"], .chk[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.chk[aria-pressed="true"]::after, .chk[aria-checked="true"]::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg); animation: pop .18s var(--ease); }
.chk[aria-checked="mixed"] { border-color: var(--accent); }
.chk[aria-checked="mixed"]::after { content: ""; width: 8px; height: 2px; background: var(--accent); }
@keyframes pop { from { transform: translateY(-1px) rotate(-45deg) scale(.4); } }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity time { font: 500 11.5px var(--mono); color: var(--text-3); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.spark i { flex: 1; background: var(--track); border-radius: 2px; min-height: 2px; position: relative; }
.spark i.on { background: var(--accent); }
.spark-axis { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); color: var(--text-3); margin-top: 6px; }

/* ---------- Domain rail and tabs ---------- */
.dnav { display: flex; gap: 2px; overflow-x: auto; margin: -8px 0 28px; padding-bottom: 2px; scrollbar-width: none; }
.dnav::-webkit-scrollbar { display: none; }
.dnav a { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); text-decoration: none; font-size: 13px; white-space: nowrap; border: 1px solid transparent; }
.dnav a b { font: 500 11px var(--mono); color: var(--text-3); }
.dnav a:hover { background: var(--hover); color: var(--text); }
.dnav a.active { border-color: var(--line-strong); background: var(--surface); color: var(--text); box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.dnav a.active b { color: var(--accent); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 8px 0 28px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { border: 0; background: none; padding: 10px 0 11px; color: var(--text-2); font-weight: 500; font-size: 13.5px; cursor: pointer; border-bottom: 1.5px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs button[aria-selected="true"], .tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.guide-link { margin: -16px 0 0; font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; }
.guide-link a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.toolrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolrow .field { width: auto; min-width: 220px; flex: 0 1 320px; }
.az { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 14px; }
.az button { width: 26px; height: 26px; border: 1px solid transparent; border-radius: 5px; background: none; font: 500 11.5px var(--mono); color: var(--text-2); cursor: pointer; }
.az button:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text); }
.az button:disabled { color: var(--line-strong); cursor: default; }

/* ---------- Study Hub content ---------- */
.concepts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.concept { padding: 18px 0 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; }
.concept .k { font: 500 11.5px/22px var(--mono); color: var(--accent); grid-row: span 2; }
.concept h3 { font-size: 15px; margin-bottom: 4px; }
.concept p { color: var(--text-2); margin: 0; }
table.terms { width: 100%; border-collapse: collapse; }
table.terms th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 0 16px 10px 0; border-bottom: 1px solid var(--line); }
table.terms td { padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.terms td:first-child { font: 600 13px var(--mono); color: var(--heading); width: 30%; letter-spacing: -.01em; }
table.terms td:last-child { color: var(--text-2); }
table.terms.hide-defs td:last-child span { filter: blur(5px); cursor: pointer; transition: filter .2s; user-select: none; }
table.terms.hide-defs td:last-child span.shown { filter: none; user-select: auto; }
table.terms .dom { font: 500 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.obj-list { border-top: 1px solid var(--line); }
.obj-list .item { display: grid; grid-template-columns: 52px minmax(0, 1fr) 200px auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.obj-list .id { font: 500 12.5px var(--mono); color: var(--accent); }
.obj-list .t { font-weight: 500; color: var(--text); }
.obj-list small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }

/* ---------- Checklist ---------- */
.checklist { border-top: 1px solid var(--line); }
.checklist .grp { border-bottom: 1px solid var(--line); }
.checklist .grp > header { display: grid; grid-template-columns: 22px 52px minmax(0, 1fr) 140px; gap: 12px; align-items: center; padding: 13px 0; }
.checklist .grp > header b { font-weight: 600; color: var(--heading); }
.checklist .grp > header .id { font: 500 12px var(--mono); color: var(--accent); }
.checklist ul { list-style: none; margin: 0 0 10px; padding: 0 0 0 34px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--line); }
.checklist li.done span.t { color: var(--text-3); text-decoration: line-through; }
.checklist li.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } }
.checklist li .btn { opacity: 0; transition: opacity .12s; }
.checklist li:hover .btn, .checklist li .btn:focus { opacity: 1; }

/* ---------- Quiz and exam ---------- */
.quiz { max-width: 800px; }
.q-head { display: flex; justify-content: space-between; gap: 12px; font: 500 12px var(--mono); color: var(--text-3); margin-bottom: 14px; flex-wrap: wrap; }
.q-head .timer { color: var(--text); }
.q-text { font-size: 18px; line-height: 1.55; color: var(--heading); font-weight: 500; letter-spacing: -.01em; margin: 6px 0 22px; }
.q-opts { display: grid; gap: 8px; margin-bottom: 18px; }
.q-opts button { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; align-items: start; text-align: left; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 14.5px; line-height: 1.5; transition: border-color .12s, background-color .12s; }
.q-opts button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.q-opts button:disabled { cursor: default; }
.q-opts .L { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; font: 500 12px var(--mono); color: var(--text-2); margin-top: -1px; }
.q-opts button.sel, .q-opts button.right { border-color: var(--accent); background: var(--accent-soft); }
.q-opts button.sel .L, .q-opts button.right .L { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.q-opts button.wrong { border-color: var(--text); border-style: dashed; }
.q-opts button.wrong .L { background: var(--text); border-color: var(--text); color: var(--bg); }
.q-opts .x { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.why { border-left: 2px solid var(--accent); background: var(--sunken); padding: 14px 16px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 18px; line-height: 1.6; font-size: 14px; }
.result-score { font: 500 64px/1 var(--mono); letter-spacing: -.04em; color: var(--heading); margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.review { list-style: none; padding: 0; margin: 0; }
.review li { padding: 14px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.review .tag { margin-right: 8px; }
.review .ans { display: block; margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 8px; }
.modes > div { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.modes > div + div { border-left: 1px solid var(--line); }
.modes h3 { font-size: 15px; margin: 0; }
.modes p { color: var(--text-2); font-size: 13.5px; margin: 0; flex: 1; }
.modes dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 4px 0 6px; font-size: 12.5px; }
.modes dt { font: 500 11px/1.6 var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.modes dd { margin: 0; color: var(--text); }
.modes > div.rec { background: var(--sunken); }
.exam-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 0; margin-bottom: 22px; background: var(--bg); border-bottom: 1px solid var(--line); font: 500 12.5px var(--mono); color: var(--text-2); }
.exam-bar .bar { flex: 1; height: 3px; }
.exam-bar .time { color: var(--text); font-size: 14px; }
.bd-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.bd-table td, .bd-table th { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
.bd-table th { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.bd-table td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
.bd-table .bar { width: 160px; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 8px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.verdict .result-score { margin: 0; }

/* ---------- Flashcards ---------- */
.stat-strip { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.stat { padding: 14px 28px 14px 0; display: flex; align-items: baseline; gap: 8px; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat b { font: 500 22px/1 var(--mono); color: var(--heading); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--text-3); }
.fc-stage { max-width: 720px; }
.fc-stage > .bar { height: 2px; margin-bottom: 18px; }
.fc { position: relative; display: block; width: 100%; height: 340px; perspective: 1400px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: inherit; }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 40px 44px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .5s var(--ease); box-shadow: var(--shadow-sm); }
.fc-front { background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.fc-back { transform: rotateY(180deg); }
.fc.flipped .fc-front { transform: rotateY(-180deg); }
.fc.flipped .fc-back { transform: rotateY(0); }
.fc .eyebrow { position: absolute; top: 22px; left: 44px; right: 44px; }
.fc-q { font-size: clamp(26px, 2vw + 14px, 38px); font-weight: 600; letter-spacing: -.03em; color: var(--heading); line-height: 1.12; }
.fc-hint { position: absolute; bottom: 22px; left: 44px; font: 500 11.5px var(--mono); color: var(--text-3); }
.fc-a { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 56ch; }
.fc-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.fc-rate .btn { height: 56px; flex-direction: column; gap: 5px; }
.fc-rate .btn small { font: 500 11px var(--mono); opacity: .75; }
.fc-keys { margin-top: 14px; font: 500 11.5px var(--mono); color: var(--text-3); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.fc-keys span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Plan ---------- */
.plan-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.plan-settings { display: flex; flex-direction: column; gap: 16px; }
.plan-settings label > span { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.plan-settings .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.daypick button { border: 0; border-left: 1px solid var(--line); background: var(--surface); height: 32px; font: 500 11.5px var(--mono); color: var(--text-2); cursor: pointer; }
.daypick button:first-child { border-left: 0; }
.daypick button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 18px; }
.kpi { padding: 16px 16px 16px 0; }
.kpi + .kpi { padding-left: 16px; border-left: 1px solid var(--line); }
.kpi b { display: block; font: 500 30px/1 var(--mono); color: var(--heading); letter-spacing: -.03em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--text-3); }
.proj { margin-top: 18px; padding: 14px 16px; border-left: 2px solid var(--line-strong); background: var(--sunken); border-radius: 0 var(--r) var(--r) 0; }
.proj strong { display: block; font-size: 16px; color: var(--heading); margin: 2px 0 4px; }
.proj span:last-child { font-size: 13px; color: var(--text-2); }
.proj.ahead { border-left-color: var(--accent); }
.proj.behind { border-left-color: var(--text); }
.schedule { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; }
.schedule div { border: 1px solid var(--line); border-radius: 5px; padding: 6px 4px; text-align: center; font: 500 10.5px var(--mono); color: var(--text-3); }
.schedule div b { display: block; font-size: 13px; color: var(--text); margin-top: 2px; }
.schedule div.off { background: var(--sunken); }
.schedule div.off b { color: var(--text-3); }
.schedule div.today { border-color: var(--accent); }
.schedule div.exam { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.schedule div.exam b { color: var(--accent-ink); }

/* ---------- Analytics ---------- */
.heatgrid .r { display: grid; grid-template-columns: 200px minmax(0, 1fr) 64px; gap: 14px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.heatgrid .r > a { color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatgrid .r > a b { font: 500 11.5px var(--mono); color: var(--text-3); margin-right: 8px; }
.heatgrid .cells { display: flex; gap: 2px; }
.heatgrid .cells a { flex: 1; height: 24px; border-radius: 3px; background: var(--track); display: grid; place-items: center; font: 500 9.5px var(--mono); color: var(--text-3); text-decoration: none; min-width: 16px; }
.heatgrid .cells a:hover { outline: 1.5px solid var(--text); outline-offset: 1px; }
.heatgrid .n { font: 500 12px var(--mono); color: var(--text-2); text-align: right; }
.legend-inline { display: flex; gap: 14px; align-items: center; font: 500 11px var(--mono); color: var(--text-3); flex-wrap: wrap; }
.legend-inline i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* ---------- Mindmap ---------- */
.map-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr) 340px; width: 100%; height: 100vh; }
.side { background: var(--bg); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.side.left { border-right: 1px solid var(--line); }
.side.right { border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 22px 32px; }
.side-head { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.side-head select, .side-head input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 13px; }
.side-head input:focus, .side-head select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.side-head .mapprog { display: flex; align-items: center; gap: 10px; font: 500 11.5px var(--mono); color: var(--text-3); }
.side-head .mapprog .bar { flex: 1; height: 3px; }
.outline { overflow-y: auto; padding: 8px 8px 24px; flex: 1; scrollbar-width: thin; }
.outline ul { list-style: none; margin: 0; padding: 0; }
.outline ul ul { margin: 0 0 6px 15px; border-left: 1px solid var(--line); padding-left: 4px; }
.outline button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 8px; border: 0; border-radius: 5px; background: none; color: var(--text-2); font-size: 13px; line-height: 1.35; cursor: pointer; }
.outline button:hover { background: var(--hover); color: var(--text); }
.outline button.sel { background: var(--accent-soft); color: var(--accent); }
.outline .obj > button { color: var(--text); font-weight: 500; margin-top: 4px; }
.outline .obj > button .lb { flex: 1; }
.outline .pct { margin-left: auto; font: 500 11px var(--mono); color: var(--text-3); }
.outline .sub { font-size: 12.5px; color: var(--text-3); }
.st { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }
.st.s1 { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.st.s2 { border-color: var(--accent); background: var(--accent); }
.canvas { position: relative; overflow: hidden; background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 22px 22px; min-width: 0; }
.mm-svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.mm-svg:active { cursor: grabbing; }
.mm-node { cursor: pointer; }
.mm-node:hover .lbl { fill: var(--accent); }
.mm-node:hover .ul { stroke: var(--accent); }
.mm-toggle { cursor: pointer; }
.mm-toggle:hover .tb { stroke: var(--accent); }
.mm-here { animation: here 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes here { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
.toolbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-sm); z-index: 3; }
.tgroup { display: flex; align-items: center; gap: 2px; }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.toolbar .btn { height: 30px; min-width: 30px; padding: 0 8px; border: 0; background: transparent; box-shadow: none; color: var(--text-2); font-size: 12.5px; }
.toolbar .btn:hover { background: var(--hover); color: var(--text); }
.toolbar .btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.toolbar .zoom { font: 500 11.5px var(--mono); color: var(--text-2); width: 44px; text-align: center; }
.toolbar select { height: 30px; border: 0; background: transparent; color: var(--text-2); font-size: 12.5px; padding: 0 4px; cursor: pointer; border-radius: var(--r); }
.toolbar select:hover { background: var(--hover); }
.map-title { position: absolute; left: 18px; top: 16px; right: 18px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; gap: 12px; }
.map-title > div { pointer-events: none; }
.map-title .eyebrow { margin-bottom: 4px; }
.map-title b { display: block; font-size: 15px; font-weight: 600; color: var(--heading); letter-spacing: -.01em; }
.map-title .row { pointer-events: auto; }
.map-find { position: relative; pointer-events: auto; }
.map-find input { width: 220px; height: 30px; padding: 0 10px 0 30px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font-size: 12.5px; color: var(--text); box-shadow: var(--shadow-sm); }
.map-find input:focus { outline: none; border-color: var(--accent); }
.map-find .ico { position: absolute; left: 9px; top: 7px; color: var(--text-3); }
.map-find span { position: absolute; right: 8px; top: 7px; font: 500 11px var(--mono); color: var(--text-3); }
.minimap { position: absolute; right: 16px; top: 58px; width: 196px; height: 124px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); overflow: hidden; z-index: 2; box-shadow: var(--shadow-sm); }
.minimap svg { width: 100%; height: 100%; display: block; cursor: crosshair; }
.mm-mini-view { fill: var(--accent-soft); stroke: var(--accent); }
.legend { position: absolute; left: 18px; bottom: 22px; display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--text-3); z-index: 2; background: var(--surface); padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); }
.legend .ramp { width: 96px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #e9e8e7, #93b4d7, #0066b3, #003b6f); }
.detail .eyebrow { margin-bottom: 6px; }
.detail h2 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.detail .crumbs { font: 500 11.5px var(--mono); color: var(--text-3); margin-bottom: 16px; }
.detail .lead { font-size: 14.5px; line-height: 1.65; color: var(--text); }
.detail h3 { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 22px 0 8px; }
.detail .saved-hint { font: 500 11px var(--mono); color: var(--text-3); margin: 6px 0 12px; }
.detail .nav { display: flex; gap: 6px; margin-bottom: 14px; }
.detail .related { list-style: none; padding: 0; margin: 0; }
.detail .related li { border-bottom: 1px solid var(--line); }
.detail .related button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 0; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.detail .related button small { font: 500 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.detail .related button:hover { color: var(--accent); }
.detail .kids { list-style: none; padding: 0; margin: 0; }
.detail .kids li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail .kids li b { font-weight: 500; }
.detail .kids li span { display: block; color: var(--text-2); font-size: 12.5px; }
.note-view { font-size: 13.5px; line-height: 1.6; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--sunken); margin-bottom: 8px; overflow-wrap: anywhere; }
.note-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.note-imgs figure { margin: 0; position: relative; width: 92px; }
.note-imgs img { width: 92px; height: 68px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.note-imgs figcaption { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.note-imgs button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 4px; border: 0; background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.drop { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 10px; text-align: center; font-size: 12.5px; color: var(--text-3); cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.links-list { list-style: none; margin: 6px 0; padding: 0; }
.links-list li { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; }
.links-list a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox { position: fixed; inset: 0; z-index: 85; background: var(--scrim); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow); }
.panel-toggle { display: none !important; }

/* ---------- Command palette ---------- */
.palette { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s ease both; }
@keyframes fade { from { opacity: 0; } }
.pal-box { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; animation: drop .16s var(--ease) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; height: 54px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.pal-input input { flex: 1; border: 0; background: transparent; font-size: 15.5px; color: var(--text); outline: none; min-width: 0; }
.pal-input input::placeholder { color: var(--text-3); }
.pal-input input::-webkit-search-cancel-button { display: none; }
.pal-results { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; }
.pal-results a { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; padding: 9px 10px; border-radius: 7px; text-decoration: none; color: var(--text); outline: none; }
.pal-results a:hover, .pal-results a:focus { background: var(--accent-soft); }
.pal-results a .kind { font: 500 10.5px/20px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.pal-results a:focus .kind { color: var(--accent); }
.pal-results small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-results mark { background: none; color: var(--accent); font-weight: 600; }
.pal-results .empty, .pal-results .hint { padding: 14px 12px; color: var(--text-3); margin: 0; font-size: 13px; }
.pal-results .group { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 10px 10px 4px; }
.pal-foot { display: flex; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--line); font: 500 11px var(--mono); color: var(--text-3); background: var(--sunken); }
.pal-foot span { display: inline-flex; gap: 4px; align-items: center; }

/* ---------- Dialog, toast, tour, popover ---------- */
.dlg { border: 1px solid var(--line-strong); border-radius: 12px; padding: 24px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); width: min(460px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--scrim); }
.dlg h2 { margin-bottom: 14px; }
.keys { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.keys td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.keys td:first-child { width: 42%; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 90; box-shadow: var(--shadow-sm); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tour-veil { position: fixed; inset: 0; z-index: 60; }
.tour-hole { position: fixed; z-index: 61; border-radius: 10px; box-shadow: 0 0 0 9999px var(--scrim); transition: all .3s var(--ease); pointer-events: none; outline: 1.5px solid var(--accent); outline-offset: 2px; }
.tour-pop { position: fixed; z-index: 62; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); transition: top .3s var(--ease), left .3s var(--ease); }
.tour-pop h2 { font-size: 16px; }
.tour-pop p { color: var(--text-2); font-size: 13.5px; }
.pop { position: fixed; z-index: 70; width: 300px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); padding: 12px; }
.pop input { margin-bottom: 8px; }
.pop .tzlist { max-height: 220px; overflow-y: auto; margin: 0 -4px 8px; }
.pop .tzlist button { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 5px; font-size: 12.5px; color: var(--text); cursor: pointer; text-align: left; }
.pop .tzlist button:hover, .pop .tzlist button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.pop .tzlist small { font: 500 11px var(--mono); color: var(--text-3); }

/* ---------- Transfer ---------- */
.transfer { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.qr-box { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-box svg { width: 100%; height: auto; display: block; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 20px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 12px/22px var(--mono); color: var(--accent); }

/* ---------- Static guide pages ---------- */
.js .seo-static { display: none; }
.doc-page .topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .doc-page .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); } }
.doc-page .topbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 32px; }
.doc-page .topnav { display: flex; gap: 2px; }
.doc-page .topnav a { padding: 6px 10px; border-radius: var(--r); color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.doc-page .topnav a:hover { background: var(--hover); color: var(--text); }
.doc-page .topnav a.active { color: var(--text); background: var(--active); }
.doc-page .topbar-tools { margin-left: auto; }
.doc-page .stripe, .doc-page .squares { display: none; }
.doc-page main.doc { max-width: 1120px; padding: 40px 32px 72px; }
.doc-page .footer-inner { max-width: 1120px; padding: 22px 32px 28px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 24px; font: 500 12px var(--mono); color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.doc article { display: grid; grid-template-columns: minmax(0, 1fr) 240px; column-gap: 56px; }
.doc article > * { grid-column: 1; min-width: 0; }
.doc-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.doc-head h1 { font-size: clamp(30px, 2vw + 16px, 42px); letter-spacing: -.035em; line-height: 1.08; margin: 6px 0 14px; }
.doc-head .row { margin-top: 20px; }
.doc .toc { grid-column: 2; grid-row: 1 / span 40; align-self: start; position: sticky; top: 80px; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--line); background: none; max-height: calc(100vh - 100px); overflow-y: auto; }
.doc .toc h2 { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 4px 0 10px; }
.doc .toc ol { list-style: none; margin: 0; padding: 0; }
.doc .toc li { padding: 4px 0; font-size: 12.5px; line-height: 1.4; }
.doc .toc a { color: var(--text-2); text-decoration: none; }
.doc .toc a:hover { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { padding: 14px 16px 14px 0; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--text); font-weight: 500; }
.doc-ledger { margin: 28px 0; }
.doc-ledger .num { text-align: right; font: 500 13px var(--mono); color: var(--text); }
.doc-ledger th.num { text-align: right; }
.doc-ledger .name small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.doc-obj { padding: 32px 0 8px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.doc-obj:last-of-type { border-bottom: 0; }
.doc-obj h2 { font-size: 19px; display: flex; gap: 14px; align-items: baseline; }
.doc-obj h2 .num { font: 500 13px var(--mono); color: var(--accent); min-width: 2.6em; }
.topics { margin: 12px 0 18px; }
.topics > div { display: grid; grid-template-columns: minmax(170px, 30%) minmax(0, 1fr); gap: 4px 28px; padding: 12px 0; border-top: 1px solid var(--line); }
.topics > div:first-child { border-top: 0; }
.topics dt { font-weight: 600; color: var(--heading); font-size: 14px; }
.topics dd { margin: 0; line-height: 1.65; color: var(--text-2); font-size: 14.5px; }
.topics dd ul { margin: 8px 0 0; padding-left: 1.1em; font-size: 13.5px; }
.topics dd ul ul { margin-top: 2px; }
.topics .tag { margin-left: 6px; vertical-align: 1px; border-style: dashed; }
.topics.terms dt { font-family: var(--mono); font-size: 13px; }
.areas { margin: 8px 0 20px; padding-left: 1.2em; line-height: 1.8; color: var(--text-2); }
.sample { padding: 16px 0; border-top: 1px solid var(--line); }
.sample .q { margin: 0 0 8px; line-height: 1.6; }
.sample ol { margin: 0 0 10px; padding-left: 1.6em; line-height: 1.8; color: var(--text-2); }
.sample details summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 13.5px; }
.sample details p { margin: 8px 0 0; padding: 12px 14px; background: var(--sunken); border-left: 2px solid var(--accent); line-height: 1.6; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0 8px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--heading); font-weight: 600; transition: border-color .12s; }
.pager a:hover { border-color: var(--accent); }
.pager a.next { text-align: right; }
.pager small { display: block; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }

/* ---------- Cheat sheet ---------- */
.sheet { columns: 2 340px; column-gap: 36px; }
.sheet section { break-inside: avoid; margin-bottom: 18px; }
.sheet h3 { font: 500 12px var(--mono); color: var(--accent); margin-bottom: 6px; letter-spacing: 0; }
.sheet ul { margin: 0; padding: 0; list-style: none; }
.sheet li { padding: 3px 0; border-bottom: 1px dotted var(--line-strong); font-size: 12.5px; line-height: 1.45; }
.sheet li b { font-weight: 600; color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 1560px) {
  .map-shell { grid-template-columns: 272px minmax(0, 1fr); }
  .side.right { position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 92vw); z-index: 30; transform: translateX(100%); transition: transform .22s var(--ease); box-shadow: var(--shadow); background: var(--surface); }
  .side.right.open { transform: none; }
  .panel-toggle { display: inline-flex !important; }
}
@media (max-width: 1280px) {
  .ledger .prog { width: 180px; }
  .map-find input { width: 170px; }
}
@media (max-width: 1100px) {
  main { padding: 36px 32px 64px; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: 18ch; }
  .dash { grid-template-columns: 1fr; gap: 36px; }
  .facts-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts-strip > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .facts-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow a:nth-child(3) { padding-left: 0; border-left: 0; }
  .workflow a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .doc article { grid-template-columns: 1fr; }
  .doc .toc { display: none; }
  .modes { grid-template-columns: 1fr; }
  .modes > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .ledger .strip-cell { display: none; }
  .schedule { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: var(--shadow); padding-top: max(14px, env(safe-area-inset-top, 0px)); }
  .nav-open .sidebar { transform: none; }
  .sb-close { display: inline-flex !important; }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; height: 52px; padding: 0 max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--line); }
  .mobilebar .brand img { height: 14px; }
  main { padding: 26px max(18px, env(safe-area-inset-right, 0px)) 56px max(18px, env(safe-area-inset-left, 0px)); }
  main.wide { height: calc(100vh - 52px); height: calc(100dvh - 52px); }
  .footer-inner { padding: 20px 18px 28px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 34px; }
  .map-shell { grid-template-columns: 1fr; height: 100%; }
  .side.left { position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, 88vw); z-index: 30; transform: translateX(-100%); transition: transform .22s var(--ease); box-shadow: var(--shadow); background: var(--surface); }
  .side.left.open { transform: none; }
  .only-mobile { display: inline-flex !important; }
  .hide-mobile { display: none !important; }
  .minimap { display: none; }
  .map-find { display: none; }
  .toolbar { bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 24px); overflow-x: auto; }
  .map-title { left: 14px; top: 12px; }
  .grid, .concepts, .plan-grid, .transfer { grid-template-columns: 1fr; }
  .plan-grid { gap: 28px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { padding-left: 0; border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .meters { grid-template-columns: 1fr; gap: 14px; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ledger td { border: 0; padding: 0; }
  .ledger .w, .ledger .prog, .ledger .acts { grid-column: 2; width: auto; }
  .ledger .acts { text-align: left; margin-top: 6px; }
  .ledger .num-cell { display: none; }
  .obj-list .item { grid-template-columns: 44px minmax(0, 1fr); }
  .obj-list .item > .bar, .obj-list .item > .btn { grid-column: 2; }
  .obj-list .item > .btn { justify-self: start; }
  .checklist .grp > header { grid-template-columns: 22px 40px minmax(0, 1fr); }
  .checklist .grp > header .bar { display: none; }
  .checklist ul { padding-left: 0; }
  .checklist li .btn { opacity: 1; }
  .fc { height: 300px; }
  .fc-face { padding: 32px 24px; }
  .fc .eyebrow, .fc-hint { left: 24px; right: 24px; }
  .fc-rate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px 18px 12px 0; }
  .stat + .stat { padding-left: 18px; }
  .facts-strip { grid-template-columns: 1fr 1fr; }
  .facts-strip > div:nth-child(n) { padding: 12px 12px 12px 0; border-left: 0; }
  .facts-strip > div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--line); }
  .facts-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .workflow { grid-template-columns: 1fr; }
  .workflow a, .workflow a + a { padding: 18px 0; border-left: 0; }
  .workflow a + a { border-top: 1px solid var(--line); }
  .instrument .score em { display: none; }
  .heatgrid .r { grid-template-columns: 1fr 48px; gap: 6px 10px; }
  .heatgrid .cells { grid-column: 1 / -1; grid-row: 2; }
  .verdict { grid-template-columns: 1fr; gap: 12px; }
  .doc-page .topbar-inner { padding: 0 16px; gap: 12px; }
  .doc-page .topnav { display: none; }
  .doc-page main.doc { padding: 28px 18px 56px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .topics > div { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { text-align: left; }
  .bd-table .bar { width: 70px; }
  .toolrow .field { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .sidebar, .mobilebar, .footer, .toolbar, .palette, .doc-page .topbar, .toc, .pager, .doc-head .row, .skip, .no-print, .dnav, .tabs, .guide-link { display: none !important; }
  .app { display: block; }
  main { padding: 0 !important; max-width: none; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .sample details { display: block; }
  .doc-obj { break-inside: avoid-page; }
  .sheet { columns: 2; }
}

/* ---------- v0.5 additions: shared ---------- */
.small { font-size: 12.5px; }
.page-head.with-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; flex-wrap: wrap; }
.page-head.with-actions > div:first-child { max-width: 720px; }
.btn kbd { height: 18px; min-width: 18px; font-size: 10.5px; background: transparent; border-color: currentColor; opacity: .55; border-bottom-width: 1px; color: inherit; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-align: left; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn.icon .ico, .icon-btn .ico { margin: 0; }
.flip .ico { transform: scaleX(-1); }
.loading { display: flex; align-items: center; gap: 12px; padding: 48px 0; color: var(--text-3); font: 500 12.5px var(--mono); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-num { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 10px; }
.big-num b { font: 500 36px/1 var(--mono); letter-spacing: -.03em; color: var(--heading); font-variant-numeric: tabular-nums; }
.big-num span { font-size: 12.5px; color: var(--text-3); }
.notice.resume { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; border-left-color: var(--accent); }

/* Home */
.preview-canvas { height: 400px; padding: 14px 10px; display: flex; align-items: center; justify-content: center; }
.preview-canvas svg { width: 100%; height: 100%; }
.preview:hover { border-color: var(--line-strong); }
.preview:hover .preview-bar b { color: var(--accent); }
.hero-copy .pill { margin-bottom: 4px; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.activity-col .spark { margin-top: 2px; }
.activity { margin-top: 18px; }
.activity li { grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; }
.activity li a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity li a:hover { color: var(--accent); }
.activity li small { font: 500 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.dash .today-list { margin-top: 0; }
.today-list > a { grid-template-columns: 22px minmax(0, 1fr) auto; }
.ledger .acts { display: table-cell; }
.ledger .acts .btn + .btn { margin-left: 4px; }
.ledger .strip-cell { width: 180px; }

/* Settings */
.settings { border-top: 1px solid var(--line); }
.set-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.set-label h2 { font-size: 15px; margin-bottom: 2px; }
.set-label span { font-size: 12.5px; }
.set-body p { color: var(--text-2); max-width: 62ch; }
.set-body > :last-child { margin-bottom: 0; }
.set-body label.btn input { display: none; }

/* Palette */
.pal-results a[aria-selected="true"] { background: var(--accent-soft); }
.pal-results a[aria-selected="true"] .kind { color: var(--accent); }
.pal-results a .kind .ico { margin-top: 3px; }
.pal-results a > span:last-child { min-width: 0; }

/* Questions */
.qcard { margin-bottom: 8px; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 500 11.5px var(--mono); color: var(--text-3); margin-bottom: 10px; }
.q-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin-right: 14px; vertical-align: 3px; }
.q-meta .qid { margin-left: auto; }
.q-meta .qid::before { display: none !important; }
.q-opts .ot { display: block; }
.q-opts button.right .x, .q-opts button.wrong .x { color: var(--text-2); }
.q-opts button .x { border-top: 1px solid var(--line); padding-top: 7px; margin-top: 8px; }
.why.ok { border-left-color: var(--accent); }
.q-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 24px; }
.exam-bar { flex-wrap: wrap; top: 0; }
.exam-bar .ttl { color: var(--text); font-family: var(--font); font-weight: 600; font-size: 13.5px; }
.exam-bar .pos { white-space: nowrap; }
.exam-bar .bar { min-width: 80px; }
.exam-bar .time.low { color: var(--accent); }
main.exam-mode { max-width: 880px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; margin: 16px 0 20px; }
.item-grid button { height: 34px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); font: 500 11.5px var(--mono); color: var(--text-3); cursor: pointer; position: relative; }
.item-grid button.ans { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.item-grid button.flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.item-grid button:hover { border-color: var(--accent); }
.legend-inline .lg-ans { background: var(--accent-soft); border: 1px solid var(--accent-line); }
.legend-inline .lg-flag { background: var(--text); border-radius: 50% !important; width: 8px !important; height: 8px !important; vertical-align: 0 !important; }
.legend-inline .lg-un { border: 1px solid var(--line-strong); }
.ramp-inline i { display: inline-block; width: 72px; height: 8px; border-radius: 3px; background: linear-gradient(90deg, #e9e8e7, #93b4d7, #0066b3, #003b6f); vertical-align: 0; margin-right: 6px; }
.review details { padding: 0; }
.review summary { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; cursor: pointer; list-style: none; padding: 2px 0; }
.review summary::-webkit-details-marker { display: none; }
.review summary .rv-q { grid-column: 1 / -1; color: var(--text); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review details[open] summary .rv-q { -webkit-line-clamp: unset; display: none; }
.review summary:hover .rv-q { color: var(--accent); }
.rv-body { padding: 14px 0 4px; }
.verdict .kpis { margin: 0; }
.result-score.fail { color: var(--text); }
.result-score.pass { color: var(--accent); }
.weak { margin-top: 8px; }
.weak .focus li, .focus li { grid-template-columns: 40px minmax(0, 1fr) auto; }
.focus li > .chk { justify-self: start; }
.meters.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; padding-top: 0; border-top: 0; }
.spark.tall { height: 120px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.setup { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--line); padding-top: 22px; }
.set-field .lbl { display: block; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.set-field .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-field .seg { flex-wrap: wrap; }
.start-row { gap: 14px; padding-top: 6px; }
.setup-side { border-left: 1px solid var(--line); padding-left: 28px; }
.mini-ledger { list-style: none; padding: 0; margin: 18px 0 0; }
.mini-ledger li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-ledger a { color: var(--text); text-decoration: none; }
.mini-ledger a:hover { color: var(--accent); }
table.terms.ports td:first-child { width: 160px; }

/* Study Hub */
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.concepts.one { grid-template-columns: 1fr; }
.side-col { border-left: 1px solid var(--line); padding-left: 28px; display: flex; flex-direction: column; gap: 6px; }
.side-col .eyebrow + * { margin-bottom: 20px; }
.list.ticks { list-style: none; padding: 0; }
.list.ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.list.ticks .ico { color: var(--accent); margin-top: 3px; }
.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.res-grid a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.res-grid a:hover { text-decoration: underline; }
table.terms tr.flash td { animation: flash 1.3s var(--ease); }

/* Checklist */
.chk-sum { margin: -4px 0 14px; }
.chk-dom { display: flex; gap: 12px; align-items: baseline; font-size: 17px; margin: 28px 0 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.chk-dom span:last-child { margin-left: auto; }
.checklist .chk-dom:first-child { margin-top: 8px; }
.checklist li { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; }
.checklist li > .chk { margin-top: 1px; }
.checklist li small { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; line-height: 1.45; }
.checklist li .t { font-weight: 500; color: var(--text); }
.checklist li .t .tag { margin-left: 8px; border-style: dashed; height: 18px; }
.checklist li.wip .t { color: var(--text); }

/* Cheat sheet */
.sheet-page { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 32px; background: var(--surface); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid var(--strong); }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-head .mono { color: var(--text-2); font-size: 12.5px; }
.sheet h3 { font: 600 12px/1.35 var(--font); color: var(--strong); letter-spacing: 0; text-transform: none; }
.sheet-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; }

/* Mindmap view */
.outline .onum { font: 500 11px var(--mono); color: var(--accent); min-width: 28px; }
.outline .lb { flex: 1; min-width: 0; }
.outline .obj > button .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline .pad { padding: 14px 10px; }
.detail-top { display: flex; align-items: center; justify-content: space-between; }
.only-panel { display: none !important; }
.seg.full { display: flex; }
.seg.full button { flex: 1; }
.detail .kids .row-btn { display: flex; gap: 8px; align-items: center; color: var(--text); width: 100%; }
.detail .kids .row-btn:hover { color: var(--accent); text-decoration: none; }
.detail .row { margin-top: 12px; }
.detail .actions { margin-top: 10px; }
.detail .crumbs .linkish { color: var(--text-3); font: inherit; }
.detail .crumbs .linkish:hover { color: var(--accent); }
.note-imgs figcaption { cursor: text; outline: none; border-radius: 3px; padding: 1px 2px; }
.note-imgs figcaption:focus { background: var(--accent-soft); color: var(--text); white-space: normal; }
.drop { width: 100%; background: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox figcaption { color: #fff; margin-top: 10px; font-size: 13px; }
.mm-node .mm-hit { cursor: pointer; }
.mm-node text { pointer-events: none; }
.mm-node:hover text { fill: var(--accent); }
.mm-domain:hover text { fill: #fff; }
.toolbar .btn.icon { width: 30px; padding: 0; }
.toolbar .btn.zoom { width: 48px; padding: 0; font: 500 11.5px var(--mono); }
.map-find { display: flex; align-items: center; }
.map-find input { box-shadow: none; }
.map-title > div { background: linear-gradient(var(--bg), var(--bg)) padding-box; padding: 2px 4px 2px 0; border-radius: 4px; }

@media (max-width: 1560px) { .only-panel { display: inline-flex !important; } }
@media (max-width: 1100px) {
  .today-grid, .setup-grid, .overview-grid { grid-template-columns: 1fr; gap: 32px; }
  .setup-side, .side-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .meters.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .set-row { grid-template-columns: 1fr; gap: 10px; }
  .res-grid { grid-template-columns: 1fr; }
  .preview-canvas { height: 280px; }
  .page-head.with-actions { align-items: flex-start; }
  .q-meta .qid { margin-left: 0; }
  .set-field .two { grid-template-columns: 1fr; }
  .exam-bar { gap: 10px; }
  .exam-bar .bar { flex-basis: 100%; order: 9; }
  .sheet-page { padding: 18px; }
  .ledger .strip-cell { display: none; }
}
@media print {
  .sheet-page { border: 0; padding: 0; }
  .toolrow, .chk-sum, .tabs, .page-head .row { display: none !important; }
  .sheet { columns: 2; column-gap: 24px; font-size: 9pt; }
  .sheet li { font-size: 8.5pt; }
  .checklist li .btn { display: none; }
}
.side.right > * { flex-shrink: 0; }
.bd-table a { color: var(--text); text-decoration: none; font-weight: 500; } .bd-table a:hover { color: var(--accent); }
.q-opts .x { grid-column: 2; }
.spark.tall { justify-content: flex-start; } .spark.tall i { flex: 0 1 28px; }
@media (max-width: 900px) {
  .content { min-height: calc(100dvh - 52px); }
  main.wide { flex: none; }
  .hero-copy .pill { height: auto; padding: 5px 10px 5px 8px; line-height: 1.4; }
}
.doc-page .topbar-inner .product { margin-left: -14px; }

/* v0.6 polish */
.preview-canvas:has(svg.framed) { padding: 0; display: block; }
.preview svg.mm-preview.framed { width: 100%; height: 100%; -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent), linear-gradient(#000 82%, transparent); mask-image: linear-gradient(90deg, #000 78%, transparent); }
.heatgrid .cells a { transition: background-color .15s; }
@media (max-width: 900px) {
  .dnav, .tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .map-title { left: 0; right: 0; top: 0; padding: 12px 14px 22px; background: linear-gradient(var(--bg) 72%, transparent); flex-wrap: wrap; }
  .map-title b { font-size: 14px; }
  .map-find input { width: 150px; }
  .hero-copy .pill { font-size: 10.5px; white-space: nowrap; }
}
body:not([data-view="home"]) .foot-links { display: none; }
body:not([data-view="home"]) .footer-inner { padding-top: 16px; padding-bottom: 18px; gap: 4px; }
body:not([data-view="home"]) .footer { font-size: 12px; }
.weights { position: relative; }
.weights.is-empty .w { background: repeating-linear-gradient(135deg, var(--track) 0 6px, transparent 6px 9px); }
.weights-hint { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); width: min(78%, 340px); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 12.5px; line-height: 1.45; color: var(--text-2); text-align: center; pointer-events: none; }
.preview-bar .pv-short { display: none; }
.preview-bar > span:first-child { white-space: pre; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.preview-bar > span:last-child { white-space: nowrap; }
@media (max-width: 600px) { .preview-bar .pv-long { display: none; } .preview-bar .pv-short { display: inline; } }
/* Exam focus: the live simulator hides navigation, like the test centre screen. */
@media (min-width: 901px) {
  body.exam-focus .app { grid-template-columns: 0 minmax(0, 1fr); }
  body.exam-focus .sidebar { visibility: hidden; border: 0; padding: 0; }
}
body.exam-focus .footer { display: none; }
main.exam-mode { max-width: 920px; }
.q-opts button.right .x::before { content: 'Correct answer. '; font-weight: 600; color: var(--accent); }
.q-opts button.wrong .x::before { content: 'Your answer. '; font-weight: 600; color: var(--text); }
@media (max-width: 900px) {
  .q-meta span:first-child { display: none; }
  .q-meta span:nth-child(2)::before { display: none; }
}

/* Study guide (reading view) */
main.read-page { max-width: 1120px; }
.rd-meta { margin: -14px 0 26px; font: 500 12px var(--mono); color: var(--text-3); }
.rd-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.rd-side { position: sticky; top: 28px; display: grid; gap: 10px; }
.rd-toc { display: grid; gap: 1px; border-left: 1px solid var(--line); }
.rd-toc a { display: flex; gap: 10px; align-items: baseline; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1.5px solid transparent; color: var(--text-2); text-decoration: none; font-size: 13px; line-height: 1.4; }
.rd-toc a:hover { color: var(--text); border-left-color: var(--line-strong); }
.rd-toc a i { flex: none; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--line-strong); transform: translateY(-1px); }
.rd-toc a[data-s="1"] i { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.rd-toc a[data-s="2"] i { border-color: var(--accent); background: var(--accent); }
.rd-jump { height: 32px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font-size: 12.5px; padding: 0 8px; margin-top: 8px; max-width: 100%; }
.rd-body { display: grid; gap: 14px; }
.rd-topic { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 22px 26px 24px; scroll-margin-top: 24px; }
.rd-topic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.rd-topic-head h2 { font-size: 20px; letter-spacing: -.015em; margin: 4px 0 0; }
.seg.small button { height: 26px; font-size: 12px; padding: 0 10px; }
.rd-lead { font-size: 15px; color: var(--text); margin: 10px 0 14px; max-width: 70ch; }
.rd-tree { list-style: none; margin: 0; padding: 0; }
.rd-tree.d1 { border-top: 1px solid var(--line); }
.rd-tree.d1 > li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.rd-tree.d1 > li:last-child { border-bottom: 0; padding-bottom: 0; }
.rd-tree.d2, .rd-tree.d3 { margin: 8px 0 2px 2px; padding-left: 16px; border-left: 1px solid var(--line-strong); display: grid; gap: 6px; }
.rd-node { display: grid; grid-template-columns: minmax(140px, 32%) minmax(0, 1fr); gap: 4px 20px; font-size: 14px; line-height: 1.55; }
.rd-node b { font-weight: 600; color: var(--heading); }
.rd-node .rd-note { color: var(--text-2); }
.rd-tree.d2 .rd-node, .rd-tree.d3 .rd-node { grid-template-columns: minmax(120px, 30%) minmax(0, 1fr); font-size: 13.5px; }
.rd-tree.d2 .rd-node b, .rd-tree.d3 .rd-node b { font-weight: 500; }
.rd-tree li.tip > .rd-node { background: transparent; border-left: 3px solid var(--accent); border-radius: 0; padding: 6px 0 6px 12px; margin: 6px 0; }
.rd-tree li.tip > .rd-node b { color: var(--accent); }
.rd-body.recall .rd-node .rd-note { filter: blur(5px); opacity: .55; cursor: pointer; user-select: none; transition: filter .15s, opacity .15s; }
.rd-body.recall .rd-node.shown .rd-note { filter: none; opacity: 1; }
.rd-body.recall .rd-node { cursor: pointer; }
.rd-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.rd-pager a { display: grid; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); background: var(--surface); }
.rd-pager a:hover { border-color: var(--accent); }
.rd-pager a small { font: 500 11px var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.rd-pager .next { text-align: right; grid-column: 2; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
@media (max-width: 1000px) {
  .rd-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rd-side { position: static; margin-bottom: 18px; }
  .rd-side .eyebrow, .rd-toc { display: none; }
  .rd-jump { margin-top: 0; height: 38px; font-size: 14px; }
}
@media (max-width: 640px) {
  .rd-topic { padding: 18px 16px 18px; border-radius: 10px; }
  .rd-node, .rd-tree.d2 .rd-node, .rd-tree.d3 .rd-node { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rd-pager { grid-template-columns: 1fr; }
  .rd-pager .next { grid-column: 1; }
  .rd-tree li.tip > .rd-node { margin: 6px 0; padding: 6px 0 6px 10px; }
}
@media print { .rd-side, .rd-pager, .page-head .row, .dnav { display: none !important; } .rd-grid { display: block; } .rd-topic { break-inside: avoid; border: 0; padding: 0 0 12px; } }
@media (max-width: 900px) {
  .obj-list .item > .row { grid-column: 2; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
  .obj-list .item { gap: 8px 12px; }
}

/* Sidebar groups */
.sb-nav .sb-label { padding: 14px 10px 6px; }
.sb-nav .sb-label:first-of-type { padding-top: 12px; }

/* Think like a manager */
main.mindset-page { max-width: 1120px; }
.ms-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding: 6px 0 34px; }
.ms-hero h1 { font-size: clamp(32px, 2vw + 18px, 46px); letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 16px; }
.ms-hero .lede { font-size: 16px; max-width: 54ch; margin-bottom: 22px; color: var(--text-2); }
.ms-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-figure { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 18px 20px 20px; box-shadow: var(--shadow-sm); }
.ms-figure figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font: 500 11.5px var(--mono); color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.ms-figure figcaption span { color: var(--text); }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, var(--accent) calc(22% - var(--i, 0) * 1%), var(--surface)); border: 1px solid var(--line); }
.ladder li:nth-child(1) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ladder li:nth-child(1) b, .ladder li:nth-child(1) .n, .ladder li:nth-child(1) p, .ladder li:nth-child(1) small { color: inherit; }
.ladder li:nth-child(2) { background: color-mix(in srgb, var(--accent) 24%, var(--surface)); }
.ladder li:nth-child(3) { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); }
.ladder li:nth-child(4) { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ladder li:nth-child(5) { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ladder li:nth-child(6) { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.ladder li:nth-child(7) { background: var(--surface); }
.ladder .n { font: 600 13px var(--mono); color: var(--accent); }
.ladder b { font-weight: 600; color: var(--heading); }
.ladder p { margin: 2px 0 2px; font-size: 13.5px; color: var(--text-2); }
.ladder small { font-size: 12.5px; color: var(--text-3); }
.ladder.compact li { padding: 7px 12px; font-size: 13px; }
.ms-body { padding-top: 4px; }
.ms-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-p { background: var(--surface); padding: 20px 22px 22px; display: grid; align-content: start; gap: 8px; }
.ms-p .k { font: 500 12px var(--mono); color: var(--accent); }
.ms-p h3 { font-size: 16px; margin: 0; letter-spacing: -.01em; }
.ms-p p { margin: 0; color: var(--text-2); font-size: 14px; }
.ms-p small { display: grid; gap: 2px; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 13px; color: var(--text); }
.ms-p small span { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.ms-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ms-intro { font-size: 15px; max-width: 64ch; margin: 0 0 18px; }
.ms-aside { position: sticky; top: 28px; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--sunken); }
.ms-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.ms-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ms-key { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.ms-key code { justify-self: start; font: 600 13px var(--mono); letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 6px; }
.ms-key p { margin: 0; font-size: 14px; }
.ms-key small { color: var(--text-3); font-size: 13px; }
.ms-traps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.ms-trap { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ms-trap .k { font: 500 12px var(--mono); color: var(--text-3); padding-top: 3px; }
.ms-trap h3 { margin: 0 0 4px; font-size: 15px; }
.ms-trap p { margin: 0; color: var(--text-2); font-size: 14px; }
.sc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.sc-list { display: grid; gap: 2px; position: sticky; top: 28px; }
.sc-list button { display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r); color: var(--text-2); font-size: 13.5px; cursor: pointer; }
.sc-list button .mono { font-size: 11.5px; color: var(--text-3); }
.sc-list button:hover { background: var(--hover); color: var(--text); }
.sc-list button[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.sc-list button[aria-current="true"] .mono { color: var(--accent); }
.sc-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 26px 28px; }
.sc-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.sc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-card h2 { font-size: 22px; letter-spacing: -.02em; margin: 10px 0 8px; }
.sc-q { font-size: 16px; line-height: 1.6; color: var(--text); margin: 0 0 18px; max-width: 70ch; }
.sc-opts { display: grid; gap: 8px; }
.sc-opt { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px 14px; text-align: left; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14.5px; line-height: 1.5; cursor: pointer; transition: border-color .12s, background-color .12s, opacity .12s; }
.sc-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.sc-opt:disabled { cursor: default; }
.sc-opt .L { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 6px; font: 500 12px var(--mono); color: var(--text-2); }
.sc-opt.right { border-color: var(--accent); background: var(--accent-soft); }
.sc-opt.right .L { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sc-opt.wrong { border-style: dashed; border-color: var(--text); }
.sc-opt.wrong .L { background: var(--text); color: var(--bg); border-color: var(--text); }
.sc-opt.dim { opacity: .78; }
.sc-why { grid-column: 2; font-size: 13.5px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.sc-why b { color: var(--accent); }
.sc-why .rung { display: inline-block; margin: 0 8px 4px 0; font: 500 10.5px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; }
.sc-opt.right .sc-why .rung { color: var(--accent); border-color: var(--accent-line); }
.sc-move { margin-top: 18px; border-left: 2px solid var(--accent); background: var(--sunken); border-radius: 0 10px 10px 0; padding: 14px 18px; }
.sc-move p { margin: 6px 0 0; font-size: 15px; color: var(--text); }
.sc-pager { justify-content: space-between; margin-top: 16px; }
.ms-drill { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; border: 1px solid var(--line); border-radius: 14px; padding: 28px; background: var(--surface); }
.ms-drill h2 { margin: 0 0 8px; font-size: 22px; }
.ms-drill .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.ms-drill-tips ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
@media (max-width: 1100px) {
  .ms-hero, .ms-split, .ms-drill { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ms-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-layout { grid-template-columns: minmax(0, 1fr); }
  .sc-list { position: static; display: flex; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .sc-list button { white-space: nowrap; flex: none; }
  .ms-aside { position: static; }
}
@media (max-width: 640px) {
  .ms-principles, .ms-keys, .ms-traps { grid-template-columns: minmax(0, 1fr); }
  .ladder li { width: 100% !important; }
  .sc-card { padding: 20px 16px; }
  .sc-card h2 { font-size: 19px; }
  .sc-q { font-size: 15px; }
  .ms-drill { padding: 20px 16px; }
}

.ladder li:nth-child(1) { width: 100%; }
.ladder li:nth-child(2) { width: 94%; }
.ladder li:nth-child(3) { width: 88%; }
.ladder li:nth-child(4) { width: 82%; }
.ladder li:nth-child(5) { width: 76%; }
.ladder li:nth-child(6) { width: 70%; }
.ladder li:nth-child(7) { width: 64%; }
/* Denser grouped sidebar; footer stays visible on short screens */
.sb-nav a, .sb-foot > a { height: 30px; }
.sb-domains a { height: 28px; }
.sb-nav .sb-label { padding: 12px 10px 5px; }
.sb-section { margin-top: 14px; }
.sb-foot { position: sticky; bottom: -12px; background: var(--sidebar); padding-bottom: 12px; margin-bottom: -12px; }
.ms-band { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; margin: 8px 0 48px; padding: 28px 32px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface); text-decoration: none; color: inherit; transition: border-color .15s; }
.ms-band:hover { border-color: var(--accent); }
.ms-band h2 { font-size: 24px; letter-spacing: -.02em; margin: 8px 0 8px; }
.ms-band p { margin: 0 0 14px; color: var(--text-2); max-width: 56ch; }
.ms-band .link { display: inline-flex; gap: 6px; align-items: center; color: var(--accent); font-weight: 500; font-size: 14px; }
.ms-band ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ms-band li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.ms-band li b { font: 600 12px var(--mono); color: var(--accent); }
.ms-band li:first-child { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ms-band li:first-child b { color: inherit; }
.ms-band li.more { background: none; border-style: dashed; color: var(--text-3); font-weight: 400; }
@media (max-width: 900px) { .ms-band { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px 18px; } }
@media (max-width: 900px) {
  .ledger tr { grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; gap: 8px 10px; }
  .ledger .w { display: none; }
  .ledger .acts { grid-column: 3; grid-row: 1; margin-top: 0; text-align: right; }
  .ledger .acts .btn.ghost { display: none; }
  .ledger .prog { grid-column: 2 / 4; }
}
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main:not(.wide) { animation: viewIn .24s var(--ease) both; }

/* ===== v0.9 design system pass ===== */
/* Type scale 12 / 14 / 16 / 20 / 28 / 40. Mono is kept for IDs, ports, timers and codes. */
.eyebrow { font: 500 12px/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; }
h2 { font-size: 20px; letter-spacing: -.02em; }
.section-title { margin-top: 48px; }
.section-title:first-child { margin-top: 0; }
@media (max-width: 640px) { .section-title { margin-top: 40px; } }
.section-title h2 { font-size: 20px; }
.page-head h1 { font-size: 32px; letter-spacing: -.03em; }
.page-head p { font-size: 16px; }
.instrument .score b, .today-list .v, .kpi b, .stat b, .stats b { font-family: var(--font); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "zero" 0; letter-spacing: -.03em; }
.sb-label, .sb-nav .sb-label { font: 500 11.5px/1 var(--font); letter-spacing: .05em; }

/* Buttons: solid primary in both themes; disabled reads as disabled, not loading */
.btn.primary { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-solid-ink); }
.btn:disabled, .btn.primary:disabled { opacity: 1; background: var(--track); border-color: var(--line); color: var(--text-3); box-shadow: none; }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-soft); }

/* Off-canvas sidebar shadow only when open */
@media (max-width: 900px) { .sidebar { box-shadow: none; } .nav-open .sidebar { box-shadow: var(--shadow); } }

/* Answer feedback with semantic colour and glyphs */
.q-opts button.right, .sc-opt.right { border-color: var(--ok-line); background: var(--ok-soft); }
.q-opts button.right .L, .sc-opt.right .L { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 0; }
.q-opts button.right .L::after, .sc-opt.right .L::after { content: "\2713"; font: 700 13px/1 var(--font); }
.q-opts button.wrong, .sc-opt.wrong { border-style: solid; border-color: var(--bad-line); background: var(--bad-soft); }
.q-opts button.wrong .L, .sc-opt.wrong .L { background: var(--bad); border-color: var(--bad); color: #fff; font-size: 0; }
.q-opts button.wrong .L::after, .sc-opt.wrong .L::after { content: "\2715"; font: 700 12px/1 var(--font); }
.q-opts button.right .x::before { color: var(--ok); }
.q-opts button.wrong .x::before { color: var(--bad); }
.sc-why b { color: var(--ok); }
.sc-opt.right .sc-why .rung { color: var(--ok); border-color: var(--ok-line); }
.why { border-left-color: var(--bad); background: var(--bad-soft); }
.why strong { color: var(--bad); }
.why.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.why.ok strong { color: var(--ok); }
/* Stat strips: clean 2-column grid on phones, no orphan borders */
@media (max-width: 640px) {
  .stat-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .stat, .stat + .stat { padding: 12px 14px; border: 0; background: var(--bg); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
}
/* Footer only on Overview and Settings */
body:not([data-view="home"]):not([data-view="settings"]) .footer { display: none; }
/* Flashcards: explicit actions, touch first */
.fc-stage { margin: 0 auto; }
.fc-stage > .bar { height: 4px; border-radius: 2px; }
.fc-actions { margin-top: 14px; min-height: 56px; }
.fc-show { width: 100%; height: 52px; font-size: 15px; gap: 10px; }
.fc-show kbd, .btn kbd { font: 500 11px var(--font); padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, .18); color: inherit; border: 0; }
.fc-rate { margin-top: 0; }
.fc-rate .btn.r0 { color: var(--bad); border-color: var(--bad-line); }
.fc-rate .btn.r0:hover { background: var(--bad-soft); }
.fc-rate .btn small { font-family: var(--font); }
.fc-hint { font-family: var(--font); }
.fc-keys { font-family: var(--font); justify-content: center; }
@media (hover: none) { .fc-keys, .fc-show kbd { display: none; } }
@media (max-width: 640px) {
  .fc { height: 300px; }
  .fc-rate { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 max(10px, env(safe-area-inset-bottom, 0px)); }
}
.bd-table th { font: 500 11.5px var(--font); letter-spacing: .05em; }
@media (max-width: 640px) {
  .bd-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bd-table .bar { display: none; }
  .bd-table td, .bd-table th { padding-right: 10px; font-size: 13px; }
}

/* v0.9 home: Today hero for returning users, three-step onboarding for new users */
.today-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: stretch; padding: 28px; margin-bottom: 40px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.th-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.th-main h1 { font-size: clamp(26px, 1.6vw + 16px, 36px); line-height: 1.12; letter-spacing: -.028em; margin: 10px 0 10px; max-width: 22ch; }
.th-ctx { color: var(--text-2); font-size: 14.5px; margin: 0 0 22px; }
.today-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.th-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.th-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); color: inherit; text-decoration: none; transition: background-color .12s; }
.th-tile:hover { background: var(--sunken); }
.th-tile .k { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.th-tile b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.th-tile small { font-size: 13px; color: var(--text-2); }
.onboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 40px; }
.ob-step { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
.ob-step:hover { border-color: var(--accent-line); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ob-step.primary { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.ob-top { display: flex; align-items: center; justify-content: space-between; color: var(--accent); margin-bottom: 6px; }
.ob-n { font-size: 13px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ob-step h3 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.ob-step p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; flex: 1; }
.ob-step .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); font-weight: 500; font-size: 14px; }
@media (max-width: 900px) {
  .today-hero { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .onboard { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .today-hero .cta .btn { flex: 1 1 auto; }
  .th-tile { padding: 12px 14px; }
  .th-tile b { font-size: 22px; }
}

/* v0.9: study guide status is neutral; only Completed earns colour */
.rd-topic-head .seg button[aria-pressed="true"] { background: var(--sunken); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rd-topic-head .seg button:last-child[aria-pressed="true"] { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.rd-jump { width: 100%; }
/* v0.9: exam runner furniture */
.exam-bar .bar { height: 4px; border-radius: 2px; }
.exam-bar .bar span { border-radius: 2px; }
.exam-bar .time { font: 600 16px/1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.exam-bar .time.low { color: var(--bad); }
/* v0.9: drills link to the manager zone instead of repeating it */
.ms-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--accent-line); border-radius: var(--r-lg); background: linear-gradient(90deg, var(--accent-soft), transparent 70%), var(--surface); color: inherit; text-decoration: none; transition: box-shadow .12s, transform .12s; }
.ms-link:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ms-link b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ms-link span { color: var(--text-2); font-size: 14px; }
.ms-link .ico { color: var(--accent); flex: none; }
.focus-solo { max-width: 860px; }
/* v0.9: mono reserved for IDs; rung and tag chips use the text face */
.sc-why .rung, .sc-tags .tag, .sc-tags span { font: 500 12px/1.6 var(--font); letter-spacing: 0; text-transform: none; }
.mini-ledger .num { font-variant-numeric: tabular-nums; font-size: 13px; }

/* ===== v1.0 mindmap: wider canvas, reserved bands, rail navigation ===== */
.map-shell { transition: grid-template-columns .2s var(--ease); }
@media (min-width: 901px) {
  .map-shell.no-outline { grid-template-columns: 0 minmax(0, 1fr) 340px; }
  .map-shell.no-outline > .side.left { visibility: hidden; border: 0; }
}
@media (min-width: 901px) and (max-width: 1560px) { .map-shell.no-outline { grid-template-columns: 0 minmax(0, 1fr); } }
.map-title { top: 0; left: 0; right: 0; padding: 14px 16px 18px; background: linear-gradient(var(--bg) 70%, transparent); align-items: center; }
.map-title > div { background: none; padding: 0; }
.map-name { display: flex; align-items: center; gap: 12px; min-width: 0; pointer-events: auto; }
.map-name > div { min-width: 0; }
.map-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outline-toggle[aria-pressed="true"] { background: var(--sunken); }
.map-tools { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.map-dtabs { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.map-dtabs a { display: grid; place-items: center; min-width: 32px; height: 30px; padding: 0 6px; font: 500 12.5px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text-2); text-decoration: none; border-left: 1px solid var(--line); }
.map-dtabs a:first-child { border-left: 0; }
.map-dtabs a:hover { background: var(--sunken); color: var(--text); }
.map-dtabs a.on { background: var(--accent-solid); color: var(--accent-solid-ink); }
.minimap { top: auto; bottom: 18px; right: 16px; width: 168px; height: 104px; }
@media (max-width: 1200px) { .minimap { display: none; } }
@media (max-width: 1000px) { .map-dtabs { display: none; } }
/* Rail: on the map the app sidebar shrinks to icons and opens over the canvas on hover or focus. */
@media (min-width: 901px) {
  body[data-view="map"] { --sbw: 60px; }
  body[data-view="map"] .sidebar { width: 60px; overflow-x: hidden; transition: width .18s var(--ease), box-shadow .18s; white-space: nowrap; }
  body[data-view="map"] .sidebar:hover, body[data-view="map"] .sidebar:focus-within { width: 248px; box-shadow: var(--shadow); }
  body[data-view="map"] .sidebar:not(:hover):not(:focus-within) :is(.brand, .product, .sb-search kbd, .sb-search span, .sb-tools, .sb-nav a > span, .sb-foot > a > span, .sb-domains .n, .sb-domains .t, .sb-domains .p) { visibility: hidden; }
  body[data-view="map"] .sidebar:not(:hover):not(:focus-within) .sb-label { visibility: hidden; height: 1px; margin: 6px 4px; background: var(--line); overflow: hidden; }
  body[data-view="map"] .sidebar:not(:hover):not(:focus-within) .sb-search { width: 38px; padding: 0 0 0 11px; }
}
@media (max-width: 900px) { .outline-toggle { display: none; } }
/* v1.0 Learn workspace and Progress tabs */
.learn-tabs, .progress-tabs { margin: 4px 0 24px; }
.read-page .learn-tabs { margin-bottom: 14px; }
.rd-meta { margin: 0 0 22px; font: 500 13px var(--font); font-variant-numeric: tabular-nums; }
.plan-grid > .panel, .plan-grid > .panel + .panel { margin-top: 0; }
/* v1.0 exam review rows: number and domain, your answer against the key, stem clamped to two lines */
.review summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.review summary .rv-q { flex-basis: 100%; order: 5; }
.review summary .rv-n { font: 500 12.5px var(--font); font-variant-numeric: tabular-nums; color: var(--text-3); }
.review summary .rv-ans { margin-left: auto; font: 500 13px var(--font); color: var(--text-2); white-space: nowrap; }
.review summary .rv-ans s { color: var(--bad); text-decoration-thickness: 1px; }
.review summary .rv-ans s + * , .review summary .rv-ans span { color: var(--ok); }
.review summary::after { content: '›'; order: 4; color: var(--text-3); font-size: 16px; line-height: 1; transition: transform .15s; }
.review details[open] summary::after { transform: rotate(90deg); }
.rd-toc a.on { color: var(--text); border-left-color: var(--accent); font-weight: 500; }
/* v1.0 ports reference: dense three-column grid instead of a page-long table */
table.ports thead { display: none; }
table.ports, table.ports tbody { display: block; }
table.ports tbody { columns: 3 240px; column-gap: 32px; }
table.ports tr { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: baseline; break-inside: avoid; border-bottom: 1px solid var(--line); }
table.ports td { padding: 7px 0; border: 0; font-size: 13.5px; }
table.ports td:first-child { font: 500 12.5px var(--mono); color: var(--text-2); }
.review summary .rv-ans s { margin-right: 8px; }

/* =====================================================================
   v1.1 Editorial direction (Movaci brand)
   Rules: no bordered or tinted boxes around in-flow content; one navy
   anchor and one primary action per screen; light display type, sentence
   case, no uppercase micro-labels; mono only for literal values.
   ===================================================================== */
:root { --navy: #003B6F; --navy-ink: #ffffff; --navy-2: rgba(255,255,255,.72); --ed-gap: 88px; }
:root[data-theme="dark"] { --navy: #0b2e52; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --navy: #0b2e52; } }

/* Brand rule: the navy and blue double stripe from the Movaci letterhead, across the top of the app. */
body::before { content: ''; position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--navy) 0 72%, #0066B3 72% 100%); pointer-events: none; }

/* Chrome: quieter sidebar. Text navigation, sentence-case group labels, no domain list. */
.sb-label { font: 500 12px/1.3 var(--font); text-transform: none; letter-spacing: 0; color: var(--text-3); }
.sb-nav a svg, .sb-foot > a svg { display: none; }
.sb-nav a, .sb-foot > a { padding-left: 12px; }
.sb-section { display: none; }
.sb-search kbd { display: none; }
body[data-view="map"] .sb-nav a svg, body[data-view="map"] .sb-foot > a svg { display: block; }
body[data-view="map"] .sb-section { display: none; }
.eyebrow { font: 500 13px/1.3 var(--font); text-transform: none; letter-spacing: 0; color: var(--text-3); }

/* Editorial type */
.ed-kicker { font-size: 14px; color: var(--text-3); margin: 0 0 18px; }
.ed-display { font-size: clamp(36px, 2.6vw + 14px, 56px); font-weight: 300; line-height: 1.06; letter-spacing: -.035em; margin: 0 0 20px; max-width: 18ch; color: var(--heading); text-wrap: balance; }
.ed-sub { font-size: 18px; line-height: 1.55; color: var(--text-2); margin: 0 0 32px; max-width: 54ch; }
.ed-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ed-link { color: var(--accent); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--accent-line); padding-bottom: 1px; }
.ed-link:hover { border-bottom-color: currentColor; }
.ed-note { font-size: 14px; color: var(--text-3); }

/* The one navy anchor: the lead block on home */
main.ed-bleed { padding-top: 0; }
.ed-lead { position: relative; margin: 0 -48px var(--ed-gap); padding: 72px 48px 64px; background: var(--navy); color: var(--navy-ink); }
.ed-lead .ed-kicker { color: var(--navy-2); }
.ed-lead .ed-display { color: #ffffff; }
.ed-lead .ed-sub { color: var(--navy-2); }
.ed-lead .btn.primary { background: #ffffff; color: var(--navy); border-color: #ffffff; }
.ed-lead .btn.primary:hover { background: #E9E8E7; border-color: #E9E8E7; }
.ed-lead .ed-link { color: #ffffff; border-bottom-color: rgba(255,255,255,.4); }
.ed-lead::after { content: ''; position: absolute; right: 48px; bottom: 28px; width: 28px; height: 28px; background:
  linear-gradient(#93B4D7, #93B4D7) 0 100% / 12px 12px no-repeat,
  linear-gradient(#0066B3, #0066B3) 14px 100% / 12px 12px no-repeat,
  linear-gradient(#ffffff, #ffffff) 14px 2px / 12px 12px no-repeat; opacity: .9; }
.ed-status { margin: 44px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); font-size: 16px; line-height: 1.6; color: var(--navy-2); max-width: 70ch; }
.ed-status a { color: #ffffff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; }
.ed-intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 64px; align-items: end; }
.ed-facts { margin: 0; display: grid; gap: 16px; }
.ed-facts div { border-top: 1px solid rgba(255,255,255,.18); padding-top: 10px; }
.ed-facts dt { font-size: 13px; color: var(--navy-2); }
.ed-facts dd { margin: 2px 0 0; font-size: 16px; color: #ffffff; }

/* Sections: space, a title, content. No eyebrows, no rules under titles. */
.ed-section { margin: 0 0 var(--ed-gap); }
.ed-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.ed-section > header h2 { font-size: 28px; font-weight: 300; letter-spacing: -.02em; margin: 0; }

/* Plain numbered list */
.ed-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ed-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ed-list .n { font-size: 15px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ed-list .t { font-size: 18px; color: var(--heading); }
.ed-list .m { font-size: 14px; color: var(--text-3); text-align: right; }
.ed-list a:hover .t { color: var(--accent); }

/* Steps for new users: three text columns, large light numerals */
.ed-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.ed-steps .n { display: block; font-size: 48px; font-weight: 300; line-height: 1; color: #93B4D7; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.ed-steps h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.ed-steps p { color: var(--text-2); line-height: 1.6; margin: 0 0 14px; }

/* Pull quote */
.ed-quote { margin: 0 0 var(--ed-gap); padding: 0 0 0 28px; border-left: 3px solid var(--navy); max-width: 46ch; }
.ed-quote blockquote { margin: 0 0 16px; font-size: 28px; font-weight: 300; line-height: 1.3; letter-spacing: -.02em; color: var(--heading); }
:root[data-theme="dark"] .ed-quote { border-left-color: #93B4D7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ed-quote { border-left-color: #93B4D7; } }

/* Domains: one line each */
.ed-domains { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ed-domains a { display: grid; grid-template-columns: 56px minmax(0, 1fr) 120px 200px; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ed-domains .n { font-size: 32px; font-weight: 300; color: #93B4D7; font-variant-numeric: tabular-nums; line-height: 1; }
.ed-domains .t { font-size: 18px; color: var(--heading); }
.ed-domains small { display: block; font-size: 14px; color: var(--text-3); margin-top: 3px; }
.ed-domains .w { font-size: 18px; font-variant-numeric: tabular-nums; }
.ed-domains .bar { display: block; height: 2px; background: var(--line); }
.ed-domains .bar b { display: block; height: 100%; background: var(--accent); }
.ed-domains a:hover .t { color: var(--accent); }

@media (max-width: 900px) {
  :root { --ed-gap: 64px; }
  .ed-lead { margin: 0 -18px var(--ed-gap); padding: 48px 18px 44px; }
  .ed-lead::after { right: 18px; bottom: 18px; }
  .ed-intro { grid-template-columns: 1fr; gap: 36px; }
  .ed-facts { grid-template-columns: 1fr 1fr; }
  .ed-steps { grid-template-columns: 1fr; gap: 36px; }
  .ed-domains a { grid-template-columns: 40px minmax(0, 1fr) 64px; }
  .ed-domains .p { display: none; }
  .ed-domains .n { font-size: 26px; }
  .ed-domains .w small { display: none; }
  .ed-list a { grid-template-columns: 28px minmax(0, 1fr); }
  .ed-list .m { grid-column: 2; text-align: left; }
  .ed-quote blockquote { font-size: 23px; }
}
@media (max-width: 1100px) and (min-width: 901px) { .ed-lead { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; } .ed-lead::after { right: 32px; } }
@media (min-width: 901px) { .ed-domains .p { display: grid; gap: 8px; } }

/* v1.1 domain page */
.ed-domain-lead { padding-top: 28px; }
.ed-domain-lead .dnav { margin: 0 0 56px; border: 0; gap: 2px; -webkit-mask-image: none; mask-image: none; }
.ed-domain-lead .dnav a { border: 0; background: none; color: var(--navy-2); padding: 6px 10px; border-radius: 0; box-shadow: none; }
.ed-domain-lead .dnav a b { color: inherit; font: inherit; opacity: .7; }
.ed-domain-lead .dnav a:hover { color: #ffffff; background: none; }
.ed-domain-lead .dnav a.active { color: #ffffff; background: none; border: 0; box-shadow: inset 0 -2px 0 #93B4D7; }
.ed .learn-tabs { margin: calc(-1 * var(--ed-gap) + 0px) 0 56px; }
.ed .ed-lead + .learn-tabs { margin-top: calc(-1 * var(--ed-gap)); }
.ed-objs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ed-objs a { display: grid; grid-template-columns: 64px minmax(0, 1fr) 140px; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ed-objs .n { font-size: 22px; font-weight: 300; color: #5f8fc4; font-variant-numeric: tabular-nums; }
.ed-objs .t { font-size: 17px; line-height: 1.45; color: var(--heading); max-width: 62ch; }
.ed-objs .m { font-size: 14px; color: var(--text-2); text-align: right; }
.ed-objs .m small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.ed-objs a:hover .t { color: var(--accent); }
.ed-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 72px; align-items: start; }
.ed-concepts { margin: 0; display: grid; gap: 28px; }
.ed-concepts dt { font-size: 18px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.ed-concepts dd { margin: 0; color: var(--text-2); line-height: 1.65; max-width: 62ch; }
.ed-split aside { padding-top: 6px; }
.ed-split aside h3 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.ed-plain { list-style: none; margin: 0 0 20px; padding: 0; }
.ed-plain li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.5; }
@media (max-width: 900px) {
  .ed-domain-lead .dnav { margin-bottom: 36px; overflow-x: auto; flex-wrap: nowrap; }
  .ed-objs a { grid-template-columns: 44px minmax(0, 1fr); }
  .ed-objs .m { grid-column: 2; text-align: left; }
  .ed-objs .m small { display: inline; margin-left: 8px; }
  .ed-split { grid-template-columns: 1fr; gap: 40px; }
}
.ed .ed-lead + .learn-tabs { margin-top: calc(-1 * var(--ed-gap) + 12px); }
.ed-split > div > header { margin-bottom: 28px; }
.ed-split > div > header h2 { font-size: 28px; font-weight: 300; letter-spacing: -.02em; margin: 0; }

/* v1.1 flashcards: the card is the one navy anchor; everything else steps back */
.ed-head { margin: 8px 0 36px; }
.ed-title { font-size: clamp(32px, 1.6vw + 18px, 44px); font-weight: 300; letter-spacing: -.03em; margin: 0 0 12px; color: var(--heading); }
.ed-head .ed-sub { margin: 0; font-size: 17px; }
.ed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.ed-toolbar .tabs { border: 0; margin: 0; }
.ed-select { appearance: none; -webkit-appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23939596' stroke-width='1.5'/%3E%3C/svg%3E") right 2px center no-repeat; padding: 8px 20px 8px 0; font: 500 14px var(--font); color: var(--text-2); cursor: pointer; max-width: 60vw; }
.ed-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-cards .fc-stage { max-width: 760px; margin: 0; }
.fc-meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-3); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.ed-cards .fc-stage > .bar { height: 2px; border-radius: 0; margin-bottom: 28px; }
.ed-cards .fc { height: 380px; }
.ed-cards .fc-face { border-radius: 4px; box-shadow: none; padding: 48px 56px; }
.ed-cards .fc-front { background: var(--navy); background-image: none; border-color: var(--navy); color: #ffffff; }
.ed-cards .fc-front .fc-q { color: #ffffff; font-weight: 300; font-size: clamp(36px, 2.4vw + 16px, 60px); letter-spacing: -.035em; line-height: 1.05; }
.ed-cards .fc-ctx { position: absolute; top: 28px; left: 56px; right: 56px; font-size: 14px; color: var(--navy-2); }
.ed-cards .fc-back .fc-ctx { color: var(--text-3); }
.ed-cards .fc-hint { left: 56px; bottom: 28px; font: 400 14px var(--font); color: var(--navy-2); }
.ed-cards .fc-front::after { content: ''; position: absolute; right: 28px; bottom: 26px; width: 26px; height: 26px; background:
  linear-gradient(#93B4D7, #93B4D7) 0 100% / 11px 11px no-repeat, linear-gradient(#0066B3, #0066B3) 13px 100% / 11px 11px no-repeat, linear-gradient(#ffffff, #ffffff) 13px 2px / 11px 11px no-repeat; }
.ed-cards .fc-back { border: 1px solid var(--line-strong); background: var(--surface); }
.ed-cards .fc-a { font-size: 22px; font-weight: 300; line-height: 1.5; letter-spacing: -.01em; color: var(--heading); max-width: 40ch; }
.ed-cards .fc-actions { margin-top: 28px; min-height: 64px; }
.ed-cards .fc-show { width: auto; height: 44px; padding: 0 28px; }
.ed-cards .fc-rate { display: flex; gap: 0; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; }
.ed-cards .fc-rate .btn { flex: 1; height: 64px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--text); font-size: 15px; }
.ed-cards .fc-rate .btn:first-child { border-left: 0; }
.ed-cards .fc-rate .btn small { font: 400 13px var(--font); color: var(--text-3); opacity: 1; }
.ed-cards .fc-rate .btn:hover { background: var(--sunken); }
.ed-cards .fc-rate .btn.r0 { color: var(--bad); }
.ed-cards .fc-rate .btn.primary { background: var(--accent-solid); color: var(--accent-solid-ink); }
.ed-cards .fc-rate .btn.primary small { color: rgba(255,255,255,.75); }
.ed-cards .fc-keys { margin-top: 20px; font: 400 13px var(--font); color: var(--text-3); }
@media (max-width: 900px) {
  .ed-toolbar { flex-direction: column-reverse; align-items: stretch; gap: 4px; margin-bottom: 28px; }
  .ed-cards .fc { height: 320px; }
  .ed-cards .fc-face { padding: 40px 24px; }
  .ed-cards .fc-ctx, .ed-cards .fc-hint { left: 24px; right: 24px; }
  .ed-cards .fc-show { width: 100%; }
}
.ed-cards .fc-back .fc-ctx { font-size: 20px; font-weight: 600; color: var(--heading); top: 40px; }
.ed-cards .fc-back .fc-a { margin-top: 24px; }
.ed-cards .fc-keys { text-align: left; }
@media (max-width: 900px) { .ed-section > header .ed-note { display: none; } }

/* =====================================================================
   v1.2 Night watch (Movaci). Dark navy with depth and light is the default;
   the light theme is its daylight counterpart (refined gradients, glass).
   Christopher chose concept A with concept C's live map, tilt cards and
   gradient motion on 22 November 2026.
   ===================================================================== */
:root {
  --bg: #F4F7FB; --sidebar: rgba(255, 255, 255, .72); --surface: #ffffff; --sunken: #EDF2F8;
  --hover: rgba(11, 27, 46, .045); --active: rgba(0, 102, 179, .08);
  --line: #E0E7EF; --line-strong: #CCD6E2; --track: #E4ECF5;
  --text: #0B1B2E; --text-2: #3A4859; --text-3: #5B6879; --heading: #0B1B2E;
  --accent: #0066B3; --accent-ink: #ffffff; --accent-soft: rgba(0, 102, 179, .08); --accent-line: rgba(0, 102, 179, .3);
  --strong: #003B6F; --focus: #0066B3; --mm-line: #C3CFDD;
  --r: 10px; --r-lg: 18px;
  --sky-top: #EAF1F9; --glow-a: rgba(108, 178, 240, .30); --glow-b: rgba(0, 102, 179, .10); --glow-c: rgba(201, 220, 240, .5); --grain: 0;
  --glass: rgba(255, 255, 255, .82); --glass-hi: rgba(255, 255, 255, .95);
  --ring: 0 0 0 1px var(--line), 0 1px 2px rgba(11, 27, 46, .04), 0 12px 32px -14px rgba(11, 27, 46, .16);
  --ring-hover: 0 0 0 1px var(--line-strong), 0 2px 4px rgba(11, 27, 46, .05), 0 24px 48px -18px rgba(0, 59, 111, .3);
  --glow-btn: 0 0 0 1px #005A9E, 0 10px 24px -8px rgba(0, 102, 179, .55);
  --display-a: #003B6F; --display-b: #0066B3; --display-shadow: none;
  --art-ink: #0B2E55; --art-soft: rgba(0, 59, 111, .38); --art-glow: #0066B3; --art-bg: #ffffff; --art-drop: rgba(0, 102, 179, .0);
  --o-faint: rgba(0, 59, 111, .12); --o-tick: rgba(0, 59, 111, .16); --o-tick-b: rgba(0, 59, 111, .35); --o-dash: rgba(0, 59, 111, .3); --o-ray: #0066B3;
  --o-body: #ffffff; --o-body-line: rgba(0, 59, 111, .22); --o-arc: #0066B3; --o-num: #0B1B2E; --o-lbl: #5B6879; --o-lbl-hot: #0B1B2E; --o-signal: #0066B3;
  --o-core-a: rgba(147, 180, 215, .55); --o-core-b: rgba(147, 180, 215, .14); --o-halo-a: rgba(0, 102, 179, .38); --o-halo-b: rgba(0, 102, 179, 0);
  --o-sh-a: #0A4F8E; --o-sh-b: #003B6F; --o-edge-a: #93B4D7; --o-edge-b: #0066B3; --o-score: #ffffff; --o-cap: #C9DCF0;
  --nw-mesh-1: #93B4D7; --nw-mesh-2: rgba(0, 102, 179, .45); --nw-mesh-3: #D3E3F3; --nw-mesh-4: rgba(108, 178, 240, .22); --nw-mesh-blend: multiply;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #04101F; --sidebar: rgba(4, 16, 31, .62); --surface: #0A1F3A; --sunken: rgba(3, 12, 26, .55);
    --hover: rgba(147, 180, 215, .08); --active: rgba(147, 180, 215, .13);
    --line: rgba(147, 180, 215, .14); --line-strong: rgba(147, 180, 215, .26); --track: rgba(147, 180, 215, .14);
    --text: #D6E4F3; --text-2: #A9BED6; --text-3: #8099B5; --heading: #F4F8FC;
    --accent: #6CB2F0; --accent-ink: #04101F; --accent-soft: rgba(108, 178, 240, .14); --accent-line: rgba(108, 178, 240, .45);
    --strong: #93B4D7; --focus: #93B4D7; --mm-line: rgba(147, 180, 215, .3); --root: #0F4C86; --accent-solid: #1574C2;
    --sky-top: #071B35; --glow-a: rgba(0, 102, 179, .34); --glow-b: rgba(47, 143, 224, .12); --glow-c: rgba(0, 59, 111, .55); --grain: .45;
    --glass: linear-gradient(180deg, rgba(16, 48, 90, .46), rgba(6, 24, 47, .34)); --glass-hi: rgba(16, 48, 90, .7);
    --ring: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px var(--line);
    --ring-hover: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px var(--line-strong), 0 30px 60px -30px rgba(0, 102, 179, .8);
    --glow-btn: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 0 1px rgba(147, 180, 215, .3), 0 12px 40px -8px rgba(0, 102, 179, .8);
    --display-a: #ffffff; --display-b: #93B4D7; --display-shadow: 0 0 60px rgba(0, 102, 179, .45);
    --art-ink: #D6E4F3; --art-soft: rgba(147, 180, 215, .55); --art-glow: #5DB0F5; --art-bg: #0A2342; --art-drop: rgba(47, 143, 224, .45);
    --o-faint: rgba(147, 180, 215, .12); --o-tick: rgba(147, 180, 215, .18); --o-tick-b: rgba(147, 180, 215, .45); --o-dash: rgba(147, 180, 215, .3); --o-ray: #93B4D7;
    --o-body: #0A2342; --o-body-line: rgba(147, 180, 215, .35); --o-arc: #D6E4F3; --o-num: #F4F8FC; --o-lbl: rgba(214, 228, 243, .62); --o-lbl-hot: #ffffff; --o-signal: #ffffff;
    --o-core-a: rgba(47, 143, 224, .55); --o-core-b: rgba(0, 102, 179, .12); --o-halo-a: rgba(147, 180, 215, .9); --o-halo-b: rgba(47, 143, 224, 0);
    --o-sh-a: #16467F; --o-sh-b: #071B35; --o-edge-a: #D6E4F3; --o-edge-b: rgba(47, 143, 224, .4); --o-score: #F4F8FC; --o-cap: #93B4D7;
    --nw-mesh-1: rgba(0, 102, 179, .55); --nw-mesh-2: rgba(47, 143, 224, .3); --nw-mesh-3: rgba(0, 59, 111, .6); --nw-mesh-4: rgba(147, 180, 215, .16); --nw-mesh-blend: screen;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #04101F; --sidebar: rgba(4, 16, 31, .62); --surface: #0A1F3A; --sunken: rgba(3, 12, 26, .55);
  --hover: rgba(147, 180, 215, .08); --active: rgba(147, 180, 215, .13);
  --line: rgba(147, 180, 215, .14); --line-strong: rgba(147, 180, 215, .26); --track: rgba(147, 180, 215, .14);
  --text: #D6E4F3; --text-2: #A9BED6; --text-3: #8099B5; --heading: #F4F8FC;
  --accent: #6CB2F0; --accent-ink: #04101F; --accent-soft: rgba(108, 178, 240, .14); --accent-line: rgba(108, 178, 240, .45);
  --strong: #93B4D7; --focus: #93B4D7; --mm-line: rgba(147, 180, 215, .3); --root: #0F4C86; --accent-solid: #1574C2;
  --sky-top: #071B35; --glow-a: rgba(0, 102, 179, .34); --glow-b: rgba(47, 143, 224, .12); --glow-c: rgba(0, 59, 111, .55); --grain: .45;
  --glass: linear-gradient(180deg, rgba(16, 48, 90, .46), rgba(6, 24, 47, .34)); --glass-hi: rgba(16, 48, 90, .7);
  --ring: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px var(--line);
  --ring-hover: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px var(--line-strong), 0 30px 60px -30px rgba(0, 102, 179, .8);
  --glow-btn: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 0 1px rgba(147, 180, 215, .3), 0 12px 40px -8px rgba(0, 102, 179, .8);
  --display-a: #ffffff; --display-b: #93B4D7; --display-shadow: 0 0 60px rgba(0, 102, 179, .45);
  --art-ink: #D6E4F3; --art-soft: rgba(147, 180, 215, .55); --art-glow: #5DB0F5; --art-bg: #0A2342; --art-drop: rgba(47, 143, 224, .45);
  --o-faint: rgba(147, 180, 215, .12); --o-tick: rgba(147, 180, 215, .18); --o-tick-b: rgba(147, 180, 215, .45); --o-dash: rgba(147, 180, 215, .3); --o-ray: #93B4D7;
  --o-body: #0A2342; --o-body-line: rgba(147, 180, 215, .35); --o-arc: #D6E4F3; --o-num: #F4F8FC; --o-lbl: rgba(214, 228, 243, .62); --o-lbl-hot: #ffffff; --o-signal: #ffffff;
  --o-core-a: rgba(47, 143, 224, .55); --o-core-b: rgba(0, 102, 179, .12); --o-halo-a: rgba(147, 180, 215, .9); --o-halo-b: rgba(47, 143, 224, 0);
  --o-sh-a: #16467F; --o-sh-b: #071B35; --o-edge-a: #D6E4F3; --o-edge-b: rgba(47, 143, 224, .4); --o-score: #F4F8FC; --o-cap: #93B4D7;
  --nw-mesh-1: rgba(0, 102, 179, .55); --nw-mesh-2: rgba(47, 143, 224, .3); --nw-mesh-3: rgba(0, 59, 111, .6); --nw-mesh-4: rgba(147, 180, 215, .16); --nw-mesh-blend: screen;
  color-scheme: dark;
}

/* Atmosphere: layered light over the page, film grain in the dark theme. */
body { background: var(--bg); }
.app::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(60vw 50vw at 88% -6%, var(--glow-a), transparent 62%),
  radial-gradient(40vw 34vw at 28% 22%, var(--glow-b), transparent 70%),
  radial-gradient(70vw 40vw at 50% 112%, var(--glow-c), transparent 70%),
  linear-gradient(180deg, var(--sky-top) 0%, var(--bg) 55%); }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 70; opacity: var(--grain); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sidebar { background: var(--sidebar); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.footer { background: transparent; }

/* Buttons: a lit primary, quiet secondaries. */
.btn { height: 36px; border-radius: var(--r); background: var(--glass); box-shadow: var(--ring); border-color: transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s; }
.btn:hover { background: var(--glass-hi); border-color: transparent; box-shadow: var(--ring-hover); }
.btn.primary, .btn.glow { position: relative; color: #fff; border: 0; background: linear-gradient(180deg, #1A7DCC, #0066B3); box-shadow: var(--glow-btn); isolation: isolate; }
.btn.primary:hover, .btn.glow:hover, :root[data-theme="dark"] .btn.primary:hover { color: #fff; background: linear-gradient(180deg, #2288D6, #0A6DBC); transform: translateY(-1px); box-shadow: var(--glow-btn), 0 0 0 1px rgba(147, 180, 215, .25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:hover { color: #fff; background: linear-gradient(180deg, #2288D6, #0A6DBC); } }
.btn.glow::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(120px 60px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .32), transparent 70%); }
.btn.glow:hover::before { opacity: 1; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); box-shadow: none; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.xl { height: 56px; padding: 0 26px 0 30px; border-radius: 999px; font-size: 16px; gap: 14px; }
.btn .arr { display: inline-flex; transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.field { border-radius: var(--r); background: var(--surface); }

/* ---------- Home ---------- */
main.nw { max-width: 1280px; padding-top: 8px; overflow-x: clip; }
.nw-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 32px; align-items: center; min-height: 640px; padding: 36px 0 56px; isolation: isolate; }
.nw-hero::before { content: ''; position: absolute; z-index: -1; inset: -40px -20px 0 30%; pointer-events: none; filter: blur(50px); mix-blend-mode: var(--nw-mesh-blend);
  background: radial-gradient(30% 34% at 60% 30%, var(--nw-mesh-1), transparent 70%), radial-gradient(26% 30% at 82% 50%, var(--nw-mesh-2), transparent 70%), radial-gradient(28% 26% at 40% 62%, var(--nw-mesh-3), transparent 70%), radial-gradient(24% 26% at 90% 82%, var(--nw-mesh-4), transparent 70%);
  animation: nwDrift 24s ease-in-out infinite alternate; }
@keyframes nwDrift { to { transform: translate(-5%, 4%) scale(1.08); } }
.nw-kick { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; color: var(--strong); }
.nw-kick .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2F8FE0; box-shadow: 0 0 0 4px rgba(47, 143, 224, .18), 0 0 18px #2F8FE0; animation: nwBeat 2.4s var(--ease) infinite; }
@keyframes nwBeat { 50% { box-shadow: 0 0 0 9px rgba(47, 143, 224, 0), 0 0 18px #2F8FE0; } }
.nw-display { margin: 22px 0 0; font-weight: 300; font-size: clamp(42px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -.035em; color: var(--display-a); text-shadow: var(--display-shadow); max-width: 13ch; }
.nw-display .g { background: linear-gradient(100deg, var(--display-a) 10%, var(--display-b) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nw-sub { margin: 24px 0 0; font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 44ch; }
.nw-meter { margin-top: 32px; max-width: 420px; }
.nw-meter .row { justify-content: space-between; font-size: 13px; color: var(--text-3); }
.nw-meter .row b { color: var(--text); font-weight: 500; }
.nw-meter .bar { position: relative; height: 3px; margin-top: 10px; border-radius: 3px; background: var(--track); overflow: visible; }
.nw-meter .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #0066B3, #93B4D7); box-shadow: 0 0 14px rgba(147, 180, 215, .6); transform-origin: left; animation: nwGrow 1.6s var(--ease) both .3s; }
.nw-meter .bar i::after { content: ''; position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 102, 179, .3), 0 0 14px #fff, 0 0 26px #93B4D7; }
@keyframes nwGrow { from { transform: scaleX(0); } }
.nw-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 36px; }
.nw-ghost { font-size: 15px; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-line); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.nw-ghost:hover { color: var(--heading); border-color: var(--heading); }

.nw-orbit { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; justify-self: end; margin-bottom: 30px; }
.nw-orbit svg { width: 100%; height: 100%; overflow: visible; display: block; }
.nw-orbit .g-core-a { stop-color: var(--o-core-a); } .nw-orbit .g-core-b { stop-color: var(--o-core-b); } .nw-orbit .g-core-c { stop-color: var(--o-core-b); stop-opacity: 0; }
.nw-orbit .g-halo-a { stop-color: var(--o-halo-a); } .nw-orbit .g-halo-b { stop-color: var(--o-halo-b); }
.nw-orbit .g-sh-a { stop-color: var(--o-sh-a); } .nw-orbit .g-sh-b { stop-color: var(--o-sh-b); }
.nw-orbit .g-edge-a { stop-color: var(--o-edge-a); } .nw-orbit .g-edge-b { stop-color: var(--o-edge-b); }
.nw-orbit .o-faint { stroke: var(--o-faint); } .nw-orbit .o-tick { stroke: var(--o-tick); } .nw-orbit .o-tick-b { stroke: var(--o-tick-b); }
.nw-orbit .o-dash { stroke: var(--o-dash); stroke-dasharray: 2 7; }
.nw-orbit .o-breathe { stroke: var(--o-dash); transform-origin: 300px 300px; animation: nwBreathe 5s ease-in-out infinite; }
@keyframes nwBreathe { 50% { transform: scale(1.06); opacity: .4; } }
.nw-orbit .spin { transform-origin: 300px 300px; animation: nwSpin 140s linear infinite; }
.nw-orbit .spin.rev { animation-duration: 220s; animation-direction: reverse; }
@keyframes nwSpin { to { transform: rotate(360deg); } }
.nw-orbit .o-ray { stroke: var(--o-ray); stroke-width: 1; }
.nw-orbit .o-signal { fill: var(--o-signal); }
.nw-orbit .o-inner { stroke: rgba(147, 180, 215, .28); }
.nw-orbit .o-score { font: 300 46px var(--font); fill: var(--o-score); letter-spacing: -1.5px; }
.nw-orbit .o-cap { font: 500 11px var(--font); fill: var(--o-cap); }
.nw-orbit .m1 { fill: #0066B3; } .nw-orbit .m2 { fill: #93B4D7; } .nw-orbit .m3 { fill: #ffffff; }
.nw-orbit .o-node { cursor: pointer; outline: none; }
.nw-orbit .o-body { fill: var(--o-body); stroke: var(--o-body-line); }
.nw-orbit .o-track { stroke: var(--o-faint); stroke-width: 2; }
.nw-orbit .o-arc { stroke: var(--o-arc); stroke-width: 2; stroke-linecap: round; }
.nw-orbit .o-num { font: 500 13px var(--mono); fill: var(--o-num); }
.nw-orbit .o-lbl { font: 500 12px var(--font); fill: var(--o-lbl); transition: fill .3s; }
.nw-orbit .o-halo { transition: opacity .4s var(--ease); }
.nw-orbit .o-disc { transform-box: fill-box; transform-origin: center; transition: transform .4s var(--ease); }
.nw-orbit .o-node:hover .o-disc, .nw-orbit .o-node:focus-visible .o-disc { transform: scale(1.12); }
.nw-orbit .o-node:hover .o-halo, .nw-orbit .o-node.hot .o-halo { opacity: .95; }
.nw-orbit .o-node:hover .o-lbl, .nw-orbit .o-node.hot .o-lbl, .nw-orbit .o-node:focus-visible .o-lbl { fill: var(--o-lbl-hot); }
.nw-orbit .o-node:focus-visible .o-body { stroke: var(--focus); stroke-width: 2; }
.nw-orbit-tip { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 4px; font-size: 13px; color: var(--text-3); text-align: center; white-space: nowrap; }
.nw-orbit-tip b { color: var(--heading); font-weight: 500; }

.nw-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nw-cell { display: block; padding: 28px 28px 28px 0; text-decoration: none; color: inherit; transition: background-color .3s; }
.nw-cell + .nw-cell { padding-left: 28px; border-left: 1px solid var(--line); }
a.nw-cell:hover b { color: var(--accent); }
.nw-cell b { display: block; font: 300 44px/1 var(--font); letter-spacing: -.03em; color: var(--heading); font-variant-numeric: tabular-nums; transition: color .25s; }
.nw-cell b small { font-size: 17px; color: var(--text-3); letter-spacing: 0; margin-left: 6px; }
.nw-cell span { display: block; margin-top: 10px; font-size: 14px; color: var(--text-2); }

.nw-sec { padding-top: 104px; }
.nw-sec-h { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.nw-sec-h h2 { margin: 0; font-weight: 300; font-size: 40px; letter-spacing: -.03em; line-height: 1.1; }
.nw-sec-h p { margin: 0; color: var(--text-2); max-width: 46ch; font-size: 15px; }

.nw-work-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
@property --nw-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.nw-console { position: relative; border-radius: 22px; padding: 1px; background: conic-gradient(from var(--nw-ang), rgba(147, 180, 215, .25), #93B4D7, #0066B3, rgba(147, 180, 215, .25) 40%, rgba(147, 180, 215, .25)); animation: nwRot 9s linear infinite; box-shadow: 0 40px 80px -36px rgba(0, 59, 111, .6); }
@keyframes nwRot { to { --nw-ang: 360deg; } }
.nw-console .in { border-radius: 21px; overflow: hidden; background: var(--surface); background-image: radial-gradient(420px 220px at 90% 0%, var(--glow-a), transparent 70%); }
.nw-console .bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.nw-console .bar .dots { display: flex; gap: 6px; } .nw-console .bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.nw-console .bar b { color: var(--heading); font-weight: 500; }
.nw-console .bar .path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nw-console .bar .live { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent); }
.nw-console .bar .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--accent-soft); animation: nwBlink 2s infinite; }
@keyframes nwBlink { 50% { opacity: .3; } }
.nw-om { padding: 8px 6px; }
.nw-om svg { display: block; width: 100%; height: auto; }
.om .g-lk-a { stop-color: #0066B3; } .om .g-lk-b { stop-color: #93B4D7; }
.om-link { fill: none; stroke: url(#omLk); stroke-width: 1.5; }
.om-link.todo { stroke: var(--line-strong); }
.om-link.sub { stroke: var(--line-strong); stroke-width: 1.2; }
.om-link.flow { stroke-dasharray: 4 6; animation: nwFlow 1.2s linear infinite; }
@keyframes nwFlow { to { stroke-dashoffset: -20; } }
.om-root rect { fill: #04172E; stroke: rgba(147, 180, 215, .35); }
.om-root text { font: 500 12px var(--font); fill: #fff; }
.om-t rect { fill: var(--surface); stroke: var(--line-strong); transition: stroke .2s; }
.om-t text { font: 500 12px var(--font); fill: var(--text); }
.om-t:hover rect { stroke: var(--accent); }
.om-t.todo text { fill: var(--text-3); }
.om-t.now rect { fill: #0066B3; stroke: #0066B3; }
.om-t.now text { fill: #fff; }
.om-ic { fill: #0066B3; } .om-ck { stroke: #fff; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.om-ring { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.om-t.now .om-ring { stroke: #fff; } .om-half { fill: var(--accent); } .om-t.now .om-half { fill: #fff; }
.om-pulse { fill: none; stroke: #0066B3; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: nwPulse 2.4s var(--ease) infinite; }
@keyframes nwPulse { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3, 1.6); } }
.om-k rect { fill: var(--sunken); stroke: var(--line); }
.om-k text { font: 400 11px var(--font); fill: var(--text-2); }
.nw-console .foot { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 18px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.nw-console .foot b { color: var(--heading); font-weight: 500; }
.nw-console .foot .pb { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--track); overflow: hidden; }
.nw-console .foot .pb i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #003B6F, #0066B3, #93B4D7); transform-origin: left; animation: nwGrow 1.6s var(--ease) both .5s; }

.nw-path-col h3 { margin: 6px 0 22px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.nw-path { list-style: none; margin: 0 0 28px; padding: 0 0 0 26px; position: relative; }
.nw-path::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, #93B4D7, rgba(147, 180, 215, .08)); }
.nw-path a { position: relative; display: block; padding: 0 0 24px; text-decoration: none; color: inherit; }
.nw-path a::before { content: ''; position: absolute; left: -26px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid #93B4D7; transition: background .3s, box-shadow .3s; }
.nw-path li:first-child a::before { background: #93B4D7; box-shadow: 0 0 14px #93B4D7; }
.nw-path a:hover::before { background: var(--heading); box-shadow: 0 0 18px #93B4D7; }
.nw-path small { font: 500 12px var(--mono); color: var(--text-3); }
.nw-path strong { display: block; margin-top: 6px; font-size: 20px; font-weight: 400; color: var(--heading); letter-spacing: -.01em; line-height: 1.25; transition: color .25s; }
.nw-path a:hover strong { color: var(--accent); }
.nw-path span { display: block; margin-top: 4px; font-size: 14px; color: var(--text-2); }

.nw-quote { position: relative; margin: 104px 0 0; padding: 68px 300px 68px 76px; border-radius: 28px; overflow: hidden; background: var(--glass); background-image: radial-gradient(500px 260px at 85% 0%, var(--glow-a), transparent 70%); box-shadow: var(--ring); }
.nw-quote blockquote { margin: 0; font-weight: 300; font-size: clamp(26px, 3vw, 40px); line-height: 1.25; letter-spacing: -.02em; color: var(--heading); max-width: 26ch; }
.nw-quote figcaption { margin-top: 26px; font-size: 14px; }
.nw-quote figcaption a { color: var(--accent); }
.nw-quote-art { position: absolute; right: 72px; top: 50%; width: 190px; transform: translateY(-50%); color: var(--strong); filter: drop-shadow(0 0 14px var(--art-drop)); }
.nw-quote-art svg { display: block; width: 100%; }

.nw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.nw-tile { position: relative; display: flex; flex-direction: column; padding: 24px 24px 22px; min-height: 280px; border-radius: 22px; overflow: hidden; isolation: isolate; text-decoration: none; color: inherit; background: var(--glass); box-shadow: var(--ring); transition: transform .5s var(--ease), box-shadow .5s var(--ease); will-change: transform; }
.nw-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(260px 200px at var(--mx, 50%) var(--my, 30%), var(--glow-a), transparent 70%); }
.nw-tile:hover { box-shadow: var(--ring-hover); transform: translateY(-6px); }
.nw-tile:hover::before { opacity: 1; }
.nw-tile .top { display: flex; justify-content: space-between; align-items: center; }
.nw-tile .n { font: 500 12.5px var(--mono); color: var(--text-3); }
.nw-ring svg { display: block; width: 44px; height: 44px; }
.nw-ring .tr { fill: none; stroke: var(--track); stroke-width: 2.5; }
.nw-ring .fg { fill: none; stroke: var(--strong); stroke-width: 2.5; stroke-linecap: round; }
.nw-ring text { font: 500 11px var(--font); fill: var(--text); }
.nw-art { display: block; width: 112px; height: 112px; margin: 12px 0 10px -6px; filter: drop-shadow(0 0 14px var(--art-drop)); transition: filter .5s, transform .6s var(--ease); }
.nw-art svg { width: 100%; height: 100%; display: block; }
.nw-tile:hover .nw-art { transform: translateY(-4px) scale(1.04); }
.nw-tile:hover .nw-art path { animation: nwDraw 1.4s var(--ease); stroke-dasharray: 400; }
@keyframes nwDraw { from { stroke-dashoffset: 400; } }
.nw-tile h3 { margin: auto 0 0; font-weight: 400; font-size: 18px; line-height: 1.25; letter-spacing: -.01em; color: var(--heading); }
.nw-tile p { margin: 8px 0 0; font-size: 13px; color: var(--text-3); }

@media (max-width: 1180px) {
  .nw-hero { grid-template-columns: 1fr; min-height: 0; }
  .nw-orbit { justify-self: center; }
  .nw-work-grid { grid-template-columns: 1fr; gap: 40px; }
  .nw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  main.nw { padding-left: 20px; padding-right: 20px; }
  .nw-hero { padding: 16px 0 36px; gap: 12px; }
  .nw-hero::before { inset: 0 -40px 0 -40px; }
  .nw-display { font-size: 44px; }
  .nw-sub { font-size: 16px; }
  .nw-actions { flex-direction: column; align-items: stretch; gap: 18px; text-align: center; }
  .nw-actions .nw-ghost { align-self: center; }
  .nw-orbit { margin-bottom: 0; }
  .nw-orbit .o-lbl, .nw-orbit-tip { display: none; }
  .nw-orbit .o-num { font-size: 17px; }
  .nw-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nw-cell { padding: 20px 14px 20px 0; }
  .nw-cell + .nw-cell { padding-left: 14px; }
  .nw-cell:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .nw-cell:nth-child(4) { border-top: 1px solid var(--line); }
  .nw-cell b { font-size: 34px; }
  .nw-sec { padding-top: 68px; }
  .nw-sec-h { display: block; } .nw-sec-h h2 { font-size: 30px; } .nw-sec-h p { margin-top: 10px; }
  .nw-quote { margin-top: 68px; padding: 36px 26px 150px; border-radius: 22px; }
  .nw-quote-art { right: 50%; top: auto; bottom: 22px; width: 104px; transform: translateX(50%); }
  .nw-tiles { gap: 10px; }
  .nw-tile { min-height: 0; padding: 16px 14px; border-radius: 18px; }
  .nw-art { width: 72px; height: 72px; margin: 6px 0 6px -4px; }
  .nw-ring svg { width: 36px; height: 36px; }
  .nw-tile h3 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-hero::before, .nw-kick .dot, .nw-orbit .spin, .nw-orbit .o-breathe, .nw-console, .om-link.flow, .nw-console .bar .live::before { animation: none !important; }
  .nw-tile, .nw-tile:hover { transform: none !important; }
  .nw-tile:hover .nw-art path { animation: none; }
}

/* ---------- Night watch: domain hero ---------- */
main.nw-domain { max-width: 1200px; }
.nw-dhero { position: relative; padding: 18px 0 40px; isolation: isolate; }
.nw-dhero::before { content: ''; position: absolute; z-index: -1; inset: 0 -20px 0 40%; filter: blur(50px); pointer-events: none; mix-blend-mode: var(--nw-mesh-blend);
  background: radial-gradient(34% 40% at 70% 50%, var(--nw-mesh-1), transparent 70%), radial-gradient(28% 30% at 40% 70%, var(--nw-mesh-3), transparent 70%); animation: nwDrift 24s ease-in-out infinite alternate; }
.nw-dhero .dnav { border: 0; gap: 4px; margin: 0 0 28px; -webkit-mask-image: none; mask-image: none; }
.nw-dhero .dnav a { border: 0; background: none; box-shadow: none; color: var(--text-3); border-radius: 999px; padding: 6px 12px; }
.nw-dhero .dnav a b { color: inherit; font: 500 11.5px var(--mono); opacity: .8; }
.nw-dhero .dnav a:hover { color: var(--heading); background: var(--hover); }
.nw-dhero .dnav a.active { color: var(--heading); background: var(--active); box-shadow: inset 0 0 0 1px var(--line-strong); }
.nw-dhero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; }
.nw-dhero .nw-display { font-size: clamp(38px, 4.4vw, 64px); max-width: 16ch; }
.nw-dart { position: relative; width: 300px; aspect-ratio: 1; }
.nw-dart .ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nw-dart .ring .tr { fill: none; stroke: var(--track); stroke-width: 3; }
.nw-dart .ring .fg { fill: none; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(147, 180, 215, .6)); }
.nw-dart .ring .tk { fill: none; stroke: var(--o-faint); stroke-dasharray: 2 6; transform-origin: 150px 150px; animation: nwSpin 140s linear infinite; }
.nw-dart .ring .g-a { stop-color: #93B4D7; } .nw-dart .ring .g-b { stop-color: #0066B3; }
.nw-dart .glyph { position: absolute; inset: 22%; filter: drop-shadow(0 0 18px var(--art-drop)); }
.nw-dart .glyph svg { width: 100%; height: 100%; display: block; }
.nw-dart .pc { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--ring); white-space: nowrap; }
.nw-dart .pc b { font: 400 18px var(--font); color: var(--heading); letter-spacing: -.02em; } .nw-dart .pc b small { font-size: 12px; color: var(--text-3); }
.nw-dart .pc span { font-size: 12.5px; color: var(--text-3); }
.nw-domain .learn-tabs, .nw-domain .ed .learn-tabs { margin: 0 0 48px; }
@media (max-width: 900px) {
  .nw-dhero-grid { grid-template-columns: 1fr; gap: 28px; }
  .nw-dart { width: 220px; justify-self: center; order: -1; }
  .nw-dhero .nw-display { font-size: 38px; }
  .nw-dhero .dnav { margin-bottom: 18px; }
}

/* ---------- Night watch: site-wide surfaces ---------- */
/* Page titles: light display weight with the same lit gradient as the home page. */
.page-head { margin-bottom: 36px; }
.page-head h1, .ms-hero h1, .ed-cards .ed-title { font-weight: 300; font-size: clamp(34px, 3.3vw, 50px); line-height: 1.06; letter-spacing: -.035em; background: linear-gradient(100deg, var(--display-a) 30%, var(--display-b) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; padding-bottom: .06em; }
.page-head .eyebrow, .ms-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--strong); font-size: 13.5px; }
.page-head .eyebrow::before, .ms-hero .eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #2F8FE0; box-shadow: 0 0 0 3px rgba(47, 143, 224, .18), 0 0 12px #2F8FE0; }
.section-title { border-bottom: 0; padding-bottom: 0; }
.section-title h2 { font-weight: 300; font-size: 28px; letter-spacing: -.025em; }

/* Glass slabs for every grouped surface. */
.panel, .rd-topic, .sc-card, .sheet-page, .ms-band, .nw-slab { border: 0; border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--ring); }
.modes { gap: 16px; border: 0; border-radius: 0; overflow: visible; }
.modes > div { border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--ring); padding: 24px; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.modes > div + div { border-left: 0; }
.modes > div:hover { transform: translateY(-3px); box-shadow: var(--ring-hover); }
.modes > div.rec { background: var(--glass); background-image: radial-gradient(260px 160px at 80% 0%, var(--glow-a), transparent 70%); box-shadow: var(--ring), inset 0 0 0 1px var(--accent-line); }
.ms-principles { gap: 14px; background: none; border: 0; border-radius: 0; overflow: visible; }
.ms-p { border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--ring); padding: 22px 24px 24px; transition: box-shadow .4s var(--ease); }
.ms-p:hover { box-shadow: var(--ring-hover); }
.th-tiles { gap: 12px; background: none; border: 0; overflow: visible; }
.th-tile { border-radius: 14px; background: var(--glass); box-shadow: var(--ring); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.th-tile:hover { background: var(--glass); transform: translateY(-2px); box-shadow: var(--ring-hover); }
.rd-topic { padding: 26px 30px 28px; }
.sheet-page { padding: 32px 36px; }
.setup-side { border-left: 0; padding: 22px 24px; border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--ring); }
.ms-band:hover { box-shadow: var(--ring-hover); }
.ms-band li { border: 0; background: var(--glass); box-shadow: var(--ring); }
.ms-band li:first-child { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; box-shadow: var(--glow-btn); }

/* Segmented controls and tabs */
.seg { border: 0; border-radius: 999px; padding: 3px; gap: 2px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0 !important; border-radius: 999px; height: 28px; padding: 0 13px; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 102, 179, .7); }
.tabs { gap: 26px; }
.tabs button[aria-selected="true"], .tabs a[aria-current="page"] { color: var(--heading); border-bottom-color: transparent; box-shadow: inset 0 -2px 0 #93B4D7; }
:root:not([data-theme="dark"]) .tabs a[aria-current="page"], :root:not([data-theme="dark"]) .tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 #0066B3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs a[aria-current="page"], :root:not([data-theme="light"]) .tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 #93B4D7; } }

/* Sidebar: active item glows. */
.sb-nav a, .sb-foot > a { position: relative; border-radius: 10px; }
.sb-nav a.active, .sb-foot > a.active { background: var(--active); color: var(--heading); }
.sb-nav a.active::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: #93B4D7; box-shadow: 0 0 10px #93B4D7; }
.sb-search { border-radius: 10px; background: var(--sunken); border-color: var(--line); }

/* Flashcards: a lit slab for the question, glass for the answer. */
.ed-cards .fc-face { border-radius: 24px; padding: 52px 60px; }
.ed-cards .fc-front { border: 0; color: #fff; background: radial-gradient(520px 300px at 85% -10%, rgba(47, 143, 224, .55), transparent 70%), radial-gradient(400px 260px at 0% 110%, rgba(0, 102, 179, .35), transparent 70%), linear-gradient(160deg, #0A2B52, #04172E); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(147, 180, 215, .2), 0 40px 80px -40px rgba(0, 59, 111, .8); }
.ed-cards .fc-front .fc-q { text-shadow: 0 0 40px rgba(0, 102, 179, .6); }
.ed-cards .fc-ctx, .ed-cards .fc-hint { color: rgba(214, 228, 243, .7); }
.ed-cards .fc-back { border: 0; background: var(--surface); background-image: radial-gradient(420px 220px at 100% 0%, var(--glow-a), transparent 70%); box-shadow: var(--ring); }
.ed-cards .fc-back .fc-ctx { color: var(--heading); }
.ed-cards .fc-rate { border: 0; border-radius: 16px; background: var(--glass); box-shadow: var(--ring); }
.ed-cards .fc-rate .btn { background: transparent; box-shadow: none; border-radius: 0; }
.ed-cards .fc-rate .btn:hover { background: var(--hover); transform: none; }
.ed-cards .fc-rate .btn.primary { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; }
.ed-cards .fc-stage > .bar { height: 3px; border-radius: 3px; }

/* Bars and meters pick up the lit gradient. */
.bar { border-radius: 4px; background: var(--track); }
.bar > span, .bar .done { background: linear-gradient(90deg, #0066B3, #93B4D7); border-radius: 4px; }
.ring .fg { stroke: #93B4D7; }
:root:not([data-theme="dark"]) .ring .fg { stroke: #0066B3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ring .fg { stroke: #93B4D7; } }

/* Overlays */
.pop, .dlg, .pal-box, .tour-pop { border: 0; border-radius: 16px; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); }
@media (prefers-reduced-motion: reduce) { .nw-dhero::before, .nw-dart .ring .tk { animation: none !important; } .modes > div:hover, .th-tile:hover { transform: none; } }

/* Questions: options as glass rows that light up on hover. */
.q-opts { gap: 10px; }
.q-opts button, .sc-opt { border: 0; border-radius: 14px; background: var(--glass); box-shadow: var(--ring); padding: 15px 18px; transition: box-shadow .25s var(--ease), transform .25s var(--ease), background-color .2s; }
.q-opts button:hover:not(:disabled), .sc-opt:hover:not(:disabled) { background: var(--glass); box-shadow: var(--ring), inset 0 0 0 1px var(--accent-line), 0 14px 30px -18px rgba(0, 102, 179, .8); transform: translateX(2px); }
.q-opts .L { border-radius: 8px; }
.q-opts button.sel, .q-opts button.right { background: var(--glass); box-shadow: var(--ring), inset 0 0 0 1px var(--ok-line); }
.q-opts button.right .L { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-opts button.sel:not(.right):not(.wrong) { box-shadow: var(--ring), inset 0 0 0 1px var(--accent-line); }
.q-opts button.sel:not(.right):not(.wrong) .L { background: #0066B3; border-color: #0066B3; color: #fff; }
.q-opts button.wrong { border: 0; box-shadow: var(--ring), inset 0 0 0 1px var(--bad-line); }
.q-opts button.wrong .L { background: var(--bad); border-color: var(--bad); color: #fff; }
.why { border-left: 0; border-radius: 14px; background: var(--glass); box-shadow: var(--ring), inset 3px 0 0 #93B4D7; padding: 16px 20px; }
.exam-bar { background: transparent; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sc-opt.right { background: var(--glass); box-shadow: var(--ring), inset 0 0 0 1px var(--ok-line); }
.sc-opt.right .L { background: var(--ok); border-color: var(--ok); color: #fff; }
.sc-opt.wrong { border: 0; box-shadow: var(--ring), inset 0 0 0 1px var(--bad-line); }
.sc-opt.wrong .L { background: var(--bad); border-color: var(--bad); color: #fff; }
.sc-move { border-left: 0; border-radius: 14px; background: var(--glass); box-shadow: var(--ring), inset 3px 0 0 #93B4D7; }
@media (max-width: 600px) { .seg { border-radius: 16px; } }

/* ---------- Daily review ---------- */
main.nw-rv { max-width: 900px; }
.rv-intro { display: grid; gap: 26px; }
.rv-mix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rv-k { position: relative; display: grid; gap: 4px; padding: 22px 22px 20px; border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--ring); overflow: hidden; }
.rv-k::before { content: ''; position: absolute; left: 22px; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--k, #93B4D7); box-shadow: 0 0 12px var(--k, #93B4D7); }
.rv-k.card { --k: #93B4D7; } .rv-k.q { --k: #2F8FE0; } .rv-k.topic { --k: #D6E4F3; }
.rv-k b { font: 300 40px/1 var(--font); letter-spacing: -.03em; color: var(--heading); font-variant-numeric: tabular-nums; }
.rv-k span { font-size: 15px; color: var(--heading); }
.rv-k small { font-size: 13px; color: var(--text-3); }
.rv-est { margin: 0; color: var(--text-2); font-size: 15px; }
.rv-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 0; margin-bottom: 28px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 13px; color: var(--text-2); }
.rv-bar .ttl { color: var(--heading); font-weight: 500; }
.rv-track { flex: 1; height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.rv-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #0066B3, #93B4D7); transition: width .5s var(--ease); }
.rv-bar .pos { font: 500 12.5px var(--mono); color: var(--text-3); }
.rv-stage { display: grid; gap: 22px; justify-items: start; animation: enter .3s var(--ease) both; }
.rv-card, .rv-q { width: 100%; border-radius: 24px; padding: 34px 40px 36px; background: var(--glass); box-shadow: var(--ring); }
.rv-card { background-image: radial-gradient(460px 240px at 100% 0%, var(--glow-a), transparent 70%); }
.rv-card header, .rv-q header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-bottom: 22px; }
.rv-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--heading); }
.rv-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--k, #93B4D7); box-shadow: 0 0 10px var(--k, #93B4D7); }
.rv-tag.card { --k: #93B4D7; } .rv-tag.q { --k: #2F8FE0; } .rv-tag.topic { --k: #D6E4F3; }
:root:not([data-theme="dark"]) .rv-tag.topic, :root:not([data-theme="dark"]) .rv-k.topic { --k: #003B6F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rv-tag.topic, :root:not([data-theme="light"]) .rv-k.topic { --k: #D6E4F3; } }
.rv-card h2 { margin: 0; font-weight: 300; font-size: clamp(30px, 3vw, 44px); line-height: 1.1; letter-spacing: -.03em; color: var(--heading); }
.rv-back { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.rv-back p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text); max-width: 60ch; }
.rv-prompt { margin: 16px 0 0; color: var(--text-2); font-size: 15px; }
.rv-open { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--accent); }
.rv-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; border-radius: 16px; overflow: hidden; background: var(--glass); box-shadow: var(--ring); }
.rv-rate.two { grid-template-columns: 1fr 1fr; }
.rv-rate .btn { height: 64px; flex-direction: column; gap: 4px; border-radius: 0; background: transparent; box-shadow: none; font-size: 15px; }
.rv-rate .btn + .btn { box-shadow: inset 1px 0 0 var(--line); }
.rv-rate .btn:hover { background: var(--hover); transform: none; }
.rv-rate .btn.primary { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; box-shadow: none; }
.rv-rate .btn small { font: 400 12.5px var(--font); opacity: .75; }
.rv-rate[hidden], .rv-back[hidden] { display: none !important; }
.rv-keys { margin: 0; font-size: 13px; color: var(--text-3); }
.rv-q .q-text { font-size: 18px; line-height: 1.55; color: var(--heading); margin: 0 0 20px; }
/* Home entry point */
.nw-review { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; margin-bottom: 34px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: inherit; background: var(--glass); background-image: radial-gradient(240px 120px at var(--mx, 85%) var(--my, 0%), var(--glow-a), transparent 70%); box-shadow: var(--ring), inset 0 0 0 1px var(--accent-line); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.nw-review:hover { box-shadow: var(--ring-hover), inset 0 0 0 1px var(--accent-line); transform: translateY(-2px); }
.nw-review .k { grid-column: 1; font-size: 12.5px; color: var(--strong); }
.nw-review strong { grid-column: 1; font-weight: 400; font-size: 20px; letter-spacing: -.01em; color: var(--heading); }
.nw-review .m { grid-column: 1; font-size: 13px; color: var(--text-3); }
.nw-review .arr { grid-column: 2; grid-row: 1 / span 3; color: var(--accent); }
.nw-review:hover .arr { transform: translateX(4px); }
@media (max-width: 900px) {
  .rv-mix { grid-template-columns: 1fr; gap: 10px; }
  .rv-k { grid-template-columns: auto 1fr; column-gap: 16px; padding: 16px 18px; } .rv-k b { grid-row: span 2; font-size: 34px; align-self: center; }
  .rv-card, .rv-q { padding: 24px 20px 26px; border-radius: 20px; }
  .rv-rate .btn { height: 58px; font-size: 14px; }
}

/* =====================================================================
   v1.3 review polish (v0.13). Independent review fixes: no uppercase mono
   micro-labels, one lit primary per screen, glass controls everywhere.
   ===================================================================== */
/* Labels: sentence case in the sans face. Mono stays for literal values only (IDs, keys, times in tables). */
.modes dt, .ms-figure figcaption, .ms-p small span, .pal-results .group, .pal-results a .kind, table.terms th,
.sc-why .rung, .heatgrid .cells a, .legend-inline, .heatgrid .n, .heatgrid .r > a b, .schedule div, .daypick button,
.fc-rate .btn small, .fc-keys, .q-meta, .nw-tile .n, .nw-path small, .clock, .nw-dhero .dnav a b {
  font-family: var(--font); text-transform: none; letter-spacing: 0;
}
.modes dt, .ms-figure figcaption, .ms-p small span, .pal-results .group, table.terms th { font-size: 13px; font-weight: 400; color: var(--text-3); }
.ms-figure figcaption span { color: var(--heading); font-weight: 500; }
.clock { font-size: 12.5px; }
.q-meta, .fc-keys { font-size: 12.5px; font-weight: 400; }
.nw-tile .n, .nw-path small { font-size: 13px; font-weight: 500; }

/* Section kickers carry the same glowing dot as page heads. */
.nw-sec-h .eyebrow, .section-title .eyebrow, .side-col .eyebrow, .ms-sec .eyebrow, .plan-grid .eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--strong); }
.nw-sec-h .eyebrow::before, .section-title .eyebrow::before, .side-col .eyebrow::before, .ms-sec .eyebrow::before, .plan-grid .eyebrow::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #2F8FE0; box-shadow: 0 0 0 3px rgba(47, 143, 224, .16), 0 0 10px #2F8FE0; }

/* Decision ladder: glass rungs with a light-to-deep edge rule; rung 1 is lit. */
.ladder li { position: relative; background: var(--glass) !important; border: 0 !important; box-shadow: var(--ring); color: var(--text) !important; overflow: hidden; }
.ladder li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: color-mix(in srgb, #93B4D7 calc(100% - var(--rung, 0) * 13%), #003B6F); }
.ladder li:nth-child(1) { --rung: 0; background: linear-gradient(180deg, #1A7DCC, #0066B3) !important; box-shadow: var(--glow-btn); color: #fff !important; }
.ladder li:nth-child(1)::before { background: #fff; opacity: .7; }
.ladder li:nth-child(2) { --rung: 1; } .ladder li:nth-child(3) { --rung: 2; } .ladder li:nth-child(4) { --rung: 3; }
.ladder li:nth-child(5) { --rung: 4; } .ladder li:nth-child(6) { --rung: 5; } .ladder li:nth-child(7) { --rung: 6; }
.ladder li:nth-child(1) b, .ladder li:nth-child(1) .n, .ladder li:nth-child(1) p, .ladder li:nth-child(1) small { color: #fff !important; }
.ladder li:nth-child(1) p, .ladder li:nth-child(1) small { opacity: .85; }

/* Analytics mastery map: navy-tinted cells on a blue ramp, rounded, sans. */
.heatgrid .r { border-bottom-color: var(--line); }
.heatgrid .cells { gap: 4px; }
.heatgrid .cells a { height: 28px; border-radius: 8px; font-size: 11px; font-weight: 500; background-color: color-mix(in srgb, #0066B3 10%, var(--track)); }
.heatgrid .cells a:hover { outline: 0; box-shadow: 0 0 0 1.5px var(--accent), 0 0 14px -2px var(--accent); }
.legend-inline { font-size: 12.5px; font-weight: 400; }
.legend-inline i { border-radius: 4px; }

/* Plan: pill day picker, glass schedule tiles, projection as a lit slab. */
.daypick { border: 0; border-radius: 999px; padding: 3px; gap: 2px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: visible; }
.daypick button { border: 0 !important; border-radius: 999px; height: 30px; background: none; font-size: 13px; color: var(--text-2); transition: background-color .2s, color .2s; }
.daypick button:hover { color: var(--heading); background: var(--hover); }
.daypick button[aria-pressed="true"] { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 102, 179, .7); }
.schedule { gap: 6px; }
.schedule div { border: 0; border-radius: 10px; padding: 8px 4px; background: var(--glass); box-shadow: var(--ring); font-size: 11.5px; }
.schedule div.off { background: none; box-shadow: inset 0 0 0 1px var(--line); opacity: .7; }
.schedule div.today { box-shadow: var(--ring), inset 0 0 0 1.5px var(--accent); }
.schedule div.exam { background: linear-gradient(180deg, #1A7DCC, #0066B3); box-shadow: var(--glow-btn); color: #fff; }
.schedule div.exam b { color: #fff; }
.proj { border: 0; border-radius: var(--r-lg); padding: 18px 20px; background: var(--glass); background-image: radial-gradient(320px 140px at 100% 0%, var(--glow-a), transparent 70%); box-shadow: var(--ring); }
.proj.ahead { box-shadow: var(--ring), inset 3px 0 0 var(--accent); }
.proj.behind { box-shadow: var(--ring), inset 3px 0 0 var(--bad); }

/* Scenario chips and answers: pills, and a wrong pick shows as a ring, not a fill. */
.sc-tags span, .sc-tags .tag, .sc-why .rung { border: 0 !important; border-radius: 999px !important; padding: 2px 10px !important; background: var(--accent-soft); color: var(--strong); font-size: 12px; }
.sc-opt.right .sc-why .rung { background: var(--accent); color: var(--accent-ink); }
.sc-opt.wrong, .q-opts button.wrong { background: var(--glass) !important; box-shadow: var(--ring), inset 0 0 0 1.5px var(--bad-line) !important; }

/* Flashcards: tinted back in light, glass rating pills, hint aligned left. */
:root:not([data-theme="dark"]) .ed-cards .fc-back { background: linear-gradient(180deg, #F3F8FD, #E6EFF9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ed-cards .fc-back { background: var(--surface); } }
.fc-rate { gap: 10px; }
.fc-rate .btn { border-radius: 14px; }
.fc-rate .btn:not(.primary) { border: 0; background: var(--glass); box-shadow: var(--ring); }
.fc-rate .btn:not(.primary):hover { box-shadow: var(--ring-hover); }
.fc-rate .btn.r0, .fc-rate .btn.r0 span, .ed-cards .fc-rate .btn.r0 { color: var(--text-2); }
.fc-keys { justify-content: flex-start; }


/* Palette: icon column, kind as trailing muted text. */
.pal-results a { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; border-radius: 10px; }
.pal-results a .kind { display: grid; place-items: center; width: 22px; height: 22px; color: var(--text-3); }
.pal-results a .kind .ico, .pal-results a .kind svg { margin: 0; }
.pal-results a .kind-t { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pal-results a[aria-selected="true"] .kind-t { color: var(--accent); }
.pal-results .group { padding: 12px 10px 4px; }

/* Map: pill domain switcher matching .seg. */
.map-dtabs { border: 0; border-radius: 999px; padding: 3px; gap: 2px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); overflow: visible; }
.map-dtabs a { border: 0 !important; border-radius: 999px; height: 28px; min-width: 30px; }
.map-dtabs a:hover { background: var(--hover); }
.map-dtabs a.on { background: linear-gradient(180deg, #1A7DCC, #0066B3); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 102, 179, .7); }

/* Fields and native selects: glass pills with a lit focus ring. */
.field, select.field, .ed-select, .setup select, .map-select select { border: 0; border-radius: 12px; height: 38px; padding: 0 14px; background-color: var(--glass-hi); box-shadow: var(--ring); color: var(--text); }
select.field, .ed-select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2393B4D7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field:focus, .field:focus-visible, select.field:focus-visible, .ed-select:focus-visible { box-shadow: var(--ring), 0 0 0 1.5px var(--accent), 0 0 0 5px var(--accent-soft); }
textarea.field { height: auto; padding: 10px 14px; }
.btn.danger { border: 0; box-shadow: var(--ring), inset 0 0 0 1px var(--bad-line); color: var(--bad); }
.btn.danger:hover { box-shadow: var(--ring), inset 0 0 0 1.5px var(--bad); }
.ext-link { white-space: nowrap; }

/* Recommended option leads the grid; the others recede. */
.modes { grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); }
.modes > div.rec { padding: 28px; }
.modes > div.rec h3 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.modes > div:not(.rec) { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.modes > div:not(.rec):hover { background: var(--glass); box-shadow: var(--ring-hover); }
@media (max-width: 900px) { .modes { grid-template-columns: 1fr; } }

/* Domain hero: a compact title row on sub-tabs. */
.nw-dhero.compact { padding-bottom: 18px; }
.nw-dhero.compact .nw-dhero-grid { grid-template-columns: 1fr; }
.nw-dhero.compact .nw-dart, .nw-dhero.compact .nw-sub, .nw-dhero.compact .nw-actions { display: none; }
.nw-dhero.compact .nw-display { font-size: clamp(28px, 2.8vw, 38px); max-width: none; margin-top: 10px; }

/* Empty states with domain line art. */
.empty-state.es-lit .es-art { display: block; width: 120px; height: 120px; margin-bottom: 18px; }
.empty-state.es-lit .es-art svg { width: 100%; height: 100%; color: inherit; margin: 0; }

/* Home phone: keep numbers whole, drop the unreadable mini map, keep the bar. */
.nw-cell b { white-space: nowrap; }
@media (max-width: 760px) {
  .nw-om { display: none; }
  .nw-tile p { text-wrap: balance; }
  .nw-dhero .dnav, .tabs { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
}
.pal-results a > span:nth-child(2) { min-width: 0; }
.set-field .lbl, .setup .lbl { font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--text-2); }
/* Release line: copyright, version and build stamp (tools/stamp-build.js). */
.foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
body:not([data-view="home"]) .foot-meta { border-top: 0; padding-top: 4px; }
