/* Phasor — lab-notebook design system.
   Paper and ink, one signal colour, serif headlines, mono numbers. */

:root {
  --paper: #f1eee6;
  --paper2: #e8e4d9;
  --card: #fbfaf6;
  --ink: #16150f;
  --ink2: #55524a;
  --ink3: #8a867b;
  --line: rgba(22, 21, 15, .13);
  --line2: rgba(22, 21, 15, .26);
  --sig: #e5481f;
  --sig2: #ff7a4d;
  --sigbg: rgba(229, 72, 31, .1);
  --ok: #1f7a55;
  --okbg: rgba(31, 122, 85, .12);
  --bad: #c2341b;
  --night: #12120f;
  --night2: #1c1c18;
  --night3: #26261f;
  --nline: rgba(241, 238, 230, .12);
  --ntext: #eeebe2;
  --ntext2: #a8a497;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r: 10px;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--sig); color: #fff; }
:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.num, .mono { font-family: var(--mono); font-feature-settings: 'tnum' 1, 'zero' 1; letter-spacing: -.01em; }
.muted { color: var(--ink3); }
.sig { color: var(--sig); }
.ok { color: var(--ok); }
.hide, [hidden] { display: none !important; }
.ket { font-family: var(--mono); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-weight: 400; }
.display { font-family: var(--serif); font-weight: 400; line-height: .98; letter-spacing: -.015em; }
h1.display { font-size: clamp(46px, 7.4vw, 104px); }
h2.display { font-size: clamp(38px, 5.2vw, 72px); }
h3.display { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; }
.display em { font-style: italic; color: var(--sig); }
.lede { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: var(--ink2); max-width: 46ch; margin: 22px 0 0; }
.body { color: var(--ink2); max-width: 54ch; margin: 0; }
.label { font: 500 11.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); display: inline-flex; align-items: center; gap: 8px; }
.label b { color: var(--sig); font-weight: 500; }
.sec-n { font: 500 12px/1 var(--mono); color: var(--sig); letter-spacing: .06em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; transition: background .18s, color .18s, border-color .18s, transform .18s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.solid:hover { background: #000; }
.btn.hot { background: var(--sig); border-color: var(--sig); color: #fff; }
.btn.hot:hover { background: #cf3d16; border-color: #cf3d16; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .arr { font-family: var(--mono); font-weight: 400; }
.night .btn { border-color: var(--nline); color: var(--ntext); }
.night .btn:hover { border-color: var(--ntext); }
.night .btn.solid { background: var(--ntext); color: var(--night); border-color: var(--ntext); }
.lnk { color: var(--sig); text-decoration: none; font-weight: 600; border-bottom: 1px solid currentColor; }
.lnk:hover { color: var(--ink); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line2); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.night .seg { border-color: var(--nline); }
.night .seg button { color: var(--ntext2); }
.night .seg button[aria-selected="true"] { background: var(--ntext); color: var(--night); }

/* inputs */
.inp { width: 100%; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; padding: 11px 13px; font-size: 15px; outline: none; transition: border-color .15s; }
.inp:focus { border-color: var(--ink); }
.night .inp { background: var(--night2); border-color: var(--nline); }
.night .inp:focus { border-color: var(--ntext2); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: var(--line2); border-radius: 3px; }
input[type=range]::-moz-range-track { height: 3px; background: var(--line2); border-radius: 3px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--sig); margin-top: -7.5px; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--sig); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--sig); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--sig); }
.night input[type=range]::-webkit-slider-runnable-track { background: var(--nline); }
.night input[type=range]::-webkit-slider-thumb { border-color: var(--night); }

/* ---------- demo banner ---------- */
.demo-bar { background: var(--ink); color: var(--paper); font: 500 12.5px/1.4 var(--mono); text-align: center; padding: 8px var(--gut); letter-spacing: .02em; }
.demo-bar b { color: var(--sig2); font-weight: 500; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .bar { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 var(--serif); letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink2); }
.nav a:hover { color: var(--ink); background: var(--paper2); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ''; display: block; height: 2px; background: var(--sig); margin-top: 3px; border-radius: 2px; }
.top .spacer { flex: 1; }
.livepill { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 500 13px/1 var(--mono); border: 1px solid var(--line2); padding: 9px 12px; border-radius: 999px; }
.livepill i { width: 7px; height: 7px; border-radius: 50%; background: var(--sig); box-shadow: 0 0 0 0 var(--sig); animation: pulse 2s infinite; }
.livepill span { color: var(--ink3); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 31, .5); } 70% { box-shadow: 0 0 0 8px rgba(229, 72, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 31, 0); } }
.walbtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink3); }
.walbtn .dot.on { background: #4ade80; }
.menubtn { display: none; border: 1px solid var(--line2); background: none; border-radius: 999px; width: 42px; height: 42px; padding: 0; align-items: center; justify-content: center; }
.menubtn i, .menubtn i::before { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; transition: transform .2s; }
.menubtn i::before { content: ''; position: absolute; top: 5px; }
.menubtn i { transform: translateY(-2.5px); }
.drop { display: none; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .menubtn { display: inline-flex; }
  .drop { position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 18px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .25); }
  .top.open .drop { display: block; }
  .drop a { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 2px; text-decoration: none; border-bottom: 1px solid var(--line); font: 400 24px/1.1 var(--serif); }
  .drop a small { font: 500 11px/1 var(--mono); color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; }
  .drop a[aria-current="page"] { color: var(--sig); }
}
@media (max-width: 560px) {
  .livepill span { display: none; }
  .top .bar { gap: 8px; }
  .brand span { display: none; }
  .walbtn { padding: 0 14px; }
}

/* ---------- footer ---------- */
footer { background: var(--night); color: var(--ntext2); padding: 72px 0 40px; font-size: 14.5px; }
footer .fgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
footer .brand { color: var(--ntext); font-size: 34px; }
footer p { max-width: 44ch; }
footer h4 { margin: 0 0 14px; font: 500 11.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ntext); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
footer li:has(> a[hidden]) { display: none; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ntext); }
footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--nline); padding-top: 24px; margin-top: 16px; font-size: 13px; max-width: none; color: #7d7a70; }
footer .ca { background: none; border: 1px dashed var(--nline); color: var(--ntext2); font: 12.5px var(--mono); padding: 8px 12px; border-radius: 8px; margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { footer .fgrid { grid-template-columns: 1fr 1fr; } footer .fgrid > :first-child { grid-column: 1 / -1; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 200; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding: clamp(80px, 11vw, 150px) 0; }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head .label { margin-bottom: 18px; }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }
.night { background: var(--night); color: var(--ntext); }
.night .body, .night .lede { color: var(--ntext2); }
.night .label { color: var(--ntext2); }
.paper2 { background: var(--paper2); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 6vw, 80px) 0 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 40%, transparent 0%, var(--paper) 72%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hgrid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 24px; align-items: center; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 7px 12px 7px 10px; font: 500 12px/1 var(--mono); letter-spacing: .02em; }
.tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--sig); animation: pulse 2s infinite; }
.tag svg { width: 14px; height: 14px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; align-items: center; }
.cachip { display: inline-flex; align-items: center; gap: 10px; border: 1px dashed var(--line2); background: none; border-radius: 999px; padding: 0 14px; min-height: 46px; font: 13px var(--mono); max-width: 100%; }
.cachip .k { color: var(--ink3); }
.cachip .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.hart { position: relative; width: 100%; max-width: 640px; justify-self: center; }
.hart canvas { width: 100%; aspect-ratio: 1; height: auto; }
.hart .cap { text-align: center; font: 500 11.5px/1.4 var(--mono); color: var(--ink3); letter-spacing: .04em; margin-top: -6px; }
.readout { display: grid; grid-template-columns: 1.35fr repeat(4, 1fr); border: 1px solid var(--line2); border-radius: 14px; background: var(--card); margin-top: clamp(28px, 4vw, 48px); overflow: hidden; }
.ro { padding: 18px 20px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ro:first-child { border-left: 0; background: var(--ink); color: var(--paper); }
.ro span { font: 500 11px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); }
.ro:first-child span { color: #a8a497; }
.ro b { font: 400 28px/1.05 var(--mono); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro:first-child b { font-size: 40px; color: var(--sig2); }
.ro em { font-style: normal; font-size: 13px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro:first-child em { color: #a8a497; }
@media (max-width: 1000px) { .hgrid { grid-template-columns: 1fr; } .hart { max-width: 560px; margin: 0 auto; } .readout { grid-template-columns: 1fr 1fr; } .ro:first-child { grid-column: 1 / -1; } .ro:nth-child(2), .ro:nth-child(4) { border-left: 0; } .ro { border-top: 1px solid var(--line); } }
@media (max-width: 420px) { .ro b { font-size: 22px; } .ro { padding: 14px; } }

/* ---------- the machine (signal chain) ---------- */
.chain { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--nline); border-radius: 14px; overflow: hidden; }
.stage { padding: 22px 20px 20px; border-left: 1px solid var(--nline); position: relative; min-width: 0; }
.stage:first-child { border-left: 0; }
.stage .sn { font: 500 11px/1 var(--mono); color: var(--sig2); letter-spacing: .08em; }
.stage h3 { font: 400 30px/1 var(--serif); margin: 12px 0 4px; color: var(--ntext); }
.stage p { margin: 0 0 16px; font-size: 13.5px; color: var(--ntext2); min-height: 3em; }
.stage dl { margin: 0; display: grid; gap: 9px; }
.stage dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-top: 1px dashed var(--nline); padding-top: 9px; }
.stage dt { color: var(--ntext2); }
.stage dd { margin: 0; font-family: var(--mono); color: var(--ntext); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage .live { position: absolute; top: 20px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--nline); }
.stage.on .live { background: var(--sig2); box-shadow: 0 0 12px var(--sig2); }
.stage.on { background: var(--night2); }
.stage::after { content: '→'; position: absolute; right: -8px; top: 50%; font: 14px var(--mono); color: var(--ntext2); z-index: 1; background: var(--night); line-height: 1; padding: 2px 0; }
.stage:last-child::after { display: none; }
@media (max-width: 1000px) { .chain { grid-template-columns: 1fr 1fr; } .stage { border-top: 1px solid var(--nline); } .stage:nth-child(odd) { border-left: 0; } .stage::after { display: none; } .stage:last-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .chain { grid-template-columns: 1fr; } .stage { border-left: 0; } }
.log { margin-top: 18px; border: 1px solid var(--nline); border-radius: 14px; overflow: hidden; }
.log-h { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--nline); font: 500 12px/1 var(--mono); color: var(--ntext2); letter-spacing: .04em; }
.log-h i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-right: 8px; }
.log pre { margin: 0; padding: 14px 18px; height: 248px; overflow: hidden; font: 12.5px/1.75 var(--mono); color: var(--ntext2); white-space: pre-wrap; word-break: break-word; mask-image: linear-gradient(transparent, #000 22%); -webkit-mask-image: linear-gradient(transparent, #000 22%); display: flex; flex-direction: column; justify-content: flex-end; }
.log pre > span { display: block; padding-left: 9ch; text-indent: -9ch; }
.log pre .t { color: #6f6c62; }
.log pre .k-collapse { color: var(--ntext); }
.log pre .k-collapse b { color: var(--sig2); font-weight: 400; }
.log pre .k-warn { color: #e0b44c; }
.log pre .k-burn, .log pre .k-settle { color: #8fd6b0; }
.log-f { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--nline); font-size: 14px; color: var(--ntext2); flex-wrap: wrap; }

/* ---------- round anatomy (sticky steps) ---------- */
.anat { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.anat-vis { position: sticky; top: 96px; aspect-ratio: 1.05; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); overflow: hidden; }
.anat-vis canvas { width: 100%; height: 100%; }
.anat-vis .tag2 { position: absolute; left: 16px; top: 14px; font: 500 11px/1 var(--mono); letter-spacing: .08em; color: var(--ink3); text-transform: uppercase; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { padding: 34px 0 34px; border-top: 1px solid var(--line); min-height: 46vh; display: flex; flex-direction: column; justify-content: center; opacity: .32; transition: opacity .4s; }
.steps li.on { opacity: 1; }
.steps li .sn { font: 500 12px/1 var(--mono); color: var(--sig); letter-spacing: .06em; }
.steps li h3 { font: 400 clamp(30px, 3.2vw, 44px)/1.02 var(--serif); margin: 14px 0 12px; }
.steps li p { margin: 0; color: var(--ink2); max-width: 50ch; }
.steps li code { font: 13px var(--mono); background: var(--paper2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
@media (max-width: 860px) { .anat { grid-template-columns: 1fr; } .anat-vis { top: 72px; z-index: 2; aspect-ratio: 1.6; } .steps li { min-height: 0; padding: 30px 0; } }

/* ---------- coherence ---------- */
.coh { display: grid; grid-template-columns: 1fr 300px; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); overflow: hidden; }
.coh-main { padding: 22px 24px 20px; min-width: 0; }
.coh-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.coh-read { display: flex; gap: 18px; font: 14px var(--mono); color: var(--ink2); }
.coh-read b { color: var(--ink); font-weight: 500; }
.coh-read b.sig { color: var(--sig); }
#cohCv { width: 100%; height: 300px; }
.coh-note { margin: 12px 0 0; font-size: 14px; color: var(--ink2); min-height: 2.6em; }
.coh-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.cs { padding: 20px 22px; border-top: 1px solid var(--line); }
.cs:first-child { border-top: 0; }
.cs .label { margin-bottom: 10px; }
.cs b { display: block; font: 400 34px/1 var(--serif); }
.cs p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink2); }
.ms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.ms li { display: flex; justify-content: space-between; font: 14px var(--mono); border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.ms li i { font-style: normal; color: var(--ink3); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.card { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); padding: 26px 26px 24px; }
.card h3 { font: 400 34px/1 var(--serif); margin: 14px 0 10px; }
.card p { margin: 0; color: var(--ink2); }
@media (max-width: 860px) { .coh { grid-template-columns: 1fr; } .coh-side { border-left: 0; border-top: 1px solid var(--line); } .duo { grid-template-columns: 1fr; } }

/* ---------- estimator ---------- */
.est { display: grid; grid-template-columns: 380px 1fr; border: 1px solid var(--nline); border-radius: 16px; overflow: hidden; }
.est-in { padding: 24px; border-right: 1px solid var(--nline); display: grid; gap: 18px; align-content: start; background: var(--night2); }
.fld { display: grid; gap: 8px; }
.fld > span { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ntext2); }
.fld > span b { color: var(--ntext); font: 500 13.5px var(--mono); }
.unit { position: relative; }
.unit .inp { padding-right: 70px; font-family: var(--mono); }
.unit em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: normal 12.5px var(--mono); color: var(--ntext2); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ntext2); cursor: pointer; user-select: none; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk .sw { width: 38px; height: 22px; border-radius: 999px; background: var(--night3); border: 1px solid var(--nline); position: relative; transition: .2s; flex: none; }
.chk .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ntext2); transition: .2s; }
.chk input:checked + .sw { background: var(--sig); border-color: var(--sig); }
.chk input:checked + .sw::after { left: 18px; background: #fff; }
.chk input:focus-visible + .sw { outline: 2px solid var(--sig2); outline-offset: 2px; }
.est-sub { font: 500 11px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--sig2); padding-top: 6px; }
.est-out { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.share-big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.share-big b { font: 400 clamp(52px, 6vw, 84px)/.9 var(--serif); color: var(--ntext); }
.share-big span { color: var(--ntext2); }
.outs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--nline); border-radius: 12px; }
.outs div { padding: 14px 16px; border-left: 1px solid var(--nline); display: grid; gap: 6px; min-width: 0; }
.outs div:first-child { border-left: 0; }
.outs span { font-size: 12.5px; color: var(--ntext2); }
.outs b { font: 400 20px/1.1 var(--mono); color: var(--sig2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#projCv { width: 100%; height: 220px; }
.est-note { font-size: 13px; color: var(--ntext2); margin: 0; }
.math { border-top: 1px solid var(--nline); }
.math summary { padding: 16px 24px; cursor: pointer; font: 500 13px var(--mono); color: var(--ntext2); list-style: none; }
.math summary::-webkit-details-marker { display: none; }
.math summary::before { content: '+ '; color: var(--sig2); }
.math[open] summary::before { content: '− '; }
.math pre { margin: 0; padding: 0 24px 22px; font: 13px/1.85 var(--mono); color: var(--ntext2); white-space: pre-wrap; }
.math pre b { color: var(--ntext); font-weight: 400; }
@media (max-width: 960px) { .est { grid-template-columns: 1fr; } .est-in { border-right: 0; border-bottom: 1px solid var(--nline); } .outs { grid-template-columns: 1fr 1fr; } .outs div:nth-child(3) { border-left: 0; } .outs div:nth-child(n+3) { border-top: 1px solid var(--nline); } }

/* ---------- verification bench ---------- */
.bench { display: grid; grid-template-columns: 360px 1fr; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); overflow: hidden; }
.bench-l { padding: 22px; border-right: 1px solid var(--line); min-width: 0; }
.bench-r { padding: 22px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.chip { border: 1px solid var(--line2); background: none; border-radius: 999px; padding: 6px 11px; font: 12.5px var(--mono); color: var(--ink2); display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .q { color: var(--sig); font-size: 10.5px; }
.chip[aria-pressed="true"] .q { color: var(--sig2); }
.kv { margin: 0; display: grid; gap: 12px; }
.kv div { display: grid; gap: 4px; min-width: 0; }
.kv dt { font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); }
.kv dd { margin: 0; font: 12.5px/1.5 var(--mono); overflow-wrap: anywhere; color: var(--ink); }
.vlog { margin: 0; background: var(--night); color: var(--ntext2); border-radius: 10px; padding: 14px 16px; font: 12.5px/1.75 var(--mono); min-height: 170px; white-space: pre-wrap; word-break: break-word; }
.vlog .y { color: #8fd6b0; }
.vlog .n { color: var(--sig2); }
#benchCv { width: 100%; height: 180px; }
.verdict { font: 500 13px var(--mono); padding: 6px 10px; border-radius: 6px; }
.verdict.ok { background: var(--okbg); color: var(--ok); }
.verdict.bad { background: var(--sigbg); color: var(--bad); }
.bench-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .bench { grid-template-columns: 1fr; } .bench-l { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); padding: 0 12px 12px 0; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .r { text-align: right; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--paper2); }
.tbl .rank { font: 400 22px/1 var(--serif); color: var(--ink3); width: 40px; }
.tbl tr:first-child .rank { color: var(--sig); }
.night .tbl th { color: var(--ntext2); border-color: var(--nline); }
.night .tbl td { border-color: var(--nline); }
.night .tbl tr.click:hover td { background: var(--night2); }
.pill { display: inline-block; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line2); color: var(--ink2); }
.pill.qpu { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pill.hot { background: var(--sigbg); border-color: transparent; color: var(--sig); }
.bar-in { height: 6px; background: var(--paper2); border-radius: 6px; overflow: hidden; min-width: 60px; }
.bar-in i { display: block; height: 100%; background: var(--sig); border-radius: 6px; }
@media (max-width: 640px) { .hide-s { display: none; } }

/* ---------- leaderboard ---------- */
.lb { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); padding: 18px 22px 8px; }
.lb .seg { margin-bottom: 16px; }

/* ---------- notes preview ---------- */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.note { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); padding: 24px; text-decoration: none; display: flex; flex-direction: column; gap: 12px; transition: border-color .2s, transform .2s; }
.note:hover { border-color: var(--ink); transform: translateY(-2px); }
.note h3 { font: 400 30px/1.02 var(--serif); }
.note p { margin: 0; color: var(--ink2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note .facts { display: flex; gap: 16px; flex-wrap: wrap; font: 12.5px var(--mono); color: var(--ink3); margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .notes { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(28px, 5vw, 80px); }
.faq details { border-top: 1px solid var(--line2); }
.faq details:last-child { border-bottom: 1px solid var(--line2); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 400 24px/1.2 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 20px; font: 300 26px/1 var(--sans); color: var(--sig); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 22px; color: var(--ink2); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- close ---------- */
.close { text-align: center; padding: clamp(90px, 12vw, 160px) 0; }
.close h2 { font-size: clamp(40px, 6.2vw, 92px); max-width: 15ch; margin: 18px auto 0; }
.close .cd { color: var(--sig2); font-family: var(--mono); font-style: normal; letter-spacing: -.04em; }
.close p { color: var(--ntext2); font: 13px var(--mono); margin: 20px auto 0; word-break: break-all; max-width: 70ch; }
.close .ctas { justify-content: center; }

/* ---------- connect modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; background: rgba(18, 18, 15, .5); display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); }
.modal.on { display: flex; }
.sheet { background: var(--card); border-radius: 18px; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; }
.sheet-h b { font: 400 30px/1 var(--serif); }
.xbtn { border: 1px solid var(--line2); background: none; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; }
.sheet .note2 { font-size: 13.5px; color: var(--ink2); margin: 10px 0 16px; }
.grp { font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); margin: 16px 0 8px; }
.wrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: none; margin-bottom: 6px; text-align: left; }
.wrow:hover { border-color: var(--ink); }
.wrow img, .wrow .wi { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.wrow .wi { background: var(--paper2); display: grid; place-items: center; font: 600 13px var(--sans); }
.wrow span { flex: 1; font-weight: 600; }
.wrow em { font: normal 12px var(--mono); color: var(--ink3); }
.wrow em.det { color: var(--ok); }
.nodet { font-size: 14px; color: var(--ink2); padding: 12px; background: var(--paper2); border-radius: 10px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 1.2em; margin-top: 10px; }

/* ---------- terminal drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(18, 18, 15, .45); opacity: 0; transition: opacity .25s; }
.drawer aside { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--night); color: var(--ntext); transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); display: flex; flex-direction: column; }
.drawer.on { pointer-events: auto; }
.drawer.on .scrim { opacity: 1; }
.drawer.on aside { transform: none; }
.dr-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--nline); }
.dr-h .label { color: var(--ntext2); }
.dr-h .xbtn { border-color: var(--nline); color: var(--ntext); }
.dr-b { padding: 20px; overflow: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
.dr-w { display: flex; align-items: center; gap: 8px; font: 13px var(--mono); color: var(--ntext2); }
.dr-w span { flex: 1; color: var(--ntext); }
.mini { border: 1px solid var(--nline); background: none; color: var(--ntext2); font: 12px var(--mono); padding: 6px 10px; border-radius: 999px; }
.mini:hover { color: var(--ntext); border-color: var(--ntext2); }
.dr-state { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; border: 1px solid var(--nline); border-radius: 14px; padding: 14px; }
.dr-state canvas { width: 150px; height: 150px; }
.dr-state b { display: block; font: 400 44px/1 var(--mono); color: var(--sig2); letter-spacing: -.04em; }
.dr-state span { font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ntext2); }
.dr-state em { display: block; font-style: normal; font-size: 13px; color: var(--ntext2); margin-top: 8px; }
.dr-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--nline); border-radius: 14px; overflow: hidden; }
.dr-grid div { padding: 13px 14px; border-top: 1px solid var(--nline); border-left: 1px solid var(--nline); display: grid; gap: 4px; min-width: 0; }
.dr-grid div:nth-child(-n+2) { border-top: 0; }
.dr-grid div:nth-child(odd) { border-left: 0; }
.dr-grid div.wide { grid-column: 1 / -1; border-left: 0; }
.dr-grid span { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ntext2); }
.dr-grid b { font: 400 20px/1.1 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-grid b.sig { color: var(--sig2); }
.dr-grid em { font-style: normal; font-size: 12px; color: var(--ntext2); }
.meter { position: relative; height: 6px; background: var(--night3); border-radius: 6px; margin: 10px 0 18px; }
.meter u { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sig2); border-radius: 6px; }
.meter i { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--nline); }
.meter i.hit { background: var(--sig2); }
.meter i em { position: absolute; top: 15px; left: -8px; font: normal 10.5px var(--mono); color: var(--ntext2); }
.dr-act { display: flex; gap: 8px; flex-wrap: wrap; }
.dr-act .btn { flex: 1; }
.dr-msg { font-size: 13px; color: var(--sig2); min-height: 1em; }
.dr-load { color: var(--ntext2); font-size: 14px; }

/* ---------- inner pages ---------- */
.phead { padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.phead h1 { font-size: clamp(44px, 6.4vw, 92px); margin-top: 16px; }
.phead .lede { max-width: 58ch; }
.phead-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; }
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line2); border-radius: 14px; background: var(--card); overflow: hidden; }
.statrow div { padding: 16px 18px; border-left: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; }
.statrow div:first-child { border-left: 0; }
.statrow span { font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); }
.statrow b { font: 400 26px/1 var(--mono); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .phead-grid { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); padding: 22px; min-width: 0; }
.panel.dark { background: var(--night); color: var(--ntext); border-color: var(--night); }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel.dark .kv dt { color: var(--ntext2); }
.panel.dark .kv dd { color: var(--ntext); }
.empty { padding: 40px 10px; text-align: center; color: var(--ink3); }
