/* ==========================================================================
   GlobalCap Pro (Planet #24 · GC) — Sovereign Global Asset Allocation Atlas
   Dark Default: Deep Maritime Teal (#060D12)
   Light Toggle: Editorial Atlas Paper (#F5F7F6)
   Accents: Atlas Teal #2DD4BF | Outperform Emerald #10B981 | Drawdown Rose #F43F5E | Sovereign Gold #E5B95C
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #060D12;
  --bg-glow: radial-gradient(ellipse 80% 42% at 50% -10%, rgba(45, 212, 191, 0.12), transparent 68%);
  --surface-1: #0B1720;
  --surface-2: #10202C;
  --surface-3: #152938;
  --brand-bg: #0A1822;
  --border: rgba(45, 212, 191, 0.16);
  --border-subtle: rgba(148, 178, 190, 0.14);
  --border-strong: rgba(45, 212, 191, 0.42);
  --text: #EFF8F7;
  --text-2: #9FB9C4;
  --text-3: #6C8A98;
  --accent-teal: #2DD4BF;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --accent-gold: #E5B95C;
  --accent-amber: #F59E0B;
  --accent-sky: #38BDF8;
  --masthead-bg: rgba(6, 13, 18, 0.88);
  --hud-bg: rgba(8, 19, 27, 0.96);
  --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.34);
  --shadow-hud: 0 18px 42px rgba(0, 0, 0, 0.56);
  --row-hover: rgba(45, 212, 191, 0.08);
  --row-selected: rgba(229, 185, 92, 0.12);
  --svg-ocean: #07121A;
  --svg-grid: rgba(45, 212, 191, 0.10);
  --svg-land: rgba(45, 212, 191, 0.045);
  --svg-land-stroke: rgba(45, 212, 191, 0.14);
  --svg-label: #96B3BF;
  --svg-ink: #F2FAF9;
  --ease-kinetic: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #F5F7F6;
  --bg-glow: radial-gradient(ellipse 80% 42% at 50% -10%, rgba(13, 148, 136, 0.09), transparent 68%);
  --surface-1: #FFFFFF;
  --surface-2: #EDF2F0;
  --surface-3: #F7FAF9;
  --brand-bg: #EBF5F3;
  --border: rgba(13, 148, 136, 0.20);
  --border-subtle: rgba(15, 35, 44, 0.10);
  --border-strong: rgba(13, 148, 136, 0.52);
  --text: #0C1A20;
  --text-2: #3A5460;
  --text-3: #617C88;
  --accent-teal: #0D9488;
  --accent-emerald: #059669;
  --accent-rose: #E11D48;
  --accent-gold: #B47B1B;
  --accent-amber: #D97706;
  --accent-sky: #0284C7;
  --masthead-bg: rgba(245, 247, 246, 0.92);
  --hud-bg: rgba(255, 255, 255, 0.97);
  --shadow-card: 0 8px 26px rgba(10, 32, 42, 0.06);
  --shadow-hud: 0 14px 36px rgba(10, 32, 42, 0.16);
  --row-hover: rgba(13, 148, 136, 0.06);
  --row-selected: rgba(180, 123, 27, 0.10);
  --svg-ocean: #EEF4F3;
  --svg-grid: rgba(13, 148, 136, 0.12);
  --svg-land: rgba(13, 148, 136, 0.055);
  --svg-land-stroke: rgba(13, 148, 136, 0.22);
  --svg-label: #48636F;
  --svg-ink: #0C1A20;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-glow);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
}

code,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Sticky Masthead
   ========================================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--masthead-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.masthead-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.10);
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orbit-slot {
  display: inline-flex;
  align-items: center;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.cta-pill,
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.cta-pill:hover,
.ctrl-btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.cta-pill--broker {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(45, 212, 191, 0.11);
  color: var(--accent-teal);
}

[data-theme="light"] .cta-pill--broker {
  background: rgba(13, 148, 136, 0.09);
  border-color: rgba(13, 148, 136, 0.36);
}

.cta-pill--club {
  border-color: rgba(229, 185, 92, 0.48);
  background: rgba(229, 185, 92, 0.12);
  color: var(--accent-gold);
}

[data-theme="light"] .cta-pill--club {
  background: rgba(180, 123, 27, 0.09);
  border-color: rgba(180, 123, 27, 0.36);
}

.ctrl-btn--gold {
  border-color: transparent;
  background: linear-gradient(135deg, #E5B95C 0%, #C6922B 100%);
  color: #061014;
  font-weight: 700;
}

.ctrl-btn--gold:hover {
  background: linear-gradient(135deg, #F0CB78 0%, #D4A138 100%);
  border-color: transparent;
}

.ctrl-btn--compact {
  min-width: 40px;
  padding: 0 9px;
}

.ctrl-btn--icon {
  width: 34px;
  padding: 0;
  font-size: 14px;
}

/* ==========================================================================
   Main Workspace
   ========================================================================== */
.workspace {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Executive Regime Ribbon */
.regime-ribbon {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(370px, 1.02fr);
  gap: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow-card);
  align-items: center;
}

.regime-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.regime-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
}

.live-beacon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-teal);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.85);
  animation: gcLivePulse 2.4s var(--ease-kinetic) infinite;
}

@keyframes gcLivePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(16, 185, 129, 0.85); }
  50% { transform: scale(1.22); box-shadow: 0 0 14px rgba(45, 212, 191, 0.95); }
}

.meta-divider {
  opacity: 0.45;
}

.meta-stamp {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.free-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.v6-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border: 1px solid rgba(229, 185, 92, 0.42);
  background: rgba(229, 185, 92, 0.11);
  color: var(--accent-gold);
}

.regime-headline-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.regime-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid rgba(229, 185, 92, 0.46);
  background: rgba(229, 185, 92, 0.14);
  color: var(--accent-gold);
}

.regime-badge.is-defensive {
  border-color: rgba(244, 63, 94, 0.42);
  background: rgba(244, 63, 94, 0.13);
  color: var(--accent-rose);
}

.regime-badge.is-bull {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.13);
  color: var(--accent-emerald);
}

.regime-title {
  margin: 0;
  font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.regime-thesis {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}

.regime-pulse-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.pulse-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-kinetic), border-color 0.18s ease, background 0.18s ease;
}

.pulse-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
}

.pulse-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pulse-chip-dot--magnet { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }
.pulse-chip-dot--value { background: var(--accent-gold); box-shadow: 0 0 6px var(--accent-gold); }
.pulse-chip-dot--fx { background: var(--accent-teal); box-shadow: 0 0 6px var(--accent-teal); }

.pulse-chip strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

/* 3-Dial Kinetic Allocation Radial Gauges */
.regime-right--dials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: stretch;
}

.radial-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-kinetic);
}

.radial-gauge-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.radial-svg-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-svg {
  width: 78px;
  height: 78px;
  transform: rotate(-90deg);
}

.radial-track {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 7;
}

.radial-arc {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 219.91;
  stroke-dashoffset: 219.91;
  transition: stroke-dashoffset 0.85s var(--ease-kinetic), stroke 0.35s ease;
}

.radial-arc--teal { stroke: var(--accent-teal); }
.radial-arc--gold { stroke: var(--accent-gold); }
.radial-arc--emerald { stroke: var(--accent-emerald); }
.radial-arc--rose { stroke: var(--accent-rose); }

.radial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  pointer-events: none;
}

.radial-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.radial-sub {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-3);
  margin-top: 2px;
}

.radial-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.gauge-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.radial-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent-teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 6-Anchor Global Tape */
.anchor-tape {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.anchor-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-1);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.22s var(--ease-kinetic), background 0.18s ease, box-shadow 0.22s ease;
}

.anchor-cell:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.anchor-cell.is-active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1px rgba(229, 185, 92, 0.35), 0 6px 18px rgba(229, 185, 92, 0.12);
}

.anchor-k {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anchor-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.anchor-sub {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos { color: var(--accent-emerald); }
.neg { color: var(--accent-rose); }
.gold { color: var(--accent-gold); }
.teal { color: var(--accent-teal); }

/* ==========================================================================
   Panels & Hero #1 Atlas Grid
   ========================================================================== */
.panel {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-teal);
}

.panel-title {
  margin: 3px 0 0;
  font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.horizon-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.seg-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.seg-btn:hover {
  color: var(--text);
  background: rgba(45, 212, 191, 0.08);
}

.seg-btn.is-active {
  background: var(--accent-teal);
  color: #041316;
  border-color: transparent;
}

[data-theme="light"] .seg-btn.is-active {
  color: #FFFFFF;
}

.hero-atlas-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.82fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.atlas-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.region-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.region-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.region-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.region-pill.is-active {
  border-color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent-teal);
}

.atlas-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--text-3);
}

.legend-ramp {
  width: 96px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #E11D48 0%, #881337 26%, #1B3240 50%, #065F46 74%, #10B981 100%);
  border: 1px solid var(--border-subtle);
}

.svg-stage {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--svg-ocean);
  overflow: hidden;
}

.atlas-svg,
.duel-svg,
.fx-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.atlas-tile {
  cursor: pointer;
  transition: opacity 0.18s ease;
}

.atlas-tile:hover .tile-bg {
  filter: brightness(1.14);
}

.atlas-tile.is-dimmed {
  opacity: 0.22;
}

.chart-hud {
  position: absolute;
  z-index: 25;
  pointer-events: none;
  min-width: 210px;
  max-width: 270px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--hud-bg);
  box-shadow: var(--shadow-hud);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 11.5px;
  line-height: 1.45;
}

.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 1.5px 0;
}

.hud-k {
  color: var(--text-2);
}

.hud-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}

/* ==========================================================================
   Country Macro Inspector (Hero #1 Right Column)
   ========================================================================== */
.panel--inspector {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.insp-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.insp-ticker {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.42);
  color: var(--accent-teal);
}

.insp-name {
  margin: 0;
  font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 17.5px;
  font-weight: 700;
}

.insp-region-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-subtle);
}

.insp-price-box {
  text-align: right;
  flex-shrink: 0;
}

.insp-price {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
}

.insp-chg {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.insp-profile {
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

.insp-decomp-card {
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insp-decomp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}

.insp-fx-spot {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--accent-gold);
}

.insp-decomp-nums {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.decomp-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.decomp-k {
  font-size: 10px;
  color: var(--text-3);
}

.decomp-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 800;
}

.decomp-eq {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
}

.insp-split-track {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.split-row {
  display: grid;
  grid-template-columns: 58px 1fr 48px;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}

.split-bar-bg {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-1);
  position: relative;
  overflow: hidden;
}

.split-bar-zero {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--text-3);
  opacity: 0.45;
}

.split-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.insp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.insp-metric {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.im-label {
  font-size: 10.5px;
  color: var(--text-3);
}

.im-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 800;
}

.insp-range-box {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.insp-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-size: 11px;
  color: var(--text-2);
}

.insp-regime-pill,
.regime-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.regime-chip--bull { background: rgba(16, 185, 129, 0.16); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.36); }
.regime-chip--breakout { background: rgba(45, 212, 191, 0.16); color: var(--accent-teal); border: 1px solid rgba(45, 212, 191, 0.36); }
.regime-chip--pullback { background: rgba(56, 189, 248, 0.15); color: var(--accent-sky); border: 1px solid rgba(56, 189, 248, 0.34); }
.regime-chip--pivot { background: rgba(229, 185, 92, 0.16); color: var(--accent-gold); border: 1px solid rgba(229, 185, 92, 0.40); }
.regime-chip--bounce { background: rgba(245, 158, 11, 0.16); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.36); }
.regime-chip--bear { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border: 1px solid rgba(244, 63, 94, 0.34); }

.range-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-1);
}

.range-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-rose), var(--accent-gold), var(--accent-emerald));
}

.range-pin {
  position: absolute;
  top: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--accent-teal);
  transform: translateX(-50%);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--text-3);
}

.insp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn--teal {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent-teal);
}

.action-btn--gold {
  border-color: rgba(229, 185, 92, 0.48);
  background: rgba(229, 185, 92, 0.14);
  color: var(--accent-gold);
}

.kzgmap-inline-bridge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.08);
  color: var(--accent-emerald);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.kzgmap-inline-bridge:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--accent-emerald);
}

.kzgmap-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  flex-shrink: 0;
}

/* ==========================================================================
   Hero #2: 2-Country Rotation Duel & FX Attribution
   ========================================================================== */
.duel-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preset-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.preset-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.preset-pill.is-active {
  border-color: var(--accent-gold);
  background: rgba(229, 185, 92, 0.15);
  color: var(--accent-gold);
}

.pair-selectors {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.select-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.select-dot--a { background: var(--accent-teal); }
.select-dot--b { background: var(--accent-gold); }

.pair-select {
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.pair-select option {
  background: var(--surface-1);
  color: var(--text);
}

.swap-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--accent-teal);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.swap-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.duel-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.duel-stat-card {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.duel-stat-k {
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-stat-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 800;
}

.duel-stat-s {
  font-size: 10.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: start;
}

.subchart-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  font-size: 12px;
}

.subchart-title {
  font-weight: 700;
  color: var(--text);
}

.subchart-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: var(--text-3);
}

.subchart-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-2);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.leg-swatch {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.leg-swatch--a { background: var(--accent-teal); }
.leg-swatch--b { background: var(--accent-gold); }
.leg-swatch--ratio { background: var(--accent-sky); }

/* ==========================================================================
   Live 13-Currency FX Reference Strip
   ========================================================================== */
.panel--fx-strip {
  padding: 14px 18px;
}

.fx-strip-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.fx-strip-title {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 700;
}

.fx-strip-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-3);
}

.fx-tape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 7px;
}

.fx-chip {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fx-chip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.fx-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 800;
}

.fx-chg {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
}

.fx-chip-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 10.5px;
  color: var(--text-3);
}

.fx-chip-bot > span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ==========================================================================
   Hero #3: 18-Market Global Scorecard Table
   ========================================================================== */
.scorecard-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-input {
  height: 34px;
  width: 210px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-teal);
}

.kzgmap-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.13);
  color: var(--accent-emerald);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.14s ease;
}

.kzgmap-cta:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.22);
}

.scorecard-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.table-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

.table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 980px;
}

.scorecard-table thead th {
  position: sticky;
  top: 0;
  padding: 10px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.scorecard-table thead th.num {
  text-align: right;
}

.scorecard-table thead th.act {
  text-align: center;
  cursor: default;
}

.scorecard-table thead th:hover:not(.act) {
  color: var(--accent-teal);
}

.scorecard-table thead th.is-sorted-desc::after {
  content: ' ↓';
  color: var(--accent-teal);
}

.scorecard-table thead th.is-sorted-asc::after {
  content: ' ↑';
  color: var(--accent-teal);
}

.scorecard-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.12s ease;
}

.scorecard-table tbody tr:last-child {
  border-bottom: 0;
}

.scorecard-table tbody tr:hover {
  background: var(--row-hover);
}

.scorecard-table tbody tr.is-selected {
  background: var(--row-selected);
}

.scorecard-table tbody tr.is-anchor {
  background: rgba(45, 212, 191, 0.055);
}

.scorecard-table td {
  padding: 9px 10px;
  white-space: nowrap;
}

.scorecard-table td.num {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
}

.mkt-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-sym {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

.mkt-sym--anchor {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(229, 185, 92, 0.14);
}

.mkt-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.mkt-name {
  font-weight: 700;
  font-size: 12.5px;
}

.mkt-sub {
  font-size: 10.5px;
  color: var(--text-3);
}

.fx-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.2;
}

.fx-cell-sub {
  font-size: 10px;
  color: var(--text-3);
}

.dma-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.tbl-duel-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--accent-teal);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.tbl-duel-btn:hover {
  border-color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.16);
}

.kzgmap-companion-strip {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.30);
  background: rgba(16, 185, 129, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kzgmap-companion-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}

.kzgmap-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
}

.kzgmap-companion-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--accent-emerald);
  color: #03130E;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

[data-theme="light"] .kzgmap-companion-btn {
  color: #FFFFFF;
}

/* ==========================================================================
   Footer & Poster Modal
   ========================================================================== */
.atlas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 4px 0;
  font-size: 11.5px;
  color: var(--text-3);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(4, 10, 14, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text);
  padding: 18px 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  margin: 3px 0 0;
  font-family: Georgia, 'Songti SC', 'Noto Serif SC', serif;
  font-size: 17px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.poster-preview-wrap {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--svg-ocean);
  padding: 10px;
  display: flex;
  justify-content: center;
}

#poster-canvas {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
  display: block;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.poster-status {
  font-size: 12px;
  color: var(--accent-teal);
  font-weight: 600;
}

/* ==========================================================================
   Responsive Breakpoints (1280 / 1024 / 768 / 390)
   ========================================================================== */
.insp-horizons-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.hz-mini {
  padding: 5px 4px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.hz-mini:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.hz-mini.is-active {
  border-color: var(--accent-teal);
  background: rgba(45, 212, 191, 0.12);
}

.hz-mini-k {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-3);
}

.hz-mini-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

/* ==========================================================================
   R100-R129 Kinetic Upgrade: Replay HUD, Flow Trajectories, Radar Beacons,
   Inspector Drawer & Valuation Meter, Duel Tug-of-War & Scorecard Micro-Bars
   ========================================================================== */

/* Interactive Global Capital Rotation Replay Bar */
.replay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 11px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.07) 0%, var(--surface-2) 60%);
}

[data-theme="light"] .replay-bar {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.07) 0%, var(--surface-2) 60%);
}

.replay-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s var(--ease-kinetic), border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.replay-btn:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.replay-btn--play {
  border-color: rgba(45, 212, 191, 0.52);
  background: rgba(45, 212, 191, 0.14);
  color: var(--accent-teal);
}

.replay-btn--play.is-playing {
  background: var(--accent-teal);
  color: #041316;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.36);
}

[data-theme="light"] .replay-btn--play.is-playing {
  color: #FFFFFF;
}

.replay-btn--compact {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 38px;
  padding: 0 8px;
}

.replay-btn--flow.is-active {
  border-color: rgba(229, 185, 92, 0.50);
  background: rgba(229, 185, 92, 0.14);
  color: var(--accent-gold);
}

.replay-scrubber-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 190px;
}

.replay-scrubber {
  flex: 1;
  min-width: 100px;
  height: 6px;
  accent-color: var(--accent-teal);
  cursor: pointer;
}

.replay-readout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.replay-mode-pill {
  padding: 2px 7px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.40);
  color: var(--accent-emerald);
}

.replay-mode-pill.is-replaying {
  background: rgba(229, 185, 92, 0.18);
  border-color: rgba(229, 185, 92, 0.52);
  color: var(--accent-gold);
}

.replay-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  min-width: 78px;
  text-align: right;
}

/* Beacon Legend & 1-Click Outlier Jump Bar */
.beacon-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
}

.beacon-legend-items {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-2);
}

.beacon-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.beacon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.beacon-dot--magnet { background: var(--accent-emerald); box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
.beacon-dot--value { background: var(--accent-gold); box-shadow: 0 0 8px rgba(229, 185, 92, 0.8); }
.beacon-dot--breakout { background: var(--accent-teal); box-shadow: 0 0 8px rgba(45, 212, 191, 0.8); }

.outlier-jump-pills {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.outlier-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s var(--ease-kinetic), border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.outlier-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text);
}

.outlier-chip.is-active {
  border-color: var(--accent-gold);
  background: rgba(229, 185, 92, 0.16);
  color: var(--accent-gold);
}

.outlier-chip--magnet { border-color: rgba(16, 185, 129, 0.38); color: var(--accent-emerald); }
.outlier-chip--value { border-color: rgba(229, 185, 92, 0.38); color: var(--accent-gold); }
.outlier-chip--breakout { border-color: rgba(45, 212, 191, 0.38); color: var(--accent-teal); }

/* SVG Kinetic Trajectories, Pulsing Radar Beacons & Micro-Bars */
.atlas-flow-arc {
  stroke-dasharray: 7 5;
  animation: gcFlowMarch 2.6s linear infinite;
}

.atlas-flow-draw {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: gcFlowDraw 0.9s var(--ease-kinetic) forwards;
}

@keyframes gcFlowMarch {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}

@keyframes gcFlowDraw {
  to { stroke-dashoffset: 0; }
}

.beacon-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: gcRadarPulse 2.4s var(--ease-kinetic) infinite;
  pointer-events: none;
}

.beacon-ring--delay {
  animation-delay: 1.2s;
}

@keyframes gcRadarPulse {
  0% { transform: scale(0.75); opacity: 0.92; }
  75% { transform: scale(2.15); opacity: 0.08; }
  100% { transform: scale(2.35); opacity: 0; }
}

.tile-micro-bar {
  transform-box: fill-box;
  transform-origin: left center;
  animation: gcBarGrowX 0.56s var(--ease-kinetic) both;
}

@keyframes gcBarGrowX {
  from { transform: scaleX(0); opacity: 0.4; }
  to { transform: scaleX(1); opacity: 1; }
}

/* Country Inspector Kinetic Drawer & Valuation Discount Meter */
.panel--inspector.is-kinetic-swap {
  animation: gcDrawerReveal 0.34s var(--ease-kinetic);
}

@keyframes gcDrawerReveal {
  0% { opacity: 0.72; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.split-bar-fill {
  transition: left 0.58s var(--ease-kinetic), width 0.58s var(--ease-kinetic), background-color 0.25s ease;
}

.insp-range-head--sub {
  margin-top: 4px;
}

.insp-val-zone {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent-gold);
}

.val-meter-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(229, 185, 92, 0.28) 0%, var(--surface-1) 50%, rgba(16, 185, 129, 0.28) 100%);
  border: 1px solid var(--border-subtle);
}

.val-meter-zero {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1.5px;
  background: var(--text-3);
  opacity: 0.65;
}

.val-meter-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  transition: left 0.58s var(--ease-kinetic), width 0.58s var(--ease-kinetic), background-color 0.25s ease;
}

.val-meter-pin {
  position: absolute;
  top: -3.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: 2px solid var(--surface-1);
  box-shadow: 0 0 8px rgba(229, 185, 92, 0.75);
  transform: translateX(-50%);
  transition: left 0.58s var(--ease-kinetic);
}

.range-fill {
  transition: width 0.58s var(--ease-kinetic);
}

.range-pin {
  transition: left 0.58s var(--ease-kinetic);
}

/* Hero #2: Kinetic Country Duel Tug-of-War Arena & SVG Stroke-Draw */
.duel-tug-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tug-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tug-verdict {
  padding: 2px 9px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.36);
  color: var(--accent-teal);
}

.tug-verdict.is-b-lead {
  background: rgba(229, 185, 92, 0.15);
  border-color: rgba(229, 185, 92, 0.40);
  color: var(--accent-gold);
}

.tug-tracks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tug-lane {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
}

.tug-lane-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 700;
}

.tug-lane-top > :last-child {
  text-align: right;
}

.tug-lane-lbl {
  color: var(--text-3);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
}

.tug-bar-shell {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
}

.tug-bar-a {
  height: 100%;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.72), var(--accent-teal));
  transition: width 0.65s var(--ease-kinetic);
}

.tug-bar-b {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), rgba(229, 185, 92, 0.72));
  transition: width 0.65s var(--ease-kinetic);
}

.tug-bar-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg);
  transform: translateX(-50%);
  z-index: 2;
}

.duel-stroke-draw {
  stroke-dasharray: 2200;
  stroke-dashoffset: 2200;
  animation: gcDuelStroke 0.85s var(--ease-kinetic) forwards;
}

.duel-stroke-draw--delay {
  animation-delay: 0.12s;
}

@keyframes gcDuelStroke {
  to { stroke-dashoffset: 0; }
}

.duel-end-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: gcRadarPulse 2.2s var(--ease-kinetic) infinite;
  pointer-events: none;
}

.fx-bar-kinetic {
  transform-box: fill-box;
  animation: gcBarGrowX 0.56s var(--ease-kinetic) both;
}

.fx-bar-kinetic--neg {
  transform-origin: right center;
}

.fx-bar-kinetic--pos {
  transform-origin: left center;
}

.fx-leader-row {
  cursor: pointer;
  transition: opacity 0.16s ease;
}

.fx-leader-row:hover {
  opacity: 0.85;
}

/* Clickable FX Tape Chips */
.fx-chip {
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s var(--ease-kinetic), border-color 0.18s ease, background 0.18s ease;
}

.fx-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.fx-chip.is-active {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.30);
}

/* Scorecard CSV Button & Inline Micro-Bars */
.ctrl-btn--csv {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(45, 212, 191, 0.10);
  color: var(--accent-teal);
}

.ctrl-btn--csv:hover {
  background: rgba(45, 212, 191, 0.20);
}

.tbl-ret-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.tbl-bar-track {
  width: 58px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.tbl-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  transition: width 0.5s var(--ease-kinetic), left 0.5s var(--ease-kinetic);
}

.tbl-z-sub {
  font-size: 9.5px;
  color: var(--text-3);
}

@media (max-width: 1220px) {
  .anchor-tape {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-atlas-grid {
    grid-template-columns: 1fr;
  }
  .duel-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1060px) {
  .regime-ribbon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .duel-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .duel-summary-strip .duel-stat-card:last-child {
    grid-column: span 2;
  }
  .tug-tracks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .masthead-inner {
    padding: 10px 12px;
    gap: 8px;
  }
  .brand-mark-link {
    min-height: 40px;
  }
  .brand-sub {
    display: none;
  }
  .workspace {
    padding: 12px 12px 28px;
    gap: 12px;
  }
  .panel,
  .regime-ribbon {
    padding: 14px;
    border-radius: 14px;
  }
  .regime-title {
    font-size: 17px;
  }
  .regime-right--dials {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .radial-gauge-card {
    padding: 8px 4px;
  }
  .radial-gauge-card .gauge-label {
    font-size: 9.5px;
  }
  .radial-svg-wrap,
  .radial-svg {
    width: 66px;
    height: 66px;
  }
  .radial-val {
    font-size: 11.5px;
  }
  .anchor-tape {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .horizon-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #atlas-horizon-bar .seg-btn:nth-child(5) {
    grid-column: span 1;
  }
  #atlas-horizon-bar .seg-btn:nth-child(6) {
    grid-column: span 2;
  }
  #atlas-horizon-bar .seg-btn:nth-child(7) {
    grid-column: span 1;
  }
  .replay-bar {
    padding: 10px;
    gap: 8px;
  }
  .replay-btn-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1.4fr 0.65fr 0.75fr 1.2fr;
    gap: 6px;
  }
  .replay-scrubber-wrap {
    width: 100%;
    min-width: 0;
  }
  .search-input {
    width: 100%;
  }
  .scorecard-tools {
    width: 100%;
  }
  /* Mobile 390px: Strict >= 40px touch targets across ALL interactive controls + v6.0 shared controls */
  .cta-pill,
  .ctrl-btn,
  .seg-btn,
  .region-pill,
  .preset-pill,
  .action-btn,
  .swap-btn,
  .select-wrap,
  .kzgmap-cta,
  .kzgmap-companion-btn,
  .kzgmap-inline-bridge,
  .tbl-duel-btn,
  .hz-mini,
  .modal-close,
  .search-input,
  .replay-btn,
  .outlier-chip,
  .pulse-chip,
  .fx-chip,
  #kzg-orbit-trigger,
  .kzg-orbit-trigger,
  .kzg-growth-btn,
  .kzg-vote-btn,
  .kzg-vote-input {
    min-height: 40px !important;
  }
  #kzg-orbit-trigger,
  .kzg-orbit-trigger {
    height: auto !important;
    padding: 8px 11px !important;
  }
  .ctrl-btn--icon,
  .swap-btn,
  .modal-close {
    min-width: 40px;
  }
  .cta-pill,
  .ctrl-btn {
    padding: 0 10px;
    font-size: 11.5px;
  }
  .masthead-actions {
    width: 100%;
    gap: 6px;
  }
  .masthead-actions .cta-pill {
    flex: 1 1 auto;
  }
  .duel-summary-strip {
    grid-template-columns: 1fr;
  }
  .duel-summary-strip .duel-stat-card:last-child {
    grid-column: span 1;
  }
  .fx-tape-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fx-tape-grid .fx-chip:last-child:nth-child(odd) {
    grid-column: span 2;
  }
}

/* Comprehensive Reduced-Motion Accessibility Support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .live-dot,
  .atlas-flow-arc,
  .atlas-flow-draw,
  .beacon-ring,
  .duel-stroke-draw,
  .duel-end-pulse,
  .fx-bar-kinetic,
  .tile-micro-bar,
  .panel--inspector.is-kinetic-swap {
    animation: none !important;
  }
  .atlas-flow-draw,
  .duel-stroke-draw {
    stroke-dashoffset: 0 !important;
  }
}

