/* Wintergate: GLACIAL identity. Own stylesheet for the website (/) and the docs (/docs).
   Polar navy to ice white, frosted glass with real blur depth, cold cyan light.
   Bodoni Moda (display serif) / Instrument Sans (text) / JetBrains Mono (data). */

@font-face { font-family: "Bodoni Moda"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/bodoni-moda-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/bodoni-moda-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/bodoni-moda-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/bodoni-moda-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/instrument-sans-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --abyss: #030A08;
  --navy: #0D2B21;
  --deep: #134131;
  --shelf: #1B5E47;
  --ice: #F7F4EF;
  --ice-2: #CCEFE3;
  --ice-3: #8EC4B1;
  --ice-4: #619583;
  --cyan: #12D884;
  --cyan-soft: rgb(18 216 132 / .14);
  --cyan-line: rgb(18 216 132 / .42);
  --rose: #ff7b93;
  --gold: #f4d58d;
  --glass: rgb(176 249 223 / .065);
  --glass-2: rgb(176 249 223 / .11);
  --rim: rgb(204 251 234 / .16);
  --rim-2: rgb(204 251 234 / .28);
  --shadow: 0 1px 0 rgb(255 255 255 / .06) inset, 0 24px 60px -24px rgb(0 0 0 / .7), 0 2px 10px rgb(0 0 0 / .35);
  --blur: blur(18px) saturate(150%);
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --top: 60px;
  --measure: 46rem;
  --r: 14px;
  --r-s: 8px;
  /* legacy names used by page scripts and inline styles */
  --accent: var(--cyan); --ecdsa: var(--rose); --hash: var(--cyan); --flag: var(--gold);
  --text: var(--ice); --text-2: var(--ice-2); --text-3: var(--ice-3); --line: var(--rim); --line-2: var(--rim-2);
  --accent-soft: var(--cyan-soft); --accent-line: var(--cyan-line); --loss: var(--rose); --warn: var(--gold);
  --bg-2: var(--glass); --bg-3: var(--glass-2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 18px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ice-2); font: 400 17px/1.66 var(--sans);
  background: var(--abyss);
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgb(50 180 134 / .38), transparent 60%),
    radial-gradient(900px 600px at 110% 40%, rgb(29 141 102 / .22), transparent 60%),
    radial-gradient(900px 700px at -10% 80%, rgb(39 151 112 / .18), transparent 60%),
    linear-gradient(180deg, var(--abyss), var(--navy) 40%, var(--abyss));
  background-attachment: fixed;
  font-feature-settings: "kern", "liga";
}
/* film grain over everything, very quiet */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg, canvas { max-width: 100%; }
a { color: var(--cyan); text-decoration: underline; text-decoration-color: var(--cyan-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgb(18 216 132 / .3); color: var(--ice); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: var(--abyss); padding: 6px 10px; z-index: 200; }
.skip:focus { left: 8px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--ice); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 3.6rem); line-height: 1.04; margin: 0 0 18px; }
h2 { font-size: 2rem; line-height: 1.15; margin: 72px 0 16px; }
h3 { font-size: 1.4rem; line-height: 1.3; margin: 40px 0 10px; }
h4 { font-size: 1.1rem; margin: 26px 0 8px; }
h5 { font-family: var(--mono); font-weight: 500; }
p { margin: 0 0 16px; }
strong, b { font-weight: 600; color: var(--ice); }
em { color: var(--ice); }
small, .dim { color: var(--ice-3); }
ul, ol { padding-left: 1.3em; margin: 0 0 16px; }
li { margin: 5px 0; }
li::marker { color: var(--ice-4); }
hr { border: 0; border-top: 1px solid var(--rim); margin: 40px 0; }
code { font: 400 .86em/1.4 var(--mono); background: rgb(167 248 219 / .08); border: 1px solid var(--rim); padding: .08em .38em; border-radius: 5px; color: var(--ice); overflow-wrap: anywhere; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kicker { font: 500 12.5px/1.2 var(--mono); color: var(--cyan); letter-spacing: .04em; margin: 0 0 16px; }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ice-2); margin: 0 0 28px; max-width: 42rem; }
sup.ref a { text-decoration: none; font: 500 11px/1 var(--mono); padding: 0 1px; }
h2 .anchor, h3 .anchor { color: var(--ice-4); text-decoration: none; margin-left: 8px; opacity: 0; font: 400 .7em var(--mono); }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }

/* ---------- glass primitive ---------- */
.glass, .sim, .eq, .thm, .note, .tablewrap, .code, figure > .fig, .card, .evidence, .kvbox {
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--rim); border-radius: var(--r);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* ---------- code ---------- */
.code { position: relative; margin: 0 0 22px; overflow: hidden; background: linear-gradient(180deg, rgb(13 43 33 / .92), rgb(7 24 18 / .92)); }
.code .ch { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--rim); font: 400 12px/1.2 var(--mono); color: var(--ice-3); }
.code .ch .sp { flex: 1; }
.copy { background: rgb(18 216 132 / .08); color: var(--ice-2); border: 1px solid var(--rim-2); border-radius: 999px; font: 500 11.5px/1 var(--mono); padding: 6px 11px; cursor: pointer; }
.copy:hover { color: var(--ice); border-color: var(--cyan-line); }
.copy[data-done] { color: var(--cyan); border-color: var(--cyan-line); }
pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 400 13.5px/1.65 var(--mono); color: #DAF5EB; tab-size: 4; scrollbar-width: thin; }
pre code { background: none; border: 0; padding: 0; font: inherit; color: inherit; overflow-wrap: normal; }
.tk-k { color: #ADF9E6; } .tk-t { color: #85F6CC; } .tk-s { color: #a8f0c6; } .tk-n { color: var(--gold); }
.tk-c { color: #639A87; font-style: italic; } .tk-f { color: var(--cyan); } .tk-e { color: var(--gold); }

/* ---------- maths ---------- */
.eq { position: relative; margin: 24px 0 26px; padding: 20px 64px 20px 22px; overflow-x: auto; border-left: 2px solid var(--cyan-line); }
.eq .tag { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 400 12.5px/1 var(--mono); color: var(--ice-4); }
.eq .live { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rim); font: 400 13.5px/1.5 var(--mono); color: var(--ice-2); }
.katex { font-size: 1.1em; color: var(--ice); }
.katex-display { margin: 0; overflow-x: auto; overflow-y: hidden; padding: 4px 0; }
.step { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0 12px; margin: 0 0 16px; }
.step > .n { font: 500 1.5rem/1.1 var(--serif); color: var(--cyan); text-align: right; }
.step > div > .katex-display { text-align: left; }
.thm { margin: 24px 0; padding: 18px 20px; }
.thm > b:first-child { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--cyan); margin-right: 6px; font-size: 1.05em; }

/* ---------- callouts ---------- */
.note { margin: 22px 0; padding: 14px 18px; font-size: 15.5px; }
.note > b:first-child { display: block; font: 500 1.05rem/1.3 var(--serif); margin-bottom: 4px; }
.note.spec { border-color: rgb(244 213 141 / .38); background: linear-gradient(180deg, rgb(244 213 141 / .08), rgb(244 213 141 / .03)); }
.note.spec > b:first-child { color: var(--gold); }
.note.risk { border-color: rgb(255 123 147 / .38); background: linear-gradient(180deg, rgb(255 123 147 / .08), rgb(255 123 147 / .03)); }
.note.risk > b:first-child { color: var(--rose); }
.note.ok > b:first-child { color: var(--cyan); }
.note p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 0 0 24px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--rim); vertical-align: top; }
th { font: 500 12px/1.3 var(--mono); color: var(--ice-3); letter-spacing: .02em; white-space: nowrap; background: rgb(18 216 132 / .04); }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
td code { white-space: nowrap; }
#vectors code, td code[id] { white-space: normal; word-break: break-all; }

/* ---------- simulators ---------- */
.sim { margin: 28px 0 34px; overflow: hidden; }
.sim > header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rim); flex-wrap: wrap; background: rgb(18 216 132 / .035); }
.sim > header h4 { margin: 0; font: 500 1.08rem/1.2 var(--serif); }
.sim > header .sp { flex: 1; }
.sim .body { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); }
.sim .ctrls { padding: 16px; border-right: 1px solid var(--rim); display: grid; gap: 15px; align-content: start; }
.sim .ctrls > * { min-width: 0; }
.sim .view { padding: 16px; min-width: 0; }
.sim .view h5 { font: 500 12px/1.3 var(--mono); color: var(--ice-3); margin: 14px 0 4px; }
.sim .view h5:first-child { margin-top: 0; }
.sim canvas { display: block; width: 100%; height: 260px; border: 1px solid var(--rim); border-radius: 10px;
  background: radial-gradient(120% 120% at 50% 0%, rgb(28 104 78 / .55), rgb(6 20 15 / .95)); }
.sim canvas.tall { height: 340px; }
.sim canvas.short { height: 200px; }
.ctl { display: grid; gap: 5px; }
.ctl label { display: flex; gap: 0 .3em; font-size: 13.5px; color: var(--ice-2); }
.ctl label output { margin-left: auto; font: 500 13px/1.4 var(--mono); color: var(--ice); font-variant-numeric: tabular-nums; }
.ctl .hint { font-size: 12px; color: var(--ice-3); line-height: 1.4; }
.ctl input[type="text"] { width: 100%; font: 400 13px/1.3 var(--mono); color: var(--ice); background: rgb(7 23 18 / .7); border: 1px solid var(--rim-2); border-radius: var(--r-s); padding: 8px 9px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--cyan-line), var(--rim-2)); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 3px; background: var(--rim-2); border-radius: 2px; }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--cyan); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border-radius: 50%; background: var(--ice); border: 0; box-shadow: 0 0 0 4px rgb(18 216 132 / .22), 0 0 14px rgb(18 216 132 / .6); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ice); border: 0; box-shadow: 0 0 0 4px rgb(18 216 132 / .22), 0 0 14px rgb(18 216 132 / .6); }
select, .btn { font: 500 13.5px/1 var(--sans); color: var(--ice); background: rgb(167 248 219 / .08); border: 1px solid var(--rim-2); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
select { width: 100%; max-width: 100%; border-radius: var(--r-s); background-color: rgb(9 31 24 / .8); text-overflow: ellipsis; }
.btn:hover { border-color: var(--cyan-line); color: var(--ice); }
.btn.pri { background: var(--cyan); color: var(--abyss); border-color: var(--cyan); }
.play { min-width: 5.5rem; }
.out { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1px; background: var(--rim); border: 1px solid var(--rim); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.out > div { background: rgb(9 31 24 / .85); padding: 9px 11px; }
.out dt { font-size: 12px; color: var(--ice-3); line-height: 1.3; }
.out dd { margin: 3px 0 0; font: 500 16px/1.3 var(--mono); color: var(--ice); font-variant-numeric: tabular-nums; }
.out dd.acc { color: var(--cyan); } .out dd.loss { color: var(--rose); } .out dd.warn { color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ice-2); margin-top: 9px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.pill { display: inline-block; font: 500 11px/1 var(--mono); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--rim-2); color: var(--ice-2); vertical-align: middle; }
.pill.acc { color: var(--cyan); border-color: var(--cyan-line); }
.pill.warn { color: var(--gold); border-color: rgb(244 213 141 / .4); }
.pill.loss { color: var(--rose); border-color: rgb(255 123 147 / .4); }
.hexline { font: 400 12.5px/1.6 var(--mono); color: var(--ice-2); word-break: break-all; background: rgb(7 23 18 / .7); border: 1px solid var(--rim); border-radius: var(--r-s); padding: 9px 11px; margin: 6px 0 0; }
.hexline b { color: var(--cyan); font-weight: 500; }
.digits { display: grid; grid-template-columns: repeat(auto-fill, minmax(1.55rem, 1fr)); gap: 3px; margin-top: 8px; }
.digits span { font: 500 12px/1.9 var(--mono); text-align: center; background: rgb(167 248 219 / .06); border: 1px solid var(--rim); border-radius: 4px; color: var(--ice-2); }
.digits span.cs { border-color: rgb(244 213 141 / .5); color: var(--gold); }
.digits span.bad { background: rgb(255 123 147 / .2); border-color: var(--rose); color: var(--ice); }
.digits span.sel { outline: 2px solid var(--cyan); outline-offset: 1px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 13.5px; margin: 8px 0 0; }
.kv dt { color: var(--ice-3); }
.kv dd { margin: 0; font: 400 12.5px/1.5 var(--mono); color: var(--ice); word-break: break-all; }
.verdict { display: inline-block; font: 500 12px/1 var(--mono); padding: 5px 9px; border-radius: 999px; border: 1px solid var(--rim-2); }
.verdict.ok { color: var(--cyan); border-color: var(--cyan-line); background: var(--cyan-soft); box-shadow: 0 0 18px rgb(18 216 132 / .25); }
.verdict.no { color: var(--rose); border-color: rgb(255 123 147 / .5); background: rgb(255 123 147 / .12); box-shadow: 0 0 18px rgb(255 123 147 / .2); }
.sim .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- figures, diagrams ---------- */
figure { margin: 26px 0 32px; }
figure > .fig { padding: 12px; overflow-x: auto; }
figcaption { font-size: 13.5px; color: var(--ice-3); margin-top: 10px; }
figcaption b { color: var(--ice-2); font-weight: 500; }
svg text { font-family: var(--mono); }
.diagram svg { display: block; width: 100%; height: auto; min-width: 640px; }
.diagram text { fill: var(--ice-2); font-size: 11px; }
.diagram .t-strong { fill: var(--ice); font-weight: 500; }
.diagram .t-dim { fill: var(--ice-3); font-size: 10.5px; }
.diagram .box { fill: rgb(17 57 43 / .85); stroke: var(--rim-2); }
.diagram .box.acc { stroke: var(--cyan); }
.diagram .box.warn { stroke: var(--gold); }
.diagram .box.bad { stroke: var(--rose); }
.diagram .wire { stroke: var(--rim-2); fill: none; stroke-width: 1.4; }
.diagram .wire.acc { stroke: var(--cyan); }
.diagram .lifeline { stroke: var(--rim-2); stroke-dasharray: 3 5; }
.diagram .msg { stroke: var(--ice-4); stroke-width: 1.3; fill: none; }
.diagram .msg.on { stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 4px rgb(18 216 132 / .7)); }
.diagram .pulse { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.diagram .state { fill: rgb(17 57 43 / .9); stroke: var(--rim-2); stroke-width: 1.4; }
.diagram .state.on { stroke: var(--cyan); fill: rgb(18 216 132 / .14); }
.diagram .state.onw { stroke: var(--gold); fill: rgb(244 213 141 / .12); }
.diagram .edge { stroke: var(--ice-4); stroke-width: 1.3; fill: none; }
.diagram .edge.on { stroke: var(--cyan); stroke-width: 2; }
.seqctl { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; flex-wrap: wrap; font-size: 13px; color: var(--ice-3); }
.seqctl .stepnote { color: var(--ice-2); font-size: 13.5px; flex: 1 1 18rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.card { padding: 18px 20px; }
.card p:last-child { margin-bottom: 0; }
.card > b:first-child { display: block; font: 500 1.15rem/1.3 var(--serif); color: var(--ice); margin-bottom: 6px; }
a.card { display: block; text-decoration: none; color: var(--ice-2); transition: border-color .2s, transform .2s; }
a.card:hover { border-color: var(--cyan-line); transform: translateY(-2px); }
.evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1px; background: var(--rim); overflow: hidden; margin: 24px 0 30px; }
.evidence > div { background: rgb(9 31 24 / .82); padding: 16px 18px; }
.evidence .v { font: 500 2rem/1.05 var(--serif); color: var(--ice); font-variant-numeric: lining-nums; }
.evidence .v.loss { color: var(--rose); }
.evidence .d { font-size: 13.5px; color: var(--ice-2); margin-top: 8px; line-height: 1.45; }
.evidence .s { font: 400 11px/1.4 var(--mono); color: var(--ice-3); margin-top: 8px; }
.risk td:first-child { white-space: nowrap; }
.mit { color: var(--ice-2); }
.sev { font: 500 11px/1 var(--mono); padding: 3px 7px; border-radius: 999px; border: 1px solid var(--rim-2); white-space: nowrap; }
.sev.h { color: var(--rose); border-color: rgb(255 123 147 / .5); }
.sev.m { color: var(--gold); border-color: rgb(244 213 141 / .5); }
.sev.l { color: var(--ice-2); }
table.params td:nth-child(1) code { color: var(--cyan); }
dl.gloss dt { font: 500 1.08rem/1.3 var(--serif); color: var(--ice); margin-top: 18px; }
dl.gloss dd { margin: 4px 0 0; color: var(--ice-2); }
details.faq { border-bottom: 1px solid var(--rim); padding: 12px 0; }
details.faq summary { cursor: pointer; font: 500 1.12rem/1.4 var(--serif); color: var(--ice); }
details.faq summary::marker { color: var(--cyan); }
details.faq > div { padding: 8px 0 4px; color: var(--ice-2); }
ol.refs li { margin: 9px 0; color: var(--ice-2); }
ol.refs li b { color: var(--ice); font-weight: 500; }
.chg { border-left: 2px solid var(--cyan-line); padding-left: 16px; margin: 16px 0; }
.chg b { font-family: var(--mono); color: var(--cyan); font-weight: 500; }
.hero-fig { margin: 26px 0 8px; overflow: hidden; }
.hero-fig canvas, .stage canvas { display: block; width: 100%; height: 340px; }
.hero-fig .bar, .stage .bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--rim); font: 400 12.5px/1.4 var(--mono); color: var(--ice-3); }
.hero-fig .bar b, .stage .bar b { color: var(--ice); font-weight: 500; }
.hero-fig .bar .sp, .stage .bar .sp { flex: 1; }
.oneline { font: 400 1.25rem/1.55 var(--serif); color: var(--ice); border-left: 2px solid var(--cyan); padding: 4px 0 4px 16px; margin: 20px 0 28px; max-width: 46rem; }

/* ---------- search dialog ---------- */
dialog.search { width: min(640px, calc(100vw - 24px)); max-height: min(70vh, 640px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--rim-2); border-radius: var(--r); background: rgb(12 42 32 / .9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--ice); overflow: hidden; box-shadow: 0 40px 100px rgb(0 0 0 / .6); }
dialog.search::backdrop { background: rgb(4 12 10 / .6); backdrop-filter: blur(3px); }
dialog.search input { width: 100%; border: 0; border-bottom: 1px solid var(--rim); background: transparent; color: var(--ice); font: 400 18px/1 var(--sans); padding: 17px 19px; outline: none; }
dialog.search ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; max-height: calc(min(70vh, 640px) - 62px); }
dialog.search li a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ice-2); }
dialog.search li a b { display: block; color: var(--ice); font: 500 1.02rem/1.3 var(--serif); }
dialog.search li a small { font-family: var(--mono); font-size: 11px; }
dialog.search li a[aria-selected="true"], dialog.search li a:hover { background: rgb(18 216 132 / .09); }
dialog.search mark { background: none; color: var(--cyan); }
dialog.search .empty { padding: 18px; color: var(--ice-3); }

/* =====================================================================
   DOCS SHELL (/docs): frosted sidebar, reading column, contents rail
   ===================================================================== */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: rgb(7 24 18 / .62); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--rim); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ice); text-decoration: none; font: 500 21px/1 var(--serif); letter-spacing: .01em; }
.brand svg { width: 24px; height: 24px; color: var(--cyan); filter: drop-shadow(0 0 6px rgb(18 216 132 / .5)); }
.brand small { font: 400 11.5px/1 var(--mono); color: var(--ice-3); }
.tabs { display: flex; gap: 2px; margin-left: 10px; }
.tabs a { color: var(--ice-2); text-decoration: none; font-size: 14.5px; padding: 7px 12px; border-radius: 999px; }
.tabs a:hover { color: var(--ice); background: rgb(167 248 219 / .08); }
.tabs a[aria-current="page"] { color: var(--abyss); background: var(--ice); }
.top .sp { flex: 1; }
.searchbtn { display: flex; align-items: center; gap: 10px; min-width: 190px; background: rgb(167 248 219 / .06); border: 1px solid var(--rim); color: var(--ice-3); font: 400 14px/1 var(--sans); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.searchbtn:hover { border-color: var(--rim-2); color: var(--ice-2); }
.searchbtn kbd { margin-left: auto; }
kbd { font: 500 11px/1 var(--mono); color: var(--ice-2); border: 1px solid var(--rim-2); padding: 2px 6px; border-radius: 5px; }
.status { font: 500 11.5px/1 var(--mono); color: var(--gold); border: 1px solid rgb(244 213 141 / .4); padding: 7px 10px; border-radius: 999px; white-space: nowrap; text-decoration: none; background: rgb(244 213 141 / .06); }
.menubtn { display: none; background: none; border: 1px solid var(--rim-2); color: var(--ice); border-radius: 999px; padding: 7px 12px; font: 500 14px/1 var(--sans); cursor: pointer; }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr) 220px; max-width: 1500px; margin: 0 auto; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 26px 14px 40px 22px; border-right: 1px solid var(--rim); scrollbar-width: thin;
  background: linear-gradient(180deg, rgb(167 248 219 / .045), transparent 60%); }
.side h4 { font: 400 11.5px/1.3 var(--mono); color: var(--ice-4); margin: 22px 0 8px 10px; letter-spacing: .06em; }
.side h4:first-child { margin-top: 0; }
.side a { display: block; color: var(--ice-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; padding: 6px 10px; border-radius: 8px; }
.side a:hover { color: var(--ice); background: rgb(167 248 219 / .07); }
.side a[aria-current="page"] { color: var(--ice); background: rgb(18 216 132 / .1); box-shadow: inset 2px 0 0 var(--cyan); }
.side .mtabs { display: none; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--rim); }
.main { min-width: 0; padding: 48px 52px 100px; }
.main > * { max-width: var(--measure); }
.main > .wide, .main > .sim, .main > figure, .main > .grid2, .main > .tablewrap, .main > .hero, .main > .evidence, .main > .code { max-width: 64rem; }
.main > h1 { font-size: clamp(2.4rem, 1.5rem + 2.6vw, 3.6rem); }
.main > h2 { padding-top: 24px; border-top: 1px solid var(--rim); }
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 48px 20px 40px 8px; font-size: 13.5px; scroll-target-group: auto; }
.toc b { display: block; font: 400 11.5px/1 var(--mono); color: var(--ice-4); margin-bottom: 12px; letter-spacing: .06em; }
.toc a { display: block; color: var(--ice-3); text-decoration: none; padding: 4px 0 4px 12px; border-left: 1px solid var(--rim); line-height: 1.35; }
.toc a.l3 { padding-left: 24px; font-size: 13px; }
.toc a:hover { color: var(--ice); }
.toc a:is(:target-current, .\:target-current) { color: var(--cyan); border-left: 2px solid var(--cyan); padding-left: 11px; }
.toc a.l3:is(:target-current, .\:target-current) { padding-left: 23px; }
.foot { border-top: 1px solid var(--rim); margin-top: 80px; padding-top: 22px; font-size: 13.5px; color: var(--ice-3); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ice-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 60px; }
.pager a { padding: 14px 16px; text-decoration: none; color: var(--ice-3); font-size: 12.5px; font-family: var(--mono); border: 1px solid var(--rim); border-radius: var(--r); background: linear-gradient(180deg, var(--glass-2), var(--glass)); }
.pager a b { display: block; color: var(--ice); font: 500 1.1rem/1.3 var(--serif); margin-top: 3px; }
.pager a:hover { border-color: var(--cyan-line); }
.pager a.next { text-align: right; grid-column: 2; }

/* =====================================================================
   WEBSITE (/): cinematic centred scroll, full-bleed chapters
   ===================================================================== */
body.site { font-size: 18px; }
.site .col { max-width: 980px; margin: 0 auto; padding: 0 28px; }
.site .col.narrow { max-width: 760px; }
.site .centre { text-align: center; }
.site .centre .lede, .site .centre p.sub { margin-left: auto; margin-right: auto; }

/* floating glass nav pill */
.fnav { position: fixed; z-index: 60; top: 14px; left: 50%; transform: translateX(-50%); width: min(1080px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 6px; padding: 7px 7px 7px 16px; border-radius: 999px;
  background: rgb(12 42 32 / .55); border: 1px solid var(--rim); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 18px 50px -20px rgb(0 0 0 / .8); }
.fnav .brand { font-size: 20px; margin-right: 10px; }
.fnav .links { display: flex; gap: 2px; }
.fnav .links a { color: var(--ice-2); text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.fnav .links a i { font: italic 400 13px/1 var(--serif); color: var(--cyan); margin-right: 5px; }
.fnav .links a:hover { color: var(--ice); background: rgb(167 248 219 / .08); }
.fnav .sp { flex: 1; }
.fnav .burger { display: none; }
.cta { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--sans); padding: 13px 22px; border-radius: 999px; text-decoration: none; color: var(--ice); white-space: nowrap;
  border: 1px solid var(--rim-2); background: rgb(167 248 219 / .08); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: transform .2s, box-shadow .2s; }
.cta:hover { transform: translateY(-1px); border-color: var(--cyan-line); }
.cta.pri { background: linear-gradient(180deg, #FBFAF8, #C3FBE5); color: #0A241B; border-color: transparent; box-shadow: 0 0 0 1px rgb(255 255 255 / .5) inset, 0 10px 30px -8px rgb(18 216 132 / .6); }
.cta.sm { padding: 10px 16px; font-size: 14px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* hero: full viewport, rotating crystal behind the title */
.ghero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 120px 0 80px; isolation: isolate; }
.ghero canvas#crystal { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.ghero::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 50% at 50% 42%, rgb(72 218 165 / .35), transparent 70%),
  radial-gradient(40% 30% at 50% 100%, rgb(18 216 132 / .12), transparent 70%); }
.ghero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: -1; background: linear-gradient(180deg, transparent, var(--abyss)); }
.ghero .inner { text-align: center; max-width: 900px; padding: 0 24px; }
.ghero .kicker { margin-bottom: 26px; }
.ghero h1 { font-size: clamp(3rem, 1.2rem + 6.4vw, 7rem); line-height: .98; font-weight: 400; letter-spacing: -.025em; margin: 0 auto 26px; max-width: 12ch;
  background: linear-gradient(180deg, #ffffff 20%, #C3FBE6 70%, #87E8C3); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgb(92 243 187 / .25)); }
.ghero h1 em { font-style: italic; }
.ghero .sub { font-size: 1.22rem; line-height: 1.6; color: var(--ice-2); max-width: 38rem; margin: 0 auto 34px; }
.ghero .readout { margin: 42px auto 0; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0; border-radius: 999px; overflow: hidden; border: 1px solid var(--rim);
  background: rgb(12 42 32 / .5); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.ghero .readout span { padding: 10px 18px; font: 400 12.5px/1.2 var(--mono); color: var(--ice-3); border-right: 1px solid var(--rim); }
.ghero .readout span:last-child { border-right: 0; }
.ghero .readout b { color: var(--ice); font-weight: 500; }
.ghero .scrollcue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font: 400 11px/1 var(--mono); color: var(--ice-4); letter-spacing: .1em; }

/* chapters */
.chapter { position: relative; padding: 140px 0 120px; overflow: hidden; isolation: isolate; }
.chapter .num { display: block; text-align: center; font: 400 clamp(5rem, 3rem + 9vw, 11rem)/.8 var(--serif); font-style: italic; color: transparent;
  -webkit-text-stroke: 1px rgb(167 248 217 / .35); margin-bottom: 18px; user-select: none; }
.chapter .label { display: block; text-align: center; font: 500 12.5px/1 var(--mono); color: var(--cyan); letter-spacing: .28em; margin-bottom: 26px; }
.chapter h2 { text-align: center; font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.4rem); line-height: 1.04; font-weight: 400; margin: 0 auto 22px; max-width: 16ch; }
.chapter .sub { text-align: center; font-size: 1.15rem; color: var(--ice-2); max-width: 40rem; margin: 0 auto 60px; }
.chapter.threat { background: linear-gradient(180deg, var(--abyss), #0B251D 50%, var(--abyss)); }
.chapter.shield { background: radial-gradient(80% 60% at 50% 20%, rgb(40 160 119 / .3), transparent 70%), linear-gradient(180deg, var(--abyss), #0E3226); }
.chapter.canary { background: radial-gradient(70% 50% at 50% 30%, rgb(244 213 141 / .07), transparent 70%), linear-gradient(180deg, #0E3226, #134031); }
.chapter .more { display: block; text-align: center; margin-top: 34px; font-weight: 500; }

/* large numerals (Threat) */
.bignums { display: grid; gap: 70px; margin: 0 auto; max-width: 820px; }
.bignum { text-align: center; }
.bignum .v { font: 400 clamp(4rem, 2rem + 8vw, 9rem)/.95 var(--serif); color: var(--ice); font-variant-numeric: lining-nums; letter-spacing: -.02em;
  text-shadow: 0 0 60px rgb(124 245 200 / .35); }
.bignum .v.cold { color: var(--rose); text-shadow: 0 0 60px rgb(255 123 147 / .3); }
.bignum .v small { font-size: .38em; color: var(--ice-3); letter-spacing: 0; }
.bignum .d { font-size: 1.1rem; color: var(--ice-2); max-width: 32rem; margin: 14px auto 0; }
.bignum .s { font: 400 11.5px/1.4 var(--mono); color: var(--ice-4); margin-top: 10px; }

/* frosted stage panels (sims inside chapters) */
.panel { margin: 0 auto 90px; max-width: 980px; }
.panel .cap { text-align: center; max-width: 40rem; margin: 0 auto 26px; }
.panel .cap h3 { font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem); font-weight: 400; margin: 0 0 10px; }
.panel .cap p { color: var(--ice-2); margin: 0 0 12px; }
.panel .cap .eq { text-align: left; margin: 18px auto; max-width: 34rem; }
.panel .sim { margin: 0; transform-style: preserve-3d; }
.stage { overflow: hidden; margin: 0; }

/* ascent: vertical sequence with big italic numerals (Shield steps) */
.ascent { list-style: none; padding: 0; margin: 0 auto 100px; max-width: 760px; position: relative; }
.ascent::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--cyan-line), transparent); }
.ascent li { position: relative; text-align: center; margin: 0 0 56px; padding: 26px 30px; }
.ascent li .n { display: block; font: italic 400 3.2rem/1 var(--serif); color: var(--cyan); text-shadow: 0 0 30px rgb(18 216 132 / .5); margin-bottom: 10px; }
.ascent li b { display: block; font: 400 1.7rem/1.2 var(--serif); color: var(--ice); margin-bottom: 8px; }
.ascent li p { color: var(--ice-2); max-width: 30rem; margin: 0 auto; }
.ascent li.glass { background: linear-gradient(180deg, rgb(18 60 46 / .75), rgb(12 42 32 / .75)); }

/* canary chapter: the unknowable key */
.keyplate { text-align: center; margin: 0 auto 80px; max-width: 760px; padding: 34px 26px; }
.keyplate .k { font: 500 clamp(.9rem, .6rem + 1.4vw, 1.5rem)/1.3 var(--mono); color: var(--gold); word-break: break-all; text-shadow: 0 0 24px rgb(244 213 141 / .35); }
.keyplate p { color: var(--ice-2); margin: 14px auto 0; max-width: 34rem; font-size: 15.5px; }

/* BUILD chapter surfaces from navy into ice: light section */
.chapter.build { background: linear-gradient(180deg, #134031 0, #46987B 7%, #BDECDB 16%, var(--ice) 26%, #FCFBFA 100%); color: #255846; }
.chapter.build .num { -webkit-text-stroke: 1px rgb(26 104 77 / .28); }
.chapter.build .label { color: #158A5C; }
.chapter.build h2, .chapter.build h3 { color: #0C281F; }
.chapter.build .sub, .chapter.build p { color: #386B59; }
.chapter.build a { color: #148F5F; text-decoration-color: rgb(20 143 95 / .4); }
.chapter.build code { background: rgb(17 103 72 / .07); border-color: rgb(17 103 72 / .16); color: #123E2F; }
.chapter.build .lightglass { background: linear-gradient(180deg, rgb(255 255 255 / .82), rgb(249 247 242 / .66)); border: 1px solid rgb(255 255 255 / .9);
  border-radius: var(--r); box-shadow: 0 1px 0 #fff inset, 0 30px 60px -30px rgb(26 104 77 / .35), 0 2px 10px rgb(26 104 77 / .08); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.chapter.build .code { box-shadow: 0 30px 60px -28px rgb(11 39 30 / .6); }
.chapter.build .code pre { color: #DAF5EB; }
.chapter.build .cta { color: #0C281F; border-color: rgb(17 103 72 / .25); background: rgb(255 255 255 / .6); }
.chapter.build .cta.pri { background: linear-gradient(180deg, #164B39, #0C281F); color: #F8F6F1; box-shadow: 0 12px 30px -10px rgb(12 40 31 / .6); }
.buildgrid { display: grid; gap: 22px; max-width: 980px; margin: 0 auto 90px; }
.buildgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.buildgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.buildgrid > div, .buildgrid > a { padding: 26px 26px; text-decoration: none; }
.buildgrid b { display: block; font: 400 1.5rem/1.2 var(--serif); color: #0C281F; margin-bottom: 10px; }
.buildgrid ul { margin: 0; padding-left: 1.1em; color: #386B59; }
.buildgrid li { margin: 7px 0; }
.buildgrid li::marker { color: #148F5F; }
.buildgrid .go { display: block; margin-top: 14px; font-weight: 600; color: #148F5F; }
.teaser { max-width: 860px; margin: 0 auto 26px; text-align: left; }
.floe { list-style: none; margin: 0 auto 90px; padding: 0; max-width: 760px; position: relative; }
.floe::before { content: ""; position: absolute; left: 20px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, #148F5F, rgb(20 143 95 / .15)); }
.floe li { position: relative; padding: 0 0 30px 62px; }
.floe li::before { content: ""; position: absolute; left: 12px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid rgb(17 103 72 / .3); }
.floe li.done::before { background: #148F5F; border-color: #148F5F; }
.floe li.now::before { background: #fff; border-color: #148F5F; box-shadow: 0 0 0 6px rgb(20 143 95 / .15); }
.floe b { display: block; font: 400 1.45rem/1.2 var(--serif); color: #0C281F; }
.floe small { display: block; font: 400 12px/1.4 var(--mono); color: #5D9582; margin: 3px 0 6px; }
.floe p { margin: 0; }
.chapter.build details.faq { border-bottom-color: rgb(17 103 72 / .15); }
.chapter.build details.faq summary { color: #0C281F; }
.chapter.build details.faq summary::marker { color: #148F5F; }
.chapter.build details.faq > div { color: #386B59; }
.gfoot { background: #FCFBFA; color: #386B59; padding: 60px 0 70px; font-size: 14px; border-top: 1px solid rgb(17 103 72 / .12); }
.gfoot .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; max-width: 980px; margin: 0 auto; padding: 0 28px; }
.gfoot b { display: block; font: 400 1.2rem/1.3 var(--serif); color: #0C281F; margin-bottom: 10px; }
.gfoot a { display: block; color: #386B59; text-decoration: none; margin: 6px 0; }
.gfoot a:hover { color: #148F5F; }
.gfoot .legal { max-width: 980px; margin: 34px auto 0; padding: 18px 28px 0; border-top: 1px solid rgb(17 103 72 / .12); font-size: 12.5px; }

/* shards: parallax ice fragments behind chapters (scroll-driven where supported) */
.shard { position: absolute; z-index: -1; width: 260px; height: 260px; pointer-events: none; opacity: .55;
  background: linear-gradient(135deg, rgb(167 248 217 / .18), rgb(167 248 217 / 0) 60%); clip-path: polygon(50% 0, 100% 38%, 78% 100%, 18% 88%, 0 30%);
  border: 0; filter: blur(.4px); }
.shard.s1 { left: -60px; top: 18%; transform: rotate(-12deg); }
.shard.s2 { right: -80px; top: 46%; width: 340px; height: 340px; transform: rotate(18deg); }
.shard.s3 { left: 8%; bottom: 6%; width: 180px; height: 180px; transform: rotate(40deg); }
@supports (animation-timeline: view()) {
  .shard { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes drift { from { translate: 0 120px; } to { translate: 0 -160px; } }
  .panel .sim, .ascent li, .bignum { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes rise { from { opacity: .2; transform: translateY(40px) rotateX(8deg); } to { opacity: 1; transform: none; } }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 980px) {
  .tabs { display: none; }
  .menubtn { display: inline-block; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 35; top: var(--top); left: 0; width: min(300px, 86vw); background: rgb(9 31 24 / .96); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 40px rgb(0 0 0 / .5); }
  body.nav-open .side { transform: none; }
  .side .mtabs { display: block; }
  .main { padding: 30px 22px 80px; }
  .sim .body { grid-template-columns: minmax(0, 1fr); }
  .sim .ctrls { border-right: 0; border-bottom: 1px solid var(--rim); grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
  .fnav .links, .fnav .status { display: none; }
  .fnav .burger { display: inline-block; background: none; border: 1px solid var(--rim-2); color: var(--ice); border-radius: 999px; padding: 9px 14px; font: 500 14px/1 var(--sans); cursor: pointer; }
  body.fnav-open .fnav { border-radius: 22px; flex-wrap: wrap; }
  body.fnav-open .fnav .links { display: flex; flex-direction: column; width: 100%; order: 5; padding: 6px 0 4px; }
  body.fnav-open .fnav .links a { padding: 12px 10px; font-size: 16px; }
  .buildgrid.two, .buildgrid.three { grid-template-columns: minmax(0, 1fr); }
  .gfoot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  body.site { font-size: 16.5px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand small, .top .status { display: none; }
  .searchbtn { min-width: 0; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .main { padding: 24px 16px 64px; }
  h2 { font-size: 1.65rem; margin-top: 52px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .eq { padding: 14px; }
  .eq .tag { position: static; transform: none; display: block; margin-top: 8px; text-align: right; }
  .sim canvas { height: 220px; }
  .sim canvas.tall, .hero-fig canvas, .stage canvas { height: 300px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dd { margin-bottom: 6px; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { grid-column: 1; }
  .step { grid-template-columns: 1.8rem minmax(0, 1fr); gap: 0 8px; }
  .katex-display > .katex { font-size: .94em; }
  .step .katex-display > .katex { font-size: .9em; }
  .site .col { padding: 0 16px; }
  .fnav { top: 8px; padding: 6px 6px 6px 14px; }
  .fnav .cta.pri { padding: 9px 13px; font-size: 13px; }
  .ghero { padding: 110px 0 70px; }
  .ghero .readout span { padding: 8px 12px; font-size: 11.5px; }
  .chapter { padding: 96px 0 80px; }
  .bignums { gap: 50px; }
  .panel { margin-bottom: 64px; }
  .ascent li { padding: 20px 14px; }
  .gfoot .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* the website reuses main.main so the runtime renders maths and code; undo the docs column */
.site .main { padding: 0; }
.site .main > * { max-width: none; }
.site .main h2 { border-top: 0; padding-top: 0; }
.chapter.build pre code { color: inherit; background: none; border: 0; }
.ghero .inner { position: relative; }
.ghero .inner::before { content: ""; position: absolute; inset: -8% -12%; z-index: -1; background: radial-gradient(closest-side, rgb(7 26 20 / .62), rgb(7 26 20 / .25) 70%, transparent); pointer-events: none; }
.ghero .sub { text-shadow: 0 1px 12px rgb(5 18 14 / .9); }

/* logo (asset pack from the owner's mark) */
.brand img.logo { display: block; height: 26px; width: auto; }
.fnav .brand img.logo { height: 27px; }
.gfoot img.logo { display: block; height: 34px; width: auto; margin-bottom: 14px; }

/* ---------- product pages (2026-09-25: product, how it works, token, pricing, portal) ---------- */
.fnav .links a[aria-current] { color: var(--ice); background: rgb(167 248 219 / .1); }
.fnav .status { font: 400 12px/1 var(--mono); color: var(--ice-3); text-decoration: none; margin-right: 10px; white-space: nowrap; }
.fnav .status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); margin-right: 7px; vertical-align: 1px; }
.fnav .status.down::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.phero { position: relative; min-height: 64vh; display: grid; place-items: center; overflow: hidden; padding: 150px 0 90px; isolation: isolate; text-align: center; }
.phero::before { content: ""; position: absolute; inset: 0; z-index: -2; background:
  radial-gradient(60% 55% at 50% 40%, rgb(72 218 165 / .28), transparent 70%),
  radial-gradient(40% 30% at 50% 100%, rgb(18 216 132 / .1), transparent 70%); }
.phero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1; background: linear-gradient(180deg, transparent, var(--abyss)); }
.phero .inner { max-width: 880px; padding: 0 24px; }
.phero h1 { font-size: clamp(2.6rem, 1.2rem + 5vw, 5.6rem); line-height: 1; font-weight: 400; letter-spacing: -.02em; margin: 0 auto 24px; max-width: 14ch; }
.phero .sub { font-size: 1.2rem; line-height: 1.6; color: var(--ice-2); max-width: 40rem; margin: 0 auto 30px; }
.chapter.plain { background: linear-gradient(180deg, var(--abyss), #0B251D 50%, var(--abyss)); padding-top: 90px; }
.chapter.deep { background: radial-gradient(80% 60% at 50% 20%, rgb(40 160 119 / .25), transparent 70%), linear-gradient(180deg, var(--abyss), #0E3226); padding-top: 90px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 980px; margin: 0 auto 80px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards > .glass { padding: 28px 28px 26px; }
.cards b.t { display: block; font: 400 1.55rem/1.2 var(--serif); color: var(--ice); margin-bottom: 10px; }
.cards p { color: var(--ice-2); margin: 0 0 10px; }
.cards ul { margin: 0; padding-left: 1.1em; color: var(--ice-2); }
.cards li { margin: 6px 0; }
.cards li::marker { color: var(--cyan); }
.cards .tag { display: inline-block; font: 500 11px/1 var(--mono); color: var(--cyan); letter-spacing: .12em; margin-bottom: 14px; }
.lede { text-align: center; max-width: 42rem; margin: 0 auto 50px; color: var(--ice-2); font-size: 1.12rem; }
.h3c { text-align: center; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); font-weight: 400; margin: 0 0 22px; }
.chapter.build .ptable { max-width: 980px; margin: 0 auto 70px; border-radius: var(--r); overflow: hidden; border: 1px solid rgb(17 103 72 / .15); background: rgb(255 255 255 / .75); box-shadow: 0 30px 60px -30px rgb(26 104 77 / .35); }
.chapter.build .ptable table { font-size: 16px; }
.chapter.build .ptable th { background: rgb(17 103 72 / .06); color: #386B59; border-bottom-color: rgb(17 103 72 / .15); }
.chapter.build .ptable td { color: #0C281F; border-bottom-color: rgb(17 103 72 / .1); }
.chapter.build .ptable tr.hl td { background: rgb(18 216 132 / .08); }
.chapter.build .ptable td b { font-family: var(--serif); font-weight: 400; font-size: 1.15em; }
.statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 980px; margin: 0 auto 70px; }
.statrow .glass { padding: 20px 18px; text-align: center; }
.statrow .v { font: 400 clamp(1.5rem, 1rem + 1.6vw, 2.3rem)/1.1 var(--serif); color: var(--ice); }
.statrow .d { font: 400 11.5px/1.4 var(--mono); color: var(--ice-3); margin-top: 8px; }
.flow { max-width: 980px; margin: 0 auto 80px; padding: 26px; }
.flow svg { width: 100%; height: auto; display: block; }
.flow svg text { font-family: var(--sans); fill: var(--ice); }
.flow svg .m { font-family: var(--mono); fill: var(--ice-3); font-size: 12px; }
.flow svg .box { fill: rgb(18 60 46 / .8); stroke: var(--rim-2); }
.flow svg .hot { fill: rgb(18 216 132 / .16); stroke: var(--cyan-line); }
.flow svg .burn { fill: rgb(255 123 147 / .12); stroke: rgb(255 123 147 / .5); }
.flow svg .gold { fill: rgb(244 213 141 / .1); stroke: rgb(244 213 141 / .5); }
.flow svg .edge { stroke: var(--cyan-line); stroke-width: 1.6; fill: none; }
.flow svg .pulse { fill: var(--cyan); }
.flow .cap { text-align: center; color: var(--ice-3); font-size: 14px; margin: 12px 0 0; }
.trust { max-width: 980px; margin: 0 auto 80px; }
/* research pages */
.site .main.reading { max-width: 860px; margin: 0 auto; padding: 130px 28px 40px; }
.site .main.reading h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); font-weight: 400; }
.site .main.reading h2 { margin-top: 64px; }
.rtabs { display: flex; gap: 8px; margin: 0 0 30px; flex-wrap: wrap; }
.rtabs a { font: 500 13px/1 var(--sans); padding: 9px 14px; border: 1px solid var(--rim); border-radius: 999px; color: var(--ice-2); text-decoration: none; }
.rtabs a[aria-current] { border-color: var(--cyan-line); color: var(--ice); background: var(--cyan-soft); }
/* portal */
.portal { max-width: 1000px; margin: 0 auto; padding: 0 24px 100px; }
.portal .glass { padding: 26px 28px; margin-bottom: 22px; }
.portal h3 { font: 400 1.6rem/1.2 var(--serif); margin: 0 0 8px; color: var(--ice); }
.portal p { color: var(--ice-2); margin: 0 0 14px; }
.portal .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.portal .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.portal .kvs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 6px 0 4px; }
.portal .kvs div { border: 1px solid var(--rim); border-radius: 14px; padding: 14px 14px 12px; background: rgb(3 10 8 / .35); }
.portal .kvs dt { font: 400 11.5px/1.3 var(--mono); color: var(--ice-3); margin-bottom: 6px; }
.portal .kvs dd { margin: 0; font: 400 1.3rem/1.2 var(--serif); color: var(--ice); word-break: break-all; }
.portal input[type=number], .portal input[type=text], .portal input[type=password] { font: 400 15px/1 var(--mono); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rim-2); background: rgb(3 10 8 / .5); color: var(--ice); min-width: 0; width: 11rem; }
.portal button { cursor: pointer; }
.portal .cta[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.portal .msg { font: 400 13px/1.5 var(--mono); color: var(--ice-3); margin-top: 10px; min-height: 1.5em; word-break: break-word; }
.portal .msg.err { color: var(--rose); }
.portal .msg.ok { color: var(--cyan); }
.portal .keybox { font: 500 14px/1.5 var(--mono); color: var(--gold); background: rgb(3 10 8 / .6); border: 1px dashed rgb(244 213 141 / .5); border-radius: 12px; padding: 14px; word-break: break-all; margin: 10px 0; }
.portal table { font-size: 14px; }
.portal .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 26px; list-style: none; padding: 0; counter-reset: s; }
.portal .steps li { border: 1px solid var(--rim); border-radius: 14px; padding: 12px 14px; color: var(--ice-3); font-size: 14px; counter-increment: s; }
.portal .steps li::before { content: counter(s); display: block; font: italic 400 1.6rem/1 var(--serif); color: var(--ice-4); margin-bottom: 4px; }
.portal .steps li.done { border-color: var(--cyan-line); color: var(--ice-2); }
.portal .steps li.done::before { color: var(--cyan); }
.portal .note { font-size: 14px; }
@media (max-width: 980px) {
  .cards, .cards.three, .portal .grid { grid-template-columns: minmax(0, 1fr); }
  .statrow, .portal .kvs, .portal .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fnav .status { display: none; }
}
@media (max-width: 640px) {
  .phero { padding: 120px 0 60px; min-height: 0; }
  .portal .glass { padding: 20px 16px; }
  .portal input[type=number], .portal input[type=text], .portal input[type=password] { width: 100%; }
}

/* ---------- scanner-first funnel (2026-09-25): scanner hero, verdict card, the two paths, vault, assessment */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.small { font-size: 13.5px; }
.scanhero .inner { max-width: 960px; }
.scanhero h1 { max-width: 13ch; }
.scanbar { display: flex; gap: 8px; align-items: center; max-width: 720px; margin: 0 auto; padding: 8px; border-radius: 999px; border: 1px solid var(--rim-2);
  background: rgb(8 30 23 / .62); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow), 0 0 60px -12px rgb(18 216 132 / .35); }
.scanbar:focus-within { border-color: var(--cyan-line); }
.scanbar input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ice); font: 400 15px/1.2 var(--mono); padding: 12px 16px; }
.scanbar input::placeholder { color: var(--ice-4); }
.scanbar .cta { flex: none; }
.scanbar button:disabled { opacity: .6; cursor: progress; }
.examples { margin: 16px auto 0; font: 400 12.5px/1.6 var(--mono); color: var(--ice-4); }
.examples span { margin-right: 6px; }
.linkish { background: none; border: 0; padding: 0 4px; color: var(--ice-2); font: inherit; text-decoration: underline; text-decoration-color: var(--cyan-line); text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--cyan); }
.resultwrap { position: relative; padding: 10px 0 60px; scroll-margin-top: 80px; }
.resultwrap .col, #as-out { max-width: 920px; margin: 0 auto; }
.scanout, .finding { padding: 30px 32px 26px; border-left: 3px solid var(--rim-2); }
.finding { margin: 0 0 18px; padding: 24px 26px 20px; }
.tone-loss { border-left-color: var(--rose); }
.tone-warn { border-left-color: var(--gold); }
.tone-acc { border-left-color: var(--cyan); }
.vhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.vlabel { font: 400 clamp(1.9rem, 1.3rem + 2vw, 3rem)/1.05 var(--serif); color: var(--ice); }
.finding .vlabel { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.tone-loss .vlabel { color: var(--rose); }
.tone-warn .vlabel { color: var(--gold); }
.tone-acc .vlabel { color: var(--cyan); }
.vusd b { font: 400 clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem)/1 var(--serif); color: var(--ice); }
.vusd small { font: 400 12px/1 var(--mono); color: var(--ice-3); }
.vaddr { font: 400 13px/1.4 var(--mono); color: var(--ice-3); word-break: break-all; margin: 8px 0 14px; }
.vbody { color: var(--ice-2); font-size: 16.5px; line-height: 1.6; margin: 0 0 16px; max-width: 62ch; }
.chainrow { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.chainrow li { border: 1px solid var(--rim); border-radius: 12px; padding: 9px 11px; background: rgb(3 10 8 / .35); }
.chainrow b { display: block; font: 500 12px/1.3 var(--sans); color: var(--ice-2); }
.chainrow span { font: 400 11.5px/1.3 var(--mono); color: var(--ice-4); }
.chainrow li.hit { border-color: rgb(255 123 147 / .45); }
.chainrow li.hit span { color: var(--rose); }
.chainrow li.clear span { color: var(--cyan); }
.chainrow li.na { opacity: .55; }
.scanout .tablewrap, .finding .tablewrap { margin: 0 0 16px; }
.scanout table, .finding table { font-size: 14px; }
.scanout details.faq.holdings { margin: 0 0 20px; }
.ctas.left { justify-content: flex-start; }
.fine { font: 400 12px/1.5 var(--mono); color: var(--ice-4); margin: 18px 0 0; }
.scanning { display: flex; gap: 14px; align-items: center; padding: 22px 26px; color: var(--ice-2); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rim-2); border-top-color: var(--cyan); animation: wg-spin .8s linear infinite; flex: none; }
@keyframes wg-spin { to { transform: rotate(360deg); } }
.scanerr { color: var(--rose); text-align: center; margin: 10px 0; }
.paths { padding-top: 70px; }
.pathgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 1000px; margin: 0 auto; }
a.pathcard { display: block; padding: 34px 32px 30px; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s; }
a.pathcard:hover { transform: translateY(-3px); border-color: var(--cyan-line); }
.pathcard .tag { display: inline-block; font: 500 11px/1 var(--mono); color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.pathcard b.t { display: block; font: 400 clamp(1.7rem, 1.3rem + 1.2vw, 2.4rem)/1.1 var(--serif); color: var(--ice); margin-bottom: 12px; }
.pathcard p { color: var(--ice-2); margin: 0 0 20px; }
.pathcard .go { font: 600 14px/1 var(--sans); color: var(--cyan); }
.pathcard .go::after { content: " \2192"; }
.portal .steps.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.portal .tag { font: 500 11px/1 var(--mono); color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; }
.portal h4 { font: 400 1.25rem/1.2 var(--serif); color: var(--ice); margin: 0 0 6px; }
.portal .fromscan { border-left: 3px solid var(--rose); }
.modes { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.modes .mode { display: block; padding: 16px 18px; cursor: pointer; border-radius: 14px; }
.modes .mode:has(input:checked) { border-color: var(--cyan-line); box-shadow: 0 0 0 1px var(--cyan-line) inset; }
.modes input { accent-color: var(--cyan); margin: 0 8px 0 0; }
.modes b { color: var(--ice); }
.modes span { display: block; color: var(--ice-3); font-size: 14px; margin-top: 6px; }
.portal .vault { border-left: 3px solid var(--cyan); }
.vaultaddr { font: 500 clamp(.85rem, .7rem + .6vw, 1.15rem)/1.4 var(--mono); color: var(--gold); word-break: break-all; margin: 12px 0 16px; }
.portal button:disabled { opacity: .45; cursor: not-allowed; }
.assess { max-width: 920px; margin: 0 auto 26px; padding: 24px 26px; }
.assess label { display: block; font: 400 12.5px/1.4 var(--mono); color: var(--ice-3); margin-bottom: 8px; }
.assess textarea { width: 100%; resize: vertical; background: rgb(3 10 8 / .55); border: 1px solid var(--rim-2); border-radius: 14px; color: var(--ice); font: 400 14px/1.6 var(--mono); padding: 14px 16px; margin-bottom: 14px; }
.assess textarea:focus { outline: 0; border-color: var(--cyan-line); }
.assess .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.statrow .v.loss { color: var(--rose); }
.finding ul.ctl { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; font-size: 14px; }
.finding .advice { margin: 0; color: var(--ice-2); font-size: 15px; }
.finding .advice b { color: var(--ice); }
.nextstep { padding: 26px 28px; margin-top: 8px; }
.nextstep b.t { display: block; font: 400 1.6rem/1.2 var(--serif); color: var(--ice); margin-bottom: 8px; }
.nextstep p { color: var(--ice-2); }
@media (max-width: 980px) {
  .chainrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pathgrid, .modes { grid-template-columns: minmax(0, 1fr); }
  .portal .steps.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .scanbar { flex-direction: column; border-radius: 22px; align-items: stretch; }
  .scanbar input { text-align: center; }
  .scanbar .cta { justify-content: center; }
  .chainrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scanout, .finding { padding: 22px 18px 20px; }
  .portal .steps.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.protect #i-pass { width: 20rem; }

/* ---- mainnet layer (MAINNET-SITE.md): notices, status, help, legal. Same palette, no new look. ---- */
[data-feature][hidden], .cta[hidden] { display: none !important; }
.wgbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 150; width: min(760px, calc(100vw - 28px)); padding: 12px 18px; border-radius: var(--r); border: 1px solid var(--rim); background: rgb(8 28 22 / .92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow); color: var(--ice); font-size: 14.5px; line-height: 1.5; }
.wgbar a { color: var(--cyan); }
.wgbar.geo, .wgbar.warn { border-color: rgb(244 213 141 / .45); }
.wgbar.maint { border-color: var(--cyan-line); }
.gfoot .legalnav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; border-top: 0; padding-top: 0; }
.gfoot .legalnav a { display: inline; margin: 0; }
.site .main.reading.legal-draft::before { content: none; }
.draftnote { margin: 0 0 30px; padding: 14px 18px; border-radius: var(--r-s); border: 1px solid rgb(244 213 141 / .38); background: rgb(244 213 141 / .06); font-size: 14.5px; }
.draftnote b { color: var(--gold); }
.legal-body h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-top: 46px; }
.legal-body li { margin: 6px 0; }
/* status */
.statushead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 22px 24px; margin: 0 0 26px; }
.statushead .dot, .comp .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--ice-4); }
.st-operational .dot, .dot.st-operational { background: var(--cyan); box-shadow: 0 0 0 5px var(--cyan-soft); }
.st-degraded .dot, .dot.st-degraded, .st-maintenance .dot, .dot.st-maintenance { background: var(--gold); box-shadow: 0 0 0 5px rgb(244 213 141 / .14); }
.st-outage .dot, .dot.st-outage { background: var(--rose); box-shadow: 0 0 0 5px rgb(255 123 147 / .14); }
.statushead b { font: 400 1.6rem/1.2 var(--serif); }
.statushead small { margin-left: auto; font: 400 12px/1.4 var(--mono); }
.comps { list-style: none; margin: 0 0 30px; padding: 0; }
.comp { display: flex; align-items: flex-start; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--rim); }
.comp .dot { margin-top: 7px; }
.comp b { display: block; font-weight: 500; }
.comp span.state { margin-left: auto; font: 400 12.5px/1.4 var(--mono); color: var(--ice-3); white-space: nowrap; }
.uptime { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 34px; margin: 10px 0 6px; }
.uptime i { display: block; border-radius: 2px; background: rgb(204 251 234 / .10); }
.uptime i.up { background: var(--cyan); }
.uptime i.part { background: var(--gold); }
.uptime i.down { background: var(--rose); }
.uptimekey { display: flex; justify-content: space-between; font: 400 12px/1.4 var(--mono); color: var(--ice-3); }
.incident { padding: 16px 18px; margin: 0 0 14px; }
.incident ol { list-style: none; padding: 0; margin: 8px 0 0; }
.incident li { margin: 6px 0; font-size: 14.5px; }
.incident time { font: 400 12px/1.4 var(--mono); color: var(--ice-3); margin-right: 8px; }
/* help */
.helpsearch { display: flex; gap: 10px; margin: 0 0 22px; }
.helpsearch input { flex: 1; }
.tree { padding: 22px 24px; margin: 0 0 30px; }
.tree h3 { margin-top: 0; }
.tree .opts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.tree .answer { margin: 14px 0 0; }
.tree .answer ol { padding-left: 1.2em; }
.tree .answer li { margin: 6px 0; }
.tree .crumbs { font: 400 12px/1.4 var(--mono); color: var(--ice-3); margin: 0 0 8px; }
.diag { list-style: none; padding: 0; margin: 12px 0 0; }
.diag li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--rim); font-size: 15px; }
.diag li .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--ice-4); }
.diag li.ok .dot { background: var(--cyan); }
.diag li.warn .dot { background: var(--gold); }
.diag li.bad .dot { background: var(--rose); }
.helpgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 30px; }
.helpgrid > .glass { padding: 20px 22px; }
@media (max-width: 720px) { .helpgrid { grid-template-columns: 1fr; } .comp span.state { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { .wgbar { transition: none; } }

/* ---- Wintergate Personal (job:wg-p3-site-token, 2026-10-08): price tiles, footer exit line, signed notices, interest form */
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 980px; margin: 0 auto 40px; }
.prices > .glass { padding: 28px 26px; text-align: center; }
.prices .tag { display: block; font: 500 11px/1 var(--mono); color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.prices b { display: block; font: 400 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--serif); color: var(--ice); margin-bottom: 12px; }
.prices p { color: var(--ice-2); margin: 0; }
.gfoot .exitline { max-width: 980px; margin: 0 auto 34px; padding: 16px 28px; font-size: 15px; color: #0C281F; border-bottom: 1px solid rgb(17 103 72 / .12); }
.gfoot .exitline b { display: inline; font: 600 15px/1.4 var(--sans); margin: 0 6px 0 0; }
.gfoot .exitline a { color: #148F5F; font-weight: 600; }
.notice { padding: 18px 20px; margin: 0 0 14px; }
.notice b { font-size: 1.05rem; color: var(--ice); }
.notice time { display: block; font: 400 12px/1.4 var(--mono); color: var(--ice-3); margin: 6px 0 8px; }
.notice p { margin: 0 0 6px; color: var(--ice-2); }
.notice.lv-critical { border-color: #ff7b93; }
.ifrm { max-width: 640px; margin: 0 auto; padding: 30px 30px 26px; }
.ifrm .frow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 0; margin: 18px 0 20px; }
.ifrm label { font-size: 14px; color: var(--ice-2); margin-top: 8px; }
.ifrm input, .ifrm select, .ifrm textarea { width: 100%; font: inherit; color: var(--ice); background: rgb(3 10 8 / .55); border: 1px solid var(--rim-2); border-radius: 10px; padding: 10px 12px; }
.ifrm textarea { resize: vertical; }
@media (max-width: 760px) { .prices { grid-template-columns: minmax(0, 1fr); } .gfoot .exitline { padding: 14px 20px; } }

/* canary headline (owner review 1, 2026-10-08): the live bounty plate, right after the hero on the home page and on canary.html */
.canaryhead { background: radial-gradient(60% 45% at 50% 42%, rgb(244 213 141 / .16), transparent 70%), linear-gradient(180deg, var(--abyss), #0E3226 55%, #134031); }
.canaryhead h2, .canaryhead .chh { text-align: center; font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.4rem); line-height: 1.04; font-weight: 400; margin: 0 auto 22px; max-width: 16ch; }
.canaryhead .label { color: var(--gold); }
.bountyplate { position: relative; isolation: isolate; text-align: center; margin: 0 auto 70px; max-width: 640px; padding: 56px 28px 44px; overflow: hidden;
  border-color: rgb(244 213 141 / .32); box-shadow: 0 0 0 1px rgb(244 213 141 / .12) inset, 0 40px 90px -40px rgb(244 213 141 / .35); }
.bountyplate .halo { position: absolute; z-index: -1; inset: -40%; background: conic-gradient(from 0deg, transparent 0 20%, rgb(244 213 141 / .22) 30%, transparent 42%, transparent 70%, rgb(124 245 200 / .16) 80%, transparent 92%);
  animation: wg-halo 14s linear infinite; }
.bountyplate .tag { color: var(--gold); }
.bountyplate .bv { font: 400 clamp(4.2rem, 2rem + 9vw, 9.5rem)/1 var(--serif); color: var(--gold); letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 0 50px rgb(244 213 141 / .45); margin: 10px 0 6px; animation: wg-glow 4.5s ease-in-out infinite; }
.bountyplate .bv small { font-size: .3em; color: var(--ice-2); letter-spacing: .04em; text-shadow: none; }
.bountyplate .bd { color: var(--ice-2); font-size: 1.12rem; max-width: 30rem; margin: 0 auto; }
.bountyplate .bs { font: 400 11.5px/1.4 var(--mono); color: var(--ice-4); margin: 14px 0 0; }
.bountyplate.fired { border-color: rgb(255 123 147 / .5); }
.bountyplate.fired .bv { color: var(--rose); text-shadow: 0 0 50px rgb(255 123 147 / .45); }
@keyframes wg-halo { to { transform: rotate(360deg); } }
@keyframes wg-glow { 50% { text-shadow: 0 0 80px rgb(244 213 141 / .7); } }
@supports (animation-timeline: view()) {
  .bountyplate { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
}
@media (max-width: 760px) { .bountyplate { padding: 44px 18px 34px; margin-bottom: 50px; } }
