:root {
  color-scheme: dark;
  --bg: #0E1016; --ink: #E8EAF0; --dim: #6B7280; --muted: #A6AEBD;
  --energy: #FFB020; --memory: #4FD1C5; --want: #C084FC; --hit: #4ADE80; --miss: #FF5C7A;
  --card: #161A24; --card2: #1C2130; --line: #2B3140;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, label { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, .button { border: 1px solid var(--line); border-radius: 10px; background: #212735; color: var(--ink); padding: 10px 16px; min-height: 44px; }
button:hover:not(:disabled), .button:hover { border-color: var(--energy); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.primary, .button.primary { background: var(--energy); border-color: var(--energy); color: #16110A; font-weight: 750; }
.primary:hover:not(:disabled), .button.primary:hover { background: #FFC24F; }
.quiet { background: transparent; color: var(--muted); }
.text-link { color: var(--energy); text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--energy); outline-offset: 3px; }
input[type=range] { accent-color: var(--energy); width: 100%; min-height: 36px; }
input[type=radio], input[type=checkbox] { accent-color: var(--energy); width: 19px; height: 19px; flex-shrink: 0; margin: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.03em; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 800; margin-bottom: 10px; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { color: var(--muted); }
.dim { color: var(--dim); }
.success { color: var(--hit); } .failure { color: var(--miss); }

/* ---------- frame */
.site-header { max-width: 1240px; margin: auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.brand { display: flex; gap: 10px; align-items: center; font-size: .88rem; font-weight: 800; letter-spacing: .09em; line-height: 1.3; }
.brand img { border-radius: 9px; }
.brand-sub { display: block; color: var(--muted); font-size: .75rem; letter-spacing: .26em; margin-top: 3px; }
nav { display: flex; align-items: center; gap: 22px; font-size: .86rem; }
nav a:hover { color: var(--energy); }
.video-link { color: var(--muted); }
main { max-width: 1180px; margin: auto; padding: 0 20px; min-height: 70vh; }
main:focus, h1[tabindex="-1"]:focus { outline: none; }
footer { max-width: 1180px; margin: 60px auto 0; padding: 24px 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.skip { position: fixed; top: -100px; left: 10px; z-index: 10; background: var(--energy); color: var(--bg); padding: 12px; }
.skip:focus { top: 10px; }
.eyebrow { color: var(--energy); text-transform: uppercase; font-size: .75rem; font-weight: 750; letter-spacing: .15em; margin-bottom: 8px; }
.badge { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #394235; border-radius: 30px; padding: 5px 12px; color: var(--hit); font-size: .75rem; }
.badge:before { content: ""; width: 6px; height: 6px; background: var(--hit); border-radius: 50%; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--muted); padding: 18px 0 6px; }
.breadcrumb a { color: var(--energy); }
.empty { padding: 70px 0; max-width: 620px; }

/* ---------- home */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px; padding: 52px 0 34px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); margin: 16px 0; }
.hero h1 em { color: var(--energy); font-style: normal; }
.hero p { max-width: 480px; font-size: 1.04rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 22px; }
.hero-art { background: radial-gradient(ellipse at center, #27251C66, transparent 70%); }
.hero-svg { width: 100%; max-height: 300px; display: block; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head h2 { margin: 0 0 6px; }
.sec-head p { margin: 0; max-width: 620px; }
.fast, .plan, .roadmap { border-top: 1px solid var(--line); padding: 34px 0 10px; }
.fast-progress { font-size: .85rem; color: var(--muted); min-width: 220px; }
.fast-progress strong { color: var(--ink); }
.bar, .op-bar { height: 8px; background: #252B3A; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar span, .op-bar span { display: block; height: 100%; background: var(--energy); border-radius: 6px; transition: width .4s; }
.fast-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.stop { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-height: 108px; }
a.stop:hover { border-color: var(--energy); }
.stop .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: #252B3A; }
.stop .t { font-weight: 700; line-height: 1.25; }
.stop .s { font-size: .75rem; color: var(--muted); }
.fast-list .done .num { background: var(--hit); color: #0B1A10; }
.fast-list .here .stop { border-color: var(--energy); box-shadow: 0 0 0 1px var(--energy) inset; }
.fast-list .here .num { background: var(--energy); color: #16110A; }
.fast-list .soon .stop { opacity: .55; border-style: dashed; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; }
.seg button[aria-pressed=true] { background: var(--energy); color: #16110A; font-weight: 750; }
.days { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.days > li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.days ul { list-style: none; margin: 6px 0 0; padding: 0; }
.day { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--energy); font-weight: 750; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); padding: 4px 0; cursor: pointer; }
.check input { margin-top: 3px; }
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .75rem; }
.rm-section { margin: 22px 0 30px; }
.rm-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.rm-head h3 { margin: 2px 0 2px; }
.rm-head p { margin: 0; font-size: .88rem; }
.rm-num { font-weight: 800; color: var(--energy); font-size: .9rem; padding-top: 3px; }
.node-grid, .lab-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.node-card { display: flex; flex-direction: column; gap: 6px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-height: 132px; }
a.node-card:hover { border-color: var(--energy); transform: translateY(-1px); }
.node-card.soon { border-style: dashed; background: transparent; }
.node-card.soon .node-title, .node-card.soon .node-sum { opacity: .6; }
.node-card.done { border-color: #2F5A3C; }
.node-title { font-weight: 700; }
.node-sum { font-size: .82rem; color: var(--muted); flex: 1; }
.node-foot { display: flex; justify-content: space-between; gap: 10px; font-size: .75rem; color: var(--muted); }
.status.done { color: var(--hit); } .status.started { color: var(--energy); } .status.new { color: var(--muted); } .status.soon { color: var(--dim); }
.labs-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px; margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(120deg, #1A1E2A, #151820); flex-wrap: wrap; }
.labs-banner h2 { margin: 0 0 6px; } .labs-banner p { margin: 0; }
.reset-wrap { margin: 26px 0; font-size: .8rem; color: var(--muted); }

/* ---------- lesson page */
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 30px; align-items: start; padding-top: 6px; }
.lesson-main { min-width: 0; order: 1; }
.lesson > *, .scene, .controls, .metrics { min-width: 0; max-width: 100%; }
.on-page { order: 2; position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.op-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.op-head .eyebrow { margin: 0; }
.op-count { font-size: .75rem; color: var(--muted); }
.op-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.op-steps button { display: flex; gap: 10px; align-items: center; justify-content: flex-start; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px; min-height: 40px; color: var(--muted); font-size: .84rem; line-height: 1.25; }
.op-steps button:hover { background: #222838; color: var(--ink); }
.op-steps button[aria-current=step] { background: #262B38; color: var(--ink); font-weight: 650; }
.op-n { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: #262C3A; color: var(--muted); font-weight: 750; }
.op-steps button[aria-current=step] .op-n { background: var(--energy); color: #16110A; }
.op-steps button.tried .op-n { background: var(--hit); color: #0B1A10; }
.op-links { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; font-size: .82rem; }
.op-links:empty { display: none; }
.small-line { margin: 0; font-size: .82rem; }
.step-text { font-size: 1.05rem; color: var(--ink); max-width: 760px; margin-bottom: 10px; }
.step-text strong { color: var(--energy); }
.analogy { font-size: .9rem; border-left: 3px solid var(--want); padding: 4px 0 4px 12px; max-width: 720px; margin: 0 0 12px; }
.analogy span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: var(--want); font-weight: 750; }
.player-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
#step-position { font-size: .8rem; color: var(--muted); }
.keyboard-note { font-size: .75rem; color: var(--dim); margin-top: 12px; }

/* ---------- the scene card */
.scene { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-top: 6px; }
.viz { background: radial-gradient(ellipse at 50% 40%, #1E2333, #121520 75%); border-radius: 12px; padding: 4px; min-height: 120px; }
.flow { display: block; width: 100%; max-width: 640px; margin: auto; height: auto; overflow: visible; }
.flow .link { stroke: #3A4254; stroke-width: 3; stroke-linecap: round; }
.flow .link.cut { stroke: var(--miss); stroke-dasharray: 6 7; }
.flow .link.hot { stroke: var(--energy); }
.flow .link.faint { stroke: #262C3A; stroke-width: 2; stroke-dasharray: 2 7; }
.flow .lbl { fill: var(--ink); font-size: max(16px, calc(12px * var(--k, 0))); font-weight: 650; }
.flow .lbl.bad, .flow .small.bad { fill: var(--miss); }
.flow .small { fill: var(--muted); font-size: max(13px, calc(12px * var(--k, 0))); }
.flow .small.good { fill: var(--hit); }
.flow .glyph { stroke: #16110A; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.flow .glyph.thin { stroke: #6B7280; stroke-width: 1.6; }
.flow .spark { fill: #F3E8FF; font-size: max(18px, calc(12px * var(--k, 0))); }
.flow .qcell { fill: #232938; stroke: #3A4254; }
.flow .qcell.on { fill: var(--energy); stroke: #8A5E0F; }
.flow .qcell.full { fill: var(--miss); }
.flow .slot rect { fill: #10141C; stroke: #2E7D76; stroke-width: 1.5; stroke-dasharray: 4 3; }
.flow .slot.filled rect { fill: var(--memory); stroke: #2E7D76; stroke-dasharray: none; }
.flow .slot.hl rect { stroke: var(--hit); stroke-width: 3; }
.flow .slot.evict rect { fill: var(--miss); stroke: var(--miss); }
.flow .slot-t { fill: #08201E; font-size: max(15px, calc(12px * var(--k, 0))); font-weight: 800; }
.flow .vdot { fill: #0B3B37; } .flow .vdot.on { fill: var(--want); }
.flow .pill rect { fill: #262B38; stroke: #3A4254; }
.flow .pill-t { font-size: 12px; font-weight: 800; fill: var(--ink); letter-spacing: .03em; }
/* A pill keeps its shape on phones: the whole badge grows by --k so its 12 px text stays 12 px on screen. */
.flow .pill { transform-box: fill-box; transform-origin: center; transform: scale(max(1, var(--k, 1))); }
.flow .pill.hit rect { fill: var(--hit); stroke: none; } .flow .pill.hit .pill-t { fill: #08200F; }
.flow .pill.miss rect, .flow .pill.bad rect { fill: var(--miss); stroke: none; } .flow .pill.miss .pill-t, .flow .pill.bad .pill-t { fill: #2A0710; }
.flow .pill.want rect { fill: var(--want); stroke: none; } .flow .pill.want .pill-t { fill: #1D0A2E; }
.flow .pill.mem rect { fill: var(--memory); stroke: none; } .flow .pill.mem .pill-t { fill: #08201E; }
.flow .pill.energy rect { fill: var(--energy); stroke: none; } .flow .pill.energy .pill-t { fill: #16110A; }
.flow .loadbar .track { fill: #232938; } .flow .loadbar .fill { fill: var(--memory); } .flow .loadbar.over .fill { fill: var(--miss); }
.flow .node.dimmed { opacity: .35; }
.flow .node.glow-hit polygon { filter: drop-shadow(0 0 6px #4ADE80AA); }
.flow .node.glow-miss polygon { filter: drop-shadow(0 0 6px #FF5C7AAA); }
svg .dot { fill: var(--energy); stroke: #1A1206; stroke-width: 2; }
svg .dot.hit { fill: var(--hit); } svg .dot.miss { fill: var(--miss); } svg .dot.mem { fill: var(--memory); } svg .dot.write { fill: var(--want); }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.metrics:empty { display: none; }
.metric { flex: 1 1 120px; min-width: 0; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; }
.m-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.metric strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.metric.warn strong { color: var(--miss); }
.chip { align-self: flex-start; margin-top: 3px; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: #2A3040; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip.better { background: #173523; color: var(--hit); } .chip.worse { background: #3A1720; color: var(--miss); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 8px; }
.act.primary { font-size: 1rem; padding: 11px 20px; }
.act.second { background: #1E2330; }
.act.toggle[aria-pressed=true] { border-color: var(--memory); color: var(--memory); background: #10302D; }
.act.toggle[aria-pressed=true]::before { content: "✓ "; }
.act-range { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 2px solid var(--energy); border-radius: 12px; background: #1F1C15; }
.r-label { font-weight: 700; font-size: .92rem; }
.r-label output { color: var(--energy); margin-left: 6px; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: .9rem; }
.stepper button { min-width: 44px; padding: 8px; font-size: 1.1rem; font-weight: 800; }
.stepper output { min-width: 22px; text-align: center; font-weight: 800; color: var(--energy); font-size: 1.1rem; }
.choice { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 8px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.choice legend { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 4px; }
.choice label { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: .9rem; cursor: pointer; }
.pulse { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 #FFB02088; } 50% { box-shadow: 0 0 0 9px #FFB02000; } }
.notice { margin: 8px 0 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed #3A4254; color: var(--muted); font-size: .95rem; display: flex; gap: 10px; align-items: flex-start; }
.notice strong { color: var(--energy); }
.n-icon { font-weight: 900; flex: 0 0 auto; }
.notice.after { border: 1px solid #2F5A3C; background: #12261A; color: var(--ink); animation: rise .35s ease-out; }
.notice.after .n-icon { color: var(--hit); }
.notice.after.bad { border-color: #5C2733; background: #2A1218; }
.notice.after.bad .n-icon { color: var(--miss); }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.mission { margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid #4B3A63; background: #1C1526; }
.mission .m-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.m-badge { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: var(--want); border: 1px solid var(--want); border-radius: 20px; padding: 2px 9px; }
.mission p { margin: 6px 0 0; font-size: .9rem; }
.mission.passed { border-color: #2F5A3C; background: #12261A; }
.mission.passed .m-badge { color: #0B1A10; background: var(--hit); border-color: var(--hit); }
.model-tag { margin: 10px 0 0; font-size: .75rem; color: var(--dim); text-align: right; letter-spacing: .04em; }
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.levels details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 10px; margin: 0; }
.levels summary { font-weight: 700; color: var(--energy); }
.levels ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: .88rem; }

/* ---------- delivery framework: clock + design card */
.clockwrap { padding: 22px 16px 10px; }
.timebar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #232938; gap: 2px; }
.timebar.big { height: 46px; border-radius: 10px; }
.timebar .seg { display: grid; place-items: center; min-width: 0; transition: flex-grow .25s; color: #10131A; font-weight: 800; }
.timebar .seg.gone { flex-grow: 0 !important; }
.timelegend { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; font-size: .9rem; }
.timelegend li { display: flex; align-items: center; gap: 8px; }
.timelegend i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.timelegend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.timelegend li.cut b { color: var(--miss); }
.clock-note { display: flex; justify-content: space-between; font-size: .75rem; color: var(--dim); margin: 6px 0 0; }
.mini-clock { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px 4px; font-size: .8rem; color: var(--muted); }
.mini-clock .eyebrow { margin: 0; }
.mini-clock b { color: var(--ink); }
.dcard { margin: 8px; border: 1px solid var(--line); border-radius: 12px; background: #11141C; }
.drow { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: start; }
.drow:first-child { border-top: 0; }
.drow.wide { grid-template-columns: 1fr; }
.drow.now { background: #1D1A12; box-shadow: inset 3px 0 0 var(--energy); }
.dk { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .88rem; }
.dn { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: #262C3A; color: var(--muted); flex: 0 0 auto; }
.drow.filled .dn { background: var(--hit); color: #0B1A10; }
.dv { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; font-size: .88rem; }
.dchip { padding: 3px 10px; border-radius: 20px; font-size: .82rem; font-weight: 650; background: #262C3A; }
.dchip.fn { background: #3A2A0B; color: var(--energy); }
.dchip.nfr { background: #2A1D3A; color: var(--want); }
.dchip.ent { background: #0E2E2B; color: var(--memory); }
.dchip.parked { background: transparent; border: 1px dashed #3A4254; color: var(--dim); text-decoration: line-through; }
.endpoints { display: flex; flex-direction: column; gap: 4px; }
.endpoints code { font: 600 .85rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); }
.endpoints b { color: var(--memory); }
.tiny { font-size: .78rem; margin: 4px 0 0; }
.hl-stage { width: 100%; }
.drow.flash { animation: rowflash 1s ease-out; }
@keyframes rowflash { from { background: #3A2A0B; } to { background: transparent; } }
.qa { margin: 8px; padding: 10px 12px; border-radius: 12px; background: #11141C; border: 1px solid var(--line); }
.qa p { margin: 0; } .qa .q { color: var(--muted); font-size: .88rem; } .qa .a { color: var(--ink); margin-top: 4px; }

/* ---------- numbers: ladder, formula, fleet, sort */
.ladder { position: relative; padding: 30px 14px 12px; }
.lgrid { position: absolute; left: calc(14px + 38%); right: 104px; top: 6px; bottom: 6px; pointer-events: none; }
.lgrid span { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #343B4D; font-size: .75rem; color: var(--dim); padding-left: 4px; white-space: nowrap; }
.lgrid span:last-child { border-left: 0; border-right: 1px dashed #343B4D; padding: 0 4px 0 0; transform: translateX(-100%); }
.lrow { display: grid; grid-template-columns: 38% 1fr 90px; gap: 10px; align-items: center; min-height: 44px; position: relative; }
.lname { font-size: .88rem; line-height: 1.25; }
.ltrack { position: relative; height: 12px; background: #1D2230; border-radius: 6px; }
.lbar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6B4A10, var(--energy)); border-radius: 6px; }
.ldot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--energy); border: 2px solid #1A1206; }
.ldot.done { background: var(--hit); }
.ltime { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; font-size: .9rem; }
.ltime.flash { animation: rowflash 1s ease-out; border-radius: 6px; }
.lclock { text-align: center; font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
.lhint { padding: 12px 14px 0; margin: 0; font-size: .88rem; }
.formula { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: center; padding: 18px 12px 6px; font-size: 1rem; color: var(--muted); }
.formula b { color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.formula .eq b { color: var(--energy); }
.peakbars { display: flex; align-items: flex-end; gap: 16px; padding: 10px 16px 14px; min-height: 190px; }
.pb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 170px; width: 84px; flex: 0 0 auto; }
.pbar { width: 46px; border-radius: 8px 8px 0 0; background: var(--energy); }
.pbar.avg { opacity: .55; }
.pb small, .fleet small { font-size: .75rem; color: var(--muted); text-align: center; line-height: 1.3; margin-top: 4px; }
.pb b, .fleet b { color: var(--ink); }
.fleet { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.fleet svg { max-width: 100%; height: auto; }
.sortlist { list-style: none; margin: 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sortlist li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 10px; background: #141824; }
.sortlist li.ok { border-color: #2F5A3C; } .sortlist li.bad { border-color: #5C2733; }
.sortlist .up { min-width: 44px; padding: 6px; }

/* ---------- sharding: shard columns + ring */
.shards { display: flex; gap: 8px; padding: 12px; align-items: stretch; }
.shard { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--tint); border-radius: 10px; background: #12151E; padding: 8px; }
.sh-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: .85rem; }
.sh-head span { color: var(--muted); font-size: .75rem; flex-basis: 100%; }
.sh-head svg { flex: 0 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.kchip { font: 700 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 6px; border-radius: 6px; background: #1F2533; border: 1px solid #333B4E; }
.kchip.moving { border-color: var(--energy); color: var(--energy); }
.kchip.moved { background: #3A2A0B; border-color: var(--energy); color: var(--energy); }
.kchip.hot { background: var(--miss); border-color: var(--miss); color: #2A0710; }
.kchip.bad { border-color: var(--miss); color: var(--miss); }
.overflow { margin: 0 12px 12px; padding: 8px 10px; border: 1px dashed var(--miss); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .82rem; }
.sh-load { position: relative; height: 8px; background: #232938; border-radius: 4px; margin-top: 8px; }
.sh-load span { position: absolute; inset: 0 auto 0 0; background: var(--memory); border-radius: 4px; }
.sh-load.over span { background: var(--miss); }
.sh-load small { position: absolute; top: 9px; left: 0; font-size: .75rem; color: var(--muted); }
.sh-load + .chips { margin-top: 22px; }
.ringwrap { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px; flex-wrap: wrap; }
.flow.ring { max-width: 360px; }
.ring-line { fill: none; stroke: #343B4D; stroke-width: 3; }
.rkey.moved circle { stroke: var(--energy); stroke-width: 3; }
.rnode circle { stroke: #0B0F16; stroke-width: 3; }
.rnode.fresh circle { stroke: var(--ink); stroke-width: 3; }
.rn-t { font-size: max(13px, calc(12px * var(--k, 0))); font-weight: 800; fill: #10131A; }
.ringlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; min-width: 140px; }
.ringlegend li { display: flex; align-items: center; gap: 8px; }
.ringlegend i { width: 12px; height: 12px; border-radius: 50%; }
.ringlegend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.moved-list { font-size: .8rem; margin: 10px 0 0; max-width: 220px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ---------- indexing: table, index, scan */
.sql { margin: 0; padding: 12px 14px 4px; }
.sql code { font: 600 .82rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--memory); overflow-wrap: anywhere; }
.dbwrap { display: flex; gap: 12px; padding: 8px 12px 12px; align-items: flex-start; }
.dbtable { border-collapse: collapse; font-size: .78rem; flex: 1 1 auto; min-width: 0; }
.dbtable caption { text-align: left; color: var(--muted); font-size: .75rem; padding-bottom: 4px; }
.dbtable th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 3px 6px; }
.dbtable td { padding: 2px 6px; border-bottom: 1px solid #1E2330; font-variant-numeric: tabular-nums; }
.dbtable tr.seen td { color: var(--dim); }
.dbtable tr.probe td { background: #3A2A0B; color: var(--energy); }
.dbtable tr.match td { background: #173523; color: var(--hit); font-weight: 700; }
.idxcol { display: flex; flex-direction: column; gap: 10px; }
.idx { list-style: none; margin: 0; padding: 6px; border: 1px solid #2E7D76; border-radius: 10px; background: #0E1F1E; font-size: .75rem; min-width: 190px; }
.idx li { display: flex; justify-content: space-between; gap: 8px; padding: 1px 6px; border-radius: 4px; }
.idx li small { color: var(--dim); font-size: inherit; }
.idx .idx-cap { color: var(--memory); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.idx li.probe { background: #3A2A0B; color: var(--energy); }
.idx li.seen { color: var(--muted); text-decoration: line-through; }
.idx li.out { opacity: .35; }
.idx li.match { background: #173523; color: var(--hit); font-weight: 700; }
.scanbar { padding: 26px 16px; }
.sb-track { height: 26px; border-radius: 8px; background: #1D2230; overflow: hidden; }
.sb-track span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--energy) 0 6px, #C98510 6px 8px); }
.scanbar p { margin: 10px 0 0; text-align: center; }
.qlist { list-style: none; margin: 6px 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qlist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.qlist li.ok { border-color: #2F5A3C; } .qlist li.bad { border-color: #5C2733; }
.qlist code { font: 600 .8rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--memory); overflow-wrap: anywhere; }

/* ---------- queues + streams */
.stream { display: flex; gap: 12px; padding: 12px; flex-wrap: wrap; }
.plogs { flex: 2 1 280px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plog { border: 1px solid #2E7D76; border-radius: 10px; background: #0E1F1E; padding: 6px 8px; }
.pname { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--memory); font-weight: 700; margin-bottom: 4px; }
.pcells { display: flex; flex-wrap: wrap; gap: 3px; min-height: 24px; align-items: center; }
.ev { font: 800 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 5px; border-radius: 5px; background: var(--tint); color: #10131A; }
.ev.new { outline: 2px solid var(--ink); animation: rise .3s ease-out; }
.cgroup { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.consumer { border: 1px solid var(--line); border-left: 4px solid var(--energy); border-radius: 10px; padding: 6px 10px; font-size: .82rem; display: flex; flex-direction: column; }
.consumer span { color: var(--muted); font-size: .76rem; }
.consumer.idle { border-left-color: var(--miss); opacity: .75; }
.consumer.idle span { color: var(--miss); }
.consumer.busy { animation: rowflash 1s ease-out; }

/* ---------- url shortener: codes */
.codes { padding: 4px 12px 12px; }
.codegrid { display: flex; flex-wrap: wrap; gap: 3px; font: 700 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.codegrid span { padding: 1px 4px; border-radius: 4px; background: #1F2533; }
.codegrid span.dup { background: var(--miss); color: #2A0710; }
.codegrid span.dim { background: transparent; }

/* ---------- rate limiter: timeline, bucket */
.flow.timeline .span { fill: #4ADE8014; stroke: var(--hit); stroke-dasharray: 4 4; }
.flow.timeline .axis { stroke: #3A4254; stroke-width: 2; }
.flow.timeline .edge { stroke: var(--energy); stroke-width: 2; stroke-dasharray: 5 5; }
.flow .small.bad { fill: var(--miss); }
.bucket { display: flex; gap: 18px; align-items: flex-end; justify-content: center; padding: 18px 12px; flex-wrap: wrap; }
.b-tokens { display: grid; grid-template-columns: repeat(5, 22px); gap: 4px; padding: 10px; border: 3px solid var(--memory); border-top: 0; border-radius: 0 0 16px 16px; position: relative; padding-bottom: 26px; }
.b-tokens span { width: 22px; height: 14px; border-radius: 4px; }
.b-tokens span.tok { background: var(--energy); }
.b-tokens span.used { background: #3A2A0B; border: 1px dashed var(--energy); }
.b-tokens span.none { background: transparent; }
.b-tokens small { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: .75rem; color: var(--muted); }
.b-reqs div { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.req { min-width: 34px; text-align: center; padding: 4px 6px; border-radius: 6px; font-size: .75rem; font-weight: 800; }
.req.ok { background: var(--hit); color: #08200F; } .req.no { background: var(--miss); color: #2A0710; }

/* ---------- rag: chat + retrieved list */
.ragpanel { padding: 0 12px 12px; }
.chat { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #11141C; margin-bottom: 8px; }
.chat.bad { border-color: #5C2733; }
.chat p { margin: 2px 0; font-size: .9rem; color: var(--ink); }
.chat .cq { color: var(--muted); }
.cite { display: inline-block; font-size: .75rem; font-weight: 800; padding: 1px 7px; border-radius: 10px; background: #2A1D3A; color: var(--want); }
.cite.none { background: #3A1720; color: var(--miss); }
.topk { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.topk li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 8px; border: 1px solid #232938; font-size: .8rem; }
.topk li b { color: var(--memory); }
.topk li small { color: var(--dim); white-space: nowrap; font-size: .75rem; }
.topk li.sent { border-color: var(--energy); background: #1F1C15; }
.topk li.gold span { color: var(--ink); font-weight: 650; }

/* ---------- key technologies: tech card, cache server */
.levels.tech-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kvbox { margin: 8px; padding: 10px 12px 12px; border: 1px solid #2E7D76; border-radius: 12px; background: #0E1A1B; }
.kvhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .92rem; }
.kvhead svg { flex: 0 0 auto; }
.kmem { margin-left: auto; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kbar { height: 8px; border-radius: 4px; background: #1D2A2C; margin: 6px 0 8px; overflow: hidden; }
.kbar span { display: block; height: 100%; background: var(--memory); border-radius: 4px; transition: width .3s; }
.kbar.full span { background: var(--miss); }
.kvlist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.kvlist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 5px 8px; border-radius: 8px; background: #132225; font-size: .84rem; }
.kvlist code { font: 700 .82rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--memory); }
.ktype { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--want); }
.kval { color: var(--ink); flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.kttl { margin-left: auto; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kvlist li.hl { outline: 2px solid var(--energy); }
.kvlist li.gone { opacity: .55; text-decoration: line-through; }
.kvlist li.gone .kttl { color: var(--miss); text-decoration: none; font-weight: 800; }
.kvlist li.refused { background: #2A1218; }
.kvlist li.refused .kval { color: var(--miss); font-weight: 700; }
.cmdlog { list-style: none; margin: 8px 0 0; padding: 8px; border-radius: 8px; background: #0B0F16; display: flex; flex-direction: column; gap: 2px; }
.cmdlog code { font: 600 .78rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; }
.mslots { display: flex; gap: 6px; margin: 10px 0 4px; flex-wrap: wrap; }
.mslots span { width: 40px; height: 34px; border-radius: 7px; border: 1.5px dashed #2E7D76; display: grid; place-items: center; font: 800 1rem ui-monospace, SFMono-Regular, Consolas, monospace; color: #08201E; }
.mslots span.on { background: var(--memory); border-style: solid; }
.mslots span.hl { outline: 3px solid var(--energy); }
.reqstrip { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 3px; margin-top: 8px; }
.reqstrip span { display: flex; flex-direction: column; align-items: center; padding: 2px 0; border-radius: 5px; background: #1D2230; font: 700 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); line-height: 1.2; }
.reqstrip span i { font-style: normal; font-size: .75rem; min-height: 1em; }
.reqstrip span.hit { background: #173523; color: var(--hit); }
.reqstrip span.miss, .reqstrip span.evict { background: #262C3A; color: var(--ink); }
.reqstrip span.refused { background: #3A1720; color: var(--miss); }
.reqstrip span.launch { box-shadow: -3px 0 0 var(--energy); }
.legend-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .76rem; margin: 6px 0 0; color: var(--muted); }
.legend-line .hit { color: var(--hit); } .legend-line .refused { color: var(--miss); } .legend-line .normal { color: var(--energy); } .legend-line .bad-token { color: var(--want); }
.gw-legend { padding: 0 12px 10px; }
/* search index */
.invidx { flex: 1 1 220px; min-width: 0; border: 1px solid #2E7D76; border-radius: 10px; background: #0E1F1E; padding: 6px 8px; font-size: .78rem; }
.invidx .idx-cap { margin: 0 0 4px; color: var(--memory); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.invidx ul { list-style: none; margin: 0; padding: 0; columns: 2 130px; column-gap: 10px; }
.invidx li { display: flex; justify-content: space-between; gap: 6px; padding: 1px 5px; border-radius: 4px; break-inside: avoid; }
.invidx li b { font-weight: 650; color: var(--ink); }
.invidx li span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.invidx li i { font-style: normal; }
.invidx li i.new { color: var(--energy); font-weight: 800; }
.invidx li.probe { background: #3A2A0B; } .invidx li.probe b, .invidx li.probe span { color: var(--energy); }
/* relational: accounts + a shared timeline */
.bankwrap { padding: 10px 10px 12px; }
.accts { display: flex; flex-wrap: wrap; gap: 6px; }
.acct { flex: 1 1 96px; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; padding: 6px 10px; border: 1px solid #2E7D76; border-radius: 10px; background: #0E1A1B; font-size: .8rem; }
.acct span { grid-row: span 2; display: flex; }
.acct strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.acct.total { border-color: #3A4254; background: #161A24; grid-template-columns: 1fr; }
.acct.total.bad { border-color: var(--miss); background: #2A1218; } .acct.total.bad strong { color: var(--miss); }
.acct small { color: var(--muted); font-size: .75rem; }
.txlog { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; counter-reset: turn; }
.txlog li { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; padding: 3px 8px; border-radius: 7px; background: #141824; font-size: .8rem; }
.txtag { font-size: .75rem; font-weight: 800; color: #10131A; background: var(--tint); border-radius: 10px; padding: 1px 8px; text-align: center; white-space: nowrap; }
.txa { color: var(--dim); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.txlog li.txhead { background: transparent; color: var(--dim); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 0; }
.txlog li.wait .txt { color: var(--dim); font-style: italic; }
.txlog li.bad { background: #2A1218; } .txlog li.bad .txt { color: var(--miss); font-weight: 700; }
.txlog li.ok .txt { color: var(--hit); font-weight: 700; }
/* contention: seats */
.seatrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.seatclock { flex-basis: 100%; font-size: .78rem; color: var(--muted); }
.seatclock b { color: var(--ink); font-variant-numeric: tabular-nums; }
.seat { flex: 1 1 90px; display: flex; flex-direction: column; padding: 6px 10px; border: 1.5px dashed #3A4254; border-radius: 10px; font-size: .8rem; color: var(--muted); }
.seat b { font-size: 1rem; color: var(--ink); }
.seat.held { border: 1.5px solid var(--energy); background: #1F1C15; color: var(--energy); }
.seat.sold { border: 1.5px solid var(--hit); background: #12261A; color: var(--hit); }
.seat.double { border: 1.5px solid var(--miss); background: #2A1218; color: var(--miss); font-weight: 700; }
/* real-time: timeline */
.flow.rt .axis { stroke: #3A4254; stroke-width: 2; }
.flow.rt .req { stroke: var(--energy); stroke-width: 2; }
.flow.rt .held { stroke: var(--energy); stroke-width: 6; stroke-opacity: .35; stroke-linecap: round; }
.flow.rt .resp { stroke: var(--hit); stroke-width: 2; }
.flow.rt .resp.empty { stroke: #6B7280; stroke-dasharray: 3 3; }
.flow.rt .up { stroke: #E8EAF0; stroke-width: 1.5; stroke-opacity: .7; }
.flow.rt .conn { fill: #4FD1C514; stroke: var(--memory); stroke-dasharray: 5 5; }
.flow.rt .small.mem { fill: var(--memory); }
.flow.rt .tiny-x { fill: var(--muted); font-size: max(12px, calc(12px * var(--k, 0))); font-weight: 800; }
.flow.rt .playhead { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 4; }
.rt-legend { padding: 0 12px 10px; }
.legend-line .up-l { color: var(--ink); }

/* long-running tasks: a timeline under the diagram + a job card */
.gantt { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.gclock { margin: 0 0 2px; font-size: .78rem; color: var(--muted); }
.gclock b { color: var(--ink); font-variant-numeric: tabular-nums; }
.glane { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; }
.gname { font-size: .78rem; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtrack { position: relative; height: 24px; border-radius: 6px; background: #141824; }
.gbar { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; background: var(--energy); display: flex; align-items: center; justify-content: center; min-width: 3px; overflow: hidden; }
.gbar i { font-style: normal; font-size: .75rem; font-weight: 800; line-height: 1; color: #16110A; white-space: nowrap; padding: 0 2px; }
.gbar.ok { background: var(--hit); } .gbar.ok i { color: #08200F; }
.gbar.cut, .gbar.crash { background: var(--miss); } .gbar.cut i, .gbar.crash i { color: #2A0710; }
.gbar.wait { background: #3A4254; } .gbar.wait i { color: var(--ink); }
.gbar.waste { background: transparent; border: 1.5px dashed var(--miss); } .gbar.waste i { color: var(--miss); }
.gbar.hidden { background: repeating-linear-gradient(135deg, #4FD1C52E 0 6px, transparent 6px 12px); border: 1.5px dashed var(--memory); } .gbar.hidden i { color: var(--memory); }
.gbar.tick { top: 7px; bottom: 7px; border-radius: 50%; background: var(--memory); min-width: 8px; margin-left: -4px; }
.gline { position: absolute; top: -3px; bottom: -3px; border-left: 2px dashed var(--want); z-index: 1; }
.gafter { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .75rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.gbar.tick.bad { background: var(--miss); }
.gplay { position: absolute; top: -3px; bottom: -3px; border-left: 2px solid var(--ink); z-index: 2; }
.gaxis .gtrack { background: transparent; height: 18px; }
.gaxis .gtrack span, .gaxis .gtrack b { position: absolute; top: 0; transform: translateX(-50%); font-size: .75rem; color: var(--dim); white-space: nowrap; }
.gaxis .gtrack span:first-child { transform: none; }
.gaxis .gtrack span:last-of-type { transform: translateX(-100%); }
.gaxis .gtrack b { color: var(--want); font-weight: 700; }
.gaxis.has-target .gtrack { height: 36px; }
.gaxis.has-target .gtrack b { top: 18px; }
.gantt.compact { gap: 2px; }
.gantt.compact .gtrack { height: 17px; }
.gantt.compact .gbar { top: 1px; bottom: 1px; }
.jobcard { margin: 0 12px 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 8px 12px; border: 1px solid #2E7D76; border-radius: 10px; background: #0E1A1B; font-size: .84rem; }
.jobcard .jid { font-weight: 800; color: var(--memory); }
.jobcard .jwhat { color: var(--ink); flex: 1 1 120px; }
.jstat { font-weight: 800; color: var(--muted); }
.jstat.run { color: var(--energy); } .jstat.done { color: var(--hit); }
.jobcard .kbar { flex-basis: 100%; margin: 4px 0 0; }
.jobcard-host .lhint { padding: 0 14px 10px; }

/* large blobs: parts strip, repeat-view chips */
.partstrip { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 12px 12px; align-items: center; }
.partstrip span { flex: 1 1 0; min-width: 20px; text-align: center; padding: 3px 0; border-radius: 5px; border: 1.5px dashed #3A4254; font-size: .75rem; font-weight: 800; color: var(--muted); }
.partstrip span.once { background: var(--hit); border: 1.5px solid var(--hit); color: #08200F; }
.partstrip span.lost { background: #3A1720; border: 1.5px solid var(--miss); color: var(--miss); }
.partstrip span.again { background: var(--energy); border: 1.5px solid var(--energy); color: #16110A; }
.partstrip small { flex-basis: 100%; font-size: .75rem; color: var(--muted); }
.regions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 12px 12px; font-size: .8rem; }
.rg-cap { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.rg { padding: 2px 10px; border-radius: 12px; border: 1px solid #3A4254; color: var(--ink); }
.rg b { font-variant-numeric: tabular-nums; }
.rg.ok { border-color: var(--hit); color: var(--hit); } .rg.bad { border-color: var(--miss); color: var(--miss); }

/* AI: chunk size (page cut into chunk boxes) */
.chunkwrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "doc others" "doc chat"; align-items: start; gap: 10px; padding: 10px; }
.docpage, .others, .chatbox, .chunk { min-width: 0; }
.docpage { grid-area: doc; display: flex; flex-direction: column; gap: 6px; }
.others { grid-area: others; display: flex; flex-direction: column; gap: 4px; }
.chatbox { grid-area: chat; }
.chatbox:empty, .others:empty { display: none; }
.dp-title { margin: 0; font-size: .78rem; color: var(--muted); }
.dp-title b { color: var(--ink); }
.chunk { border: 1.5px solid #2E7D76; border-radius: 10px; background: #0E1A1B; padding: 5px 9px 7px; display: flex; flex-direction: column; gap: 1px; transition: border-color .2s; }
.chunk.scan { border-color: var(--energy); }
.chunk.best { border-color: var(--energy); background: #1F1C15; box-shadow: 0 0 0 1px var(--energy) inset; }
.ch-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: .75rem; color: var(--muted); }
.ch-head b { color: var(--memory); }
.ch-title { color: var(--want); font-weight: 800; }
.ch-score { margin-left: auto; color: var(--energy); font-weight: 800; font-variant-numeric: tabular-nums; }
.ch-h { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.ch-s { font-size: .82rem; color: var(--ink); line-height: 1.35; }
.ch-s.need { text-decoration: underline; text-decoration-color: var(--want); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ch-ids { margin: 0; font-size: .78rem; color: var(--ink); }
.ochunk { font-size: .8rem; color: var(--ink); padding: 4px 8px; border: 1px solid #2B3140; border-radius: 8px; background: #141824; }
.ochunk b { color: var(--memory); font-size: .75rem; margin-right: 4px; }
.ochunk i { font-style: normal; color: var(--energy); font-weight: 800; white-space: nowrap; }
.ochunk.best { border-color: var(--energy); background: #1F1C15; }
.qtable { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.qtable li { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: baseline; padding: 4px 8px; border-radius: 7px; background: #141824; font-size: .8rem; color: var(--ink); }
.qtable li.ok .qt-mark { color: var(--hit); } .qtable li.bad { background: #2A1218; } .qtable li.bad .qt-mark { color: var(--miss); }
.qt-mark { font-weight: 900; }
.qtable small { color: var(--muted); font-size: .75rem; white-space: nowrap; }

/* AI: reranking (sliding list, cost bar, rank grid) */
.rrwrap { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rlist li { position: relative; height: 40px; box-sizing: border-box; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 0 8px; border-radius: 8px; border: 1px solid #232938; background: #141824; font-size: .8rem; transition: transform .6s ease; overflow: hidden; }
.rlist li b { color: var(--muted); }
.rl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.rl-t i { font-style: normal; font-weight: 800; color: var(--memory); }
.rlist small { color: var(--muted); font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rl-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--memory); }
.rlist li.gold .rl-t { text-decoration: underline; text-decoration-color: var(--want); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rlist li.sent { border-color: var(--energy); background: #1F1C15; }
.rlist li.scoring { border-color: var(--want); }
.rlist li.scoring small { color: var(--want); font-weight: 800; }
.costwrap { padding: 12px 14px; }
.costbar { position: relative; height: 22px; border-radius: 6px; background: #141824; margin: 8px 0 2px; }
.cb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--hit); }
.cb-fill.over { background: var(--miss); }
.cb-budget { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--want); }
.cb-budget i { position: absolute; top: -18px; left: 4px; font-style: normal; font-size: .75rem; color: var(--want); white-space: nowrap; }
.cb-axis { position: relative; height: 18px; }
.cb-axis span { position: absolute; transform: translateX(-50%); font-size: .75rem; color: var(--dim); white-space: nowrap; }
.cb-axis span:first-child { transform: none; }
.cb-big { margin: 8px 0 0; font-size: 1.4rem; font-weight: 800; color: var(--hit); font-variant-numeric: tabular-nums; }
.cb-big.bad { color: var(--miss); }
.costwrap .lhint { padding: 6px 0 0; }
.rgrids { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.rgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; margin-top: 4px; }
.rgrid span { text-align: center; padding: 2px 0; border-radius: 4px; background: #141824; color: var(--dim); font-size: .75rem; font-variant-numeric: tabular-nums; }
.rgrid span.cand { background: #1E3A37; color: var(--memory); }
.rgrid span.ans { outline: 2px solid var(--want); color: var(--want); font-weight: 900; }
.rgrid span.ans.found { background: var(--hit); color: #08200F; outline-color: var(--hit); }
.rgrid span.ans.missed { background: #3A1720; color: var(--miss); outline-color: var(--miss); }
.rg-note { margin: 4px 0 0; font-size: .75rem; color: var(--muted); }
.rg-verdict { margin: 0 0 6px; font-size: .8rem; font-weight: 700; }
.rg-verdict.ok { color: var(--hit); } .rg-verdict.bad { color: var(--miss); }

/* AI: hybrid search (two ranked lists and a fused one) */
.hywrap { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.hyq { display: flex; flex-wrap: wrap; gap: 6px; }
.hyqq { font-size: .8rem; padding: 3px 10px; border-radius: 12px; border: 1px solid #3A4254; color: var(--muted); }
.hyqq.on { border-color: var(--energy); color: var(--ink); background: #1F1C15; }
.hylists { display: flex; flex-direction: column; gap: 8px; }
.hy2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.hlist ol { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hlist li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; padding: 4px 8px; border-radius: 7px; border: 1px solid #232938; background: #141824; font-size: .8rem; color: var(--ink); transition: opacity .2s; }
.hlist li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlist li i { font-style: normal; font-weight: 800; color: var(--memory); margin-right: 3px; }
.hlist li b { color: var(--muted); }
.hlist li small { color: var(--muted); font-size: .75rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hlist li.right > span { text-decoration: underline; text-decoration-color: var(--want); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.hlist li.first { border-color: var(--energy); }
.hlist li.hidden-row { opacity: 0; }
.hyqlabel { margin: 6px 0 0; font-size: .82rem; font-weight: 800; color: var(--energy); }
.hyverdict { margin: 0; font-size: .85rem; font-weight: 700; }
.hyverdict.ok { color: var(--hit); } .hyverdict.bad { color: var(--miss); }

/* AI: vector index (dot picture, recall chart, memory bars) */
.flow.vi .vi-dot { fill: #2E7D76; stroke: #0B0F16; stroke-width: 1.5; }
.flow.vi .vi-dot.lit { fill: var(--memory); }
.flow.vi .vi-dot.found { fill: var(--hit); stroke: #08200F; }
.flow.vi .vi-dot.here { fill: var(--energy); }
.flow.vi .vi-edge { stroke: #2B3140; stroke-width: 1.2; }
.flow.vi .vi-hop { stroke: var(--energy); stroke-width: 3; stroke-linecap: round; }
.flow.vi .vi-q { fill: var(--want); stroke: #1D0A2E; stroke-width: 1; }
.flow.vi .axis { stroke: #3A4254; stroke-width: 2; }
.flow.vi .vi-line { fill: none; stroke: var(--memory); stroke-width: 2; }
.flow.vi .vi-pt { fill: var(--memory); stroke: #0B0F16; stroke-width: 1.5; }
.flow.vi .vi-pt.sel { fill: var(--energy); }
.flow.vi .vi-pt.exact { fill: var(--muted); } .flow.vi .vi-pt.pq { fill: var(--miss); }
.flow.vi .vi-pt.exact.sel, .flow.vi .vi-pt.pq.sel { stroke: var(--energy); stroke-width: 4; }
.flow.vi .vi-target { fill: #C084FC1A; stroke: var(--want); stroke-dasharray: 5 4; }
.flow.vi .small.want { fill: var(--want); }
.flow.vi .small.sel-t { fill: var(--energy); font-weight: 800; }
.vi-note { margin: 0; padding: 0 12px 10px; font-size: .75rem; color: var(--muted); }
.membars { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mb-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .8rem; }
.mb-name { color: var(--ink); }
.mb-track { height: 14px; border-radius: 5px; background: #141824; overflow: hidden; }
.mb-fill { display: block; height: 100%; background: var(--memory); border-radius: 5px; }
.mb-fill.small { background: var(--hit); }
.mb-val { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* core: scaling (session strip) */
.sessstrip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; padding: 0 12px 12px; }
.sessstrip span { display: flex; flex-direction: column; align-items: center; padding: 2px 0; border-radius: 5px; background: #1D2230; font: 700 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); }
.sessstrip span i { font-style: normal; font-size: .75rem; }
.sessstrip span.ok { background: #173523; color: var(--hit); } .sessstrip span.bad { background: #3A1720; color: var(--miss); }
.sessstrip .lhint { grid-column: 1 / -1; padding: 0; }

/* core: SQL vs NoSQL (keys panel, table cards, feature cards) */
.kvkeys { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.kvk { font-size: .82rem; color: var(--ink); padding: 4px 8px; border-radius: 7px; background: #132225; }
.kvk code { font: 700 .8rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--memory); }
.kvk i { font-style: normal; color: var(--muted); font-size: .75rem; margin-left: 6px; }
.kvk.hot { outline: 2px solid var(--hit); } .kvk.ask { background: #1F1C15; } .kvk.ask.bad { outline: 2px solid var(--miss); }
.tables { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.tcard { border: 1px solid #2E7D76; border-radius: 10px; background: #0E1A1B; padding: 6px 8px; min-width: 0; }
.tc-name { margin: 0 0 4px; font-weight: 800; color: var(--memory); font-size: .8rem; }
.tcard table { width: 100%; border-collapse: collapse; font-size: .78rem; font-variant-numeric: tabular-nums; }
.tcard th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; }
.tcard td { color: var(--ink); padding: 1px 2px; }
.tcard tr.lit td { background: #3A2A0B; color: var(--energy); font-weight: 800; }
.sqlq { margin: 0; padding: 0 12px 12px; }
.sqlq code { font: 600 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
.feats { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.feat { border: 1px solid #2B3140; border-radius: 10px; padding: 6px 10px; background: #141824; }
.feat p { margin: 0; font-size: .82rem; color: var(--muted); } .feat b { color: var(--ink); }
.feat .ft-pick { color: var(--ink); font-weight: 700; margin-top: 2px; }
.feat.ok { border-color: var(--hit); } .feat.ok .ft-pick { color: var(--hit); }
.feat.bad { border-color: var(--miss); background: #2A1218; } .feat.bad .ft-pick { color: var(--miss); }

/* breakdowns: chat phones, booking log */
.phones { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 10px 10px; }
.phones.two .phone { flex: 1 1 220px; }
.phone { flex: 1 1 260px; min-width: 0; border: 1px solid #3A4254; border-radius: 14px; background: #10131A; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.ph-title { margin: 0 0 2px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.bubble { margin: 0; padding: 4px 10px; border-radius: 10px; background: #1D2230; font-size: .82rem; color: var(--ink); }
.bubble b { color: var(--memory); margin-right: 4px; }
.bubble i { font-style: normal; font-size: .75rem; color: var(--muted); margin-left: 4px; }
.bubble.new { background: #173523; } .bubble.ok i { color: var(--hit); }
.bubble.bad { background: #2A1218; } .bubble.bad i { color: var(--miss); font-weight: 800; }
.bubble.lost { background: transparent; border: 1px dashed var(--miss); color: var(--muted); text-decoration: line-through; } .bubble.lost i { color: var(--miss); font-weight: 800; text-decoration: none; }
.seatlog { padding: 0 10px 10px; }
.seatlog:empty { display: none; }

/* ---------- quiz + finish */
.quiz fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; padding: 14px 16px; }
.quiz legend { font-weight: 650; padding: 0 6px; }
.quiz label { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 8px; cursor: pointer; }
.quiz label:hover { background: #FFFFFF07; }
.quiz-feedback { margin-top: 8px; font-size: .86rem; }
.completion { padding: 16px 18px; border: 1px solid #325B42; background: #4ADE800D; border-radius: 12px; margin: 16px 0; }
.completion h2 { color: var(--hit); margin-bottom: 6px; }
.finish-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; }

/* ---------- labs (kept from v1) */
.page-heading { padding: 36px 0 18px; max-width: 700px; }
.page-heading h1 { margin: 10px 0; }
.lab-editor { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-top: 22px; }
.lab-panel { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.lab-panel h2 { font-size: 1.2rem; }
textarea { width: 100%; display: block; resize: vertical; min-height: 310px; background: #0C0F15; border: 1px solid var(--line); border-radius: 8px; color: var(--memory); padding: 16px; tab-size: 2; font: 12px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.editor-label { font-size: .75rem; color: var(--muted); display: block; margin-bottom: 8px; }
.lab-result { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: .8rem; overflow-wrap: anywhere; }
.lab-result small { color: var(--muted); display: block; }
.lab-result pre { margin-bottom: 0; white-space: pre-wrap; }
.lab-help { font-size: .75rem; color: var(--muted); }
details { margin: 18px 0; }
summary { cursor: pointer; color: var(--energy); font-size: .88rem; min-height: 40px; padding: 9px 0; }
.lab-status { font-size: .85rem; min-height: 28px; margin-top: 12px; }
.lab-actions, .button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
pre { overflow-x: auto; }

/* ---------- responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-art { order: -1; max-width: 460px; }
  .fast-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson { grid-template-columns: 1fr; gap: 12px; }
  .on-page { order: 0; position: static; padding: 10px 12px; }
  .op-steps { flex-direction: row; overflow-x: auto; gap: 6px; margin-top: 8px; padding-bottom: 4px; scrollbar-width: thin; }
  .op-steps button { flex: 0 0 auto; width: auto; padding: 4px; min-height: 40px; min-width: 40px; justify-content: center; }
  .op-steps .op-t { display: none; }
  .op-steps button[aria-current=step] .op-t { display: inline; padding-right: 6px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .op-links { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
  .lab-editor, .levels, .levels.tech-card { grid-template-columns: 1fr; }
  .reqstrip { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .txlog li { grid-template-columns: 84px 1fr auto; gap: 6px; padding: 3px 6px; }
  .drow { grid-template-columns: 1fr; gap: 6px; padding: 8px; }
  .shards { padding: 8px 4px; gap: 4px; }
  .dbwrap { flex-direction: column; padding: 6px; }
  .topk li { grid-template-columns: 26px 1fr; }
  .topk li small { grid-column: 2; }
  .dbtable .opt { display: none; }
  .dbtable { width: 100%; }
  .idx { width: 100%; }
  .idxcol { width: 100%; }
  .shard { padding: 6px 4px; }
  .kchip { font-size: .75rem; padding: 1px 4px; }
  .lrow { grid-template-columns: 1fr 74px; gap: 2px 8px; padding: 4px 0; }
  .lname { grid-column: 1 / -1; font-size: .8rem; }
  .lgrid { left: 14px; right: 96px; }
  .ltime { font-size: .8rem; }
  .peakbars { gap: 8px; padding: 8px; }
  .pb { width: 66px; }
  .dcard, .qa { margin: 6px 2px; }
  .mini-clock { grid-template-columns: 1fr; gap: 4px; }
  .glane { grid-template-columns: 76px minmax(0, 1fr); gap: 6px; }
  .chunkwrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "doc" "others" "chat"; padding: 8px; }
  .qtable li { grid-template-columns: 18px 1fr; } .qtable small { grid-column: 2; }
}
@media (max-width: 560px) {
  .chunk:not(.best):not(.has-need) .ch-h { display: none; }
  .rlist li { height: 54px; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; }
  .rl-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .rlist small { white-space: normal; text-align: right; max-width: 64px; }
  .hy2 { grid-template-columns: minmax(0, 1fr); }
  .sessstrip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tables { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
  .mb-row { grid-template-columns: minmax(0, 1fr) auto; } .mb-track { grid-column: 1 / -1; grid-row: 2; }
  .chunk:not(.best):not(.has-need) .ch-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gantt { padding: 4px 8px 10px; }
}
@media (max-width: 560px) {
  main { padding: 0 12px; }
  .site-header { padding: 12px; }
  .brand span { font-size: .76rem; }
  nav { gap: 12px; font-size: .8rem; }
  .video-link { display: none; }
  .fast-list { grid-template-columns: 1fr; }
  .stop { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
  .stop .s { flex-basis: 100%; padding-left: 40px; }
  .scene { padding: 8px; margin-left: -4px; margin-right: -4px; }
  .flow .lbl { font-size: max(19px, calc(12px * var(--k, 0))); }
  .flow .small { font-size: max(15px, calc(12px * var(--k, 0))); }
  .viz { padding: 0; }
  .metric { flex-basis: 30%; padding: 7px 9px; }
  .metric strong { font-size: 1.25rem; }
  .m-label { font-size: .75rem; letter-spacing: .06em; }
  .act.primary { flex: 1 1 100%; }
  .step-text { font-size: 1rem; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .pulse { box-shadow: 0 0 0 3px #FFB020AA; }
  .act-range.pulse { box-shadow: 0 0 0 3px #FFB020AA; }
}

/* ---------- scaling writes: likes waiting (or refused) second by second during a burst */
.burst { padding: 6px 12px 12px; }
.bt-title { margin: 0 0 6px; font-size: .78rem; color: var(--muted); }
.bt-cols { position: relative; display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 1px; align-items: end; height: 96px; border-bottom: 1px solid var(--line); }
.bt-cols span { display: block; min-height: 1px; border-radius: 2px 2px 0 0; background: var(--memory); }
.bt-cols span.ref { background: var(--miss); }
.bt-win { position: absolute; top: 0; bottom: 0; background: #FFB0201F; border-left: 1px dashed var(--energy); border-right: 1px dashed var(--energy); }
.bt-win b { position: absolute; top: 2px; left: 4px; font-size: .75rem; color: var(--energy); }
.bt-dead { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--want); }
.bt-dead b { position: absolute; top: 2px; left: 4px; font-size: .75rem; color: var(--want); white-space: nowrap; }
.bt-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--dim); margin-top: 2px; }
.bt-note { margin: 6px 0 0; font-size: .8rem; font-weight: 700; } .bt-note.ok { color: var(--hit); } .bt-note.bad { color: var(--miss); }

/* ---------- multi-step: saga log and trip outcomes */
.txlog li.undo .txt { color: var(--memory); }
.sg-trips { margin-top: 8px; }
.sg-chain { color: var(--muted); font-size: .75rem; }
.sg-log .txlog li.txhead { display: block; }

/* ---------- networking: a page load timeline under the map */
.nw-title { padding: 0 12px; margin: 6px 0 0; }
.nw-time .gantt .gname, .nw-budget small { white-space: nowrap; }
.nw-budget { margin-top: 8px; }

/* ---------- API design: a console of calls */
.api-box { margin: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #11141C; gap: 6px; }
.api-box .lhint { padding: 0; }
.api-box code { overflow-wrap: anywhere; }
.api-h { display: block; color: var(--muted); font-weight: 600; font-size: .75rem; }
.api-res { margin: 0 0 4px; font: 600 .8rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; }
.api-res b { color: var(--muted); } .api-res.ok b { color: var(--hit); } .api-res.bad b, .api-res.bad { color: var(--miss); }
.api-q { font: 600 .75rem ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); display: block; white-space: nowrap; }
.api-day { margin-top: 4px; }

/* ---------- data modeling: table cards and rows read */
.dm-note { margin: 4px 0 0; font-size: .75rem; color: var(--muted); }
.dm-wide .tcard { flex: 1 1 auto; }
.dm-tables { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dm-hint { padding: 0 14px 10px; }
.dm-title { padding: 0 12px; margin: 8px 0 0; }
.dm-q { margin-top: 4px; }

/* ---------- wide-column store: write path, partition strip, replicas */
.wc-lsm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.wc-box { border: 1px solid var(--line); border-radius: 10px; background: #12151E; padding: 8px; min-width: 0; }
.wc-box.mem { border-color: #2E7D76; } .wc-box.flush { box-shadow: 0 0 0 2px var(--energy); }
.wc-h { margin: 0 0 6px; font-weight: 800; font-size: .82rem; } .wc-h span { display: block; color: var(--muted); font-weight: 600; font-size: .75rem; }
.wc-n { margin: 4px 0 0; font-size: .78rem; color: var(--muted); } .wc-n.ok { color: var(--hit); font-weight: 700; } .wc-n.bad { color: var(--miss); font-weight: 700; }
.wc-files { display: flex; flex-direction: column; gap: 3px; } .wc-files span { font-size: .75rem; padding: 2px 6px; border-radius: 6px; background: #0E2E2B; color: var(--memory); }
.wc-files em { font-size: .75rem; color: var(--dim); }
.wc-part { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; margin: 8px 14px 0; }
.wc-part span { height: 30px; border-radius: 3px; background: #1E3A37; }
.wc-hours { display: flex; justify-content: space-between; margin: 2px 14px 0; font-size: .75rem; color: var(--dim); }
.wc-part span.lit { background: var(--energy); }
.bankwrap > .wc-n { padding: 6px 14px 0; }
.wc-q { margin-top: 10px; } .wc-reps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wc-reps span { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: .75rem; color: var(--muted); background: #141824; }
.wc-reps span b { display: block; color: var(--ink); } .wc-reps span.new { border-color: var(--hit); color: var(--hit); }
.wc-reps span.read { box-shadow: 0 0 0 2px var(--want); } .wc-reps i { display: block; font-style: normal; color: var(--want); font-weight: 800; }
@media (max-width: 560px) { .wc-lsm { grid-template-columns: 1fr; } }

/* ---------- workflow engine: one cell per order, event history */
.wf-gridwrap { margin-top: 6px; }
.wf-grid { display: grid; grid-template-columns: repeat(50, minmax(0, 1fr)); gap: 1px; }
.wf-grid span { aspect-ratio: 1; border-radius: 1px; background: #3A4254; }
.wf-grid span.wait { background: var(--memory); } .wf-grid span.lost { background: var(--miss); } .wf-grid span.ok { background: var(--hit); }
.legend-line .wf-wait { color: var(--memory); } .legend-line .wf-lost { color: var(--miss); } .legend-line .wf-ok { color: var(--hit); }
.wf-hist { margin-top: 0; }
.cr-plan { margin-top: 4px; }
