/* ═══════════════════════════════════════════════════════
   Bitcoin Codex — Cycle Observatory
   Premium institutional dark theme — v2
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:         #07080b;
  --surface-1:  #0d0f13;
  --surface-2:  #12141a;
  --surface-3:  #191c24;
  --surface-4:  #1f222c;
  --border:     rgba(255,255,255,0.05);
  --border-2:   rgba(255,255,255,0.08);

  --text:       #ece7db;
  --text-2:     #c2bbb0;
  --text-muted: #7d766c;

  --bronze:     #c9a96e;
  --bronze-bright: #dbbf85;
  --bronze-dim: rgba(201,169,110,0.14);
  --sage:       #5d8a68;
  --emerald:    #5cc06e;
  --emerald-bright: #72d886;
  --coral:      #d46b58;
  --coral-bright: #e8836f;
  --coral-dim:  rgba(212,107,88,0.12);
  --steel:      #5a7d9a;
  --steel-dim:  rgba(90,125,154,0.10);
  --neutral-c:  #8a8f95;

  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'IBM Plex Sans', -apple-system, sans-serif;
  --mono:       'IBM Plex Mono', 'SF Mono', monospace;

  --gap:        14px;
  --radius:     6px;
  --radius-sm:  4px;
}

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

html {
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient top glow */
.ambient-glow {
  position: fixed;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 850px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(201,169,110,0.045) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--bronze); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--bronze-bright); }

::selection { background: rgba(201,169,110,0.22); color: var(--text); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,169,110,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,169,110,0.3); }

/* ─── Suite nav ─── */
.suite-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 32px 10px;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0.96) 0%, rgba(7, 8, 11, 0.88) 100%);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(201,169,110,0.14);
}

.suite-nav-shell {
  width: 100%;
  position: relative;
}

.suite-nav-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  list-style: none;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(201,169,110,0.16);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suite-nav-toggle::-webkit-details-marker { display: none; }
.suite-nav-toggle::after { content: '▾'; font-size: 10px; transition: transform .2s; }
.suite-nav-shell[open] .suite-nav-toggle::after { transform: rotate(180deg); }

.suite-nav-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.suite-nav-links,
.suite-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.suite-nav-link,
.suite-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,110,0.16);
  background: rgba(255,255,255,0.03);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suite-nav-link:hover,
.suite-nav-btn:hover {
  color: var(--text);
  border-color: rgba(201,169,110,0.34);
  background: rgba(201,169,110,0.12);
}

.suite-nav-link.active {
  color: var(--text);
  border-color: rgba(201,169,110,0.45);
  background: rgba(201,169,110,0.18);
  box-shadow: 0 0 18px rgba(201,169,110,0.12);
}

@media (max-width: 900px) {
  .suite-nav { padding: 10px 12px; }
  .suite-nav-toggle { display: inline-flex; }
  .suite-nav-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    padding: 10px;
    border: 1px solid rgba(201,169,110,0.14);
    border-radius: 16px;
    background: rgba(7, 8, 11, 0.98);
    box-shadow: 0 18px 48px rgba(0,0,0,.45);
  }
  .suite-nav-shell[open] .suite-nav-panel { display: grid; }
  .suite-nav-panel .suite-nav-links,
  .suite-nav-panel .suite-nav-actions { display: grid; }
  .suite-nav-panel .suite-nav-link,
  .suite-nav-panel .suite-nav-btn { width: 100%; justify-content: flex-start; }
}

@media (min-width: 901px) {
  .suite-nav-toggle { display: none; }
  .suite-nav-panel {
    display: flex !important;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* ─── Layout ─── */
.app {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px 32px;
  display: grid;
  gap: var(--gap);
}

/* ─── Header ─── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 0 14px;
  border-bottom: 1px solid rgba(201,169,110,0.14);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.1;
}
.wordmark span {
  font-weight: 700;
  color: var(--bronze);
  text-shadow: 0 0 20px rgba(201,169,110,0.1);
}

.tagline {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-kpis { display: flex; gap: 26px; }
.kpi { display: flex; flex-direction: column; align-items: flex-end; }
.kpi-label {
  font-family: var(--mono);
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.kpi-value {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 1px;
}
.kpi-price { font-size: 0.92rem; color: var(--text) !important; }

/* ─── Regime Hero ─── */
.regime-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px;
  gap: 36px;
  background: linear-gradient(145deg, var(--surface-1) 0%, var(--surface-2) 50%, rgba(201,169,110,0.025) 100%);
  border: 1px solid rgba(201,169,110,0.09);
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.02);
}

.regime-eyebrow {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 6px;
  text-shadow: 0 0 14px rgba(201,169,110,0.12);
}

.regime-name {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.05;
}

.regime-explanations { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.regime-explanations .expl {
  font-size: 0.78rem;
  color: var(--text-2);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.regime-explanations .expl::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--bronze);
  opacity: 0.4;
}

.regime-right { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }

/* Score Ring */
.score-ring { width: 116px; height: 116px; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fill {
  fill: none;
  stroke: var(--bronze);
  stroke-width: 6;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.regime-score-ring { position: relative; }
.score-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.score-num {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  display: block;
  line-height: 1;
}
.score-max { font-family: var(--mono); font-size: 0.55rem; color: var(--text-muted); }

.regime-kpis { display: flex; flex-direction: column; gap: 10px; }
.regime-kpi-label {
  font-family: var(--mono);
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
}
.regime-kpi-value {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1px;
}

/* ─── Regime Track ─── */
.regime-track-wrap { position: relative; margin-top: -2px; }

.regime-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201,169,110,0.14);
  box-shadow: 0 0 16px rgba(201,169,110,0.04);
}

.zone {
  padding: 18px 8px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.03);
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.zone:last-child { border-right: none; }

.zone[data-zone="Distribution"]           { background: rgba(192,112,96,0.04); }
.zone[data-zone="Neutral"]               { background: rgba(138,143,149,0.03); }
.zone[data-zone="Early Value"]           { background: rgba(201,169,110,0.04); }
.zone[data-zone="Deep Value"]            { background: rgba(93,138,104,0.05); }
.zone[data-zone="Capitulation Recovery"] { background: rgba(106,173,122,0.05); }

.zone span {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: all 0.5s;
}
.zone em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.56rem;
  color: rgba(125,118,108,0.35);
  transition: color 0.5s;
  line-height: 1.4;
}

/* Active zone states */
.zone.active[data-zone="Distribution"] {
  background: rgba(212,107,88,0.20);
  box-shadow: inset 0 -3px 0 var(--coral);
}
.zone.active[data-zone="Distribution"] span { color: var(--coral-bright); font-weight: 500; text-shadow: 0 0 12px rgba(212,107,88,0.35); }

.zone.active[data-zone="Neutral"] {
  background: rgba(138,143,149,0.14);
  box-shadow: inset 0 -3px 0 #8a8f95;
}
.zone.active[data-zone="Neutral"] span { color: #8a8f95; font-weight: 500; }

.zone.active[data-zone="Early Value"] {
  background: rgba(201,169,110,0.18);
  box-shadow: inset 0 -3px 0 var(--bronze);
}
.zone.active[data-zone="Early Value"] span { color: var(--bronze); font-weight: 500; }

.zone.active[data-zone="Deep Value"] {
  background: rgba(92,192,110,0.18);
  box-shadow: inset 0 -3px 0 var(--emerald);
}
.zone.active[data-zone="Deep Value"] span { color: var(--emerald-bright); font-weight: 500; text-shadow: 0 0 12px rgba(92,192,110,0.30); }

.zone.active[data-zone="Capitulation Recovery"] {
  background: rgba(92,192,110,0.22);
  box-shadow: inset 0 -3px 0 var(--emerald-bright);
}
.zone.active[data-zone="Capitulation Recovery"] span { color: var(--emerald-bright); font-weight: 500; text-shadow: 0 0 14px rgba(92,192,110,0.40); }

.zone.active em { color: rgba(232,226,214,0.4); }

/* Needle */
.track-needle {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(201,169,110,0.3), var(--bronze), var(--bronze-bright));
  border-radius: 0 0 var(--radius) var(--radius);
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 14px rgba(201,169,110,0.35), 0 0 5px rgba(201,169,110,0.55);
  overflow: visible;
}

.track-arrow {
  position: absolute;
  right: -2px;
  top: -20px;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.4s, transform 0.4s;
}
.track-arrow--up {
  color: var(--emerald-bright);
  text-shadow: 0 0 10px rgba(106,173,122,0.55);
  animation: pulseUp 2s ease-in-out infinite;
}
.track-arrow--down {
  color: var(--coral-bright);
  text-shadow: 0 0 10px rgba(192,112,96,0.55);
  animation: pulseDown 2s ease-in-out infinite;
}
.track-arrow--flat {
  color: var(--bronze-bright);
  text-shadow: 0 0 6px rgba(201,169,110,0.3);
}

@keyframes pulseUp {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-2px); opacity: 0.6; }
}
@keyframes pulseDown {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(2px); opacity: 0.6; }
}

/* ─── Verdict Banner ─── */
.verdict-banner {
  border-radius: var(--radius);
  padding: 22px 28px;
  position: relative;
  overflow: hidden;
}
.verdict-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0.06;
  pointer-events: none;
}
.verdict-buy-banner   { background: linear-gradient(135deg, rgba(92,192,110,0.12) 0%, var(--surface-1) 60%); border: 1px solid rgba(92,192,110,0.22); }
.verdict-buy-banner::before { background: radial-gradient(ellipse at 0% 0%, rgba(92,192,110,0.5), transparent 70%); }
.verdict-sell-banner  { background: linear-gradient(135deg, rgba(212,107,88,0.12) 0%, var(--surface-1) 60%); border: 1px solid rgba(212,107,88,0.22); }
.verdict-sell-banner::before { background: radial-gradient(ellipse at 0% 0%, rgba(212,107,88,0.5), transparent 70%); }
.verdict-wait-banner  { background: linear-gradient(135deg, rgba(201,169,110,0.08) 0%, var(--surface-1) 60%); border: 1px solid rgba(201,169,110,0.16); }
.verdict-wait-banner::before { background: radial-gradient(ellipse at 0% 0%, rgba(201,169,110,0.4), transparent 70%); }

.verdict-action {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.verdict-buy   { background: rgba(92,192,110,0.16); color: var(--emerald-bright); border: 1px solid rgba(92,192,110,0.30); }
.verdict-sell  { background: rgba(212,107,88,0.16); color: var(--coral-bright); border: 1px solid rgba(212,107,88,0.30); }
.verdict-wait  { background: rgba(201,169,110,0.12); color: var(--bronze-bright); border: 1px solid rgba(201,169,110,0.22); }

.verdict-headline {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}
.verdict-detail {
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--text-2);
}

/* ─── Pillar Cards ─── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.pillar {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.16);
  position: relative;
  overflow: visible;
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.14), transparent);
}
.pillar:hover {
  border-color: rgba(201,169,110,0.14);
  box-shadow: 0 5px 24px rgba(0,0,0,0.24), 0 0 0 1px rgba(201,169,110,0.05);
  transform: translateY(-1px);
}
.pillar--context { opacity: 0.78; }
.pillar--context:hover { opacity: 0.94; }

.pillar-top { display: flex; align-items: flex-start; gap: 9px; }

.pillar-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bronze-dim);
  color: var(--bronze);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.badge--muted { background: var(--steel-dim); color: var(--steel); }

.pillar-meta { flex: 1; }
.pillar-meta h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pillar-weight {
  font-family: var(--mono);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-top: 1px;
  display: block;
}

.pillar-score-block { margin-left: auto; }
.pillar-score {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.score-positive { color: var(--emerald-bright) !important; text-shadow: 0 0 10px rgba(92,192,110,0.25); }
.score-neutral  { color: var(--bronze-bright) !important; }
.score-negative { color: var(--coral-bright) !important; text-shadow: 0 0 10px rgba(212,107,88,0.25); }

.pillar-desc {
  font-size: 0.73rem;
  color: var(--text-2);
  line-height: 1.65;
  padding: 11px 14px;
  margin: 10px 0 0;
  background: rgba(201,169,110,0.04);
  border: 1px solid rgba(201,169,110,0.08);
  border-left: 3px solid rgba(201,169,110,0.20);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  overflow-y: auto;
}
.pillar-desc strong {
  color: var(--text);
  font-weight: 600;
}

.pillar-interp {
  font-size: 0.72rem;
  color: var(--text-2);
  line-height: 1.55;
  padding: 10px 13px;
  margin: 8px 0 6px;
  background: rgba(201,169,110,0.025);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201,169,110,0.06);
  font-weight: 400;
  font-style: italic;
}

.pillar-metrics { display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* ─── Metric Cards ─── */
.metric-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(201,169,110,0.18);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.22s;
  position: relative;
  cursor: default;
}
.metric-card:hover {
  background: var(--surface-3);
  border-left-color: var(--bronze);
}

.metric-card.tone-positive { border-left-color: var(--emerald); background: rgba(92,192,110,0.03); }
.metric-card.tone-positive:hover { border-left-color: var(--emerald-bright); background: rgba(92,192,110,0.06); }
.metric-card.tone-negative { border-left-color: var(--coral); background: rgba(212,107,88,0.03); }
.metric-card.tone-negative:hover { border-left-color: var(--coral-bright); background: rgba(212,107,88,0.06); }
.metric-card.tone-neutral  { border-left-color: rgba(201,169,110,0.30); }
.metric-card.tone-neutral:hover  { border-left-color: var(--bronze); }

.metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.metric-name {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.metric-val {
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.metric-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.70rem;
  color: var(--text-2);
  line-height: 1.45;
}

.tone-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tone-dot.positive { background: var(--emerald); box-shadow: 0 0 8px rgba(92,192,110,0.55); }
.tone-dot.neutral  { background: var(--bronze); box-shadow: 0 0 6px rgba(201,169,110,0.35); }
.tone-dot.negative { background: var(--coral); box-shadow: 0 0 8px rgba(212,107,88,0.50); }

/* Sparklines */
.spark-wrap { height: 24px; margin-top: 2px; }
.spark-wrap svg { width: 100%; height: 100%; }
.spark-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke: var(--neutral-c); }
.spark-area { opacity: 0.75; fill: rgba(138,143,149,0.07); }

.metric-card.tone-positive .spark-line { stroke: var(--emerald); }
.metric-card.tone-positive .spark-area { fill: rgba(106,173,122,0.10); }
.metric-card.tone-negative .spark-line { stroke: var(--coral); }
.metric-card.tone-negative .spark-area { fill: rgba(192,112,96,0.08); }
.metric-card.tone-neutral  .spark-line { stroke: var(--bronze); }
.metric-card.tone-neutral  .spark-area { fill: rgba(201,169,110,0.07); }

/* ─── Tooltips ─── */
.has-tooltip { position: relative; }
.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  width: clamp(220px, 90%, 320px);
  padding: 10px 14px;
  background: var(--surface-4);
  border: 1px solid rgba(201,169,110,0.20);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  font-family: var(--sans);
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--text-2);
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 200;
}
.has-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Keep tooltip inside viewport for edge cards */
.pillar:first-child .has-tooltip::after { left: 0; transform: translateX(0) translateY(-3px); }
.pillar:first-child .has-tooltip:hover::after { transform: translateX(0) translateY(0); }
.pillar:last-child .has-tooltip::after { left: auto; right: 0; transform: translateX(0) translateY(-3px); }
.pillar:last-child .has-tooltip:hover::after { transform: translateX(0) translateY(0); }

/* ─── Lower Grid: Chart + Signal Rail ─── */
.lower-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: calc(var(--gap) * 1.4);
  align-items: stretch;
}

.chart-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px 22px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

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

.chart-eyebrow {
  font-family: var(--mono);
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 3px;
  text-shadow: 0 0 10px rgba(201,169,110,0.08);
}

.chart-header h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-2);
}

.chart-controls { display: flex; gap: 4px; flex-shrink: 0; }
.range-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.06em;
}
.range-btn:hover { background: var(--surface-3); color: var(--text-2); }
.range-btn.active {
  background: var(--bronze-dim);
  border-color: rgba(201,169,110,0.22);
  color: var(--bronze-bright);
}

/* Chart fills remaining space */
.hero-chart {
  flex: 1;
  min-height: 720px;
  width: 100%;
}

/* Alert triggers — below chart */
.chart-alert {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* ─── Signal Rail ─── */
.signal-rail {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.rail-header { margin-bottom: 12px; }
.rail-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: var(--sans);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.rail-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(201,169,110,0.18);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  transition: all 0.22s;
  cursor: default;
  position: relative;
}
.rail-card:hover {
  background: var(--surface-3);
  border-left-color: var(--bronze);
}
.rail-positive { border-left-color: var(--emerald); background: rgba(92,192,110,0.04); }
.rail-positive:hover { border-left-color: var(--emerald-bright); background: rgba(92,192,110,0.07); }
.rail-negative { border-left-color: var(--coral); background: rgba(212,107,88,0.04); }
.rail-negative:hover { border-left-color: var(--coral-bright); background: rgba(212,107,88,0.07); }
.rail-neutral  { border-left-color: var(--bronze); }
.rail-neutral:hover  { border-left-color: var(--bronze-bright); }

.rail-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.rail-card-name {
  font-family: var(--mono);
  font-size: 0.60rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.rail-card-value {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.rail-positive .rail-card-value { color: var(--emerald-bright); }
.rail-negative .rail-card-value { color: var(--coral-bright); }
.rail-neutral  .rail-card-value { color: var(--bronze-bright); }

.rail-card-body {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--text-2);
  line-height: 1.45;
}

/* ─── Rail Tally ─── */
.rail-tally {
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.rail-tally-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-3);
  margin-bottom: 8px;
}
.tally-pos  { background: var(--emerald); transition: width 0.6s ease; }
.tally-neut { background: var(--bronze); opacity: 0.5; transition: width 0.6s ease; }
.tally-neg  { background: var(--coral); transition: width 0.6s ease; }

.rail-tally-text {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.tally-label {
  font-family: var(--mono);
  font-size: 0.60rem;
  letter-spacing: 0.04em;
}
.tally-label--pos  { color: var(--emerald-bright); }
.tally-label--neut { color: var(--text-muted); }
.tally-label--neg  { color: var(--coral-bright); }

.rail-tally-note {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* ─── Footer ─── */
.footer {
  text-align: center;
  padding: 14px 0 8px;
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(201,169,110,0.08);
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.foot-sep { color: rgba(201,169,110,0.25); }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.regime-hero     { animation: fadeUp 0.5s ease both; }
.regime-track-wrap { animation: fadeUp 0.5s ease 0.05s both; }
.pillars .pillar:nth-child(1) { animation: fadeUp 0.45s ease 0.10s both; }
.pillars .pillar:nth-child(2) { animation: fadeUp 0.45s ease 0.15s both; }
.pillars .pillar:nth-child(3) { animation: fadeUp 0.45s ease 0.20s both; }
.pillars .pillar:nth-child(4) { animation: fadeUp 0.45s ease 0.25s both; }
.chart-section   { animation: fadeUp 0.5s ease 0.30s both; }
.signal-rail     { animation: fadeUp 0.5s ease 0.35s both; }

/* ─── Responsive ─── */
@media (max-width: 1280px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .lower-grid { grid-template-columns: 1fr; }
  .signal-rail { max-height: 360px; overflow-y: auto; }
}

@media (max-width: 600px) {
  .suite-nav {
    padding: 12px 10px 8px;
    align-items: flex-start;
    flex-direction: column;
  }

  .suite-nav-links,
  .suite-nav-actions {
    width: 100%;
  }

  .app { padding: 12px 10px; }
  .pillars { grid-template-columns: 1fr; }
  .header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .header-kpis { align-self: flex-start; }
  .regime-hero { flex-direction: column; padding: 20px; gap: 20px; }
  .hero-chart { min-height: 260px; }
}
