/* ==========================================================================
   GreenTruth — Interface Stylesheet
   Modern, production-grade satellite evidence intelligence console.
   ========================================================================== */

@font-face {
  font-family: "Roboto";
  src: url("/fonts/roboto-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "notika-icon";
  src: url("/fonts/notika-icon.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;

  /* Modern Accent Colors */
  --green: #10b981;
  --green-ink: #34d399;
  --green-deep: #10b981;
  --green-tint: rgba(16, 185, 129, 0.14);
  --green-tint-2: rgba(16, 185, 129, 0.08);
  --green-glow: rgba(16, 185, 129, 0.35);

  --cyan: #06b6d4;
  --cyan-ink: #22d3ee;
  --cyan-tint: rgba(6, 182, 212, 0.16);
  --cyan-glow: rgba(6, 182, 212, 0.35);

  --blue: #0ea5e9;
  --blue-ink: #38bdf8;
  --blue-tint: rgba(56, 189, 248, 0.16);
  --blue-glow: rgba(56, 189, 248, 0.3);

  --indigo: #6366f1;
  --indigo-ink: #a5b4fc;
  --indigo-tint: rgba(99, 102, 241, 0.18);
  --indigo-glow: rgba(99, 102, 241, 0.35);

  --amber: #f59e0b;
  --amber-ink: #fbbf24;
  --amber-tint: rgba(245, 158, 11, 0.14);
  --amber-glow: rgba(245, 158, 11, 0.35);

  --orange: #f97316;
  --orange-ink: #fb923c;
  --orange-tint: rgba(249, 115, 22, 0.18);

  --red: #ef4444;
  --red-ink: #f87171;
  --red-tint: rgba(239, 68, 68, 0.18);
  --red-glow: rgba(239, 68, 68, 0.35);

  --grey: #64748b;
  --grey-ink: #cbd5e1;
  --grey-tint: rgba(148, 163, 184, 0.14);

  /* Native Base Default: High-Contrast Obsidian & Deep Space Slate Layering (Dark Mode Default) */
  --page: #070b14;
  --card: #0d1527;
  --card-2: #131f36;
  --card-elevated: #1a2a47;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #8295ab;
  --line: rgba(56, 189, 248, 0.14);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(56, 189, 248, 0.32);

  --dark: #070b12;
  --dark-2: #0e1626;
  --dark-line: rgba(255, 255, 255, 0.08);
  --on-dark: #f8fafc;
  --on-dark-2: #94a3b8;

  /* Value Provenance */
  --c-observed: #10b981;
  --c-projected: #38bdf8;
  --c-required: #94a3b8;
  --c-target: #c084fc;
  --c-claimed: #fb923c;
  --c-interval: #cbd5e1;

  /* Geometry & Shadows */
  --r: 6px;
  --r-panel: 12px;
  --r-card: 10px;
  --r-3: 8px;
  --pad: 24px;
  --gap: 28px;
  --shadow-panel: 0 8px 32px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.1);
  --shadow-elevated: 0 16px 48px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(56, 189, 248, 0.18);
  --shadow-btn: 0 2px 6px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 24px 48px -6px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(56, 189, 248, 0.2);
  --t: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --focus: #38bdf8;

  /* Deep cosmic slate background with radiant nebula glow */
  --page-bg:
    radial-gradient(1100px 620px at 12% -8%, rgba(56, 189, 248, 0.09), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(16, 185, 129, 0.07), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #060a12 65%);
  --glass: rgba(13, 21, 39, 0.88);
  --glass-line: rgba(56, 189, 248, 0.14);
  --glass-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.65);
  --inner-hl: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --hairline: rgba(56, 189, 248, 0.2);
  --timeline: rgba(56, 189, 248, 0.18);
  --bead-accent: #38bdf8;
  --bead-ring: #f8fafc;
  --c-interval-hi: #f8fafc;

  /* Verdict tones */
  --rose: #f43f5e;
  --rose-ink: #fb7185;
  --rose-tint: rgba(244, 63, 94, 0.14);
  --rose-glow: rgba(244, 63, 94, 0.3);
  --orange-glow: rgba(249, 115, 22, 0.3);
}

:root[data-theme="light"] {
  --green-ink: #047857;
  --cyan-ink: #0891b2;
  --blue-ink: #0284c7;
  --indigo-ink: #4f46e5;
  --amber-ink: #b45309;
  --orange-ink: #ea580c;
  --red-ink: #dc2626;
  --grey-ink: #475569;
  --page: #f6f8fb;
  --card: #ffffff;
  --card-2: #edf2f7;
  --card-elevated: #ffffff;
  --text: #090e17;
  --text-2: #2d3748;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --line-strong: #cbd5e1;
  --page-bg: var(--page);
  --glass: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(15, 23, 42, 0.08);
  --glass-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --inner-hl: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  --hairline: rgba(15, 23, 42, 0.14);
  --timeline: rgba(15, 23, 42, 0.16);
  --bead-accent: #0ea5e9;
  --bead-ring: #ffffff;
  --c-interval-hi: #64748b;
  --c-interval: #334155;
  --focus: #0ea5e9;
  --shadow-panel: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --shadow-btn: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 20px 35px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.06);
  --rose-ink: #be123c;
  --rose-tint: rgba(244, 63, 94, 0.1);
}

:root[data-theme="dark"] {
  --page: #070b14;
  --card: #0d1527;
  --card-2: #131f36;
  --card-elevated: #1a2a47;
  --text: #f8fafc;
  --text-2: #cbd5e1;
  --muted: #8295ab;
  --line: rgba(56, 189, 248, 0.14);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(56, 189, 248, 0.32);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  color-scheme: dark light;
}
.main { overflow-x: clip; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page-bg);
  background-color: var(--page);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
p { margin: 0 0 14px; }
a { color: var(--green-ink); text-decoration: none; transition: var(--t); }
a:hover { color: var(--green); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
code, .mono {
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}
ul { margin: 0; padding: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.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-link {
  position: absolute; left: 14px; top: -70px; z-index: 100;
  background: var(--card-elevated); color: var(--text); padding: 10px 16px;
  border-radius: var(--r); box-shadow: var(--shadow-pop);
  border: 1px solid var(--line-strong); transition: top .2s ease;
}
.skip-link:focus { top: 14px; }

.ico {
  font-family: "notika-icon" !important;
  font-style: normal; font-weight: normal; font-variant: normal;
  text-transform: none; line-height: 1; speak: never;
  display: inline-block;
}

/* --------------------------------------------------------------- landing */

.landing {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #040810 url("/hero-poster.jpg") center / cover no-repeat;
  overflow: hidden;
  isolation: isolate;
}
.landing-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.landing-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(7, 11, 18, 0.4) 0%, rgba(7, 11, 18, 0.88) 75%),
    linear-gradient(180deg, rgba(7, 11, 18, 0.6) 0%, rgba(7, 11, 18, 0.3) 40%, #070b12 100%);
}
.landing-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 36px;
}
.landing-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.landing-brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.3)); }
.landing-brand span { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.landing-top .btn-link-light {
  color: #fff; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 18px; border-radius: 9999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: var(--t);
}
.landing-top .btn-link-light:hover {
  border-color: var(--green); background: rgba(16, 185, 129, 0.15); color: #fff;
  box-shadow: 0 0 16px var(--green-glow);
}

.landing-hero {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 20px 24px 16px;
}
.landing-logo {
  width: 104px; height: 104px; margin-bottom: 20px;
  filter: drop-shadow(0 10px 30px rgba(16, 185, 129, 0.45));
  animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.wordmark {
  margin: 0; color: #fff;
  font-size: clamp(48px, 8vw, 84px); font-weight: 800; line-height: 1;
  letter-spacing: -0.03em;
}
.wordmark .wm-accent {
  color: var(--green);
  text-shadow: 0 0 32px var(--green-glow);
}
.tagline {
  margin: 18px 0 0; font-size: clamp(18px, 2.5vw, 24px); font-weight: 400;
  color: #e2e8f0; line-height: 1.4; max-width: 760px; letter-spacing: -0.015em;
}
.principle {
  margin: 16px 0 0; font-size: 13px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--green);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }

.flow {
  list-style: none; margin: 48px auto 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(880px, 100%); position: relative;
}
.flow::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 8px; height: 2px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.6), rgba(16, 185, 129, 0.1));
}
.flow::after {
  content: ""; position: absolute; top: 6px; left: 10%; width: 70px; height: 6px;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  box-shadow: 0 0 14px var(--green);
  animation: flowPulse 5.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes flowPulse {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(min(640px, calc(80vw - 70px))); opacity: 0; }
}
.flow li { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; }
.flow .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: #070b12; border: 2px solid var(--green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.flow li:last-child .dot {
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}
.flow .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: #f8fafc; }
.flow .sub { font-size: 12px; color: #94a3b8; font-weight: 400; line-height: 16px; max-width: 120px; }

.landing-facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px;
  padding: 18px 24px 24px; font-size: 13px; color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 18, 0.7);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.landing-facts b { color: #f8fafc; font-weight: 600; }
.landing-facts .fact { display: inline-flex; align-items: center; gap: 9px; }

/* Radar pulse animation for status pips */
.pip {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); flex: none; position: relative;
}
.pip:not(.idle) {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: radarPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.pip.warn {
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: radarPulseWarn 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.pip.err {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: radarPulseErr 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.pip.idle { background: var(--grey); animation: none; }

@keyframes radarPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes radarPulseWarn {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}
@keyframes radarPulseErr {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 18px;
  font-size: 13.5px; font-weight: 600; line-height: 1.4;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); color: var(--text);
  box-shadow: var(--shadow-btn);
  transition: var(--t); white-space: nowrap; text-decoration: none;
}
.btn:hover {
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  border-color: var(--line-strong);
}
.btn:active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn:disabled {
  opacity: .5; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-primary {
  background: var(--green);
  color: #04100c;
  border-color: var(--green);
  box-shadow: 0 2px 10px var(--green-glow);
}
.btn-primary:hover {
  background: #34d399;
  border-color: #34d399;
  color: #04100c;
  box-shadow: 0 6px 22px var(--green-glow);
}
:root[data-theme="dark"] .btn-primary {
  background: var(--green);
  color: #020c09;
}
:root[data-theme="dark"] .btn-primary:hover {
  background: #34d399;
  color: #020c09;
}

.btn-default { background: var(--card); color: var(--text); }
.btn-ghost {
  background: transparent; color: var(--text); box-shadow: none;
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--green); color: var(--text);
  background: var(--green-tint-2);
}

.btn-lg {
  min-height: 48px; padding: 12px 28px; font-size: 16px; border-radius: var(--r-card);
}
.btn-sm {
  min-height: 32px; padding: 4px 12px; font-size: 12px; font-weight: 500;
}
.btn-block { width: 100%; }

.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.06); color: #fff; box-shadow: none;
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-hero-ghost:hover {
  border-color: var(--green); background: rgba(16, 185, 129, 0.15); color: #fff;
  box-shadow: 0 0 20px var(--green-glow);
}
.btn .ico { font-size: 16px; }

.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff; border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite;
}
.spinner.dark { border-color: var(--line-strong); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------- shell */

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* Topbar with glassmorphism */
.topbar {
  background: rgba(7, 11, 18, 0.82);
  color: var(--on-dark);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  z-index: 40;
}
.topbar-in {
  display: flex; align-items: center; gap: 24px;
  max-width: 1600px; margin: 0 auto; padding: 14px 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px; color: #fff; background: none; border: 0; padding: 0;
  transition: var(--t);
}
.brand:hover { text-decoration: none; color: #fff; opacity: .9; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3)); }
.brand-name { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.brand-name .wm-accent { color: var(--green); }
.brand-sub { display: block; font-size: 12px; color: var(--on-dark-2); font-weight: 400; margin-top: 1px; }

.top-status { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip-dark {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--on-dark-2);
  border: 1px solid var(--line); border-radius: 9999px;
  padding: 5px 12px; background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: var(--t);
}
.chip-dark:hover {
  border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06);
}
.chip-dark b { color: #fff; font-weight: 600; }

.icon-btn-dark {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--on-dark);
  border-radius: 9999px;
  min-height: 32px; padding: 4px 14px; font-size: 12px; font-weight: 500;
  transition: var(--t);
}
.icon-btn-dark:hover {
  border-color: var(--green); color: #fff;
  background: var(--green-tint);
}
.topbar :focus-visible { outline-color: var(--focus); }

/* Menubar with glassmorphism */
.menubar {
  background: rgba(14, 22, 38, 0.85);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
:root[data-theme="light"] .menubar {
  background: rgba(255, 255, 255, 0.85);
}
.menu {
  display: flex; gap: 4px; max-width: 1600px; margin: 0 auto; padding: 0 24px;
  overflow-x: auto; scrollbar-width: thin;
}
.menu-item {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 18px; font-size: 14px; font-weight: 500; color: var(--text-2);
  background: none; border: 0; white-space: nowrap; transition: var(--t);
}
.menu-item .ico { font-size: 17px; color: var(--muted); transition: var(--t); }
.menu-item::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px;
  border-radius: 9999px;
  background: var(--green); transform: scaleX(0);
  box-shadow: 0 0 10px var(--green);
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-item:hover { color: var(--text); }
.menu-item:hover .ico { color: var(--green); }
.menu-item[aria-current="page"] {
  color: var(--text); font-weight: 600;
}
.menu-item[aria-current="page"] .ico { color: var(--green); }
.menu-item[aria-current="page"]::after { transform: scaleX(1); }

.menu-item .count {
  font-size: 11px; font-weight: 700; background: var(--green-tint); color: var(--green-ink);
  border-radius: 9999px; padding: 1px 7px; line-height: 16px;
}

.main { flex: 1; }
.container { max-width: 1600px; margin: 0 auto; padding: 32px 32px 64px; }

.footer {
  background: #040810; color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line);
}
.footer-in {
  max-width: 1600px; margin: 0 auto; padding: 20px 32px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--green); }

.view { animation: viewIn .35s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ page head */

.page-head { margin: 8px 0 28px; }
.page-head h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.025em; }
.page-head p { margin: 0; font-size: 15px; line-height: 25px; color: var(--text-2); max-width: 85ch; }

/* --------------------------------------------------------------- panels */

.panel {
  background: var(--card); border-radius: var(--r-panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-panel); padding: var(--pad);
  min-width: 0; transition: var(--t);
}
.panel + .panel { margin-top: var(--gap); }
.ws-input > .panel, .ws-results > *, .ws-main > .panel, .ws-side > .panel,
.stack > .panel, .grid-2 > .panel, .grid-3 > .panel, .cases > .panel, .map-layout > .panel { margin-top: 0; }
.ws-results .stats { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head > div { min-width: 0; }
.panel-title { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.panel-title-sm { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.015em; }
.panel-sub { margin: 4px 0 0; font-size: 14px; line-height: 22px; color: var(--text-2); }

.kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 6px;
}
.section-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px;
}
.divider { height: 1px; background: var(--line); margin: 20px 0; }

.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.prose { font-size: 14px; line-height: 24px; color: var(--text-2); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 18px; }
.prose li { margin: 4px 0; }
.nowrap { white-space: nowrap; }

.reveal { animation: fadeUp .35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ form parts */

.form-group { margin-bottom: 20px; }
.nk-label {
  display: block; font-size: 11.5px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 8px;
}
.nk-int-st {
  position: relative;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: var(--t);
}
.nk-int-st:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
.nk-input {
  display: block; width: 100%; border: 0;
  border-radius: var(--r); background: transparent; padding: 10px 14px; font-size: 14px;
  color: var(--text); outline: none;
}
select.nk-input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: calc(100% - 12px) center;
  background-repeat: no-repeat;
}
select.nk-input option { background: var(--card); color: var(--text); }
textarea.nk-input {
  padding: 12px 14px; min-height: 140px; line-height: 22px;
  resize: vertical; font-family: inherit;
}
.nk-input:focus-visible { outline: none; }
.hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 18px; }
.kbd {
  font-family: var(--mono); font-size: 11px;
  background: var(--card-2);
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; color: var(--text-2);
}

.dropzone {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px dashed var(--line-strong); border-radius: var(--r);
  padding: 12px 14px; font-size: 13px; color: var(--text-2);
  background: var(--card-2); transition: var(--t);
}
.dropzone .ico { font-size: 18px; color: var(--muted); }
.dropzone:hover, .dropzone.over {
  border-color: var(--green); color: var(--text); background: var(--green-tint-2);
  box-shadow: 0 0 16px var(--green-tint);
}

/* ----------------------------------------------------------- tags/badges */

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 18px; padding: 3px 10px;
  border-radius: 9999px; background: var(--card-2); color: var(--text-2);
  border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tag b { color: var(--text); font-weight: 600; }
.tag-obs { border-color: rgba(16, 185, 129, 0.3); background: var(--green-tint); color: var(--green-ink); }
.tag-proj { border-color: rgba(56, 189, 248, 0.3); background: var(--blue-tint); color: var(--blue-ink); }
.tag-claim { border-color: rgba(249, 115, 22, 0.3); background: var(--orange-tint); color: var(--orange-ink); }

/* Verdict tones: solid accent, ink (text), tint (fill), line (35% border), glow.
   Supported = emerald, abstain = amber, not on trajectory = rose; partial is
   orange so it never reads as an abstention. */
.tone-ok       { --tone: var(--green);  --tone-ink: var(--green-ink);  --tone-tint: var(--green-tint);  --tone-line: rgba(16, 185, 129, 0.35); --tone-glow: var(--green-glow); }
.tone-abstain  { --tone: var(--amber);  --tone-ink: var(--amber-ink);  --tone-tint: var(--amber-tint);  --tone-line: rgba(245, 158, 11, 0.35); --tone-glow: var(--amber-glow); }
.tone-traj-bad { --tone: var(--rose);   --tone-ink: var(--rose-ink);   --tone-tint: var(--rose-tint);   --tone-line: rgba(244, 63, 94, 0.35);  --tone-glow: var(--rose-glow); }
.tone-partial  { --tone: var(--orange); --tone-ink: var(--orange-ink); --tone-tint: var(--orange-tint); --tone-line: rgba(249, 115, 22, 0.35); --tone-glow: var(--orange-glow); }
.tone-bad      { --tone: var(--red);    --tone-ink: var(--red-ink);    --tone-tint: var(--red-tint);    --tone-line: rgba(239, 68, 68, 0.35);  --tone-glow: var(--red-glow); }
.tone-none     { --tone: var(--grey);   --tone-ink: var(--grey-ink);   --tone-tint: var(--grey-tint);   --tone-line: rgba(148, 163, 184, 0.3); --tone-glow: rgba(100, 116, 139, 0.2); }

/* Glowing Verdict Badges */
.vbadge {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 9999px;
  background: var(--tone-tint); color: var(--tone-ink);
  border: 1px solid var(--tone-line, var(--tone));
  box-shadow: 0 0 12px var(--tone-glow, rgba(0,0,0,0.1));
  white-space: nowrap;
}
.vbadge .sym { font-size: 12px; line-height: 1; }

/* ------------------------------------------------------------ alerts */

.alert {
  border: 1px solid transparent; border-radius: var(--r-card);
  padding: 14px 18px; font-size: 14px; line-height: 22px;
}
.alert p { margin: 0; }
.alert strong { font-weight: 700; }
.alert-success { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: var(--green-ink); }
.alert-info    { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.3); color: var(--blue-ink); }
.alert-warning { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3); color: var(--amber-ink); }
.alert-danger  { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); color: var(--red-ink); }
.alert-plain   { background: var(--card-2); border-color: var(--line); color: var(--text-2); }

/* State Cards */
.state {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px;
  padding: 20px 24px; border-radius: var(--r-panel); background: var(--card);
  box-shadow: var(--shadow-panel); border: 1px solid var(--line);
  border-left: 4px solid var(--tone, var(--grey));
}
.state-ico {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tone-tint, var(--grey-tint)); color: var(--tone-ink, var(--grey-ink));
  border: 1px solid var(--tone, var(--line));
  box-shadow: 0 0 14px var(--tone-glow, transparent);
  font-size: 20px; font-weight: 700;
}
.state h3 { font-size: 16px; margin: 2px 0 10px; }
.state dl { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; line-height: 22px; }
.state dt { font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); padding-top: 1px; }
.state dd { margin: 0; color: var(--text-2); }
.state .row { margin-top: 14px; }
.state.compact { padding: 16px 18px; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; }
.state.compact .state-ico { width: 38px; height: 38px; font-size: 16px; }
.state.compact dl { grid-template-columns: 120px minmax(0, 1fr); font-size: 13px; line-height: 20px; }

/* Skeleton Loader */
.skel {
  background: linear-gradient(90deg, var(--card-2) 25%, var(--card-elevated) 37%, var(--card-2) 63%);
  background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--r);
}
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------------------------ progressive disclosure */

details.more > summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-ink);
  padding: 8px 0; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: var(--t);
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
details.more[open] > summary::before {
  transform: rotate(45deg);
}
details.more .more-body {
  font-size: 13px; line-height: 22px; color: var(--text-2); padding: 8px 0 4px;
}

/* --------------------------------------------------------- workspace */

.ws { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.ws-input { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; position: sticky; top: 76px; }
.ws-results { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.more-input { margin-top: 14px; }
.more-input .more-body { padding-top: 10px; }

.demo-launch { display: flex; flex-direction: column; gap: 10px; }
.case-btn {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: center;
  width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-card);
  background: var(--card-2); border: 1px solid var(--line);
  border-left: 3px solid var(--tone, var(--green));
  box-shadow: none; transition: var(--t);
}
.case-btn:hover {
  border-color: var(--line-strong);
  background: var(--card-elevated);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.case-num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--tone, var(--green)); color: var(--tone-ink, var(--green-ink));
  background: var(--tone-tint, transparent);
  font-weight: 700; font-size: 13px;
}
.case-btn .t { display: block; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.4; }
.case-btn .m { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

.onboard-card .panel-title { margin-bottom: 16px; }
.story-preview { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.story-preview li { position: relative; padding-left: 44px; counter-increment: s; min-height: 30px; }
.story-preview li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.story-preview b { display: block; font-size: 14.5px; color: var(--text); }
.story-preview span { display: block; font-size: 13px; color: var(--muted); line-height: 20px; }

/* Report Bar */
.report-bar {
  background: var(--card); border-radius: var(--r-panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-panel); padding: 16px 24px;
}
.rb-meta { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rb-meta b { color: var(--text); }
.linklike { background: none; border: 0; padding: 0; color: var(--green-ink); text-decoration: underline; font-size: inherit; }
.det-note { margin-top: 12px; font-size: 13px; line-height: 21px; color: var(--text-2); }

.claim-tabs { display: flex; gap: 12px; overflow-x: auto; margin-top: 16px; padding: 2px 2px 8px; scrollbar-width: thin; }
.ctab {
  flex: 0 0 240px; text-align: left; background: var(--card-2); border: 1px solid var(--line);
  border-top: 3px solid var(--tone); border-radius: var(--r-card); padding: 12px 14px; transition: var(--t);
}
.ctab:hover { background: var(--card-elevated); border-color: var(--line-strong); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.ctab[aria-selected="true"] {
  background: var(--tone-tint); border-color: var(--tone-line, var(--tone)); border-top-color: var(--tone);
  box-shadow: 0 0 16px var(--tone-glow, transparent);
}
.ctab-v { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--tone-ink); }
.ctab-t {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13px; line-height: 19px; color: var(--text-2); margin-top: 6px;
}

/* ------------------------------------------------------ evidence story */

.story {
  position: relative;
  display: flex; flex-direction: column; gap: 24px;
}

/* Verdict banner: a glass card carrying a precision audit stamp */
.banner-v {
  border-radius: var(--r-panel);
  border: 1px solid var(--glass-line);
  padding: 28px 32px 28px 34px;
  position: relative;
  overflow: hidden;
}
.banner-v::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tone); box-shadow: 0 0 18px var(--tone-glow);
}
.banner-v::before {
  content: "";
  position: absolute; top: 0; right: 0; width: 300px; height: 100%;
  background: radial-gradient(circle at 100% 0%, var(--tone-tint) 0%, transparent 70%);
  pointer-events: none;
}
.bv-head { display: flex; align-items: center; gap: 18px; }
.bv-sym {
  position: relative;
  width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 26px; font-weight: 700; background: var(--tone-tint); color: var(--tone-ink);
  border: 1px solid var(--tone-line);
  box-shadow: 0 0 0 5px var(--tone-tint), 0 0 24px -4px var(--tone-glow);
}
/* a soft ping when the verdict appears */
.bv-sym::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 2px solid var(--tone); opacity: 0; pointer-events: none;
  animation: stampPing 1.6s cubic-bezier(0, 0, 0.2, 1) 0.2s 3;
}
@keyframes stampPing {
  0% { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(1.9); opacity: 0; }
}
.bv-titles { min-width: 0; }
.bv-kicker { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.bv-label {
  display: inline-flex; align-items: center; max-width: 100%;
  margin: 6px 0 0; padding: 6px 14px 5px;
  font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: 0.06em;
  color: var(--tone-ink); text-transform: uppercase; overflow-wrap: anywhere;
  background: var(--tone-tint); border: 1px solid var(--tone-line); border-radius: 8px;
  box-shadow: 0 0 26px -8px var(--tone-glow), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  animation: stampIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes stampIn {
  from { opacity: 0; transform: scale(1.06); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
.bv-why {
  margin: 16px 0 24px; font-size: 20px; line-height: 30px; font-weight: 400;
  color: var(--text); max-width: 65ch; letter-spacing: -0.01em;
}
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.fact-c {
  border-top: 2px solid var(--line); padding-top: 12px; min-width: 0;
  font-variant-numeric: tabular-nums;
}
.fact-c .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--muted); }
.fact-c .v {
  display: block; font-size: 24px; font-weight: 800; line-height: 1.25; margin-top: 4px;
  color: var(--text); overflow-wrap: anywhere; letter-spacing: -0.02em;
}
.fact-c .s { display: block; font-size: 12px; color: var(--muted); line-height: 17px; margin-top: 2px; }
.fact-c.obs { border-top-color: var(--c-observed); } .fact-c.obs .v { color: var(--c-observed); }
.fact-c.claim { border-top-color: var(--c-claimed); } .fact-c.claim .v { color: var(--c-claimed); }
.fact-c.proj { border-top-color: var(--c-projected); } .fact-c.proj .v { color: var(--blue-ink); }
.fact-c.target { border-top-color: var(--c-target); } .fact-c.target .v { color: var(--c-target); }

.flags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.flag {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 9999px; background: var(--tone-tint); color: var(--tone-ink);
  border: 1px solid var(--tone-line, var(--tone));
}

/* 5-question evidence story: an audit checklist on a dashed timeline.
   Each card draws the dashes above its own bead and down through the gap
   below it, so no segment is hidden under the next card. */
.story { --story-gap: 24px; --bead: 42px; --step-pad: 26px; gap: var(--story-gap); }
.story-step {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px;
  border-radius: var(--r-panel);
  border: 1px solid var(--glass-line);
  padding: var(--step-pad) 32px 28px var(--step-pad);
  transition: var(--t);
}
.story-step:hover { border-color: var(--line-strong); }
.story-step::before, .story-step::after {
  content: ""; position: absolute; width: 0; pointer-events: none;
  left: calc(var(--step-pad) + var(--bead) / 2 - 1px);
  border-left: 2px dashed var(--timeline);
}
.story-step::before { top: 0; height: calc(var(--step-pad) - 4px); }
.story-step::after { top: calc(var(--step-pad) + var(--bead) + 4px); bottom: calc(-1 * var(--story-gap)); }
.banner-v + .story-step::before { display: none; }
.story-step:last-of-type::after { display: none; }

.ss-n {
  position: relative; z-index: 1;
  width: var(--bead); height: var(--bead); border-radius: 50%;
  background: var(--text); color: var(--page);
  border: 2px solid var(--bead-accent);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), 0 0 18px -2px rgba(56, 189, 248, 0.45);
  transition: var(--t);
}
.story-step:hover .ss-n {
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.16), 0 0 24px rgba(56, 189, 248, 0.55);
}

.ss-body { min-width: 0; }
.ss-q {
  font-size: 21px; font-weight: 700; margin: 4px 0 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  letter-spacing: -0.02em;
}

/* The short answer badge beside each question */
.ss-a {
  font-size: 12.5px; font-weight: 700; line-height: 20px; padding: 3px 12px;
  border-radius: 9999px; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--tone-tint, var(--grey-tint)); color: var(--tone-ink, var(--grey-ink));
  border: 1px solid var(--tone, var(--line-strong));
  box-shadow: 0 0 10px var(--tone-glow, transparent);
}
.ss-a.obs {
  background: var(--green-tint); color: var(--c-observed); border-color: var(--c-observed);
  box-shadow: 0 0 12px var(--green-glow);
}

.quote {
  margin: 0 0 16px; padding-left: 20px;
  border-left: 3px solid var(--cyan);
  font-size: 20px; line-height: 32px; font-weight: 300; color: var(--text);
  font-style: italic; letter-spacing: -0.01em;
}
.ss-lead { margin: 0 0 16px; font-size: 16px; line-height: 26px; color: var(--text); font-variant-numeric: tabular-nums; }
.src-line { margin: 12px 0 0; font-size: 12.5px; line-height: 18px; color: var(--muted); }

.rates { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 18px; margin-top: 16px; }
.rates > div { border-top: 2px solid var(--line); padding-top: 10px; font-variant-numeric: tabular-nums; }
.rates > div:first-child { border-top-color: var(--c-required); }
.rates > div:last-child { border-top-color: var(--c-projected); }
.rates .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.rates b { display: block; font-size: 22px; font-weight: 700; line-height: 1.3; }
.rates .s { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.xgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.xcard {
  background: var(--card-2);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px; min-width: 0; transition: var(--t);
}
.xcard:hover {
  border-color: var(--line-strong); background: var(--card-elevated);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.muted-card { background: var(--card-2); opacity: .9; }
.xc-k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.xc-rel {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 6px 14px;
  border-radius: 9999px; background: var(--tone-tint); color: var(--tone-ink);
  font-size: 13.5px; font-weight: 700; border: 1px solid var(--tone-line, var(--tone));
}
.xc-note, .xc-none { margin: 6px 0 0; font-size: 13px; line-height: 20px; color: var(--text-2); }
.xc-eq { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.xc-eq b { color: var(--text); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pv {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  background: var(--card-2); box-shadow: var(--inner-hl); font-variant-numeric: tabular-nums;
}
.pv .ico { grid-row: span 2; font-size: 26px; }
.pv b { font-size: 20px; font-weight: 700; line-height: 1.2; }
.pv span:last-child { font-size: 12px; color: var(--muted); }
.pv.down .ico { color: var(--green); }
.pv.up .ico { color: var(--orange-ink); }
.pv.flat .ico { color: var(--grey-ink); }

.tension {
  margin-top: 18px; padding: 16px 20px; border-radius: var(--r-card);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-left: 4px solid var(--amber);
  background: var(--amber-tint); color: var(--text); font-size: 14px; line-height: 23px;
  box-shadow: 0 0 16px var(--amber-glow);
}

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 72px; gap: 12px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.bar-row .bl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bar-row .bv { text-align: right; font-weight: 700; color: var(--text); }
.bar-track { position: relative; height: 14px; background: var(--card-2); border-radius: 9999px; overflow: hidden; }
.bar-zero { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line-strong); z-index: 2; }
.bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 9999px; transition: width .6s cubic-bezier(0.16, 1, 0.3, 1), left .6s cubic-bezier(0.16, 1, 0.3, 1); }

.explain-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.explain-list li {
  position: relative; padding: 10px 14px 10px 34px; border-radius: var(--r); background: var(--card-2);
  border: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--text-2);
}
.explain-list li::before { content: "?"; position: absolute; left: 12px; top: 10px; font-weight: 700; color: var(--amber-ink); }

.conclude { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cc {
  border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--r-card);
  padding: 16px 20px; min-width: 0; background: var(--card-2);
}
.cc.cannot { border-top-color: var(--red); }
.cc-k { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--green-ink); }
.cc.cannot .cc-k { color: var(--red-ink); }
.cc ul { margin: 10px 0 0; padding-left: 18px; }
.cc li { font-size: 14px; line-height: 22px; color: var(--text); margin: 6px 0; }

.ceiling-row { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 20px; }
.ceiling-txt { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-2); }
.ceiling-txt b { color: var(--text); }

.st { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.st-pass { background: var(--green-tint); color: var(--green-ink); border: 1px solid var(--green); }
.st-warn { background: var(--amber-tint); color: var(--amber-ink); border: 1px solid var(--amber); }
.st-fail { background: var(--red-tint); color: var(--red-ink); border: 1px solid var(--red); }
.st-info { background: var(--grey-tint); color: var(--grey-ink); border: 1px solid var(--grey); }
.st-none { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }

.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.level {
  padding: 8px 6px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); background: var(--card-2);
  transition: var(--t);
}
.level:last-child { border-right: 0; }
.level.on {
  background: var(--text); color: var(--card);
}
:root[data-theme="dark"] .level.on {
  background: var(--green); color: #020c09;
  box-shadow: 0 0 14px var(--green-glow);
}

.audit { margin-top: 16px; }
.audit-group { margin-top: 14px; }
.audit-gh { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.audit-gh .c { font-weight: 400; color: var(--muted); font-size: 12px; }
.audit-list { margin: 8px 0 0; padding-left: 38px; }
.audit-list li { font-size: 13px; line-height: 21px; color: var(--text-2); margin: 6px 0; }
.audit-list b { color: var(--text); }

/* Evidence Chain Trace Block */
.trace {
  background: var(--card); border-radius: var(--r-panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-panel); padding: 18px 26px;
  transition: var(--t);
}
.trace > summary {
  cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 12px;
}
.trace > summary::-webkit-details-marker { display: none; }
.trace > summary::after {
  content: "";
  margin-left: auto;
  width: 8px; height: 8px;
  border-right: 2px solid var(--green-ink);
  border-bottom: 2px solid var(--green-ink);
  transform: rotate(-45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.trace[open] > summary { margin-bottom: 16px; }
.trace[open] > summary::after { transform: rotate(45deg); }
.trace > summary .ico { color: var(--green); font-size: 18px; }

.chain { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.cnode {
  position: relative; flex: 1 0 78px; min-width: 78px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0 4px; color: var(--text);
}
.cnode::before { content: ""; position: absolute; top: 21px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.cnode:first-child::before { display: none; }
.cnode.s-ok::before, .cnode.s-conflict::before { background: var(--green); }
.cnode .cdot {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 18px;
  background: var(--card); border: 2px solid var(--line-strong); color: var(--muted); transition: var(--t);
}
.cnode.s-ok .cdot { border-color: var(--green); color: var(--green-ink); }
.cnode.s-conflict .cdot { border-color: var(--orange); color: var(--orange-ink); }
.cnode.s-insufficient .cdot { border-color: var(--red); color: var(--red-ink); }
.cnode.s-unavailable .cdot, .cnode.s-unresolved .cdot { border-style: dashed; }
.cnode .cst {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--card);
}
.cnode .clab { font-size: 11.5px; line-height: 15px; text-align: center; color: var(--text-2); max-width: 100px; font-weight: 500; }
.cnode:hover .cdot { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); border-color: var(--green); }
.cnode[aria-expanded="true"] .cdot {
  background: var(--green); color: #020c09; border-color: var(--green);
  box-shadow: 0 0 18px var(--green-glow);
}
.cnode[aria-expanded="true"] .clab { color: var(--text); font-weight: 700; }

.chain-detail {
  margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px; background: var(--card-2);
}
.chain-detail h4 { font-size: 16px; margin: 0 0 6px; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 18px; margin: 14px 0 0; font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.kv ul { padding-left: 16px; }

/* Metadata Terminal Styling */
pre.raw {
  margin: 10px 0 0; max-height: 280px; overflow: auto;
  font-family: var(--mono); font-size: 12px; line-height: 18px;
  background: #040810; color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 16px;
  border-radius: var(--r); white-space: pre-wrap; overflow-wrap: anywhere;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
pre.raw:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

/* -------------------------------------------------------------- charts */

.chart-host { position: relative; width: 100%; min-height: 60px; }
.chart-host svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-host text { font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.legend .li { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { flex: none; }
.sw-bar { display: inline-block; width: 14px; height: 8px; border-radius: 2px; }
.chart-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.region-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.chart-host text { font-variant-numeric: tabular-nums; }
.zone-lab { letter-spacing: 0.02em; }
/* radar ping around the observed value (static halo when motion is reduced) */
.bead-ping {
  opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: beadPing 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.bead-ping.d2 { animation-delay: 1.2s; }
@keyframes beadPing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}
.region-key.narrow-only { display: none; }
.region-key .sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .08); }

/* Glassmorphic Tooltip */
.tip {
  position: fixed; pointer-events: none; z-index: 80;
  background: rgba(14, 22, 38, 0.92);
  color: var(--text); border-radius: var(--r);
  border: 1px solid var(--line-strong);
  padding: 8px 12px; font-size: 12px; line-height: 17px;
  box-shadow: var(--shadow-pop); opacity: 0; transition: opacity .12s; max-width: 280px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tip.on { opacity: 1; }
.tip-k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.tip-v { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.table thead th { border-top: 0; border-bottom: 1px solid var(--line-strong); font-weight: 700; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--card-2); }
.table .num-c { text-align: right; }
.table-condensed th, .table-condensed td { padding: 9px 12px; }
.row-btn { background: none; border: 0; padding: 6px 0; min-height: 32px; font-weight: 600; color: var(--text); text-align: left; transition: var(--t); }
.row-btn:hover { color: var(--green-ink); }
tr.sel td { background: var(--green-tint-2); }
.table-disclosure { margin-top: var(--gap); }
.table-disclosure > summary { font-size: 15px; font-weight: 700; color: var(--text); }

/* ------------------------------------------------------------------ map */

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.map-frame {
  position: relative; border-radius: var(--r-panel); overflow: hidden;
  background: #090e18; border: 1px solid var(--line); touch-action: pan-y;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
}
:root[data-theme="light"] .map-frame { background: #eaf1f4; }
.map-svg { display: block; width: 100%; height: auto; cursor: grab; user-select: none; }
.map-svg.drag { cursor: grabbing; }
.map-country { fill: #152238; stroke: #223452; stroke-width: .6; vector-effect: non-scaling-stroke; transition: fill .2s ease; }
:root[data-theme="light"] .map-country { fill: #ffffff; stroke: #c9d3da; stroke-width: .5; }
:root[data-theme="dark"] .map-country { fill: #1c2a3a; stroke: rgba(255,255,255,0.14); }
.map-grat { fill: none; stroke: rgba(255, 255, 255, 0.04); stroke-width: .5; vector-effect: non-scaling-stroke; }
:root[data-theme="light"] .map-grat { stroke: #d7e2e8; }

.site { cursor: pointer; outline: none; }
.site .halo { fill: var(--green); opacity: .2; transition: opacity .3s, r .3s; }
.site .core { fill: var(--green); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.site .ring { fill: none; stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0;
  transform-box: fill-box; transform-origin: center; }
.site .nd { fill: var(--card); stroke: var(--muted); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; }
#mapSites .slab { font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; font-size: 11px; }
:root[data-theme="dark"] #mapSites .slab { fill: #ffffff; stroke: rgba(2, 6, 12, 0.82); }

.site:hover .halo, .site:focus-visible .halo { opacity: .45; }
.site:focus-visible .ring { opacity: 1; stroke: var(--focus); }
.site.sel .core { fill: var(--green-ink); }
.site.sel .ring { opacity: 1; animation: ringPulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
@keyframes ringPulse {
  0% { stroke-opacity: 1; transform: scale(1); }
  100% { stroke-opacity: 0; transform: scale(1.6); }
}

.map-ctrl { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; }
.map-ctrl button {
  width: 38px; height: 38px; border-radius: var(--r); border: 1px solid var(--line);
  background: rgba(14, 22, 38, 0.85); color: var(--text);
  font-size: 18px; line-height: 1; box-shadow: var(--shadow-btn); transition: var(--t);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.map-ctrl button:hover { color: var(--green); border-color: var(--green); box-shadow: 0 0 10px var(--green-glow); }

.map-legend-f { margin-top: 12px; font-size: 12px; color: var(--text-2); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
:root[data-theme="dark"] .map-legend-f { color: rgba(255,255,255,0.8); }
.map-legend-f .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.year-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.year-badge { font-size: 26px; font-weight: 800; color: var(--text); min-width: 68px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
:root[data-theme="dark"] .year-badge { color: #ffffff; }
.year-row input[type="range"] { flex: 1 1 200px; accent-color: var(--green); min-width: 0; min-height: 28px; cursor: pointer; }

.field-panel .fp-name { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
:root[data-theme="dark"] .field-panel .fp-name { color: #ffffff; }
.field-panel .fp-sub { font-size: 14px; color: var(--text-2); margin: 3px 0 0; }
:root[data-theme="dark"] .field-panel .fp-sub { color: rgba(255,255,255,0.8); }
.fp-nums { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; font-variant-numeric: tabular-nums; }
.fp-nums div { border-top: 2px solid var(--c-observed); padding-top: 8px; }
.fp-nums .k { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
:root[data-theme="dark"] .fp-nums .k { color: rgba(255,255,255,0.72); }
.fp-nums .v { display: block; font-size: 22px; font-weight: 800; color: var(--c-observed); }
.fp-nums .s { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
:root[data-theme="dark"] .fp-nums .s { color: rgba(255,255,255,0.72); }

.avail { list-style: none; margin: 10px 0 0; padding: 0; }
.avail li {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 0;
  border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--text-2);
}
:root[data-theme="dark"] .avail li { color: rgba(255,255,255,0.8); }
.avail li b { display: block; color: var(--text); font-size: 14px; }
:root[data-theme="dark"] .avail li b { color: #ffffff; }

/* Field shortlist in the sidebar: each row is a card; the whole card picks the field */
.field-list { display: grid; gap: 8px; margin-top: 14px; }
.field-list li {
  position: relative; display: block; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--card-2); box-shadow: var(--inner-hl);
  transition: var(--t);
}
.field-list li > span:first-child { display: none; }
.field-list li:hover, .field-list li:focus-within {
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--card-elevated);
}
.field-list .row-btn { display: block; min-height: 0; padding: 0; font-size: 14px; }
.field-list .row-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.field-list .row-btn:focus-visible { outline: none; }
.field-list li:focus-within { box-shadow: var(--inner-hl), 0 0 0 2px var(--focus); }
.field-list .muted { display: block; font-size: 12px; margin-top: 2px; }
.spark { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------- demo mode */

.chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.chapter {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--tone);
  border-radius: var(--r-panel); box-shadow: var(--shadow-panel); transition: var(--t);
}
.chapter:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-elevated);
}
.chapter[aria-pressed="true"] {
  background: var(--tone-tint); border-color: var(--tone-line, var(--tone)); border-top-color: var(--tone);
  box-shadow: 0 0 20px var(--tone-glow, transparent);
}
.ch-n { font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.ch-t { font-size: 16px; font-weight: 700; color: var(--text); line-height: 22px; }
.ch-o { font-size: 13px; color: var(--tone-ink); font-weight: 700; }

.demo-run { display: flex; flex-direction: column; gap: 24px; }
.demo-run:empty { display: none; }
.lookfor {
  margin-top: 18px; padding: 14px 18px; border-radius: var(--r);
  background: var(--card-2); border: 1px solid var(--line);
  font-size: 14px; line-height: 22px; color: var(--text-2);
}
.lookfor b { color: var(--text); }
.lookfor .muted { display: block; font-size: 12px; margin-top: 4px; }
.demo-split { margin-top: 18px; }
.demo-split .section-label { margin: 0; }
.demo-split .claim-tabs { margin-top: 10px; }
.demo-next { display: flex; gap: 14px; flex-wrap: wrap; }

/* Demo Stepper */
.stepper {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; position: relative;
}
.step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 4px; min-width: 0; }
.step::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step .sd {
  position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--card); border: 2px solid var(--line-strong); color: var(--muted); transition: var(--t);
}
.step .sn { font-size: 13px; font-weight: 700; color: var(--text); }
.step .so { font-size: 12px; color: var(--muted); line-height: 16px; overflow-wrap: anywhere; min-height: 32px; }
.step.running .sd {
  border-color: var(--green); color: var(--green);
  animation: pulseRadar 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes pulseRadar {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.step.done .sd {
  background: var(--green); border-color: var(--green); color: #020c09;
  box-shadow: 0 0 12px var(--green-glow);
}
.step.done::before { background: var(--green); }
.step.na .sd { border-style: dashed; }
.step.done .so, .step.na .so { animation: fadeUp .3s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
.step.done .sd { animation: popIn .3s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes popIn { from { transform: scale(.8); opacity: .4; } to { transform: none; opacity: 1; } }
.timing { font-size: 12px; color: var(--muted); margin: 14px 0 0; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- research */

.research-note {
  margin-bottom: 24px; padding: 16px 20px; border-radius: var(--r-card);
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--amber-ink); font-size: 14px; line-height: 23px;
}
.exp-head { margin-bottom: 20px; }
.exp-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
.big-figure { font-size: 44px; font-weight: 800; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.big-figure small { font-size: 16px; font-weight: 500; color: var(--muted); }
.exp-sub { margin: 12px 0 0; font-size: 14.5px; line-height: 23px; color: var(--text-2); }
.shows { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.shows .k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.shows .k.ok { color: var(--green-ink); }
.shows .k.no { color: var(--red-ink); }
.shows p { margin: 4px 0 12px; font-size: 13.5px; line-height: 21px; color: var(--text-2); }
.exp-fig { margin: 0; min-width: 0; }
.exp-fig figcaption { margin-top: 14px; font-size: 12.5px; line-height: 19px; color: var(--muted); }

.cmp { display: flex; flex-direction: column; gap: 14px; }
.cmp-row .cl { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 5px; gap: 10px; font-variant-numeric: tabular-nums; }
.cmp-row .cl b { color: var(--text); }
.cmp-track { height: 12px; background: var(--card-2); border-radius: 9999px; overflow: hidden; }
.cmp-track.thin { height: 8px; margin-top: 4px; }
.cmp-fill { height: 100%; border-radius: 9999px; width: 0; transition: width .8s cubic-bezier(0.16, 1, 0.3, 1); }

.methods { margin-top: 16px; }
.cm td { text-align: center; }
.dve { display: flex; flex-direction: column; gap: 12px; }
.dve-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: center; }
.dve-l { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.dve-bar { display: flex; height: 32px; border-radius: var(--r); overflow: hidden; background: var(--card-2); }
.seg { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; min-width: 0; font-variant-numeric: tabular-nums; }
.seg.v { background: var(--green-deep); }
.seg.a { background: var(--amber); color: #1a1204; }

.measured-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--green-ink); margin-bottom: 6px;
}
.measured-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* ------------------------------------------------------ method & data */

.subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.subnav a {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 9999px;
  font-size: 13px; font-weight: 500; color: var(--text); background: var(--card);
  transition: var(--t);
}
.subnav a:hover {
  border-color: var(--green); background: var(--green-tint-2); text-decoration: none;
}

.pipeline-h { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.pipeline-h .ph { border-top: 3px solid var(--green); padding-top: 12px; min-width: 0; }
.pipeline-h .ph b { display: block; font-size: 14px; font-weight: 700; }
.pipeline-h .ph span { display: block; font-size: 12.5px; color: var(--text-2); line-height: 18px; margin-top: 5px; }

.dcard {
  background: var(--card-2);
  border: 1px solid var(--line); border-top: 4px solid var(--tone);
  border-radius: var(--r-panel); padding: 18px 20px; min-width: 0; transition: var(--t);
}
.dcard:hover {
  border-color: var(--line-strong); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.decl { padding: 12px 0; border-top: 1px solid var(--line); }
.decl b { font-size: 14px; }
.decl p { margin: 5px 0 0; font-size: 13px; line-height: 21px; color: var(--text-2); }
.limits { margin: 14px 0 0; padding-left: 20px; }
.limits li { font-size: 14px; line-height: 23px; color: var(--text-2); margin: 10px 0; }
.limits b { color: var(--text); }
[id^="m-"] { scroll-margin-top: 80px; }

/* ------------------------------------------------------------ surfaces */

/* Glass containers */
.panel, .report-bar, .trace, .chapter, .state, .story-step, .banner-v {
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}
.story-step:hover, .chapter:hover { box-shadow: var(--glass-shadow), 0 0 0 1px var(--line-strong); }
.chapter[aria-pressed="true"] { background: var(--tone-tint); box-shadow: var(--glass-shadow), 0 0 22px -6px var(--tone-glow); }

/* Inner elevated elements: faint fill with a crisp top highlight */
.xcard, .cc, .case-btn, .ctab, .lookfor, .chain-detail, .dcard, .explain-list li, .nk-int-st, .dropzone {
  box-shadow: var(--inner-hl);
}
.nk-int-st:focus-within { box-shadow: var(--inner-hl), 0 0 0 3px var(--green-tint); }

/* Scrollbars */
html { scrollbar-color: rgba(148, 163, 184, 0.3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22); border-radius: 9999px;
  border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.4); background-clip: padding-box; }
/* ------------------------------------------------ 3D & reactive styling */

.hero-3d-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -1;
  opacity: 0.85;
}

.globe-canvas {
  display: block; width: 100%; height: 520px;
  min-height: 380px; max-height: 640px;
  background: radial-gradient(circle at 50% 50%, #0c1524 0%, #060b14 100%);
  cursor: grab; border-radius: var(--r-panel);
  touch-action: none;
}
.globe-canvas:active { cursor: grabbing; }

/* Cybernetic HUD Corner Accents */
.panel-head, .banner-v, .map-frame {
  position: relative;
}
.panel-head::after {
  content: ""; position: absolute; top: 0; right: 0; width: 10px; height: 10px;
  border-top: 2px solid rgba(56, 189, 248, 0.4);
  border-right: 2px solid rgba(56, 189, 248, 0.4);
  pointer-events: none;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1199px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .pipeline-h { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .exp-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ws { grid-template-columns: 290px minmax(0, 1fr); }
  .chain { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); row-gap: 18px; overflow: visible; }
  .cnode { min-width: 0; }
  .cnode::before { display: none; }
}

@media (max-width: 991px) {
  :root { --gap: 20px; }
  .container { padding: 24px 18px 48px; }
  .ws { grid-template-columns: minmax(0, 1fr); }
  .ws-input { position: static; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .topbar-in { padding: 12px 18px; gap: 12px; }
  .menu-item { padding: 14px 16px; font-size: 13.5px; }
  .globe-canvas { height: 440px; min-height: 320px; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; }
  .step:nth-child(5)::before { display: none; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .kv dd { margin-bottom: 10px; }
  .state dl, .state.compact dl { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .state dd { margin-bottom: 8px; }
  .flow { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 24px; }
  .flow .lbl { font-size: 10px; letter-spacing: .4px; }
  .flow::before, .flow::after { display: none; }
  .flow .sub { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ceiling-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #dataChip { display: none; }
}

@media (max-width: 700px) {
  .region-key.narrow-only { display: flex; }
  .chapters, .xgrid, .conclude { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .page-head h1 { font-size: 24px; }
  .page-head p { font-size: 14px; line-height: 22px; }
  .panel { padding: 18px 16px; }
  .banner-v { padding: 20px 18px 20px 21px; }
  .bv-sym { width: 46px; height: 46px; font-size: 22px; }
  .bv-label { font-size: 20px; letter-spacing: 0.04em; padding: 5px 11px 4px; }
  .bv-why { font-size: 17px; line-height: 26px; margin: 14px 0 18px; }
  .facts { gap: 14px; }
  .fact-c .v { font-size: 20px; }
  .globe-canvas { height: 380px; min-height: 300px; }
  .menu { padding: 0 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu-item { padding: 12px 12px; font-size: 13px; gap: 6px; }
  .year-row { gap: 10px; }
  .year-row input[type="range"] { flex: 1 1 100%; order: 3; }
  .year-badge { order: 1; font-size: 22px; }
  #mapPlay { order: 2; margin-left: auto; }
  .story-step { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 16px; }
  .story-step::before, .story-step::after { display: none; }
  .ss-n { width: 32px; height: 32px; font-size: 13px; }
  .ss-q { font-size: 19px; margin: 8px 0 12px; }
  .quote { font-size: 18px; line-height: 28px; padding-left: 14px; }
  .ss-lead { font-size: 15px; line-height: 24px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 58px; gap: 8px; }
  .pipeline-h { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { white-space: normal; text-align: center; }
  .landing-top { padding: 18px 20px; }
  .landing-logo { width: 84px; height: 84px; }
  .cta-row .btn { width: 100%; max-width: 320px; }
  .brand-sub { display: none; }
  .state { grid-template-columns: minmax(0, 1fr); }
  .state-ico { display: none; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .step .so { display: none; }
  .step .sn { font-size: 11px; }
  .dve-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .table thead th { white-space: normal; }
  .table-condensed th, .table-condensed td { padding: 8px 8px; }
  .big-figure { font-size: 34px; }
  .trace { padding: 16px 18px; }
  .kbd-hint { display: none; }
  .ctab { flex-basis: 200px; }
  .map-ctrl button { width: 40px; height: 40px; }
  .fp-nums .v { font-size: 18px; }
  .chain { display: flex; flex-direction: column; overflow: visible; padding: 0; }
  .cnode { flex: none; min-width: 0; flex-direction: row; align-items: center; gap: 14px; padding: 6px 0; }
  .cnode::before { display: block; top: -50%; bottom: 50%; left: 22px; right: auto; width: 2px; height: auto; }
  .cnode:first-child::before { display: none; }
  .cnode .clab { text-align: left; max-width: none; font-size: 13.5px; line-height: 18px; }
  .cnode:hover .cdot { transform: none; }
}

@media (max-width: 540px) {
  .flow {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
    max-width: 360px;
  }
  .flow li {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .flow .dot { margin: 0; flex-shrink: 0; }
  .flow .lbl { font-size: 11px; }
  .flow .sub { display: inline-block; font-size: 11px; margin-left: auto; color: #94a3b8; }
  #detChip { display: none; }
  .rates { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .flow::after { display: none; }
  .pip { animation: none !important; }
}


/* ==================================== Ambient Space & Satellite Canvas */
.ambient-space-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.topbar, .main, .footer, .landing {
  position: relative;
  z-index: 1;
}

/* ============================================ Professional SVG Icons */
.svg-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.menu-item .svg-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: var(--t);
  margin-right: 2px;
}

.menu-item:hover .svg-icon,
.menu-item[aria-current="page"] .svg-icon {
  color: var(--green);
  filter: drop-shadow(0 0 6px var(--green-glow));
}

.st-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: -3px;
  margin-right: 6px;
}
.st-icon svg {
  width: 13px;
  height: 13px;
}
.st-icon.st-pass { background: rgba(16, 185, 129, 0.16); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.45); }
.st-icon.st-warn { background: rgba(245, 158, 11, 0.16); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.45); }
.st-icon.st-fail { background: rgba(239, 68, 68, 0.16); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.45); }
.st-icon.st-info { background: rgba(6, 182, 212, 0.16); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.45); }
.st-icon.st-none { background: rgba(100, 116, 139, 0.16); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.35); }

/* Vector SVG Icons Sizing & Precision Alignment */
.bv-sym svg { width: 30px; height: 30px; stroke-width: 2.4; }
.state-ico svg { width: 24px; height: 24px; stroke-width: 2.2; }
.ctab-ico svg, .ctab-v svg, .xc-ico svg, .flag-ico svg, .flag svg, .op-ico svg { width: 14px; height: 14px; vertical-align: -2px; }
.cc-ico svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.step-check svg { width: 16px; height: 16px; stroke-width: 3; vertical-align: middle; }
.icon-btn-dark svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }

/* Bold High-Impact Typography */
h1, h2, h3, h4, .panel-title, .page-head h1, .brand-name {
  font-weight: 800;
  letter-spacing: -0.025em;
}
.landing-sub {
  font-size: 18.5px;
  font-weight: 500;
  line-height: 1.55;
  color: #cbd5e1;
  max-width: 720px;
}
.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}


/* ======================== Elevated Decision Guide Card & Outcome Strip */
.outcome-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 16px;
}

.outcome-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.outcome-pill.touched {
  opacity: 1;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.outcome-pill.touched.zone-meets {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}

.outcome-pill.touched.zone-less {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: #f59e0b;
}

.outcome-pill.touched.zone-flat {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.45);
  color: #94a3b8;
}

.outcome-pill.touched.zone-rose {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ef4444;
}

.decision-guide-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  margin-top: 18px;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
  background: var(--card-2);
  box-shadow: var(--inner-hl);
}

.decision-guide-card.is-abstain {
  border-left: 4px solid var(--amber);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, var(--card-2) 100%);
}

.decision-guide-card.is-decisive {
  border-left: 4px solid var(--green);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, var(--card-2) 100%);
}

.decision-guide-card.is-borderline {
  border-left: 4px solid var(--cyan);
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.08) 0%, var(--card-2) 100%);
}

.dgc-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.dgc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}
.decision-guide-card.is-decisive .dgc-dot { background: var(--green); }
.decision-guide-card.is-borderline .dgc-dot { background: var(--cyan); }

.dgc-text {
  font-size: 13.5px;
  line-height: 21px;
  color: var(--text-2);
}
.dgc-text b { color: var(--text); }

.dgc-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.dgc-stat-box {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dgc-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  font-family: var(--mono);
}

.dgc-sub {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dgc-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .decision-guide-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .dgc-badge-wrap {
    align-items: flex-start;
  }
}
