/* ============================================================
   TerraTrend · Earth Change Observatory
   Monochrome mission-control HUD — black / white / grey.
   Colour is reserved for DATA (trend direction), never for chrome.
   ============================================================ */

:root {
  --bg-0: #060708;
  --bg-1: #0c0d10;
  --panel: rgba(12, 14, 17, .96);
  --panel-solid: #0c0e11;
  --field: #13161a;
  --line: #30343c;
  --line-hot: #505663;
  --hi: #ffffff;
  --hi-dim: #c5cbd2;
  --text: #dbe0e6;
  --text-bright: #ffffff;
  --muted: #a6adb5;
  --muted-2: #868e97;
  --good: #00e5ff;

  /* data-only colours */
  --rise: #ff7a33;
  --fall: #4d7cf3;
  --flat: #6a717a;
  --nodata: #353940;

  --font: "SF Mono", "JetBrains Mono", "Cascadia Mono", Consolas,
          ui-monospace, monospace;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; height: 100%; }

body {
  background:
    radial-gradient(1200px 800px at 50% 42%, #121417 0%, transparent 62%),
    var(--bg-0);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- atmosphere ---------- */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .01) 0px,
    rgba(255, 255, 255, .01) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: .35;
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(
    ellipse at center,
    transparent 65%,
    rgba(0, 0, 0, .3) 100%
  );
  opacity: .5;
}

/* ---------- top bar ---------- */
.hud-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 14, 16, .98), rgba(7, 8, 9, .92));
  position: relative;
  z-index: 100;
  flex: none;
}
.brand { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line-hot);
  background: #0d0f12;
}
.brand-text h1 {
  margin: 0; font-family: var(--font); font-size: 1.05rem;
  letter-spacing: .34em; color: var(--text-bright); font-weight: 700;
}
.brand-text p {
  margin: 2px 0 0; font-family: var(--font); font-size: 11.5px;
  letter-spacing: .26em; color: var(--muted); font-weight: 500;
}

.top-readouts { display: flex; gap: 22px; }
.readout { display: flex; flex-direction: column; gap: 3px; }
.readout .rl {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .18em;
  color: var(--muted); font-weight: 600;
}
.readout .rv {
  font-family: var(--font); font-size: .74rem; letter-spacing: .1em;
  color: var(--hi); display: flex; align-items: center; gap: 6px; font-weight: 600;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: blink 1.9s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- main grid ---------- */
.hud-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 306px;
  gap: 12px;
  padding: 12px 16px;
  position: relative;
  z-index: 10;
}

.col { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.col-left, .col-right { overflow-y: auto; overflow-x: hidden; }
.col-left::-webkit-scrollbar,
.col-right::-webkit-scrollbar { width: 5px; }
.col-left::-webkit-scrollbar-thumb,
.col-right::-webkit-scrollbar-thumb {
  background: var(--line-hot); border-radius: 3px;
}
.col-left::-webkit-scrollbar-track,
.col-right::-webkit-scrollbar-track { background: transparent; }

/* ---------- panels ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 8px 10px 9px;
  backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  border: 1px solid var(--hi); opacity: .5;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 7px;
  padding-bottom: 5px; border-bottom: 1px solid var(--line);
}
.ph-label {
  font-family: var(--font); font-size: .60rem; letter-spacing: .2em;
  color: #dbe0e6; font-weight: 600; text-transform: uppercase;
}
.ph-count {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .1em;
  color: #ffffff; font-weight: 600; padding: 2px 6px;
  border: 1px solid var(--line-hot); background: #16191f;
}
.micro {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .05em;
  color: #a6adb5; margin: 5px 0 0; line-height: 1.5;
}

/* ---------- variables ---------- */
.var-list {
  display: flex; flex-direction: column; gap: 3px;
  max-height: 440px; overflow-y: auto; padding-right: 2px;
}
.var-list::-webkit-scrollbar { width: 4px; }
.var-list::-webkit-scrollbar-thumb { background: var(--line-hot); }
.var-list::-webkit-scrollbar-track { background: transparent; }

/* nothing selected and RUN was pressed: nudge the picker */
.var-list.needs-selection { animation: nudge .42s ease-in-out 2; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.var-group {
  font-family: var(--font); font-size: 11px; letter-spacing: .16em;
  color: #a6adb5; margin: 7px 0 3px; padding-top: 5px;
  border-top: 1px solid var(--line); font-weight: 600;
}
.var-group:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

.var-item {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 8px; cursor: pointer;
  border: 1px solid transparent;
  background: var(--field);
  transition: border-color .13s, background .13s;
  user-select: none;
}
.var-item:hover { background: #181b20; border-color: var(--line-hot); }
.var-item.on {
  border-color: var(--hi);
  background: #1c2027;
}
.var-dot {
  width: 8px; height: 8px; flex: none;
  background: var(--vc, var(--hi));
  opacity: .5; transition: opacity .13s;
}
.var-item.on .var-dot { opacity: 1; }
.var-text {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.var-name {
  font-family: var(--font); font-size: 12.5px; letter-spacing: .02em;
  color: #cdd2d8; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.var-meta {
  font-family: var(--font); font-size: 10.5px; letter-spacing: .06em;
  color: #868e97; white-space: nowrap;
}
.var-item.on .var-name { color: #ffffff; font-weight: 600; }
.var-unit {
  font-family: var(--font); font-size: 11px; color: #9aa2ab;
  letter-spacing: .02em; flex: none; font-weight: 500;
}

/* ---------- inputs ---------- */
.hud-select {
  width: 100%; padding: 8px 10px;
  font-family: var(--font); font-size: .68rem; letter-spacing: .05em;
  color: var(--text-bright); background: var(--field);
  border: 1px solid var(--line); outline: none; cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--hi-dim) 50%),
                    linear-gradient(135deg, var(--hi-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.hud-select:hover { border-color: var(--line-hot); }
.hud-select option { background: var(--field); color: var(--text); }

.year-row { display: flex; align-items: flex-end; gap: 8px; }
.yr { flex: 1; }
.yr span {
  display: block; font-family: var(--font); font-size: 11px;
  letter-spacing: .18em; color: #b4bac2; font-weight: 600; margin-bottom: 5px;
}
.yr input {
  width: 100%; padding: 7px 9px;
  font-family: var(--font); font-size: .76rem; letter-spacing: .08em;
  color: var(--text-bright); background: var(--field);
  border: 1px solid var(--line); outline: none;
}
.yr input:focus { border-color: var(--hi); }
.yr-line {
  width: 12px; height: 1px; background: var(--line-hot);
  margin-bottom: 15px; flex: none;
}

.hud-btn {
  position: relative; width: 100%; margin-top: 8px; padding: 9px;
  font-family: var(--font); font-size: 12.5px; letter-spacing: .22em;
  color: #08090a; font-weight: 700;
  background: linear-gradient(180deg, #f7f8f9, #cfd3d7);
  border: 1px solid #ffffff; cursor: pointer;
  overflow: hidden; transition: filter .15s, transform .08s;
}
.hud-btn:hover { filter: brightness(1.06); }
.hud-btn:active { transform: translateY(1px); }
.hud-btn:disabled { opacity: .4; cursor: progress; filter: saturate(0); }
.btn-glitch {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    90deg, transparent 0 6px, rgba(0, 0, 0, .10) 6px 7px);
}

.hud-status {
  margin-top: 9px; padding: 8px 10px;
  font-family: var(--font); font-size: .55rem; letter-spacing: .06em;
  line-height: 1.6; color: var(--hi-dim);
  border: 1px solid var(--line); background: var(--field);
}
.hud-status.err {
  color: #ff8f8f; border-color: #57201f; background: #160a09;
}
.spin {
  display: inline-block; width: 9px; height: 9px; margin-right: 7px;
  border: 1.5px solid var(--hi); border-top-color: transparent;
  border-radius: 50%; animation: sp .65s linear infinite; vertical-align: -1px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- legend ---------- */
.legend { list-style: none; margin: 0; padding: 0; }
.legend li {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .04em;
  color: #c0c6cc; margin-bottom: 5px;
}
.legend li:last-child { margin-bottom: 0; }
.sw { width: 9px; height: 9px; flex: none; }
.sw.rise { background: var(--rise); }
.sw.fall { background: var(--fall); }
.sw.flat { background: var(--flat); }
.sw.nodata { background: var(--nodata); }
.legend-sep { height: 1px; background: var(--line); margin: 9px 0; }
.legend-var-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.legend-var-name.active { color: var(--text-bright); font-weight: 600; }
.legend-chip {
  font-size: 11px; letter-spacing: .1em; padding: 2px 5px;
  border: 1px solid var(--line-hot); color: #c0c6cc; font-weight: 500;
}
.legend-chip.active {
  background: var(--hi); color: #08090a; border-color: var(--hi); font-weight: 700;
}

/* ---------- globe ---------- */
.col-center { min-width: 0; }
.globe-wrap {
  position: relative; flex: 1; min-height: 0;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, #14191F 0%, #0F1318 78%);
  overflow: hidden;
}
#globe { position: absolute; inset: 0; }
#globe canvas { display: block; }

.globe-overlay { position: absolute; inset: 0; pointer-events: none; }

/* globe renderer switcher: a small HUD dropdown, not a bare toggle */
.globe-mode {
  position: absolute; top: 14px; right: 16px;
  pointer-events: auto; z-index: 20;
}
.globe-mode-trigger {
  display: flex; align-items: center; gap: 7px;
  background: rgba(8, 9, 10, .82); color: var(--hi-dim);
  border: 1px solid var(--line-hot);
  padding: 5px 10px; cursor: pointer;
  font-family: var(--font); font-size: 11px; letter-spacing: .14em;
  transition: color .13s, border-color .13s, background .13s;
}
.globe-mode-trigger:hover,
.globe-mode.open .globe-mode-trigger {
  color: var(--text-bright); border-color: var(--hi);
  background: rgba(14, 16, 18, .95);
}
.gm-label { color: var(--muted-2); }
.gm-value { color: var(--hi); }
.gm-caret { color: var(--muted-2); font-size: 12px; }
.globe-mode.open .gm-caret { transform: rotate(180deg); }

.globe-mode-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 208px; padding: 3px;
  background: rgba(10, 12, 14, .97);
  border: 1px solid var(--line-hot);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
}
.gm-option {
  display: flex; align-items: flex-start; gap: 9px; width: 100%;
  padding: 7px 8px; cursor: pointer; text-align: left;
  background: transparent; border: 0; border-left: 2px solid transparent;
  transition: background .12s, border-color .12s;
}
.gm-option:hover:not(:disabled) { background: #16191c; }
.gm-option.on { border-left-color: var(--hi); background: #14171a; }
.gm-option:disabled { cursor: not-allowed; opacity: .38; }
.gm-mark { color: var(--hi-dim); font-size: .72rem; line-height: 1.3; }
.gm-option.on .gm-mark { color: var(--text-bright); }
.gm-text { display: flex; flex-direction: column; gap: 2px; }
.gm-name {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .12em;
  color: var(--text-bright);
}
.gm-desc {
  font-family: var(--font); font-size: .46rem; letter-spacing: .05em;
  color: var(--muted-2);
}
.corner {
  position: absolute; width: 18px; height: 18px;
  border: 1px solid var(--hi); opacity: .45;
}
.corner.tl { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 9px; right: 9px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 9px; left: 9px; border-right: 0; border-top: 0; }
.corner.br { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }

.globe-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--font); font-size: 11.5px; letter-spacing: .16em;
  color: #d0d5db; font-weight: 500; background: rgba(10, 12, 14, .82);
  padding: 4px 12px; border: 1px solid #30343c; border-radius: 2px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; transition: opacity .3s;
}
.gh-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--hi);
  animation: blink 1.9s ease-in-out infinite;
}
.globe-title { position: absolute; top: 16px; left: 18px; }
.gt-main {
  font-family: var(--font); font-size: .95rem; letter-spacing: .3em;
  color: var(--text-bright); font-weight: 700;
}
.gt-sub {
  font-family: var(--font); font-size: 11px; letter-spacing: .22em;
  color: #b4bac2; font-weight: 500; margin-top: 3px;
}

.coord-bar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 7px 12px; margin-top: 10px;
  border: 1px solid var(--line); background: var(--panel);
  font-family: var(--font); font-size: 11.5px; letter-spacing: .12em;
  color: #b8bdc3;
}
.cb-sep { width: 1px; height: 9px; background: var(--line-hot); }
#region-readout { color: #ffffff; font-weight: 600; }
#coord-readout { color: #dbe0e6; }

/* ---------- right column ---------- */
.threat { display: flex; align-items: center; gap: 12px; }
.threat-dial { position: relative; width: 84px; height: 84px; flex: none; }
.dial { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-bg { fill: none; stroke: #202326; stroke-width: 6; }
.dial-arc {
  fill: none; stroke: var(--hi); stroke-width: 6;
  stroke-linecap: butt;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1), stroke .4s;
}
.threat-val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font); font-size: 1.02rem; font-weight: 700;
  color: var(--text-bright); letter-spacing: .02em;
}
.threat-meta { flex: 1; min-width: 0; }
.tm-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .06em;
  padding: 3px 0; border-bottom: 1px dotted var(--line);
}
.tm-row:last-child { border-bottom: 0; }
.tm-row span { color: #a6adb5; font-weight: 500; }
.tm-row b {
  color: #ffffff; font-weight: 600; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- variable signals ---------- */
.signal-list { display: flex; flex-direction: column; gap: 6px; }
.signal {
  border-left: 2px solid var(--vc);
  background: var(--field);
  padding: 6px 8px;
  cursor: pointer;
  transition: background .13s;
}
.signal:hover { background: #181b20; }
.signal.active { background: #1c2027; }
.sig-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.sig-name {
  font-family: var(--font); font-size: 12.5px; letter-spacing: .06em;
  color: var(--text-bright); font-weight: 600; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.sig-dir {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  padding: 1px 5px; flex: none; font-weight: 600;
}
.sig-dir.rising { color: var(--rise); border: 1px solid #75391a; background: #201108; }
.sig-dir.falling { color: var(--fall); border: 1px solid #254170; background: #0c1424; }
.sig-dir.flat { color: #c0c6cc; border: 1px solid var(--line-hot); background: var(--field); }
.sig-dir.nodata { color: #868e97; border: 1px dashed var(--line); }
.sig-vals {
  display: flex; gap: 12px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .05em;
  color: #b4bac2;
}
.sig-vals b { color: #ffffff; font-weight: 600; }

/* ---------- chart ---------- */
.chart-panel .panel-head { margin-bottom: 8px; }
.seg { display: flex; border: 1px solid var(--line-hot); }
.seg-btn {
  font-family: var(--font); font-size: 11px; letter-spacing: .14em;
  padding: 4px 8px; background: transparent; color: #a6adb5;
  border: none; cursor: pointer; font-weight: 600;
}
.seg-btn.on { background: var(--hi); color: #08090a; font-weight: 700; }
.chart-box { height: 104px; position: relative; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.trend-note {
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--line);
  font-family: var(--font); font-size: 11.5px; line-height: 1.6;
  letter-spacing: .02em; color: #c9cfd5;
}
.trend-note b { color: #ffffff; font-weight: 600; }

/* ---------- cells ---------- */
.cell-summary { display: flex; flex-direction: column; gap: 6px; }
.cell-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .05em;
  color: #c9cfd5;
}
.cell-row .cr-label { width: 52px; font-weight: 500; }
.cell-row .cr-bar {
  flex: 1; height: 5px; background: #16181a; position: relative;
  overflow: hidden;
}
.cell-row .cr-fill { height: 100%; transition: width .6s ease; }
.cell-row .cr-n { color: #ffffff; min-width: 34px; text-align: right; font-weight: 600; }

/* ---------- literature ---------- */
.lit-list { display: flex; flex-direction: column; gap: 4px; }
.lit-item {
  display: block; text-decoration: none; color: inherit;
  padding: 5px 7px; border-left: 2px solid var(--line-hot);
  background: var(--field);
  transition: border-color .13s, background .13s;
}
.lit-item:hover { border-left-color: var(--hi); background: #181b20; }
.lit-item .lt {
  font-family: var(--font-ui);
  font-size: 12.5px; line-height: 1.35; color: #e2e6eb; font-weight: 500;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.lit-item .lm {
  margin-top: 3px; display: flex; gap: 6px; align-items: center;
  font-family: var(--font); font-size: 11px; letter-spacing: .05em;
  color: #a6adb5;
}
.lit-item .yr { color: #dbe0e6; font-weight: 600; }
.lit-item .cit { color: #b4bac2; }
.lit-empty {
  font-family: var(--font); font-size: 11.5px; color: #b0b6bc;
  padding: 8px; border: 1px dashed var(--line-hot); text-align: center;
  line-height: 1.5;
}

/* ---------- footer ---------- */
.hud-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 7px 20px; border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(12, 14, 16, .98), rgba(7, 8, 9, .92));
  font-family: var(--font); font-size: 11.5px; letter-spacing: .14em;
  color: #a6adb5;
  position: relative;
  z-index: 100;
}
.foot-left { display: flex; align-items: center; gap: 9px; }
.fl-sep { color: var(--line-hot); }
#foot-clock { color: var(--hi-dim); }

/* ---------- tooltip ---------- */
.globe-tip {
  position: fixed; z-index: 9500; pointer-events: none;
  padding: 7px 10px; max-width: 210px;
  background: rgba(8, 9, 10, .97);
  border: 1px solid var(--line-hot);
  font-family: var(--font); font-size: .55rem; line-height: 1.6;
  letter-spacing: .04em; color: var(--text);
}
.globe-tip .tt-h {
  color: var(--text-bright); letter-spacing: .12em; margin-bottom: 3px;
  font-size: 11px;
}
.globe-tip .tt-row { display: flex; justify-content: space-between; gap: 10px; }
.globe-tip .tt-row span { color: var(--muted); }

/* ---------- satellite evidence (NASA GIBS) ---------- */
.sat-summary {
  display: flex; flex-direction: column; gap: 9px;
}
.sat-thumb-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sat-thumb-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--field); border: 1px solid var(--line);
  padding: 6px; border-radius: 2px;
}
.st-lbl {
  font-family: var(--font); font-size: 11px; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase;
}
.st-img-wrap {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: #000; overflow: hidden; border: 1px solid var(--line);
  display: grid; place-items: center;
}
.st-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.st-spinner {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 11, 12, .85);
  font-family: var(--font); font-size: 11px; color: var(--muted);
}
.st-spinner::after {
  content: ""; width: 16px; height: 16px;
  border: 2px solid var(--line-hot); border-top-color: var(--hi);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.st-date {
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  color: var(--text-bright);
}

.sat-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 2px;
}
.hud-btn-mini {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; background: #131518; border: 1px solid var(--line-hot);
  color: var(--text-bright); font-family: var(--font); font-size: .55rem;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  transition: all .15s ease;
}
.hud-btn-mini:hover {
  background: #1f2227; border-color: var(--hi); color: #fff;
}
.hud-btn-mini svg { flex-shrink: 0; }
.hud-link-ext {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  color: var(--hi-dim); text-decoration: none; border-bottom: 1px dotted var(--muted-2);
}
.hud-link-ext:hover { color: var(--text-bright); border-color: var(--hi); }

.cb-sat-btn {
  background: #14171a; border: 1px solid var(--line-hot);
  color: var(--text-bright); font-family: var(--font); font-size: 11px;
  letter-spacing: .12em; padding: 2px 7px; cursor: pointer;
  border-radius: 2px; transition: border-color .15s;
}
.cb-sat-btn:hover { border-color: var(--hi); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(3, 4, 5, .85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .26s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open {
  opacity: 1; pointer-events: auto;
}
.modal-window {
  width: 100%; max-width: 960px; max-height: 94vh;
  background: var(--panel-solid); border: 1px solid var(--line-hot);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.95) translateY(12px);
  transition: transform .26s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-window {
  transform: scale(1) translateY(0);
}
.modal-window-wide {
  max-width: 1200px;
}
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: #090a0c;
}
.mh-left { display: flex; flex-direction: column; gap: 3px; }
.mh-tag {
  font-family: var(--font); font-size: 11px; letter-spacing: .18em;
  color: var(--muted);
}
.modal-header h2 {
  margin: 0; font-family: var(--font); font-size: .92rem;
  letter-spacing: .22em; color: var(--text-bright); font-weight: 600;
}
.mh-sub {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  color: var(--muted);
}
.modal-close-btn {
  background: none; border: 1px solid var(--line); color: var(--muted);
  font-size: 1.3rem; line-height: 1; padding: 2px 9px; cursor: pointer;
  transition: all .15s;
}
.modal-close-btn:hover { color: #fff; border-color: var(--hi); }

.modal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px; border-bottom: 1px solid var(--line);
  background: #0c0d10; gap: 14px; flex-wrap: wrap;
}
.mt-group { display: flex; align-items: center; gap: 8px; }
.mt-label {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .14em;
  color: #c5cbd2; font-weight: 600;
}
.hud-select-mini {
  background: var(--field); border: 1px solid var(--line-hot);
  color: var(--text-bright); font-family: var(--font); font-size: 11.5px;
  padding: 4px 8px; outline: none;
}
.mt-years {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.year-pick-item {
  display: flex; align-items: center; gap: 5px;
}
.month-stepper-wrap {
  display: flex; align-items: center; gap: 2px;
}
.month-stepper-wrap .hud-btn-mini {
  padding: 4px 6px; min-width: 20px; justify-content: center;
}
.mt-vs {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .12em;
  color: #a6adb5; font-weight: 600;
}
.year-steppers {
  display: flex; align-items: center; gap: 4px;
}
.hud-input-mini {
  background: var(--field); border: 1px solid var(--line-hot);
  color: var(--text-bright); font-family: var(--font); font-size: 11.5px;
  padding: 4px 6px; outline: none; text-align: center;
}
.ext-btn { text-decoration: none; }

.modal-body {
  padding: 16px 18px; overflow-y: auto; display: flex;
  flex-direction: column; gap: 14px;
}

/* Side by side */
.view-sidebyside {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.side-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--field); border: 1px solid var(--line);
  padding: 10px;
}
.side-card-head {
  display: flex; justify-content: space-between; align-items: center;
}
.sch-badge {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .14em;
  color: #dbe0e6; padding: 2px 6px; background: #16181b;
  border: 1px solid var(--line-hot); font-weight: 600;
}
.sch-badge.highlight {
  color: #ffffff; border-color: rgba(255, 122, 51, .5);
  background: rgba(255, 122, 51, .15);
}
.sch-date {
  font-family: var(--font); font-size: 12px; letter-spacing: .1em;
  color: var(--text-bright); font-weight: 600;
}
.side-img-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: #000; overflow: hidden; border: 1px solid var(--line);
  display: grid; place-items: center;
}
.side-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.img-loading-overlay {
  position: absolute; inset: 0; background: rgba(5, 6, 7, .85);
  display: grid; place-items: center; font-family: var(--font);
  font-size: 12px; letter-spacing: .15em; color: #dbe0e6;
  font-weight: 600;
  transition: opacity .2s ease;
}
.img-loading-overlay.hidden {
  opacity: 0; pointer-events: none;
}
.side-card-foot {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  color: #a6adb5;
}

/* Split slider */
.view-slider {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.slider-wrapper {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: #000; overflow: hidden; border: 1px solid var(--line-hot);
  user-select: none; -webkit-user-select: none;
  cursor: ew-resize;
}
.slider-image-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.slider-image-layer img {
  width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none;
}
.slider-comp {
  z-index: 1;
}
.slider-base {
  clip-path: polygon(0 0, var(--split-pos, 50%) 0, var(--split-pos, 50%) 100%, 0 100%);
  z-index: 2;
}
.slider-badge {
  position: absolute; top: 10px; z-index: 5;
  font-family: var(--font); font-size: 11px; letter-spacing: .14em;
  padding: 4px 8px; background: rgba(7, 8, 10, .88);
  border: 1px solid var(--line-hot); color: var(--text-bright);
  pointer-events: none;
}
.sb-left { left: 10px; border-left: 2px solid var(--hi); }
.sb-right { right: 10px; border-right: 2px solid var(--rise); }

.slider-handle {
  position: absolute; top: 0; bottom: 0; left: var(--split-pos, 50%);
  width: 2px; transform: translateX(-50%); z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.sh-line {
  flex: 1; width: 2px; background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, .8);
}
.sh-tag {
  background: rgba(10, 11, 13, .95); border: 1px solid #fff;
  color: #fff; font-family: var(--font); font-size: 11px;
  letter-spacing: .1em; padding: 2px 6px; white-space: nowrap;
  box-shadow: 0 0 8px rgba(0, 0, 0, .9); border-radius: 2px;
  margin: 4px 0;
}
.sh-knob {
  width: 28px; height: 28px; border-radius: 50%;
  background: #0c0e11; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .8);
  flex-shrink: 0; gap: 2px;
}
.sh-arrow { font-size: .45rem; line-height: 1; color: #fff; }

.slider-status-bar {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-top: 4px; padding: 0 4px;
}
.ss-side-info {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
}
.ss-side-info.left { color: var(--hi); }
.ss-side-info.right { color: var(--rise); }
.slider-hint {
  margin: 0; font-family: var(--font); font-size: 11.5px;
  letter-spacing: .12em; color: #a6adb5; text-align: center;
}

.modal-notes {
  background: #090a0c; border: 1px solid var(--line);
  padding: 8px 12px; font-family: var(--font-ui); font-size: .65rem;
  line-height: 1.5; color: #c5cbd2;
}
.modal-notes strong { color: var(--text-bright); }

/* ---------- panel expand actions & hover hints ---------- */
.panel-head-actions {
  display: flex; align-items: center; gap: 6px;
}
.panel-icon-btn {
  background: none; border: 1px solid var(--line-hot); color: #dbe0e6;
  padding: 3px 6px; cursor: pointer; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  transition: all .15s ease;
}
.panel-icon-btn:hover {
  color: var(--text-bright); border-color: var(--hi); background: #16181c;
}
.chart-box {
  position: relative; cursor: pointer;
}
.chart-expand-badge {
  position: absolute; top: 6px; right: 6px;
  font-family: var(--font); font-size: 11px; letter-spacing: .12em;
  padding: 2px 6px; background: rgba(10, 11, 13, .9);
  border: 1px solid var(--line-hot); color: var(--muted);
  border-radius: 2px; opacity: 0; transition: opacity .18s ease;
  pointer-events: none;
}
.chart-box:hover .chart-expand-badge {
  opacity: 1; color: var(--text-bright); border-color: var(--hi);
}

/* ---------- data & graph expanded observatory modal ---------- */
.data-modal-body {
  gap: 12px;
}
/* Children keep their natural height; the modal body scrolls instead of
   squashing the chart and cards to fit the viewport. */
.data-modal-body > * {
  flex: 0 0 auto;
}
.chart-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d0f12;
  border: 1px solid var(--line);
  padding: 6px 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.cz-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cz-label {
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: #dbe0e6;
  font-weight: 600;
}
.modal-seg {
  border-color: var(--line-hot);
}
.modal-seg .seg-btn {
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: .1em;
  color: #b4bac2;
  font-weight: 600;
  transition: all .15s ease;
}
.modal-seg .seg-btn:hover {
  color: var(--text-bright);
}
.modal-seg .seg-btn.on {
  background: var(--text-bright);
  color: #08090a;
  font-weight: 700;
}
.cz-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cz-badge {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .12em;
  color: #cdd2d8;
  padding: 3px 8px;
  border: 1px solid var(--line-hot);
  background: #161920;
  font-weight: 600;
  border-radius: 2px;
  transition: all .2s ease;
}
.cz-badge.active {
  color: #fff;
  border-color: var(--hi);
  background: #1e2532;
  box-shadow: 0 0 8px rgba(255, 255, 255, .25);
}
.cz-hint {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .06em;
  color: #b0b6bc;
  font-weight: 500;
}
.expanded-chart-container {
  position: relative; width: 100%;
  height: clamp(400px, 58vh, 680px);
  background: #08090b; border: 1px solid var(--line);
  padding: 8px;
  cursor: grab;
}
.expanded-chart-container:active {
  cursor: grabbing;
}
.expanded-trend-note {
  font-size: 12px; padding: 9px 12px;
  background: #0c0e11; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 5px; line-height: 1.45;
}
.tn-row { display: flex; gap: 10px; align-items: baseline; }
.tn-key {
  flex: 0 0 118px; font-family: var(--font); font-size: 11px;
  letter-spacing: .12em; color: #7c848d; font-weight: 700;
}
.tn-val { flex: 1 1 auto; color: #d6dbe1; }

/* ---------- collapsible HUD sections (expanded graph modal) ---------- */
.hud-collapse {
  border: 1px solid var(--line);
  background: #0a0c0f;
}
.hud-collapse > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; list-style: none;
  user-select: none; transition: background .15s ease;
}
.hud-collapse > summary::-webkit-details-marker { display: none; }
.hud-collapse > summary:hover { background: #12151a; }
.hud-collapse > summary:focus-visible { outline: 1px solid var(--hi); outline-offset: -1px; }
.hc-title {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .14em;
  color: var(--text-bright); font-weight: 700;
}
.hc-hint {
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  color: #6f767f; margin-left: auto; text-align: right;
}
.hc-chev {
  font-family: var(--font); font-size: 12px; line-height: 1;
  color: #a6adb5; margin-left: 10px; transition: transform .18s ease;
}
.hud-collapse[open] > summary { border-bottom: 1px solid var(--line); }
.hud-collapse[open] > summary .hc-chev { transform: rotate(90deg); color: var(--hi); }
.hud-collapse > *:not(summary) { padding: 12px; }
.hud-collapse > .expanded-grid-section {
  padding: 0; border: 0; background: transparent;
}
.stats-metric-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.metric-card {
  background: var(--field); border: 1px solid var(--line);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 2px;
}
.mc-label {
  font-family: var(--font); font-size: 11px; letter-spacing: .15em;
  color: #b4bac2; text-transform: uppercase; font-weight: 600;
}
.mc-val {
  font-family: var(--font); font-size: .98rem; font-weight: 700;
  color: var(--text-bright);
}
.mc-sub {
  font-family: var(--font-ui); font-size: 12px; color: #c5cbd2; font-weight: 500;
}
.expanded-grid-section {
  background: #08090b; border: 1px solid var(--line);
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}
.eg-header {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
}
.eg-header-right {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.eg-orient-tag {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  color: #c5cbd2; font-weight: 600;
}
.eg-title {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .14em;
  color: var(--text-bright); font-weight: 700;
}
.eg-badge {
  font-family: var(--font); font-size: 11px; letter-spacing: .1em;
  color: #dbe0e6; padding: 2px 6px; border: 1px solid var(--line-hot);
  background: #161920; font-weight: 600;
}
.eg-matrix {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.eg-cell-chip {
  background: #12151a; border: 1px solid #30343c;
  padding: 6px 8px; display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font); font-size: 11px; cursor: pointer;
  transition: all .15s ease; border-radius: 2px;
}
.eg-cell-chip:hover {
  border-color: var(--hi); background: #1c2028;
}
.eg-cell-chip.active {
  border-color: var(--hi); background: #222732;
  box-shadow: 0 0 6px rgba(255, 255, 255, .2);
}
.egc-coord { color: #c5cbd2; font-size: 11px; font-weight: 600; }
.egc-slope { font-weight: 700; font-size: 11.5px; }
.eg-detail {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .06em;
  color: #e2e6eb; padding: 6px 10px; background: #111418;
  border-left: 2px solid var(--hi);
}
.data-var-tab {
  font-family: var(--font); font-size: 11px; letter-spacing: .12em;
  padding: 4px 9px; background: #111316; border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; text-transform: uppercase;
  transition: all .15s ease;
}
.data-var-tab:hover {
  color: var(--text-bright); border-color: var(--line-hot);
}
.data-var-tab.on {
  color: #fff; border-color: var(--hi); background: #1d2127;
}

/* ---------- Earth System Spheres & Filter Bar ---------- */
.sphere-filter-bar {
  display: flex; gap: 4px; margin-bottom: 8px;
}
.sphere-tab {
  flex: 1; padding: 5px 3px; background: #12151a;
  border: 1px solid #383e47; color: #b4bac2; font-weight: 600;
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  text-align: center; cursor: pointer; transition: all .15s ease;
}
.sphere-tab:hover {
  color: #ffffff; border-color: var(--hi); background: #191d24;
}
.sphere-tab.active {
  background: #202632; color: #ffffff; border-color: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .18);
}
.var-sphere-badge {
  font-size: 11px; letter-spacing: .06em; padding: 2px 5px;
  border: 1px solid #3b424c; color: #dbe0e6; font-weight: 600;
  background: #16191f; border-radius: 2px;
  margin-left: auto; text-transform: uppercase;
}

/* ---------- Region Contrast Mode ---------- */
.hud-mode-pill {
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  background: #14171d; border: 1px solid #3b424c; color: #cdd2d8; font-weight: 600;
  padding: 2px 7px; cursor: pointer; transition: all .15s ease;
}
.hud-mode-pill:hover {
  border-color: var(--line-hot); color: var(--text-bright);
}
.hud-mode-pill.active {
  background: #0e2430; border-color: #00e5ff; color: #00e5ff;
  box-shadow: 0 0 6px rgba(0, 229, 255, .25);
}
.hud-field-lbl {
  display: block; font-family: var(--font); font-size: .50rem;
  letter-spacing: .12em; color: #b4bac2; font-weight: 600; margin-bottom: 4px;
}
.region-contrast-divider {
  height: 1px; background: var(--line); margin: 8px 0;
}
.region-select-group {
  margin-bottom: 6px;
}

/* ---------- Earth System Coupling Panel ---------- */
.coupling-list {
  display: flex; flex-direction: column; gap: 8px;
}
.coupling-card {
  background: #0f1216; border: 1px solid var(--line);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 5px;
  font-family: var(--font);
}
.coupling-card.divergent {
  border-left: 2px solid #ff7a33;
}
.coupling-card.in_phase {
  border-left: 2px solid #00e5ff;
}
.coupling-card.moderate {
  border-left: 2px solid #e3c265;
}
.coupling-card.decoupled {
  border-left: 2px solid var(--line-hot);
}
.coupling-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
}
.coupling-title {
  font-size: 12px; font-weight: 700; color: #ffffff;
  letter-spacing: .08em;
}
.coupling-r {
  font-size: 11.5px; font-weight: 700; color: #ffffff;
}
.coupling-spheres {
  display: flex; gap: 6px; font-size: 11px; color: #c5cbd2; font-weight: 500;
  letter-spacing: .06em;
}
.coupling-spheres span {
  padding: 2px 5px; background: #161920; border: 1px solid #353b45; color: #dbe0e6;
}
.coupling-phase-tag {
  font-size: 11px; letter-spacing: .1em; font-weight: 700;
  padding: 2px 5px; background: #15181d; width: fit-content;
}
.coupling-phase-tag.divergent { color: #ff7a33; border: 1px solid rgba(255, 122, 51, .4); }
.coupling-phase-tag.in_phase { color: #00e5ff; border: 1px solid rgba(0, 229, 255, .4); }
.coupling-phase-tag.moderate { color: #e3c265; border: 1px solid rgba(227, 194, 101, .4); }
.coupling-phase-tag.decoupled { color: #a6adb5; border: 1px solid var(--line-hot); }
.coupling-desc {
  font-size: 11px; line-height: 1.5; color: #e2e6eb; margin: 0;
  letter-spacing: .02em;
}

/* ---------- Regional Contrast Panel ---------- */
.contrast-list {
  display: flex; flex-direction: column; gap: 8px;
}
.contrast-card {
  background: #0f1216; border: 1px solid var(--line);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font);
}
.contrast-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.contrast-var-name {
  font-size: 12px; font-weight: 700; color: #ffffff;
}
.contrast-verdict-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 5px; background: #14171c; border: 1px solid var(--line);
}
.contrast-verdict-pill.divergent { color: #ff7a33; border-color: rgba(255,122,51,.4); }
.contrast-verdict-pill.parallel { color: #00e5ff; border-color: rgba(0,229,255,.4); }
.contrast-verdict-pill.localized { color: #e3c265; border-color: rgba(227,194,101,.4); }

.contrast-rows {
  display: flex; flex-direction: column; gap: 3px; font-size: 11px;
}
.contrast-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 5px; background: #13161c; border-left: 2px solid transparent; color: #ffffff;
}
.contrast-row.reg-a { border-color: #ff7a33; }
.contrast-row.reg-b { border-color: #00e5ff; }
.contrast-delta {
  display: flex; justify-content: space-between; padding-top: 3px;
  border-top: 1px solid var(--line); font-size: .50rem; color: #c5cbd2; font-weight: 500;
}
.contrast-desc {
  font-size: 11px; line-height: 1.5; color: #e2e6eb; margin: 0;
}

/* ---------- Expanded Modal Coupling & Contrast Sections ---------- */
.expanded-coupling-section, .expanded-contrast-section {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.eg-coupling-grid, .eg-contrast-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

/* ---------- trend scan ---------- */
.hud-btn.ghost {
  margin-top: 6px; padding: 8px;
  background: transparent; color: var(--hi);
  border: 1px solid var(--line-hot);
  font-size: 12px; letter-spacing: .18em; font-weight: 600;
}
.hud-btn.ghost:hover { background: #161920; border-color: var(--hi); }
.hud-btn.ghost:disabled { opacity: .45; }

.scan-window { max-width: 880px; }
.scan-table { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.scan-head, .scan-row {
  display: grid;
  grid-template-columns: 26px 14px minmax(0, 1fr) 116px 84px 66px 96px;
  gap: 10px; align-items: center;
  font-family: var(--font); font-size: 12px; letter-spacing: .05em;
  padding: 6px 8px;
}
.scan-head {
  font-size: 11px; letter-spacing: .14em; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 5px; font-weight: 600;
}
.scan-row {
  background: var(--field); border-left: 2px solid transparent;
  color: var(--text); cursor: pointer; transition: background .12s;
}
.scan-row:hover { background: #181b22; border-left-color: var(--hi); color: #ffffff; }
.scan-row.nodata { opacity: .45; }
.sr-rank { color: var(--muted); font-weight: 600; }
.sr-dot { width: 8px; height: 8px; }
.sr-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-bright); font-weight: 600;
}
.sr-slope, .sr-p, .sr-cells { color: #dbe0e6; text-align: right; }
.sr-cells { text-align: center; }
.sr-dir {
  text-align: center; font-size: 11px; letter-spacing: .1em;
  padding: 2px 4px; font-weight: 600;
}
.sr-dir.rising { color: var(--rise); border: 1px solid #75391a; background: #201108; }
.sr-dir.falling { color: var(--fall); border: 1px solid #254170; background: #0c1424; }
.sr-dir.flat { color: #c0c6cc; border: 1px solid var(--line-hot); }
.sr-dir.nodata { color: #868e97; border: 1px dashed var(--line); }
.scan-note {
  margin: 12px 0 0; font-family: var(--font); font-size: 11.5px;
  line-height: 1.6; color: var(--muted); letter-spacing: .03em;
}

/* ---------- variable definitions / glossary ---------- */
.link-btn {
  display: block; width: 100%; margin-top: 7px; padding: 6px 2px;
  background: transparent; border: 0; border-top: 1px dashed var(--line-hot);
  font-family: var(--font); font-size: 11px; letter-spacing: .12em;
  color: #c5cbd2; text-align: left; cursor: pointer; font-weight: 600;
  transition: color .15s;
}
.link-btn:hover { color: var(--hi); }

.defs-window { max-width: 900px; }
.defs-body {
  max-height: 65vh; overflow-y: auto; padding: 14px 18px; margin-top: 2px;
}
.defs-body::-webkit-scrollbar { width: 5px; }
.defs-body::-webkit-scrollbar-thumb { background: var(--line-hot); }

.scan-scroll {
  max-height: 65vh;
  overflow-y: auto;
  padding: 10px 18px;
}
.scan-scroll::-webkit-scrollbar { width: 5px; }
.scan-scroll::-webkit-scrollbar-thumb { background: var(--line-hot); }
.scan-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .12em;
  color: #a6adb5;
  background: #090a0c;
}
.defs-group {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .18em;
  color: #a6adb5; margin: 16px 0 7px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line); font-weight: 700;
}
.defs-group:first-child { margin-top: 4px; }
.def-item {
  display: grid; grid-template-columns: 214px minmax(0, 1fr);
  gap: 14px; padding: 8px 4px;
  border-bottom: 1px solid rgba(48, 52, 60, .6);
}
.def-left { display: flex; gap: 7px; align-items: flex-start; }
.def-dot {
  width: 8px; height: 8px; margin-top: 4px; flex: none;
}
.def-name {
  font-family: var(--font); font-size: 12.5px; letter-spacing: .04em;
  color: #ffffff; line-height: 1.3; font-weight: 600;
}
.def-meta {
  font-family: var(--font); font-size: .50rem; letter-spacing: .08em;
  color: #a6adb5; margin-top: 3px; font-weight: 500;
}
.def-plain {
  font-family: var(--font-ui); font-size: .74rem; line-height: 1.55;
  color: #dbe0e6;
}
.def-means {
  margin-top: 5px; font-family: var(--font); font-size: 12px;
  line-height: 1.6; color: #c5cbd2; padding-left: 9px;
  border-left: 2px solid var(--line-hot);
}
.def-means b { color: #ffffff; font-weight: 700; }

/* ---------- global teleconnections & impact ledger ---------- */
.hud-btn.telecon-btn {
  margin-top: 5px;
  color: #8bc3eb;
  border-color: #3b5066;
  background: rgba(30, 48, 66, 0.25);
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 600;
}
.hud-btn.telecon-btn:hover {
  background: rgba(59, 90, 122, 0.4);
  border-color: #7db1db;
  color: #ffffff;
}

.telecon-mini-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}
.tc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111418;
  border: 1px solid var(--line-hot);
  padding: 5px 8px;
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .15s;
}
.tc-pill:hover {
  background: #191f26;
  border-color: var(--hi);
}
.tc-pill-name {
  color: #ffffff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tc-pill-r {
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
}
.tc-pill-r.direct {
  color: var(--rise);
  background: rgba(255, 122, 51, 0.15);
}
.tc-pill-r.inverse {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.15);
}

.ledger-window {
  max-width: 1040px;
}
.ledger-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 18px;
  background: #090b0e;
  border-bottom: 1px solid var(--line);
}
.ls-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ls-lbl {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
}
.ls-stat b {
  font-family: var(--font);
  font-size: .75rem;
  color: #ffffff;
  letter-spacing: .04em;
}
.ledger-scroll {
  max-height: 56vh;
  overflow-y: auto;
  padding: 12px 18px;
}
.ledger-scroll::-webkit-scrollbar { width: 5px; }
.ledger-scroll::-webkit-scrollbar-thumb { background: var(--line-hot); }

.ledger-head, .ledger-row {
  display: grid;
  grid-template-columns: 28px 165px 145px 120px 1fr 100px;
  gap: 12px;
  align-items: center;
  font-family: var(--font);
  font-size: 12px;
  padding: 8px 10px;
}
.ledger-head {
  font-size: .50rem;
  letter-spacing: .16em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  font-weight: 700;
}
.ledger-row {
  background: var(--field);
  border-left: 2px solid transparent;
  color: #dbe0e6;
  border-bottom: 1px solid rgba(48, 52, 60, .4);
  transition: background .12s;
}
.ledger-row:hover {
  background: #171c23;
  border-left-color: var(--hi);
}
.lr-rank {
  color: var(--muted);
  font-weight: 600;
}
.lr-reg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lr-reg-name {
  color: #ffffff;
  font-weight: 600;
}
.lr-reg-surf {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}
.lr-var {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lr-var-dot {
  width: 8px;
  height: 8px;
  flex: none;
}
.lr-var-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.lr-var-name {
  color: #ffffff;
  font-weight: 600;
}
.lr-var-sph {
  font-size: 11px;
  color: #a6adb5;
}
.lr-coupling {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lr-r {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .04em;
}
.lr-r.direct {
  color: var(--rise);
}
.lr-r.inverse {
  color: #00e5ff;
}
.lr-p {
  font-size: 11px;
  color: #a6adb5;
}
.lr-strength {
  font-size: .46rem;
  letter-spacing: .1em;
  font-weight: 700;
}
.lr-strength.strong {
  color: #ffd15c;
}
.lr-strength.moderate {
  color: #a3d9a5;
}
.lr-strength.notable {
  color: #b8c0cc;
}
.lr-mech {
  font-family: var(--font-ui);
  font-size: .70rem;
  line-height: 1.45;
  color: #dbe0e6;
}
.lr-act {
  text-align: right;
}
.lr-btn {
  background: #141920;
  color: var(--text-bright);
  border: 1px solid var(--line-hot);
  padding: 4px 9px;
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .1em;
  cursor: pointer;
  border-radius: 2px;
  font-weight: 600;
  transition: all .15s;
}
.lr-btn:hover {
  background: var(--hi);
  color: #000000;
  border-color: var(--hi);
}
.ledger-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: .08em;
  color: #a6adb5;
  background: #090a0c;
}

/* ---------- responsive ---------- */
@media (max-width: 1500px) {
  .hud-grid { grid-template-columns: 244px minmax(0, 1fr) 282px; }
  .top-readouts { gap: 14px; }
}
@media (max-width: 1240px) {
  body { overflow: auto; }
  .hud-grid {
    grid-template-columns: 1fr; grid-auto-rows: auto;
    padding: 10px 12px;
  }
  .col-left, .col-right { overflow: visible; }
  .globe-wrap { min-height: 460px; }
  .col-center { order: -1; }
}

/* ============================================================
   EARTH SYSTEM INTERCONNECTIONS SCREEN
   A full-screen layer so the network view is never squeezed
   into the rail. Visual hierarchy: title -> driver hero ->
   tabs -> focused panel -> method footer.
   ============================================================ */
.ix-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: radial-gradient(ellipse at 50% 0%, #0d1117 0%, #05070a 60%, #030405 100%);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.ix-screen.open { opacity: 1; pointer-events: auto; }
.ix-inner {
  display: flex; flex-direction: column;
  height: 100%; width: 100%;
  max-width: 1500px; margin: 0 auto;
  padding: 20px 32px 0; gap: 14px;
}

/* --- head --- */
.ix-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex: 0 0 auto;
}
.ix-head-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ix-tag {
  font-family: var(--font); font-size: 11px; letter-spacing: .2em;
  color: var(--hi); font-weight: 600;
}
#ix-title {
  font-family: var(--font); font-size: 1.45rem; letter-spacing: .12em;
  font-weight: 800; color: #fff; margin: 0; line-height: 1.1;
}
.ix-sub {
  font-family: var(--font); font-size: 12px; letter-spacing: .04em;
  color: #8b939c; margin: 0; max-width: 70ch; line-height: 1.5;
}
.ix-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ix-period {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .12em;
  color: #b4bac2; padding: 6px 10px; border: 1px solid var(--line);
  background: #0d1014; white-space: nowrap;
}
.ix-btn {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .12em;
  color: #e9ebed; background: #171b21; border: 1px solid var(--line-hot);
  padding: 7px 14px; cursor: pointer; transition: background .15s ease;
}
.ix-btn:hover { background: #22262e; border-color: var(--hi); }
.ix-btn:disabled { opacity: .45; cursor: wait; }
.ix-close {
  background: transparent; border: 1px solid var(--line);
  color: #b4bac2; font-size: 1.1rem; line-height: 1;
  width: 30px; height: 30px; cursor: pointer; transition: all .15s ease;
}
.ix-close:hover { color: #fff; border-color: var(--hi); }

/* --- driver hero --- */
.ix-hero {
  flex: 0 0 auto;
  display: grid; grid-template-columns: minmax(0,1.6fr) repeat(4, minmax(0,1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line-hot);
}
.ix-hero-cell {
  background: #0a0d11; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.ix-hero-cell.lead { background: #0c1015; }
.ixh-lbl {
  font-family: var(--font); font-size: 11px; letter-spacing: .16em;
  color: #6f767f; font-weight: 600;
}
.ixh-val {
  font-family: var(--font); font-size: .82rem; letter-spacing: .04em;
  color: #fff; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ixh-sub {
  font-family: var(--font); font-size: 11px; letter-spacing: .05em;
  color: #8b939c; line-height: 1.4;
}
.ixh-arrow { color: var(--hi); font-weight: 400; }

/* --- tabs --- */
.ix-tabs {
  display: flex; gap: 1px; background: var(--line);
  border: 1px solid var(--line); flex: 0 0 auto;
}
.ix-tab {
  flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; align-items: center;
  background: #0a0d11; border: 0; padding: 10px 14px;
  cursor: pointer; text-align: left; transition: background .15s ease;
}
.ix-tab:hover { background: #12161c; }
.ix-tab.on { background: #141a21; box-shadow: inset 0 -2px 0 var(--hi); }
.ixt-num {
  grid-row: 1 / 3; font-family: var(--font); font-size: 12px;
  color: #4d545d; font-weight: 700; letter-spacing: .06em;
}
.ix-tab.on .ixt-num { color: var(--hi); }
.ixt-label {
  font-family: var(--font); font-size: 12px; letter-spacing: .14em;
  color: #9aa2ab; font-weight: 700;
}
.ix-tab.on .ixt-label { color: #fff; }
.ixt-hint {
  font-family: var(--font); font-size: 11px; letter-spacing: .04em;
  color: #666d76;
}
.ix-tab.on .ixt-hint { color: #8b939c; }

/* --- body / panels --- */
.ix-body { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; }
.ix-panel {
  display: none; height: 100%; overflow-y: auto;
  flex-direction: column; gap: 14px; padding-bottom: 16px;
}
.ix-panel.on { display: flex; }
.ix-panel-head { flex: 0 0 auto; }
.ix-panel-head h3 {
  font-family: var(--font); font-size: 12.5px; letter-spacing: .16em;
  color: #fff; margin: 0 0 4px; font-weight: 700;
}
.ix-panel-head p {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .04em;
  color: #8b939c; margin: 0; line-height: 1.5; max-width: 80ch;
}

/* --- local coupling: network + ranked pair list --- */
.ix-local-grid {
  display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.ix-net-wrap {
  background: #080b0e; border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.ix-net { width: 100%; height: auto; display: block; }
.ix-net-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 8px 12px; border-top: 1px solid var(--line);
  font-family: var(--font); font-size: .47rem; letter-spacing: .1em;
  color: #7c848d;
}
.ix-net-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ix-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.ix-dot.rise { background: var(--rise); }
.ix-dot.fall { background: #42a5f5; }

.ix-pair-list { display: flex; flex-direction: column; gap: 8px; }
.ix-pair {
  background: #0a0d11; border: 1px solid var(--line);
  border-left: 2px solid #333; padding: 11px 14px;
  display: flex; flex-direction: column; gap: 7px;
}
.ix-pair.in_phase { border-left-color: var(--rise); }
.ix-pair.divergent { border-left-color: #42a5f5; }
.ix-pair-top {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.ix-pair-name {
  font-family: var(--font); font-size: 12px; letter-spacing: .06em;
  color: #fff; font-weight: 700;
}
.ix-pair-arrow { color: var(--hi); font-size: .7rem; }
.ix-pair-r {
  margin-left: auto; font-family: var(--font); font-size: .68rem;
  font-weight: 700; letter-spacing: .02em;
}
.ix-pair-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  color: #7c848d;
}
.ix-pair-meta b { color: #c5cbd2; font-weight: 600; }
.ix-pair-note {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .03em;
  color: #9aa2ab; line-height: 1.5;
}
.ix-conf {
  font-family: var(--font); font-size: .46rem; letter-spacing: .12em;
  padding: 2px 6px; border: 1px solid var(--line-hot); color: #b4bac2;
}
.ix-conf.HIGH { color: #7ee0a8; border-color: #2c6b46; }
.ix-conf.MEDIUM { color: #e3c265; border-color: #6b5a2c; }
.ix-conf.LOW { color: #8b939c; }

/* --- global impacts --- */
.ix-global-list { display: flex; flex-direction: column; gap: 8px; }
.ix-globe-row {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(0,1.1fr) 92px 108px;
  gap: 14px; align-items: center;
  background: #0a0d11; border: 1px solid var(--line);
  border-left: 2px solid #333; padding: 10px 14px;
}
.ix-globe-row.direct { border-left-color: var(--rise); }
.ix-globe-row.inverse { border-left-color: #42a5f5; }
.ixg-where { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ixg-region {
  font-family: var(--font); font-size: 12px; letter-spacing: .06em;
  color: #fff; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ixg-var {
  font-family: var(--font); font-size: 11px; letter-spacing: .04em;
  color: #8b939c;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ixg-effect { display: flex; flex-direction: column; gap: 4px; }
.ixg-eff-lbl {
  font-family: var(--font); font-size: .46rem; letter-spacing: .12em;
  color: #6f767f;
}
.ixg-eff-bar {
  position: relative; height: 5px; background: #161a20; overflow: hidden;
}
.ixg-eff-fill { position: absolute; top: 0; bottom: 0; left: 50%; }
.ixg-eff-val {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .04em;
  color: #c5cbd2; font-weight: 600;
}
.ixg-stat { text-align: right; }
.ixg-stat .n {
  font-family: var(--font); font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; display: block;
}
.ixg-stat .l {
  font-family: var(--font); font-size: .46rem; letter-spacing: .1em;
  color: #6f767f;
}
.ixg-mech {
  grid-column: 1 / -1; font-family: var(--font); font-size: .53rem;
  letter-spacing: .02em; color: #9aa2ab; line-height: 1.55;
  padding-top: 7px; border-top: 1px solid #161a20;
}

/* --- anomaly tab --- */
.ix-anomaly-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.ix-astat { background: #0a0d11; padding: 11px 14px; display: flex; flex-direction: column; gap: 4px; }
.ix-astat .v {
  font-family: var(--font); font-size: .9rem; font-weight: 700; color: #fff;
}
.ix-astat .l {
  font-family: var(--font); font-size: .46rem; letter-spacing: .14em; color: #6f767f;
}
.ix-anomaly-strip {
  height: 96px; background: #080b0e; border: 1px solid var(--line);
  display: flex; align-items: stretch; gap: 1px; padding: 8px;
  overflow: hidden;
}
.ix-anom-bar { flex: 1 1 0; position: relative; min-width: 1px; }
.ix-anom-fill { position: absolute; left: 0; right: 0; }
.ix-episode-list { display: flex; flex-direction: column; gap: 6px; }
.ix-episode {
  display: grid; grid-template-columns: 60px minmax(0,1fr) 90px 70px;
  gap: 12px; align-items: center;
  background: #0a0d11; border: 1px solid var(--line);
  padding: 9px 12px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .04em;
  color: #b4bac2;
}
.ix-ep-n { color: #4d545d; font-weight: 700; letter-spacing: .08em; }
.ix-ep-range { color: #e9ebed; }
.ix-ep-peak { color: var(--rise); font-weight: 700; text-align: right; }
.ix-ep-len { color: #7c848d; text-align: right; letter-spacing: .08em; font-size: 11px; }

/* --- empty state --- */
.ix-empty {
  display: none; flex-direction: column; gap: 8px;
  border: 1px dashed var(--line-hot); background: #080b0e;
  padding: 28px 30px; margin-top: 6px;
}
.ix-empty.on { display: flex; }
.ix-empty h4 {
  font-family: var(--font); font-size: 12.5px; letter-spacing: .16em;
  color: #e3c265; margin: 0; font-weight: 700;
}
.ix-empty p {
  font-family: var(--font); font-size: 12px; letter-spacing: .03em;
  color: #9aa2ab; margin: 0; line-height: 1.6; max-width: 90ch;
}

/* --- foot --- */
.ix-foot {
  flex: 0 0 auto; padding: 10px 0 14px; border-top: 1px solid var(--line);
  font-family: var(--font); font-size: .47rem; letter-spacing: .08em;
  color: #5d646d; line-height: 1.6;
}

/* --- loading --- */
.ix-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px;
  font-family: var(--font); font-size: 12px; letter-spacing: .14em;
  color: #8b939c;
}

@media (max-width: 1100px) {
  .ix-inner { padding: 14px 18px 0; }
  .ix-local-grid { grid-template-columns: 1fr; }
  .ix-hero { grid-template-columns: 1fr 1fr; }
  .ix-globe-row { grid-template-columns: 1fr 1fr; }
  .ix-episode { grid-template-columns: 44px minmax(0,1fr) 70px; }
  .ix-ep-len { display: none; }
}


/* Primary entry to the interconnections screen: the headline feature, so it
   carries more weight than the secondary ghost buttons around it. */
.interconnect-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: #06121a; background: var(--hi); border-color: var(--hi);
  font-weight: 800; letter-spacing: .14em;
  box-shadow: 0 0 0 1px rgba(0,229,255,.25), 0 0 18px rgba(0,229,255,.18);
  transition: filter .15s ease, transform .12s ease;
}
.interconnect-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.interconnect-btn:active { transform: translateY(0); }
.interconnect-btn svg { flex: 0 0 auto; }


/* --- local tab grouping: driver couplings first, the rest folded away --- */
.ix-group { display: flex; flex-direction: column; gap: 8px; }
.ix-group-title {
  font-family: var(--font); font-size: 11px; letter-spacing: .18em;
  color: var(--hi); font-weight: 700; margin: 2px 0 0;
}
.ix-group-empty {
  font-family: var(--font); font-size: 11.5px; letter-spacing: .03em;
  color: #8b939c; line-height: 1.55; margin: 0;
  border-left: 2px solid var(--line-hot); padding: 6px 0 6px 10px;
}
.ix-more {
  margin-top: 4px; border: 1px solid var(--line); background: #080b0e;
}
.ix-more > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px; cursor: pointer; list-style: none;
  transition: background .15s ease;
}
.ix-more > summary::-webkit-details-marker { display: none; }
.ix-more > summary:hover { background: #10141a; }
.ix-more-label {
  font-family: var(--font); font-size: 11px; letter-spacing: .14em;
  color: #b4bac2; font-weight: 700;
}
.ix-more-count {
  font-family: var(--font); font-size: 11px; letter-spacing: .08em;
  color: #6f767f; margin-left: auto;
}
.ix-chev { color: #7c848d; font-size: 12px; transition: transform .18s ease; }
.ix-more[open] > summary .ix-chev { transform: rotate(90deg); color: var(--hi); }
.ix-more-body {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 13px 13px;
}

/* ============================================================
   ACCESSIBILITY LAYER
   The HUD is deliberately dense, but density must not cost
   legibility or keyboard access. Everything below is additive.
   ============================================================ */

/* A visible focus ring on every interactive element. Before this,
   all 61 focusables had outline:none and the app was unusable
   without a mouse. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 1px;
}
.hud-select:focus-visible,
.yr input:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

/* --flat fails WCAG AA on the panel background (3.92:1). Lift it
   to 4.6:1 without changing its role as the "no trend" colour. */
:root { --flat: #7b838c; }

/* Minimum comfortable hit area for pointer users. */
.sphere-tab { min-height: 32px; }
.hud-btn { min-height: 36px; }
.panel-icon-btn { min-width: 28px; min-height: 28px; }

/* The globe is the primary way to choose a place, so it must be
   reachable without a mouse. */
#globe { touch-action: none; }
#globe:focus-visible { outline: 2px solid #ffffff; outline-offset: -2px; }

/* Respect the OS reduced-motion setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .pulse { animation: none; opacity: 1; }
}

/* Screen-reader-only helper for live announcements. */
.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;
}

/* ---------- guided start ---------- */
.start-window { max-width: 780px; }
.start-title {
  font-family: var(--font); font-size: 20px; letter-spacing: .02em;
  color: #fff; margin: 6px 0 0; font-weight: 700;
}
.start-sub {
  color: var(--muted); font-size: 13px; line-height: 1.6;
  margin: 10px 0 16px; max-width: 62ch;
}
.start-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.start-card {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; padding: 14px 16px; cursor: pointer;
  background: #0f1216; border: 1px solid var(--line);
  color: var(--text); font-family: var(--font-ui);
  transition: border-color .15s, background .15s;
}
.start-card:hover { border-color: var(--hi); background: #151a20; }
.start-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sc-q { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.35; }
.sc-d { font-size: 12px; color: var(--muted); }
.sc-expect {
  font-family: var(--font); font-size: 11px; letter-spacing: .06em;
  color: #8fd0a0; text-transform: uppercase;
}
.start-foot { margin-top: 14px; }
@media (max-width: 640px) {
  .start-grid { grid-template-columns: 1fr; }
}
