/* ==========================================================================
   A.R.C.U.S. — console styles
   Aesthetic: a defence-intelligence watch floor. Ink-dark surfaces, hairline
   rules, mono for every measured value, prose only where judgement is written.
   Colour is rationed: the reserved status palette carries threat tier, three
   validated categorical hues carry consequence family, everything else is ink.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* Surfaces */
  --ink:        #04070d;
  --surface-0:  #060a12;
  --surface-1:  #090e18;
  --surface-2:  #0d141f;
  --surface-3:  #131c2a;
  --hairline:   rgba(122, 165, 206, 0.14);
  --hairline-2: rgba(122, 165, 206, 0.26);

  /* Ink */
  --text-primary:   #dfe9f5;
  --text-secondary: #93a7bd;
  --text-muted:     #5e7288;
  --text-faint:     #3d4c5e;

  /* Accent */
  --accent:      #45c8f5;
  --accent-dim:  rgba(69, 200, 245, 0.16);

  /* Reserved status palette — threat tier only, never a series */
  --critical: #d03b3b;
  --serious:  #ec835a;
  --warning:  #fab219;
  --good:     #0ca30c;

  /* Categorical: consequence family (validated all-pairs, dark) */
  --fam-strategic: #3987e5;
  --fam-economic:  #d95926;
  --fam-human:     #199e70;

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;

  --rail-l: 332px;
  --rail-r: 396px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Atmosphere: a faint engineering grid and a vignette over everything. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(122, 165, 206, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 165, 206, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 100%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  background: radial-gradient(ellipse 100% 85% at 50% 50%, transparent 45%, rgba(2, 4, 8, 0.72) 100%);
}

::selection { background: rgba(69, 200, 245, 0.28); }

/* Scrollbars — present but recessive. */
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(122, 165, 206, 0.18); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(122, 165, 206, 0.34); }

/* ------------------------------------------------------------------ shell */

.shell {
  position: relative; z-index: 1;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--rail-l) minmax(0, 1fr) var(--rail-r);
  grid-template-rows: 58px minmax(0, 1fr) 34px;
  grid-template-areas:
    'head head head'
    'left main right'
    'tick tick tick';
}

/* ----------------------------------------------------------------- header */

.head {
  grid-area: head;
  display: flex; align-items: center; gap: 22px;
  padding: 0 18px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-0));
}

.brand { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; }

.brand__mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.30em;
  color: var(--text-primary);
  text-shadow: 0 0 22px rgba(69, 200, 245, 0.4);
}
.brand__mark b { color: var(--accent); font-weight: 700; }

.brand__expand {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.head__sep { width: 1px; height: 26px; background: var(--hairline); flex-shrink: 0; }

.head__stats { display: flex; gap: 20px; flex: 1; min-width: 0; overflow: hidden; }

.stat { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.stat__k {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.16em;
  color: var(--text-faint); text-transform: uppercase;
}
.stat__v {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--text-secondary); letter-spacing: 0.02em; white-space: nowrap;
}
.stat__v em { font-style: normal; color: var(--accent); }

.clock {
  font-family: var(--mono); font-size: 20px; font-weight: 500;
  letter-spacing: 0.06em; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 7px;
}
.clock span { font-size: 9px; color: var(--text-muted); letter-spacing: 0.16em; }

.pulse {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-secondary);
}
.pulse i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 9px var(--good);
  animation: beat 2.4s ease-in-out infinite;
}
.pulse.is-warn i { background: var(--warning); box-shadow: 0 0 9px var(--warning); }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: 0.28; } }

/* ------------------------------------------------------------------ rails */

.rail {
  display: flex; flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, var(--surface-0), var(--ink));
}
.rail--l { grid-area: left; border-right: 1px solid var(--hairline); }
.rail--r { grid-area: right; border-left: 1px solid var(--hairline); }

.panel { display: flex; flex-direction: column; min-height: 0; }
.panel + .panel { border-top: 1px solid var(--hairline); }
.panel--grow { flex: 1; }

.panel__head {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px 9px;
  flex-shrink: 0;
}
.panel__title {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--text-secondary);
}
.panel__rule { flex: 1; height: 1px; background: var(--hairline); }
.panel__count {
  font-family: var(--mono); font-size: 9.5px; color: var(--text-faint);
  letter-spacing: 0.1em;
}
.panel__body { overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }

/* --------------------------------------------------------- instability hero */

.hero { padding: 4px 16px 16px; flex-shrink: 0; }

.hero__row { display: flex; align-items: flex-end; gap: 14px; }

.hero__num {
  font-family: var(--display); font-weight: 700;
  font-size: 62px; line-height: 0.84;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.hero__meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; }
.hero__scale {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  color: var(--text-faint);
}
.hero__trend {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; display: inline-flex; align-items: center; gap: 5px;
}

/* Index meter — single-hue magnitude track with tier thresholds marked. */
.meter {
  position: relative; height: 6px; border-radius: 3px;
  background: var(--surface-3); margin-top: 14px; overflow: hidden;
}
.meter__fill {
  position: absolute; inset: 0 auto 0 0;
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter__ticks { position: absolute; inset: 0; }
.meter__ticks i {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--ink); opacity: 0.85;
}

.hero__headline {
  margin-top: 13px;
  font-family: var(--display); font-size: 14.5px; font-weight: 600;
  line-height: 1.3; letter-spacing: -0.01em; color: var(--text-primary);
}
.hero__assess {
  margin-top: 7px; font-size: 12px; line-height: 1.58; color: var(--text-secondary);
}

/* Drivers — one series, one hue, direct-labelled. */
.drivers { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.driver { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; cursor: default; }
.driver__label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.driver__val {
  font-family: var(--mono); font-size: 10px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.driver__track {
  grid-column: 1 / -1; height: 4px; border-radius: 2px;
  background: var(--surface-3); overflow: hidden;
}
.driver__bar {
  height: 100%; border-radius: 2px; background: var(--fam-strategic);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.driver__note {
  grid-column: 1 / -1; font-size: 11px; color: var(--text-muted); line-height: 1.35;
}

.delta { font-size: 9px; letter-spacing: 0; }
.delta--up { color: var(--serious); }
.delta--down { color: var(--good); }
.delta--flat { color: var(--text-faint); }

/* ------------------------------------------------------------- theater list */

.theaters { display: flex; flex-direction: column; }

.theater {
  position: relative;
  display: block; width: 100%; text-align: left;
  padding: 11px 16px 11px 18px;
  background: none; border: 0; border-bottom: 1px solid rgba(122, 165, 206, 0.07);
  color: inherit; cursor: pointer; font: inherit;
  transition: background 0.18s ease;
}
.theater::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--tier); opacity: 0.55; transition: opacity 0.18s ease, width 0.18s ease;
}
.theater:hover { background: rgba(69, 200, 245, 0.045); }
.theater:hover::before { opacity: 1; }
.theater.is-active { background: rgba(69, 200, 245, 0.085); }
.theater.is-active::before { opacity: 1; width: 3px; }
.theater:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

.theater__top { display: flex; align-items: baseline; gap: 8px; }
.theater__name {
  font-family: var(--display); font-size: 13.5px; font-weight: 600;
  letter-spacing: -0.005em; color: var(--text-primary); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.theater__sev {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--tier); font-variant-numeric: tabular-nums;
}
.theater__sub {
  display: flex; align-items: center; gap: 7px; margin-top: 3px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
}
.theater__sub .dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.theater__tier { color: var(--tier); font-weight: 500; }
.theater__status {
  margin-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.theater__track {
  height: 3px; border-radius: 2px; background: var(--surface-3);
  margin-top: 8px; overflow: hidden;
}
.theater__bar { height: 100%; border-radius: 2px; background: var(--tier); }

/* -------------------------------------------------------------------- main */

.main { grid-area: main; position: relative; min-width: 0; overflow: hidden; }

#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#globe.is-grabbing { cursor: grabbing; }

.hud { position: absolute; inset: 0; pointer-events: none; }

.hud__corner {
  position: absolute; width: 26px; height: 26px;
  border: 1px solid var(--hairline-2);
}
.hud__corner--tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hud__corner--tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.hud__corner--bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.hud__corner--br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

.hud__block {
  position: absolute;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-faint); line-height: 1.9;
}
.hud__block--tl { top: 22px; left: 52px; }
.hud__block--tr { top: 22px; right: 52px; text-align: right; }
.hud__block--bl { bottom: 22px; left: 52px; }
.hud__block b { color: var(--text-secondary); font-weight: 500; }
.hud__block em { color: var(--accent); font-style: normal; }

.legend {
  position: absolute; bottom: 22px; right: 52px;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.legend__row {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-muted);
}
.legend__row i {
  width: 7px; height: 7px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* Floating theater labels pinned to the globe */
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; transform: translate(14px, -50%);
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--text-secondary);
  padding: 3px 8px 3px 7px;
  background: rgba(6, 10, 18, 0.78);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--tier);
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}
/* Near the right-hand limb the label flips to the other side of its marker. */
.pin--left {
  transform: translate(calc(-100% - 14px), -50%);
  border-left: 1px solid var(--hairline);
  border-right: 2px solid var(--tier);
}
.pin b { color: var(--tier); font-weight: 600; font-variant-numeric: tabular-nums; }
.pin.is-active { color: var(--text-primary); background: rgba(9, 16, 28, 0.92); }

/* Selected-theater dossier over the globe */
.dossier {
  position: absolute; left: 22px; bottom: 62px; width: 350px; max-width: calc(100% - 44px);
  background: linear-gradient(180deg, rgba(10, 16, 27, 0.94), rgba(6, 10, 18, 0.94));
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--tier);
  backdrop-filter: blur(14px);
  padding: 13px 15px 14px;
  pointer-events: auto;
  opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease;
}
.dossier.is-open { opacity: 1; transform: none; }
.dossier__kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint);
}
.dossier__kicker b { color: var(--tier); font-weight: 500; }
.dossier__name {
  font-family: var(--display); font-size: 19px; font-weight: 700;
  letter-spacing: -0.02em; margin-top: 5px; line-height: 1.15;
}
.dossier__coords {
  font-family: var(--mono); font-size: 9.5px; color: var(--text-muted);
  letter-spacing: 0.08em; margin-top: 4px;
}
.dossier__text { font-size: 12px; line-height: 1.6; color: var(--text-secondary); margin-top: 9px; }
.dossier__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid var(--hairline);
}
.dossier__cell .k {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-faint); display: block;
}
.dossier__cell .v {
  font-family: var(--mono); font-size: 11px; color: var(--text-primary); margin-top: 2px;
  display: block;
}
.dossier__actors {
  margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px;
}
.chip {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 3px 7px;
  border: 1px solid var(--hairline); color: var(--text-secondary);
  background: rgba(122, 165, 206, 0.05);
}
.dossier__close {
  position: absolute; top: 9px; right: 10px;
  background: none; border: 0; color: var(--text-faint); cursor: pointer;
  font-family: var(--mono); font-size: 13px; line-height: 1; padding: 3px;
}
.dossier__close:hover { color: var(--text-primary); }

/* --------------------------------------------------------- causal analysis */

.causal { padding: 2px 16px 18px; }

.causal__empty {
  padding: 26px 4px; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint); line-height: 2;
}

.causal__theater {
  font-family: var(--display); font-size: 13px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 2px;
}
.causal__trigger {
  position: relative; padding: 9px 11px; margin-bottom: 2px;
  background: var(--surface-1); border: 1px solid var(--hairline);
  font-size: 12px; line-height: 1.45; color: var(--text-primary);
}
.causal__tag {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint);
  display: block; margin-bottom: 4px;
}

/* The spine: a vertical rule the step nodes hang off. */
.steps { position: relative; padding-left: 21px; margin: 0; list-style: none; }
.steps::before {
  content: ''; position: absolute; left: 6px; top: 2px; bottom: 14px; width: 1px;
  background: linear-gradient(180deg, var(--hairline-2), var(--hairline), transparent);
}
.step { position: relative; padding: 11px 0 4px; }
.step::before {
  content: ''; position: absolute; left: -19px; top: 17px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fam); box-shadow: 0 0 0 3px var(--surface-0), 0 0 10px var(--fam);
}
.step__meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-faint);
}
.step__domain { color: var(--fam); font-weight: 500; }
.step__horizon {
  padding: 1px 5px; border: 1px solid var(--hairline); color: var(--text-muted);
}
.step__text { font-size: 12px; line-height: 1.55; color: var(--text-secondary); margin-top: 5px; }
.step__conf { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.step__conf .track {
  flex: 1; height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden;
}
.step__conf .bar { height: 100%; border-radius: 2px; background: var(--fam); opacity: 0.75; }
.step__conf .num {
  font-family: var(--mono); font-size: 9px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}

.causal__outcome {
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--hairline-2);
  background: linear-gradient(135deg, rgba(69, 200, 245, 0.07), transparent 70%);
  font-size: 12.5px; line-height: 1.5; color: var(--text-primary);
}

.impacts { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.impact { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; }
.impact__d {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fam);
}
.impact__n { grid-column: 1 / -1; font-size: 11.5px; line-height: 1.4; color: var(--text-secondary); }
.impact__v {
  font-family: var(--mono); font-size: 9px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.impact__track {
  grid-column: 1 / -1; height: 3px; border-radius: 2px;
  background: var(--surface-3); overflow: hidden; margin-top: 1px;
}
.impact__bar { height: 100%; border-radius: 2px; background: var(--fam); }

.couplings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.coupling {
  display: flex; gap: 8px; align-items: baseline; padding: 5px 0;
  font-size: 11.5px; color: var(--text-secondary); line-height: 1.4;
}
.coupling__type {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em;
  color: var(--fam-strategic); flex-shrink: 0; width: 74px;
}

/* ---------------------------------------------------------------- feed */

.feed { display: flex; flex-direction: column; }

.item {
  display: block; padding: 9px 16px; text-decoration: none; color: inherit;
  border-bottom: 1px solid rgba(122, 165, 206, 0.07);
  transition: background 0.16s ease;
}
.item:hover { background: rgba(69, 200, 245, 0.05); }
.item__meta {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--text-faint);
}
.item__src { color: var(--accent); }
.item__hot { color: var(--serious); }
.item__title {
  font-size: 12px; line-height: 1.42; color: var(--text-secondary); margin-top: 4px;
}
.item:hover .item__title { color: var(--text-primary); }

.feed__filter {
  display: flex; gap: 4px; padding: 0 16px 9px; flex-shrink: 0; flex-wrap: wrap;
}
.tab {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.13em;
  text-transform: uppercase; padding: 3px 8px; cursor: pointer;
  background: none; border: 1px solid var(--hairline); color: var(--text-muted);
  transition: all 0.16s ease;
}
.tab:hover { color: var(--text-primary); border-color: var(--hairline-2); }
.tab.is-on { color: var(--ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }

/* -------------------------------------------------------------- ticker */

.ticker {
  grid-area: tick;
  display: flex; align-items: center; gap: 0;
  border-top: 1px solid var(--hairline);
  background: var(--surface-0);
  overflow: hidden;
}
.ticker__tag {
  flex-shrink: 0; padding: 0 14px; height: 100%;
  display: flex; align-items: center; gap: 7px;
  background: var(--surface-2); border-right: 1px solid var(--hairline);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-secondary);
}
.ticker__tag i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--critical);
  box-shadow: 0 0 8px var(--critical); animation: beat 1.6s ease-in-out infinite;
}
.ticker__view { flex: 1; overflow: hidden; position: relative; height: 100%; }
.ticker__rail {
  position: absolute; top: 0; left: 0; height: 100%;
  display: flex; align-items: center; gap: 0;
  white-space: nowrap; will-change: transform;
}
.ticker__item {
  display: inline-flex; align-items: center; gap: 9px; padding: 0 20px;
  font-size: 11.5px; color: var(--text-secondary); text-decoration: none;
}
.ticker__item:hover { color: var(--text-primary); }
.ticker__item span {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
}
.ticker__item::after {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: var(--hairline-2); margin-left: 11px;
}

/* -------------------------------------------------------------- boot */

.boot {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__mark {
  font-family: var(--display); font-weight: 700; font-size: 32px;
  letter-spacing: 0.42em; text-indent: 0.42em;
  color: var(--text-primary); text-shadow: 0 0 40px rgba(69, 200, 245, 0.5);
}
.boot__sub {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--text-muted); margin-top: -12px;
}
.boot__log {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-faint); width: 380px; max-width: 84vw;
  display: flex; flex-direction: column; gap: 4px;
}
.boot__line { display: flex; justify-content: space-between; opacity: 0; animation: bootline 0.4s ease forwards; }
.boot__line b { color: var(--good); font-weight: 500; }
.boot__line.is-wait b { color: var(--warning); }
@keyframes bootline { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.boot__bar { width: 380px; max-width: 84vw; height: 2px; background: var(--surface-3); overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ------------------------------------------------------------ utilities */

.reveal { opacity: 0; transform: translateY(8px); animation: reveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; } }

.skel {
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
  background-size: 300% 100%;
  animation: skel 1.5s linear infinite;
  border-radius: 2px;
}
@keyframes skel { to { background-position: -300% 0; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tooltip {
  position: fixed; z-index: 950; pointer-events: none;
  background: rgba(9, 14, 24, 0.96); border: 1px solid var(--hairline-2);
  padding: 7px 10px; max-width: 260px;
  font-size: 11.5px; line-height: 1.4; color: var(--text-primary);
  opacity: 0; transform: translateY(4px); transition: opacity 0.14s ease, transform 0.14s ease;
  backdrop-filter: blur(8px);
}
.tooltip.is-on { opacity: 1; transform: none; }
.tooltip b {
  display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint); font-weight: 500; margin-bottom: 3px;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1400px) {
  :root { --rail-l: 296px; --rail-r: 348px; }
  .head__stats .stat:nth-child(n+5) { display: none; }
}

@media (max-width: 1120px) {
  body { overflow: auto; }
  .shell {
    height: auto; min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: 58px 62vh auto auto 34px;
    grid-template-areas: 'head' 'main' 'left' 'right' 'tick';
  }
  .rail--l, .rail--r { border: 0; border-top: 1px solid var(--hairline); }
  .panel__body { overflow: visible; }
  .rail { max-height: none; }
  /* Keep posture and theater count — the two stats that carry the headline. */
  .head__stats .stat:nth-child(n+2) { display: none; }
  .head__stats .stat:nth-child(4) { display: flex; }
  /* The dossier is the payoff for a click; it stays, spanning the globe pane. */
  .dossier { left: 12px; right: 12px; bottom: 12px; width: auto; max-height: 46vh; overflow-y: auto; }
  .ticker { position: sticky; bottom: 0; }
}

@media (max-width: 640px) {
  .brand__expand { display: none; }
  .hud__block--tr, .legend { display: none; }
  .head__stats { display: none; }
  .hero__num { font-size: 52px; }
  .shell { grid-template-rows: 58px 52vh auto auto 34px; }
  /* On a phone the dossier is a bottom sheet: the globe stays visible above it
     and the panel scrolls on its own rather than eating the whole pane. */
  .dossier {
    position: fixed; left: 0; right: 0; bottom: 34px; width: auto; max-width: none;
    max-height: 56vh; overflow-y: auto; z-index: 40;
    border-left: 0; border-right: 0; border-top: 2px solid var(--tier);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
