:root {
  --bg: #07080d; --bg2: #0d0f17; --panel: #10131d; --line: #1f2433; --ink: #e8ebf3; --dim: #8a91a6;
  --violet: #9d8cff; --gold: #f2c35b; --teal: #43d1b0; --coral: #ff7a59; --blue: #5aa9ff; --red: #ff5a6e;
  --good: #43d1b0; --bad: #ff5a6e; --warn: #f2c35b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: radial-gradient(1200px 700px at 70% -10%, #161a33 0%, var(--bg) 60%) fixed, var(--bg); color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif; }
main { max-width: 1280px; margin: 0 auto; padding: 0 16px 80px; }
h2 { font-size: 28px; letter-spacing: -0.02em; margin: 56px 0 6px; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 600; }
h3.sub { margin: 28px 0 8px; font-size: 18px; }
.lead { color: var(--dim); max-width: 880px; margin: 0 0 16px; }
.dim { color: var(--dim); } .small { font-size: 13px; } .mono { font-family: "Cascadia Mono", Consolas, monospace; }
#bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: rgba(7, 8, 13, 0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand b { font-size: 18px; margin-right: 12px; letter-spacing: -0.01em; }
#vitals { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.vital { display: flex; align-items: center; gap: 6px; }
.vital i { display: inline-block; width: 54px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.vital i b { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold), var(--coral)); }
#toc { position: sticky; top: 49px; z-index: 19; display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; background: rgba(7, 8, 13, 0.7);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); scrollbar-width: none; }
#toc a { color: var(--dim); text-decoration: none; font-size: 13px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
#toc a:hover { color: var(--ink); background: var(--panel); }
.panel { background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)) , var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: relative; overflow: hidden; }
.card.live { border-color: rgba(157, 140, 255, 0.5); box-shadow: 0 0 0 1px rgba(157,140,255,0.15), 0 10px 40px -20px var(--violet); }
.card h3 { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h3 .pill { flex-shrink: 0; line-height: 18px; margin-top: 1px; }
.pill { font-size: 12px; border-radius: 99px; padding: 1px 9px; border: 1px solid currentColor; white-space: nowrap; font-weight: 500; }
.pill.live { color: var(--violet); } .pill.good { color: var(--good); } .pill.bad { color: var(--bad); } .pill.warn { color: var(--warn); } .pill.muted { color: var(--dim); }
.pill.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { opacity: 0.2; } }
.progress { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 10px 0 6px; }
.progress b { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--blue)); transition: width 1s; }
.kv { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--dim); }
.kv b { color: var(--ink); font-weight: 600; }
.tail { margin-top: 8px; font-size: 12px; color: var(--dim); white-space: pre-wrap; word-break: break-word; max-height: 4.8em; overflow: hidden; }
#queue:empty { display: none; }
.row { display: grid; grid-template-columns: 1fr 320px; gap: 14px; }
.view { position: relative; height: 520px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(800px 500px at 50% 40%, #121733 0%, #07080d 75%); margin-bottom: 14px; }
.view.tall { height: 640px; margin: 0; }
.view canvas.gl { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.view canvas.gl:active { cursor: grabbing; }
.gl-labels { position: absolute; inset: 0; pointer-events: none; }
.gl-label { position: absolute; left: 0; top: 0; font-size: 11px; color: var(--dim); white-space: nowrap; margin: -7px 0 0 8px; text-shadow: 0 0 4px #000; }
.gl-label.big { font-size: 13px; color: var(--ink); font-weight: 600; }
.gl-label.gold { color: var(--gold); } .gl-label.violet { color: var(--violet); } .gl-label.teal { color: var(--teal); }
.gl-tip { position: absolute; display: none; pointer-events: none; background: rgba(10, 12, 20, 0.92); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 9px; font-size: 12px; max-width: 220px; white-space: pre-line; }
.gl-off::after { content: "3D needs WebGL, which this browser has switched off."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.side { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; }
.controls input { accent-color: var(--violet); }
canvas.chart { width: 100%; display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2.wide { grid-template-columns: 1.4fr 1fr; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.legendbar { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-top: 6px; }
.att { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.att figure { margin: 0; } .att canvas { width: 100%; border-radius: 6px; image-rendering: pixelated; }
.att figcaption { font-size: 12px; color: var(--dim); margin-top: 4px; }
.mathgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.mathcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.mathcard h3 { color: var(--gold); }
.mathcard math { font-size: 17px; display: block math; scrollbar-width: thin; scrollbar-color: #2a3046 transparent; margin: 12px 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.mathcard p { color: var(--dim); font-size: 14px; margin: 6px 0; }
.mathcard .now { color: var(--ink); font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; }
.mathcard .now b { color: var(--teal); }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line); }
#tree > ul { padding-left: 0; border: 0; }
.node { position: relative; padding: 6px 0 6px 14px; }
.node::before { content: ""; position: absolute; left: -1px; top: 15px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%); background: var(--dim); }
#tree > ul > li > .node::before { left: 4px; }
.node.done::before { background: var(--teal); } .node.won::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.node.failed::before { background: var(--red); } .node.active::before { background: var(--violet); box-shadow: 0 0 10px var(--violet); animation: pulse 1.3s infinite; }
.node.next::before { background: transparent; border: 1px solid var(--blue); } .node.parked::before { background: transparent; border: 1px dashed var(--dim); }
.node b { font-weight: 600; } .node .when { color: var(--dim); font-size: 12px; margin-left: 8px; }
.node p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
ol.left { margin: 0; padding-left: 20px; } ol.left li { margin: 0 0 8px; } ol.left li span.d { color: var(--dim); font-size: 13px; display: block; } ol.left .pill { margin-left: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; } td, th { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; vertical-align: top; }
th { color: var(--dim); font-weight: 500; }
.journal { display: grid; gap: 10px; }
.entry { display: grid; grid-template-columns: 120px 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.entry time { color: var(--dim); font-size: 13px; } .entry b { display: block; }
.entry p { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.entry .kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.kind.result { color: var(--teal); } .kind.problem { color: var(--red); } .kind.decision { color: var(--violet); } .kind.finding { color: var(--gold); } .kind.measure { color: var(--blue); }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.clip { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg2); }
.clip .tag { font-size: 12px; color: var(--dim); margin-top: 6px; }
audio { width: 100%; height: 32px; margin-top: 4px; }
details.test { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
details.test summary { cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
footer { margin-top: 40px; text-align: center; }
@media (max-width: 980px) { .row, .grid2, .grid2.wide, .grid3 { grid-template-columns: 1fr; } .att { grid-template-columns: 1fr 1fr; } .view.tall { height: 480px; } }
@media (max-width: 600px) { h2 { font-size: 22px; } .view { height: 380px; } .entry { grid-template-columns: 1fr; } .att { grid-template-columns: 1fr; } }

/* ---- v3: explanations, introduction, health, guides, maths, map */
#xtip { position: fixed; z-index: 100; display: none; max-width: 380px; background: rgba(12, 14, 24, 0.97); border: 1px solid #343b55; border-radius: 12px;
  padding: 12px 14px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 18px 50px -12px rgba(0,0,0,0.8); pointer-events: none; }
#xtip b { display: block; font-size: 14.5px; margin-bottom: 4px; color: var(--ink); }
#xtip p { margin: 0 0 6px; color: #c7cbe0; }
#xtip .xh { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-top: 6px; }
#xtip .num { color: var(--teal); font-weight: 600; }
[data-x] { cursor: help; }
h2[data-x], h3[data-x], label[data-x] { text-decoration: underline dotted rgba(255,255,255,0.25); text-underline-offset: 5px; }
.hero h1 { font-size: 40px; letter-spacing: -0.03em; margin: 40px 0 8px; background: linear-gradient(90deg, #fff, #c9c1ff 60%, #8fe3cf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 16.5px; max-width: 980px; }
.h2in { margin: 0 0 8px; font-size: 20px; }
#pipe { width: 100%; height: auto; display: block; }
#pipe .blk rect { fill: #121628; stroke: #2b3150; stroke-width: 1.5; rx: 14; transition: stroke 0.2s; }
#pipe .blk:hover rect { stroke: var(--gold); }
#pipe .blk.hot rect { stroke: var(--violet); stroke-width: 2.5; filter: drop-shadow(0 0 10px rgba(157,140,255,0.55)); }
#pipe .blk.ghost rect { stroke-dasharray: 6 5; fill: #0d1020; }
#pipe text { fill: var(--ink); font: 600 15px "Segoe UI", sans-serif; } #pipe text.sub { fill: var(--dim); font: 12px "Segoe UI", sans-serif; }
#pipe .flow { fill: none; stroke: #3a4270; stroke-width: 2; }
#pipe .flow.live { stroke: url(#flowGrad); stroke-dasharray: 8 10; animation: flow 1.2s linear infinite; }
#pipe .teach { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 3 6; opacity: 0.8; animation: flow 2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.step b { color: var(--gold); } .step p { margin: 6px 0 0; color: var(--dim); font-size: 14px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.check { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--dim); border-radius: 12px; padding: 12px 14px; }
.check.ok { border-left-color: var(--good); } .check.warn { border-left-color: var(--warn); } .check.bad { border-left-color: var(--bad); }
.check b { display: block; } .check span { color: var(--dim); font-size: 13.5px; }
.check .v { float: right; font-size: 12px; font-weight: 600; } .check.ok .v { color: var(--good); } .check.warn .v { color: var(--warn); } .check.bad .v { color: var(--bad); }
#healthPill .pill { margin-left: 10px; }
.brand .by { color: var(--dim); font-size: 13px; margin-left: 10px; } .brand .by a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--dim); }
.badge { display: inline-block; margin-left: 10px; font-size: 12px; border-radius: 99px; padding: 1px 9px; border: 1px solid currentColor; white-space: nowrap; }
.badge.live { color: var(--good); } .badge.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: pulse 1.3s infinite; }
.badge.paused { color: var(--warn); } .badge.wait { color: var(--dim); }
.paused-note { background: rgba(242, 195, 91, 0.1); border-bottom: 1px solid rgba(242, 195, 91, 0.35); color: #e8d9b0; font-size: 14px; padding: 8px 20px; text-align: center; }
.view .guide { position: absolute; left: 14px; top: 12px; max-width: 300px; background: rgba(8, 10, 20, 0.78); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 12.5px; z-index: 2; pointer-events: auto; }
.view .guide ol { margin: 6px 0; padding-left: 18px; color: #c7cbe0; } .view .guide li { margin: 2px 0; }
.legendbar .orange { color: var(--coral); } .legendbar .blue { color: var(--blue); }
.mathcard .oneline { color: var(--ink); font-size: 15px; margin: 4px 0 6px; }
.mathcard .like { color: #c7cbe0; font-size: 14px; background: rgba(242,195,91,0.07); border-left: 3px solid var(--gold); padding: 6px 10px; border-radius: 6px; }
.mathcard .syms { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; margin-top: 8px; }
.mathcard .syms dt { color: var(--violet); font-family: "Cambria Math", serif; } .mathcard .syms dd { margin: 0; color: var(--dim); }
.mathcard math [data-x]:hover { color: var(--gold); }
.algos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.algo { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.algo h4 { margin: 0 0 8px; color: var(--teal); font-size: 15px; }
.algo ol { margin: 0; padding-left: 0; list-style: none; counter-reset: s; }
.algo li { counter-increment: s; position: relative; padding: 6px 0 6px 36px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.algo li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: #1b2140; color: var(--teal);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.algo li i { color: var(--dim); display: block; font-size: 12.5px; font-style: normal; }
.algo .cost { margin-top: 8px; font-size: 12.5px; color: var(--gold); }
.maptools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.maptools button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; cursor: pointer; font-size: 14px; }
.maptools .legend { font-size: 13px; color: var(--dim); margin-left: 8px; }
.st { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: middle; }
.st.done { background: var(--teal); } .st.won { background: var(--gold); } .st.failed { background: var(--red); } .st.active { background: var(--violet); }
.st.next { border: 1px solid var(--blue); } .st.parked { border: 1px dashed var(--dim); }
.maptools button.primary { border-color: var(--gold); color: var(--gold); }
.mapsum { margin: 4px 0 12px; }
.sumbar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; margin-bottom: 10px; } .sumbar i { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: #4a5180; } .chip.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.chip .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; } .chip b { margin-right: 3px; }
.mapwrap { position: relative; padding: 0; overflow: hidden; margin-bottom: 16px; }
#mapSvg { width: 100%; height: 640px; display: block; cursor: grab; touch-action: none; user-select: none; }
#mapSvg .mn { cursor: pointer; transition: opacity 0.35s; }
#mapSvg .mn > rect { stroke-width: 1.5; } #mapSvg .mn:hover > rect { stroke: var(--gold) !important; } #mapSvg .mn.sel > rect { stroke: #fff !important; stroke-width: 2.5; }
#mapSvg .mn.now > rect { animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px var(--violet)); } }
#mapSvg text { font: 600 13px "Segoe UI", sans-serif; fill: var(--ink); pointer-events: none; } #mapSvg text.sub { font: 11.5px "Segoe UI", sans-serif; fill: var(--dim); }
#mapSvg text.gl { font: 700 11px "Segoe UI Symbol", "Segoe UI", sans-serif; }
#mapSvg .edge { fill: none; stroke: #39406a; stroke-width: 1.6; transition: opacity 0.35s, stroke 0.2s; } #mapSvg .spine { stroke-dasharray: 4 5; }
#mapSvg .edge.live { stroke: var(--violet); stroke-dasharray: 6 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }
#mapSvg .tog { cursor: pointer; } #mapSvg .tog circle { fill: #1b2140; stroke: #4a5180; } #mapSvg .tog:hover circle { stroke: var(--gold); }
#mapSvg .tog text { font: 700 11px "Segoe UI", sans-serif; }
#mapSvg.focus .mn:not(.hl), #mapSvg.focus .edge:not(.hl) { opacity: 0.25; } #mapSvg.focus .edge.hl { stroke: var(--gold); stroke-width: 2.2; }
#mapSvg.filtering .mn:not(.match) { opacity: 0.14; } #mapSvg.filtering .edge { opacity: 0.25; }
#mapSvg.replay .mn:not(.shown), #mapSvg.replay .edge:not(.shown) { opacity: 0.04; }
#mapSvg.replay .mn.cur > rect { stroke: #fff !important; stroke-width: 2.5; filter: drop-shadow(0 0 10px var(--gold)); }
.mapdetail { position: absolute; top: 12px; right: 12px; width: 360px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; display: none;
  background: rgba(12, 14, 26, 0.97); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); }
.mapdetail.on { display: block; }
.mapdetail .x { position: absolute; top: 6px; right: 10px; background: none; border: 0; color: var(--dim); font-size: 22px; cursor: pointer; }
.mapdetail .crumb { font-size: 12px; color: var(--dim); margin-bottom: 4px; padding-right: 22px; }
.mapdetail h3 { color: var(--gold); margin: 0 0 4px; padding-right: 22px; } .mapdetail p { color: #c7cbe0; font-size: 14px; margin: 6px 0; } .mapdetail .stat { font-weight: 600; }
.mapdetail ul { list-style: none; padding: 0; margin: 4px 0; } .mapdetail li { padding: 4px 0; cursor: pointer; font-size: 14px; } .mapdetail li:hover { color: var(--gold); }
.mapcap { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(680px, calc(100% - 32px)); z-index: 30; display: none; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); background: rgba(12, 14, 26, 0.96);
  border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: #c7cbe0; }
.mapcap.on { display: block; } .mapcap b { color: var(--gold); }
#timeline { width: 100%; height: auto; display: block; }
#timeline circle { cursor: help; } #timeline text { fill: var(--dim); font: 11px "Segoe UI", sans-serif; }
#pathStats { margin: -4px 0 10px; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 30px; } .view .guide { max-width: 220px; font-size: 11.5px; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } .view .guide { display: none; } }
.mathcard math + math { margin-top: -6px; }
#clock { margin-left: 10px; }

.goalhero { padding: 28px 0 8px; } .goalhero h1 { font-size: 46px; line-height: 1.08; margin: 6px 0 12px; }
.goalhero .eyebrow { color: var(--gold); font-size: 14px; letter-spacing: 0.02em; }
.goalboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 8px; }
.goal { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--dim); border-radius: 14px; padding: 14px 16px; }
.goal.done { border-top-color: var(--good); } .goal.active { border-top-color: var(--violet); } .goal.next { border-top-color: var(--warn); }
.goal .gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .goal .gnow { font-size: 20px; font-weight: 600; margin: 8px 0; }
.goal p { color: var(--dim); font-size: 13.5px; margin: 8px 0 0; }
.meter { position: relative; height: 12px; background: #1b2140; border-radius: 99px; margin: 22px 0 6px; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--teal)); }
.meter .mk { position: absolute; top: -18px; transform: translateX(-50%); font-size: 11px; color: var(--gold); white-space: nowrap; }
.meter .mk::after { content: ""; position: absolute; left: 50%; top: 16px; width: 2px; height: 16px; background: var(--gold); }
.meter .mk.r5 { top: 16px; color: var(--teal); } .meter .mk.r5::after { top: -14px; background: var(--teal); }
.minibars { margin: 8px 0 0; } .minibars div { display: grid; grid-template-columns: 90px 1fr 48px; align-items: center; gap: 8px; font-size: 13px; margin: 3px 0; }
.minibars i { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--teal)); } .minibars b { text-align: right; }
.minibars .small { display: block; margin-top: 2px; }
#modelCard .mtype { color: #c7cbe0; } table.versions tr.cur td { color: var(--gold); }
.sources ul { columns: 2; column-gap: 28px; padding-left: 18px; } .sources li { break-inside: avoid; margin: 0 0 6px; }
table.seals td.mono { font-size: 12px; }
@media (max-width: 980px) { .goalboard { grid-template-columns: 1fr 1fr; } .goalhero h1 { font-size: 34px; } }
@media (max-width: 600px) { .goalboard { grid-template-columns: 1fr; } .sources ul { columns: 1; } }
.meter .mk.r5 { font-size: 0; } .meter { margin-bottom: 10px; }
main a, footer a { color: var(--teal); text-decoration: none; border-bottom: 1px dotted currentColor; } main a:hover, footer a:hover { color: var(--gold); }

/* comments */
.cbar { display: inline-flex; gap: 6px; margin-left: 12px; }
.cbar button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 1px 11px; font-size: 12.5px; cursor: pointer; }
.cbar button:hover { border-color: var(--gold); } .cbar #cCount { color: var(--gold); margin-left: 3px; }
body.c-mode #cMode { border-color: var(--gold); color: var(--gold); }
body.c-mode main [data-x]:hover, body.c-mode main canvas:hover, body.c-mode .entry:hover { outline: 2px dashed var(--gold); outline-offset: 2px; cursor: crosshair; }
body.c-mode #mapSvg .mn:hover > rect { stroke: var(--gold) !important; stroke-width: 3; }
#cHint { position: fixed; left: 50%; top: 104px; transform: translateX(-50%); z-index: 40; background: rgba(12, 14, 26, 0.97); border: 1px solid var(--gold); border-radius: 99px; padding: 6px 8px 6px 16px; font-size: 14px; color: #e8d9b0; }
#cHint button, .cbf button, .cph button { background: var(--panel); color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; padding: 2px 12px; cursor: pointer; margin-left: 8px; }
#cBox { position: fixed; z-index: 45; width: min(380px, calc(100% - 24px)); background: rgba(12, 14, 26, 0.98); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
#cBox .cbh { font-size: 13.5px; margin-bottom: 8px; padding-right: 26px; position: relative; } #cBox .cbh b { color: var(--gold); }
#cBox .cbh button { position: absolute; right: -4px; top: -6px; background: none; border: 0; color: var(--dim); font-size: 20px; cursor: pointer; margin: 0; padding: 0 4px; }
#cBox input, #cBox textarea { width: 100%; box-sizing: border-box; background: #0c0f1c; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 14px; margin-bottom: 8px; }
#cBox textarea { min-height: 96px; resize: vertical; } .c-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.cbf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#cPanel { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100%); z-index: 42; background: rgba(10, 12, 22, 0.98); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px; box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5); }
.cph { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } .cph #cClose { margin-left: auto; color: var(--dim); border-color: var(--line); }
#cPanel h4 { color: var(--gold); margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.cwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; cursor: pointer; } .cwrap:hover { border-color: #4a5180; }
.cabout { font-size: 12px; color: var(--dim); } .cmh { font-size: 13px; margin-top: 2px; } .cmh span, .cmr span { color: var(--dim); font-size: 12px; }
.cmt { white-space: pre-wrap; font-size: 14px; color: #d8dbea; margin-top: 3px; word-wrap: break-word; }
.cmr { border-left: 3px solid var(--gold); margin-top: 8px; padding-left: 9px; } .cmr b { color: var(--gold); font-size: 13px; }
.c-host { position: relative; }
.cmark { position: absolute; top: -9px; right: -9px; z-index: 5; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; border: 1px solid var(--gold); background: #1a1730; color: var(--gold); font: 600 12px "Segoe UI", sans-serif; cursor: pointer; }
.ccount { margin-left: 10px; vertical-align: middle; font-size: 12px; background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 99px; padding: 1px 8px; cursor: pointer; }
.c-flash { animation: cflash 1.6s ease-out; } @keyframes cflash { 0%, 40% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 600px) { #cHint { top: auto; bottom: 16px; width: calc(100% - 32px); border-radius: 12px; } }
@media (max-width: 600px) { #bar { position: static; } #vitals { gap: 4px 12px; font-size: 11.5px; } .vital i { width: 34px; } .goalhero h1 { font-size: 30px; } }

/* learning views */
.tourbtn { background: var(--panel); color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; padding: 6px 16px; font-size: 14px; cursor: pointer; }
#tourBox { position: fixed; z-index: 50; border: 2px solid var(--gold); border-radius: 16px; box-shadow: 0 0 0 9999px rgba(4, 5, 10, 0.55); pointer-events: none; transition: all 0.35s; }
#tourCard { position: fixed; z-index: 51; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(520px, calc(100% - 32px)); background: rgba(12, 14, 26, 0.98); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 16px; }
#tourCard .tc { color: var(--gold); font-size: 12px; } #tourCard p { margin: 6px 0 10px; color: #e3e6f3; }
#tourCard .tb { display: flex; gap: 8px; justify-content: flex-end; } #tourCard button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 3px 14px; cursor: pointer; }
#tourCard button[data-t="1"] { border-color: var(--gold); color: var(--gold); }
#stepSvg { width: 100%; height: auto; display: block; } #stepSvg .sn rect { fill: #121628; stroke: #39406a; stroke-width: 1.5; transition: stroke 0.3s, fill 0.3s; }
#stepSvg .sn.on rect { stroke: var(--gold); fill: #1d1a33; } #stepSvg text.t { fill: var(--gold); font: 700 22px "Segoe UI", sans-serif; }
#stepSvg text.sub { fill: var(--dim); font: 13px "Segoe UI", sans-serif; } #stepSvg .sl { color: var(--ink); font: 600 13px/1.25 "Segoe UI", sans-serif; text-align: center; }
#stepDot { fill: var(--gold); filter: drop-shadow(0 0 8px var(--gold)); } .stepcap { min-height: 44px; color: #c7cbe0; } .stepcap .num { color: var(--teal); }
.archmap { display: flex; gap: 4px; height: 360px; padding: 10px; } .archcol { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.archhead { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; }
.archu { border-radius: 4px; min-height: 3px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: help; }
.archu span { font: 10px "Segoe UI", sans-serif; color: rgba(255, 255, 255, 0.85); text-shadow: 0 0 3px #000; white-space: nowrap; }
.hearlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); gap: 14px; }
.hearrow { display: grid; grid-template-columns: 34px 170px 1fr; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; color: var(--dim); }
.hearrow canvas { width: 100%; height: 96px; border-radius: 6px; background: #0d0823; }
.hearrow .play { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--gold); background: none; color: var(--gold); cursor: pointer; }
#tmSlider { width: min(720px, 100%); accent-color: var(--gold); } #tmBanner button { margin-left: 10px; background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 99px; padding: 1px 10px; cursor: pointer; }
.hbar { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.hbar i { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--violet), var(--teal)); } .hbar b { text-align: right; }
.hbar em { grid-column: 2 / 4; font-style: normal; color: var(--dim); font-size: 12px; margin-top: -4px; }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; } .hist div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.hist i { display: block; width: 100%; background: linear-gradient(0deg, var(--violet), var(--teal)); border-radius: 4px 4px 0 0; min-height: 2px; } .hist span { font-size: 10.5px; color: var(--dim); margin-top: 4px; white-space: nowrap; }
#glossaryFind { width: min(480px, 100%); background: #0c0f1c; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; margin-bottom: 10px; }
.glossary { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 6px 16px; margin: 0; max-height: 520px; overflow-y: auto; }
.glossary dt { color: var(--gold); font-weight: 600; } .glossary dd { margin: 0; color: #c7cbe0; font-size: 14px; }
@media (max-width: 600px) { .hearrow { grid-template-columns: 34px 1fr; } .hearrow canvas { grid-column: 1 / 3; } .archmap { height: 260px; } .glossary { grid-template-columns: 1fr; } }
details.test.blind .answer { display: none; } details.test.blind.revealed .answer { display: inline; } details.test.blind.revealed p.answer { display: block; }
button.pick { margin-top: 6px; background: var(--panel); color: var(--gold); border: 1px solid var(--gold); border-radius: 99px; padding: 2px 12px; cursor: pointer; font-size: 12.5px; }
button.pick:disabled { opacity: 0.5; cursor: default; } button.pick.chosen { opacity: 1; background: rgba(242, 195, 91, 0.15); }
