:root {
  --ink: #18211b;
  --muted: #69746d;
  --paper: #edf1ec;
  --surface: #fffdf8;
  --surface-2: #f5f7f2;
  --forest: #103d33;
  --forest-2: #1f5044;
  --gold: #c79825;
  --green: #0d8b5d;
  --red: #bf3527;
  --amber: #ad6b10;
  --blue: #326c89;
  --gray: #747d77;
  --line: rgba(39, 58, 47, 0.16);
  --shadow: 0 16px 42px rgba(25, 45, 36, 0.09);
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
h1, h2, h3, p, dl, dd { margin-top: 0; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 246, 0.94);
  backdrop-filter: blur(18px);
}
.topbar-inner, .dashboard {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.eyebrow, .section-kicker {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}
.topbar h1 { margin-bottom: 0; font-size: 1.55rem; line-height: 1.15; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.updated-at { color: var(--muted); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest);
  background: var(--surface);
  cursor: pointer;
  font-size: 1.45rem;
}
.icon-button:hover, .icon-button:focus-visible { border-color: var(--forest); }
.icon-button.refreshing { animation: spin 650ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.language-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.language-option { min-width: 39px; border: 0; border-radius: 999px; padding: 7px 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: .78rem; font-weight: 850; }
.language-option.active { color: #fff; background: var(--forest); }

.dashboard { display: grid; gap: 18px; padding: 18px 0 38px; }
.panel, .macro-panel, .source-band {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.panel { padding: 22px 24px; }
.summary-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .75fr); gap: 18px; align-items: stretch; }
.macro-panel { padding: 26px 28px; color: #f6faf7; border-color: rgba(16, 61, 51, .8); background: var(--forest); box-shadow: var(--shadow); }
.summary-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.summary-heading h2 { max-width: 760px; margin-bottom: 0; font-size: 2rem; line-height: 1.12; }
.inverse-text { color: #9fc8bc; }
.live-chip, .source-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
}
.live-chip { color: #d9eee7; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.source-chip { color: var(--forest); border: 1px solid var(--line); background: var(--surface-2); }
.macro-summary { max-width: 920px; margin: 14px 0 21px; color: #d4e5df; font-size: .96rem; font-weight: 650; line-height: 1.55; }
.macro-dimensions { display: grid; gap: 11px; }
.macro-dimension { display: grid; grid-template-columns: minmax(135px, .8fr) minmax(170px, 1.1fr) minmax(230px, 1.35fr); align-items: center; gap: 14px; min-height: 51px; padding: 9px 12px; border-radius: 6px; background: rgba(255,255,255,.075); }
.macro-dimension-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.macro-dimension-top strong { min-width: 0; font-size: .84rem; }
.macro-dimension-top b { margin-left: auto; font-size: .78rem; color: #b7d3c9; }
.macro-track, .evidence-track { overflow: hidden; height: 7px; border-radius: 99px; background: rgba(255,255,255,.13); }
.macro-track i, .evidence-track i { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.macro-dimension p { margin: 0; color: #bad0c8; font-size: .73rem; line-height: 1.4; }

.decision-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.decision-panel h2 { margin-bottom: 8px; font-size: 1.52rem; line-height: 1.24; }
.decision-copy { margin-bottom: 0; color: var(--muted); font-size: .83rem; font-weight: 650; line-height: 1.5; }
.decision-list { display: grid; gap: 8px; }
.decision-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 48px auto; align-items: center; gap: 10px; min-height: 55px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.decision-rank { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--forest); background: #e5ece6; font-size: .74rem; font-weight: 900; }
.decision-row div { min-width: 0; }
.decision-row strong, .decision-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.decision-row strong { font-size: .84rem; }
.decision-row small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.decision-row > b { font-size: .84rem; }
.cash-hurdle { padding: 10px 12px; border-left: 3px solid var(--gold); color: var(--muted); background: #f6f1e3; font-size: .76rem; font-weight: 750; line-height: 1.45; }

.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; font-size: 1.25rem; line-height: 1.2; }
.section-heading > p { max-width: 660px; margin: 1px 0 0; color: var(--muted); font-size: .8rem; font-weight: 650; line-height: 1.45; text-align: right; }
.section-heading.compact { margin-bottom: 16px; }

.recommendation-grid {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(115px, .78fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(105px, .7fr) minmax(120px, .82fr) minmax(115px, .8fr);
  gap: 0;
  min-width: 0;
}
.recommendation-head { padding: 0 12px 9px; color: var(--muted); font-size: .7rem; font-weight: 850; }
.recommendation-row { min-height: 104px; border-top: 1px solid var(--line); }
.recommendation-row:first-child { border-top-color: rgba(201,152,37,.65); }
.recommendation-row > div { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; padding: 12px; border-left: 1px solid rgba(39,58,47,.09); }
.recommendation-row > div:first-child { border-left: 0; }
.recommendation-row.posture-prefer { background: rgba(13,139,93,.045); }
.recommendation-row.posture-cash-hurdle { background: rgba(201,152,37,.055); }
.recommendation-row.posture-cash-preferred { background: rgba(13,78,64,.07); }
.asset-cell { flex-direction: row !important; align-items: center; justify-content: flex-start !important; }
.rank-number { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--forest); background: #e5ece6; font-size: .76rem; font-weight: 900; }
.asset-cell div { min-width: 0; }
.asset-cell strong, .asset-cell small, .metric-cell small { display: block; }
.asset-cell strong { overflow-wrap: anywhere; font-size: .84rem; }
.asset-detail-link { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 5px; color: var(--ink); text-decoration: none; }
.asset-detail-link span { color: var(--forest); font-size: .78rem; font-weight: 900; transition: transform .16s ease; }
.asset-detail-link:hover strong, .asset-detail-link:focus-visible strong { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.asset-detail-link:hover span, .asset-detail-link:focus-visible span { transform: translate(2px, -2px); }
.asset-detail-link:focus-visible { border-radius: 3px; outline: 2px solid var(--gold); outline-offset: 3px; }
.asset-cell small, .metric-cell small, .posture-cell small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.metric-cell { align-items: flex-start; }
.metric-cell > b { font-size: .82rem; }
.metric-cell > small { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.value-anchor-name { font-size: .74rem; line-height: 1.3; }
.confidence-label { color: var(--muted); font-size: .62rem; font-weight: 800; }
.confidence-low { color: #7a817c; }
.narrative-cell strong { font-size: .78rem; line-height: 1.35; }
.narrative-cell > span:not(.mobile-label) { font-size: .7rem; font-weight: 800; }
.gap-reading { line-height: 1.35; }
.gap-underpriced { color: var(--green) !important; }
.gap-matched { color: var(--gray) !important; }
.gap-price-leading { color: var(--red) !important; }
.posture-cell { align-items: flex-start; }
.posture-cell > strong { font-size: 1.05rem; }
.mobile-label { display: none; }

.status-pill, .state-tag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: .66rem;
  font-weight: 900;
  white-space: nowrap;
}
.status-confirmed, .state-prefer, .state-supportive, .state-confirming, .state-trend-strong, .state-roomy, .state-easing, .state-accelerating { background: var(--green); }
.status-candidate, .state-candidate, .state-wait-entry, .state-wait-turn, .state-partial, .state-mixed, .state-neutral, .state-reflating, .state-watch, .state-stressed { background: var(--amber); }
.status-emerging { background: var(--blue); }
.status-watch, .state-cash-hurdle, .state-oversold, .state-calm, .state-disinflating { background: var(--gray); }
.state-avoid, .state-adverse, .state-crowded, .state-weak, .state-extended, .state-tight, .state-high, .state-slowing { background: var(--red); }
.state-cash-preferred { background: var(--forest-2); }
.state-not-applicable { color: var(--muted); background: rgba(105,119,110,.14); }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }

.narrative-stage-summary { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(78px, .55fr)) minmax(300px, 2fr); align-items: stretch; gap: 8px; margin-bottom: 12px; }
.discovery-scan-stat, .stage-stat, .promotion-rule { min-width: 0; min-height: 58px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.discovery-scan-stat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
.discovery-scan-stat span, .stage-stat span, .promotion-rule strong { color: var(--muted); font-size: .65rem; font-weight: 850; }
.discovery-scan-stat strong, .stage-stat strong { color: var(--forest); font-size: 1.15rem; }
.discovery-scan-stat small { grid-column: 1 / -1; color: var(--muted); font-size: .62rem; }
.stage-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 3px solid var(--gray); }
.stage-confirmed { border-top-color: var(--green); }
.stage-candidate { border-top-color: var(--amber); }
.stage-emerging { border-top-color: var(--blue); }
.promotion-rule { display: flex; flex-direction: column; justify-content: center; gap: 5px; border-left: 3px solid var(--gold); }
.promotion-rule span { overflow: hidden; color: var(--ink); font-size: .7rem; font-weight: 720; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.topic-table { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.topic-row { display: grid; width: 100%; grid-template-columns: 34px minmax(190px, 1.6fr) 82px repeat(3, 88px) 88px; align-items: center; gap: 12px; min-height: 76px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); color: inherit; background: transparent; cursor: pointer; text-align: left; }
.topic-row:first-child { border-top: 0; }
.topic-row:hover, .topic-row.selected { background: #f1f5f0; }
.topic-row.selected { box-shadow: inset 3px 0 var(--gold); }
.topic-rank { color: var(--muted); font-size: .8rem; font-weight: 900; text-align: center; }
.topic-name, .topic-score, .topic-metric, .topic-gap { min-width: 0; }
.topic-name strong, .topic-name small, .topic-score b, .topic-score small, .topic-metric b, .topic-metric small, .topic-gap b, .topic-gap small { display: block; }
.topic-name-top { display: flex; min-width: 0; align-items: flex-start; gap: 7px; }
.topic-name strong { overflow: visible; font-size: .88rem; line-height: 1.25; overflow-wrap: anywhere; text-overflow: clip; white-space: normal; }
.origin-tag { flex: 0 0 auto; padding: 2px 5px; border-radius: 3px; color: var(--muted); background: #e8ece7; font-size: .58rem; font-style: normal; font-weight: 850; }
.origin-discovered { color: var(--blue); background: #e5eef2; }
.origin-unmapped { color: #fff; background: var(--gray); }
.topic-name small { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.topic-score, .topic-metric, .topic-gap { text-align: right; }
.topic-score b { font-size: 1rem; }
.topic-metric b, .topic-gap b { font-size: .82rem; }
.topic-score small, .topic-metric small, .topic-gap small { margin-top: 3px; color: var(--muted); font-size: .64rem; }

.evidence-grid, .lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.evidence-grid > *, .lower-grid > * { height: 100%; }
.evidence-bars { display: grid; gap: 11px; }
.evidence-row { display: grid; grid-template-columns: 100px minmax(120px, 1fr) 36px; align-items: center; gap: 12px; font-size: .76rem; }
.evidence-track { background: #e8ece7; }
.evidence-ledger { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.evidence-ledger > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.evidence-ledger span { color: var(--muted); font-size: .72rem; font-weight: 800; }
.evidence-ledger strong { font-size: .76rem; line-height: 1.45; }
.news-list { display: grid; gap: 0; }
.news-item { display: block; padding: 10px 0; border-top: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; border-top: 0; }
.news-item strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: .78rem; line-height: 1.4; }
.news-item span { display: block; margin-top: 4px; color: var(--muted); font-size: .67rem; }

.regime-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.regime-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 8px; min-height: 64px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.regime-item div { min-width: 0; }
.regime-item strong, .regime-item span { display: block; }
.regime-item strong { font-size: .78rem; }
.regime-item div span { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.regime-item > b { font-size: .8rem; white-space: nowrap; }
.direction { font-size: 1rem; font-weight: 900; text-align: center; }
.direction-up { color: var(--red); }
.direction-down { color: var(--green); }
.direction-flat, .direction-unknown { color: var(--gray); }

.signal-grid { display: grid; grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(70px, .6fr)); align-items: center; gap: 12px; }
.signal-grid-head { padding: 0 10px 8px; color: var(--muted); font-size: .68rem; font-weight: 850; }
.signal-row { min-height: 55px; padding: 9px 10px; border-top: 1px solid var(--line); font-size: .76rem; }
.signal-row strong, .signal-row small { display: block; }
.signal-row strong { font-size: .76rem; }
.signal-row small { margin-top: 3px; color: var(--muted); font-size: .63rem; }

.source-band { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; gap: 24px; padding: 18px 22px; }
.source-band h2 { margin-bottom: 0; font-size: 1.1rem; }
.source-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.source-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: .7rem; }
.source-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-status { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.source-ok { background: var(--green); }
.source-partial { background: var(--amber); }
.source-error { background: var(--red); }

.snapshot-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.snapshot-actions h2 { margin-bottom: 4px; font-size: 1.1rem; }
.snapshot-actions p:last-child { margin: 0; color: var(--muted); font-size: .73rem; font-weight: 650; line-height: 1.45; }
.snapshot-buttons { display: flex; flex: 0 0 auto; gap: 9px; }
.command-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--forest);
  background: var(--surface-2);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 850;
}
.command-button:hover, .command-button:focus-visible { border-color: var(--forest); }
.command-primary { color: #fff; border-color: var(--forest); background: var(--forest); }
.command-primary:hover, .command-primary:focus-visible { background: var(--forest-2); }
.command-button b { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 50%; color: var(--forest); background: #e3eae4; font-size: .65rem; }

.snapshot-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: min(820px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(13, 35, 28, .24);
}
.snapshot-dialog::backdrop { background: rgba(14, 28, 22, .48); backdrop-filter: blur(3px); }
.snapshot-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.snapshot-dialog-header h2 { margin-bottom: 0; font-size: 1.28rem; }
.dialog-close { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface-2); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.dialog-close:hover, .dialog-close:focus-visible { color: var(--ink); border-color: var(--forest); }
.snapshot-dialog-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 560px; max-height: calc(100vh - 150px); }
.snapshot-date-list { overflow-y: auto; padding: 12px; border-right: 1px solid var(--line); background: var(--surface-2); }
.snapshot-date-option { display: grid; width: 100%; gap: 3px; margin-bottom: 7px; padding: 10px 11px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.snapshot-date-option:hover, .snapshot-date-option:focus-visible { border-color: var(--line); background: var(--surface); }
.snapshot-date-option.active { border-color: rgba(199,152,37,.7); background: #fffaf0; box-shadow: inset 3px 0 var(--gold); }
.snapshot-date-option strong { font-size: .76rem; }
.snapshot-date-option span, .snapshot-date-option small { color: var(--muted); font-size: .64rem; }
.snapshot-list-empty { padding: 20px 8px; color: var(--muted); font-size: .74rem; text-align: center; }
.snapshot-detail { overflow-y: auto; min-width: 0; padding: 20px 22px 26px; }
.snapshot-empty { display: grid; min-height: 420px; place-content: center; color: var(--muted); text-align: center; }
.snapshot-empty strong { color: var(--ink); font-size: 1rem; }
.snapshot-empty p { margin: 7px 0 0; font-size: .74rem; }
.snapshot-meta { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.snapshot-meta > div { display: grid; gap: 3px; }
.snapshot-meta span { color: var(--muted); font-size: .63rem; font-weight: 800; }
.snapshot-meta strong { font-size: .75rem; }
.snapshot-delete { margin-left: auto; padding: 7px 9px; border: 1px solid rgba(191,53,39,.25); border-radius: 5px; color: var(--red); background: transparent; cursor: pointer; font-size: .68rem; font-weight: 800; }
.snapshot-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.snapshot-overview > div { min-width: 0; padding-left: 13px; border-left: 3px solid var(--gold); }
.snapshot-overview span { color: var(--muted); font-size: .65rem; font-weight: 850; }
.snapshot-overview h3 { margin: 5px 0; font-size: .95rem; }
.snapshot-overview p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.snapshot-section-heading { display: flex; align-items: center; justify-content: space-between; margin: 19px 0 8px; }
.snapshot-section-heading h3 { margin: 0; font-size: .88rem; }
.snapshot-section-heading span { color: var(--muted); font-size: .65rem; }
.snapshot-ranking { border-top: 1px solid var(--line); }
.snapshot-ranking-row { display: grid; grid-template-columns: 28px minmax(125px, .75fr) minmax(180px, 1.3fr) minmax(110px, .55fr); align-items: center; gap: 12px; min-height: 62px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.snapshot-ranking-row > b { color: var(--muted); font-size: .72rem; text-align: center; }
.snapshot-ranking-row > div { min-width: 0; }
.snapshot-ranking-row strong, .snapshot-ranking-row span, .snapshot-ranking-row small { display: block; }
.snapshot-ranking-row strong { font-size: .76rem; }
.snapshot-ranking-row span { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-ranking-row small { margin-top: 3px; color: var(--muted); font-size: .63rem; font-weight: 750; }
.snapshot-ranking-row > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.snapshot-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.snapshot-topics > div { display: grid; grid-template-columns: minmax(0, 1fr) 34px auto; align-items: center; gap: 8px; min-height: 49px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.snapshot-topics > div:nth-child(odd) { border-right: 1px solid var(--line); }
.snapshot-topics strong { min-width: 0; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.snapshot-topics span { color: var(--muted); font-size: .68rem; text-align: right; }
.snapshot-topics small { font-size: .62rem; font-weight: 800; white-space: nowrap; }

.empty-state { padding: 18px; color: var(--muted); font-size: .78rem; text-align: center; }
.toast { position: fixed; z-index: 40; right: 18px; bottom: 18px; max-width: min(430px, calc(100vw - 36px)); padding: 11px 14px; border-radius: 6px; color: #fff; background: var(--forest); box-shadow: var(--shadow); font-size: .78rem; font-weight: 750; opacity: 0; pointer-events: none; transform: translateY(12px); transition: 180ms ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast-error { background: var(--red); }

@media (max-width: 1120px) {
  .summary-grid { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); }
  .macro-dimension { grid-template-columns: minmax(125px, .8fr) minmax(120px, .8fr); }
  .macro-dimension p { display: none; }
  .recommendation-grid { grid-template-columns: minmax(140px, 1.1fr) repeat(5, minmax(96px, .8fr)) minmax(110px, .85fr); }
  .metric-cell > small { display: none; }
  .narrative-stage-summary { grid-template-columns: minmax(140px, 1fr) repeat(4, minmax(70px, .55fr)); }
  .promotion-rule { grid-column: 1 / -1; min-height: 50px; }
}

@media (max-width: 860px) {
  .summary-grid, .evidence-grid, .lower-grid { grid-template-columns: 1fr; }
  .recommendation-head { display: none; }
  .recommendation-row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
  .recommendation-row > div { min-height: 88px; border-top: 1px solid rgba(39,58,47,.09); }
  .recommendation-row > div:nth-child(-n+3) { border-top: 0; }
  .asset-cell { grid-column: span 2; }
  .mobile-label { display: block; margin-bottom: 1px; color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
  .metric-cell > small { display: -webkit-box; }
  .topic-row { grid-template-columns: 30px minmax(150px, 1fr) repeat(3, 72px); }
  .topic-row > :nth-child(4), .topic-row > :nth-child(5) { display: none; }
  .source-band { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar-inner, .dashboard { width: min(100% - 20px, 1500px); }
  .topbar-inner { min-height: 68px; gap: 12px; }
  .topbar h1 { font-size: 1.12rem; }
  .eyebrow { display: none; }
  .updated-at { display: none; }
  .icon-button { width: 38px; height: 38px; }
  .language-option { min-width: 34px; padding: 6px 8px; }
  .dashboard { gap: 12px; padding-top: 12px; }
  .panel, .macro-panel { padding: 18px 16px; }
  .summary-heading h2 { font-size: 1.52rem; }
  .macro-summary { font-size: .86rem; }
  .macro-dimension { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  .macro-dimension p { display: block; }
  .summary-heading, .section-heading { gap: 12px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; text-align: left; }
  .recommendation-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recommendation-row > div:nth-child(3) { border-top: 1px solid rgba(39,58,47,.09); }
  .asset-cell { grid-column: span 2; }
  .recommendation-row > div { min-height: 92px; padding: 10px; }
  .topic-table { overflow: visible; border: 0; }
  .narrative-stage-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .discovery-scan-stat, .promotion-rule { grid-column: 1 / -1; }
  .stage-stat { min-height: 50px; padding: 8px; }
  .stage-stat span { font-size: .6rem; }
  .promotion-rule span { white-space: normal; }
  .topic-row { grid-template-columns: 28px minmax(0, 1fr) 64px; gap: 9px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
  .topic-row > :nth-child(n+4) { display: none; }
  .regime-grid { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: minmax(120px, 1.3fr) repeat(3, minmax(48px, .6fr)); gap: 7px; }
  .signal-row, .signal-grid-head { padding-left: 4px; padding-right: 4px; }
  .source-list { grid-template-columns: 1fr; }
  .evidence-row { grid-template-columns: 84px minmax(100px, 1fr) 34px; }
  .snapshot-actions { display: grid; gap: 14px; padding: 17px 16px; }
  .snapshot-buttons { width: 100%; }
  .snapshot-buttons .command-button { flex: 1; }
  .snapshot-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .snapshot-dialog-header { padding: 14px 15px; }
  .snapshot-dialog-body { grid-template-columns: 1fr; min-height: 0; max-height: calc(100vh - 90px); }
  .snapshot-date-list { display: flex; overflow-x: auto; overflow-y: hidden; gap: 7px; padding: 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .snapshot-date-option { min-width: 146px; margin-bottom: 0; }
  .snapshot-detail { padding: 15px 13px 22px; }
  .snapshot-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .snapshot-delete { grid-column: 1 / -1; width: fit-content; margin-left: 0; }
  .snapshot-overview, .snapshot-topics { grid-template-columns: 1fr; }
  .snapshot-topics > div:nth-child(odd) { border-right: 0; }
  .snapshot-ranking-row { grid-template-columns: 24px minmax(88px, .8fr) minmax(105px, 1.2fr) 90px; gap: 7px; }
  .snapshot-ranking-row > div:last-child { display: grid; justify-items: end; gap: 4px; }
}
