/* Grounded · evergreen + highlighter. Light by default, dark on request. */
:root {
  --bg: #FFFFFF;
  --bg-2: #F4F5F0;
  --surface: #FFFFFF;
  --surface-2: #F7F8F4;
  --line: #E3E6DD;
  --line-2: #D2D7CB;
  --text: #13170F;
  --text-2: #4B5345;
  --text-3: #7A8273;
  --brand: #14573F;
  --brand-2: #0E4230;
  --brand-soft: #E5F0E9;
  --hl: #E2F86A;
  --hl-ink: #1D2410;
  --ok: #1B7A4B;
  --idk: #6A57D6;
  --miss: #C9A227;
  --bad: #D9452B;
  --shadow: 0 1px 2px rgb(19 23 15 / .05), 0 12px 32px -14px rgb(19 23 15 / .16);
  --r: 16px;
  --nav-h: 64px;
  --head: 'Bricolage Grotesque', system-ui, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0C0F0C;
  --bg-2: #111511;
  --surface: #141914;
  --surface-2: #181E18;
  --line: #242B23;
  --line-2: #323B30;
  --text: #EEF2E9;
  --text-2: #B3BCAB;
  --text-3: #7F8978;
  --brand: #7DD3A6;
  --brand-2: #A6E5C3;
  --brand-soft: #16261C;
  --hl: #D6F25A;
  --hl-ink: #141A08;
  --ok: #4FCB86;
  --idk: #9D8CFF;
  --miss: #E2BD45;
  --bad: #FF6B4F;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px -18px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { display: block; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font: 600 15px var(--sans); text-decoration: none; white-space: nowrap; transition: transform .2s, background .2s, border-color .2s, color .2s; }
.btn:active { transform: scale(.98); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); }
[data-theme="dark"] .btn-brand { color: #07140D; }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-lime { background: var(--hl); color: var(--hl-ink); }
.btn-lime:hover { filter: brightness(1.05); }
.btn-line { border: 1px solid rgb(255 255 255 / .28); color: #fff; }
.btn-line:hover { border-color: #fff; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text-2); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[href*="github"] svg { fill: currentColor; stroke: none; }

/* ---------- nav */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-color: var(--line); }
.nav-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px var(--head); letter-spacing: -.03em; }
.logo { width: 30px; height: 30px; }
.lg-b { fill: var(--brand); }
.lg-l { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
[data-theme="dark"] .lg-l { stroke: #0C0F0C; }
.lg-h { fill: var(--hl); }
.links { display: flex; gap: 4px; margin-left: 8px; }
.links a { position: relative; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: color .2s, background .2s; }
.links a:hover { color: var(--text); background: var(--bg-2); }
.links a.active { color: var(--text); }
.links a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--hl); box-shadow: 0 0 0 1px color-mix(in srgb, var(--hl) 40%, var(--brand)); }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-r .btn { margin-left: 8px; }
.i-sun { display: none !important; }
[data-theme="dark"] .i-sun { display: block !important; }
[data-theme="dark"] .i-moon { display: none !important; }

/* ---------- highlighter */
mark.hl { background: none; color: inherit; position: relative; white-space: nowrap; z-index: 0; }
mark.hl::before { content: ""; position: absolute; z-index: -1; left: -.08em; right: -.1em; top: .14em; bottom: .06em; background: var(--hl); border-radius: .14em .3em .22em .1em; transform: skew(-4deg) scaleX(var(--hx, 1)); transform-origin: left; transition: transform .9s cubic-bezier(.7, 0, .2, 1); }
.js mark.hl:not(.on)::before { --hx: 0; }
[data-theme="dark"] mark.hl { color: var(--hl-ink); }

/* ---------- hero */
.hero { min-height: min(calc(100svh - var(--nav-h)), 860px); display: flex; align-items: center; padding: 28px 0 40px; background: radial-gradient(900px 420px at 85% 10%, var(--brand-soft), transparent 70%); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 500 13px var(--mono); color: var(--text-2); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5.2vw, 70px); font-weight: 750; }
.lead { margin-top: 20px; max-width: 560px; font-size: 18px; color: var(--text-2); line-height: 1.6; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); width: fit-content; max-width: 100%; }
.facts li { padding: 12px 22px; display: flex; flex-direction: column; gap: 2px; }
.facts li + li { border-left: 1px solid var(--line); }
.facts b { font: 700 28px/1.1 var(--head); letter-spacing: -.03em; }
.facts li > span { font-size: 13px; color: var(--text-3); max-width: 150px; line-height: 1.35; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.note { margin-top: 18px; font-size: 13.5px; color: var(--text-3); max-width: 520px; }
.note a { color: var(--text-2); }

/* ---------- the bot */
.bot { display: flex; flex-direction: column; height: clamp(520px, calc(100svh - var(--nav-h) - 72px), 680px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.bot-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--line); }
.bot-id { display: flex; align-items: center; gap: 12px; }
.av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--text); color: var(--bg); font: 700 13px var(--head); letter-spacing: .02em; }
.bot-id b { display: block; font-size: 15px; line-height: 1.2; }
.bot-id small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.bot-id .on { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { max-width: 88%; font-size: 15px; line-height: 1.55; }
.msg p + p { margin-top: 6px; }
.user-msg { align-self: flex-end; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.bot-msg { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 16px 16px 16px 4px; }
.bot-msg .cite { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px; vertical-align: 1px; border-radius: 6px; background: var(--hl); color: var(--hl-ink); font: 600 11.5px var(--mono); cursor: pointer; transition: transform .15s; }
.bot-msg .cite:hover { transform: translateY(-1px); }
.srcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.src { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--text-2); transition: border-color .2s, color .2s; }
.src:hover { border-color: var(--brand); color: var(--text); }
.src i { font: 600 11px var(--mono); font-style: normal; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--hl); color: var(--hl-ink); }
.idk { border-color: color-mix(in srgb, var(--idk) 35%, var(--line)); background: color-mix(in srgb, var(--idk) 7%, var(--surface)); }
.idk-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 600 11.5px var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--idk); }
.idk-tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--idk); }
.idk a.hand { display: inline-flex; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--idk); text-decoration: none; }
.idk a.hand:hover { text-decoration: underline; }
.meta { display: flex; gap: 10px; margin-top: 8px; font: 500 11.5px var(--mono); color: var(--text-3); }
.meta button { color: var(--text-3); text-decoration: underline; text-underline-offset: 2px; }
.meta button:hover { color: var(--text); }
.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: bob 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.stage { font: 500 12px var(--mono); color: var(--text-3); margin-top: 6px; min-height: 18px; }
.err { color: var(--bad); font-size: 14px; }
.chips { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--text-2); transition: border-color .2s, color .2s, background .2s; }
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.nope { border-style: dashed; }
.composer { display: flex; gap: 8px; margin: 0 14px; padding: 6px 6px 6px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.composer input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 400 15px var(--sans); color: var(--text); }
.composer input::placeholder { color: var(--text-3); }
.send { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; transition: background .2s, transform .2s; }
[data-theme="dark"] .send { color: #07140D; }
.send:hover { background: var(--brand-2); }
.send:disabled { opacity: .45; cursor: default; }
.send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bot-foot { padding: 8px 16px 12px; font-size: 11.5px; color: var(--text-3); text-align: center; }

/* ---------- sections */
.sec { padding: clamp(48px, 7.5vh, 88px) 0; }
.sec.alt { background: var(--bg-2); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.eyebrow { font: 600 13px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.eyebrow.light { color: var(--hl); }
h2 { font-size: clamp(32px, 3.8vw, 50px); }
.sec-sub { color: var(--text-2); font-size: 16.5px; max-width: 520px; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .muted { color: var(--text-3); }
.lg { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.lg.ans, .lg.ok { background: var(--ok); }
.lg.ref, .lg.idk { background: var(--idk); }
.lg.miss { background: var(--miss); }
.lg.bad { background: var(--bad); }
.lg.neutral { background: var(--text-3); }

/* ---------- trace */
.trace { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .25s, background .25s, transform .25s; }
.steps li:hover { border-color: var(--line-2); }
.steps li.on { border-color: var(--brand); background: var(--brand-soft); }
.steps .n { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font: 700 14px var(--mono); background: var(--bg-2); color: var(--text-2); transition: background .25s, color .25s; }
.steps li.on .n { background: var(--brand); color: #fff; }
[data-theme="dark"] .steps li.on .n { color: #07140D; }
.steps b { display: block; font: 650 17px var(--head); letter-spacing: -.01em; }
.steps small { display: block; margin-top: 4px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.trace-panel { display: flex; flex-direction: column; min-height: 400px; max-height: 470px; overflow: hidden; }
.tp-q { display: flex; gap: 12px; align-items: baseline; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.tp-q span { font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); flex: none; }
.tp-q b { font-weight: 600; font-size: 16px; }
.tp-body { flex: 1; overflow-y: auto; padding: 16px 20px 20px; }
.hits { display: grid; gap: 8px; }
.hit { display: grid; grid-template-columns: 22px minmax(0, 1fr) 110px 56px; gap: 12px; align-items: center; font-size: 14px; }
.hit .rk { font: 600 12px var(--mono); color: var(--text-3); }
.hit .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit.read .tt { font-weight: 600; }
.hit .bar { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.hit .bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transform-origin: left; }
.hit.read .bar i { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--hl))); }
.hit .sc { font: 500 12.5px var(--mono); color: var(--text-2); text-align: right; }
.hits-h { display: grid; grid-template-columns: 22px minmax(0, 1fr) 110px 56px; gap: 12px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding-bottom: 4px; }
.hits-h span:last-child { text-align: right; }
.tp-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); font-size: 14px; color: var(--text-2); }
.tp-note b { color: var(--text); }
.verdict { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); }
.verdict .vk { flex: none; padding: 5px 10px; border-radius: 8px; font: 600 12px var(--mono); }
.verdict.yes .vk { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.verdict.no .vk { background: color-mix(in srgb, var(--idk) 14%, transparent); color: var(--idk); }
.verdict p { font-size: 15px; }
.raw { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); font: 400 13px/1.6 var(--mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.checks i { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 700 12px var(--mono); font-style: normal; }
.checks i.y { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.checks i.n { background: color-mix(in srgb, var(--idk) 16%, transparent); color: var(--idk); }
.timing { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin-top: 16px; background: var(--bg-2); }
.timing i { display: block; height: 100%; }
.timing .t1 { background: var(--brand); } .timing .t2 { background: var(--hl); }
.timing-l { display: flex; justify-content: space-between; margin-top: 6px; font: 500 12px var(--mono); color: var(--text-3); }

/* ---------- cutoff */
.cut { position: relative; padding: 22px 24px; }
.cut-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.cut-read { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cut-read div { padding: 12px 16px; border-radius: 14px; background: var(--bg-2); }
.cut-read b { display: block; font: 700 34px/1.1 var(--head); letter-spacing: -.03em; transition: color .2s; }
.cut-read div:first-child b { color: var(--miss); }
.cut-read div:last-child b { color: var(--bad); }
.cut-read span { font-size: 13px; color: var(--text-2); line-height: 1.35; display: block; margin-top: 2px; }
.cut-ctl { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.cut-ctl b { font: 600 15px var(--mono); color: var(--text); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: none; cursor: grab; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand) var(--p, 0%), var(--line) var(--p, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); box-shadow: 0 2px 8px rgb(0 0 0 / .18); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.strip { position: relative; height: 190px; margin-top: 22px; border-radius: 14px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 25%); background-color: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.strip .lane { position: absolute; left: 0; right: 0; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 6px 10px; pointer-events: none; }
.strip .dot { position: absolute; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; border: 2px solid var(--surface); transition: opacity .25s, transform .25s, box-shadow .25s; cursor: pointer; }
.strip .dot.a { background: var(--ok); }
.strip .dot.r { background: var(--idk); }
.strip .dot.cut-a { background: var(--miss); transform: scale(1.15); }
.strip .dot.pass-r { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 55%, transparent); }
.strip .dot:hover { transform: scale(1.5); z-index: 2; }
.strip .shade { position: absolute; top: 0; bottom: 0; left: 0; background: color-mix(in srgb, var(--miss) 12%, transparent); border-right: 2px solid var(--miss); pointer-events: none; transition: width .05s; }
.strip-axis { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11.5px var(--mono); color: var(--text-3); }
.cut-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.cut-take { font-size: 14.5px; color: var(--text-2); max-width: 560px; }
.cut-take b { color: var(--text); }
.tip { position: absolute; z-index: 5; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 13px; line-height: 1.45; pointer-events: none; box-shadow: var(--shadow); }
.tip small { display: block; margin-top: 4px; font: 500 11.5px var(--mono); opacity: .7; }

/* ---------- eval */
.ev { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px; align-items: start; }
.ev-chart { padding: 0 0 18px; }
.ev-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ev-tabs::-webkit-scrollbar { display: none; }
.ev-tabs button { position: relative; flex: none; padding: 15px 10px 14px; font: 600 14.5px var(--sans); color: var(--text-3); }
.ev-tabs button[aria-selected="true"] { color: var(--text); }
.ev-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.bars { display: grid; gap: 12px; padding: 20px 22px 6px; }
.brow { display: grid; grid-template-columns: 200px minmax(0, 1fr) 54px; gap: 14px; align-items: center; }
.brow .bl b { display: block; font: 650 14.5px var(--head); }
.brow .bl small { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
.stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.stack i { display: block; height: 100%; transform-origin: left; position: relative; }
.stack i + i { box-shadow: inset 1px 0 0 var(--surface); }
.stack .ok { background: var(--ok); } .stack .idk { background: var(--idk); } .stack .miss { background: var(--miss); } .stack .bad { background: var(--bad); }
.brow .pc { font: 700 18px var(--head); text-align: right; }
.brow.big .stack { height: 40px; }
.brow.big .pc { font-size: 24px; }
.ev-legend { padding: 12px 22px 0; }
.ev-side { display: flex; flex-direction: column; gap: 16px; }
.quote { padding: 18px 22px; }
.quote .qk { font: 600 11.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--bad); }
.quote .qq { margin-top: 10px; font: 600 16px/1.35 var(--head); }
.quote .qa { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--bad); font-size: 14.5px; color: var(--text-2); }
.quote .qf { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.quote .qf b { color: var(--ok); }
.quote .qnav { display: flex; gap: 6px; margin-top: 14px; }
.quote .qnav button { width: 26px; height: 6px; border-radius: 3px; background: var(--line-2); }
.quote .qnav button.on { background: var(--text); }
.rules { padding: 20px 22px; }
.rules b { font: 650 16px var(--head); }
.rules ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.rules li { display: flex; gap: 10px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.rules .lg { margin-top: 6px; }

/* ---------- cards */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.c-n { font: 600 13px var(--mono); color: var(--text-3); }
.card h3 { margin-top: 36px; font-size: 22px; }
.card p { margin-top: 10px; font-size: 15px; color: var(--text-2); }

/* ---------- faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; }
.faq-grid .sec-sub { margin-top: 16px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font: 600 17px var(--head); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 24px var(--sans); color: var(--text-3); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--text-2); font-size: 15.5px; max-width: 640px; }

/* ---------- hire */
#hire { padding-top: 0; }
.hire { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; padding: clamp(32px, 5vw, 56px); border-radius: 28px; background: #0F3A2B; color: #fff; position: relative; overflow: hidden; }
.hire::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgb(226 248 106 / .08); pointer-events: none; }
[data-theme="dark"] .hire { background: #12291F; border: 1px solid #1F3A2D; }
.hire h2 { color: #fff; }
.hire p { margin-top: 14px; color: rgb(255 255 255 / .78); max-width: 520px; font-size: 16.5px; }
.hire-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; }
.hire-list li { padding: 14px 18px; border-radius: 14px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .1); }
.hire-list b { display: block; font: 650 16px var(--head); color: var(--hl); }
.hire-list span { font-size: 14px; color: rgb(255 255 255 / .75); }

/* ---------- footer, sheet, toast */
.foot { border-top: 1px solid var(--line); padding: 24px 0 32px; font-size: 14px; color: var(--text-3); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.foot a { color: var(--text-2); }
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgb(10 14 10 / .38); backdrop-filter: blur(4px); }
.sheet-in { width: min(560px, 100%); max-height: min(80vh, 620px); overflow: auto; padding: 22px; }
.sheet-h { display: flex; gap: 12px; align-items: flex-start; }
.sheet-h > div { flex: 1; min-width: 0; }
.sheet-h b { display: block; font: 650 19px var(--head); line-height: 1.25; }
.sheet-h a { font: 500 12.5px var(--mono); color: var(--text-3); word-break: break-all; }
.badge { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--hl); color: var(--hl-ink); font: 700 13px var(--mono); }
.sheet-t { margin-top: 16px; font-size: 15.5px; line-height: 1.7; color: var(--text-2); }
.sheet-t mark { background: color-mix(in srgb, var(--hl) 85%, transparent); color: var(--hl-ink); padding: 1px 2px; border-radius: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; box-shadow: var(--shadow); }

/* ---------- motion */
.js .rv { opacity: 0; transform: translateY(18px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
  .js mark.hl:not(.on)::before { --hx: 1; }
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .links a:nth-child(3) { display: none; }
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 36px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brow { grid-template-columns: 160px minmax(0, 1fr) 50px; }
}
@media (max-width: 900px) {
  .links { display: none; }
  .hero { min-height: 0; padding-top: 32px; }
  .hero-in, .trace, .ev, .faq-grid, .hire, .sec-head, .cut-top { grid-template-columns: minmax(0, 1fr); }
  .sec-head { gap: 14px; }
  .bot { height: 580px; }
  .trace-panel { max-height: none; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .nav-r .btn { display: none; }
  .hero h1 { font-size: 38px; }
  .lead { font-size: 16.5px; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .facts li { padding: 10px 12px; }
  .facts b { font-size: 22px; }
  .facts li > span { font-size: 11.5px; }
  .bot { height: 560px; border-radius: 18px; }
  .msg { max-width: 94%; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card h3 { margin-top: 18px; }
  .brow { grid-template-columns: minmax(0, 1fr) 44px; }
  .brow .bl { grid-column: 1 / -1; }
  .hit, .hits-h { grid-template-columns: 18px minmax(0, 1fr) 70px 48px; gap: 8px; }
  .cut { padding: 18px 16px; }
  .cut-read b { font-size: 28px; }
  .strip { height: 170px; }
}
