:root {
  color-scheme: dark;
  --ink: #07110f;
  --ink-soft: #0b1714;
  --ink-raised: #10201c;
  --ink-line: rgba(139, 180, 166, 0.22);
  --ink-line-strong: rgba(139, 180, 166, 0.42);
  --paper: #e7f1eb;
  --muted: #8aa098;
  --muted-dark: #50665f;
  --mint: #7cf7bd;
  --mint-soft: rgba(124, 247, 189, 0.15);
  --amber: #ffb55f;
  --amber-soft: rgba(255, 181, 95, 0.16);
  --red: #ff6e58;
  --red-soft: rgba(255, 110, 88, 0.14);
  --blue: #67b7ff;
  --mono: "IBM Plex Mono", monospace;
  --display: "Archivo Narrow", sans-serif;
  --page-pad: clamp(18px, 2.6vw, 42px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 6%, rgba(53, 128, 96, 0.12), transparent 28rem),
    linear-gradient(180deg, #08120f 0%, var(--ink) 65%);
  color: var(--paper);
  font-family: var(--mono);
}

button,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 247, 189, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 247, 189, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  z-index: -2;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 4px);
  opacity: 0.65;
  z-index: 20;
}

.app-shell {
  width: min(1720px, 100%);
  margin: 0 auto;
  border-inline: 1px solid var(--ink-line);
}

.topbar {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  border-bottom: 1px solid var(--ink-line-strong);
  background: rgba(7, 17, 15, 0.9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 15;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px var(--page-pad);
  min-width: 280px;
  color: var(--paper);
  text-decoration: none;
  border-right: 1px solid var(--ink-line);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--mint);
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--mint);
}

.brand-mark::before {
  width: 1px;
  height: 48px;
}

.brand-mark::after {
  width: 48px;
  height: 1px;
}

.brand-mark span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
}

.brand-mark span:nth-child(1) { transform: translate(-9px, -9px); }
.brand-mark span:nth-child(2) { transform: translate(9px, 9px); }
.brand-mark span:nth-child(3) { width: 8px; height: 8px; box-shadow: 0 0 14px var(--mint); }

.brand-copy {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 18px;
  line-height: 0.82;
  letter-spacing: 0.07em;
}

.brand-copy small,
.eyebrow {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.topbar-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.status-light {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px var(--amber);
}

.status-light.connected {
  background: var(--mint);
  box-shadow: 0 0 14px var(--mint);
}

.topbar-actions {
  display: flex;
  align-items: stretch;
}

.clock-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 0 20px;
  border-left: 1px solid var(--ink-line);
  font-size: 10px;
  color: var(--paper);
}

.clock-block span:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.ghost-button,
.live-button {
  min-width: 112px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid var(--ink-line);
  background: transparent;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: var(--mint-soft);
  color: var(--mint);
}

.live-button {
  min-width: 94px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 500;
}

.live-button[aria-pressed="true"] {
  background: var(--amber-soft);
  color: var(--amber);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.6s ease-out infinite;
}

.live-button[aria-pressed="true"] .pulse-dot {
  animation: none;
}

main {
  padding-inline: var(--page-pad);
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.8fr) auto;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  padding: clamp(48px, 7vw, 104px) 0 clamp(32px, 4vw, 56px);
  border-bottom: 1px solid var(--ink-line-strong);
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(64px, 7.7vw, 126px);
  font-weight: 500;
  line-height: 0.76;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.intro-copy {
  max-width: 520px;
  margin-bottom: 0;
  color: #b5c6c0;
  font-family: var(--display);
  font-size: clamp(20px, 1.7vw, 29px);
  line-height: 1.12;
}

.source-stamp {
  align-self: end;
  min-width: 218px;
  padding: 13px 15px;
  border: 1px solid var(--amber);
  position: relative;
  background: var(--amber-soft);
  transform: rotate(-1deg);
}

.source-stamp::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-top: 1px solid var(--amber);
  border-left: 1px solid var(--amber);
}

.source-stamp span,
.source-stamp strong,
.source-stamp small {
  display: block;
}

.source-stamp span,
.source-stamp small {
  color: var(--amber);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.source-stamp strong {
  margin: 5px 0;
  color: #ffd099;
  font-size: 12px;
}

.control-deck {
  display: flex;
  align-items: stretch;
  min-height: 58px;
  border-bottom: 1px solid var(--ink-line-strong);
}

.evidence-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--ink-line-strong);
  background: linear-gradient(90deg, rgba(124, 247, 189, 0.035), transparent 55%);
}

.evidence-deck article {
  min-height: 108px;
  padding: 16px 18px;
  border-right: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.evidence-deck article:last-child { border-right: 0; }
.evidence-deck .estimate-gate { background: var(--amber-soft); }

.evidence-deck span,
.evidence-deck small {
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.evidence-deck strong {
  margin: 7px 0 5px;
  color: var(--mint);
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 0.9;
}

.evidence-deck .estimate-gate strong { color: var(--amber); }

.scale-meter {
  height: 7px;
  margin: 8px 0 7px;
  background: var(--ink-line);
  position: relative;
}

.scale-meter > i {
  display: block;
  width: var(--meter, 0%);
  height: 100%;
  background: var(--mint);
  transition: width 500ms ease;
}

.scale-meter.is-low > i {
  background: var(--amber);
}

.hour-tile.is-low strong {
  color: var(--amber);
}

.meter-tick {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--paper);
  opacity: 0.7;
}

.tick-floor { left: var(--floor-at, 36%); }
.tick-pace { left: var(--pace-at, 100%); transform: translateX(-1px); }

.scale-readout {
  margin: 0;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--ink-line-strong);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.hero-meter {
  position: relative;
  z-index: 1;
  max-width: 220px;
  margin-top: 14px;
}

.hero-metric > small {
  display: block;
  margin-top: 6px;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.segmented-control {
  display: flex;
  margin-right: auto;
}

.segmented-control button {
  min-width: 112px;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--ink-line);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.segmented-control button:first-child {
  border-left: 1px solid var(--ink-line);
}

.segmented-control button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
}

.field-control {
  min-width: 216px;
  padding: 8px 15px;
  border-left: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.field-control.compact {
  min-width: 170px;
}

.field-control span,
.deck-status span {
  margin-bottom: 3px;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.field-control select {
  width: 100%;
  padding: 0 18px 0 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font-size: 10px;
  appearance: auto;
}

.deck-status {
  min-width: 150px;
  padding: 8px 16px;
  border-left: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

.deck-status strong {
  color: var(--mint);
  font-size: 11px;
  font-weight: 500;
}

.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  min-height: 680px;
  border-bottom: 1px solid var(--ink-line-strong);
}

.map-panel {
  min-width: 0;
  border-right: 1px solid var(--ink-line-strong);
}

.section-heading {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-line);
}

.section-heading span,
.rail-heading span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.map-legend,
.stream-key {
  display: flex;
  gap: 17px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.map-legend span,
.stream-key span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: inherit;
}

.map-legend i,
.stream-key i {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
}

.legend-low { background: var(--muted-dark); }
.legend-high { background: var(--mint); box-shadow: 0 0 10px var(--mint); }

.map-stage {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background:
    radial-gradient(circle at 53% 46%, rgba(36, 93, 73, 0.18), transparent 44%),
    var(--ink);
}

#worldMap {
  width: 100%;
  height: 100%;
  min-height: 540px;
  display: block;
  cursor: crosshair;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 0.11em;
  background: var(--ink);
  transition: opacity 300ms ease, visibility 300ms ease;
}

.map-loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.map-loading.error {
  color: var(--red);
}

.country {
  fill: #0d211c;
  stroke: rgba(127, 173, 156, 0.25);
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
  transition: fill 350ms ease, opacity 350ms ease;
}

.country.active-country {
  fill: #14332a;
}

.graticule {
  fill: none;
  stroke: rgba(116, 166, 149, 0.11);
  stroke-width: 0.5;
  stroke-dasharray: 2 5;
}

.sphere {
  fill: transparent;
  stroke: rgba(116, 166, 149, 0.2);
  stroke-width: 0.7;
}

.hotspot-halo {
  fill: none;
  stroke: var(--mint);
  stroke-width: 1;
  opacity: 0.22;
  pointer-events: none;
}

.hotspot-halo.is-live {
  animation: mapPing 1.3s ease-out;
  transform-box: fill-box;
  transform-origin: center;
}

.hotspot-dot {
  fill: var(--mint);
  stroke: var(--ink);
  stroke-width: 1.2;
  cursor: pointer;
  transition: r 300ms ease, fill 300ms ease;
  filter: drop-shadow(0 0 5px rgba(124, 247, 189, 0.72));
}

.hotspot-dot.failure-mode {
  fill: var(--red);
  filter: drop-shadow(0 0 5px rgba(255, 110, 88, 0.7));
}

.hotspot-dot.runtime-mode {
  fill: var(--amber);
  filter: drop-shadow(0 0 5px rgba(255, 181, 95, 0.7));
}

.hotspot-hit {
  fill: transparent;
  cursor: pointer;
}

.hotspot-label {
  fill: var(--paper);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--ink);
  stroke-width: 3px;
  transition: opacity 180ms ease;
}

.hotspot-group:hover .hotspot-label,
.hotspot-group.selected .hotspot-label,
.hotspot-group:focus-within .hotspot-label {
  opacity: 1;
}

.hotspot-group.selected .hotspot-dot {
  stroke: var(--paper);
  stroke-width: 2;
}

.coordinate-readout {
  position: absolute;
  top: 14px;
  left: 16px;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.07em;
  pointer-events: none;
}

.map-scale {
  position: absolute;
  right: 15px;
  bottom: 17px;
  width: 70px;
  height: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--muted-dark);
}

.map-scale span {
  border-left: 1px solid var(--muted-dark);
}

.map-scale span:last-child {
  border-right: 1px solid var(--muted-dark);
}

.selected-region {
  position: absolute;
  left: 16px;
  bottom: 17px;
  width: min(390px, calc(100% - 108px));
  padding: 14px;
  border-left: 2px solid var(--mint);
  background: rgba(6, 16, 13, 0.88);
  backdrop-filter: blur(10px);
}

.selected-region-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.selected-region > strong {
  display: block;
  margin: 9px 0 14px;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 500;
  text-transform: uppercase;
}

.selected-region-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.selected-region-metrics span {
  padding-right: 9px;
  border-right: 1px solid var(--ink-line);
}

.selected-region-metrics span:not(:first-child) {
  padding-left: 9px;
}

.selected-region-metrics span:last-child {
  border: 0;
}

.selected-region-metrics small,
.selected-region-metrics b {
  display: block;
}

.selected-region-metrics small {
  color: var(--muted-dark);
  font-size: 7px;
}

.selected-region-metrics b {
  margin-top: 4px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
}

.map-footer,
.panel-note {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 12px 18px;
  border-top: 1px solid var(--ink-line);
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-rail {
  display: flex;
  flex-direction: column;
}

.hero-metric {
  position: relative;
  min-height: 196px;
  padding: 24px 24px 58px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink-line);
}

.hero-metric > span,
.metric-pair span,
.coverage-panel span {
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.hero-metric > strong {
  display: block;
  margin: 17px 0 9px;
  font-family: var(--display);
  font-size: clamp(46px, 4vw, 66px);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.03em;
}

.hero-metric > div {
  font-size: 8px;
  color: var(--muted);
}

.hero-metric > div b {
  color: var(--mint);
  font-weight: 500;
}

#activeSparkline {
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 72%;
  height: 57px;
  opacity: 0.55;
}

.metric-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--ink-line);
}

.metric-pair article {
  padding: 20px;
}

.metric-pair article:first-child {
  border-right: 1px solid var(--ink-line);
}

.metric-pair strong,
.metric-pair small {
  display: block;
}

.metric-pair strong {
  margin: 10px 0 5px;
  font-family: var(--display);
  font-size: 33px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.metric-pair small {
  color: var(--muted);
  font-size: 8px;
}

.rank-panel {
  flex: 1;
  padding: 20px;
  border-bottom: 1px solid var(--ink-line);
}

.rail-heading {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--paper);
}

.rank-panel ol {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.rank-panel li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--ink-line);
  font-size: 9px;
  cursor: pointer;
}

.rank-panel li.empty-state {
  display: block;
  padding: 22px 0;
  color: var(--muted-dark);
  cursor: default;
  line-height: 1.55;
}

.rank-panel li:hover b,
.rank-panel li.selected b {
  color: var(--mint);
}

.rank-panel li > span:first-child {
  color: var(--muted-dark);
}

.rank-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rank-name b {
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name i {
  width: 100%;
  height: 2px;
  margin-top: 5px;
  background: var(--ink-line);
  position: relative;
}

.rank-name i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rank-width);
  background: var(--mint);
}

.rank-value {
  font-size: 9px;
  font-style: normal;
  color: var(--muted);
}

.coverage-panel {
  padding: 18px 20px 20px;
  background: linear-gradient(135deg, rgba(255, 181, 95, 0.06), transparent);
}

.coverage-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coverage-panel strong {
  color: var(--amber);
  font-size: 12px;
}

.coverage-panel p {
  margin: 12px 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.2;
}

.coverage-panel button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--amber);
  font-size: 8px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.coverage-panel button span {
  margin-left: 6px;
  color: inherit;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  border-bottom: 1px solid var(--ink-line-strong);
}

.analysis-panel {
  min-width: 0;
  border-right: 1px solid var(--ink-line-strong);
}

.analysis-panel:last-child {
  border-right: 0;
}

.heading-number {
  font-family: var(--display);
  font-size: 31px;
  font-weight: 500;
}

.heading-number.danger {
  color: var(--red);
}

.chart-wrap {
  position: relative;
  padding: 18px 16px 6px;
}

#activityChart {
  width: 100%;
  height: 232px;
  display: block;
}

.chart-axis text {
  fill: var(--muted-dark);
  font-family: var(--mono);
  font-size: 8px;
}

.chart-axis line,
.chart-axis path {
  stroke: var(--ink-line);
}

.chart-grid line {
  stroke: var(--ink-line);
  stroke-dasharray: 2 4;
}

.hour-bar {
  fill: var(--mint);
}

.hour-bar.is-low { fill: var(--amber); }
.hour-bar.is-now { fill-opacity: 0.55; stroke: var(--paper); stroke-width: 0.6; }

.ref-floor {
  stroke: var(--amber);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  pointer-events: none;
}

.ref-pace {
  stroke: var(--mint);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  pointer-events: none;
  opacity: 0.7;
}

.ref-label {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.ref-label.floor { fill: var(--amber); }
.ref-label.pace { fill: var(--mint); }

.peak-label {
  fill: var(--paper);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.axis-caption {
  fill: var(--muted-dark);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.chart-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-key i {
  width: 10px;
  height: 2px;
  display: inline-block;
}

.key-floor { background: var(--amber); }
.key-pace { background: var(--mint); }

.chart-guide {
  stroke: var(--paper);
  stroke-width: 0.6;
  stroke-dasharray: 2 3;
  pointer-events: none;
}

.chart-dot {
  fill: var(--ink);
  stroke: var(--mint);
  stroke-width: 2;
  pointer-events: none;
}

.chart-tooltip {
  position: absolute;
  display: none;
  padding: 8px 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 9px;
  pointer-events: none;
  z-index: 2;
}

.panel-note button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: inherit;
  cursor: pointer;
}

.failure-list,
.funnel-list {
  min-height: 256px;
  padding: 18px 18px 12px;
}

.funnel-list.is-learned {
  position: relative;
}

.funnel-stage {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 46px 40px 42px;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.funnel-stage > span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.funnel-track {
  height: 10px;
  background: var(--ink-line);
  position: relative;
}

.funnel-track i {
  display: block;
  width: var(--funnel-width);
  height: 100%;
  background: var(--mint);
  transition: width 400ms ease;
}

.funnel-stage.is-tail .funnel-track i { background: var(--amber); }

.funnel-stage b {
  text-align: right;
  color: var(--paper);
  font-size: 11px;
  font-weight: 400;
}

.funnel-stage small,
.funnel-stage em {
  color: var(--muted-dark);
  font-size: 8px;
  font-style: normal;
  text-align: right;
}

.failure-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) 1.25fr 38px;
  gap: 10px;
  align-items: center;
  margin-bottom: 19px;
}

.failure-row > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failure-bar {
  height: 5px;
  background: var(--ink-line);
  position: relative;
}

.failure-bar i {
  display: block;
  width: var(--failure-width);
  height: 100%;
  background: var(--mint);
  transition: width 400ms ease;
}

.failure-row b {
  text-align: right;
  color: var(--paper);
  font-size: 9px;
  font-weight: 400;
}

.lifespan-copy {
  display: flex;
  justify-content: space-between;
  padding: 19px 18px 0;
  color: var(--muted-dark);
  font-size: 8px;
}

.lifespan-copy b {
  color: var(--muted);
  font-weight: 400;
}

.lifespan-chart-wrap {
  padding-top: 2px;
}

#lifespanChart {
  width: 100%;
  height: 210px;
  display: block;
}

.survival-line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
}

.survival-area {
  fill: url(#survivalGradient);
}

.lifespan-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 58px;
  border-top: 1px solid var(--ink-line);
}

.lifespan-milestones span {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--ink-line);
}

.lifespan-milestones span:last-child { border: 0; }
.lifespan-milestones b { font-family: var(--display); font-size: 18px; font-weight: 500; }
.lifespan-milestones small { color: var(--muted-dark); font-size: 7px; }

.operation-strip {
  border-bottom: 1px solid var(--ink-line-strong);
  background: linear-gradient(90deg, rgba(124, 247, 189, 0.03), transparent 62%);
}

.operation-strip .section-heading {
  padding-inline: 0;
}

.operation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink-line);
}

.operation-grid li {
  min-height: 168px;
  padding: 18px 18px 20px;
  border-right: 1px solid var(--ink-line);
}

.operation-grid li:last-child { border-right: 0; }

.operation-grid b {
  display: block;
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.operation-grid h3 {
  margin: 10px 0 8px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.operation-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.geo-list {
  display: grid;
  gap: 0;
}

.geo-list article {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid var(--ink-line);
}

.geo-list article:last-child { border-bottom: 0; }

.geo-list b {
  color: var(--mint);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.geo-list article.is-walker b { color: var(--amber); }

.geo-list span {
  color: var(--muted);
  font-size: 10px;
}

.geo-bars {
  position: relative;
  height: 10px;
}

.geo-bars::before,
.geo-bars::after {
  content: "";
  position: absolute;
  left: 0;
  height: 3px;
}

.geo-bars::before {
  top: 0;
  width: var(--nick);
  background: var(--mint);
}

.geo-bars::after {
  bottom: 0;
  width: var(--int);
  background: var(--amber);
}

.geo-list i {
  font-style: normal;
  font-size: 9px;
  color: var(--paper);
  text-align: right;
}

.findings-section {
  border-bottom: 1px solid var(--ink-line-strong);
}

.findings-section .section-heading {
  padding-inline: 0;
}

.findings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink-line);
}

.findings-grid article {
  min-height: 168px;
  padding: 18px 18px 22px;
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
}

.findings-grid article:nth-child(3n) { border-right: 0; }
.findings-grid article:nth-last-child(-n + 3) { border-bottom: 0; }

.findings-grid h3 {
  margin: 0 0 10px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
}

.findings-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.contract-section {
  border-bottom: 1px solid var(--ink-line-strong);
}

.keep-split {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
}

.keep-split > article {
  padding: 22px 18px 26px;
}

.keep-split > article:first-child {
  border-right: 1px solid var(--ink-line-strong);
}

.keep-split > article > span {
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.keep-split h2 {
  margin: 8px 0 16px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
}

.keep-list {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) 1fr;
  gap: 10px 16px;
  margin: 0;
}

.keep-list dt {
  color: var(--mint);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.keep-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.reject-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}

.reject-list li {
  color: var(--muted);
  font-size: 11px;
}

.reject-list li::before {
  content: "× ";
  color: var(--red);
}

.ecosystem-section {
  border-bottom: 1px solid var(--ink-line-strong);
  background: linear-gradient(135deg, rgba(124, 247, 189, 0.025), transparent 48%);
}

.ecosystem-heading {
  padding-inline: 0;
}

.ecosystem-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.ecosystem-state span { color: var(--mint); }
.ecosystem-state strong { color: var(--muted); font-weight: 400; }

.ecosystem-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1.45fr;
  border-block: 1px solid var(--ink-line);
}

.ecosystem-metrics article {
  min-height: 94px;
  padding: 16px 18px;
  border-right: 1px solid var(--ink-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ecosystem-metrics article:last-child { border-right: 0; }
.ecosystem-metrics span,
.ecosystem-metrics small { color: var(--muted-dark); font-size: 8px; letter-spacing: 0.07em; }
.ecosystem-metrics strong { margin: 7px 0 4px; color: var(--mint); font-family: var(--display); font-size: 24px; font-weight: 500; }
.ecosystem-metrics article:last-child strong { color: var(--amber); font-size: 19px; }

.ecosystem-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.market-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border-right: 1px solid var(--ink-line-strong);
}

.market-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  table-layout: fixed;
}

.market-table th,
.market-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-line);
  text-align: left;
  font-size: 9px;
  font-weight: 400;
}

.market-table tr:last-child td { border-bottom: 0; }
.market-table th { color: var(--muted-dark); font-size: 8px; letter-spacing: 0.06em; }
.market-table td { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.market-table td:nth-child(1) { color: var(--mint); }
.market-table td:nth-child(2) { color: var(--paper); }
.market-table td:nth-child(3) { color: var(--amber); }
.market-table th:nth-child(1) { width: 20%; }
.market-table th:nth-child(2) { width: 43%; }
.market-table th:nth-child(3) { width: 19%; }
.market-table th:nth-child(4) { width: 18%; }

.feed-registry { padding: 18px 20px; }
.feed-registry > div:first-child > span { color: var(--muted-dark); font-size: 8px; letter-spacing: 0.07em; }
.feed-registry h3 { margin: 4px 0 17px; font-family: var(--display); font-size: 22px; font-weight: 500; }
.feed-list p { color: var(--muted-dark); font-size: 9px; }
.feed-list article { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--ink-line); }
.feed-list article div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed-list strong { color: var(--paper); font-size: 9px; font-weight: 400; }
.feed-list small { overflow: hidden; color: var(--muted-dark); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.feed-list b { flex: 0 0 auto; font-size: 7px; font-weight: 400; letter-spacing: 0.04em; }
.feed-list .feed-ok { color: var(--mint); }
.feed-list .feed-gated { color: var(--amber); }

.stream-section {
  border-bottom: 1px solid var(--ink-line-strong);
}

.stream-heading {
  padding-inline: 0;
}

.key-ok { background: var(--mint); }
.key-warn { background: var(--amber); }
.key-fail { background: var(--red); }

.event-table-wrap {
  overflow-x: auto;
}

.event-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
}

.event-table th,
.event-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--ink-line);
  text-align: left;
  font-size: 9px;
  font-weight: 400;
}

.event-table th {
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.event-table th:first-child,
.event-table td:first-child {
  padding-left: 0;
}

.event-table th:last-child,
.event-table td:last-child {
  padding-right: 0;
}

.event-table th:nth-child(1) { width: 11%; }
.event-table th:nth-child(2) { width: 15%; }
.event-table th:nth-child(3) { width: 21%; }
.event-table th:nth-child(4) { width: 13%; }
.event-table th:nth-child(5) { width: 18%; }
.event-table th:nth-child(6) { width: 10%; }
.event-table th:nth-child(7) { width: 12%; }

.event-table td {
  color: var(--muted);
}

.event-table tr.new-event {
  animation: rowArrival 850ms ease both;
}

.trace-id,
.event-node {
  color: var(--paper) !important;
}

.outcome {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--paper);
}

.outcome::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.outcome.ok { color: var(--mint); }
.outcome.warn { color: var(--amber); }
.outcome.fail { color: var(--red); }

.thesis-strip {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 36px;
  align-items: center;
  padding: 44px 0;
}

.thesis-strip > span {
  color: var(--mint);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.thesis-strip p {
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(23px, 2.3vw, 38px);
  line-height: 1.02;
}

.thesis-strip a {
  color: var(--paper);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 7px;
}

.thesis-strip a span { color: var(--mint); }

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 18px var(--page-pad);
  border-top: 1px solid var(--ink-line-strong);
  color: var(--muted-dark);
  font-size: 8px;
  letter-spacing: 0.07em;
}

dialog {
  width: min(860px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  padding: 0;
  border: 1px solid var(--ink-line-strong);
  background: #0a1714;
  color: var(--paper);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.62);
}

dialog::backdrop {
  background: rgba(2, 8, 6, 0.82);
  backdrop-filter: blur(8px);
}

dialog form {
  position: relative;
  padding: clamp(28px, 5vw, 62px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

dialog h2 {
  max-width: 700px;
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.dialog-lede {
  max-width: 680px;
  color: #b6c7c0;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.2;
}

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 34px;
  border-top: 1px solid var(--ink-line-strong);
  border-left: 1px solid var(--ink-line-strong);
}

.method-grid article {
  min-height: 195px;
  padding: 20px;
  border-right: 1px solid var(--ink-line-strong);
  border-bottom: 1px solid var(--ink-line-strong);
}

.method-grid article > b {
  color: var(--mint);
  font-size: 10px;
  font-weight: 400;
}

.method-grid h3,
.privacy-contract h3 {
  margin: 23px 0 8px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  text-transform: uppercase;
}

.method-grid p,
.privacy-contract p,
.contract-note {
  color: var(--muted);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.2;
}

.method-grid article > span {
  display: block;
  margin-top: 16px;
  color: var(--amber);
  font-size: 8px;
}

.privacy-contract {
  margin-top: 26px;
  padding-left: 20px;
  border-left: 2px solid var(--amber);
}

.privacy-contract h3 {
  margin-top: 0;
}

.privacy-contract p {
  margin: 7px 0 0;
}

.dialog-action {
  margin-top: 36px;
  padding: 15px 20px;
  border: 0;
  background: var(--mint);
  color: var(--ink);
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

dialog pre {
  overflow-x: auto;
  padding: 22px;
  border: 1px solid var(--ink-line);
  background: var(--ink);
  color: var(--mint);
  font-size: 12px;
  line-height: 1.65;
}

.contract-note code {
  color: var(--paper);
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes mapPing {
  0% { transform: scale(0.4); opacity: 0.85; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes rowArrival {
  from { background: var(--mint-soft); transform: translateY(-7px); opacity: 0; }
  to { background: transparent; transform: translateY(0); opacity: 1; }
}

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

@media (max-width: 1180px) {
  .intro-strip {
    grid-template-columns: 1.1fr 0.8fr;
  }

  .source-stamp {
    grid-column: 2;
    width: 235px;
  }

  .analysis-grid {
    grid-template-columns: 1.2fr 1fr;
  }

  .operation-grid,
  .findings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .operation-grid li:nth-child(2n) { border-right: 0; }
  .operation-grid li:nth-child(-n + 2) { border-bottom: 1px solid var(--ink-line); }
  .findings-grid article:nth-child(3n) { border-right: 1px solid var(--ink-line); }
  .findings-grid article:nth-child(2n) { border-right: 0; }
  .findings-grid article:nth-last-child(-n + 3) { border-bottom: 1px solid var(--ink-line); }
  .findings-grid article:nth-last-child(-n + 2) { border-bottom: 0; }

  .lifespan-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--ink-line-strong);
    border-right: 0;
  }

  .lifespan-panel .section-heading,
  .lifespan-copy,
  .lifespan-chart-wrap,
  .lifespan-milestones {
    max-width: 760px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .brand { min-width: 0; }
  .topbar-center { display: none; }
  .clock-block, .ghost-button { display: none; }
  .control-link { display: inline-flex; }

  .intro-strip {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-copy { max-width: 650px; }
  .source-stamp { grid-column: auto; }

  .control-deck {
    flex-wrap: wrap;
  }

  .segmented-control {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid var(--ink-line);
  }

  .segmented-control button { flex: 1; min-height: 52px; }
  .field-control { flex: 1; border-bottom: 0; }
  .deck-status { display: none; }

  .evidence-deck { grid-template-columns: 1fr 1fr; }
  .evidence-deck article:nth-child(2) { border-right: 0; }
  .evidence-deck article:nth-child(-n + 2) { border-bottom: 1px solid var(--ink-line); }

  .world-grid {
    grid-template-columns: 1fr;
  }

  .map-panel {
    border-right: 0;
    border-bottom: 1px solid var(--ink-line-strong);
  }

  .metric-rail {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-metric,
  .rank-panel {
    border-right: 1px solid var(--ink-line);
  }

  .coverage-panel {
    border-top: 1px solid var(--ink-line);
  }

  .ecosystem-body { grid-template-columns: 1fr; }
  .market-table-wrap { border-right: 0; border-bottom: 1px solid var(--ink-line-strong); }

  .thesis-strip {
    grid-template-columns: 110px 1fr;
  }

  .thesis-strip a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .app-shell { border-inline: 0; }
  .topbar { min-height: 68px; }
  .brand { padding-block: 12px; border-right: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-copy small { display: none; }
  .live-button { min-width: 76px; padding-inline: 12px; }

  main { padding-inline: 16px; }
  h1 { font-size: clamp(57px, 21vw, 85px); }
  .intro-strip { padding-top: 46px; }
  .source-stamp { width: 100%; }

  .evidence-deck { grid-template-columns: 1fr; }
  .evidence-deck article { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--ink-line); }
  .evidence-deck article:last-child { border-bottom: 0; }

  .field-control { min-width: 50%; border-top: 0; }
  .field-control:first-of-type { border-left: 1px solid var(--ink-line); }

  .map-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .map-stage,
  #worldMap { min-height: 420px; }
  .selected-region { width: calc(100% - 32px); bottom: 14px; }
  .map-scale { display: none; }
  .map-footer span:nth-child(2) { display: none; }

  .metric-rail { grid-template-columns: 1fr; }
  .hero-metric,
  .rank-panel { border-right: 0; }
  .metric-pair { order: 2; }
  .rank-panel { order: 3; }
  .coverage-panel { order: 4; }

  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .funnel-stage {
    grid-template-columns: 72px minmax(0, 1fr) 40px;
  }

  .funnel-stage small,
  .funnel-stage em { display: none; }
  .analysis-panel { border-right: 0; border-bottom: 1px solid var(--ink-line-strong); }
  .analysis-panel:last-child { border-bottom: 0; }
  .lifespan-panel { grid-column: auto; border-top: 0; }

  .operation-grid,
  .findings-grid,
  .keep-split {
    grid-template-columns: 1fr;
  }

  .operation-grid li,
  .findings-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--ink-line);
  }

  .operation-grid li:last-child,
  .findings-grid article:last-child,
  .findings-grid article:nth-last-child(-n + 3),
  .findings-grid article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .keep-split > article:first-child { border-right: 0; border-bottom: 1px solid var(--ink-line-strong); }
  .reject-list { grid-template-columns: 1fr; }

  .ecosystem-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ecosystem-state { align-items: flex-start; }
  .ecosystem-metrics { grid-template-columns: 1fr; }
  .ecosystem-metrics article { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--ink-line); }
  .ecosystem-metrics article:last-child { border-bottom: 0; }

  .section-heading { min-height: 74px; padding-inline: 12px; }
  .stream-heading { padding-inline: 0; align-items: flex-start; flex-direction: column; }

  .thesis-strip {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .thesis-strip a { grid-column: auto; }

  .site-footer {
    padding-inline: 16px;
  }

  .site-footer span:nth-child(2) { display: none; }

  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 450px) {
  .segmented-control button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 9px;
  }

  .map-legend { display: none; }
  .selected-region { padding: 11px; }
  .selected-region > strong { font-size: 20px; }
  .selected-region-metrics small { font-size: 6px; }
  .selected-region-metrics b { font-size: 11px; }
  .map-footer { justify-content: flex-start; }
  .map-footer span:last-child { display: none; }
  .metric-pair strong { font-size: 29px; }
  .heading-number { font-size: 27px; }
  .stream-key { gap: 10px; }
}
