/* Superfly project site. Dark, data-forward, self-contained. */
:root {
  --bg: #070b16;
  --bg-2: #0a1020;
  --panel: #0f1628;
  --panel-2: #131c31;
  --line: #1c2740;
  --line-2: #26334f;
  --fg: #e8edf7;
  --fg-2: #c3cce0;
  --muted: #8595b8;
  --muted-2: #5f6d8c;
  --cx: #36d1c4;
  --cx-dim: rgba(54, 209, 196, 0.16);
  --dn: #ffb347;
  --dn-dim: rgba(255, 179, 71, 0.16);
  --mlp: #9fb0d4;
  --rand: #c77dff;
  --k0: #ff5c7a;
  --rew: #6b8cff;
  --ok: #4ade80;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Inter, system-ui, Arial, sans-serif;
  --maxw: 1360px;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans);
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(54, 209, 196, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 209, 196, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: var(--cx); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.sr { position: absolute; left: -9999px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px);
  background: rgba(7, 11, 22, 0.82); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; height: 56px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 22px; height: 22px; }
.brand small { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.nav-links { margin-left: auto; display: flex; gap: 18px; font-family: var(--mono); font-size: 12.5px; }
.nav-links a { color: var(--fg-2); }
.nav-links a:hover { color: var(--cx); text-decoration: none; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* type */
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--cx); text-transform: uppercase; margin: 0 0 14px; }
.kicker.dn { color: var(--dn); }
h1 { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 22px; font-weight: 800; }
h1 .accent, h2 .accent { color: var(--cx); }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 18px; margin: 0 0 8px; font-weight: 700; }
.lede { font-size: 18px; color: var(--fg-2); max-width: 760px; margin: 0 0 28px; }
p { margin: 0 0 14px; color: var(--fg-2); }
.small { font-size: 13px; color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
section { padding: 88px 0; border-top: 1px solid var(--line); }
section.tight { padding: 56px 0; }
.hero { padding: 72px 0 40px; border-top: 0; }

/* chips + buttons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.chip {
  font-family: var(--mono); font-size: 12.5px; color: var(--fg-2); background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px;
}
.chip b { color: var(--fg); font-weight: 700; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-weight: 600; font-size: 14px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s; cursor: pointer;
}
.btn:hover { border-color: var(--cx); text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--cx); color: #04201e; border-color: var(--cx); }
.btn.primary:hover { background: #4ee3d6; }
.btn svg { width: 16px; height: 16px; }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.ghost { background: transparent; }
.btn.active { border-color: var(--cx); color: var(--cx); background: var(--cx-dim); }
.authors { margin: 18px 0 0; font-size: 16px; color: var(--fg-2); }
.authors span { white-space: nowrap; }
.authors sup { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.affil { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.affil sup { font-family: var(--mono); font-size: 11px; }
.title-line { font-size: 17px; color: var(--fg); margin-top: 26px; font-weight: 600; }
.title-line small { color: var(--muted); font-weight: 400; font-family: var(--mono); font-size: 12px; margin-left: 10px; letter-spacing: 0.08em; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em;
}
.panel-head b { color: var(--fg-2); font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot.cx { background: var(--cx); } .dot.dn { background: var(--dn); } .dot.mlp { background: var(--mlp); }
.dot.rand { background: var(--rand); } .dot.k0 { background: var(--k0); } .dot.rew { background: var(--rew); }

/* replay */
.replay { margin-top: 28px; }
.replay-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 0; }
.replay-grid > div { min-width: 0; }
.replay-grid > div:first-child { border-right: 1px solid var(--line); }
@media (max-width: 900px) { .replay-grid { grid-template-columns: 1fr; } .replay-grid > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); } }
.video-box { position: relative; background: #000; aspect-ratio: 1 / 1; }
.video-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-box .tag { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 11px; color: var(--fg); background: rgba(7,11,22,0.7); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; }
.brain-box { position: relative; background: radial-gradient(ellipse at 50% 45%, #0e1730 0%, #070b16 70%); aspect-ratio: 1.25 / 1; width: 100%; overflow: hidden; }
@media (max-width: 600px) { .brain-box, .brain-box[style] { aspect-ratio: 1 / 1 !important; } .brain-box .hint { display: none; } }
.brain-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.brain-box canvas:active { cursor: grabbing; }
.brain-box .hud { position: absolute; left: 12px; bottom: 10px; max-width: 52%; font-family: var(--mono); font-size: 11px; color: var(--muted); pointer-events: none; line-height: 1.35; }
.brain-box .hud b { color: var(--fg-2); font-weight: 600; }
.brain-box .legend { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); pointer-events: none; }
.brain-box .legend .bar { width: 90px; height: 8px; border-radius: 4px; border: 1px solid var(--line-2); }
.brain-box .hint { position: absolute; top: 10px; right: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); pointer-events: none; }
.brain-box .hover { position: absolute; top: 10px; left: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-2); background: rgba(7,11,22,0.75); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; pointer-events: none; display: none; }
.transport { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.transport .play {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}
.transport .play:hover { border-color: var(--cx); }
.transport input[type=range] { flex: 1 1 200px; accent-color: var(--cx); min-width: 120px; }
.transport .readout { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.transport .readout b { color: var(--fg); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; padding: 6px 10px; cursor: pointer; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--panel-2); color: var(--fg); }
.seg button:hover { color: var(--cx); }
.controls-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.blabel { position: absolute; transform: translate(-50%, -115%); font-family: var(--mono); font-size: 10px; line-height: 1.35; color: var(--fg-2); background: rgba(7, 11, 22, 0.78); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; pointer-events: none; white-space: nowrap; text-align: center; z-index: 4; }
.blabel b { display: block; font-weight: 600; letter-spacing: 0.07em; font-size: 10px; color: var(--fg); }
.blabel i { display: block; font-style: normal; color: var(--muted); font-size: 9.5px; }
.blabel.cx b { color: var(--cx); } .blabel.dn b { color: var(--dn); }
.blabel.dim { opacity: 0.55; }
.controls-row .lbl { letter-spacing: 0.08em; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--fg-2); }
.check input { accent-color: var(--cx); }
.telemetry { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.telemetry > div { padding: 12px 16px; border-right: 1px solid var(--line); min-width: 0; }
.telemetry > div:last-child { border-right: 0; }
.telemetry .k { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.telemetry .v { font-family: var(--mono); font-size: 18px; color: var(--fg); margin-top: 2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.telemetry .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.telemetry svg { width: 100%; height: 30px; display: block; margin-top: 4px; }
@media (max-width: 720px) { .telemetry { grid-template-columns: repeat(2, 1fr); } .telemetry > div:nth-child(2) { border-right: 0; } }
.torques { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.torques .k { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; display: flex; justify-content: space-between; }
.torques svg { width: 100%; height: 54px; display: block; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-top: 28px; }
.tiles > div { padding: 22px 22px; border-right: 1px solid var(--line); }
.tiles > div:last-child { border-right: 0; }
.tiles .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.tiles .v { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; line-height: 1; font-family: var(--mono); }
.tiles .v.cx { color: var(--cx); } .tiles .v.dn { color: var(--dn); }
.tiles .s { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } .tiles > div:nth-child(2) { border-right: 0; } .tiles > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* two column */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.cols.wide-right { grid-template-columns: 0.9fr 1.1fr; }
.cols.wide-left { grid-template-columns: 1.1fr 0.9fr; }
@media (max-width: 900px) { .cols, .cols.wide-right, .cols.wide-left { grid-template-columns: 1fr; } }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards, .cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards, .cards.two, .cards.four { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; }
.card .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.card h3 { margin-top: 6px; }
.card .big { font-family: var(--mono); font-size: 30px; font-weight: 700; margin: 6px 0 4px; letter-spacing: -0.01em; }
.card p { font-size: 14px; margin: 6px 0 0; }
.card.cx { border-color: rgba(54, 209, 196, 0.35); }
.card.dn { border-color: rgba(255, 179, 71, 0.35); }
.card.k0 { border-color: rgba(255, 92, 122, 0.35); }
.card.rand { border-color: rgba(199, 125, 255, 0.35); }
.card.mlp { border-color: rgba(159, 176, 212, 0.4); }
.card .mini { height: 56px; margin: 8px 0 4px; }
.card .mini svg { width: 100%; height: 100%; display: block; }
.claim { border-left: 3px solid var(--cx); padding: 4px 0 4px 16px; margin: 18px 0; }
.claim.dn { border-color: var(--dn); }
.claim.k0 { border-color: var(--k0); }
.claim h3 { margin-bottom: 4px; }
.claim p { margin: 0; }
.quote { font-family: var(--mono); font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; margin: 14px 0; }
.quote b { color: var(--fg-2); }
.step-list { list-style: none; padding: 0; margin: 20px 0 0; counter-reset: s; }
.step-list li { position: relative; padding: 14px 0 14px 46px; border-top: 1px solid var(--line); counter-increment: s; }
.step-list li:last-child { border-bottom: 1px solid var(--line); }
.step-list li::before {
  content: counter(s); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--cx); color: var(--cx); font-family: var(--mono); font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.step-list h3 { font-size: 16px; margin-bottom: 2px; }
.step-list p { margin: 0; font-size: 14px; }
.step-list .rec { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 6px; }

/* figures */
figure { margin: 0; }
figure.fig { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
figure.fig img { width: 100%; cursor: zoom-in; background: #fff; }
figure.fig figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
figure.fig figcaption b { color: var(--fg-2); }
.lightbox { position: fixed; inset: 0; background: rgba(4,6,12,0.92); z-index: 100; display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; background: #fff; border-radius: 6px; }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.t th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
table.t td.n, table.t th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.t tr.hl td { color: var(--fg); font-weight: 600; }
table.t td .bar { display: inline-block; height: 8px; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
.tabwrap { overflow-x: auto; }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--mono); fill: var(--muted); font-size: 12px; }
.chart .axis line, .chart .axis path { stroke: var(--line-2); }
.chart .grid line { stroke: var(--line); }
.chart .lbl { fill: var(--fg-2); font-size: 12.5px; }
.chart .title { fill: var(--fg); font-size: 13px; font-family: var(--sans); font-weight: 600; }
.chart .val { fill: var(--fg); font-weight: 600; }

/* pipeline svg */
.pipe { width: 100%; height: auto; display: block; }
.pipe text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.pipe .box { fill: var(--panel-2); stroke: var(--line-2); }
.pipe .box.train { stroke: var(--cx); }
.pipe .box.frozen { stroke: var(--dn); }
.pipe .t { fill: var(--fg); font-family: var(--sans); font-weight: 700; font-size: 13px; }
.pipe .s { fill: var(--muted); font-size: 10.5px; }
.pipe .arrow { stroke: var(--line-2); stroke-width: 1.5; fill: none; marker-end: url(#ah); }
.pipe .flow { stroke: var(--cx); stroke-width: 2; fill: none; stroke-dasharray: 4 10; animation: flow 1.6s linear infinite; opacity: 0.9; }
.pipe .flow.dn { stroke: var(--dn); }
@keyframes flow { to { stroke-dashoffset: -28; } }
.pipe .badge { fill: var(--cx); font-size: 9.5px; letter-spacing: 0.1em; }
.pipe .badge.dn { fill: var(--dn); }
.eq { font-family: var(--mono); font-size: 13.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: var(--fg-2); overflow-x: auto; margin: 12px 0; line-height: 1.8; }
.eq .c { color: var(--muted); }
.eq .cx { color: var(--cx); } .eq .dn { color: var(--dn); }

/* video grid */
.vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 900px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
.vcell { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vcell video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #000; }
.vcell .cap { padding: 10px 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.vcell .cap b { color: var(--fg); display: block; font-size: 13px; margin-bottom: 2px; }
.vcell.cx { border-color: rgba(54, 209, 196, 0.45); }

/* misc */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; }
.hr-label { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; margin: 30px 0 14px; }
.hr-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
pre.bib { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-size: 12.5px; overflow-x: auto; color: var(--fg-2); font-family: var(--mono); line-height: 1.5; }
footer { border-top: 1px solid var(--line); padding: 36px 0 60px; font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.honest { border: 1px solid rgba(255, 92, 122, 0.35); background: rgba(255, 92, 122, 0.06); border-radius: var(--radius); padding: 18px 20px; }
.honest h3 { color: var(--k0); }
.honest ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--fg-2); }
.honest li { margin: 4px 0; }
.ok-list { list-style: none; padding: 0; margin: 10px 0 0; }
.ok-list li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; color: var(--fg-2); }
.ok-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-family: var(--mono); }
.hero-visual { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.hero-visual .cap { position: absolute; left: 12px; bottom: 10px; font-family: var(--mono); font-size: 11px; color: var(--fg-2); background: rgba(7,11,22,0.7); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; }
.hero { padding: 96px 0 40px; }
.hero-h1 { max-width: 1060px; font-size: clamp(40px, 6.2vw, 78px); line-height: 1.02; letter-spacing: -0.03em; }
.hero-lede { font-size: 20px; max-width: 700px; margin: 6px 0 26px; }
.hero-btns { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 28px 0 8px; border-top: 1px solid var(--line); margin-bottom: 40px; }
.stats .v { font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stats .v .vs { font-size: 20px; color: var(--muted); font-weight: 500; }
.stats .v.cx { color: var(--cx); } .stats .v.dn { color: var(--dn); }
.stats .k { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 36px; align-items: start; }
.hero-visual { max-height: 460px; }
.hero-visual img { height: 100%; }
.hero-grid > div, .cols > *, .cards > *, .tiles > div, .telemetry > div { min-width: 0; }
.transport .readout { white-space: normal; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* rasters */
.raster-panel { overflow: hidden; }
.raster-yaw { display: flex; align-items: center; gap: 10px; padding: 8px 16px 4px; }
.raster-yaw .k { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.raster-yaw svg { flex: 1; height: 34px; display: block; }
.raster-wrap { position: relative; margin: 6px 16px 0; height: 300px; background: #000; border-radius: 6px; overflow: hidden; cursor: crosshair; }
.raster-wrap.act { height: 200px; }
.raster-wrap canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.raster-cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: 0.85; left: 0; pointer-events: none; box-shadow: 0 0 6px rgba(255,255,255,0.7); }
.raster-split { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(255,255,255,0.7); pointer-events: none; }
.raster-split span { position: absolute; left: 6px; font-family: var(--mono); font-size: 10.5px; color: #fff; text-shadow: 0 0 4px #000, 0 0 2px #000; }
.raster-split span:first-child { top: -16px; }
.raster-split span:last-child { top: 3px; }

.range-wrap { position: relative; flex: 1 1 200px; min-width: 120px; display: flex; align-items: center; }
.range-wrap input[type=range] { width: 100%; }
.range-wrap .ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; pointer-events: none; }
.range-wrap .ticks span { position: absolute; top: -7px; width: 1px; height: 14px; background: var(--muted-2); }

.brain-box .rot-toggle { position: absolute; right: 12px; top: 34px; z-index: 2; font-family: var(--mono); font-size: 11px; color: var(--fg-2); background: rgba(7,11,22,0.75); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.brain-box .rot-toggle:hover { border-color: var(--cx); color: var(--cx); }
.brain-box .rot-toggle.on { color: var(--cx); }
@media (max-width: 600px) { .brain-box .rot-toggle { top: 10px; } }

/* equations */
.eqs { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 18px; }
.eq-row { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.eq-n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--cx); color: var(--cx); font-family: var(--mono); font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.eq-f { font-family: var(--mono); font-size: 16px; color: var(--fg); letter-spacing: 0.01em; line-height: 1.6; }
.eq-f.dn { color: var(--dn); }
.eq-f sub { font-size: 11px; }
.eq-note { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

/* body row */
.body-row { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 0; border-top: 1px solid var(--line); }
.body-cell { padding: 12px 16px 10px; min-width: 0; }
.body-cell .k, .ladder .k { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.fly-svg { width: 100%; height: 260px; display: block; margin: 6px auto 0; }
.body-legend { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); line-height: 1.4; margin-top: 4px; }
.ladder { border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: 12px 10px 10px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto 1fr; gap: 6px; text-align: center; }
.ladder .k { grid-column: 1 / -1; }
.lad { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.lad .bar { width: 14px; height: 150px; background: var(--panel-2); border-radius: 7px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.lad .fill { width: 100%; height: 0; transition: height 0.12s linear; border-radius: 7px; }
.lad .val { font-family: var(--mono); font-size: 10.5px; color: var(--fg-2); }
.lad .lbl { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
@media (max-width: 900px) { .body-row { grid-template-columns: 1fr; } .ladder { border-left: 0; border-right: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } .lad .bar { height: 90px; } }
