:root {
  --bench: oklch(1 0 0);
  --bench-raised: oklch(0.97 0.008 150);
  --bench-pressed: oklch(0.94 0.012 150);
  --graphite: oklch(0.18 0.018 150);
  --pencil: oklch(0.43 0.018 150);
  --rule: oklch(0.88 0.012 150);
  --moss: oklch(0.55 0.145 150);
  --moss-dark: oklch(0.36 0.11 150);
  --moss-pale: oklch(0.93 0.045 150);
  --hold: oklch(0.62 0.16 62);
  --hold-dark: oklch(0.36 0.09 62);
  --hold-pale: oklch(0.94 0.05 78);
  --stop: oklch(0.52 0.18 25);
  --stop-dark: oklch(0.34 0.13 25);
  --stop-pale: oklch(0.94 0.04 25);
  --radius-small: 0.45rem;
  --radius-medium: 0.8rem;
  --measure: 72rem;
  --focus: 0 0 0 3px oklch(0.78 0.12 150 / 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--graphite);
  background: var(--bench);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button, summary, a { -webkit-tap-highlight-color: transparent; }

a:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-small);
}

.topbar {
  min-height: 4rem;
  padding: 0.75rem max(1rem, calc((100vw - var(--measure)) / 2));
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--graphite);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bench);
  background: var(--moss-dark);
  font-size: 0.85rem;
  font-weight: 800;
}

.paper-badge,
.state-label {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}

.paper-badge {
  color: var(--moss-dark);
  background: var(--moss-pale);
}

.shell {
  width: min(var(--measure), calc(100% - 2rem));
  margin-inline: auto;
}

.owner-brief {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.7fr);
  gap: 3rem;
  align-items: end;
}

.context-line {
  margin: 0 0 0.65rem;
  color: var(--moss-dark);
  font-weight: 750;
}

h1, h2, p { text-wrap: pretty; }

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: 2.75rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.status-explanation,
.section-heading p {
  max-width: 68ch;
  margin: 0.75rem 0 0;
  color: var(--pencil);
}

.brief-facts {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.brief-facts div {
  min-height: 3.4rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brief-facts dt { color: var(--pencil); }

.brief-facts dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.progress-section,
.lock-section,
.ticker-section {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
}

.progress-total {
  flex: 0 0 auto;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.sample-track {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

.phase-label {
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--pencil);
  font-size: 0.9rem;
}

.phase-label strong { color: var(--graphite); font-variant-numeric: tabular-nums; }

.track {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bench-pressed);
}

.fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
  transition: width 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.state-waiting { color: var(--hold-dark); background: var(--hold-pale); }
.state-ready { color: var(--moss-dark); background: var(--moss-pale); }
.state-stop { color: var(--stop-dark); background: var(--stop-pale); }

.evidence-gates {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  border-radius: var(--radius-medium);
  overflow: hidden;
}

.gate {
  min-width: 0;
  padding: 1rem;
  background: var(--bench);
}

.gate + .gate { border-left: 1px solid var(--rule); }

.gate-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 760;
}

.gate-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--hold);
}

.gate[data-state="pass"] .gate-dot { background: var(--moss); }
.gate[data-state="stop"] .gate-dot { background: var(--stop); }

.gate p {
  margin: 0.45rem 0 0 1.25rem;
  color: var(--pencil);
  font-size: 0.88rem;
}

.ticker-ledger {
  margin-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.ticker-row {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 6rem minmax(10rem, 0.8fr) minmax(0, 1.8fr);
  gap: 1.25rem;
  align-items: start;
}

.ticker-symbol {
  font-size: 1.15rem;
  font-weight: 820;
  letter-spacing: -0.01em;
}

.ticker-status { font-weight: 700; }

.ticker-reasons {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--pencil);
}

.ticker-reasons li + li { margin-top: 0.25rem; }

.rules-panel {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-medium);
  background: var(--bench-raised);
}

.rules-panel summary {
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 760;
}

.rules-panel summary::marker { color: var(--moss-dark); }

.rules-copy {
  max-width: 72ch;
  padding: 0 1rem 1rem;
  color: var(--pencil);
}

.rules-copy p { margin-top: 0; }
.rules-copy li + li { margin-top: 0.35rem; }

.footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--pencil);
  font-size: 0.88rem;
}

.footer p { margin: 0.25rem 0; }

.noscript {
  padding: 1rem;
  color: var(--stop-dark);
  background: var(--stop-pale);
  text-align: center;
}

@media (max-width: 52rem) {
  .owner-brief { grid-template-columns: 1fr; gap: 2rem; }
  .brief-facts { max-width: 32rem; }
  .evidence-gates { grid-template-columns: 1fr 1fr; }
  .gate + .gate { border-left: 0; }
  .gate:nth-child(even) { border-left: 1px solid var(--rule); }
  .gate:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .ticker-row { grid-template-columns: 5rem minmax(0, 1fr); }
  .ticker-reasons { grid-column: 2; }
}

@media (max-width: 34rem) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .paper-badge { min-height: 1.8rem; }
  .shell { width: min(100% - 1.25rem, var(--measure)); }
  .owner-brief { padding-top: 2.25rem; }
  h1 { max-width: 100%; font-size: 2.15rem; }
  .section-heading { flex-direction: column; gap: 0.85rem; }
  .sample-track, .evidence-gates { grid-template-columns: 1fr; }
  .gate:nth-child(even) { border-left: 0; }
  .gate:nth-child(n + 2) { border-top: 1px solid var(--rule); }
  .ticker-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .ticker-reasons { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fill { transition: none; }
}
