/* Light research theme aligned with 急速回测_重构版/web/frontend/src/design-tokens.css. */
:root {
  color-scheme: light;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-hover: #f1f6fb;
  --ink: #203249;
  --muted: #566b82;
  --faint: #6b7d90;
  --line: #dfe7ef;
  --line-subtle: #e9eef3;
  --line-strong: #b9c9d8;
  --brand: #174f78;
  --brand-dark: #095679;
  --brand-soft: #eaf2fa;
  --brand-border: #afd0df;
  --accent: #087e8b;
  --navy: #174f78;
  --chart-line: #32839b;
  --benchmark: #8c9caf;
  --gold: #98703b;
  --green: #208575;
  --red: #be414a;
  --focus: #174f78;
  --radius: 12px;
  --shadow: 0 8px 30px rgb(25 52 80 / 9%);
  --panel-shadow: 0 2px 5px rgb(25 52 80 / 2.5%), 0 8px 24px rgb(25 52 80 / 2.5%);
  --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body { margin: 0; min-width: 360px; color: var(--ink); background: var(--canvas); font-size: 13px; line-height: 1.7; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { transition: background 150ms, color 150ms, border-color 150ms; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: wait; }
svg { flex-shrink: 0; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
.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; }
.topbar { height: 76px; display: flex; align-items: center; padding: 0 clamp(20px,3vw,46px); gap: 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-logo { display: block; width: 156px; height: auto; object-fit: contain; }
.product-name { padding-left: 17px; margin-left: -11px; border-left: 1px solid var(--line); color: var(--brand); font-weight: 650; font-size: 13px; line-height: 28px; letter-spacing: .02em; white-space: nowrap; }
.source-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.source-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.source-state.is-ready .status-dot { background: var(--green); box-shadow: 0 0 0 3px #edf6f2; }
.source-state.is-error .status-dot { background: var(--red); }
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; color: var(--faint); background: transparent; border: 1px solid transparent; border-radius: 5px; }
.icon-button:hover { color: var(--brand); background: var(--brand-soft); }
.icon-button svg { width: 15px; height: 15px; }
.icon-button.is-spinning svg { animation: spin .85s linear infinite; }
.header-breadcrumb { display: flex; gap: 11px; color: var(--faint); font-size: 12px; }
.header-breadcrumb i { color: var(--line-strong); font-style: normal; }
.header-breadcrumb span:last-child { color: var(--muted); }
.repository-navigation { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; padding: 0 clamp(20px,3vw,46px); border-bottom: 1px solid var(--line); background: var(--surface); }
.workspace-switch { display: flex; align-items: stretch; gap: 20px; }
.workspace-link { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 54px; padding: 7px 8px; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.workspace-link svg { width: 16px; height: 16px; }
.workspace-link::after { content: ""; position: absolute; inset: auto 8px -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.workspace-link:hover { color: var(--brand); background: var(--surface-hover); }
.workspace-link.is-active { color: var(--brand); font-weight: 700; }
.workspace-link.is-active::after { background: var(--brand); }
.navigation-note { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 10px; letter-spacing: .12em; }
.navigation-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.page-content { width: min(100%,1640px); margin: 0 auto; padding: 30px clamp(20px,3vw,46px) 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
.page-heading .page-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted); font: 600 10px/1.4 var(--font-mono); letter-spacing: .14em; }
.page-kicker > span, .section-marker { display: inline-block; width: 5px; height: 14px; border-radius: 2px; background: var(--accent); flex: none; }
h1 { font-size: clamp(28px,2.6vw,36px); line-height: 1.25; letter-spacing: -.025em; font-weight: 650; }
.title-mark { color: var(--accent); margin-left: 3px; }
.page-heading p { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.heading-note { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.heading-note > svg { width: 28px; height: 28px; stroke-width: 1.3; color: var(--accent); }
.heading-note small { display: block; margin-top: 5px; color: var(--faint); font-size: 11px; }
.workspace { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 24px; align-items: start; }
.configuration { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px 18px; box-shadow: var(--panel-shadow); }
.panel-title-row, .results-header, .section-label-row, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { font: 500 10px/1.4 var(--font-mono); letter-spacing: .09em; color: var(--faint); margin-bottom: 7px; }
.panel-title-row h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--brand); }
.catalog-count { padding: 3px 7px; background: var(--surface-muted); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; white-space: nowrap; }
.control-section { padding: 17px 0; border-bottom: 1px solid var(--line-subtle); }
.control-section h2 { font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.section-label-row h2 { margin-bottom: 0; }
.section-label-row { margin-bottom: 12px; }
.step-number { display: inline-block; margin-right: 8px; color: var(--accent); font: 500 11px var(--font-mono); }
.no-bottom-border { border-bottom: 0; padding-bottom: 8px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--muted); background: none; border: 0; font-size: 11px; }
.text-button:hover { color: var(--brand); }
.text-button svg { width: 12px; height: 12px; }
.search-control { position: relative; display: flex; align-items: center; padding: 0 9px 0 12px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; }
.search-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(10 99 143 / 13%); }
.search-control > svg { width: 15px; height: 15px; color: var(--faint); }
.search-control input { width: 100%; height: 40px; min-width: 0; padding: 0 8px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-control input::placeholder { color: var(--faint); }
.search-clear { width: 24px; height: 24px; }
.search-results { position: absolute; z-index: 25; top: calc(100% + 5px); right: 0; left: 0; max-height: 270px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.search-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 10px 12px; color: var(--ink); text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item:focus-visible { background: var(--brand-soft); }
.search-item strong { font-size: 12px; font-weight: 500; }
.search-item code { align-self: center; color: var(--muted); font-size: 11px; }
.search-empty { padding: 14px 12px; color: var(--muted); font-size: 12px; }
.selected-funds { display: grid; margin-top: 10px; }
.selected-row { display: grid; grid-template-columns: minmax(0,1fr) 76px 25px; gap: 6px; align-items: center; min-height: 62px; border-bottom: 1px solid var(--line-subtle); }
.fund-name { min-width: 0; position: relative; padding-left: 11px; }
.fund-name::before { content: ""; position: absolute; left: 0; top: 7px; width: 3px; height: 26px; border-radius: 2px; background: var(--fund-color, var(--navy)); }
.fund-name strong, .fund-name code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fund-name strong { font-size: 13px; font-weight: 500; }
.fund-name code { margin-top: 2px; color: var(--faint); font: 11px var(--font-mono); }
.weight-input-wrap { position: relative; }
.weight-input { width: 100%; height: 30px; padding: 0 22px 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; appearance: textfield; }
.weight-input::-webkit-inner-spin-button { appearance: none; }
.weight-input-wrap > span:not(.sr-only) { position: absolute; top: 6px; right: 7px; color: var(--muted); font-size: 11px; pointer-events: none; }
.remove-holding { width: 25px; height: 28px; }
.remove-holding svg { width: 13px; height: 13px; }
.weight-footer { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 11px; }
#holdingCount { margin-left: 6px; color: var(--faint); }
.weight-footer strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.weight-footer strong.is-invalid { color: var(--red); }
.weight-bar { display: flex; height: 4px; gap: 3px; border-radius: 3px; overflow: hidden; margin-top: 9px; background: var(--surface-muted); }
.weight-bar i { height: 100%; border-radius: 2px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: var(--line-subtle); border: 1px solid var(--line); border-radius: 8px; }
.segment { min-height: 34px; padding: 0 6px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 5px; font-size: 12px; }
.segment:hover { color: var(--brand); }
.segment.is-active { color: var(--brand); background: #fff; border-color: var(--line); box-shadow: 0 1px 3px rgb(30 43 64 / 4%); font-weight: 600; }
.date-presets { display: flex; gap: 3px; }
.date-presets button { padding: 2px 4px; border: 0; border-radius: 4px; background: none; color: var(--faint); font-size: 10px; }
.date-presets button.is-active, .date-presets button:hover { background: var(--brand-soft); color: var(--brand); }
.field-grid { display: grid; gap: 12px; }
.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 11px; }
.field input, .field select { width: 100%; height: 36px; min-width: 0; padding: 0 8px; color: var(--ink); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.field input:hover, .field select:hover { border-color: #aeb8c7; }
.field input::-webkit-calendar-picker-indicator { opacity: .45; width: 12px; }
.wide-field { grid-column: 1 / -1; }
.choice-grid { display: grid; gap: 7px; }
.choice-grid.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { min-height: 32px; display: grid; place-items: center; padding: 4px 6px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; text-align: center; cursor: pointer; }
.choice input:checked + span { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-border); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.run-area { padding-top: 16px; }
.run-button { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; background: var(--brand); border: 1px solid var(--brand); border-radius: 8px; font-size: 12px; font-weight: 500; }
.run-button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.run-button svg { width: 14px; height: 14px; }
.run-button svg:last-child { margin-left: 45px; }
.run-button:disabled { background: #789db4; border-color: #789db4; box-shadow: none; }
.calculation-note { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 11px 0 0; color: var(--faint); font-size: 10px; }
.calculation-note svg { width: 11px; height: 11px; }
.results { min-width: 0; padding-top: 3px; }
.results-header { min-height: 52px; margin-bottom: 18px; flex-wrap: wrap; }
.results-header h2 { font-size: 18px; font-weight: 600; }
.result-meta { font-size: 11px; color: var(--faint); padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; text-align: right; background: var(--surface); }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; padding: 22px 0; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--panel-shadow); }
.metric-card { min-width: 0; padding: 0 22px; background: transparent; border-right: 1px solid var(--line-subtle); }
.metric-card > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; color: var(--muted); font-size: 12px; }
.metric-card > span svg { width: 14px; height: 14px; color: var(--faint); stroke-width: 1.5; }
.metric-card small { display: block; color: var(--faint); font-size: 11px; }
.metric-card strong { display: block; margin: 8px 0 5px; color: var(--ink); font: 500 clamp(22px,2vw,30px)/1.4 "Bahnschrift", "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.placeholder-metrics .metric-card strong { color: var(--line-strong); font-size: 30px; font-weight: 400; }
.metric-card strong.positive { color: var(--red); }
.metric-card strong.negative { color: var(--green); }
.metric-card:first-child { border-top: 0; }
.chart-section, .data-section, .empty-chart-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 24px; min-width: 0; box-shadow: var(--panel-shadow); }
.section-heading h3 { font-size: 14px; }
.section-heading p { margin-top: 4px; color: var(--faint); font-size: 11px; }
.subtle-chip { padding: 3px 9px; color: var(--faint); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.empty-chart-content { min-height: 305px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--surface-muted); border: 1px dashed var(--line); border-radius: 8px; margin: 20px 0; padding: 24px 16px; }
.empty-chart-content h2 { font-size: 17px; margin-top: 23px; font-weight: 500; }
.empty-chart-content p { font-size: 12px; color: var(--faint); margin-top: 9px; line-height: 1.8; }
.empty-action { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 12px; color: var(--brand); text-decoration: none; padding: 7px 12px; border: 1px solid var(--brand-border); background: var(--surface); border-radius: 6px; }
.empty-action:hover { background: var(--brand-soft); }
.empty-action svg { width: 12px; height: 12px; }
.empty-illustration { width: 117px; height: 88px; position: relative; border: 1px solid #e0e5ed; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #263a5b08; transform: rotate(-5deg); padding: 15px; }
.illustration-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 100%; border-bottom: 1px solid #e3e8ee; }
.illustration-bars b { width: 10px; height: 18px; border-radius: 2px 2px 0 0; background: #dee4ee; }
.illustration-bars b:nth-child(2) { height: 28px; }
.illustration-bars b:nth-child(3) { height: 23px; }
.illustration-bars b:nth-child(4) { height: 37px; background: #bcc9dd; }
.illustration-bars b:nth-child(5) { height: 46px; background: #879cbf; }
.empty-illustration > span { position: absolute; right: -17px; bottom: -9px; width: 40px; height: 40px; background: var(--brand); color: #fff; border: 4px solid #fff; border-radius: 9px; display: grid; place-items: center; transform: rotate(5deg); }
.empty-illustration svg { width: 21px; height: 21px; stroke-width: 1.5; }
.empty-chart-footer { display: flex; gap: 20px; align-items: center; color: var(--faint); font-size: 11px; flex-wrap: wrap; }
.empty-chart-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.empty-chart-footer > span:last-child { margin-left: auto; color: var(--faint); }
.legend-swatch { display: inline-block; width: 12px; height: 3px; border-radius: 1px; }
.nav-swatch { background: var(--chart-line); }
.invested-swatch { background: var(--benchmark); }
.research-guide { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--panel-shadow); }
.guide-heading { padding-right: 15px; border-right: 1px solid var(--line-subtle); display: flex; flex-direction: column; justify-content: center; }
.guide-heading .eyebrow { font-size: 8px; letter-spacing: 1px; }
.guide-heading h3 { font-size: 13px; color: var(--ink); }
.guide-number { color: var(--accent); font: 400 15px var(--font-mono); }
.research-guide h4 { margin-top: 6px; font-size: 12px; color: var(--ink); font-weight: 500; }
.research-guide p { margin-top: 6px; color: var(--faint); font-size: 11px; line-height: 1.7; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px; color: var(--muted); font-size: 11px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nav-chart { width: 100%; height: 320px; margin-top: 20px; }
.fund-nav-chart { width: 100%; height: 280px; margin-top: 20px; }
.result-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(230px,.8fr); gap: 20px; }
.result-grid .data-section { padding: 20px; }
.compact-heading { margin-bottom: 16px; flex-wrap: wrap; }
.fee-chip { padding: 3px 7px; color: var(--gold); background: #faf5ec; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 9px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; font-weight: 500; background: var(--surface-muted); }
td { color: var(--ink); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-hover); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.fund-cell strong, .fund-cell span { display: block; }
.fund-cell strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.fund-cell span { margin-top: 3px; color: var(--faint); font-size: 10px; }
.execution-line { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line-subtle); font-size: 12px; }
.execution-line:last-child { border-bottom: 0; }
.execution-line span { color: var(--muted); }
.execution-line strong { font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.trade-table-wrap { max-height: 360px; }
.trade-table-wrap thead { position: sticky; top: 0; background: var(--surface-muted); }
.side-buy { color: var(--red); }
.side-sell { color: var(--green); }
.page-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); letter-spacing: .02em; }
.page-footer b { padding: 0 6px; font-weight: 400; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: min(420px,calc(100vw - 48px)); padding: 13px 18px; color: #fff; background: var(--navy); border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 160ms, transform 160ms; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #b42318; }
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 40; right: 0; top: calc(100% + 7px); width: max-content; max-width: 210px; padding: 5px 8px; color: #fff; background: var(--navy); border-radius: 4px; font-size: 10px; opacity: 0; pointer-events: none; transition: opacity 120ms; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel-title-row { margin: 0 -20px; padding: 17px 20px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; background: var(--surface-muted); }
.panel-caption { margin: 4px 0 0 13px; color: var(--faint); font-size: 11px; }
.metric-card:last-child { border-right: 0; }
.section-heading h3 { display: flex; align-items: center; gap: 8px; }
.section-heading h3::before { content: ""; width: 4px; height: 13px; border-radius: 2px; background: var(--accent); }
.empty-illustration { transform: none; box-shadow: none; border-color: var(--line); }
.empty-illustration > span { transform: none; background: var(--brand); }
.illustration-bars b:nth-child(4) { background: #afd0df; }
.illustration-bars b:nth-child(5) { background: var(--chart-line); }
@media (min-width: 781px) {
  .run-area { position: sticky; bottom: 0; z-index: 3; background: var(--surface); padding-bottom: 4px; box-shadow: 0 -8px 12px #ffffffed; }
}
@media (max-width: 1200px) {
  .header-breadcrumb, .heading-note { display: none; }
  .workspace { grid-template-columns: 320px minmax(0,1fr); gap: 20px; }
  .metric-card { padding: 0 16px; }
  .metric-card > span svg { display: none; }
  .result-grid { grid-template-columns: 1fr; gap: 0; }
  .research-guide { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .guide-heading { grid-column: 1 / -1; border-right: 0; }
}
@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0; }
  .metric-card { padding: 18px; }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line-subtle); }
  .empty-chart-footer > span:last-child { margin-left: 0; width: 100%; }
  .empty-chart-panel, .chart-section { padding: 20px; }
  .research-guide { gap: 14px; padding: 20px; }
}
@media (max-width: 780px) {
  html { scroll-padding-top: 80px; }
  .topbar { height: 64px; padding: 0 18px; gap: 20px; }
  .brand-logo { width: 145px; }
  .product-name { font-size: 12px; padding-left: 14px; margin-left: -5px; }
  .source-state, .navigation-note { display: none; }
  .repository-navigation { padding: 0 12px; }
  .workspace-switch { gap: 13px; }
  .workspace-link { font-size: 12px; }
  .page-content { padding: 24px 18px; }
  .page-heading { padding-bottom: 24px; }
  .page-heading p { font-size: 12px; }
  h1 { font-size: 28px; }
  .workspace { grid-template-columns: 1fr; gap: 28px; }
  .field input, .field select { height: 40px; }
  .choice span { min-height: 36px; }
  .segment { min-height: 37px; }
  .metric-card strong { font-size: 24px; }
  .metric-card > span svg { display: block; }
  .results-header h2 { font-size: 18px; }
  .result-meta { font-size: 10px; }
  .empty-chart-content { min-height: 300px; }
  .research-guide { gap: 12px; padding: 18px; }
  .page-footer { flex-wrap: wrap; gap: 6px; }
  .nav-chart { height: 270px; }
  .fund-nav-chart { height: 260px; }
  .section-heading { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
