/* NOTREC · notrec — is it a recording? */
@font-face { font-family: "Geist"; src: url("../assets/fonts/Geist.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../assets/fonts/GeistMono.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../assets/fonts/Spectral-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../assets/fonts/Spectral-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../assets/fonts/Spectral-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #12161B; --bg2: #171C22; --panel: #1C2229; --panel2: #232A32; --deep: #0B0E11;
  --line: #2C353F; --line2: #3A444F;
  --fg: #E8ECEF; --fg2: #B9C3CC; --mut: #8A97A4;
  --white: #E6EDF3; --amber: #F2A33A; --red: #E5483B; --cool: #8FB3D9;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --w: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16.5px/1.6 var(--sans); overflow-x: hidden; }
body.idx-open { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cool); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- lights */
.led { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(229, 72, 59, .18), 0 0 14px rgba(229, 72, 59, .7); flex: none; display: inline-block; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--d, #3A444F); box-shadow: 0 0 10px var(--d, transparent); display: inline-block; flex: none; transition: background .5s, box-shadow .5s; }
.dot.live { --d: var(--red); animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .45; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.small { min-height: 38px; padding: 0 15px; font-size: 14.5px; }
.btn.solid { background: var(--fg); color: #0E1216; }
.btn.solid:hover { background: #fff; }
.btn.ghost { border-color: var(--line2); }
.btn.ghost:hover { border-color: var(--fg2); }
.btn.line { border-color: var(--line2); background: transparent; }
.btn.line:hover { border-color: var(--fg2); }

/* ---------------------------------------------------------------- brand + index */
.brand { position: absolute; top: 22px; left: 28px; z-index: 30; display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.brand .led { width: 11px; height: 11px; }
.index-btn { position: fixed; top: 16px; right: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line2); background: rgba(18, 22, 27, .55); backdrop-filter: blur(10px); cursor: pointer; font-weight: 600; font-size: 14.5px; transition: background .2s, border-color .2s; }
body.scrolled .index-btn { background: rgba(28, 34, 41, .94); border-color: var(--line2); }
.index-btn:hover { border-color: var(--fg2); }
.bars { display: grid; gap: 4px; width: 16px; }
.bars i { height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s; }
.index-btn[aria-expanded=true] .bars i:first-child { transform: translateY(3px) rotate(45deg); }
.index-btn[aria-expanded=true] .bars i:last-child { transform: translateY(-3px) rotate(-45deg); }
.index { position: fixed; inset: 0; z-index: 45; background: rgba(9, 11, 14, .94); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; overflow-y: auto; }
.index.open { opacity: 1; }
.index-in { max-width: 820px; margin: 0 auto; padding: 96px 24px 60px; }
.index ol { list-style: none; margin: 0; padding: 0; counter-reset: ix; }
.index li { counter-increment: ix; border-bottom: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 54px 1fr; gap: 2px 16px; padding: 18px 4px; text-decoration: none; }
.index a::before { content: counter(ix); grid-row: span 2; font: 500 15px/2.1 var(--mono); color: var(--mut); }
.index a b { font-size: clamp(24px, 4vw, 34px); font-weight: 600; letter-spacing: -.025em; }
.index a > span { color: var(--fg2); font-size: 15.5px; }
.index a:hover b, .index a.now b { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 110px 28px 0; background: radial-gradient(1200px 700px at 80% -10%, #1E2731 0%, transparent 60%), var(--bg); overflow: hidden; }
.hero-in { max-width: var(--w); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.2vw, 86px); font-weight: 600; letter-spacing: -.045em; line-height: .98; max-width: 11ch; }
.lede { font-size: 18.5px; color: var(--fg2); max-width: 33em; margin: 26px 0 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.bench { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); min-width: 0; }
.lens-row { display: flex; align-items: center; gap: 26px; }
.lens { width: 200px; height: 200px; flex: none; }
.ring { stroke: var(--d, #E6EDF3); filter: drop-shadow(0 0 6px var(--d, #E6EDF3)); transition: stroke .7s ease, filter .7s ease; }
.ring.judged { filter: drop-shadow(0 0 14px var(--d)); }
.lights { display: grid; gap: 12px; }
.lt { margin: 0; display: grid; grid-template-columns: 16px 90px auto; align-items: center; gap: 10px; font-size: 15px; }
.lt span { color: var(--mut); }
.lt b { font-weight: 600; }
.readout { margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.readout div { min-width: 0; }
.readout dt { font-size: 13px; color: var(--mut); }
.readout dd { margin: 2px 0 0; font-weight: 600; font-size: 16px; line-height: 1.35; }
.verdict-line { margin: 20px 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.verdict-line::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: 0 0 14px var(--c); }
.kept { margin: 0; background: var(--deep); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font: 13px/1.6 var(--mono); color: #CFD8E0; height: 168px; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips button { border: 1px solid var(--line2); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; color: var(--fg2); }
.chips button:hover { color: var(--fg); border-color: var(--fg2); }
.chips button[aria-pressed=true] { background: var(--fg); color: #0E1216; border-color: var(--fg); }
/* the token as a rating plate */
.plate { position: relative; max-width: var(--w); margin: 70px auto 0; border-radius: 14px 14px 0 0; padding: 22px 34px 18px; color: #1A1F24;
  background: linear-gradient(180deg, #D5DADE, #B9C0C6), repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 2px, rgba(0, 0, 0, .03) 2px 4px); background-blend-mode: multiply; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 -10px 40px rgba(0, 0, 0, .35); }
.screw { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F1F3F4, #8C959D); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 2px; background: rgba(0, 0, 0, .35); transform: rotate(35deg); }
.screw:nth-child(1) { top: 10px; left: 10px; } .screw:nth-child(2) { top: 10px; right: 10px; } .screw:nth-child(3) { bottom: 10px; left: 10px; } .screw:nth-child(4) { bottom: 10px; right: 10px; }
.plate-grid { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px 40px; align-items: end; }
.plate-grid p { margin: 0; min-width: 0; }
.plate small { display: block; font-size: 12.5px; color: #4C565F; font-weight: 500; }
.plate b { font: 600 15.5px/1.4 var(--mono); letter-spacing: .01em; }
.plate-ca b { word-break: break-all; }
.plate-act { display: flex; align-items: center; gap: 12px; }
.plate .btn.solid { background: #1A1F24; color: #EEF1F3; }
.plate .btn.solid:hover { background: #000; }
.copy-note { font-size: 14px; font-weight: 600; }
.marks { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(26, 31, 36, .2); font-size: 12.5px; color: #4C565F; }
.marks svg { width: 22px; height: 22px; }
.marks span { margin-left: 6px; }

/* ---------------------------------------------------------------- sections */
main { background: var(--bg); }
.sec { max-width: var(--w); margin: 0 auto; padding: 110px 28px 0; }
.head { margin-bottom: 36px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; }
.head .led { margin-top: 2px; }
.head h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 600; letter-spacing: -.035em; }
.head p { grid-column: 2; margin: 4px 0 0; color: var(--fg2); max-width: 46em; font-size: 17px; }
h3 { font-weight: 600; letter-spacing: -.015em; }

/* ---------------------------------------------------------------- tester */
.tester { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.build { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 18px; position: sticky; top: 76px; }
.f { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.f legend { font-size: 13.5px; color: var(--mut); padding: 0; margin-bottom: 8px; font-weight: 500; }
select, input[type=number] { background: var(--deep); border: 1px solid var(--line2); border-radius: 10px; height: 42px; padding: 0 12px; width: 100%; }
input[type=number] { width: 74px; height: 34px; padding: 0 8px; }
select:focus, input:focus { outline: none; border-color: var(--cool); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg button { border: 0; background: transparent; height: 38px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--fg2); }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button[aria-pressed=true] { background: var(--fg); color: #0E1216; }
.steps { display: grid; gap: 2px; }
.step { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 7px 10px; border-radius: 10px; font-size: 14.5px; }
.step.on { background: var(--panel2); }
.prm { display: inline-flex; align-items: center; gap: 6px; color: var(--fg2); font-size: 13.5px; margin-left: 26px; }
.prm label { display: inline-flex; gap: 6px; align-items: center; }
.tick { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.tick input, .prm input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--fg); margin: 0; }
.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.two label { display: grid; gap: 6px; font-size: 13.5px; color: var(--mut); }
.unit { display: inline-flex; align-items: center; gap: 8px; color: var(--fg2); }
.out { min-width: 0; display: grid; gap: 18px; }
.out.idle > :not(.verdict) { opacity: .25; pointer-events: none; }
.verdict { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--line2)); }
.verdict p { margin: 0; }
.cls { display: inline-grid; place-items: center; min-width: 50px; height: 50px; border-radius: 12px; background: var(--c); color: #12161B; font: 600 18px var(--mono); flex: none; }
.v-big { font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.v-why { color: var(--fg2); margin-top: 2px !important; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fact { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg2); display: grid; gap: 2px; align-content: start; min-height: 106px; }
.fact b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.fact small { color: var(--mut); font-size: 13px; }
.f-state { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.f-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.fact.back { border-color: rgba(229, 72, 59, .55); background: rgba(229, 72, 59, .08); }
.fact.back .f-state { color: #FF8A7E; }
.fact.back .f-state::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.fact.gone b { color: var(--fg2); font-weight: 500; }
.fact.gone .f-state { color: var(--mut); }
.decoys { grid-column: 1 / -1; margin: 0; color: var(--mut); font-size: 14px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.claim-box, .notice-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.c-h { margin: 0 0 6px; font-size: 13px; color: var(--mut); }
.c-q { margin: 0 0 10px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.c-row { margin: 4px 0 0; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.mk { width: 18px; height: 18px; border-radius: 50%; position: relative; flex: none; }
.mk.yes { background: #DDE6EE; }
.mk.yes::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #12161B; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mk.no { background: var(--red); }
.mk.no::after { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 2px; background: #fff; }
.lights-row { display: grid; gap: 6px; }
.lights-row p { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; }
.gaps { margin: 10px 0 0; padding-left: 18px; color: #FF9B90; font-size: 14.5px; }
.ok-line { margin: 10px 0 0; color: var(--fg2); font-size: 14.5px; }
.kept-view { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--deep); }
.kv-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--panel); }
.kv-tabs button { border: 0; background: transparent; padding: 11px 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--fg2); border-bottom: 2px solid transparent; }
.kv-tabs button small { color: var(--mut); font-weight: 400; margin-left: 4px; }
.kv-tabs button[aria-selected=true] { color: var(--fg); border-bottom-color: var(--fg); }
.kv-body { padding: 16px 18px; max-height: 320px; overflow: auto; }
.lines { list-style: none; margin: 0; padding: 0; font: 13.5px/1.6 var(--mono); }
.lines li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 3px 0; }
.lines .t { color: var(--mut); }
mark { background: none; color: #FFC069; text-decoration: underline; text-decoration-color: rgba(242, 163, 58, .7); text-underline-offset: 3px; }
.empty, .kv-note { margin: 0; color: var(--fg2); font-size: 14.5px; }
.kv-note { margin-bottom: 10px; }
.strip { display: grid; grid-template-columns: repeat(64, 1fr); gap: 1px; }
.strip i { aspect-ratio: 1; background: #1E252C; }
.media p { margin: 10px 0 0; color: var(--fg2); font-size: 14.5px; }
.wave { display: flex; align-items: center; gap: 3px; height: 70px; }
.wave i { flex: 1; background: var(--red); border-radius: 2px; opacity: .8; }
.card { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 16px; overflow: hidden; font-size: 14.5px; }
.card caption { text-align: left; font-size: 13px; color: var(--mut); padding-bottom: 8px; }
.card th, .card td { text-align: left; padding: 9px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.card th { font-weight: 500; color: var(--fg2); width: 230px; }
.card tr:last-child td { font-weight: 600; }
.out-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.script { margin-top: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); }
.script summary { cursor: pointer; padding: 15px 18px; font-weight: 600; list-style-position: inside; }
.script summary span { color: var(--mut); font-weight: 400; margin-left: 8px; font-size: 14.5px; }
.script-body { padding: 0 18px 18px; }
.script-body .lines { font-family: var(--sans); font-size: 15px; }
.seen { color: #9DBFDF; }
.snd { color: var(--mut); }
.tap { color: var(--amber); }
.facts-key { color: var(--fg2); font-size: 14.5px; margin: 14px 0 0; }

/* ---------------------------------------------------------------- gate */
.gate { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.gate-ctl { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 16px; }
.gate-h { margin: 0; font-size: 13.5px; color: var(--mut); }
.people { display: grid; gap: 8px; }
.people button { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--bg2); cursor: pointer; }
.people b { font-weight: 600; }
.people small { color: var(--mut); grid-column: 1; }
.yn { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 13.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.people button[aria-pressed=true] { border-color: var(--fg2); }
.people button[aria-pressed=true] .yn { background: var(--fg); color: #12161B; }
.people button[aria-pressed=true] .yn::after { content: "said yes"; }
.people button[aria-pressed=false] .yn { border: 1px solid var(--red); color: #FF8A7E; }
.people button[aria-pressed=false] .yn::after { content: "said no"; }
.gate-sum p { margin: 6px 0 0; color: var(--fg2); font-size: 15px; }
.gate-sum b { color: var(--fg); }
.g-cls { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--fg) !important; font-size: 18px !important; margin: 0 !important; }
.g-cls .cls { min-width: 42px; height: 42px; font-size: 15px; }
.tape { list-style: none; margin: 0; padding: 14px 18px; background: var(--deep); border: 1px solid var(--line); border-radius: 18px; max-height: 560px; overflow: auto; }
.tape li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 5px 0; font-size: 15px; border-bottom: 1px solid rgba(44, 53, 63, .5); }
.tape li:last-child { border-bottom: 0; }
.tape .t { color: var(--mut); font: 13px/1.9 var(--mono); }
.tape li.cut span:last-child { color: var(--mut); display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tape .bar { width: 64px; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--amber) 0 6px, transparent 6px 10px); opacity: .7; flex: none; }

/* ---------------------------------------------------------------- classes and lights */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rung { display: grid; grid-template-columns: 64px minmax(0, 1fr) 280px; gap: 22px; align-items: center; padding: 18px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.rung .cls { width: 56px; height: 56px; font-size: 19px; }
.rung h3 { font-size: 20px; }
.rung p { margin: 3px 0 0; color: var(--fg2); font-size: 15px; }
.rung .ex { color: var(--mut); font-size: 14px; }
.rung-light { display: flex; align-items: center; gap: 14px; font-size: 14.5px; color: var(--fg2); }
.rung-light svg { flex: none; }
.shapes-wrap { margin-top: 46px; }
.shapes-wrap h3 { font-size: 24px; }
.shapes-p { color: var(--fg2); margin: 6px 0 16px; }
.tw { overflow-x: auto; }
.shapes { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.shapes th, .shapes td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.shapes th { color: var(--mut); font-weight: 500; font-size: 13.5px; }
.shapes td:first-child { font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- paper */
.note { background: #F3F4F2; color: #1B2026; border-radius: 22px; padding: 64px 64px 56px; font-family: var(--serif); }
.note-head { max-width: 680px; margin-bottom: 30px; }
.note-kicker { margin: 0 0 14px; font: italic 16px var(--serif); color: #59636D; }
.note-head h3 { font: 600 clamp(28px, 3.4vw, 40px)/1.15 var(--serif); letter-spacing: -.01em; }
.note-by { margin: 12px 0 0; font-size: 17px; color: #3B444D; }
.note-body { position: relative; padding-right: 310px; font-size: 17.5px; line-height: 1.7; }
.note-body > * { max-width: 680px; }
.abstract { background: #E6E9E6; border-radius: 10px; padding: 18px 22px; font-size: 16.5px; }
.note-body h4 { font: 600 20px var(--serif); margin: 34px 0 8px; }
.note-body p { margin: 0 0 14px; }
.side { float: right; clear: right; width: 250px; margin-right: -310px; font: 14.5px/1.55 var(--serif); color: #3B444D; border-top: 2px solid #1B2026; padding-top: 8px; margin-top: 4px; }
.side b { display: block; font-weight: 600; color: #1B2026; }
.cite { font: 600 12px var(--sans); vertical-align: super; text-decoration: none; color: #B03A2E; margin-left: 2px; }
.fig { margin: 30px 0; max-width: 680px; }
.fig-plot { font-family: var(--sans); min-height: 200px; }
.fig-plot svg { width: 100%; height: auto; }
.fig figcaption, .data caption { font: 15px/1.55 var(--serif); color: #3B444D; text-align: left; margin-top: 10px; }
.data { width: 100%; border-collapse: collapse; font: 14.5px/1.45 var(--sans); min-width: 560px; }
.data caption { caption-side: top; margin: 0 0 10px; }
.data th, .data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #D5D9D6; vertical-align: top; }
.data thead th { border-top: 2px solid #1B2026; border-bottom: 1px solid #1B2026; font-weight: 600; }
.data tbody tr:last-child td { border-bottom: 2px solid #1B2026; }
.data em { color: #6A737B; font-style: normal; font-size: 13px; }
.cls-t { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--c); color: #12161B; font: 600 12.5px var(--mono); }
.refs { padding-left: 20px; font-size: 15.5px; }
.refs li { margin-bottom: 8px; }
.refs a { color: #9C3226; }

/* ---------------------------------------------------------------- docs */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-width: 0; display: flex; flex-direction: column; }
.doc h3 { font-size: 16.5px; }
.doc h3 code { font-size: 15.5px; font-weight: 600; }
.doc > p { color: var(--fg2); font-size: 15px; margin: 6px 0 12px; }
.code, .result { margin: 0; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font: 13px/1.6 var(--mono); overflow-x: auto; color: #D3DCE4; }
.doc-run { margin: 12px 0 0; }
.result { margin-top: 10px; border-left: 3px solid var(--amber); color: #F5D9A8; max-height: 300px; overflow: auto; white-space: pre; }
.docs-note { grid-column: 1 / -1; color: var(--mut); font-size: 14.5px; margin: 4px 0 0; }

/* ---------------------------------------------------------------- source */
.source { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 28px; align-items: start; }
.term { background: var(--deep); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-width: 0; }
.term-bar { display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px; background: var(--panel); border-bottom: 1px solid var(--line); font: 500 13.5px var(--mono); }
.term-hint { color: var(--mut); font-family: var(--sans); }
.term-out { height: 380px; overflow: auto; padding: 14px 16px; font: 12.5px/1.55 var(--mono); }
.term-out .cmd { color: var(--fg); }
.ps { color: var(--red); }
.term-out .res { margin: 2px 0 14px; color: #C8D2DB; white-space: pre; }
.term-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-top: 1px solid var(--line); font: 14px var(--mono); }
.term-in > span { color: var(--red); }
.term-in input { flex: 1; min-width: 0; background: transparent; border: 0; height: 38px; font: 14px var(--mono); outline: none; }
.term-try { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.term-try button { border: 1px solid var(--line2); background: transparent; border-radius: 8px; padding: 5px 10px; font: 12.5px var(--mono); color: var(--fg2); cursor: pointer; }
.term-try button:hover { color: var(--fg); border-color: var(--fg2); }
.get h3 { font-size: 20px; margin-bottom: 12px; }
.get pre { margin: 0 0 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font: 13.5px/1.7 var(--mono); overflow-x: auto; }
.dl { margin: 0 0 8px; color: var(--fg2); font-size: 15px; }
.dl a { font-weight: 600; color: var(--fg); margin-right: 6px; text-underline-offset: 3px; text-decoration-color: var(--red); }
.repo-link { display: inline-block; margin: 6px 0 0; font-weight: 600; }
.get h3:nth-of-type(2) { margin-top: 34px; }
.changes h4 { font-size: 16px; margin: 0 0 8px; }
.changes h4 span { color: var(--mut); font-weight: 400; }
.changes ul { margin: 0; padding-left: 18px; color: var(--fg2); font-size: 14.5px; }
.changes li { margin-bottom: 6px; }
.files { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; margin-top: 28px; align-items: start; }
.file-list { list-style: none; margin: 0; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.file-list button { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 0 2px; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: 13.5px var(--mono); }
.file-list button:hover { background: var(--panel2); }
.file-list button[aria-pressed=true] { background: var(--fg); color: #0E1216; }
.file-list .dir { color: var(--mut); }
.file-list button[aria-pressed=true] .dir, .file-list button[aria-pressed=true] small { color: #4A535C; }
.file-list b { font-weight: 600; }
.file-list small { grid-column: 1 / -1; color: var(--mut); font: 12px var(--sans); }
.viewer { background: var(--deep); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 0; }
.viewer-head { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.viewer-head b { font: 600 14px var(--mono); }
.viewer-head span { color: var(--mut); font-size: 13.5px; }
.viewer-body { max-height: 520px; overflow: auto; }
.viewer-body pre { margin: 0; padding: 12px 0; font: 12.5px/1.6 var(--mono); counter-reset: ln; min-width: max-content; }
.ln { display: block; padding-right: 18px; white-space: pre; }
.ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 50px; padding-right: 14px; text-align: right; color: #56616C; user-select: none; }

/* ---------------------------------------------------------------- market */
.monitor { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
.screen { background: var(--deep); border: 1px solid var(--line); border-radius: 22px; padding: 10px; min-width: 0; }
.screen-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; font-size: 14px; color: var(--fg2); }
.chart-in { position: relative; height: 520px; border-radius: 14px; overflow: hidden; background: #fff; }
.chart-in iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.standby { position: absolute; inset: 0; display: grid; place-items: center; color: #5E6872; background: #fff; transition: opacity .3s; }
.standby.off { opacity: 0; pointer-events: none; }
.meters { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 8px 20px; display: grid; align-content: start; }
.meters > div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.meters > div:last-child { border-bottom: 0; }
.meters dt { font-size: 13px; color: var(--mut); }
.meters dd { margin: 2px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.m-big dd:first-of-type { font-size: 34px; letter-spacing: -.03em; }
.meters dd.chg { font-size: 14.5px; font-weight: 500; color: var(--mut); }
.chg.up { color: #8FD6B0 !important; }
.chg.down { color: #FF8A7E !important; }
.chart-out { font-weight: 600; font-size: 15px; text-underline-offset: 3px; text-decoration-color: var(--red); }
.ports { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ports a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: border-color .15s; }
.ports a:hover { border-color: var(--fg2); }
.ports img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; background: var(--deep); padding: 3px; }
.ports .at { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--deep); color: var(--red); }
#lnkPump { background: var(--fg); color: #0E1216; border-color: var(--fg); }
#lnkPump img { background: #fff; }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: 120px; background: var(--deep); border-top: 1px solid var(--line); padding: 70px 28px 50px; }
.foot-in { max-width: var(--w); margin: 0 auto; }
.foot-say { margin: 0 0 30px; font-size: clamp(30px, 4.4vw, 56px); font-weight: 600; letter-spacing: -.04em; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.legend li { display: flex; gap: 14px; align-items: flex-start; }
.legend svg { flex: none; }
.legend p { margin: 0; color: var(--fg2); font-size: 14.5px; }
.legend b { display: block; color: var(--fg); font-size: 16px; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 30px; margin-top: 54px; padding-top: 22px; border-top: 1px solid var(--line); }
.foot-row p { margin: 0; }
.foot-ver { color: var(--mut); font-size: 14.5px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { text-decoration: none; font-weight: 600; font-size: 15px; }
.foot-links a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.foot-note { margin: 18px 0 0; color: var(--mut); font-size: 14px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1120px) {
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 14ch; }
  .bench { max-width: 640px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rung { grid-template-columns: 64px minmax(0, 1fr); }
  .rung-light { grid-column: 2; }
  .note-body { padding-right: 0; }
  .side { float: none; width: auto; margin: 6px 0 14px 24px; max-width: 600px; display: block; }
  .monitor { grid-template-columns: 1fr; }
  .meters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
  .meters > div { border-bottom: 1px solid var(--line) !important; }
  .m-big { grid-column: 1 / -1; }
  .m-link { grid-column: 1 / -1; border-bottom: 0 !important; }
}
@media (max-width: 900px) {
  .tester, .gate, .source, .files { grid-template-columns: 1fr; }
  .build { position: static; }
  .docs { grid-template-columns: 1fr; }
  .plate-grid { grid-template-columns: 1fr 1fr; }
  .plate-ca, .plate-act { grid-column: 1 / -1; }
  .legend { grid-template-columns: 1fr 1fr; }
  .pair { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand { top: 20px; left: 16px; }
  .index-btn { top: 12px; right: 12px; }
  .hero { padding: 92px 16px 0; }
  .hero h1 { font-size: 46px; }
  .lede { font-size: 17px; }
  .cta .btn { flex: 1 1 100%; }
  .bench { padding: 18px; border-radius: 20px; }
  .lens-row { gap: 16px; }
  .lens { width: 128px; height: 128px; }
  .lt { grid-template-columns: 14px auto; font-size: 14px; }
  .lt b { grid-column: 2; margin-top: -8px; }
  .readout { grid-template-columns: 1fr; gap: 10px; }
  .verdict-line { font-size: 22px; }
  .plate { margin-top: 50px; padding: 22px 20px 16px; }
  .plate-grid { grid-template-columns: 1fr; gap: 10px; }
  .plate b { font-size: 14px; }
  .sec { padding: 84px 16px 0; }
  .head { grid-template-columns: auto 1fr; }
  .head p { grid-column: 1 / -1; font-size: 16px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fact { min-height: 0; padding: 10px 12px; }
  .verdict { padding: 16px; gap: 14px; }
  .v-big { font-size: 22px; }
  .card th { width: 42%; }
  .card th, .card td { padding: 8px 12px; }
  .note { padding: 34px 18px 30px; border-radius: 16px; margin: 0 -4px; }
  .note-body { font-size: 16.5px; }
  .side { margin-left: 0; }
  .rung { grid-template-columns: 52px minmax(0, 1fr); padding: 16px; gap: 14px; }
  .rung .cls { width: 46px; height: 46px; font-size: 16px; }
  .rung-light { grid-column: 1 / -1; }
  .meters { grid-template-columns: 1fr 1fr; }
  .chart-in { height: 440px; }
  .term-out { height: 320px; }
  .legend { grid-template-columns: 1fr; }
  .foot { padding: 56px 16px 40px; }
}
