:root {
  /* Tokens from the Figma file "Sentinels - App" (andrew-site/DESIGN.md), shared by both sites. */
  --bg: #f7f9f6;        /* panel, a touch lighter (B1) */
  --bg-2: #e3e9df;      /* land */
  --band: #12355b;      /* prussian blue */
  --ink: #14202b;
  --ink-2: #3d5566;     /* muted */
  --ink-3: #5d7282;
  --line: #c5cec6;      /* row rule */
  --accent: #12355b;
  --gold: #e8c547;      /* survey yellow */
  --dry: #c8102e;       /* carmine */
  --rain: #12355b;
  --sea: #bfd6dd;
  --nogauge: #6e787d;
  --skeptic: #6b4c9a;
  --linkup: #1f7a5c;
  --card: rgba(243, 246, 241, .95);
  --serif: "Inter Tight", system-ui, sans-serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --radius: 0;
}
::selection { background: #e8c547; color: #14202b; }
h1, h2, h3, h4, h5 { font-family: var(--serif); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
b { font-weight: 600; }
.hot { color: var(--dry); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  height: 76px; padding: 0 clamp(16px, 4vw, 72px); background: #fff; color: var(--band); border-bottom: 1px solid var(--line); }
.brand { font: 800 1.5rem/1 var(--serif); letter-spacing: -.04em; text-decoration: none; color: var(--band); }
.brand span { color: var(--gold); }
.top nav { display: flex; gap: 28px; font-size: .875rem; font-weight: 550; }
.top nav a { position: relative; padding-block: 10px; text-decoration: none; color: var(--ink-2); transition: color .2s; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.top nav a:hover { color: var(--band); }
.top nav a:hover::after { transform: scaleX(1); }

/* Hero */
.hero { padding: 88px 24px 72px; max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; position: relative; }
.eyebrow { font: 600 .75rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 22px; }
h1 { font: 800 clamp(2.4rem, 5vw, 4.2rem)/1.04 var(--serif); margin: 0 0 28px; letter-spacing: -.04em; }
h1 em { font-style: normal; color: var(--dry); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 44em; margin: 0 0 44px; }
.stats { display: flex; justify-content: center; }
.stats > div { display: flex; align-items: center; gap: 14px; padding: 0 clamp(18px, 2.8vw, 44px); border-left: 1px solid var(--line); text-align: left; }
.stats > div:first-child { border-left: 0; }
.num { font: 800 clamp(2rem, 3.4vw, 3.1rem)/1 var(--serif); letter-spacing: -.04em; color: var(--band); font-variant-numeric: tabular-nums; }
.num.hot { color: var(--dry); }
.lbl { font-size: .95rem; line-height: 1.35; color: var(--ink-2); max-width: 9em; }
.cell-out { margin: 0 0 12px; font: 500 .75rem/1.5 var(--mono); letter-spacing: .02em; color: var(--accent); }
.caption { margin: 12px 0 0; font: 500 .75rem/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.hero .caption { margin-top: 32px; }
.section-label { margin: 0 0 14px; font: 600 .75rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.section-label::before { content: ""; display: inline-block; width: 22px; border-top: 2px solid var(--dry); vertical-align: middle; margin-right: 12px; }
.fig { margin: 0; }
.scrollcue { position: absolute; bottom: 20px; left: 50%; text-decoration: none; color: var(--ink-3); font-size: 22px; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Scrollytelling map */
.scrolly { position: relative; }
.sticky { position: sticky; top: 76px; height: calc(100vh - 76px); overflow: hidden; }
#deck { position: absolute; inset: 0; }
.legend { position: absolute; left: 24px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2);
  background: var(--card); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(8px); z-index: 2; }
.legend .hint { color: var(--ink-3); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: 0; }
.dot.dry { background: var(--dry); } .dot.rain { background: var(--rain); } .dot.nogauge { background: var(--nogauge); }
.tip { position: absolute; z-index: 3; pointer-events: none; background: #fff; border: 1px solid var(--line); 
  padding: 10px 12px; font-size: 13px; line-height: 1.45; max-width: 260px; }
.tip .t { font-weight: 600; } .tip .m { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.steps { position: relative; z-index: 4; margin-top: -100vh; pointer-events: none; }
.step { min-height: 100vh; padding-left: clamp(16px, 4vw, 72px) !important; display: flex; align-items: center; padding: 0 24px; }
.step .card { pointer-events: auto; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 22px 24px;
  backdrop-filter: blur(10px); opacity: .25; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.step.active .card { opacity: 1; transform: none; }
.step h3 { font: 700 1.35rem/1.25 var(--serif); letter-spacing: -.025em; margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink-2); }
.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(243, 246, 241, .7) !important; }
.maplibregl-ctrl-attrib a { color: var(--ink-3) !important; }

/* Bands */
.band { padding: 96px clamp(16px, 4vw, 72px); border-top: 1px solid var(--line); }
.band.alt { background: var(--band); border-top-color: var(--band); --bg-2: #1b4672; --ink: #fff; --ink-2: #d6e2ea; --ink-3: #bfd6dd; --line: #2d5884; --accent: var(--gold); color: #fff; }
.wrap { max-width: 1100px; margin: 0 auto; }
.wrap.narrow { max-width: 760px; }
h2 { font: 700 clamp(2rem, 3.4vw, 3rem)/1.12 var(--serif); margin: 0 0 14px; letter-spacing: -.035em; }
.sub { color: var(--ink-2); max-width: 65ch; margin: 0 0 40px; font-size: 1.05rem; padding-bottom: 26px; border-bottom: 1px solid var(--line); }

/* Architecture flow */
.flow { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1.15fr 28px .8fr; align-items: center; gap: 0; }
.col h4 { font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.node { border: 1px solid var(--line); background: var(--bg-2); border-radius: var(--radius); padding: 11px 13px; margin-bottom: 8px; font-weight: 600; font-size: 15px;
  opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s, border-color .3s; }
.node small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.flow.in .node { opacity: 1; transform: none; }
.node:hover { border-color: var(--gold); }
.node.hotline { border-color: var(--dry); }
.node.mem { border-style: dashed; }
.node.sk { border-left: 3px solid var(--skeptic); }
.node.lk { border-left: 3px solid var(--linkup); }
.node.act { border-color: var(--band); }
.arrow { height: 2px; background: linear-gradient(90deg, var(--line), var(--ink-3)); position: relative; }
.arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--ink-3); border-right: 0; }
.why { max-width: 70ch; margin: 48px 0 0; color: var(--ink-2); font-size: 1.05rem; padding-top: 20px; border-top: 1px solid var(--line); }

/* Company bars */
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 170px 1fr 36px; align-items: center; gap: 14px; font-size: 14.5px; }
.bar .track { height: 14px; background: var(--line); overflow: hidden; }
.bar .fill { height: 100%; width: 0; background: var(--dry); transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.bar .n { font-family: var(--mono); text-align: right; color: var(--ink-2); }

/* Case */
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; margin-top: 36px; align-items: start; }
.panel { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 20px 22px; }
.panel h4 { font: 700 1.1rem var(--serif); letter-spacing: -.02em; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.panel h4 small { font: 400 12px var(--mono); color: var(--ink-3); margin-left: auto; }
.stepno { color: var(--dry); font: 500 13px var(--mono); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin-bottom: 18px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-family: var(--mono); font-size: 13.5px; }
.note { font-size: 13px; color: var(--ink-3); margin: 0 0 12px; }
.gauges { display: grid; gap: 12px; }
.gauge .g-h { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-family: var(--mono); }
.gauge .g-t { position: relative; height: 10px; background: var(--line); border-radius: 2px; }
.gauge .g-f { position: absolute; inset: 0 auto 0 0; background: var(--rain); border-radius: 2px; min-width: 2px; }
.gauge .g-th { position: absolute; top: -4px; bottom: -4px; border-left: 1px dashed var(--ink-2); }
.agents { display: grid; gap: 14px; }
.ag-panel { border-left: 3px solid var(--ink-3); }
.ag-panel.sk { border-left-color: var(--skeptic); }
.ag-panel.lk { border-left-color: var(--linkup); }
.ag-panel.ad, .node.ad { border-left: 3px solid var(--gold); }
.ruling { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.ruling h6 { margin: 0 0 4px; font: 600 .75rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 600px) { .ruling { grid-template-columns: 1fr; } }
.ag-panel .body { font-size: 15px; color: var(--ink-2); }
.ag-panel .body.pending { color: var(--ink-3); font-style: italic; }
.ag-panel ul { margin: 8px 0 0; padding-left: 18px; }
.ag-panel li { margin-bottom: 4px; }
.conf { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-family: var(--mono); font-size: 13px; }
.conf .track { flex: 1; height: 8px; background: var(--line); overflow: hidden; }
.conf .fill { height: 100%; background: linear-gradient(90deg, var(--rain), var(--dry)); }
.pill { font: 500 12px var(--mono); color: var(--ink-3); margin-left: 4px; }
.pill::before { content: "· "; }
.sources a { color: var(--linkup); text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.report { max-height: 340px; overflow: auto; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.report h1, .report h2, .report h3 { font: 600 15px var(--sans); margin: 14px 0 6px; }
.pending-note { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* Limits + footer */
.limits { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.limits li { padding-left: 22px; position: relative; color: var(--ink-2); }
.limits li::before { content: ""; position: absolute; left: 0; top: 11px; width: 10px; height: 1px; background: var(--gold); }
.limits b { color: var(--ink); }
.built { background: var(--band); --ink: #fff; --ink-2: #d6e2ea; --ink-3: #bfd6dd; --line: #2d5884; --accent: var(--gold); color: #fff; }
.built .section-label::before { border-top-color: var(--gold); }
.built h2 { font-size: 1.6rem; }
.foot a { color: var(--accent); }
.stack { color: var(--ink-2); font-size: 15px; margin: 12px 0 32px; max-width: 75ch; }
.foot { font-size: 13px; color: var(--ink-3); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .arrow { width: 2px; height: 22px; margin: 4px auto 12px; background: linear-gradient(var(--line), var(--ink-3)); }
  .arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top-color: var(--ink-3); border-bottom: 0; }
  .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top { height: 64px; }
  .sticky { top: 64px; height: calc(100vh - 64px); }
  .top nav a:not(:last-child) { display: none; }
  .hero { padding: 100px 16px 70px; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .stats > div { flex-direction: column; gap: 6px; padding: 0 6px; text-align: center; }
  .lbl { font-size: .8rem; }
  .band { padding: 80px 16px; }
  .step { padding: 0 16px; align-items: flex-end; padding-bottom: 18vh; }
  .legend { left: 16px; right: 16px; bottom: 14px; font-size: 12px; }
  .bar { grid-template-columns: 112px 1fr 28px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 901px) { #case-data { position: sticky; top: 96px; } }

/* Demo video */
.demo { padding-top: 64px; padding-bottom: 64px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100svh - 240px) * 16 / 9)); margin: 0 auto; background: var(--bg-2); border: 1px solid var(--line); border-top: 1px solid var(--gold); border-radius: var(--radius); overflow: hidden; }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-pending { position: absolute; inset: 0; display: grid; place-items: center; }

/* Case verdict strip + folded agent output */
.verdict { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 0; margin-top: 24px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.verdict > div { padding: 14px 28px 14px 0; margin-right: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.verdict > div:last-child { border-right: 0; margin-right: 0; }
.v-k { font: 600 .7rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.v-v { font: 700 1.6rem/1.1 var(--serif); letter-spacing: -.03em; }
.v-t { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.ag-panel .body > p:first-child { margin-top: 0; }
.ag-panel details { margin-top: 10px; }
.ag-panel summary { cursor: pointer; font: 500 12.5px var(--mono); color: var(--accent); list-style: none; }
.ag-panel summary::-webkit-details-marker { display: none; }
.ag-panel summary::before { content: "+ "; }
.ag-panel details[open] summary::before { content: "− "; }
.ag-panel details[open] summary { margin-bottom: 8px; }
@media (max-width: 900px) {
  .verdict { grid-template-columns: repeat(3, auto); }
  .verdict .v-wide { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
}
@media (max-width: 600px) {
  .verdict > div { padding-right: 10px; margin-right: 10px; }
  .verdict .v-v { font-size: 1.2rem; }
  .verdict .v-k { font-size: .62rem; }
}
@media (max-width: 900px) { .verdict > div:nth-child(3) { border-right: 0; margin-right: 0; } }
