:root {
  --bg: #071014;
  --panel: #0c171c;
  --panel-2: #101d22;
  --line: rgba(173, 203, 211, 0.13);
  --line-strong: rgba(173, 203, 211, 0.25);
  --text: #ecf2f1;
  --muted: #8fa0a5;
  --faint: #53636a;
  --amber: #f3b64b;
  --amber-soft: rgba(243, 182, 75, 0.12);
  --mint: #76c5b0;
  --mint-soft: rgba(118, 197, 176, 0.1);
  --coral: #ff735e;
  --coral-soft: rgba(255, 115, 94, 0.1);
  --rail-width: 228px;
  --pad: clamp(24px, 4vw, 68px);
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 10%, rgba(118, 197, 176, 0.055), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font: inherit; }

::selection {
  color: var(--bg);
  background: var(--amber);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  color: var(--bg);
  background: var(--text);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(7, 16, 20, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  height: 108px;
  align-items: center;
  gap: 13px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.brand span,
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
}

.brand b,
.page-footer b {
  font-size: 12px;
  letter-spacing: 0.18em;
}

.rail nav {
  display: grid;
  padding: 34px 0;
}

.rail nav a {
  position: relative;
  display: grid;
  min-height: 51px;
  grid-template-columns: 36px 1fr;
  align-items: center;
  padding: 0 24px 0 30px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.rail nav a::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 2px;
  background: transparent;
  content: "";
}

.rail nav a span {
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.rail nav a:hover,
.rail nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.rail nav a.active::before { background: var(--amber); }
.rail nav a.active span { color: var(--amber); }

.rail-status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 25px 29px;
  border-top: 1px solid var(--line);
}

.rail-status i,
.live-dot {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(118, 197, 176, 0.1);
}

.rail-status div { display: grid; gap: 2px; }
.rail-status small { color: var(--faint); font-size: 9px; letter-spacing: 0.14em; }
.rail-status strong { color: var(--mint); font-size: 11px; text-transform: uppercase; }

main {
  width: calc(100% - var(--rail-width));
  margin-left: var(--rail-width);
}

.topbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.breadcrumb span { margin: 0 8px; color: rgba(243, 182, 75, 0.55); }
.scan-meta { display: flex; align-items: center; gap: 11px; }
.scan-meta b { color: var(--mint); font-size: 9px; }
.scan-meta time { padding-left: 12px; border-left: 1px solid var(--line); }

.hero {
  display: grid;
  min-height: 620px;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px var(--pad) 74px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: -1px -1px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow span { color: var(--faint); }
.eyebrow.coral { color: var(--coral); }

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(58px, 5.6vw, 108px);
  font-weight: 690;
  letter-spacing: -0.065em;
  line-height: 0.82;
}

.hypothesis {
  max-width: 760px;
  margin: 46px 0 0;
  padding-left: 20px;
  border-left: 2px solid var(--amber);
  color: #b9c5c7;
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.45;
}

.verdict {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: 62px var(--pad) 74px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(243, 182, 75, 0.075), transparent 45%),
    var(--panel);
  overflow: hidden;
}

.verdict::before {
  position: absolute;
  top: -160px;
  right: -160px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(243, 182, 75, 0.09);
  border-radius: 50%;
  content: "";
}

.verdict-head,
.confidence-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.verdict-head { justify-content: space-between; color: var(--muted); }
.delta { color: var(--amber); }

.score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 20px 0 4px;
}

.score strong {
  color: var(--amber);
  font-size: clamp(94px, 10vw, 170px);
  font-weight: 650;
  letter-spacing: -0.08em;
  line-height: 0.85;
}

.score span { color: var(--faint); font-size: 20px; font-weight: 700; }

.stage-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 22px 0 34px;
}

.stage-scale i { height: 4px; background: rgba(255,255,255,0.07); }
.stage-scale i.on { background: var(--amber); }

.verdict h2 {
  margin: 0 0 15px;
  font-size: clamp(25px, 2.1vw, 37px);
  line-height: 1.08;
}

.verdict > p {
  max-width: 590px;
  margin: 0 0 35px;
  color: var(--muted);
  line-height: 1.65;
}

.confidence-line {
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

.confidence-line strong { color: var(--amber); }
.confidence-line em { margin-left: auto; color: var(--muted); font-style: normal; letter-spacing: 0; }

.signal-strip {
  display: grid;
  grid-template-columns: 1.7fr 1fr 0.65fr;
  border-bottom: 1px solid var(--line);
}

.signal {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px 1fr;
  gap: 16px;
  padding: 30px clamp(22px, 2.4vw, 42px);
  border-right: 1px solid var(--line);
}

.signal:last-child { border-right: 0; }
.signal-index { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.signal small { color: var(--amber); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.15em; }
.counter-signal small { color: var(--mint); }
.signal h2 { max-width: 880px; margin: 7px 0 0; font-size: clamp(18px, 1.65vw, 27px); line-height: 1.25; }
.signal p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.coverage-signal strong { display: block; margin-top: 5px; color: var(--amber); font-size: 39px; line-height: 1; }
.coverage-signal strong em { color: var(--faint); font-size: 16px; font-style: normal; }

.evidence-section,
.indicator-section,
.coverage-section { padding: 92px var(--pad); border-bottom: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2,
.threshold-copy h2 { margin: 0; font-size: clamp(34px, 4vw, 60px); letter-spacing: -0.045em; line-height: 1; }
.section-note { max-width: 470px; margin: 0; color: var(--muted); font-size: 13px; }

.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.filters button b { margin-left: 5px; color: var(--faint); font-size: 10px; }
.filters button:hover { border-color: var(--amber); color: var(--text); }
.filters button.selected { border-color: rgba(243, 182, 75, .5); color: var(--amber); background: var(--amber-soft); }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.evidence-card {
  display: flex;
  min-height: 330px;
  grid-column: span 4;
  flex-direction: column;
  padding: 26px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(12, 23, 28, 0.48);
  transition: background 160ms ease, transform 160ms ease;
}

.evidence-card:hover { z-index: 1; background: var(--panel-2); }
.evidence-card.lead { grid-column: span 8; background: linear-gradient(120deg, var(--amber-soft), transparent 55%); }
.evidence-card.counter { background: linear-gradient(145deg, var(--mint-soft), transparent 58%); }
.evidence-card[hidden] { display: none; }

.evidence-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evidence-meta time { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.tag { padding: 5px 7px; border: 1px solid currentColor; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; letter-spacing: 0.09em; }
.tag.pressure { color: var(--amber); }
.tag.resilience { color: var(--mint); }
.evidence-card h3 { max-width: 700px; margin: 35px 0 13px; font-size: clamp(21px, 2vw, 31px); line-height: 1.12; }
.evidence-card p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.6; }
.evidence-card footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 28px; }
.evidence-card footer span { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .08em; }
.evidence-card footer a { color: var(--amber); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-decoration: none; }
.evidence-card.counter footer a { color: var(--mint); }
.evidence-card footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.empty-filter { margin: 20px 0 0; color: var(--muted); }

.indicator-section { background: rgba(12, 23, 28, 0.25); }
.indicator-table { border-top: 1px solid var(--line-strong); }
.indicator-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(135px, .5fr) minmax(120px, .5fr) minmax(280px, 1.45fr);
  gap: 30px;
  align-items: center;
  min-height: 82px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.indicator-row:not(.table-head):hover { background: rgba(255,255,255,.02); }
.indicator-row > div:first-child { display: grid; grid-template-columns: 40px 1fr; align-items: center; }
.indicator-row > div:first-child b { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.indicator-row > div:first-child strong { font-size: 15px; }
.indicator-row p { margin: 0; color: var(--muted); font-size: 13px; }
.table-head { min-height: 43px; color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .12em; }
.mini-score { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 12px; }
.mini-score span { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mini-score i { position: relative; display: block; height: 3px; background: rgba(255,255,255,.07); }
.mini-score i::after { position: absolute; inset: 0 auto 0 0; width: var(--level); background: var(--amber); content: ""; }
.indicator-row em { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-style: normal; text-transform: uppercase; }
.indicator-row em.up { color: var(--amber); }
.indicator-row em.flat { color: var(--mint); }
.indicator-row em.unknown { color: var(--faint); }
.indicator-row.severe .mini-score i::after { background: var(--coral); }
.indicator-row.positive .mini-score i::after { background: var(--mint); }
.indicator-row.uncertain { opacity: .74; }

.threshold-section {
  display: grid;
  grid-template-columns: minmax(330px, .9fr) minmax(460px, 1.1fr);
  gap: clamp(50px, 8vw, 150px);
  padding: 104px var(--pad);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 115, 94, 0.045), transparent 40%),
    var(--panel);
}
.threshold-copy > p:last-child { max-width: 520px; margin: 34px 0 0; color: var(--muted); font-size: 17px; }
.threshold-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.threshold-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 18px; align-items: center; min-height: 101px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.threshold-list li > span { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.threshold-list b { font-size: 17px; }
.threshold-list p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.threshold-list em { padding: 6px 8px; border: 1px solid var(--line-strong); color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; font-style: normal; letter-spacing: .1em; }
.threshold-list li.partial em { border-color: rgba(243,182,75,.45); color: var(--amber); }

.data-link { padding: 10px 14px; border: 1px solid var(--line-strong); color: var(--mint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-decoration: none; }
.data-link:hover { border-color: var(--mint); background: var(--mint-soft); }
.coverage-layout { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(480px, 1.32fr); gap: clamp(45px, 8vw, 140px); }
.coverage-meter { padding: 28px; border: 1px solid var(--line-strong); background: var(--panel); }
.coverage-number { display: flex; align-items: baseline; gap: 9px; }
.coverage-number strong { color: var(--mint); font-size: 82px; letter-spacing: -.07em; line-height: 1; }
.coverage-number span { color: var(--faint); font-size: 18px; font-weight: 700; }
.coverage-meter > p { max-width: 300px; margin: 8px 0 24px; color: var(--muted); }
.coverage-bar { height: 5px; background: rgba(255,255,255,.07); }
.coverage-bar i { display: block; width: 83.333%; height: 100%; background: var(--mint); }
.coverage-meter footer { display: flex; justify-content: space-between; margin-top: 17px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .1em; }
.coverage-meter footer span { color: var(--faint); }
.coverage-meter footer b { color: var(--mint); }
.blind-spots { border-top: 1px solid var(--line-strong); }
.blind-spots article { display: grid; min-height: 108px; grid-template-columns: 38px 1fr; gap: 14px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.blind-spots span { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.blind-spots b { font-size: 18px; }
.blind-spots p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.method-note { margin: 50px 0 0; padding: 20px 22px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.method-note b { color: var(--text); }

.page-footer {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 30px;
  padding: 34px var(--pad);
  color: var(--faint);
  font-size: 11px;
}
.page-footer > div { display: flex; align-items: center; gap: 11px; }
.page-footer p { margin: 0; text-align: center; }
.page-footer time { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.brand-mark { width: 27px; height: 27px; font-size: 10px; }

@media (max-width: 1180px) {
  :root { --rail-width: 82px; }
  .brand { justify-content: center; padding: 0; }
  .brand b, .rail nav a:not(.active)::after, .rail-status div { display: none; }
  .rail nav a { grid-template-columns: 1fr; justify-items: center; padding: 0; font-size: 0; }
  .rail nav a span { font-size: 10px; }
  .rail-status { justify-content: center; padding-inline: 0; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); }
  .signal-strip { grid-template-columns: 1fr 1fr; }
  .coverage-signal { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .evidence-card { grid-column: span 6; }
  .evidence-card.lead { grid-column: span 12; }
  .indicator-row { grid-template-columns: minmax(210px, 1fr) 135px 115px; }
  .indicator-row > p, .table-head > span:last-child { grid-column: 1 / -1; padding-left: 40px; }
  .indicator-row > p { padding-bottom: 7px; }
}

@media (max-width: 820px) {
  :root { --rail-width: 0px; --pad: 22px; }
  html { scroll-padding-top: 70px; }
  .rail { inset: auto 0 0; width: 100%; height: 59px; border-top: 1px solid var(--line); border-right: 0; }
  .brand, .rail-status { display: none; }
  .rail nav { display: grid; height: 100%; grid-template-columns: repeat(5, 1fr); padding: 0; }
  .rail nav a { min-height: 0; }
  .rail nav a::before { inset: auto 20% 0; width: auto; height: 2px; }
  main { width: 100%; margin-left: 0; padding-bottom: 59px; }
  .topbar { min-height: 50px; }
  .breadcrumb { display: none; }
  .scan-meta { width: 100%; justify-content: space-between; }
  .hero { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { min-height: 500px; padding-top: 66px; }
  .verdict { min-height: 510px; border-top: 1px solid var(--line); border-left: 0; }
  h1 { font-size: clamp(52px, 11vw, 76px); }
  .signal-strip { grid-template-columns: 1fr; }
  .signal { border-right: 0; border-bottom: 1px solid var(--line); }
  .signal:last-child { border-bottom: 0; }
  .coverage-signal { grid-column: auto; border-top: 0; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .evidence-card, .evidence-card.lead { grid-column: span 12; }
  .threshold-section, .coverage-layout { grid-template-columns: 1fr; }
  .indicator-table { overflow: hidden; }
  .indicator-row { grid-template-columns: 1fr 120px; gap: 14px; }
  .indicator-row > div:first-child { grid-column: 1 / -1; }
  .indicator-row > em { text-align: right; }
  .indicator-row > p { grid-column: 1 / -1; padding-left: 40px; }
  .table-head { display: none; }
  .page-footer { grid-template-columns: 1fr auto; }
  .page-footer p { display: none; }
}

@media (max-width: 520px) {
  .topbar time { display: none; }
  .hero-copy { min-height: 480px; padding-bottom: 46px; }
  h1 { font-size: clamp(48px, 13vw, 62px); }
  .hypothesis { margin-top: 34px; font-size: 15px; }
  .verdict { min-height: 500px; padding-block: 48px; }
  .score strong { font-size: 103px; }
  .signal { grid-template-columns: 28px 1fr; padding-inline: 20px; }
  .evidence-section, .indicator-section, .coverage-section { padding-block: 70px; }
  .evidence-card { min-height: 350px; padding: 22px; }
  .evidence-meta { align-items: flex-start; }
  .tag { max-width: 170px; text-align: right; }
  .evidence-card footer { align-items: flex-start; flex-direction: column; }
  .threshold-section { grid-template-columns: minmax(0, 1fr); padding-block: 78px; }
  .threshold-list li { grid-template-columns: 25px 1fr; }
  .threshold-list em { grid-column: 2; justify-self: start; }
  .indicator-row { padding-inline: 4px; }
  .indicator-row > div:first-child { grid-template-columns: 30px 1fr; }
  .indicator-row > p { padding-left: 30px; }
  .coverage-number strong { font-size: 70px; }
}

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