/* ── Reset & base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Maya/Autodesk DCC palette — mid-gray surfaces, depth via darker borders */
  --bg:        #282828;
  --surface:   #323232;
  --surface2:  #3c3c3c;
  --surface3:  #464646;
  --border:    #1e1e1e;
  --border2:   #161616;
  --text:      #cccccc;
  --text2:     #a0a0a0;
  --muted:     #6e6e6e;
  --dim:       #4e4e4e;

  /* Accents — single steel blue primary, muted functional colors */
  --green:     #5aab78;
  --green-dim: rgba(90,171,120,0.15);
  --green-b:   rgba(90,171,120,0.30);
  --red:       #b85c5c;
  --red-dim:   rgba(184,92,92,0.15);
  --red-b:     rgba(184,92,92,0.30);
  --amber:     #b8902e;
  --amber-dim: rgba(184,144,46,0.15);
  --amber-b:   rgba(184,144,46,0.30);
  --blue:      #4a90d9;
  --blue-dim:  rgba(74,144,217,0.15);
  --blue-b:    rgba(74,144,217,0.30);
  --purple:    #8f7ec0;
  --purple-dim:rgba(143,126,192,0.15);
  --purple-b:  rgba(143,126,192,0.30);

  --sidebar-w: 210px;
  --drawer-w:  380px;
  --radius:    8px;
  --shadow:    0 2px 8px rgba(0,0,0,0.4);
}

html { height: 100%; }
body { min-height: 100%; overflow-y: auto; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  display: flex;
}

/* ── Sidebar ───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #1e1e1e;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  padding: 20px 0 14px;
}
.sidebar-brand {
  padding: 0 16px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}
.brand-updated { font-size: 11px; color: var(--dim); }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  width: 100%;
}
.nav-item:hover { background: var(--surface2); color: var(--text2); }
.nav-item.active { background: var(--blue-dim); color: var(--blue); font-weight: 600; }
.nav-icon { font-size: 11px; }

.sidebar-alert {
  margin: 10px;
  padding: 8px 12px;
  background: var(--red-dim);
  border: 1px solid var(--red-b);
  border-radius: 6px;
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  line-height: 1.4;
}
.sidebar-alert.hidden { display: none; }

.sidebar-footer {
  padding: 12px 16px 0;
  font-size: 11px;
  color: var(--dim);
  border-top: 1px solid var(--border);
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

/* ── Main ──────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  transition: margin-right 0.25s;
}
.main.drawer-open { margin-right: var(--drawer-w); }

/* ── Tabs ──────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Page header ───────────────────────────────── */
.page-header { margin-bottom: 22px; }
.page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.page-sub { font-size: 12px; color: var(--muted); }

/* ── Cards ─────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid var(--surface3);
  border-left: 1px solid var(--surface3);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 8px rgba(0,0,0,0.5);
}
.mt-16 { margin-top: 16px; }

.card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
}
.card-label.green  { color: var(--green);  background: var(--green-dim);  border: 1px solid var(--green-b); }
.card-label.red    { color: var(--red);    background: var(--red-dim);    border: 1px solid var(--red-b); }
.card-label.amber  { color: var(--amber);  background: var(--amber-dim);  border: 1px solid var(--amber-b); }
.card-label.blue   { color: var(--blue);   background: var(--blue-dim);   border: 1px solid var(--blue-b); }
.card-label.purple { color: var(--purple); background: var(--purple-dim); border: 1px solid var(--purple-b); }
.card-label.gray   { color: var(--muted);  background: var(--surface2);   border: 1px solid var(--border); }

/* ── Bullet panels ─────────────────────────────── */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.bullet-list li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}
.bullet-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}
.bullet-list li strong { color: var(--text); font-weight: 700; }

.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 14px;
}
.geo-card { height: fit-content; }

.expand-toggle {
  background: none; border: none;
  color: var(--blue); font-size: 12px;
  cursor: pointer; padding: 0; font-weight: 500;
}
.expand-toggle:hover { text-decoration: underline; }

.expand-body {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.75;
}
.expand-body.open { display: block; }
.expand-body p { margin-bottom: 8px; }
.expand-body p:last-child { margin-bottom: 0; }
.expand-body strong { color: var(--text); }
.expand-body h1,.expand-body h2,.expand-body h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 12px 0 6px; }
.expand-body ul { padding-left: 18px; }
.expand-body li { margin-bottom: 4px; }

.data-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}
.chip {
  font-size: 11px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.chip.clickable {
  cursor: pointer;
  color: var(--blue);
  border-color: var(--blue-b);
  background: var(--blue-dim);
}
.chip.clickable:hover { background: rgba(96,165,250,0.2); }

.panel-conf { font-size: 11px; color: var(--dim); margin-top: 8px; font-style: italic; }

/* ── Causation chain ───────────────────────────── */
.chain-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 8px;
}
.chain-trigger {
  font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.45;
  border-left: 4px solid var(--amber); padding-left: 14px;
}
.chain-steps { display: flex; flex-direction: column; gap: 10px; }
.chain-step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--text); line-height: 1.5;
}
.chain-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--amber-dim); border: 1px solid var(--amber-b);
  color: var(--amber); font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}
.chain-outcome {
  background: var(--amber-dim); border: 1px solid var(--amber-b);
  border-radius: 6px; padding: 14px 18px;
  font-size: 16px; color: var(--text); font-weight: 600; line-height: 1.5;
}
.chain-conf-line { font-size: 13px; color: var(--muted); margin-top: 12px; font-style: italic; }
.chain-fallback { font-size: 15px; color: var(--text); line-height: 1.65; }
.chain-fallback p { margin: 0 0 12px; }
.chain-fallback ul, .chain-fallback ol { padding-left: 20px; margin: 0 0 12px; }
.chain-fallback li { margin-bottom: 6px; }

/* ── Overview grid ─────────────────────────────── */
.overview-grid { display: flex; flex-direction: column; gap: 16px; }
.two-col-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Curated news ──────────────────────────────── */
/* ── Voices ────────────────────────────────────────── */
.voices-sub { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.voice-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.voice-card:first-child { padding-top: 0; }
.voice-card:last-child  { border-bottom: none; padding-bottom: 0; }
.voice-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.voice-name  { font-size: 16px; font-weight: 700; color: var(--text); }
.voice-title { font-size: 13px; color: var(--muted); margin-top: 2px; }
.voice-src-link { font-size: 13px; color: var(--blue); text-decoration: none; white-space: nowrap; margin-top: 2px; }
.voice-src-link:hover { text-decoration: underline; }
.voice-view  {
  font-size: 16px; color: var(--text); line-height: 1.5;
  border-left: 3px solid var(--purple); padding-left: 12px; margin-bottom: 10px;
}
.voice-plain {
  font-size: 15px; color: var(--text2); line-height: 1.5;
  background: var(--surface2); border-radius: 6px; padding: 10px 14px;
  margin-bottom: 8px;
}
.voice-plain-label { font-weight: 700; color: var(--purple); }
.voice-why   { font-size: 13px; color: var(--dim); font-style: italic; }

/* ── Curated news ──────────────────────────────────── */
.curated-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.curated-item:first-child { padding-top: 0; }
.curated-item:last-child { border-bottom: none; padding-bottom: 0; }
.curated-headline {
  display: flex; align-items: flex-start; gap: 10px;
  text-decoration: none; color: var(--text);
  font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 5px;
}
.curated-headline:hover { color: var(--blue); }
.curated-src {
  font-size: 10px; font-weight: 700;
  color: var(--blue); background: var(--blue-dim);
  border: 1px solid var(--blue-b); border-radius: 3px;
  padding: 1px 6px; white-space: nowrap; margin-top: 1px; flex-shrink: 0;
}
.curated-why { font-size: 12px; color: var(--muted); line-height: 1.5; padding-left: 52px; }

/* ── Stepper ───────────────────────────────────── */
.stepper-wrap { position: relative; }
.stepper-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  box-shadow: var(--shadow); min-height: 240px;
}
.stepper-controls {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 12px;
}
.stepper-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 16px;
  font-size: 12px; color: var(--text2); cursor: pointer; font-weight: 500;
  transition: background 0.1s;
}
.stepper-btn:hover:not(:disabled) { background: var(--surface3); }
.stepper-btn:disabled { opacity: 0.3; cursor: default; }
.stepper-dots { display: flex; gap: 6px; align-items: center; }
.s-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border2); cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.s-dot.active { background: var(--blue); transform: scale(1.4); }

/* ── Markets ───────────────────────────────────── */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.market-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow);
}
.market-name { font-size: 10px; color: var(--muted); margin-bottom: 5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; }
.market-val  { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.market-chg  { font-size: 12px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.up   { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--muted); }

/* ── Indicators ────────────────────────────────── */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.ind-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.ind-card:hover { border-color: var(--blue-b); background: var(--surface2); }
.ind-card.selected { border-color: var(--blue); background: var(--surface2); }
.ind-click-hint { font-size: 10px; color: var(--dim); margin-top: 6px; }
.ind-name  { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.ind-row   { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.ind-value { font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ind-unit  { font-size: 12px; color: var(--muted); }
.ind-date  { font-size: 10px; color: var(--dim); margin-bottom: 10px; }
.ind-chart { height: 68px; }
.ind-delta { font-size: 11px; margin-top: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Right drawer ──────────────────────────────── */
.ind-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--drawer-w);
  background: #1e1e1e;
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.ind-drawer.open { transform: translateX(0); }

.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
}
.drawer-overlay.open { display: block; }

.drawer-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-title  { font-size: 15px; font-weight: 700; color: var(--text); }
.drawer-series { font-size: 11px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.drawer-value  { font-size: 26px; font-weight: 700; color: var(--text); margin-top: 2px; font-variant-numeric: tabular-nums; }
.drawer-close {
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; padding: 0 0 0 10px; line-height: 1;
  flex-shrink: 0; margin-top: 2px;
}
.drawer-close:hover { color: var(--text); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted); margin-bottom: 7px;
}
.drawer-section-body {
  font-size: 13px; color: var(--text2); line-height: 1.7;
}
.drawer-section-body strong { color: var(--text); }

.drawer-impact-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px;
}
.impact-box {
  padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.5;
}
.impact-box.up-box   { background: var(--green-dim); border: 1px solid var(--green-b); }
.impact-box.down-box { background: var(--red-dim);   border: 1px solid var(--red-b); }
.impact-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.impact-label.up   { color: var(--green); }
.impact-label.down { color: var(--red); }
.impact-text { color: var(--text2); }

.release-row {
  display: flex; gap: 10px; align-items: center;
  font-size: 12px; color: var(--text2);
  padding: 8px 12px; background: var(--surface2);
  border-radius: 6px; border: 1px solid var(--border);
}
.release-icon { font-size: 14px; flex-shrink: 0; }

.relates-to { font-size: 12px; color: var(--text2); line-height: 1.6; }

/* ── Section headings within tabs ─────────────────── */
.section-heading {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-note { font-size: 14px; color: var(--text2); margin-bottom: 14px; font-style: italic; line-height: 1.5; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Composite Indicators ─────────────────────────── */
.composite-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 24px;
}
.comp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.comp-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.comp-name { font-size: 15px; font-weight: 700; color: var(--text); }
.comp-sub  { font-size: 13px; color: var(--muted); margin-top: 2px; }
.comp-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  border: 1px solid; white-space: nowrap; flex-shrink: 0;
}
.badge-loose    { background: var(--green-dim);  color: var(--green);  border-color: var(--green-b); }
.badge-normal   { background: var(--green-dim);  color: var(--green);  border-color: var(--green-b); }
.badge-watch    { background: var(--amber-dim);  color: var(--amber);  border-color: var(--amber-b); }
.badge-elevated { background: rgba(251,146,60,0.12); color: #fb923c;   border-color: rgba(251,146,60,0.3); }
.badge-tight    { background: var(--red-dim);    color: var(--red);    border-color: var(--red-b); }
.comp-value-row { display: flex; align-items: baseline; gap: 12px; }
.comp-value  { font-size: 28px; font-weight: 700; color: var(--text); font-family: monospace; line-height: 1; }
.comp-signal { font-size: 13px; font-weight: 600; }
.comp-interp { font-size: 14px; color: var(--text2); line-height: 1.6; }
.comp-scale  {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: var(--dim); padding-top: 8px;
  border-top: 1px solid var(--border);
}
.comp-scale a { color: var(--blue); text-decoration: none; }
.comp-scale a:hover { text-decoration: underline; }

/* ── TradingView widget grid ──────────────────────── */
.tv-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 8px; }
.tv-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ── Energy tab ───────────────────────────────────── */
.energy-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 0; }
.energy-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 0; }
.energy-chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.energy-chart-name  { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.energy-chart-value { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.energy-chart-sub   { font-size: 11px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; }
.energy-chart-canvas { height: 90px; margin-bottom: 6px; }
.energy-chart-link  { font-size: 11px; color: var(--blue); text-decoration: none; }
.energy-chart-link:hover { text-decoration: underline; }
.energy-info-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.energy-info-title { font-size: 11px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.energy-info-card p { font-size: 12px; color: var(--text2); line-height: 1.6; margin-bottom: 8px; }
.energy-info-card p:last-child { margin-bottom: 0; }
.energy-info-card strong { color: var(--text); }

/* ── Mr. Global cards ─────────────────────────────── */
.mg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mg-card {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 2px solid var(--amber);
  border-radius: var(--radius); padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.mg-card-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 700; }
.mg-card-value { font-size: 22px; font-weight: 700; color: var(--text); font-family: monospace; line-height: 1.1; }
.mg-unit       { font-size: 13px; font-weight: 400; color: var(--muted); }
.mg-thresholds { display: flex; flex-direction: column; gap: 3px; }
.mg-threshold  { font-size: 10px; padding: 2px 7px; border-radius: 3px; font-weight: 600; }
.mg-red    { color: var(--red);   background: var(--red-dim);   border-left: 2px solid var(--red); }
.mg-yellow { color: var(--amber); background: var(--amber-dim); border-left: 2px solid var(--amber); }
.mg-green  { color: var(--green); background: var(--green-dim); border-left: 2px solid var(--green); }
.mg-signal { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.mg-signal.mg-red    { color: var(--red); }
.mg-signal.mg-yellow { color: var(--amber); }
.mg-signal.mg-green  { color: var(--green); }
.mg-implication { font-size: 11px; color: var(--text2); line-height: 1.55; border-top: 1px solid var(--border); padding-top: 8px; }
.mg-implication strong { color: var(--amber); }
.mg-assess { font-size: 10px; color: var(--muted); line-height: 1.55; background: var(--surface2); border-radius: 5px; padding: 6px 8px; }
.mg-assess strong { color: var(--blue); }
.mg-link { display: inline-block; margin-top: 4px; font-size: 10px; color: var(--blue); text-decoration: none; }
.mg-link:hover { text-decoration: underline; }

.mg-scenario-bar {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--red); border-radius: var(--radius);
  padding: 16px 18px; margin-top: 20px;
}
.mg-scenario-title { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--red); font-weight: 700; margin-bottom: 16px; }
.mg-scenarios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mg-scenario-item { display: flex; flex-direction: column; gap: 4px; }
.mg-s-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.mg-s-value { font-size: 17px; font-weight: 700; font-family: monospace; line-height: 1.2; }
.mg-s-note  { font-size: 10px; color: var(--text2); line-height: 1.5; }

/* ── Macro Explorer gauges ────────────────────────── */
.exp-gauges {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.exp-gauge-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 8px;
  cursor: pointer; transition: border-color 0.25s, background-color 0.4s, box-shadow 0.4s;
  text-align: center;
}
.exp-gauge-card:hover  { border-color: var(--border2); filter: brightness(1.08); }
.exp-gauge-card.active { border-color: var(--green) !important; box-shadow: 0 0 16px rgba(74,222,128,0.25) !important; }
.exp-gauge-name  { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; line-height: 1.3; min-height: 22px; display: flex; align-items: center; justify-content: center; }
.exp-gauge-value { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; font-family: monospace; }
.exp-gauge-bar-wrap { height: 5px; background: var(--surface3); border-radius: 3px; margin-bottom: 5px; overflow: hidden; }
.exp-gauge-bar   { height: 100%; border-radius: 3px; width: 20%; background: var(--green); transition: width 0.55s ease, background-color 0.55s ease; }
.exp-gauge-stress { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }

@keyframes glowAmber { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 18px rgba(251,191,36,0.5); } }
@keyframes glowRed   { 0%,100% { box-shadow: 0 0 5px rgba(248,113,113,0.3); } 50% { box-shadow: 0 0 24px rgba(248,113,113,0.65); } }
.stress-2 { animation: glowAmber 2s infinite; }
.stress-3 { animation: glowRed 0.85s infinite; }

/* Explorer layout */
.exp-presets-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.preset-btn {
  padding: 6px 14px; background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border); border-radius: 20px; cursor: pointer;
  font-size: 12px; transition: all 0.15s;
}
.preset-btn:hover  { background: var(--surface3); color: var(--text); }
.preset-btn.active { background: var(--green-dim); border-color: var(--green-b); color: var(--green); }
.exp-layout { display: grid; grid-template-columns: 1fr 1.1fr 260px; gap: 14px; align-items: start; }

/* Sliders */
.slider-2col   { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.slider-group  { margin-bottom: 12px; }
.slider-label  { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-bottom: 5px; color: var(--text2); }
.slider-current { color: var(--green); font-family: monospace; font-size: 12px; font-weight: 700; }
.slider-range  { font-size: 10px; color: var(--dim); margin-top: 2px; }
input[type=range] { width: 100%; -webkit-appearance: none; height: 4px; background: var(--border); border-radius: 2px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; background: var(--green); border-radius: 50%; cursor: pointer; box-shadow: 0 0 4px rgba(74,222,128,0.4); }

/* Simulation output */
.sim-output { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sim-card { background: var(--surface2); border-radius: 6px; padding: 10px 12px; border: 1px solid var(--border); }
.sim-card .sim-label  { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.sim-card .sim-value  { font-size: 15px; font-weight: 600; color: var(--text); }
.sim-card .sim-signal { font-size: 11px; font-weight: 600; margin-top: 2px; }
.sig-hike        { color: var(--red); }
.sig-cut         { color: var(--green); }
.sig-hold        { color: var(--amber); }
.sig-stagflation { color: #fb923c; }
.sig-inverted    { color: var(--red); }
.sig-normal      { color: var(--green); }
.sig-flat        { color: var(--amber); }
.delta-pos { color: var(--green); }
.delta-neg { color: var(--red); }
.delta-neu { color: var(--muted); }

/* Cascade panel */
.cascade-desc { font-size: 12px; color: var(--text2); line-height: 1.6; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cascade-hdr  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin: 10px 0 6px; }
.cascade-row  { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.cascade-row:last-child { border-bottom: none; }
.cascade-tgt  { font-size: 12px; color: var(--text2); flex: 1; }
.cascade-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.cascade-arrow { font-size: 12px; font-weight: 700; }
.cascade-str-bar  { width: 64px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cascade-str-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.cascade-row-sm   { display: flex; justify-content: space-between; font-size: 11px; padding: 4px 0; border-bottom: 1px solid var(--border); color: var(--text2); }
.cascade-row-sm:last-child { border-bottom: none; }
.cascade-hint { font-size: 12px; color: var(--dim); text-align: center; padding: 24px 0; font-style: italic; }

@keyframes simFlash { 0% { border-color: rgba(74,222,128,0.7); } 100% { border-color: var(--border); } }
.sim-card.flash { animation: simFlash 0.75s ease-out forwards; }

/* ── Skeleton ──────────────────────────────────── */
.skeleton { color: var(--dim); font-size: 13px; font-style: italic; padding: 4px 0; }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 20px 16px; }
  .two-col-cards { grid-template-columns: 1fr; }
  .ind-drawer { width: 100%; }
}
