/* =========================================================================
   SafeQuant — visual system "measurement dossier"
   Paper, ink, one signal colour. Rules instead of shadows, numbers oversized,
   annotations in mono. Sharp corners on purpose; pills only for states.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  --paper:        #F1EDE3;
  --paper-2:      #E8E2D3;
  --paper-3:      #DED6C3;
  --ink:          #12100C;
  --ink-2:        rgba(18, 16, 12, 0.74);
  --ink-3:        rgba(18, 16, 12, 0.50);
  --rule:         rgba(18, 16, 12, 0.16);
  --rule-2:       rgba(18, 16, 12, 0.30);
  --signal:       #FF3D00;
  --signal-soft:  rgba(255, 61, 0, 0.10);
  --terminal:     #0B0B0A;
  --terminal-2:   #141412;

  --exposed:      #D7263D;
  --weakened:     #A2560A;
  --resilient:    #4D7C0F;
  --postquantum:  #06785A;

  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --max:    1220px;
  --gutter: clamp(20px, 4.6vw, 56px);
  --sp:     clamp(56px, 8vw, 120px);
  --ease:   cubic-bezier(.2, .7, .2, 1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(18, 16, 12, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 16, 12, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 78%);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
::selection { background: var(--signal); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.94;
  margin: 0;
}
p { margin: 0; }

/* ------------------------------------------------------------- utilities */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.wrap-narrow { max-width: 820px; }
.section { padding: var(--sp) 0; position: relative; z-index: 1; }
.section--tight { padding: calc(var(--sp) * 0.62) 0; }
[id] { scroll-margin-top: 86px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }

/* eyebrow: mono annotation with a rule */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--signal);
  flex: none;
}

/* section index number, oversized outline */
.section__head { display: grid; gap: 18px; margin-bottom: 40px; }
.section__head h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 20ch; }
.section__head .lede { font-size: clamp(15px, 1.5vw, 18px); color: var(--ink-2); max-width: 60ch; }

/* --------------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 17px; letter-spacing: -0.03em; text-decoration: none;
  white-space: nowrap;
}
.brand__mark {
  width: 26px; height: 26px; flex: none;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  border-radius: 3px;
}
.nav__links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav__links a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-2);
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.nav-toggle { display: none; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: 2px;
  background: transparent; color: var(--ink);
  cursor: pointer;
  transition: transform .15s var(--ease), background .15s, color .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { box-shadow: 3px 3px 0 var(--signal); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn--signal:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn--sm { padding: 9px 15px; font-size: 11.5px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 3px;
}

/* --------------------------------------------------------------- panels */
.panel {
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  position: relative;
}
.panel--flat { border-width: 1px; border-color: var(--rule-2); background: transparent; }
/* corner registration marks */
.panel--reg::before, .panel--reg::after {
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
  border-color: var(--ink); border-style: solid;
}
.panel--reg::before { top: -1.5px; left: -1.5px; border-width: 1.5px 0 0 1.5px; }
.panel--reg::after { bottom: -1.5px; right: -1.5px; border-width: 0 1.5px 1.5px 0; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 7vw, 92px) 0 var(--sp); position: relative; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero h1 {
  font-size: clamp(46px, 7.4vw, 104px);
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin: 0 0 26px;
}
.hero h1 em {
  font-style: normal;
  color: var(--signal);
  position: relative;
  display: inline-block;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.06em;
  background: var(--signal); opacity: .35;
}
.hero__lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55; color: var(--ink-2); max-width: 46ch; margin-bottom: 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; border-top: 1px solid var(--rule); padding-top: 20px;
}
.hero__meta div { display: grid; gap: 4px; }
.hero__meta .k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.hero__meta .v {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}

/* stamp */
.stamp {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--signal); border: 1.5px solid var(--signal);
  padding: 6px 11px; transform: rotate(-2.5deg); border-radius: 2px;
  margin-bottom: 22px;
}

/* --------------------------------------------------------------- scanner */
.scanner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--paper-2); border: 1.5px solid var(--ink);
  border-radius: 2px; overflow: hidden;
}
.scanner__controls { padding: clamp(22px, 3vw, 34px); border-right: 1.5px solid var(--ink); display: grid; gap: 22px; align-content: space-between; }
.scanner__out { padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; align-content: start; background: var(--paper); }

.tabs {
  display: inline-flex; padding: 3px; gap: 3px;
  border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper);
}
.tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 9px 15px; border-radius: 1px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.field label {
  display: block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 8px;
}
.select {
  width: 100%; appearance: none;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2312100C' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 14px 44px 14px 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
  color: var(--ink); cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  background: transparent; border: 1px solid var(--rule-2); cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em;
  color: var(--ink-2);
  transition: background .16s, color .16s, border-color .16s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* dial */
.dial { position: relative; width: min(280px, 78vw); margin: 0 auto; }
.dial svg { width: 100%; height: auto; overflow: visible; }
.dial__track { fill: none; stroke: var(--rule); stroke-width: 10; }

.dial__ticks { stroke: var(--rule-2); stroke-width: 1; }
.dial__center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px;
}
.score {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(56px, 8vw, 82px); line-height: 0.86;
  letter-spacing: -0.055em; font-variant-numeric: tabular-nums;
  color: var(--exposed);
}
.score small { font-size: 0.32em; letter-spacing: -0.02em; color: var(--ink-3); font-weight: 600; }
.band {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-top: 10px; color: var(--exposed);
}

.scanner__label { display: grid; gap: 6px; text-align: center; }
.scanner__label .name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.scanner__label .sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.scanner__note {
  background: var(--paper-2); border-left: 3px solid var(--signal);
  padding: 14px 16px; font-size: 14.5px; color: var(--ink-2); border-radius: 0 2px 2px 0;
}
.scanner__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* band legend */
.legend { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.legend div {
  padding: 12px 14px; border-right: 1px solid var(--rule);
  display: grid; gap: 3px;
}
.legend div:last-child { border-right: 0; }
.legend .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.legend .r { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

/* ---------------------------------------------------------------- slider */
.machine { display: grid; gap: 28px; }
.machine__readout {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end;
  border-bottom: 1px solid var(--rule); padding-bottom: 18px;
}
.machine__q {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(32px, 5vw, 58px); letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.machine__q span { font-size: 0.42em; color: var(--ink-3); letter-spacing: 0; }
.machine__verdict { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--ink-2); max-width: 34ch; }

.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px;
  background: transparent; cursor: grab; margin: 0;
}
.range:active { cursor: grabbing; }
.range::-webkit-slider-runnable-track {
  height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--rule-2) 0 1px, transparent 1px 10%),
    linear-gradient(90deg, var(--rule) 0%, var(--signal) 100%);
  border: 1px solid var(--ink);
}
.range::-moz-range-track {
  height: 6px; border: 1px solid var(--ink);
  background: linear-gradient(90deg, var(--rule), var(--signal));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 30px; margin-top: -13px;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px;
  box-shadow: 2px 2px 0 var(--ink);
}
.range::-moz-range-thumb {
  width: 22px; height: 30px; border-radius: 2px;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.range:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.range__scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; }

.machine__list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.machine__row {
  display: grid; grid-template-columns: minmax(0, 1fr) 110px 88px;
  gap: 14px; align-items: center;
  padding: 12px 2px; border-bottom: 1px solid var(--rule);
  font-size: 14px;
  transition: background .2s, opacity .2s;
}
.machine__row .nm { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.machine__row .th { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); text-align: right; }
.machine__row .st {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; text-align: right; font-weight: 600;
}
.machine__row[data-falls="true"] { background: var(--signal-soft); }
.machine__row[data-falls="true"] .nm { color: var(--exposed); }
.machine__row[data-falls="true"] .st { color: var(--exposed); }
.machine__row[data-falls="false"] .st { color: var(--postquantum); }

/* -------------------------------------------------------------- explorer */
.explorer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; border: 1.5px solid var(--ink); background: var(--paper-2); border-radius: 2px; }
.explorer__list { padding: 10px 0; border-right: 1.5px solid var(--ink); }
.bar {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 46px;
  gap: 12px; align-items: center; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--rule);
  padding: 10px 18px; cursor: pointer; text-align: left;
  transition: background .15s;
}
.bar:last-child { border-bottom: 0; }
.bar:hover { background: var(--paper); }
.bar[aria-pressed="true"] { background: var(--paper); box-shadow: inset 3px 0 0 var(--signal); }
.bar__name { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__track { height: 10px; background: var(--rule); position: relative; }
.bar__fill { display: block; height: 100%; width: 0; transition: width .6s var(--ease); }
.bar__score { font-family: var(--font-display); font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }

.explorer__detail { padding: clamp(22px, 3vw, 32px); display: grid; gap: 16px; align-content: start; background: var(--paper); }
.explorer__detail .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.explorer__name { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; }
.explorer__score { display: flex; align-items: baseline; gap: 12px; }
.explorer__score b { font-family: var(--font-display); font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.explorer__note { font-size: 15px; color: var(--ink-2); min-height: 3em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; border-top: 1px solid var(--rule); padding-top: 14px; }
.kv dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.kv dd { margin: 0; font-size: 14px; }

/* ---------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); }
.steps__rail { border-right: 1.5px solid var(--ink); padding: 10px 0; }
.steps__tab {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--rule);
  padding: 14px 20px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.steps__tab:last-child { border-bottom: 0; }
.steps__tab .n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.steps__tab .t { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.steps__tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.steps__tab[aria-pressed="true"] .n { color: var(--signal); }
.steps__body { padding: clamp(24px, 3.4vw, 40px); display: grid; gap: 16px; align-content: start; background: var(--paper); }
.steps__body h3 { font-size: clamp(22px, 2.8vw, 30px); }
.steps__body p { font-size: 16px; color: var(--ink-2); max-width: 56ch; }
.steps__figure {
  border: 1px solid var(--rule-2); background: var(--paper-2);
  padding: 18px; display: grid; gap: 10px; font-family: var(--font-mono); font-size: 12px;
}
.steps__figure .row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--rule); padding-bottom: 6px; }
.steps__figure .row:last-child { border-bottom: 0; }
.steps__figure .hl { color: var(--signal); font-weight: 600; }
.steps__nav { display: flex; gap: 8px; }

/* ----------------------------------------------------------------- quiz */
.quiz { border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); padding: clamp(22px, 3vw, 34px); display: grid; gap: 20px; max-width: 820px; }
.quiz__meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.quiz__q { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.6vw, 28px); letter-spacing: -0.03em; line-height: 1.12; }
.quiz__opts { display: grid; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1.5px solid var(--rule-2); border-radius: 2px;
  padding: 14px 16px; cursor: pointer; text-align: left; font-size: 15px;
  transition: border-color .15s, background .15s, transform .12s;
}
.opt:hover { border-color: var(--ink); transform: translateX(2px); }
.opt .idx {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  border: 1px solid var(--rule-2); width: 22px; height: 22px; flex: none;
  display: grid; place-items: center; border-radius: 2px;
}
.opt[data-state="right"] { border-color: var(--postquantum); background: rgba(6, 120, 90, 0.08); }
.opt[data-state="right"] .idx { border-color: var(--postquantum); color: var(--postquantum); }
.opt[data-state="wrong"] { border-color: var(--exposed); background: rgba(215, 38, 61, 0.07); }
.opt[data-state="wrong"] .idx { border-color: var(--exposed); color: var(--exposed); }
.quiz__fb { font-size: 14.5px; color: var(--ink-2); min-height: 2.6em; border-left: 3px solid var(--signal); padding-left: 14px; }
.quiz__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.quiz__progress { display: flex; gap: 5px; }
.quiz__progress i { width: 26px; height: 3px; background: var(--rule-2); display: block; }
.quiz__progress i.on { background: var(--ink); }
.quiz__score { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

/* ------------------------------------------------------------- terminal */
.console {
  background: var(--terminal); color: #E8E4D8;
  border: 1.5px solid var(--ink); border-radius: 2px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 420px;
  box-shadow: 6px 6px 0 var(--paper-3);
}
.console__bar {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(232, 228, 216, 0.6);
}
.dot { width: 7px; height: 7px; background: #37D67A; border-radius: 50%; box-shadow: 0 0 8px #37D67A; flex: none; }
.console__log { padding: 16px; display: grid; gap: 14px; align-content: start; overflow-y: auto; max-height: 420px; scrollbar-width: thin; }
.msg { display: grid; gap: 5px; font-size: 14px; line-height: 1.5; }
.msg__who, .msg__role { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(232, 228, 216, 0.42); }
.msg__body { color: #E8E4D8; white-space: pre-wrap; }
.msg--you .msg__body { color: #9FE870; }
.msg--bot .msg__body { color: #E8E4D8; }
.msg__meta { font-family: var(--font-mono); font-size: 10px; color: rgba(232, 228, 216, 0.38); letter-spacing: 0.04em; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 5px; height: 5px; background: rgba(232, 228, 216, 0.6); border-radius: 50%; animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.console__form { display: flex; gap: 9px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.console__form input {
  flex: 1; background: var(--terminal-2); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 13px; color: #E8E4D8;
}
.console__form input::placeholder { color: rgba(232, 228, 216, 0.35); }
.console__form input:focus { outline: 2px solid var(--signal); outline-offset: 1px; }
.ask { background: var(--signal); color: #fff; border: 1.5px solid var(--signal); border-radius: 2px; padding: 0 20px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.ask:hover { background: #E63600; }
.ask:disabled { opacity: .5; cursor: wait; }
.suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 12px 12px; }
.suggest button {
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(232, 228, 216, 0.72);
  border-radius: 999px; padding: 6px 11px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.03em; cursor: pointer; transition: border-color .15s, color .15s;
}
.suggest button:hover { border-color: var(--signal); color: #fff; }

/* ---------------------------------------------------------------- method */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--ink); border-radius: 2px; overflow: hidden; }
.card { padding: clamp(20px, 2.6vw, 30px); border-right: 1.5px solid var(--ink); background: var(--paper-2); display: grid; gap: 10px; align-content: start; }
.card:last-child { border-right: 0; }
.card .n { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--signal); }
.card h3 { font-size: 19px; letter-spacing: -0.02em; }
.card p { font-size: 14.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------- faq */
.faq { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 1.8vw, 19px);
  letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--signal); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 0 22px; max-width: 70ch; color: var(--ink-2); font-size: 15px; }

/* ------------------------------------------------------------------ misc */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); }
.stat { padding: 20px 22px; border-right: 1.5px solid var(--ink); display: grid; gap: 5px; align-content: start; }
.stat:last-child { border-right: 0; }
.stat .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .s { font-size: 12.5px; color: var(--ink-3); }

.pill {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}

.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 2px; }
table.data { width: 100%; border-collapse: collapse; background: var(--paper-2); font-size: 14px; }
table.data th {
  text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 500;
  padding: 12px 16px; border-bottom: 1.5px solid var(--ink);
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; border-radius: 2px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 90; box-shadow: 4px 4px 0 var(--signal);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--paper); padding: var(--sp) 0 34px; margin-top: var(--sp); }
.footer a { color: var(--paper); text-decoration: none; }
.footer a:hover { color: var(--signal); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 48px; }
.footer .brand { color: var(--paper); }
.footer .brand__mark { background: var(--paper); color: var(--ink); }
.footer__blurb { font-size: 13.5px; color: rgba(241, 237, 227, 0.6); max-width: 34ch; margin-top: 14px; }
.footer h2 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(241, 237, 227, 0.45); font-weight: 500; margin-bottom: 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-top: 1px solid rgba(241, 237, 227, 0.16); padding-top: 22px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(241, 237, 227, 0.5);
}
.legal { max-width: 56ch; line-height: 1.6; }

/* --------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .scanner { grid-template-columns: 1fr; }
  .scanner__controls { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .explorer { grid-template-columns: 1fr; }
  .explorer__list { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .steps { grid-template-columns: 1fr; }
  .steps__rail { border-right: 0; border-bottom: 1.5px solid var(--ink); display: grid; grid-template-columns: repeat(2, 1fr); }
  .steps__tab { border-right: 1px solid var(--rule); }
  .cards { grid-template-columns: 1fr; }
  .card { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .card:last-child { border-bottom: 0; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 18px;
  }
  .nav__links.open a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav-toggle {
    display: inline-grid; place-items: center; margin-left: auto;
    width: 40px; height: 40px; background: none; border: 1.5px solid var(--ink);
    border-radius: 2px; cursor: pointer;
  }
  .nav__cta { display: none; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero h1 { letter-spacing: -0.04em; }
  .legend { grid-template-columns: 1fr 1fr; }
  .legend div:nth-child(2) { border-right: 0; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1.5px solid var(--ink); }
  .bar { grid-template-columns: 110px minmax(0, 1fr) 38px; padding: 10px 12px; }
  .machine__row { grid-template-columns: minmax(0, 1fr) 76px; }
  .machine__row .th { display: none; }
  .machine__readout { grid-template-columns: 1fr; }
  .machine__verdict { text-align: left; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .steps__rail { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------- reduced motion / print */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  body::before, .header, .footer, .console, .quiz, .machine { display: none !important; }
  body { background: #fff; color: #000; }
  .panel, .scanner, .explorer, .steps, .cards { border-color: #000; }
  a { text-decoration: none; }
  a::after { content: " (" attr(href) ")"; font-size: 10px; }
}

/* ------------------------------------------------------- late additions */
/* the scanner and the hero both animate this circle */
.gauge__fill { fill: none; stroke: var(--exposed); stroke-width: 10; stroke-linecap: butt;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .85s var(--ease), stroke .3s; }


.analyst-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .analyst-split { grid-template-columns: 1fr; } }

/* hero mini card: band above the number */
.hero .dial__center { gap: 6px; }
.hero .dial__center .band { order: -1; }

/* machine list: keep the row grid readable when labels wrap */
.machine__row .nm { line-height: 1.2; }
.machine__row .nm small { display: block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
/* dial sizing: the number must sit inside the ring */
.hero .dial .score { font-size: 54px; letter-spacing: -0.05em; }
.hero .dial .band { font-size: 10px; margin-top: 2px; }
.scanner .dial { width: min(300px, 80vw); }
.scanner .dial .score { font-size: clamp(64px, 8.4vw, 88px); }
/* ================================================================ documents
   docs/, whitepaper.html, tokenomics.html and 404.html share this block.
   ========================================================================= */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 100; }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }

.page-head { padding: clamp(38px, 6vw, 76px) 0 clamp(24px, 3vw, 40px); border-bottom: 1.5px solid var(--ink); }
.page-head .eyebrow { margin-bottom: 18px; }
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.92;
  font-size: clamp(38px, 6vw, 74px); }
.lede { font-size: clamp(15px, 1.6vw, 18px); line-height: 1.55; color: var(--ink-2); max-width: 66ch; }
.meta-line { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.meta-line b { color: var(--ink); font-weight: 500; }

/* layout with a sticky sidebar */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  padding: clamp(32px, 5vw, 64px) 0 var(--sp); }
.doc__side { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; }
.doc__side-h, .doc__side h4 {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 12px; font-weight: 500; }
.doc__side a {
  display: block; padding: 7px 0; font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  border-left: 2px solid transparent; padding-left: 12px; margin-left: -12px;
}
.doc__side a:hover { color: var(--ink); border-left-color: var(--signal); }

/* long-form text */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: clamp(24px, 3vw, 33px); margin-top: 2.1em; padding-top: 1.1em; border-top: 1px solid var(--rule); }
.prose h3 { font-size: clamp(17px, 1.9vw, 21px); margin-top: 1.9em; letter-spacing: -0.02em; }
.prose p, .prose li { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--signal); }
.prose ul, .prose ol { padding-left: 1.15em; display: grid; gap: .5em; }
.prose li::marker { color: var(--signal); font-family: var(--font-mono); font-size: .9em; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--paper-2);
  border: 1px solid var(--rule); padding: .1em .4em; border-radius: 2px; }
.prose pre { background: var(--terminal); color: #E8E4D8; padding: 18px; overflow-x: auto;
  border-radius: 2px; font-size: 12.5px; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--signal); color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1.5px solid var(--ink); }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.prose caption { caption-side: bottom; font-size: 12px; color: var(--ink-3); padding-top: 10px; text-align: left; }

/* small blocks */
.callout { border: 1.5px solid var(--ink); background: var(--paper-2); padding: 18px 20px; border-radius: 2px;
  display: grid; gap: 8px; }
.callout p { font-size: 14.5px; color: var(--ink-2); }
.card__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.fee-bar { display: flex; height: 26px; border: 1.5px solid var(--ink); overflow: hidden; }
.fee-bar span { display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px;
  color: #fff; letter-spacing: .06em; }
.btn--ghost { border-color: var(--rule-2); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* footer for the document pages */
.site-footer { background: var(--ink); color: var(--paper); padding: var(--sp) 0 34px; margin-top: var(--sp); }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: var(--signal); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-grid h2, .footer-grid h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(241,237,227,.45); font-weight: 500; margin: 0 0 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-top: 1px solid rgba(241,237,227,.16); padding-top: 22px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(241,237,227,.5); }

/* 404 */
.nf { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 18px; }
.nf h1 { font-size: clamp(64px, 14vw, 160px); letter-spacing: -.05em; line-height: .82; color: var(--signal); }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; }
  .doc__side { position: static; display: flex; flex-wrap: wrap; gap: 6px 16px; border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
  .doc__side a { border-left: 0; padding-left: 0; margin-left: 0; }
  .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
}

/* steps rail and console balance */
.steps__rail { grid-auto-rows: 1fr; }
.steps__tab { align-items: center; }
.console { min-height: 340px; }
table.data th.num { text-align: right; }
/* brand mark inside the document header */
.brand svg { width: 26px; height: 26px; flex: none; color: var(--ink); }
.site-footer .brand svg { color: var(--paper); }
/* the first heading of a document should not double the page-head rule */
.prose > h2:first-child, .prose > h2:first-of-type:not(:nth-child(n+3)) { border-top: 0; padding-top: 0; margin-top: 0; }
/* emphasis inside display type: signal colour, never synthetic italic */
.display em, .page-head em, .section__head em, .hero h1 em, .lede em { font-style: normal; color: var(--signal); }
.prose em { color: var(--ink); }
/* ============================================================= share card */
.share {
  border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper);
  padding: 0; width: min(940px, 94vw); max-width: 94vw; margin: auto;
  color: var(--ink);
}
.share::backdrop { background: rgba(18, 16, 12, 0.55); backdrop-filter: blur(3px); }
.share[open] { animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.share__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border-bottom: 1.5px solid var(--ink);
}
.share__head h2 { font-size: clamp(18px, 2.2vw, 23px); letter-spacing: -0.03em; }
.share__x {
  background: none; border: 1.5px solid var(--ink); border-radius: 2px;
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; flex: none;
}
.share__x:hover { background: var(--ink); color: var(--paper); }
.share__stage { padding: 16px; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); }
.share__stage canvas { width: 100%; height: auto; display: block; background: var(--paper); border: 1px solid var(--rule-2); }
.share__actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 16px 22px 6px; }
.share p { padding: 0 22px 20px; }
/* the note block should read as a caption under the dial, not a boxed banner */
.scanner__note { background: transparent; border-left: 0; border-top: 1px solid var(--rule); padding: 14px 0 0; }
.scanner__actions { padding-top: 4px; }
/* ============================================================ the desk */
.gate {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2);
}
.gate__steps { display: grid; border-right: 1.5px solid var(--ink); }
.gate__step {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px;
  padding: 20px 22px; border-bottom: 1px solid var(--rule);
}
.gate__step:last-child { border-bottom: 0; }
.gate__step .n {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--signal); padding-top: 3px;
}
.gate__step b { display: block; font-family: var(--font-display); font-size: 16px; letter-spacing: -0.02em; margin-bottom: 3px; }
.gate__step p { font-size: 13.5px; color: var(--ink-2); }

.gate__action {
  padding: 22px; display: grid; gap: 12px; align-content: center; justify-items: start;
}
.gate__status { font-size: 11.5px; letter-spacing: .04em; color: var(--ink-3); }
.gate__action .btn { width: 100%; }

.desk { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.desk__side { display: grid; gap: 14px; position: sticky; top: 88px; }
.desk__main { min-width: 0; }
.console--tall { min-height: 440px; }
.console--tall .console__log { max-height: 420px; }
.console__spacer { flex: 1; }
.console__clear {
  background: none; border: 1px solid rgba(255,255,255,0.2); color: rgba(232,228,216,.7);
  border-radius: 2px; padding: 3px 9px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.console__clear:hover { border-color: var(--signal); color: #fff; }

@media (max-width: 980px) {
  .gate { grid-template-columns: 1fr; }
  .gate__steps { border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .desk { grid-template-columns: 1fr; }
  .desk__side { position: static; }
  .console--tall { min-height: 460px; }
}
/* ============================================================ portfolio */
.portfolio { border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); margin-bottom: 22px; }
.portfolio__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 18px 22px; border-bottom: 1.5px solid var(--ink); flex-wrap: wrap;
}
.portfolio__score { text-align: right; }
.portfolio__rows { display: grid; }
.pf-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) 110px 70px 92px;
  gap: 14px; align-items: center; padding: 13px 22px; border-bottom: 1px solid var(--rule);
}
.pf-row:last-child { border-bottom: 0; }
.pf-row--head {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 10px; padding-bottom: 10px;
}
.pf-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.pf-name small { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.pf-bal { font-family: var(--font-mono); font-size: 12.5px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pf-score { font-family: var(--font-display); font-weight: 800; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.pf-band { text-align: right; }
.pf-row[data-empty="true"] { opacity: .5; }
.portfolio__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; border-top: 1.5px solid var(--ink); flex-wrap: wrap; }
@media (max-width: 700px) {
  .pf-row { grid-template-columns: minmax(0, 1fr) 60px; row-gap: 4px; }
  .pf-row--head { display: none; }
  .pf-bal, .pf-band { display: none; }
  .portfolio__head { align-items: flex-start; }
  .portfolio__score { text-align: left; }
}
/* message meta: block under the answer, separated by middots */
.msg__meta { display: block; margin-top: 7px; font-size: 10px; }
.msg__meta span + span::before { content: ' · '; opacity: .55; }
/* the wallet address can be long: wrap it instead of overflowing */
.portfolio__head p[data-pf-addr] { word-break: break-all; max-width: 46ch; }
@media (max-width: 700px) { .portfolio__head p[data-pf-addr] { font-size: 11px; } }
/* scanner embedded inside the desk */
.scan-block { margin-bottom: 26px; }
.scan-block .section__head { margin-bottom: 22px; }
.scan-block .section__head h2 { font-size: clamp(24px, 3vw, 34px); }
.scan-block .section__head .lede { font-size: 15px; max-width: 68ch; }
/* the agent carries the score with it */
.console__verdict {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em;
  padding: 3px 9px; border: 1px solid currentColor; border-radius: 999px;
  margin-left: 10px; color: #FF6A7D;
}
/* wallet bar: the manual step between connecting and getting a verdict */
.walletbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border: 1.5px solid var(--ink); background: var(--paper-2); border-radius: 2px;
  padding: 12px 16px; margin-bottom: 18px;
}
.walletbar__who { display: flex; align-items: baseline; gap: 10px; }
.walletbar__who span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.walletbar__who b { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.walletbar__status { font-size: 11.5px; color: var(--ink-3); margin-left: auto; letter-spacing: .02em; }
.walletbar__status[data-tone="ok"] { color: var(--postquantum); }
.walletbar__status[data-tone="bad"] { color: var(--exposed); }
@media (max-width: 640px) { .walletbar__status { margin-left: 0; width: 100%; } }/* ================================================================ ticker */
.ticker {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); overflow: hidden;
  padding: 10px 0; position: relative; z-index: 1;
}
.ticker__track {
  display: flex; width: max-content; gap: 34px;
  animation: ticker 48s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; opacity: .82;
}
.ticker span i {
  font-style: normal; font-size: 10px; letter-spacing: .06em; color: var(--signal); opacity: .9;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; overflow-x: auto; }
}

/* ticker: a dot separates the items */
.ticker span + span::before { content: '·'; margin-right: 34px; opacity: .35; }
.ticker span i { display: none; }

/* ================================================================ dark hero
   A black stage with a perspective particle field: depth without WebGL.
   ========================================================================= */
.hero--dark {
  position: relative; overflow: hidden;
  background: #06070C; color: var(--paper);
  padding-top: clamp(56px, 8vw, 110px);
  padding-bottom: clamp(56px, 8vw, 110px);
  margin-top: -68px; /* slide under the sticky header */
  padding-top: calc(68px + clamp(48px, 7vw, 90px));
}
.hero--dark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: rgba(241, 237, 227, 0.14);
}
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 46% at 62% 42%, rgba(255, 61, 0, 0.13) 0%, rgba(6, 7, 12, 0) 62%),
    radial-gradient(120% 90% at 50% 110%, rgba(6, 7, 12, 0.95) 20%, rgba(6, 7, 12, 0) 70%);
}
.hero--dark .wrap { position: relative; z-index: 2; }
.hero__corner {
  position: absolute; z-index: 2; margin: 0;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(241, 237, 227, 0.42);
}
.hero__corner--l { top: 92px; left: var(--gutter); }
.hero__corner--r { top: 92px; right: var(--gutter); }

.hero--dark .eyebrow { color: rgba(241, 237, 227, 0.55); }
.hero--dark h1 { color: var(--paper); }
.hero--dark h1 em { color: var(--signal); }
.hero--dark .hero__lede { color: rgba(241, 237, 227, 0.72); }
.hero--dark .hero__meta { border-top-color: rgba(241, 237, 227, 0.16); }
.hero--dark .hero__meta .k { color: rgba(241, 237, 227, 0.45); }
.hero--dark .hero__meta .v { color: var(--paper); }

/* the score card on black */
.hero--dark .panel {
  background: rgba(241, 237, 227, 0.03);
  border-color: rgba(241, 237, 227, 0.22);
  backdrop-filter: blur(2px);
}
.hero--dark .panel .eyebrow { color: rgba(241, 237, 227, 0.45); }
.hero--dark .dial__track { stroke: rgba(241, 237, 227, 0.14); }
.hero--dark .score { color: var(--paper); }
.hero--dark .score small { color: rgba(241, 237, 227, 0.4); }
.hero--dark .muted { color: rgba(241, 237, 227, 0.55); }
.hero--dark .btn { border-color: rgba(241, 237, 227, 0.35); color: var(--paper); }
.hero--dark .btn:hover { box-shadow: 3px 3px 0 var(--signal); border-color: var(--paper); }
.hero--dark .btn--signal { border-color: var(--signal); color: #fff; }
.hero__halo {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 61, 0, 0.28) 0%, rgba(255, 61, 0, 0) 68%);
  filter: blur(6px); animation: halo 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes halo { from { opacity: .55; transform: translate(-50%, -50%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }

/* the header floats over the black stage until you scroll */
body.on-dark-hero .header {
  background: transparent; border-bottom-color: rgba(241, 237, 227, 0.14);
}
body.on-dark-hero .header .brand { color: var(--paper); }
body.on-dark-hero .header .brand__mark { background: var(--paper); color: var(--ink); }
body.on-dark-hero .header .nav__links a { color: rgba(241, 237, 227, 0.68); }
body.on-dark-hero .header .nav__links a:hover { color: var(--paper); border-bottom-color: var(--signal); }
body.on-dark-hero .header .nav-toggle { border-color: rgba(241, 237, 227, 0.4); color: var(--paper); }
body.on-dark-hero .header .nav__cta { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.scrolled .header { background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom-color: var(--rule); }
body.scrolled .header .brand { color: var(--ink); }
body.scrolled .header .brand__mark { background: var(--ink); color: var(--paper); }
body.scrolled .header .nav__links a { color: var(--ink-2); }
body.scrolled .header .nav__links a:hover { color: var(--ink); }
body.scrolled .header .nav-toggle { border-color: var(--ink); color: var(--ink); }
body.scrolled .header .nav__cta { background: var(--ink); color: var(--paper); border-color: var(--ink); }

@media (max-width: 760px) {
  .hero__corner { display: none; }
  body.on-dark-hero .nav__links.open { background: #06070C; border-bottom-color: rgba(241,237,227,.2); }
  body.on-dark-hero .nav__links.open a { color: var(--paper); border-bottom-color: rgba(241,237,227,.16); }
}
@media (prefers-reduced-motion: reduce) { .hero__halo { animation: none; } }

/* ========================================================= elliptic curve
   secp256k1 as the mark: y² = x³ + 7, lit like a metal ribbon on black.
   ========================================================================= */
.hero__card { padding: 22px 22px 20px; display: grid; gap: 14px; }
.hero__card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero__chip {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .14em;
  padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; color: #FF6A7D;
}
.curve { position: relative; }
.curve svg { width: 100%; height: auto; display: block; }
.curve__line { filter: drop-shadow(0 2px 10px rgba(255, 61, 0, 0.35)); }
.curve__eq {
  position: absolute; right: 2px; bottom: 2px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(241, 237, 227, 0.42);
}
.hero__card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero__card-foot .score { font-size: 40px; letter-spacing: -0.04em; line-height: 1; }
.hero__card-foot .score small { font-size: 0.34em; letter-spacing: 0; color: rgba(241, 237, 227, 0.42); }
.hero__card-foot p { max-width: 26ch; }

/* a slow draw-in of the curve, once, when the page opens */
@media (prefers-reduced-motion: no-preference) {
  .curve__line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: curveDraw 2.6s cubic-bezier(.4, 0, .2, 1) forwards;
  }
  @keyframes curveDraw { to { stroke-dashoffset: 0; } }
}

/* ============================================================ DARK THEME
   The whole site runs on one black stage. The hero keeps its depth field;
   the rest of the page gets rain, so the page reads as one surface.
   ========================================================================= */
:root {
  --paper:        #06070C;
  --paper-2:      #0C0F16;
  --paper-3:      #141925;
  --ink:          #F1EDE3;
  --ink-2:        rgba(241, 237, 227, 0.76);
  --ink-3:        rgba(241, 237, 227, 0.50);
  --rule:         rgba(241, 237, 227, 0.14);
  --rule-2:       rgba(241, 237, 227, 0.28);
  --terminal:     #04050A;
  --terminal-2:   #0B0E16;

  --exposed:      #FF5C6E;
  --weakened:     #FFB020;
  --resilient:    #C6F24E;
  --postquantum:  #3DDC97;
}
body { background: var(--paper); color: var(--ink); }
body::before {
  background-image:
    linear-gradient(rgba(241, 237, 227, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 237, 227, 0.045) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
::selection { background: var(--signal); color: #fff; }

/* the header is always the dark one now */
.header { background: rgba(6, 7, 12, 0.72); border-bottom-color: var(--rule); }
.header .brand { color: var(--ink); }
.header .brand__mark { background: var(--ink); color: var(--paper); }
.header .nav__links a { color: var(--ink-2); }
.header .nav__links a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.header .nav-toggle { border-color: rgba(241, 237, 227, 0.4); color: var(--ink); }
.header .nav__cta { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.scrolled .header { background: rgba(6, 7, 12, 0.9); border-bottom-color: var(--rule); }

/* surfaces */
.panel, .scanner, .explorer, .steps, .quiz, .cards, .card, .gate,
.portfolio, .walletbar, .stat-row, .table-wrap, table.data, .callout {
  background: var(--paper-2);
}
.card { background: var(--paper-2); }
table.data th { border-bottom-color: var(--ink); }
.btn { border-color: rgba(241, 237, 227, 0.34); color: var(--ink); }
.btn:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--primary:hover { box-shadow: 3px 3px 0 var(--signal); }
.btn--ghost { border-color: var(--rule-2); color: var(--ink-2); }
.select { background-color: var(--paper-2); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23F1EDE3' stroke-width='1.8'/%3E%3C/svg%3E");
  border-color: rgba(241,237,227,.34); }
.tabs { background: var(--paper-2); border-color: rgba(241,237,227,.34); }
.tab { color: var(--ink-2); }
.tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip { color: var(--ink-2); border-color: var(--rule-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bar:hover { background: rgba(241, 237, 227, 0.04); }
.bar[aria-pressed="true"] { background: rgba(241, 237, 227, 0.06); }
.bar__track { background: rgba(241, 237, 227, 0.12); }
.pf-row--head { color: var(--ink-3); }
.opt { background: var(--paper-2); border-color: var(--rule-2); }
.opt:hover { border-color: var(--ink); }
.faq summary::after { color: var(--signal); }
.steps__tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.steps__figure { background: var(--paper-3); border-color: var(--rule-2); }
.scanner__out { background: var(--paper); }
.scanner__note { border-top-color: var(--rule); }
.hero__card { background: rgba(241, 237, 227, 0.03); }

/* the ticker stays black, the footer stays darker than the page */
.ticker { background: #0B0E14; border-color: rgba(241, 237, 227, 0.16); color: var(--ink); }
.footer { background: #04050A; color: var(--ink); }
.footer a { color: var(--ink); }
.footer h2 { color: rgba(241, 237, 227, 0.45); }
.footer__blurb, .footer__bottom { color: rgba(241, 237, 227, 0.55); }
.footer__bottom { border-top-color: rgba(241, 237, 227, 0.16); }

/* the score card on the dark stage */
.dial__track { stroke: rgba(241, 237, 227, 0.12); }
.hero .score, .scanner .score { color: var(--ink); }
.score small { color: rgba(241, 237, 227, 0.4); }
.section__head h2, .prose h2, .prose h3 { color: var(--ink); }
.prose pre { background: #04050A; }
.prose code { background: var(--paper-2); border-color: var(--rule); }

/* document pages */
.doc__side a { color: var(--ink-2); }
.doc__side a:hover { color: var(--ink); }
.page-head { border-bottom-color: var(--ink); }
.site-footer { background: #04050A; color: var(--ink); }
.site-footer a { color: var(--ink); }
.footer-grid h2, .footer-grid h4 { color: rgba(241, 237, 227, 0.45); }
.footer-bottom { color: rgba(241, 237, 227, 0.55); border-top-color: rgba(241, 237, 227, 0.16); }

/* the rain layer sits between the page background and the content */
#sq-rain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.75;
}
@media (prefers-reduced-motion: reduce) { #sq-rain { opacity: 0.4; } }

/* the console needs to read as a surface, not as more background */
.console { background: #0A0D14; border: 1px solid rgba(241, 237, 227, 0.18); }
.console__bar { border-bottom-color: rgba(241, 237, 227, 0.14); color: rgba(241, 237, 227, 0.6); }
.console__log { scrollbar-color: rgba(241,237,227,.25) transparent; }
.msg__body { color: var(--ink); }
.msg--sq .msg__body { color: var(--ink); }
.console__form input { background: #04050A; border-color: rgba(241, 237, 227, 0.28); color: var(--ink); }
.console__form input::placeholder { color: rgba(241, 237, 227, 0.4); }
.msg__suggest button { border-color: rgba(241, 237, 227, 0.3); color: rgba(241, 237, 227, 0.8); }
.msg__suggest button:hover { border-color: var(--signal); color: var(--ink); }
.console__clear { border-color: rgba(241, 237, 227, 0.3); color: rgba(241, 237, 227, 0.7); }

/* no grid: the depth field is the only background texture */
body::before { display: none !important; }
.section, .hero__vignette { background-image: none; }
#sq-rain { opacity: 0.95; }
/* keep the rain visible through the page, not just at the edges */
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* the hero predates the dark theme: its "light" colour was var(--paper),
   which is now the page background. Point those at the ink token. */
.hero--dark h1,
.hero--dark .hero__meta .v,
.hero--dark .score,
.hero--dark .btn { color: var(--ink); }
.hero--dark .btn:hover { border-color: var(--ink); }
.hero--dark .btn--signal { color: #fff; }
.hero--dark .hero__meta .k { color: rgba(241, 237, 227, 0.5); }
.hero--dark .score small { color: rgba(241, 237, 227, 0.45); }

/* footer brand inherits the old light-theme values */
.footer .brand,
.footer .brand a,
.site-footer .brand,
.site-footer .brand a { color: var(--ink); }
.footer .brand__mark,
.site-footer .brand__mark { background: var(--ink); color: var(--paper); }
.footer .brand svg, .site-footer .brand svg { color: var(--ink); }
.footer h2, .footer h4, .site-footer h2, .site-footer h4 { color: rgba(241, 237, 227, 0.45); }

/* the animated card: the video is the card */
.hero__card--media {
  padding: 0; border: 0; background: transparent; display: block;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55));
}
.hero__video {
  width: 100%; height: auto; display: block; border-radius: 4px;
  background: #05060A;
  aspect-ratio: 1 / 1; object-fit: cover;
}
@media (prefers-reduced-motion: reduce) { .hero__video { display: block; } }

/* the estimate now cites its source */
.src-label, .src { font-size: 11.5px; letter-spacing: .02em; }
.src a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.src a:hover { color: var(--signal); }

/* the page must not end in a black void: tighter run-up to the footer */
.footer, .site-footer { margin-top: 28px; }
[data-desk] { padding-bottom: 8px; }
.scan-block { margin-bottom: 8px; }
#token { padding-bottom: 12px; }

/* the controls should stack from the top, not stretch into a void */
.scanner__controls { align-content: start; gap: 18px; }
.scanner__controls .chips { margin-top: 2px; }
.scanner__controls .legend { margin-top: auto; }

/* ============================================================ the analyst
   A 3D head on top of the console: it thinks while the proxy works and
   moves while the answer is spoken.
   ========================================================================= */
.console__head {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid rgba(241, 237, 227, 0.12);
  background: linear-gradient(180deg, rgba(255, 61, 0, 0.06), rgba(10, 13, 20, 0));
}
.mascot {
  position: relative; width: 132px; height: 132px; flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 61, 0, 0.16), rgba(4, 5, 10, 0) 68%);
}
.mascot__canvas { width: 100% !important; height: 100% !important; display: block; }
.mascot__fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9px; letter-spacing: .22em; color: rgba(241, 237, 227, 0.25);
}
.mascot--ready .mascot__fallback { display: none; }
.mascot--off .mascot__fallback { display: grid; }
.console__head-id { display: grid; gap: 4px; min-width: 0; }
.console__head-id b {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: -0.01em; color: var(--ink);
}
.console__head-id span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(241, 237, 227, 0.45);
  transition: color .2s;
}
.console__head-id span[data-tone="live"] { color: var(--signal); }
.console__head-id span[data-tone="talk"] { color: var(--postquantum); }
@media (max-width: 560px) {
  .console__head { gap: 10px; padding: 8px 12px; }
  .mascot { width: 92px; height: 92px; }
}

/* ======================================================= the analyst, present
   In the hero it is not a control: it exists to stand there and tell you
   how exposed the assets you hold are.
   ========================================================================= */
.hero__card--mascot {
  position: relative; display: grid; gap: 10px; justify-items: center;
  pointer-events: none; user-select: none;
}
.mascot--hero {
  width: min(440px, 84vw); height: min(440px, 84vw);
  background: radial-gradient(circle at 50% 46%, rgba(255, 61, 0, 0.18), rgba(4, 5, 10, 0) 66%);
}
.hero__mascot-tag {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(241, 237, 227, 0.45); text-align: center; line-height: 1.5;
  max-width: 34ch;
}
.hero__mascot-tag .dot { flex: 0 0 auto; }

/* the animated card, now inside the panel section */
.deskcard {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px); align-items: center;
  margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--rule);
}
.deskcard__media { filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.5)); }
.deskcard__copy h3 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(20px, 2.4vw, 27px); margin: 8px 0 10px; color: var(--ink);
}
.deskcard__copy p { color: var(--ink-2); font-size: 14.5px; max-width: 46ch; margin: 0; }
@media (max-width: 760px) {
  .deskcard { grid-template-columns: 1fr; }
  .deskcard__media { max-width: 260px; }
}

/* no box around the agent: it sits on the page, not in a panel */
.hero__card--mascot,
.hero__card--mascot.panel {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  padding: 0 !important;
}
.hero__card--mascot .mascot,
.hero__card--mascot .mascot__canvas { background: transparent; }

/* one background for the whole page: the rain, no local particle field */
.hero--dark { background: transparent; }
.hero__vignette {
  background:
    radial-gradient(58% 46% at 62% 42%, rgba(255, 61, 0, 0.10) 0%, rgba(6, 7, 12, 0) 62%),
    radial-gradient(120% 90% at 50% 110%, rgba(6, 7, 12, 0.55) 20%, rgba(6, 7, 12, 0) 70%);
}
main { background: transparent; }

/* the agent patrols the width of its bar instead of sitting on the left */
.console__head {
  position: relative; display: block; overflow: hidden;
  height: 158px; padding: 0;
}
.console__head-id {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  z-index: 2; pointer-events: none;
}
.console__head-id b { display: block; }
.mascot--patrol {
  position: absolute; top: 50%; left: 0;
  width: 132px; height: 132px;
  will-change: transform;
  z-index: 1;
}
@media (max-width: 640px) {
  .console__head { height: 132px; }
  .mascot--patrol { width: 104px; height: 104px; }
}

/* the agent is a thing you can turn around */
.mascot { cursor: grab; touch-action: none; }
.mascot--grabbing { cursor: grabbing; }
.hero__card--mascot .mascot { pointer-events: auto; }
/* ============================================================================
 * SWISS LAYER
 * One neutral grotesk, no boxes. Every surface is the page itself; structure
 * comes from hairlines, spacing and scale, never from a frame.
 * Appended last on purpose: it re-sets the components defined above.
 * ========================================================================= */

:root {
  --font-display: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --rule: rgba(241, 237, 227, 0.14);
  --rule-2: rgba(241, 237, 227, 0.22);
  --sp: clamp(76px, 9vw, 148px);
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-body);
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- type ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
}
h1 { font-weight: 400; letter-spacing: -0.04em; line-height: 0.95; }
h2 { font-weight: 400; letter-spacing: -0.035em; line-height: 1.02; }
h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
p { line-height: 1.75; }

/* every small label is the same neutral caps, never a monospace costume */
.mono, .eyebrow, .label, .kicker,
.stat .k, .card .n, .footer-grid h2, .footer-grid h4,
.console__bar, .gate__step .n, .msg__meta, .console__head-id span,
.ticker, .pill, .tab, .chips button, .kv dt, .kv dd,
.tag, .badge, time {
  font-family: inherit !important;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* labels stay small and quiet */
.eyebrow, .label, .kicker, .card .n, .footer-grid h2, .footer-grid h4 { font-size: 10.5px; }
.mono { font-size: 11px; letter-spacing: 0.14em; }
.stat .v, .dial .score, .console__verdict { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- boxes ---- */
.panel, .panel--flat, .panel--reg,
.card, .stat, .stat-row, .gate, .console, .scanner,
.desk__ctx, .deskcard, .table-wrap, .faq details, .share,
.walletbar, .portfolio, .portfolio__table, .scan-block,
.ticker, .hero__card, .curve-card, .quiz, .quiz__card,
details, .msg, .console__form, .console__bar, .console__head,
.suggest button, .tab, .chips button, .pill, .gate__step {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* a frame becomes a single hairline, or nothing at all */
.panel, .panel--flat, .panel--reg, .gate, .console, .scanner,
.desk__ctx, .deskcard, .faq details, .share, .portfolio,
.portfolio__table, .scan-block, .quiz, .quiz__card, .walletbar, .stat-row, .table-wrap {
  border: 0 !important;
}
.panel, .gate, .scanner, .desk__ctx, .share, .portfolio, .scan-block, .quiz, .walletbar, .stat-row, .table-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* the console keeps only its horizontals */
.console { border-top: 1px solid var(--rule) !important; border-bottom: 1px solid var(--rule) !important; }
.console__bar { border-bottom: 1px solid var(--rule) !important; padding-left: 0 !important; padding-right: 0 !important; }
.console__head { border-bottom: 1px solid var(--rule) !important; }
.console__form { border-top: 1px solid var(--rule) !important; padding-left: 0 !important; padding-right: 0 !important; }

/* cards and stats become columns divided by rules, not boxes */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.card {
  border: 0 !important;
  border-right: 1px solid var(--rule) !important;
  background: transparent !important;
  padding: clamp(22px, 2.6vw, 32px) clamp(18px, 2.2vw, 30px) 0 0 !important;
}
.card:first-child { padding-left: 0 !important; }
.card:last-child { border-right: 0 !important; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule) !important; }
.stat { border-right: 1px solid var(--rule) !important; padding: 20px 22px 0 0 !important; }
.stat:first-child { padding-left: 0 !important; }
.stat:last-child { border-right: 0 !important; }

/* tables: rules only */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--rule) !important; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 0 !important; border-bottom: 1px solid var(--rule) !important; padding: 14px 14px 14px 0; text-align: left; }
th { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }

/* the faq opens with a rule, nothing else */
.faq { border-top: 1px solid var(--rule) !important; }
.faq details { border-bottom: 1px solid var(--rule) !important; }
.faq summary { font-weight: 500; letter-spacing: -0.01em; }

/* buttons: one filled, the rest text with a hairline under */
.btn { border-radius: 0 !important; font-weight: 500; letter-spacing: 0.01em; }
.btn--ghost, .btn--line {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-2) !important;
  padding-left: 0 !important; padding-right: 0 !important;
}
.btn--ghost:hover, .btn--line:hover { border-bottom-color: var(--signal) !important; }

/* inputs sit on a line */
.input, .select, input[type="text"], textarea, select {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-2) !important;
  border-radius: 0 !important;
}

/* pills lose the capsule */
.pill { border: 0 !important; padding: 0 !important; letter-spacing: 0.14em; }

/* the ticker becomes a rule with text on it */
.ticker { border-top: 1px solid var(--rule) !important; border-bottom: 1px solid var(--rule) !important; background: transparent !important; }

/* registration marks and decorative corners are gone */
.panel--reg::before, .panel--reg::after, .panel::before, .panel::after { display: none !important; }

/* more air between sections */
.section { padding: clamp(76px, 9vw, 148px) 0; }
.section--tight { padding: clamp(56px, 6vw, 96px) 0; }

/* the footer is the page, not a slab */
.footer, .site-footer {
  background: transparent !important;
  color: var(--ink) !important;
  border-top: 1px solid var(--rule);
  margin-top: 0;
  padding: clamp(48px, 6vw, 80px) 0 34px;
}
.footer a { color: var(--ink-2) !important; }
.footer a:hover { color: var(--signal) !important; }
.footer .brand { color: var(--ink) !important; }
.footer .brand__mark { background: var(--ink) !important; color: var(--paper) !important; }
.footer h2, .footer h4 { color: var(--ink-3) !important; }
.footer__bottom, .footer-bottom { border-top: 1px solid var(--rule) !important; color: var(--ink-3) !important; }

/* links in prose: underline, no colour noise */
.prose a, main p a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
.prose a:hover, main p a:hover { border-bottom-color: var(--signal); }

@media (max-width: 860px) {
  .cards, .stat-row { grid-template-columns: 1fr; }
  .card, .stat { border-right: 0 !important; border-bottom: 1px solid var(--rule) !important; padding: 22px 0 !important; }
  .card:last-child, .stat:last-child { border-bottom: 0 !important; }
}


/* ------------------------------------------------- the stream under the head
   Short lines about what encryption is doing, one at a time.
   ------------------------------------------------------------------------ */
.hero__mascot-tag {
  display: grid; grid-template-columns: 8px 1fr; gap: 12px; align-items: start;
  max-width: 46ch; margin-top: 6px;
}
.hero__mascot-tag .dot { margin-top: 6px; }
.stream {
  position: relative; min-height: 3.6em; margin: 0;
  font-size: 12.5px; line-height: 1.55; letter-spacing: 0.01em;
  color: rgba(241, 237, 227, 0.62); font-weight: 400;
}
.stream__line {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(6px);
  transition: opacity .45s ease, transform .45s ease;
}
.stream__line.is-visible { opacity: 1; transform: none; }
.stream__line.is-out { opacity: 0; transform: translateY(-6px); }
@media (prefers-reduced-motion: reduce) {
  .stream__line { position: static; opacity: 1; transform: none; transition: none; }
  .stream { min-height: 0; }
}

/* the stream reads as a sentence, not as a label, and takes the card width */
.hero__card--mascot { width: 100%; }
.hero__mascot-tag {
  width: 100%; max-width: 42ch; margin: 10px auto 0;
  text-transform: none; letter-spacing: 0;
  font-size: 12.5px; line-height: 1.55;
}
.hero__mascot-tag .stream { color: rgba(241, 237, 227, 0.66); }

/* the dot hangs outside the message so the text block stays centred */
.hero__mascot-tag {
  position: relative; display: block; padding: 0;
  width: 100%; max-width: 40ch; margin: 12px auto 0;
  text-align: center;
}
.hero__mascot-tag .dot {
  position: absolute; left: -2px; top: 8px; margin: 0;
  width: 7px; height: 7px;
}
.hero__mascot-tag .stream { min-height: 3.4em; }

/* ------------------------------------------------------------- leftovers ---
   Containers that still carried a full frame from the first system.
   ------------------------------------------------------------------------ */
.cards, .explorer, .steps, .quiz, .callout, .fee-bar, .table-wrap,
.hero__card, .curve-card, .panel, .panel--flat, .panel--reg,
.steps__side, .explorer__panel, .explorer__list, .anatomy, .machine,
.terminal, .console, .scanner, .gate__card, .share, dialog {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.cards, .explorer, .steps, .quiz, .callout, .fee-bar, .table-wrap, .hero__card {
  border: 0 !important;
  border-top: 1px solid var(--rule) !important;
}

.explorer { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.explorer > * + * { border-left: 1px solid var(--rule); padding-left: clamp(18px, 2.4vw, 32px); }
.steps > * + * { border-left: 1px solid var(--rule); }

.cards { overflow: visible; }
.quiz { padding-left: 0 !important; padding-right: 0 !important; }
.callout { padding-left: 0 !important; padding-right: 0 !important; }
.fee-bar { border: 0 !important; height: 22px; }
.fee-bar > * { border-right: 0 !important; }

/* inline chips and tags lose their capsule */
.tag, .badge, .chip, code, .kv dt, .kv dd { border: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
code { background: transparent !important; border-bottom: 1px solid var(--rule); }

/* rows and panels sit on the page: no tint, no inner box */
.explorer__list, .explorer__detail, .bar-row, .bar, .row, .scan-row,
.portfolio__row, .steps__side, .steps__body, .anatomy__item, .machine__item {
  background: transparent !important;
  border-radius: 0 !important;
}
.bar-row { border-bottom: 1px solid var(--rule) !important; }
.bar-row:hover { background: rgba(241, 237, 227, 0.04) !important; }
.bar-row.is-on { background: rgba(255, 61, 0, 0.07) !important; }
.explorer__list { padding-right: clamp(14px, 2vw, 26px) !important; }
.explorer__detail { padding-left: clamp(18px, 2.6vw, 34px) !important; }

/* values keep their own case; only the label is caps */
.kv dt { text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px; color: var(--ink-3); }
.kv dd { text-transform: none !important; letter-spacing: 0 !important; font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- controls, rebuilt ---
   Tabs and inputs are lines with text on them, not boxes.
   -------------------------------------------------------------------------- */
.tab {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  color: var(--ink-3) !important;
  padding: 10px 18px 9px 0 !important;
  letter-spacing: 0.14em;
}
.tab[aria-pressed="true"] {
  color: var(--ink) !important;
  box-shadow: inset 0 -2px 0 var(--signal);
}

.select, .input, input[type="text"], input[type="number"], textarea {
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-2) !important;
  border-radius: 0 !important;
  padding-left: 0 !important;
  color: var(--ink) !important;
  font-size: 15px;
}
.select {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(241,237,227,0.55) 50%),
    linear-gradient(135deg, rgba(241,237,227,0.55) 50%, transparent 50%) !important;
  background-position: calc(100% - 13px) 56%, calc(100% - 8px) 56% !important;
  background-size: 5px 5px, 5px 5px !important;
  background-repeat: no-repeat !important;
  padding-right: 26px !important;
}
.select:focus, .input:focus, input:focus, textarea:focus {
  outline: none !important;
  border-bottom-color: var(--signal) !important;
}

.suggest button, .console__clear, .btn--ghost, .btn--line, .dtab, .chip {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-2) !important;
  border-radius: 0 !important;
  color: var(--ink-2) !important;
  padding: 6px 0 !important;
  letter-spacing: 0.01em;
}
.suggest button:hover, .console__clear:hover, .btn--ghost:hover { color: var(--ink) !important; border-bottom-color: var(--signal) !important; }

/* the verdict keeps a hairline pill, it is a status not a box */
.console__verdict {
  background: transparent !important;
  border: 1px solid currentColor !important;
  border-radius: 999px !important;
  padding: 3px 12px !important;
}

/* anything that carried a version label reads as text */
.console__bar, .console__bar .mono, .desk__version, .version {
  color: var(--ink-3) !important;
}

/* the wallet bar is a line of text with one button */
.walletbar { border-bottom: 1px solid var(--rule) !important; padding-bottom: 14px !important; }

/* the ask button keeps its fill but loses the radius */
.ask { border-radius: 0 !important; }

/* the tab group is just two labels under a rule */
.tabs, .tablist, [role="tablist"] {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: flex !important;
  gap: 22px !important;
  border-bottom: 1px solid var(--rule) !important;
}
.tab, [role="tab"] {
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  padding: 6px 0 10px !important;
  margin-bottom: -1px !important;
  background: transparent !important;
}
.tab[aria-pressed="true"], [role="tab"][aria-selected="true"] {
  color: var(--ink) !important;
  border-bottom-color: var(--signal) !important;
  box-shadow: none !important;
}

/* ================================================================ the audit
   One field, one button, and a report made of rules.
   ========================================================================= */
.audit {
  display: flex; gap: 0; align-items: stretch;
  border-bottom: 1px solid var(--rule-2);
  margin-top: 26px;
}
.audit input {
  flex: 1; min-width: 0;
  background: transparent; border: 0 !important;
  color: var(--ink); font-size: clamp(15px, 1.6vw, 18px);
  padding: 16px 0;
}
.audit input::placeholder { color: var(--ink-3); }
.audit input:focus { outline: none; }
.audit .btn { border-radius: 0; padding: 0 22px; }
.audit:focus-within { border-bottom-color: var(--signal); }

.audit__out { margin-top: 28px; }
.audit__head { border-top: 1px solid var(--rule); padding-top: 18px; }
.audit__title {
  font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 18px;
  color: var(--ink);
}
.audit__body { display: grid; gap: 0; }
.audit__row {
  display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 18px;
  padding: 12px 0; border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.audit__k {
  font-size: 10.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.audit__v { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.audit__note {
  margin: 18px 0 0; max-width: 74ch; color: var(--ink-2); font-size: 14px; line-height: 1.75;
}
.audit__actions { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.audit__legal { margin-top: 22px; font-size: 12px; max-width: 80ch; }

@media (max-width: 620px) {
  .audit { flex-wrap: wrap; }
  .audit input { width: 100%; }
  .audit .btn { width: 100%; padding: 14px 0; }
  .audit__row { grid-template-columns: 1fr; gap: 4px; }
}

/* the analyst in the desk: bigger, and set in the same type as the page */
.console__head { height: 214px !important; }
.mascot--patrol, .console__head .mascot { width: 178px !important; height: 178px !important; }
.console__head-id { left: 4px !important; }
.console__head-id b {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  font-size: 17px !important;
  letter-spacing: -0.02em !important;
  text-transform: none !important;
  color: var(--ink) !important;
}
.console__head-id span {
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: 10.5px !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--ink-3) !important;
}
.console__head-id span[data-tone="live"] { color: var(--signal) !important; }
.console__head-id span[data-tone="talk"] { color: var(--postquantum) !important; }
@media (max-width: 640px) {
  .console__head { height: 168px !important; }
  .mascot--patrol, .console__head .mascot { width: 132px !important; height: 132px !important; }
}

/* the mark is the mascot now, a rounded tile */
.brand__img {
  width: 28px; height: 28px; flex: none;
  border-radius: 7px;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(241, 237, 227, 0.12);
}
.brand__mark { display: none !important; }
.footer .brand__img { box-shadow: none; }

/* the wordmark must never inherit the old paper colour */
.brand, .header .brand, .footer .brand, a.brand {
  color: var(--ink) !important;
}
.brand:hover { color: var(--ink) !important; }
.brand__img { vertical-align: middle; }

.audit__hint {
  margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3);
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
}
.audit__try {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 12.5px;
  border-bottom: 1px solid var(--rule-2);
}
.audit__try:hover { color: var(--signal); border-bottom-color: var(--signal); }

/* the bars take their length, they do not arrive with it */
.bar__fill { transition: width .9s cubic-bezier(.16, .84, .28, 1) !important; }
@media (prefers-reduced-motion: reduce) { .bar__fill { transition: none !important; } }

/* the page breathes without going empty between blocks */
.section { padding: clamp(58px, 6.4vw, 104px) 0 !important; }
.section--tight { padding: clamp(40px, 4.6vw, 72px) 0 !important; }
#audit .section__head { margin-bottom: 8px; }
.audit__out { margin-top: 22px; }

/* the last framed control: the detail link is a ruled label */
.explorer__detail .btn, .explorer__detail a.btn,
[data-how] , .detail__link {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-2) !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  width: 100%;
  text-align: left !important;
  justify-content: space-between;
  display: inline-flex;
  align-items: center;
}
.explorer__detail .btn:hover { border-bottom-color: var(--signal) !important; }

/* the corner line is read at a glance: bigger, tabular, less tracking so
   4663 cannot be misread as 4683 */
.hero__corner {
  font-size: 11px !important;
  letter-spacing: 0.10em !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  color: rgba(241, 237, 227, 0.72) !important;
}

/* the mark sits with the wallet address, at the same weight as the label */
.walletbar { align-items: center; }
.walletbar__who { display: flex; align-items: center; gap: 12px; }
.walletbar__mark {
  width: 26px; height: 26px; flex: none; display: block;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(241, 237, 227, 0.14);
}
.walletbar__text { display: grid; gap: 2px; }
.walletbar__text .mono { color: var(--ink-3); }
