/* Upstream — landing page
 *
 * The design thesis, in CSS: content that came *from* DataHub is quoted — mono, and the
 * informational blue. Content Upstream *concluded* is sans, and brass. That split is
 * load-bearing; do not blur it for aesthetics.
 */

/* ── tokens ─────────────────────────────────────────────────────────────── */

:root {
  /* surfaces, darkest to lightest */
  --s-0: #08090A;
  --s-1: #0B0C0D;
  --s-2: #141618;
  --s-3: #1D1F22;
  --s-4: #2A2C2F;

  /* text, brightest to dimmest */
  --t-0: #EDEBE7;
  --t-1: #C6C3BD;
  --t-2: #8F8C86;
  --t-3: #6E6B66;
  --t-4: #4F4D49;

  /* accent + states */
  --brass: #C7A87A;
  --brass-dim: #4A3E2A;
  --brass-wash: #1A1206;
  --healthy: #74A186;
  --healthy-dim: #3C5546;
  --warning: #D08C3C;
  --failing: #C05F53;
  --datahub: #7E93B8;          /* reserved: DataHub-sourced content only */
  --datahub-dim: #3C4045;

  --rule: #1D1F22;
  --rule-soft: #141618;

  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(20px, 5vw, 88px);
  --measure: 1320px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--s-0);
  color: var(--t-1);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection { background: var(--brass-dim); color: var(--t-0); }

:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── primitives ─────────────────────────────────────────────────────────── */

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  font-variant-ligatures: none;
}

/* a fact that came out of the graph */
.quoted {
  font-family: var(--mono);
  color: var(--datahub);
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t-3);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

.dim  { color: var(--t-2); }
.dimmer { color: var(--t-3); }
.brass { color: var(--brass); }
.good { color: var(--healthy); }
.bad  { color: var(--failing); }
.warn { color: var(--warning); }
.dh   { color: var(--datahub); }

/* ── chrome: nav ────────────────────────────────────────────────────────── */

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 1px;
  width: 0;
  background: var(--brass);
  z-index: 60;
  transition: width 0.1s linear;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--s-0) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule-soft);
}

.nav__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--t-0);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 0.875rem;
  color: var(--t-2);
  margin-right: auto;
}

.nav__links a:hover { color: var(--t-0); }
.nav__links a.is-active { color: var(--brass); }

.nav__meta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-3);
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--healthy);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--healthy) 60%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--healthy) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  color: var(--t-1);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
              background 0.18s var(--ease), transform 0.18s var(--ease);
  white-space: nowrap;
}

.btn:hover { border-color: var(--t-4); color: var(--t-0); }

.btn--primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #14100A;
  font-weight: 600;
}

.btn--primary:hover {
  background: #D6BA92;
  border-color: #D6BA92;
  color: #14100A;
}

.btn--ghost { border-color: var(--rule); }

@media (max-width: 900px) {
  .nav__links { display: none; }
}

@media (max-width: 640px) {
  .nav__status { display: none; }
  .nav__inner { gap: 16px; justify-content: space-between; }
}

/* ── section frame ──────────────────────────────────────────────────────── */

.section {
  border-top: 1px solid var(--rule-soft);
  padding: clamp(72px, 11vh, 132px) 0;
  position: relative;
}

.section__head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0 24px;
  margin-bottom: 52px;
}

.section__index {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--t-4);
  letter-spacing: 0.1em;
  padding-top: 8px;
}

.section__title {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.028em;
  font-weight: 600;
  color: var(--t-0);
  max-width: 21ch;
}

.section__lede {
  grid-column: 2;
  margin-top: 20px;
  max-width: 62ch;
  color: var(--t-2);
  font-size: 1.0625rem;
  line-height: 1.62;
}

.section__body { grid-column: 2; min-width: 0; }

@media (max-width: 720px) {
  .section__head { grid-template-columns: minmax(0, 1fr); }
  .section__lede, .section__body { grid-column: 1; }
  .section__index { padding-top: 0; margin-bottom: 12px; }
}

/* reveal-on-scroll — only ever hidden when the script is there to bring it back */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in { opacity: 1; transform: none; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(64px, 12vh, 132px) 0 clamp(56px, 9vh, 96px);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brass) 7%, transparent) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.hero__title {
  margin-top: 26px;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.038em;
  font-weight: 600;
  color: var(--t-0);
  max-width: 15ch;
}

.hero__title em {
  font-style: normal;
  color: var(--brass);
}

.hero__title .is { color: var(--t-3); }

.hero__lede {
  margin-top: 30px;
  max-width: 56ch;
  font-size: 1.0625rem;
  line-height: 1.66;
  color: var(--t-2);
}

.hero__actions {
  margin-top: 38px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__note {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--t-4);
}

@media (max-width: 980px) {
  /* minmax(0, …), not 1fr: an auto minimum lets the code block widen the whole page */
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
}

/* code panel */

.panel {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--s-1);
  overflow: hidden;
}

.panel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--s-2);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-3);
}

.panel__body { padding: 18px 16px; }

.panel__foot {
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--t-3);
  line-height: 1.55;
}

pre.code {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.72;
  color: var(--t-1);
  overflow-x: auto;
  white-space: pre;
}

.code .k { color: var(--datahub); }        /* keys — the shape of the spec */
.code .v { color: var(--healthy); }        /* values */
.code .c { color: var(--t-4); }            /* comments */
.code .s { color: var(--brass); }          /* strings that matter */

/* ── split: record / intelligence ───────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.split__col { padding: 30px 30px 34px; }
.split__col + .split__col { border-left: 1px solid var(--rule); }
.split__col--dh { background: linear-gradient(180deg, color-mix(in srgb, var(--datahub) 4%, transparent), transparent 70%); }
.split__col--up { background: linear-gradient(180deg, color-mix(in srgb, var(--brass) 4%, transparent), transparent 70%); }

.split__label { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; }
.split__col--dh .split__label { color: var(--datahub); }
.split__col--up .split__label { color: var(--brass); }

.split__name {
  margin-top: 14px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--t-0);
}

.split__desc { margin-top: 10px; color: var(--t-2); font-size: 0.9375rem; max-width: 42ch; }

.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  font-family: var(--mono);
  font-size: 0.6875rem;
  padding: 4px 9px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  color: var(--t-2);
  background: var(--s-1);
}

.split__col--dh .chip { border-color: var(--datahub-dim); color: color-mix(in srgb, var(--datahub) 82%, var(--t-1)); }
.split__col--up .chip { border-color: var(--brass-dim); color: color-mix(in srgb, var(--brass) 78%, var(--t-1)); }

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
  .split__col + .split__col { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ── the dial ───────────────────────────────────────────────────────────── */

.dial-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.dial { position: relative; width: 100%; max-width: 360px; }
.dial svg { width: 100%; height: auto; display: block; transform: rotate(-90deg); }
.dial__track { fill: none; stroke: var(--s-3); stroke-width: 6; }

.dial__arc {
  fill: none;
  stroke: var(--brass);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.4s var(--ease), stroke 1.4s var(--ease);
}

.dial__ghost {
  fill: none;
  stroke: var(--brass-dim);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 2 4;
  transition: stroke-dashoffset 1.4s var(--ease);
}

.dial__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.dial__value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.4rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--t-0);
  font-weight: 500;
}

.dial__value sup { font-size: 0.36em; vertical-align: super; color: var(--t-3); letter-spacing: 0; }
.dial__caption { margin-top: 12px; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t-3); }
.dial__delta { margin-top: 6px; font-family: var(--mono); font-size: 0.75rem; color: var(--healthy); opacity: 0; transition: opacity 0.5s var(--ease); }
.dial__delta.is-on { opacity: 1; }

.toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 26px;
}

.toggle button {
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--t-3);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.toggle button + button { border-left: 1px solid var(--rule); }
.toggle button.is-on { background: var(--s-2); color: var(--brass); }

.tiers { border-top: 1px solid var(--rule); }

.tier {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 132px 56px;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}

.tier__name { font-family: var(--mono); font-size: 0.8125rem; color: var(--t-1); }
.tier__meta { font-family: var(--mono); font-size: 0.75rem; color: var(--t-4); text-align: right; }

.tier__bar {
  position: relative;
  height: 4px;
  background: var(--s-3);
  border-radius: 2px;
  overflow: hidden;
}

.tier__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--brass);
  border-radius: 2px;
  transition: width 1.2s var(--ease), background 1.2s var(--ease);
}

.tier__pct {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  text-align: right;
  color: var(--t-0);
}

.tier--total .tier__name,
.tier--total .tier__pct { color: var(--t-0); font-weight: 600; }
.tier--total { border-bottom: 0; }

.is-after .tier__fill { background: var(--healthy); }
.is-after .dial__arc { stroke: var(--healthy); }

@media (max-width: 860px) {
  .dial-grid { grid-template-columns: 1fr; }
  .tier { grid-template-columns: 74px minmax(0, 1fr) 52px; }
  .tier__meta { display: none; }
}

/* ── the loop ───────────────────────────────────────────────────────────── */

.loop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.loop__step { padding: 24px 22px 26px; position: relative; }
.loop__step + .loop__step { border-left: 1px solid var(--rule); }

.loop__step::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 1px;
  width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}

.loop.is-in .loop__step::before { transform: scaleX(1); }
.loop.is-in .loop__step:nth-child(2)::before { transition-delay: 0.14s; }
.loop.is-in .loop__step:nth-child(3)::before { transition-delay: 0.28s; }
.loop.is-in .loop__step:nth-child(4)::before { transition-delay: 0.42s; }
.loop.is-in .loop__step:nth-child(5)::before { transition-delay: 0.56s; }

.loop__name {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.loop__fact {
  margin-top: 16px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--t-0);
}

.loop__desc { margin-top: 10px; font-size: 0.875rem; color: var(--t-2); line-height: 1.5; }

@media (max-width: 900px) {
  .loop { grid-template-columns: 1fr 1fr; }
  .loop__step + .loop__step { border-left: 0; }
  .loop__step { border-top: 1px solid var(--rule); }
}

@media (max-width: 560px) { .loop { grid-template-columns: 1fr; } }

.claim {
  margin-top: 34px;
  padding: 26px 30px;
  border: 1px solid var(--brass-dim);
  border-radius: 6px;
  background: var(--brass-wash);
  display: flex;
  gap: 28px;
  align-items: baseline;
  flex-wrap: wrap;
}

.claim__figure {
  font-family: var(--mono);
  font-size: clamp(1.125rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
  color: var(--brass);
  line-height: 1.25;
}

.claim__text { color: var(--t-1); font-size: 0.9375rem; max-width: 62ch; line-height: 1.6; }

/* ── the trace ──────────────────────────────────────────────────────────── */

.trace-shell {
  min-width: 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--s-1);
  overflow: hidden;
}

.trace-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--s-2);
  flex-wrap: wrap;
}

.trace-bar__urn {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--datahub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(52ch, 60%);
  cursor: pointer;
  border-bottom: 1px dotted var(--datahub-dim);
}

.trace-bar__urn.is-full { max-width: 100%; white-space: normal; word-break: break-all; }
.trace-bar__spacer { margin-left: auto; }

.trace-bar__replay {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-3);
  border: 1px solid var(--rule);
  padding: 5px 11px;
  border-radius: 3px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.trace-bar__replay:hover { color: var(--brass); border-color: var(--brass-dim); }

.trace { padding: 8px 0 14px; min-height: 460px; }

.stage {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 20px;
  padding: 11px 22px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.stage.is-on { opacity: 1; transform: none; }

.stage__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--brass);
  padding-top: 1px;
  white-space: nowrap;
}

.stage__lines { min-width: 0; }

.stage__line {
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.7;
  color: var(--t-2);
  word-break: break-word;
}

.stage__line--dh { color: var(--datahub); }
.stage__line--reasoned { font-family: var(--sans); font-size: 0.9375rem; color: var(--t-0); line-height: 1.55; }
.stage__line--good { color: var(--healthy); }
.stage__line--bad { color: var(--failing); }
.stage__line--warn { color: var(--warning); }

.stage--verdict {
  margin-top: 8px;
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  vertical-align: -2px;
  background: var(--brass);
  animation: blink 1.05s steps(2, start) infinite;
}

@keyframes blink { to { visibility: hidden; } }

.trace-foot {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding: 15px 22px;
  border-top: 1px solid var(--rule);
  background: var(--s-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--t-3);
}

@media (max-width: 680px) {
  .stage { grid-template-columns: 1fr; gap: 4px; }
}

/* ── evidence: expand in place ──────────────────────────────────────────── */

.evidence { border-top: 1px solid var(--rule); }

.ev {
  border-bottom: 1px solid var(--rule);
}

.ev__head {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 4px;
  text-align: left;
}

.ev__head:hover .ev__claim { color: var(--t-0); }

.ev__sign {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--t-4);
  transition: color 0.18s var(--ease), transform 0.25s var(--ease);
}

.ev.is-open .ev__sign { color: var(--brass); transform: rotate(45deg); }

.ev__claim { font-size: 0.9375rem; color: var(--t-1); transition: color 0.18s var(--ease); }

.ev__meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-4);
  white-space: nowrap;
}

.ev__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.ev.is-open .ev__panel { grid-template-rows: 1fr; }

.ev__inner { overflow: hidden; }

.ev__cites {
  padding: 2px 0 22px 38px;
  display: grid;
  gap: 9px;
}

.cite {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--datahub);
  border-left: 1px solid var(--datahub-dim);
  padding-left: 16px;
}

.cite__kind { color: var(--t-4); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.6875rem; padding-top: 2px; }

@media (max-width: 640px) {
  .cite { grid-template-columns: 1fr; gap: 2px; }
  .ev__cites { padding-left: 0; }
}

/* ── signals ────────────────────────────────────────────────────────────── */

.signals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(30px, 5vw, 64px);
  align-items: start;
}

.sig { border-top: 1px solid var(--rule); }

.sig__row {
  display: grid;
  grid-template-columns: 132px 68px minmax(0, 1fr) 58px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.sig__name { font-family: var(--mono); font-size: 0.8125rem; color: var(--t-1); }
.sig__weight { font-family: var(--mono); font-size: 0.75rem; color: var(--t-4); }

.sig__bar { height: 4px; background: var(--s-3); border-radius: 2px; position: relative; overflow: hidden; }

.sig__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--brass);
  border-radius: 2px;
  transition: width 1s var(--ease);
}

.sig__fill--zero { background: var(--t-4); }
.sig__value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.8125rem; color: var(--t-0); text-align: right; }
.sig__row--gate .sig__name { color: var(--t-3); }

.verdict-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px 26px 28px;
  background: var(--s-1);
}

.verdict-card__value {
  font-family: var(--mono);
  font-size: 3.25rem;
  letter-spacing: -0.05em;
  color: var(--brass);
  line-height: 1;
}

.verdict-card__label { margin-top: 12px; font-size: 0.9375rem; color: var(--t-1); }
.verdict-card__note { margin-top: 18px; font-size: 0.875rem; color: var(--t-2); line-height: 1.6; }

.threshold {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 11px;
}

.threshold__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--t-3);
}

.threshold__row b { color: var(--t-1); font-weight: 500; }

@media (max-width: 900px) {
  .signals-grid { grid-template-columns: 1fr; }
  .sig__row { grid-template-columns: 118px 56px minmax(0, 1fr) 50px; gap: 10px; }
}

/* ── two-up cards ───────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.card { background: var(--s-1); padding: 28px 26px 30px; }
.card__k { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t-4); }
.card__v { margin-top: 16px; font-size: 1.0625rem; color: var(--t-0); font-weight: 500; letter-spacing: -0.01em; }
.card__d { margin-top: 10px; font-size: 0.875rem; color: var(--t-2); line-height: 1.6; }

/* ── write-back receipt ─────────────────────────────────────────────────── */

.receipt { border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--s-1); }

.receipt__row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 90px;
  gap: 20px;
  padding: 18px 24px;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
}

.receipt__row:last-child { border-bottom: 0; }
.receipt__kind { font-family: var(--mono); font-size: 0.75rem; color: var(--brass); }
.receipt__what { font-size: 0.9375rem; color: var(--t-1); }
.receipt__what small { display: block; margin-top: 7px; font-family: var(--mono); font-size: 0.71rem; color: var(--datahub); word-break: break-all; line-height: 1.6; }

.receipt__state {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--healthy);
  text-align: right;
}

.receipt__state--open { color: var(--warning); }

@media (max-width: 760px) {
  .receipt__row { grid-template-columns: 1fr; gap: 8px; }
  .receipt__state { text-align: left; }
}

/* ── skills read path ───────────────────────────────────────────────────── */

/* four across, so eight skills fill two rows exactly and leave no dead cell */
.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}

.skill { background: var(--s-1); padding: 20px 20px 22px; }
.skill__name { font-family: var(--mono); font-size: 0.8125rem; color: var(--datahub); }
.skill__tool { margin-top: 9px; font-family: var(--mono); font-size: 0.71rem; color: var(--t-3); }

.skill__state {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-3);
}

.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--healthy); }
.dot--warn { background: var(--warning); }

@media (max-width: 1080px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .skills { grid-template-columns: 1fr; } }

/* ── refusals ───────────────────────────────────────────────────────────── */

.refusals { display: grid; gap: 0; border-top: 1px solid var(--rule); }

.refusal {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.refusal__n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.5rem; color: var(--brass); letter-spacing: -0.03em; }
.refusal__t { font-size: 1.0625rem; color: var(--t-0); font-weight: 500; letter-spacing: -0.01em; }
.refusal__d { margin-top: 9px; font-size: 0.9375rem; color: var(--t-2); max-width: 74ch; line-height: 1.62; }

/* ── quickstart ─────────────────────────────────────────────────────────── */

.steps { display: grid; gap: 14px; }

.step {
  display: grid;
  grid-template-columns: 26px minmax(0, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  padding: 15px 20px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--s-1);
  transition: border-color 0.2s var(--ease);
}

.step:hover { border-color: var(--s-4); }
.step__n { font-family: var(--mono); font-size: 0.75rem; color: var(--t-4); }
.step__cmd { font-family: var(--mono); font-size: 0.8125rem; color: var(--brass); word-break: break-all; }
.step__d { font-size: 0.875rem; color: var(--t-2); }

@media (max-width: 780px) {
  .step { grid-template-columns: 22px minmax(0, 1fr); }
  .step__d { grid-column: 2; }
}

/* ── closing ────────────────────────────────────────────────────────────── */

.closing {
  padding: clamp(84px, 14vh, 156px) 0;
  border-top: 1px solid var(--rule-soft);
}

.closing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: end;
}

.closing__line {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-weight: 600;
  color: var(--t-0);
  max-width: 19ch;
}

.closing__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.closing__stat b { display: block; font-family: var(--mono); font-size: 1.5rem; letter-spacing: -0.03em; color: var(--brass); font-weight: 500; }
.closing__stat span { display: block; margin-top: 9px; font-size: 0.8125rem; color: var(--t-3); line-height: 1.45; }

@media (max-width: 860px) {
  .closing__grid { grid-template-columns: 1fr; }
  .closing__stats { margin-top: 40px; }
}

/* ── footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--rule);
  padding: 30px 0 44px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.06em;
  color: var(--t-4);
}

.footer__inner a:hover { color: var(--brass); }
