:root {
  --ink: #1b2423;
  --muted: #73807c;
  --line: #dce2dd;
  --paper: #f4f6f2;
  --surface: #ffffff;
  --teal: #12736f;
  --teal-soft: #d9eeeb;
  --coral: #c85d4d;
  --coral-soft: #f7dfda;
  --amber: #b27b33;
  --shadow: 0 12px 30px rgba(25, 43, 39, 0.06);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; }
button, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.main-content { min-width: 0; width: 100%; padding: 31px 38px 24px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 25px; }
.eyebrow, .panel-kicker { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 700; }
h1 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.02em; font-weight: 700; }
h2 { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 13px; padding-top: 5px; }
.data-status { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #53a271; display: inline-block; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 18px; border-radius: 3px; }
.icon-button:hover { border-color: var(--teal); color: var(--teal); }
.notify-button { padding: 4px 0; }
.control-strip { display: flex; align-items: flex-end; gap: 21px; background: var(--surface); border: 1px solid var(--line); padding: 13px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
.control-group { display: grid; gap: 5px; }
.control-group label { color: var(--muted); font-size: 11px; }
select { min-width: 135px; border: 1px solid var(--line); color: var(--ink); background: #fbfcfa; padding: 7px 10px; border-radius: 2px; }
.model-note { margin-left: auto; color: var(--muted); font-size: 11px; display: flex; gap: 7px; align-items: center; padding-bottom: 7px; }
.model-note small { color: #8a9690; font-size: 10px; line-height: 1.5; }
.info-badge { border: 1px solid #a8b5af; color: #788a83; width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 10px; }
.hero-grid { display: grid; grid-template-columns: minmax(350px, 1.2fr) minmax(400px, 1fr); gap: 18px; margin-bottom: 18px; }
.status-panel, .metric-panel, .panel { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.status-panel { padding: 24px 26px; min-height: 202px; }
.status-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.state-pill { padding: 5px 10px; display: inline-block; font-size: 11px; font-weight: 700; border-radius: 2px; }
.state-pill.growth { color: #17685f; background: var(--teal-soft); }
.state-pill.defensive { color: #a64d40; background: var(--coral-soft); }
.state-pill.transition { color: #8b672d; background: #f6e8cb; }
.as-of { font-size: 11px; color: var(--muted); }
.status-title { font-size: 21px; line-height: 1.3; font-weight: 700; margin-top: 17px; max-width: 520px; }
.status-panel p { color: var(--muted); line-height: 1.65; max-width: 560px; margin: 8px 0 18px; }
.status-footer { border-top: 1px solid var(--line); padding-top: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 11px; }
.status-footer strong { color: var(--ink); font-size: 13px; }
.divider { width: 1px; height: 14px; background: var(--line); margin: 0 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.metric-panel { padding: 19px 20px; display: flex; flex-direction: column; min-height: 92px; }
.metric-panel strong { font-size: 24px; line-height: 1.3; margin-top: 8px; }
.metric-panel span:last-child { color: var(--muted); font-size: 11px; margin-top: 3px; }
.content-grid, .lower-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .95fr); gap: 18px; margin-bottom: 18px; }
.panel { padding: 20px 21px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.chart-caption { color: var(--muted); font-size: 11px; white-space: nowrap; padding-top: 2px; }
.chart-wrap { height: 245px; margin-top: 16px; position: relative; }
.chart-wrap svg, .mini-chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-tooltip { position: absolute; z-index: 3; min-width: 132px; padding: 9px 11px; border: 1px solid #cfd8d3; border-radius: 8px; background: rgba(255,255,255,.97); box-shadow: 0 8px 20px rgba(25,43,39,.14); color: var(--ink); font-size: 11px; pointer-events: none; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { display: block; margin-bottom: 6px; font-size: 11px; }
.chart-tooltip span { display: block; line-height: 1.55; white-space: pre; }
.chart-tooltip i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.chart-hit-area { cursor: crosshair; }
[data-nav-section], #overviewSection { scroll-margin-top: 24px; }
.legend { display: flex; gap: 19px; flex-wrap: wrap; margin-top: 7px; color: var(--muted); font-size: 11px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 18px; height: 2px; display: inline-block; }
.assets-panel { min-height: 300px; }
.asset-rows { margin-top: 18px; display: grid; gap: 15px; }
.asset-row { display: grid; grid-template-columns: 52px 1fr 64px; gap: 11px; align-items: center; }
.asset-symbol { font-weight: 700; font-size: 13px; }
.asset-bar { height: 7px; background: #edf0ed; position: relative; }
.asset-bar span { height: 100%; display: block; min-width: 3px; }
.asset-bar .growth { background: var(--teal); }
.asset-bar .defensive { background: var(--coral); }
.asset-bar .neutral { background: var(--amber); }
.asset-change { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.asset-change.growth { color: var(--teal); }
.asset-change.defensive { color: var(--coral); }
.asset-change.neutral { color: var(--amber); }
.asset-footnote { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 11px; color: var(--muted); font-size: 10px; line-height: 2.1; }
.line-swatch { display: inline-block; width: 15px; height: 2px; vertical-align: middle; margin: 0 5px 0 10px; }
.growth-swatch { background: var(--teal); margin-left: 0; }
.defensive-swatch { background: var(--coral); }
.timeline { margin-top: 21px; display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 88px 15px 1fr; min-height: 51px; gap: 10px; }
.timeline-date { color: var(--muted); font-size: 11px; padding-top: 2px; }
.timeline-marker { position: relative; display: flex; justify-content: center; }
.timeline-marker::before { content: ""; width: 9px; height: 9px; background: var(--teal); border: 3px solid #d4ebe7; border-radius: 50%; z-index: 1; }
.timeline-item.defensive .timeline-marker::before { background: var(--coral); border-color: var(--coral-soft); }
.timeline-marker::after { content: ""; width: 1px; background: var(--line); position: absolute; top: 10px; bottom: -3px; }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-detail strong { font-size: 12px; display: block; }
.timeline-detail span { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; }
.text-button { color: var(--teal); background: transparent; border: 0; padding: 0; font-size: 11px; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.backtest-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 20px; margin-top: 21px; }
.backtest-stat { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.backtest-stat span { color: var(--muted); font-size: 11px; }
.backtest-stat strong { font-size: 15px; }
.mini-chart-wrap { height: 93px; margin-top: 17px; position: relative; }
.footer-strip { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; padding: 4px 1px 0; }
.toast { position: fixed; right: 25px; bottom: 25px; color: #fff; background: #172321; padding: 10px 14px; font-size: 12px; opacity: 0; transform: translateY(8px); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.help-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 28px)); padding: 0; border: 1px solid var(--line); box-shadow: 0 22px 65px rgba(25,43,39,.24); color: var(--ink); }
.help-dialog::backdrop { background: rgba(23,35,33,.48); }
.help-dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.help-dialog-header h2 { margin-top: 5px; }
.help-dialog-header .icon-button { flex: 0 0 auto; }
.help-dialog-body { padding: 20px 22px 24px; overflow: auto; line-height: 1.7; }
.help-dialog-body p { margin: 0 0 15px; color: var(--muted); }
.help-dialog-body h3 { margin: 19px 0 5px; font-size: 13px; }
.help-links { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 20px !important; }
.help-links a { color: var(--teal); font-size: 11px; font-weight: 700; }
.help-dialog-body .help-note { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 22px; font-size: 11px; }
@media (max-width: 1100px) { .main-content { padding: 25px 23px; } .hero-grid, .content-grid, .lower-grid { grid-template-columns: 1fr; } .status-panel { min-height: auto; } .assets-panel { min-height: auto; } }
@media (max-width: 720px) { .app-shell { display: block; } .main-content { width: 100%; padding: 22px 14px; } .topbar { align-items: flex-end; } h1 { font-size: 20px; } .control-strip { align-items: stretch; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; } select { width: 100%; min-width: 0; font-size: 11px; padding: 7px 5px; } .model-note { grid-column: 1 / -1; margin: 0; padding: 2px 0 0; } .metric-grid { gap: 10px; } .metric-panel { padding: 14px; } .metric-panel strong { font-size: 20px; } .panel { padding: 17px 14px; } .chart-wrap { height: 230px; } .footer-strip { display: grid; } .topbar-actions { gap: 9px; flex-wrap: wrap; justify-content: flex-end; } .data-status { width: 100%; justify-content: flex-end; } }
:root { --alert-bg: #fff8e8; --alert-border: #efd49a; --alert-text: #805b19; }
.data-alert { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 24px; padding: 24px; background: var(--alert-bg); border: 1px solid var(--alert-border); border-radius: 14px; color: var(--alert-text); }
.data-alert[hidden] { display: none; }
.data-alert-icon { width: 28px; height: 28px; border: 2px solid currentColor; border-radius: 50%; text-align: center; line-height: 24px; font-weight: 700; flex: 0 0 auto; }
.data-alert strong { display: block; font-size: 18px; margin: 2px 0 8px; }
.data-alert p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.notify-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.notify-panel strong { display: block; margin-top: 5px; font-size: 14px; }
.notify-panel p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.email-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.email-form input { width: 220px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: #fbfcfa; }
.email-verification-panel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; justify-content: flex-end; }
.email-verification-panel label { color: var(--muted); font-size: 11px; }
.email-verification-panel input { width: 120px; letter-spacing: .18em; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.alert-retry { margin-top: 14px; padding: 8px 14px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.alert-retry:hover { background: rgba(128, 91, 25, 0.08); }
[data-research-content][hidden] { display: none; }
@media (max-width: 720px) {
  .notify-panel { display: block; }
  .email-form { justify-content: flex-start; margin-top: 13px; }
  .email-form input { width: min(100%, 260px); }
  .email-verification-panel { justify-content: flex-start; }
}

/* The dashboard is intentionally a single reading surface. Keep all sections
   in document order so the page does not need a second navigation column. */
.app-shell { display: block; }
.main-content { width: 100%; max-width: 1480px; margin: 0 auto; }
.lower-grid { grid-template-columns: 1fr; }
.timeline { max-height: 292px; overflow-y: auto; padding: 2px 12px 2px 0; scrollbar-color: #b6c5be transparent; }
.timeline::-webkit-scrollbar { width: 8px; }
.timeline::-webkit-scrollbar-thumb { background: #c7d2cd; border-radius: 10px; }
.panel-subtitle { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.absolute-guard-card { margin-top: 17px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--amber); background: #fbfcfa; display: grid; gap: 5px; }
.absolute-guard-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guard-pill { padding: 4px 8px; border-radius: 2px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.guard-pill.active { color: #a64d40; background: var(--coral-soft); }
.guard-pill.clear { color: #17685f; background: var(--teal-soft); }
.guard-pill.pending { color: #8b672d; background: #f6e8cb; }
.absolute-guard-card strong { font-size: 13px; }
.absolute-guard-card > span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.absolute-events-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 12px; }
.absolute-events-heading span { color: var(--muted); font-size: 11px; }
.absolute-events { margin-top: 11px; display: grid; gap: 8px; max-height: 220px; overflow-y: auto; padding-right: 7px; }
.absolute-event { display: grid; grid-template-columns: 88px 1fr; gap: 10px; padding: 9px 10px; background: #fbfcfa; border: 1px solid var(--line); }
.absolute-event-date { color: var(--muted); font-size: 11px; }
.absolute-event-body strong { display: block; font-size: 11px; }
.absolute-event-body span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.absolute-event.triggered { border-left: 3px solid var(--coral); }
.absolute-event.recovered { border-left: 3px solid var(--teal); }
.backtest-panel { padding: 24px 26px 20px; }
.backtest-explain { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--teal); background: #f1f8f6; color: #46635d; font-size: 12px; line-height: 1.65; }
.backtest-explain strong { color: var(--ink); }
.backtest-window { margin-top: 12px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.backtest-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin-top: 25px; }
.backtest-stat { display: grid; gap: 6px; justify-content: start; padding: 12px 13px; border: 1px solid var(--line); background: #fbfcfa; }
.backtest-stat span { font-size: 11px; }
.backtest-stat strong { font-size: 19px; line-height: 1.2; }
.backtest-detail { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.backtest-chart-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 25px; color: var(--ink); font-size: 12px; }
.backtest-chart-heading span { color: var(--muted); font-size: 11px; }
.backtest-legend { display: flex; gap: 18px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.backtest-legend .legend-item { gap: 7px; }
.backtest-legend .legend-line { height: 3px; border-radius: 3px; }
.mini-chart-wrap { height: 320px; margin-top: 8px; padding: 8px 0 0; border-top: 1px solid var(--line); overflow: hidden; }
.backtest-note { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.backtest-summary { display: block; }
.backtest-comparison { margin-top: 25px; border: 1px solid var(--line); background: #fbfcfa; overflow-x: auto; }
.backtest-comparison-grid { min-width: 650px; display: grid; grid-template-columns: minmax(112px, 1.15fr) repeat(3, minmax(145px, 1fr)); }
.backtest-comparison-grid > * { min-width: 0; padding: 11px 13px; }
.backtest-comparison-head { color: var(--muted); background: #f2f6f2; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.backtest-comparison-head span:not(:first-child), .backtest-comparison-row strong { text-align: right; }
.backtest-comparison-row { border-bottom: 1px solid var(--line); align-items: center; }
.backtest-comparison-row:last-child { border-bottom: 0; }
.backtest-comparison-row > span { color: var(--muted); font-size: 11px; }
.backtest-comparison-row strong { font-size: 16px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.strategy-head, .strategy-value { color: var(--teal); }
.signal-head, .signal-value { color: var(--amber); }
.benchmark-head, .benchmark-value { color: #74827d; }
.chart-hit-area { touch-action: none; }
@media (max-width: 720px) {
  .main-content { padding: 22px 14px; }
  .backtest-panel { padding: 18px 14px 16px; }
  .backtest-comparison-grid { min-width: 590px; grid-template-columns: 100px repeat(3, minmax(130px, 1fr)); }
  .backtest-comparison-grid > * { padding: 10px 9px; }
  .backtest-comparison-row strong { font-size: 14px; }
  .mini-chart-wrap { height: 260px; }
  .timeline { max-height: 310px; }
}

/* Public research surface: a quieter editorial layer around the live data. */
:root {
  --ink: #172625;
  --muted: #687a75;
  --line: #d7e1dc;
  --paper: #eef3ef;
  --surface: #ffffff;
  --teal: #0b756f;
  --teal-deep: #075651;
  --teal-soft: #dff1ed;
  --coral: #c55b4d;
  --coral-soft: #fae4df;
  --amber: #a8732d;
  --shadow: 0 16px 38px rgba(20, 54, 47, 0.07);
  --shadow-soft: 0 8px 22px rgba(20, 54, 47, 0.05);
}

body { background: radial-gradient(circle at 80% -10%, #dceee9 0, transparent 32rem), var(--paper); }
.skip-link { position: fixed; left: 14px; top: 10px; z-index: 20; transform: translateY(-180%); padding: 8px 12px; border-radius: 8px; color: #fff; background: var(--teal-deep); font-size: 12px; text-decoration: none; transition: transform .18s ease; }
.skip-link:focus { transform: translateY(0); }
.main-content { padding-top: 34px; }
.topbar { margin-bottom: 22px; }
.brand-block { min-width: 0; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-deep); text-decoration: none; letter-spacing: .18em; font-size: 11px; font-weight: 800; }
.brand-glyph { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--teal-deep), #45a99d); box-shadow: 0 5px 13px rgba(11,117,111,.2); letter-spacing: 0; font-size: 13px; }
.brand-glyph.small { width: 27px; height: 27px; border-radius: 8px; }
h1 { font-size: clamp(22px, 2.1vw, 30px); letter-spacing: -.035em; }
.topbar-subtitle { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.topbar-actions { padding-top: 0; gap: 15px; }
.site-nav { display: flex; align-items: center; gap: 13px; margin-left: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 11px; transition: color .18s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--teal); }
.site-nav a[aria-current="page"] { color: var(--teal-deep); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.data-status { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.72); }
.status-dot { box-shadow: 0 0 0 4px rgba(83,162,113,.14); }
.control-strip, .notify-panel, .status-panel, .metric-panel, .panel { border-radius: 16px; box-shadow: var(--shadow-soft); }
.control-strip { padding: 15px 17px; background: rgba(255,255,255,.86); }
select, .email-form input { border-radius: 9px; background: #f9fbfa; }
select:focus-visible, .email-form input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(11,117,111,.2); outline-offset: 2px; }
.research-intro { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 0 0 18px; padding: 15px 18px; border: 1px solid #c9e2dc; border-radius: 14px; background: linear-gradient(100deg, rgba(229,246,242,.92), rgba(255,255,255,.86)); box-shadow: var(--shadow-soft); }
.intro-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: var(--teal); font-size: 19px; }
.research-intro strong { display: block; font-size: 13px; }
.research-intro p { margin: 4px 0 0; color: #52706a; font-size: 11px; line-height: 1.55; }
.inline-link { color: var(--teal-deep); text-decoration: none; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inline-link:hover { text-decoration: underline; }
.research-guides { margin: 0 0 20px; }
.research-guides-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 16px; margin-bottom: 11px; }
.research-guides-heading h2 { margin: 0; font-size: 16px; color: var(--ink); }
.research-guides-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.research-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 12px; }
.research-guide-card { display: block; min-width: 0; padding: 16px 18px; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); transition: border-color .18s ease, background .18s ease; }
.research-guide-card:hover { border-color: var(--teal); background: #f8fcfa; }
.research-guide-card h3 { display: flex; justify-content: space-between; gap: 12px; margin: 7px 0; color: var(--teal); font-size: 15px; }
.research-guide-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
@media (max-width: 720px) { .research-guide-grid { grid-template-columns: 1fr; gap: 9px; } .research-guide-card { padding: 13px 15px; } }
.status-panel { background: linear-gradient(145deg, #fff 0%, #f8fcfa 100%); }
.metric-panel { background: rgba(255,255,255,.9); }
.panel-heading h2 { letter-spacing: -.015em; }
.chart-caption { padding: 6px 9px; border-radius: 999px; background: #f1f6f3; }
.absolute-guard-card, .backtest-explain, .backtest-comparison, .absolute-event { border-radius: 11px; }
.backtest-explain { background: linear-gradient(100deg, #eef9f5, #f7fbf9); }
.asset-bar { border-radius: 99px; overflow: hidden; }
.asset-bar span { border-radius: 99px; }
.timeline { scrollbar-width: thin; }
.footer-strip { padding: 13px 4px 0; color: #71827c; }
.site-footer { display: grid; grid-template-columns: minmax(170px, 1fr) auto; gap: 12px 28px; align-items: center; margin-top: 26px; padding: 20px 3px 4px; border-top: 1px solid rgba(175,193,186,.7); color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--teal-deep); }
.footer-brand span:last-child { display: grid; gap: 2px; }
.footer-brand strong { font-size: 12px; letter-spacing: .02em; }
.footer-brand small { color: var(--muted); font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 16px; }
.site-footer nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.site-footer nav a:hover { color: var(--teal); text-decoration: underline; }
.site-footer p { grid-column: 1 / -1; margin: 0; color: #87958f; font-size: 10px; }
.help-dialog { border-radius: 18px; }
.toast { border-radius: 10px; box-shadow: 0 12px 26px rgba(13,35,31,.22); }
@media (max-width: 900px) {
  .site-nav { display: none; }
  .topbar-actions { gap: 11px; }
}
@media (max-width: 720px) {
  .main-content { padding-top: 22px; }
  .topbar { align-items: flex-start; gap: 17px; }
  .topbar-actions { padding-top: 3px; }
  .topbar-subtitle { font-size: 12px; }
  .research-intro { grid-template-columns: auto 1fr; align-items: start; }
  .research-intro .inline-link { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr; gap: 16px; }
  .site-footer nav { justify-content: flex-start; }
}

/* Email actions are a primary workflow. Keep the current step visible inside
   the card so a short-lived corner toast is never the only feedback. */
.email-alert-panel {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(470px, 1.2fr);
  align-items: center;
  gap: 24px;
  padding: 20px 22px;
  border-color: #b9ded8;
  background: linear-gradient(110deg, rgba(239,250,247,.96), rgba(255,255,255,.96));
}
.notify-intro { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.email-alert-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; color: #fff; background: var(--teal); box-shadow: 0 7px 16px rgba(18,115,111,.2); font-size: 19px; }
.notify-copy { min-width: 0; }
.notify-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 5px; }
.notify-title-row strong { margin: 0; font-size: 15px; }
.notify-copy p { margin: 7px 0 0; color: #52706a; font-size: 11px; line-height: 1.65; }
.email-state-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.email-state-badge.neutral { color: #66756f; background: #eef3f0; border-color: #d6e1dc; }
.email-state-badge.loading { color: #855f20; background: #fff3d7; border-color: #ecd39b; }
.email-state-badge.success { color: #17685f; background: var(--teal-soft); border-color: #b5ddd6; }
.email-state-badge.error { color: #a64d40; background: var(--coral-soft); border-color: #edc0b8; }
.email-form { display: grid; gap: 11px; min-width: 0; }
.email-entry-row, .verification-action-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 8px; }
.email-form input { width: 100%; min-width: 0; min-height: 39px; padding: 9px 12px; border: 1px solid #c7d8d1; border-radius: 9px; color: var(--ink); background: #fff; }
.email-form input::placeholder { color: #91a19b; }
.email-action-primary, .email-action-secondary { min-height: 39px; padding: 8px 14px; border-radius: 9px; font-size: 12px; font-weight: 700; white-space: nowrap; transition: background .18s ease, border-color .18s ease, opacity .18s ease, transform .18s ease; }
.email-action-primary { border: 1px solid var(--teal); color: #fff; background: var(--teal); box-shadow: 0 5px 12px rgba(18,115,111,.15); }
.email-action-primary:hover { background: #0d625e; border-color: #0d625e; transform: translateY(-1px); }
.email-action-secondary { border: 1px solid #c7d8d1; color: #3c655d; background: rgba(255,255,255,.74); }
.email-action-secondary:hover { border-color: var(--teal); color: var(--teal); background: #fff; }
.email-action-primary:disabled, .email-action-secondary:disabled { cursor: wait; opacity: .58; transform: none; }
.email-verification-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 13px; width: 100%; margin: 0; padding: 12px 13px; border: 1px solid #b9ded8; border-radius: 11px; background: #f8fdfb; }
.email-verification-panel[hidden] { display: none; }
.verification-copy { display: grid; gap: 3px; min-width: 0; }
.verification-copy strong { font-size: 12px; }
.verification-copy span { color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.verification-copy .verification-countdown { color: var(--teal); font-weight: 700; font-variant-numeric: tabular-nums; }
.verification-copy .verification-countdown.expired { color: var(--coral); }
.verification-action-row { grid-template-columns: 120px auto auto; }
.verification-action-row input { text-align: center; letter-spacing: .2em; font-weight: 700; }
.email-status { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.email-status::before { content: "i"; display: inline-grid; place-items: center; width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; font-size: 10px; font-weight: 800; }
.notify-panel .email-status.info { color: #526b64; background: #f3f7f5; border-color: #dbe7e1; }
.email-status.info::before { color: #fff; background: #81968d; }
.notify-panel .email-status.loading { color: #78571f; background: #fff8e8; border-color: #efd49a; }
.email-status.loading::before { content: "…"; color: #fff; background: var(--amber); }
.notify-panel .email-status.success { color: #17685f; background: #eaf8f4; border-color: #bde2da; }
.email-status.success::before { content: "✓"; color: #fff; background: var(--teal); }
.notify-panel .email-status.error { color: #9b493e; background: #fff0ed; border-color: #efc9c2; }
.email-status.error::before { content: "!"; color: #fff; background: var(--coral); }
.toast { right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 32px)); padding: 13px 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; font-size: 12px; line-height: 1.5; box-shadow: 0 14px 30px rgba(13,35,31,.24); }
.toast.success { background: #146b64; }
.toast.error { background: #a84e42; }
.toast.loading { background: #876124; }
@media (max-width: 900px) {
  .email-alert-panel { grid-template-columns: 1fr; gap: 16px; }
  .email-entry-row { grid-template-columns: minmax(0, 1fr) auto auto; }
}
@media (max-width: 620px) {
  .email-entry-row, .verification-action-row { grid-template-columns: 1fr 1fr; }
  .email-entry-row input, .verification-action-row input { grid-column: 1 / -1; }
  .email-entry-row button, .verification-action-row button { width: 100%; }
  .email-verification-panel { grid-template-columns: 1fr; }
  .notify-title-row strong { font-size: 14px; }
}

/* Visual system v2: calm editorial surfaces, clearer hierarchy, and stronger
   focus states around the research controls. The data DOM and interaction
   hooks remain unchanged so the live dashboard keeps the same behavior. */
:root {
  --ink: #132b35;
  --muted: #647b84;
  --line: #d9e5e8;
  --paper: #f2f7f8;
  --surface: #ffffff;
  --teal: #087c78;
  --teal-deep: #0b3d4a;
  --teal-soft: #e2f4f1;
  --coral: #c45d56;
  --coral-soft: #fbe8e5;
  --amber: #a97127;
  --shadow: 0 20px 55px rgba(12, 48, 58, .075);
  --shadow-soft: 0 8px 26px rgba(12, 48, 58, .055);
}

body {
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 84% -8%, rgba(193, 232, 228, .72), transparent 68%),
    radial-gradient(760px 420px at -14% 18%, rgba(221, 235, 241, .72), transparent 68%),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.main-content { max-width: 1360px; padding: 31px 42px 42px; }
.topbar { align-items: center; margin-bottom: 24px; padding: 6px 0 21px; border-bottom: 1px solid rgba(177, 202, 207, .66); }
.brand-mark { gap: 9px; font-size: 11px; letter-spacing: .2em; }
.brand-glyph { width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(145deg, #0b3d4a, #0a8c83); box-shadow: 0 9px 20px rgba(8, 124, 120, .22); }
.eyebrow, .panel-kicker { color: #6a8189; letter-spacing: .16em; }
h1 { color: var(--teal-deep); font-weight: 750; }
.topbar-subtitle { color: #6b8088; }
.topbar-actions { gap: 11px; }
.data-status { padding: 6px 10px; border: 1px solid #d5e4e7; border-radius: 999px; background: rgba(255,255,255,.7); color: #58727b; }
.status-dot { width: 8px; height: 8px; box-shadow: 0 0 0 4px rgba(83, 162, 113, .13); }
.site-nav { padding: 5px 9px; border: 1px solid #d9e5e8; border-radius: 999px; background: rgba(255,255,255,.72); box-shadow: 0 4px 14px rgba(12,48,58,.035); }
.site-nav a { padding: 5px 7px; border-radius: 7px; color: #607780; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--teal); background: var(--teal-soft); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--teal-deep); background: var(--teal-soft); text-decoration: none; }
.text-button { font-weight: 700; }
.notify-button { padding: 7px 11px; border: 1px solid #bedbd7; border-radius: 8px; background: rgba(255,255,255,.72); }
.notify-button:hover { background: var(--teal-soft); text-decoration: none; }
.icon-button { width: 37px; height: 37px; border-radius: 10px; border-color: #d3e1e4; box-shadow: 0 5px 12px rgba(12,48,58,.045); }
.icon-button:hover { border-color: var(--teal); background: var(--teal-soft); }

.control-strip {
  gap: 16px; margin-bottom: 19px; padding: 14px 16px; border: 1px solid #d6e4e7;
  border-radius: 16px; background: rgba(255,255,255,.83); box-shadow: var(--shadow-soft);
}
.control-group label { color: #6a8088; font-weight: 700; }
select { min-width: 142px; border: 1px solid #cbdde1; border-radius: 9px; background: #fbfdfd; padding: 8px 11px; color: var(--ink); }
select:hover, select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(8,124,120,.1); }
.model-note { color: #617880; }
.info-badge { border-color: #9eb7bc; color: var(--teal); background: #f3fbfa; }

.research-intro { border-radius: 16px; border-color: #c5e1df; box-shadow: var(--shadow-soft); }
.research-intro .inline-link { padding: 7px 10px; border: 1px solid #b9d9d6; border-radius: 8px; background: rgba(255,255,255,.72); font-weight: 700; text-decoration: none; }
.research-intro .inline-link:hover { background: #fff; border-color: var(--teal); }
.data-alert { border-radius: 16px; box-shadow: var(--shadow-soft); }

.notify-panel {
  position: relative; overflow: hidden; grid-template-columns: minmax(0, 1fr) minmax(430px, 1.12fr);
  gap: 26px; margin-bottom: 20px; padding: 20px 22px; border: 1px solid #cfe2e3; border-radius: 20px;
  background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(240, 251, 249, .92)); box-shadow: var(--shadow);
}
.notify-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(#0b8a82, #63bdb0); }
.email-alert-icon { width: 41px; height: 41px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--teal-deep), #0c8c84); box-shadow: 0 9px 18px rgba(8,124,120,.19); font-size: 20px; }
.notify-title-row { gap: 10px; }
.notify-panel strong { color: var(--teal-deep); font-size: 15px; }
.email-state-badge { border-radius: 999px; font-weight: 800; letter-spacing: .02em; }
.email-entry-row, .verification-action-row { gap: 9px; }
.email-form input { min-height: 42px; border-radius: 10px; border-color: #c4d9dd; background: rgba(255,255,255,.9); }
.email-form input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(8,124,120,.11); }
.email-action-primary, .email-action-secondary { min-height: 42px; border-radius: 10px; }
.email-action-primary { background: linear-gradient(135deg, #087c78, #0b9187); box-shadow: 0 8px 15px rgba(8,124,120,.16); }
.email-action-secondary { background: rgba(255,255,255,.84); }
.email-verification-panel { border-radius: 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }

.hero-grid { gap: 20px; margin-bottom: 20px; }
.status-panel, .metric-panel, .panel { border: 1px solid #d6e3e6; border-radius: 20px; box-shadow: var(--shadow); }
.status-panel { position: relative; overflow: hidden; padding: 27px 29px; background: linear-gradient(145deg, #fff, #f7fbfa); }
.status-panel::after { content: ""; position: absolute; right: -70px; top: -76px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(186, 231, 224, .38), rgba(186, 231, 224, 0) 70%); pointer-events: none; }
.status-row { position: relative; z-index: 1; margin-top: 16px; }
.state-pill { padding: 6px 12px; border-radius: 999px; font-size: 11px; letter-spacing: .02em; }
.status-title { position: relative; z-index: 1; color: var(--teal-deep); font-size: clamp(21px, 2.3vw, 28px); letter-spacing: -.035em; }
.status-panel p { position: relative; z-index: 1; color: #657b83; }
.status-footer { position: relative; z-index: 1; padding-top: 13px; border-color: #dce8ea; }
.metric-grid { gap: 13px; }
.metric-panel { min-height: 108px; padding: 19px 20px; background: rgba(255,255,255,.9); transition: transform .18s ease, box-shadow .18s ease; }
.metric-panel:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(12,48,58,.1); }
.metric-panel strong { color: var(--teal-deep); font-size: 27px; letter-spacing: -.04em; }
.metric-panel span:last-child { color: #6c8188; }

.panel { padding: 23px 24px; background: rgba(255,255,255,.93); }
.panel-heading { border-bottom: 1px solid #e4edef; padding-bottom: 13px; }
.panel-heading h2 { color: var(--teal-deep); font-size: 17px; letter-spacing: -.02em; }
.panel-subtitle { color: #6a8189; }
.chart-caption { padding: 5px 9px; border: 1px solid #d6e5e7; border-radius: 999px; background: #f5fbfb; color: #5d777f; }
.chart-wrap { height: 270px; margin-top: 19px; padding: 8px 6px 0; border-radius: 14px; background: linear-gradient(180deg, #fbfdfd, #f7fbfb); }
.chart-tooltip { border-color: #bdd3d8; border-radius: 11px; box-shadow: 0 14px 28px rgba(12,48,58,.15); }
.legend { gap: 11px; margin-top: 12px; }
.legend-item { padding: 5px 8px; border: 1px solid #e0ebed; border-radius: 999px; background: #fbfdfd; }
.legend-line { border-radius: 3px; }
.asset-rows { margin-top: 21px; gap: 18px; }
.asset-row { grid-template-columns: 58px 1fr 70px; gap: 12px; }
.asset-symbol { color: var(--teal-deep); }
.asset-bar { height: 9px; overflow: hidden; border-radius: 999px; background: #edf3f4; }
.asset-bar span { border-radius: 999px; }
.asset-footnote { border-color: #e0ebed; }

.timeline { margin-top: 20px; padding-right: 11px; }
.timeline-item { min-height: 58px; }
.timeline-date { color: #6b8189; font-variant-numeric: tabular-nums; }
.timeline-detail { padding: 8px 10px; border: 1px solid #e3ecee; border-radius: 10px; background: #fbfdfd; }
.timeline-detail strong { color: var(--teal-deep); }
.timeline-marker::before { width: 11px; height: 11px; border-width: 3px; }
.absolute-events-heading { border-color: #e0ebed; }
.absolute-event { border-color: #e0ebed; border-radius: 11px; background: #fbfdfd; }
.backtest-panel { padding: 26px 28px 22px; }
.backtest-explain { border-radius: 0 12px 12px 0; background: #eff9f7; color: #55716f; }
.backtest-window { padding: 8px 10px; border: 1px solid #e2ecee; border-radius: 9px; background: #fbfdfd; }
.backtest-comparison { overflow: hidden; border-radius: 14px; border-color: #dbe7e9; box-shadow: var(--shadow-soft); }
.backtest-comparison-head { background: #f1f8f8; }
.backtest-comparison-row { background: #fff; }
.backtest-comparison-row:hover { background: #fbfefe; }
.mini-chart-wrap { height: 340px; padding: 12px 8px 0; border: 1px solid #e2ecee; border-radius: 14px; background: linear-gradient(180deg, #fbfdfd, #f7fbfb); }
.backtest-note { padding-top: 12px; border-top: 1px solid #e3ecee; }
.footer-strip { margin-top: 4px; padding: 12px 3px 0; color: #6b8189; }
.site-footer { gap: 18px; margin-top: 13px; padding: 20px 3px 4px; border-top-color: #cfdee2; }
.site-footer p { color: #74878d; }
.site-footer a { color: #5d777f; }
.site-footer a:hover { color: var(--teal); }

@media (max-width: 1050px) {
  .main-content { padding: 26px 24px 38px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .site-nav { order: 5; width: 100%; justify-content: flex-end; }
  .notify-panel { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-content { padding: 20px 13px 30px; }
  .topbar { gap: 13px; padding-bottom: 17px; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
  .site-nav { order: 0; width: 100%; justify-content: flex-start; overflow-x: auto; border-radius: 12px; padding: 5px; }
  .site-nav a { flex: 0 0 auto; }
  .data-status { order: 1; }
  .notify-button { order: 2; }
  .icon-button { order: 3; }
  .control-strip { border-radius: 14px; }
  .status-panel { padding: 23px 20px; border-radius: 17px; }
  .panel { padding: 18px 15px; border-radius: 17px; }
  .panel-heading { display: block; }
  .chart-caption { display: inline-block; margin-top: 10px; }
  .chart-wrap { height: 235px; }
  .notify-panel { padding: 17px 16px; border-radius: 17px; }
  .backtest-panel { padding: 19px 15px 17px; }
  .mini-chart-wrap { height: 270px; }
  .footer-strip { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Design refresh v3: a compact research terminal visual language. This layer
   intentionally keeps the existing DOM and interaction hooks intact while
   giving the dashboard a stronger brand, clearer hierarchy and denser data
   reading rhythm inspired by professional market workspaces. */
:root {
  --ink: #102a37;
  --ink-soft: #294955;
  --muted: #70858d;
  --muted-strong: #55717b;
  --line: #d7e5e9;
  --line-strong: #c4d8de;
  --paper: #edf3f5;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --navy: #0b2532;
  --navy-mid: #123b49;
  --teal: #079c91;
  --teal-dark: #086e70;
  --teal-soft: #def5f0;
  --growth: #068c81;
  --growth-soft: #dff5f0;
  --coral: #cf635d;
  --coral-soft: #fbe8e5;
  --amber: #b77d30;
  --amber-soft: #fff1d8;
  --shadow: 0 18px 48px rgba(13, 48, 60, .08);
  --shadow-tight: 0 7px 22px rgba(13, 48, 60, .07);
}

html { scroll-behavior: smooth; }
body {
  position: relative;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(780px 420px at 90% -12%, rgba(138, 218, 209, .35), transparent 70%),
    radial-gradient(620px 430px at -10% 20%, rgba(191, 222, 236, .32), transparent 70%),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: .005em;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(31, 92, 106, .032) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 92, 106, .032) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 68%);
  pointer-events: none;
}

.app-shell { display: block; min-height: 100vh; }
.main-content { width: min(100%, 1500px); max-width: 1500px; margin: 0 auto; padding: 24px 34px 42px; }
.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 28px;
  margin-bottom: 21px;
  padding: 25px 27px 24px;
  border: 1px solid rgba(142, 196, 200, .26);
  border-radius: 24px;
  background: linear-gradient(128deg, #09232f 0%, #103a47 58%, #145359 100%);
  box-shadow: 0 22px 58px rgba(10, 42, 54, .19);
  overflow: hidden;
}
.topbar::before, .topbar::after { position: absolute; border: 1px solid rgba(130, 222, 211, .2); border-radius: 999px; content: ""; pointer-events: none; }
.topbar::before { width: 370px; height: 370px; right: 15%; top: -290px; }
.topbar::after { width: 240px; height: 240px; right: 2%; bottom: -205px; }
.brand-block, .topbar-actions { position: relative; z-index: 1; }
.brand-block { display: grid; align-content: center; }
.brand-mark { display: inline-flex; align-items: center; width: fit-content; gap: 10px; color: #e9fffb; font-size: 11px; font-weight: 800; letter-spacing: .22em; text-decoration: none; }
.brand-glyph { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid rgba(175, 255, 245, .5); border-radius: 12px; background: linear-gradient(145deg, #19c6b5, #087b7a); box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.brand-glyph svg { width: 24px; height: 24px; fill: none; stroke: #effffc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.brand-glyph svg .brand-needle { fill: #effffc; stroke: none; }
.brand-glyph.small { width: 31px; height: 31px; border-radius: 10px; }
.brand-glyph.small svg { width: 21px; height: 21px; }
.eyebrow, .panel-kicker { color: #6b8490; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.brand-block .eyebrow { margin-top: 17px; color: #83b2b8; }
h1 { margin: 7px 0 0; color: #f1fffd; font-size: clamp(27px, 3.4vw, 41px); font-weight: 760; letter-spacing: -.055em; line-height: 1.08; }
.topbar-subtitle { max-width: 560px; margin: 10px 0 0; color: #b6d0d2; font-size: 13px; line-height: 1.65; }
.topbar-actions { display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 9px; max-width: 680px; }
.data-status { display: inline-flex; align-items: center; gap: 8px; min-height: 35px; padding: 7px 12px; border: 1px solid rgba(180, 231, 226, .22); border-radius: 999px; background: rgba(1, 21, 29, .27); color: #d1ece9; font-size: 11px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border: 2px solid rgba(192, 255, 246, .8); border-radius: 50%; background: #30d0a7; box-shadow: 0 0 0 4px rgba(42, 208, 167, .14); }
.site-nav { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid rgba(180, 231, 226, .2); border-radius: 13px; background: rgba(1, 20, 28, .25); }
.site-nav a { padding: 7px 9px; border-radius: 9px; color: #b8d0d3; font-size: 11px; text-decoration: none; transition: color .16s ease, background .16s ease; }
.site-nav a:hover, .site-nav a:focus-visible { color: #effffc; background: rgba(111, 226, 211, .15); text-decoration: none; }
.site-nav a[aria-current="page"] { color: #052832; background: #b4f0e7; font-weight: 800; }
.text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 7px 11px; border: 1px solid rgba(180, 231, 226, .26); border-radius: 10px; color: #d8f8f3; background: rgba(255,255,255,.07); font-size: 11px; font-weight: 750; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.text-button:hover { border-color: rgba(180, 231, 226, .55); color: #fff; background: rgba(255,255,255,.14); text-decoration: none; transform: translateY(-1px); }
.button-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; line-height: 1; }
.notify-button { color: #062c35; border-color: #9de7dc; background: #b2f1e8; }
.notify-button:hover { color: #062c35; background: #d5fff8; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(180, 231, 226, .28); border-radius: 10px; color: #e9fffb; background: rgba(255,255,255,.07); }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.icon-button:hover { border-color: #9de7dc; color: #b4f0e7; background: rgba(255,255,255,.14); }

.control-strip { display: grid; grid-template-columns: repeat(3, minmax(155px, 190px)) minmax(250px, 1fr); align-items: end; gap: 15px; margin-bottom: 17px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-tight); }
.control-group { position: relative; display: grid; gap: 7px; }
.control-group label { color: var(--muted-strong); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
select { width: 100%; min-width: 0; min-height: 39px; padding: 8px 34px 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font-size: 12px; font-weight: 700; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
select:hover, select:focus { border-color: var(--teal); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(7, 156, 145, .11); }
.model-note { display: flex; align-items: flex-start; justify-content: flex-end; gap: 9px; min-height: 39px; padding: 3px 2px 0 10px; color: var(--muted-strong); font-size: 11px; line-height: 1.48; }
.model-note small { color: var(--muted); font-size: 10px; }
.info-badge { display: inline-grid; place-items: center; width: 19px; height: 19px; flex: 0 0 auto; border: 1px solid #a8c5ca; border-radius: 50%; color: var(--teal-dark); background: #edfafa; font-size: 11px; font-weight: 800; }

.research-intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 17px; padding: 15px 18px; border: 1px solid #b8e1db; border-radius: 17px; background: linear-gradient(105deg, rgba(217, 247, 241, .96), rgba(255,255,255,.92)); box-shadow: var(--shadow-tight); }
.intro-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #f0fffd; background: linear-gradient(145deg, #0aa89a, #0c7777); box-shadow: 0 8px 17px rgba(5, 126, 116, .22); }
.intro-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.research-intro strong { display: block; color: #0b5458; font-size: 13px; }
.research-intro p { margin: 4px 0 0; color: #507277; font-size: 11px; line-height: 1.6; }
.inline-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #9ed2cb; border-radius: 10px; color: #0a6265; background: rgba(255,255,255,.68); font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: background .16s ease, transform .16s ease; }
.inline-link:hover { background: #fff; text-decoration: none; transform: translateY(-1px); }

.data-alert { display: flex; gap: 12px; margin-bottom: 17px; padding: 15px 18px; border: 1px solid #efc8c1; border-radius: 16px; background: #fff7f5; box-shadow: var(--shadow-tight); }
.data-alert-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; color: #fff; background: var(--coral); font-weight: 900; }
.alert-retry { margin-top: 9px; padding: 7px 10px; border: 1px solid #e8b7ad; border-radius: 8px; color: #a64d42; background: #fff; font-size: 11px; font-weight: 750; }

.notify-panel { position: relative; display: grid; grid-template-columns: minmax(250px, .8fr) minmax(460px, 1.2fr); align-items: center; gap: 25px; margin-bottom: 18px; padding: 20px 23px; border: 1px solid #b7dfda; border-radius: 20px; background: linear-gradient(112deg, rgba(245, 253, 251, .98), #fff); box-shadow: var(--shadow); overflow: hidden; }
.notify-panel::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#12b3a2, #077778); content: ""; }
.notify-intro { display: flex; align-items: flex-start; gap: 13px; }
.email-alert-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 auto; border-radius: 14px; color: #eafffb; background: linear-gradient(145deg, #0c4852, #0b8d83); box-shadow: 0 9px 20px rgba(7, 100, 101, .2); }
.email-alert-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.notify-copy { min-width: 0; }
.notify-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 5px; }
.notify-panel strong { color: #0b4b55; font-size: 15px; }
.notify-copy p { margin: 7px 0 0; color: #5e7880; font-size: 11px; line-height: 1.6; }
.email-state-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 9px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.email-state-badge.neutral { color: #64767b; background: #eef4f5; border-color: #d9e5e8; }
.email-state-badge.loading { color: #8b6227; background: var(--amber-soft); border-color: #eed39b; }
.email-state-badge.success { color: #0a6e64; background: var(--growth-soft); border-color: #b4ded7; }
.email-state-badge.error { color: #a44d45; background: var(--coral-soft); border-color: #edc1bb; }
.email-form { display: grid; gap: 10px; min-width: 0; }
.email-capacity-notice { margin: 0; padding: 11px 13px; border: 1px solid #e5b564; border-radius: 10px; color: #76501a; background: #fff7e6; font-size: 13px; font-weight: 700; line-height: 1.55; }
.email-capacity-notice[hidden] { display: none; }
.email-entry-row, .verification-action-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 8px; }
.email-form input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid #c3d9dc; border-radius: 10px; color: var(--ink); background: #fff; font-size: 12px; }
.email-form input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(7, 156, 145, .12); }
.email-action-primary, .email-action-secondary { min-height: 42px; padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 800; white-space: nowrap; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.email-action-primary { border: 1px solid #07877f; color: #fff; background: linear-gradient(135deg, #078e84, #087b78); box-shadow: 0 7px 15px rgba(8, 124, 120, .18); }
.email-action-primary:hover { background: linear-gradient(135deg, #087b78, #066963); box-shadow: 0 10px 20px rgba(8, 124, 120, .23); transform: translateY(-1px); }
.email-action-secondary { border: 1px solid #c2d8da; color: #3c666e; background: #f9fcfc; }
.email-action-secondary:hover { border-color: #79b9b7; color: #0b6e70; background: #fff; transform: translateY(-1px); }
.email-verification-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 13px; width: 100%; margin: 0; padding: 12px 13px; border: 1px solid #b7ded8; border-radius: 12px; background: #f3fcfa; }
.verification-copy { display: grid; gap: 3px; min-width: 0; }
.verification-copy strong { font-size: 12px; }
.verification-copy span { color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.verification-copy .verification-countdown { color: var(--teal-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.verification-copy .verification-countdown.expired { color: var(--coral); }
.verification-action-row { grid-template-columns: 120px auto auto; }
.verification-action-row input { text-align: center; letter-spacing: .2em; font-weight: 800; }
.email-status { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; font-size: 11px; line-height: 1.55; }
.email-status::before { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; font-size: 10px; font-weight: 900; }
.notify-panel .email-status.info { color: #526e73; background: #f2f7f7; border-color: #dce8ea; }
.email-status.info::before { content: "i"; color: #fff; background: #7e989d; }
.notify-panel .email-status.loading { color: #7d5a25; background: #fff8e8; border-color: #efd49a; }
.email-status.loading::before { content: "…"; color: #fff; background: var(--amber); }
.notify-panel .email-status.success { color: #116c63; background: #eaf8f4; border-color: #b9e1d9; }
.email-status.success::before { content: "✓"; color: #fff; background: var(--teal-dark); }
.notify-panel .email-status.error { color: #9d4942; background: #fff0ed; border-color: #efc9c2; }
.email-status.error::before { content: "!"; color: #fff; background: var(--coral); }

.hero-grid { display: grid; grid-template-columns: minmax(390px, 1.18fr) minmax(390px, 1fr); gap: 17px; margin-bottom: 17px; }
.status-panel, .metric-panel, .panel { border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.status-panel { position: relative; min-height: 224px; padding: 27px 29px; color: #eaf8f6; background: linear-gradient(145deg, #0b2a37 0%, #123f4b 72%, #15565a 100%); overflow: hidden; }
.status-panel::before { position: absolute; width: 260px; height: 260px; right: -80px; top: -115px; border: 1px solid rgba(136, 232, 219, .24); border-radius: 50%; content: ""; }
.status-panel::after { position: absolute; width: 180px; height: 180px; right: 19px; top: -75px; border: 1px solid rgba(136, 232, 219, .14); border-radius: 50%; content: ""; }
.status-panel .panel-kicker { position: relative; z-index: 1; color: #8cb9bd; }
.status-row, .status-title, .status-panel p, .status-footer, .absolute-guard-card { position: relative; z-index: 1; }
.status-row { margin-top: 17px; }
.state-pill { padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.state-pill.growth { color: #064e50; background: #b6efe5; }
.state-pill.defensive { color: #7c2f34; background: #ffd7d2; }
.state-pill.transition { color: #6e4a17; background: #ffe3a9; }
.as-of { color: #b0cbd0; font-size: 11px; }
.status-title { margin-top: 19px; color: #f1fffd; font-size: clamp(22px, 2.4vw, 31px); font-weight: 770; letter-spacing: -.045em; line-height: 1.15; }
.status-panel p { max-width: 570px; margin: 9px 0 17px; color: #bbd2d4; font-size: 12px; line-height: 1.65; }
.absolute-guard-card { margin-top: 15px; padding: 11px 12px; border: 1px solid rgba(170, 227, 222, .2); border-radius: 13px; background: rgba(0, 15, 22, .18); }
.absolute-guard-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.absolute-guard-card .panel-kicker { color: #8cb9bd; }
.absolute-guard-card strong { display: block; margin-top: 6px; color: #ecfffc; font-size: 12px; }
.absolute-guard-card > span:last-child { display: block; margin-top: 3px; color: #acc9cc; font-size: 10px; line-height: 1.45; }
.guard-pill { padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.guard-pill.pending { color: #7b5a26; background: #ffecc1; }
.guard-pill.triggered { color: #772e35; background: #ffd3d0; }
.guard-pill.clear { color: #0a665f; background: #baf1e6; }
.status-footer { display: flex; align-items: center; gap: 8px; padding-top: 13px; border-top: 1px solid rgba(175, 224, 221, .22); color: #b3cccf; font-size: 11px; }
.status-footer strong { color: #f1fffd; font-size: 13px; }
.status-footer .divider { width: 1px; height: 15px; margin: 0 6px; background: rgba(175,224,221,.3); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.metric-panel { position: relative; min-height: 105px; padding: 18px 19px; background: rgba(255,255,255,.92); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-panel::after { position: absolute; width: 90px; height: 90px; right: -44px; bottom: -45px; border: 1px solid rgba(40, 158, 151, .13); border-radius: 50%; content: ""; }
.metric-panel:hover { border-color: #abd4d4; box-shadow: 0 18px 42px rgba(12,48,58,.12); transform: translateY(-2px); }
.metric-panel .panel-kicker { position: relative; z-index: 1; }
.metric-panel strong { position: relative; z-index: 1; display: block; margin-top: 9px; color: var(--navy-mid); font-size: 28px; font-weight: 790; letter-spacing: -.055em; line-height: 1.12; }
.metric-panel span:last-child { position: relative; z-index: 1; display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

.content-grid, .lower-grid { display: grid; grid-template-columns: minmax(0, 1.63fr) minmax(320px, .97fr); gap: 17px; margin-bottom: 17px; }
.panel { padding: 23px 24px; background: rgba(255,255,255,.94); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 17px; padding-bottom: 15px; border-bottom: 1px solid #e2edf0; }
.panel-heading h2 { margin-top: 6px; color: var(--navy-mid); font-size: 18px; font-weight: 780; letter-spacing: -.035em; }
.panel-subtitle { max-width: 780px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.62; }
.chart-caption { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border: 1px solid #d5e6e9; border-radius: 999px; color: var(--muted-strong); background: #f4fafb; font-size: 10px; font-weight: 800; white-space: nowrap; }
.chart-wrap { position: relative; height: 285px; margin-top: 18px; padding: 10px 8px 0; border: 1px solid #e2edef; border-radius: 14px; background: linear-gradient(180deg, #fbfefe, #f5fafa); overflow: hidden; }
.chart-wrap::before, .mini-chart-wrap::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(54, 109, 119, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(54, 109, 119, .05) 1px, transparent 1px); background-size: 42px 42px; content: ""; pointer-events: none; }
.chart-wrap svg, .mini-chart-wrap svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible; }
.chart-tooltip { min-width: 158px; padding: 10px 12px; border: 1px solid #bdd8dc; border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 15px 32px rgba(12,48,58,.18); font-size: 11px; }
.chart-tooltip strong { display: block; margin-bottom: 7px; color: var(--navy-mid); font-size: 11px; }
.chart-tooltip span { display: block; line-height: 1.65; white-space: pre; }
.chart-tooltip i { width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.chart-hit-area { cursor: crosshair; }
[data-nav-section], #overviewSection { scroll-margin-top: 24px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid #dfebed; border-radius: 999px; background: #fbfdfd; }
.legend-line { width: 18px; height: 3px; border-radius: 3px; }
.assets-panel { min-height: 320px; }
.asset-rows { display: grid; gap: 18px; margin-top: 23px; }
.asset-row { display: grid; grid-template-columns: 59px minmax(0, 1fr) 70px; align-items: center; gap: 12px; }
.asset-symbol { color: var(--navy-mid); font-size: 13px; font-weight: 850; letter-spacing: .02em; }
.asset-bar { height: 9px; position: relative; overflow: hidden; border-radius: 999px; background: #eaf1f2; }
.asset-bar span { display: block; height: 100%; min-width: 4px; border-radius: 999px; }
.asset-bar .growth { background: linear-gradient(90deg, #27b7a6, #078a81); }
.asset-bar .defensive { background: linear-gradient(90deg, #e68a7c, #c25752); }
.asset-bar .neutral { background: #c89443; }
.asset-change { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.asset-change.growth { color: var(--growth); }
.asset-change.defensive { color: var(--coral); }
.asset-change.neutral { color: var(--amber); }
.asset-footnote { margin-top: 23px; padding-top: 12px; border-top: 1px solid #e0ebed; color: var(--muted); font-size: 10px; line-height: 2.1; }
.line-swatch { display: inline-block; width: 15px; height: 3px; margin: 0 5px 0 10px; border-radius: 3px; vertical-align: middle; }
.growth-swatch { margin-left: 0; background: var(--growth); }
.defensive-swatch { background: var(--coral); }

.timeline { display: grid; gap: 0; max-height: 430px; margin-top: 21px; padding-right: 9px; overflow-y: auto; scrollbar-color: #b9d5d7 transparent; scrollbar-width: thin; }
.timeline-item { display: grid; grid-template-columns: 89px 17px minmax(0,1fr); min-height: 59px; gap: 10px; }
.timeline-date { padding-top: 3px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.timeline-marker { position: relative; display: flex; justify-content: center; }
.timeline-marker::before { z-index: 1; width: 11px; height: 11px; border: 3px solid #bdece4; border-radius: 50%; background: var(--growth); content: ""; }
.timeline-item.defensive .timeline-marker::before { border-color: #f9cdc7; background: var(--coral); }
.timeline-item.transition .timeline-marker::before { border-color: #f9e1ad; background: var(--amber); }
.timeline-marker::after { position: absolute; top: 11px; bottom: -3px; width: 1px; background: #d9e7e9; content: ""; }
.timeline-item:last-child .timeline-marker::after { display: none; }
.timeline-detail { margin-bottom: 8px; padding: 9px 11px; border: 1px solid #e1ecee; border-radius: 11px; background: #fbfdfd; }
.timeline-detail strong { display: block; color: var(--navy-mid); font-size: 12px; }
.timeline-detail span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.absolute-events-heading { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; padding-top: 15px; border-top: 1px solid #e0ebed; color: var(--navy-mid); font-size: 12px; }
.absolute-events-heading span { color: var(--muted); font-size: 10px; }
.absolute-events { display: grid; gap: 7px; margin-top: 10px; }
.absolute-event { padding: 10px 11px; border: 1px solid #e1ecee; border-radius: 11px; background: #fbfdfd; }
.absolute-event-date { color: var(--muted); font-size: 10px; }
.absolute-event-body { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }

.backtest-panel { padding: 26px 28px 23px; }
.backtest-explain { margin-top: 16px; padding: 12px 14px; border-left: 3px solid #48b9aa; border-radius: 0 12px 12px 0; color: #527276; background: linear-gradient(100deg, #eefaf7, #f8fcfb); font-size: 11px; line-height: 1.65; }
.backtest-window { margin-top: 13px; padding: 8px 10px; border: 1px solid #e1ecee; border-radius: 9px; color: var(--muted-strong); background: #fbfdfd; font-size: 11px; }
.backtest-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin-top: 18px; }
.backtest-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #e2ecee; }
.backtest-stat span { color: var(--muted); font-size: 10px; }
.backtest-stat strong { color: var(--navy-mid); font-size: 14px; }
.backtest-detail { margin-top: 11px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.backtest-chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; color: var(--navy-mid); font-size: 12px; }
.backtest-chart-heading span { color: var(--muted); font-size: 10px; }
.backtest-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.backtest-comparison { margin-top: 16px; overflow: hidden; border: 1px solid #dce9eb; border-radius: 14px; box-shadow: var(--shadow-tight); }
.backtest-comparison-head, .backtest-comparison-row { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 8px; align-items: center; padding: 10px 12px; font-size: 10px; }
.backtest-comparison-head { color: var(--muted-strong); background: #f0f8f8; font-weight: 800; }
.backtest-comparison-row { border-top: 1px solid #e5eef0; background: #fff; }
.backtest-comparison-row:hover { background: #f8fdfc; }
.mini-chart-wrap { position: relative; height: 345px; margin-top: 12px; padding: 12px 8px 0; border: 1px solid #e0ecee; border-radius: 14px; background: linear-gradient(180deg, #fbfefe, #f5fafa); overflow: hidden; }
.backtest-note { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid #e2ecee; color: var(--muted); font-size: 10px; line-height: 1.6; }

.footer-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin-top: 3px; padding: 13px 5px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.site-footer { display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: center; gap: 14px 28px; margin-top: 18px; padding: 20px 4px 5px; border-top: 1px solid #cbdde1; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--navy-mid); }
.footer-brand span:last-child { display: grid; gap: 2px; }
.footer-brand strong { font-size: 12px; }
.footer-brand small { color: var(--muted); font-size: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 15px; }
.site-footer nav a { color: var(--muted); font-size: 11px; text-decoration: none; }
.site-footer nav a:hover { color: var(--teal-dark); text-decoration: underline; }
.site-footer p { grid-column: 1 / -1; margin: 0; color: #82949a; font-size: 10px; }
.site-footer p a { color: var(--teal-dark); }
.help-dialog { width: min(690px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 25px 70px rgba(8,42,52,.23); }
.help-dialog::backdrop { background: rgba(7, 29, 37, .46); backdrop-filter: blur(3px); }
.help-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid #e0ebed; }
.help-dialog-body { max-height: min(70vh, 640px); padding: 18px 22px 23px; overflow-y: auto; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.help-dialog-body h3 { margin: 19px 0 4px; color: var(--navy-mid); font-size: 13px; }
.help-dialog-body p { margin: 8px 0; }
.help-links { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.help-links a { color: var(--teal-dark); font-weight: 750; }
.help-note { padding: 10px 12px; border-radius: 10px; background: #f0faf8; color: #527276; }
.toast { right: 24px; bottom: 24px; max-width: min(410px, calc(100vw - 32px)); padding: 13px 17px; border: 1px solid rgba(255,255,255,.2); border-radius: 13px; box-shadow: 0 16px 34px rgba(13,35,31,.25); font-size: 12px; line-height: 1.5; }

@media (max-width: 1120px) {
  .main-content { padding: 20px 24px 36px; }
  .topbar { grid-template-columns: 1fr; gap: 20px; }
  .topbar-actions { justify-content: flex-start; max-width: none; }
  .site-nav { order: 5; width: 100%; overflow-x: auto; }
  .site-nav a { flex: 0 0 auto; }
  .control-strip { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .model-note { grid-column: 1 / -1; justify-content: flex-start; padding-left: 0; }
  .notify-panel { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 860px) {
  .hero-grid, .content-grid, .lower-grid { grid-template-columns: 1fr; }
  .status-panel { min-height: 0; }
  .assets-panel { min-height: 0; }
}
@media (max-width: 640px) {
  .main-content { padding: 12px 11px 28px; }
  .topbar { gap: 17px; margin-bottom: 14px; padding: 19px 16px 17px; border-radius: 19px; }
  .brand-glyph { width: 32px; height: 32px; border-radius: 10px; }
  .brand-glyph svg { width: 21px; height: 21px; }
  h1 { font-size: 28px; }
  .topbar-subtitle { font-size: 12px; }
  .topbar-actions { gap: 7px; }
  .data-status { order: 4; width: 100%; justify-content: center; }
  .site-nav { order: 0; border-radius: 11px; }
  .site-nav a { padding: 7px 8px; }
  .control-strip { grid-template-columns: 1fr; gap: 11px; padding: 14px; border-radius: 15px; }
  .model-note { grid-column: auto; }
  .research-intro { grid-template-columns: auto minmax(0,1fr); align-items: start; padding: 14px; border-radius: 15px; }
  .research-intro .inline-link { grid-column: 2; justify-self: start; }
  .notify-panel { padding: 17px 15px; border-radius: 17px; }
  .email-entry-row, .verification-action-row { grid-template-columns: 1fr 1fr; }
  .email-entry-row input, .verification-action-row input { grid-column: 1 / -1; }
  .email-entry-row button, .verification-action-row button { width: 100%; }
  .email-verification-panel { grid-template-columns: 1fr; }
  .status-panel { padding: 22px 19px; border-radius: 17px; }
  .metric-grid { gap: 10px; }
  .metric-panel { min-height: 96px; padding: 15px; border-radius: 15px; }
  .metric-panel strong { font-size: 23px; }
  .panel { padding: 17px 14px; border-radius: 17px; }
  .panel-heading { display: block; }
  .chart-caption { margin-top: 10px; }
  .chart-wrap { height: 242px; margin-top: 14px; padding: 8px 2px 0; }
  .mini-chart-wrap { height: 275px; padding: 9px 2px 0; }
  .asset-row { grid-template-columns: 51px minmax(0,1fr) 66px; gap: 9px; }
  .timeline-item { grid-template-columns: 76px 15px minmax(0,1fr); gap: 8px; }
  .backtest-panel { padding: 19px 14px 17px; }
  .backtest-summary { grid-template-columns: 1fr; }
  .backtest-comparison-head, .backtest-comparison-row { grid-template-columns: 1.1fr repeat(3, 1fr); gap: 4px; padding: 9px 7px; font-size: 9px; }
  .footer-strip { display: grid; gap: 5px; padding-left: 2px; }
  .site-footer { grid-template-columns: 1fr; gap: 15px; }
  .site-footer nav { justify-content: flex-start; }
}

/* Reading pass v4: give the two long research sections their own full-width
   rows. This prevents the timeline card from inheriting the height of the
   backtest chart and gives the equity curve the width it needs. */
body { font-size: 15px; }
.lower-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
.signal-panel, .backtest-panel { align-self: start; min-width: 0; width: 100%; }
.timeline { max-height: 500px; }
.timeline-date { font-size: 12px; }
.timeline-detail strong { font-size: 13px; }
.timeline-detail span { font-size: 12px; }
.panel-subtitle { font-size: 12px; }
.absolute-events-heading { font-size: 13px; }
.absolute-events-heading span { font-size: 11px; }
.absolute-event-date, .absolute-event-body { font-size: 12px; }
.backtest-summary { grid-template-columns: minmax(0, 1fr); }
.backtest-comparison { width: 100%; }
.backtest-comparison-grid { width: 100%; min-width: 0; }
.backtest-comparison-head, .backtest-comparison-row { grid-template-columns: minmax(190px, 1.25fr) repeat(3, minmax(125px, 1fr)); }
.backtest-comparison-head > *, .backtest-comparison-row > * { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.backtest-comparison-row strong { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.backtest-comparison-head { font-size: 11px; }
.backtest-comparison-row { font-size: 12px; }
.backtest-comparison-row strong { font-size: 14px; }
.mini-chart-wrap { height: 445px; }
.backtest-note { font-size: 11px; }

@media (max-width: 860px) {
  .backtest-comparison-head, .backtest-comparison-row { grid-template-columns: minmax(125px, 1.15fr) repeat(3, minmax(0, 1fr)); }
  .backtest-comparison-head { font-size: 10px; }
  .backtest-comparison-row { font-size: 11px; }
  .backtest-comparison-row strong { font-size: 13px; }
  .mini-chart-wrap { height: 395px; }
}

@media (max-width: 640px) {
  .lower-grid { gap: 14px; }
  .timeline { max-height: 390px; }
  .backtest-comparison-head, .backtest-comparison-row { grid-template-columns: minmax(90px, 1.05fr) repeat(3, minmax(0, 1fr)); gap: 5px; padding: 10px 8px; }
  .backtest-comparison-head { font-size: 9px; }
  .backtest-comparison-row { font-size: 10px; }
  .backtest-comparison-row strong { font-size: 12px; }
  .mini-chart-wrap { height: 330px; }
}

/* Type scale v5: readability first. The small uppercase labels remain
   compact, while all explanatory copy, values and controls move up one
   readable step so the dashboard can be scanned without zooming. */
body { font-size: 16px; }
.eyebrow, .panel-kicker { font-size: 11px; }
.brand-mark { font-size: 12px; }
.topbar-subtitle { font-size: 15px; }
.data-status, .site-nav a, .text-button { font-size: 12px; }
.control-group label { font-size: 12px; }
select { min-height: 43px; font-size: 14px; }
.model-note { font-size: 12px; }
.model-note small { font-size: 11px; }
.research-intro strong { font-size: 15px; }
.research-intro p { font-size: 13px; }
.inline-link { font-size: 13px; }
.notify-panel strong { font-size: 17px; }
.notify-copy p { font-size: 13px; }
.email-form input { min-height: 46px; font-size: 14px; }
.email-action-primary, .email-action-secondary { min-height: 46px; font-size: 13px; }
.email-status { font-size: 13px; }
.status-title { font-size: clamp(25px, 2.6vw, 34px); }
.status-panel p { font-size: 14px; }
.status-footer { font-size: 13px; }
.absolute-guard-card strong { font-size: 14px; }
.absolute-guard-card > span:last-child { font-size: 12px; }
.metric-panel .panel-kicker { font-size: 11px; }
.metric-panel strong { font-size: 32px; }
.metric-panel span:last-child { font-size: 13px; }
.panel-heading h2 { font-size: 20px; }
.panel-subtitle { font-size: 13px; }
.chart-caption { font-size: 12px; }
.legend { font-size: 12px; }
.asset-symbol { font-size: 15px; }
.asset-change { font-size: 14px; }
.asset-footnote { font-size: 12px; }
.timeline-date { font-size: 13px; }
.timeline-detail strong { font-size: 15px; }
.timeline-detail span { font-size: 13px; }
.absolute-events-heading { font-size: 14px; }
.absolute-events-heading span, .absolute-event-date, .absolute-event-body { font-size: 12px; }
.backtest-explain { font-size: 13px; }
.backtest-window { font-size: 12px; }
.backtest-comparison-head { font-size: 12px; }
.backtest-comparison-row { font-size: 13px; }
.backtest-comparison-row strong { font-size: 16px; }
.backtest-chart-heading { font-size: 14px; }
.backtest-chart-heading span, .backtest-note { font-size: 12px; }
.footer-strip { font-size: 12px; }
.site-footer p, .site-footer nav a { font-size: 12px; }
.chart-tooltip { font-size: 12px; }

@media (max-width: 860px) {
  .topbar-subtitle { font-size: 14px; }
  .status-panel p { font-size: 13px; }
  .panel-heading h2 { font-size: 19px; }
  .metric-panel strong { font-size: 29px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-subtitle { font-size: 13px; }
  .control-group label { font-size: 11px; }
  select { min-height: 42px; font-size: 13px; }
  .model-note { font-size: 11px; }
  .model-note small { font-size: 10px; }
  .research-intro strong { font-size: 14px; }
  .research-intro p { font-size: 12px; }
  .inline-link { font-size: 12px; }
  .notify-panel strong { font-size: 16px; }
  .notify-copy p { font-size: 12px; }
  .email-form input { font-size: 13px; }
  .status-title { font-size: 26px; }
  .status-panel p { font-size: 13px; }
  .metric-panel strong { font-size: 25px; }
  .metric-panel span:last-child { font-size: 12px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-subtitle { font-size: 12px; }
  .chart-caption, .legend { font-size: 11px; }
  .asset-symbol { font-size: 14px; }
  .asset-change { font-size: 13px; }
  .timeline-date { font-size: 12px; }
  .timeline-detail strong { font-size: 14px; }
  .timeline-detail span { font-size: 12px; }
  .backtest-explain { font-size: 12px; }
  .backtest-comparison-head { font-size: 10px; }
  .backtest-comparison-row { font-size: 11px; }
  .backtest-comparison-row strong { font-size: 13px; }
  .footer-strip, .site-footer p, .site-footer nav a { font-size: 11px; }
}

/* Final dashboard mobile pass. Keep every grid item shrinkable and let the
   navigation wrap instead of creating a browser-width horizontal strip. */
@media (max-width: 760px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .app-shell, .main-content { width: 100%; min-width: 0; max-width: 100%; }
  .main-content { padding: 12px 12px 30px; }
  .topbar, .topbar-actions, .control-strip, .research-intro, .data-alert,
  .notify-panel, .hero-grid, .content-grid, .lower-grid, .panel,
  .status-panel, .metric-panel, .footer-strip, .site-footer { min-width: 0; max-width: 100%; }
  .topbar { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .topbar-actions { width: 100%; max-width: 100%; align-items: stretch; }
  .site-nav { width: 100%; max-width: 100%; flex-wrap: wrap; justify-content: flex-start; overflow: visible; white-space: normal; }
  .site-nav a { flex: 0 0 auto; }
  .data-status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .control-strip { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .model-note { grid-column: auto; min-width: 0; }
  .research-intro { grid-template-columns: auto minmax(0, 1fr); width: 100%; }
  .research-intro .inline-link { grid-column: 2; justify-self: start; max-width: 100%; }
  .data-alert { width: 100%; }
  .notify-panel { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .email-entry-row, .verification-action-row { min-width: 0; }
  .hero-grid, .content-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .panel-heading, .panel-heading > div, .panel-subtitle { min-width: 0; max-width: 100%; }
  .panel-subtitle, .backtest-explain, .backtest-window, .backtest-note { overflow-wrap: anywhere; }
  .chart-wrap, .mini-chart-wrap { width: 100%; max-width: 100%; }
  .footer-strip { display: grid; grid-template-columns: minmax(0, 1fr); }
  .site-footer { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .site-footer nav { width: 100%; max-width: 100%; flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .main-content { padding-left: 10px; padding-right: 10px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .research-intro { grid-template-columns: minmax(0, 1fr); }
  .research-intro .intro-icon { justify-self: start; }
  .research-intro .inline-link { grid-column: auto; }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .asset-row { grid-template-columns: 54px minmax(0, 1fr) 68px; }
  .timeline-item { grid-template-columns: 70px 14px minmax(0, 1fr); gap: 7px; }
  .absolute-event { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .backtest-comparison { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .backtest-comparison-head { display: none; }
  .backtest-comparison-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 9px; padding: 0; overflow: hidden; border: 1px solid #dce9eb; border-radius: 12px; }
  .backtest-comparison-row > span { grid-column: 1 / -1; padding: 10px 11px; border-bottom: 1px solid #dce9eb; color: var(--muted-strong); background: #f0f8f8; }
  .backtest-comparison-row > strong { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 11px 8px; text-align: left !important; white-space: nowrap; }
  .backtest-comparison-row > strong::before { color: var(--muted); font-size: 10px; font-weight: 700; }
  .backtest-comparison-row .strategy-value::before { content: "策略"; }
  .backtest-comparison-row .signal-value::before { content: "纯相对信号"; }
  .backtest-comparison-row .benchmark-value::before { content: "QQQ"; }
  .mini-chart-wrap { height: 310px; }
}

/* Distinguish absolute price trends from defensive/QQQ relative ratios. */
.chart-view-switch { display: inline-flex; gap: 4px; margin-top: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #f1f7f8; }
.chart-view-button { min-height: 34px; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chart-view-button.active { background: #fff; color: var(--teal-dark); box-shadow: 0 2px 8px rgba(16, 42, 55, .12); }
.chart-view-button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.asset-rows { gap: 10px; margin-top: 17px; }
.asset-row.pair-reading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 14px; border: 1px solid #dce9eb; border-radius: 12px; background: #f9fcfc; }
.pair-reading-head, .pair-reading-values, .pair-reading-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.pair-reading-head .asset-symbol { font-size: 15px; }
.pair-reading-head .asset-change { font-size: 15px; font-weight: 800; }
.pair-reading-values { color: var(--muted-strong); font-size: 12px; font-variant-numeric: tabular-nums; }
.pair-reading-values strong { color: var(--ink); font-size: 13px; }
.pair-reading-foot { color: var(--muted); font-size: 11px; }
.pair-reading-foot .asset-bar { flex: 1 1 auto; min-width: 35px; }
@media (max-width: 520px) {
  .chart-view-switch { display: flex; width: 100%; }
  .chart-view-button { flex: 1; }
  .pair-reading-values { flex-wrap: wrap; }
}
