:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  --color-bg: #f5f5f7; --color-surface: rgba(255,255,255,.82); --color-surface-solid: #fff;
  --color-text: #1d1d1f; --color-muted: #6e6e73; --color-border: rgba(0,0,0,.06);
  --color-action: #0071e3; --color-action-hover: #006edb; --color-formal: #0071e3; --color-shadow: #9b51e0; --color-benchmark: #e58a00;
  --color-positive: #147346; --color-negative: #b53b43;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius-control: 12px; --radius-card: 22px; --radius-pill: 999px;
  --shadow-card: 0 8px 30px rgba(10,37,64,.06), inset 0 1px rgba(255,255,255,.6);
  --focus-ring: 0 0 0 4px rgba(0,113,227,.3);
  --font-caption: .74rem; --font-body: .8rem; --font-card-value: clamp(1.7rem, 2.15vw, 2.2rem);
  color: var(--color-text); background: var(--color-bg);
}
/* Desktop screens sit farther away than phones; scale the shared rem-based type
   up slightly while preserving the compact mobile layout below. */
@media (min-width: 821px) { :root { font-size: 106.25%; } }
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.9) 0, transparent 60%), var(--color-bg); }
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.975); }
.page-shell { width: min(1740px, calc(100% - 36px)); margin: 20px auto 96px; }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 52px; margin-bottom: 42px; padding: 5px 7px 5px 16px; border: 1px solid var(--color-border); border-radius: 16px; background: rgba(255,255,255,.78); box-shadow: 0 5px 22px rgba(10,37,64,.045); backdrop-filter: blur(18px) saturate(140%); }
.site-brand { color: var(--color-text); font-size: .86rem; font-weight: 650; letter-spacing: -.015em; text-decoration: none; white-space: nowrap; }
.view-switcher { display: flex; align-items: center; gap: 4px; }
.view-link { min-height: 44px; padding: 12px 14px; border-radius: var(--radius-control); color: var(--color-muted); font-size: .82rem; font-weight: 590; line-height: 20px; text-decoration: none; white-space: nowrap; transition: color .16s ease, background .16s ease, box-shadow .16s ease; }
.view-link:hover { color: var(--color-action-hover); background: rgba(0,113,227,.06); }
.view-link[aria-current="page"] { color: #fff; background: var(--color-action); box-shadow: 0 2px 8px rgba(0,113,227,.22); }
.returns-hero { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.eyebrow, .section-kicker { margin: 0 0 var(--space-2); color: var(--color-action-hover); font-size: var(--font-caption); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
.subtitle, .calculator-intro, .calculator-note, .dashboard-footnote, .status { text-wrap: pretty; }
h1 { margin-bottom: 0; font-size: clamp(2.2rem, 4.4vw, 3.75rem); font-weight: 600; line-height: 1.07; letter-spacing: -.03em; color: var(--color-text); }
.subtitle { margin: 14px auto 0; color: var(--color-muted); font-size: 1.05rem; line-height: 1.6; font-weight: 400; }
.calculate-button { border: 0; border-radius: var(--radius-pill); background: var(--color-action); color: #fff; box-shadow: 0 1px 2px rgba(10,37,64,.08); cursor: pointer; font-weight: 590; letter-spacing: -.005em; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.calculate-button:hover { background: var(--color-action-hover); box-shadow: 0 4px 12px rgba(0,113,227,.25); }
.card, .material-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); backdrop-filter: blur(20px) saturate(140%); }
.table-scroll { position: relative; max-height: min(640px, 70vh); overflow-x: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-color: #c7c7cc transparent; }
.returns-table-scroll { max-height: none; }
.table-scroll::after { content: ""; position: sticky; display: none; bottom: 0; left: 0; right: 0; height: 32px; margin-top: -32px; background: linear-gradient(180deg, transparent, rgba(245,245,247,.94)); pointer-events: none; transition: opacity .15s ease; }
.table-scroll.has-vertical-overflow:not(.at-bottom)::after { display: block; }
.table-scroll.at-bottom::after { opacity: 0; }
/* Right-edge fade so the wide tables read as horizontally scrollable. */
.table-shell { position: relative; }
.table-shell::after { content: ""; position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 44px; background: linear-gradient(90deg, transparent, rgba(245,245,247,.75)); opacity: 1; transition: opacity .18s ease; pointer-events: none; }
.table-shell.at-right-end::after { opacity: 0; }
table { width: 100%; min-width: 960px; border-collapse: separate; border-spacing: 0; font-size: .87rem; }
th, td { height: 46px; padding: 7px 9px; border-right: 1px solid #e5e5ea; border-bottom: 1px solid #e5e5ea; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 2; height: 56px; background: #fbfbfd; color: var(--color-text); font-weight: 600; }
tr > :last-child { border-right: 0; } tbody tr:last-child > * { border-bottom: 0; }
.row-label { position: sticky; left: 0; z-index: 1; width: 92px; background: #fbfbfd; text-align: right; font-weight: 600; }thead th.row-label { z-index: 3; }.yearly-heading { width: 90px; line-height: 1.18; }.average-row > * { font-weight: 600; }.average-row td { box-shadow: inset 0 1px rgba(255,255,255,.7); }.crosshair-row > td, .crosshair-row > th { box-shadow: inset 0 1px 0 rgba(0,113,227,.45), inset 0 -1px 0 rgba(0,113,227,.45); }.crosshair-col { box-shadow: inset 1px 0 0 rgba(0,113,227,.32), inset -1px 0 0 rgba(0,113,227,.32); }
.status { margin: 0; padding: 13px 18px; border-top: 1px solid #e5e5ea; color: var(--color-muted); font-size: .79rem; line-height: 1.45; }.status.error { color: #ff3b30; }

.calculator { max-width: 1740px; margin: 0 auto; }.calculator-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }.calculator h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 600; letter-spacing: -.025em; color: var(--color-text); }.text-button { border: 0; padding: 9px 0; background: none; color: var(--color-action-hover); cursor: pointer; font-weight: 590; }.calculator-intro { max-width: 900px; margin: 14px 0 0; color: var(--color-muted); line-height: 1.65; }
.calculator-form { display: grid; grid-template-columns: 1fr 1fr 1.35fr 1fr auto; gap: var(--space-4); align-items: start; margin: var(--space-5) 0 var(--space-3); padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); backdrop-filter: blur(20px) saturate(140%); }.calculator-form label { display: grid; gap: 7px; color: var(--color-text); font-size: .79rem; font-weight: 590; }.date-input-group { display: grid; gap: var(--space-2); }.calculator-form input, .chart-select-label select { min-width: 0; min-height: 44px; border: 1px solid #d2d2d7; border-radius: var(--radius-control); padding: 11px 12px; background: rgba(255,255,255,.9); color: var(--color-text); outline: 0; transition: border-color .16s ease, box-shadow .16s ease; }.calculator-form input:focus, .chart-select-label select:focus { border-color: var(--color-action); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }.calculator-form input[aria-invalid="true"], .chart-select-label select[aria-invalid="true"] { border-color: #d70015; box-shadow: 0 0 0 3px rgba(215,0,21,.1); }.calculate-button { align-self: start; min-height: 44px; margin-top: 22px; padding: 0 22px; }.calculate-actions { display: grid; gap: 8px; align-self: start; justify-items: stretch; margin-top: 22px; }.calculate-actions .calculate-button { margin-top: 0; align-self: auto; }.copy-link-button { margin-top: 0; }.copy-link-button:disabled { opacity: .5; cursor: default; }.scale-toggle { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--color-border); border-radius: 999px; background: rgba(245,245,247,.92); }.scale-toggle-button { min-height: 30px; border: 0; border-radius: 999px; padding: 4px 11px; background: transparent; color: var(--color-muted); cursor: pointer; font-size: .74rem; font-weight: 590; }.scale-toggle-button[aria-pressed="true"] { background: #fff; color: var(--color-action-hover); box-shadow: 0 1px 4px rgba(0,0,0,.09); }.export-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 0 24px; }.export-row[hidden] { display: none; }.current-state-card { margin-bottom: 18px; padding: 18px 22px; }.current-state-card[hidden] { display: none; }.current-state-card .state-line { margin: 0 0 6px; color: var(--color-text); font-size: .86rem; font-weight: 590; }.current-state-card .state-sub { margin: 0 0 6px; color: var(--color-muted); font-size: .78rem; line-height: 1.55; }.current-state-card .state-disclaimer { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: .72rem; line-height: 1.5; }.current-state-card .state-degraded { color: #b4232c; }.current-state-card .state-badge { display: inline-block; margin-left: 6px; border: 1px solid rgba(155,81,224,.3); border-radius: 999px; padding: 1px 8px; background: rgba(155,81,224,.08); color: #7c3aed; font-size: .7rem; font-weight: 590; }.field-help { color: var(--color-muted); font-size: .7rem; font-weight: 400; line-height: 1.4; }.field-error, .form-error { color: #b4232c; font-size: .72rem; font-weight: 550; line-height: 1.4; }.field-error:empty { display: none; }.form-error { grid-column: 1 / -1; margin: 0; padding: 9px 11px; border-radius: var(--radius-control); background: #fff2f2; }.form-error[hidden] { display: none; }
/* 表单密度：本金/月供是两个必填核心参数，日期是回测区间的次要配置——
   加一点视觉权重差异，让首次访问的人先看到"要填什么"而不是被五列平铺淹没。 */
.calculator-form label.field-primary { font-size: .82rem; font-weight: 650; }
.field-primary input { border-color: rgba(0,113,227,.3); background: rgba(0,113,227,.045); font-weight: 600; }
.calculator-form label.field-secondary, .calculator-form .field-secondary label { color: var(--color-muted); font-size: .76rem; font-weight: 500; }
.field-secondary input { font-weight: 500; }
.date-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; color: var(--color-muted); font-size: .76rem; }.date-presets span { margin-right: 3px; font-weight: 590; }.date-presets button { min-height: 32px; border: 1px solid #d2d2d7; border-radius: var(--radius-pill); padding: 5px 10px; background: rgba(255,255,255,.7); color: #424245; cursor: pointer; font-size: .75rem; font-weight: 550; transition: background .16s ease, color .16s ease; }.date-presets button.selected, .date-presets button:hover { background: #e8f0fe; color: var(--color-action-hover); }.date-presets button:disabled { cursor: wait; opacity: .48; }.top-threshold-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }.top-threshold-picker .chart-select-label select { width: 190px; }.top-threshold-hint { flex-basis: 100%; max-width: 78ch; margin: 2px 0 0; color: var(--color-muted); font-size: var(--font-caption); line-height: 1.6; }.calculator-note { max-width: 78ch; margin: 0; color: var(--color-muted); font-size: var(--font-body); line-height: 1.7; }.calculator-status { margin-top: 17px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: rgba(255,255,255,.5); }.status > span, .status-text { display: block; max-width: 88ch; }
.cost-tax-options { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: rgba(255,255,255,.6); }.cost-tax-options summary { cursor: pointer; color: #424245; font-size: .82rem; font-weight: 590; }.cost-tax-options[open] summary { margin-bottom: 10px; }.cost-tax-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--space-4); align-items: end; }.cost-tax-grid label { display: grid; gap: 6px; color: var(--color-text); font-size: .78rem; font-weight: 590; }.cost-tax-grid input { min-height: 44px; border: 1px solid #d2d2d7; border-radius: var(--radius-control); padding: 9px 10px; background: rgba(255,255,255,.9); color: var(--color-text); outline: 0; }.cost-tax-grid input:focus { border-color: var(--color-action); box-shadow: 0 0 0 4px rgba(0,113,227,.15); }.cost-presets { display: flex; align-items: center; gap: 6px; color: var(--color-muted); font-size: var(--font-caption); }.cost-presets span { margin-right: 2px; font-weight: 590; }.cost-presets button { min-height: 32px; border: 1px solid #d2d2d7; border-radius: var(--radius-pill); padding: 4px 9px; background: rgba(255,255,255,.7); color: #424245; cursor: pointer; font-size: .73rem; font-weight: 550; }.cost-presets button.selected, .cost-presets button:hover { background: #e8f0fe; color: var(--color-action-hover); }.tax-toggle { display: flex; align-items: center; gap: 7px; grid-column: 1 / -1; color: var(--color-text); font-size: var(--font-body); font-weight: 590; }.tax-toggle input { width: 16px; height: 16px; }.tax-rate-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--space-4); grid-column: 1 / -1; }.tax-rate-inputs label { display: grid; gap: 6px; color: var(--color-text); font-size: .78rem; font-weight: 590; }.tax-rate-inputs input { min-height: 44px; border: 1px solid #d2d2d7; border-radius: var(--radius-control); padding: 9px 10px; background: rgba(255,255,255,.9); color: var(--color-text); outline: 0; }.cost-tax-disclaimer { max-width: 90ch; margin: var(--space-3) 0 0; color: var(--color-muted); font-size: var(--font-caption); line-height: 1.6; }.long-history-options { border-color: rgba(191,90,0,.28); background: rgba(255,247,237,.75); }.long-history-options summary { color: #9a4c00; }.long-history-banner { max-width: 100ch; margin: 0 0 14px; padding: 10px 14px; border: 1px solid rgba(191,90,0,.3); border-radius: var(--radius-control); background: rgba(255,247,237,.9); color: #7c3d00; font-size: .76rem; line-height: 1.6; }
.parameter-group { margin: 0 0 12px; border: 1px solid var(--color-border); border-radius: 14px; background: rgba(255,255,255,.6); }.parameter-group > summary { min-height: 44px; box-sizing: border-box; padding: 12px 16px; cursor: pointer; color: #424245; font-size: .82rem; font-weight: 590; }.parameter-group[open] > summary { border-bottom: 1px solid var(--color-border); }.parameter-group > :not(summary) { margin-inline: 16px; }.parameter-group > .top-threshold-picker { margin-block: 14px; }.scenario-section { margin-block: 0 !important; padding: 16px 0; }.scenario-section + .scenario-section { border-top: 1px solid var(--color-border); }.scenario-section h3 { margin-bottom: 12px; font-size: .86rem; }.long-history-options { border: 0; background: transparent; }.risk-notices { margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(191,90,0,.22); border-radius: 13px; background: rgba(255,247,237,.78); color: #7c3d00; font-size: .74rem; line-height: 1.55; }.risk-notices p { margin-bottom: 6px; }.risk-notices p:last-child { margin-bottom: 0; }
.result-tabs { position: sticky; top: 8px; z-index: 8; display: flex; gap: 4px; margin: 24px 0 14px; padding: 5px; overflow-x: auto; border: 1px solid var(--color-border); border-radius: 14px; background: rgba(245,245,247,.92); backdrop-filter: blur(18px); }.result-tabs[hidden] { display: none; }
/* .chart-layout/.strategy-summary/.dashboard-overview 各自写死了 display（grid/flex），
   同优先级下网页自身样式会盖过浏览器内置的 [hidden]{display:none}，
   导致 setResultTab() 里 element.hidden=true 在这几个元素上悄悄失效，必须显式覆盖。 */
.chart-layout[hidden], .strategy-summary[hidden], .dashboard-overview[hidden] { display: none; }.result-tabs button { min-width: max-content; min-height: 44px; flex: 1; border: 0; border-radius: 10px; padding: 9px 14px; background: transparent; color: var(--color-muted); cursor: pointer; font-size: .8rem; font-weight: 590; }.result-tabs button[aria-selected="true"] { background: #fff; color: var(--color-action-hover); box-shadow: 0 1px 5px rgba(0,0,0,.09); }.strategy-dashboard[data-active-tab="overview"] .chart-layout { grid-template-columns: 1fr; }.strategy-dashboard[data-active-tab="overview"] .chart-card:not(:first-child) { display: none; }.secondary-button { min-height: 44px; margin-top: 12px; border: 1px solid #d2d2d7; border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--color-action-hover); cursor: pointer; font-size: .78rem; font-weight: 590; }.methodology-card p { max-width: 85ch; color: var(--color-muted); line-height: 1.7; }
.retry-button[hidden], .result-skeleton[hidden] { display: none; }.result-skeleton { display: grid; gap: var(--space-4); margin-top: 18px; }.skeleton-overview, .skeleton-cards i, .skeleton-risk, .skeleton-chart { display: block; border-radius: var(--radius-card); background: linear-gradient(100deg, rgba(210,210,215,.35) 20%, rgba(255,255,255,.82) 40%, rgba(210,210,215,.35) 60%); background-size: 220% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; }.skeleton-overview { height: 92px; }.skeleton-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }.skeleton-cards i { height: 190px; }.skeleton-risk { height: 88px; }.skeleton-chart { height: 300px; }@keyframes skeleton-shimmer { to { background-position: -120% 0; } }
.tax-liquidation { color: #424245; }

.strategy-dashboard { margin-top: 24px; }.dashboard-overview { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 22px 24px; }.dashboard-overview h3, .chart-heading h3 { margin-bottom: 0; font-size: 1.22rem; font-weight: 600; letter-spacing: -.02em; color: var(--color-text); }.dashboard-overview p:not(.section-kicker) { margin: 7px 0 0; color: var(--color-muted); font-size: .82rem; line-height: 1.55; }.dashboard-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.info-pill { border: 1px solid rgba(0,113,227,.16); border-radius: 999px; padding: 7px 12px; background: rgba(0,113,227,.08); color: #0064c4; font-size: .76rem; font-weight: 590; white-space: nowrap; }
.effective-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; padding: 6px 11px; border: 1px solid rgba(0,113,227,.16); border-radius: 10px; background: rgba(0,113,227,.06); color: #0064c4; font-size: .78rem; font-variant-numeric: tabular-nums; }
.effective-range-label { color: var(--color-action-hover); font-weight: 590; }
.effective-range time { font-weight: 600; }
.strategy-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }.strategy-card { min-width: 0; padding: clamp(22px, 1.5vw, 28px); border: 1px solid rgba(0,0,0,.05); border-radius: 20px; box-shadow: 0 6px 20px rgba(10,37,64,.045), inset 0 1px rgba(255,255,255,.8); }.strategy-card p { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #424245; font-size: clamp(.88rem, .85vw, 1rem); font-weight: 600; line-height: 1.35; }.strategy-card p i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; }.strategy-card strong { display: block; margin-bottom: 18px; font-size: clamp(1.7rem, 2.15vw, 2.2rem); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; color: var(--color-text); font-variant-numeric: tabular-nums; }.strategy-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; margin: 0; }.strategy-card dt { color: #68686d; font-size: clamp(.79rem, .75vw, .88rem); line-height: 1.35; }.strategy-card dd { margin: 4px 0 0; font-size: clamp(.95rem, .9vw, 1.08rem); font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }.strategy-card-ma200 { background: linear-gradient(140deg, #e3f0ff, #f8fbff); border-color: rgba(0,113,227,.32); box-shadow: 0 8px 24px rgba(0,113,227,.1), inset 0 1px rgba(255,255,255,.85); }.strategy-card-candidate_a { background: linear-gradient(140deg, #e9fbfa, #fafefe); }.strategy-card-qqq_buy_hold { background: linear-gradient(140deg, #fff5e5, #fffcf7); }.live-badge { margin-left: 6px; padding: 3px 8px; border-radius: 999px; background: rgba(0,113,227,.12); color: #0064c4; font-size: .72rem; font-weight: 700; letter-spacing: .01em; vertical-align: middle; }
.chart-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .9fr); gap: 14px; }.chart-card, .indicator-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--color-border); border-radius: 20px; background: rgba(255,255,255,.78); box-shadow: 0 8px 26px rgba(10,37,64,.05), inset 0 1px rgba(255,255,255,.75); backdrop-filter: blur(20px) saturate(140%); }.inline-tooltip { position: absolute; z-index: 4; min-width: 130px; max-width: 230px; padding: 8px 10px; border: 1px solid rgba(0,0,0,.08); border-radius: 10px; background: rgba(255,255,255,.97); box-shadow: 0 8px 20px rgba(10,37,64,.14); color: var(--color-text); font-size: .75rem; line-height: 1.5; font-variant-numeric: tabular-nums; pointer-events: none; }.inline-tooltip strong { display: block; margin-bottom: 2px; }.inline-tooltip span { display: block; }.chart-card-wide { grid-column: 1 / 2; }.chart-card:nth-child(2), .chart-card:nth-child(4) { grid-column: 2; }.chart-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }.chart-heading .section-kicker { margin-bottom: 4px; }.chart-heading p:not(.section-kicker) { max-width: 200px; margin: 2px 0 0; color: #68686d; font-size: .75rem; line-height: 1.45; text-align: right; }.chart-select-label { display: grid; gap: 3px; min-width: 0; color: var(--color-muted); font-size: .72rem; font-weight: 590; }.chart-select-label select { max-width: 100%; width: 210px; padding: 6px 8px; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.chart-card canvas { display: block; width: 100%; height: 260px; border-radius: 14px; background: linear-gradient(180deg, rgba(245,245,247,.7), rgba(255,255,255,.2)); contain: paint; }.chart-card:nth-child(2) canvas, .chart-card:nth-child(4) canvas { height: 260px; }.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; color: var(--color-muted); font-size: .75rem; }.chart-legend span, .chart-legend button.legend-toggle { display: inline-flex; align-items: center; gap: 5px; }.chart-legend button.legend-toggle { border: 0; margin: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; transition: opacity .14s ease; }.chart-legend button.legend-toggle[aria-pressed="false"] { opacity: .4; text-decoration: line-through; text-decoration-thickness: 1px; }.chart-legend button.legend-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,.3); border-radius: 6px; }
/* Hovering the strategy <select> inside the market chart card must not also trigger the whole card's zoom-in hover state. */
.chart-card[data-chart]:has(.chart-select-label:hover, .chart-select-label select:focus-visible) { transform: none; box-shadow: 0 8px 26px rgba(10,37,64,.05), inset 0 1px rgba(255,255,255,.75); cursor: default; }.legend-line { width: 17px; height: 3px; border-radius: 999px; background: var(--color-action); }.legend-line.price { background: #16252e; }.legend-line.average { background: #19c3df; }.legend-line.average-500 { background: #e89100; }.legend-line.band-50 { height: 2px; background: repeating-linear-gradient(90deg, #ff637d 0 6px, transparent 6px 10px); }.legend-line.band-20 { height: 2px; background: repeating-linear-gradient(90deg, #22c987 0 6px, transparent 6px 10px); }.legend-dot { width: 10px; height: 10px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #34c759; }.legend-dot.buy { background: #24d99a; }.legend-dot.sell { transform: rotate(180deg); background: #ff5b77; }.legend-dot.signal { clip-path: none; border: 2px dashed #68756f; border-radius: 50%; box-sizing: border-box; background: transparent; }.allocation-scale { display: flex; justify-content: space-between; margin: 8px 18px 0 52px; color: #68686d; font-size: .74rem; font-variant-numeric: tabular-nums; }
.indicator-card { margin-top: 14px; }.indicator-card .chart-heading { margin-bottom: 13px; }#indicator-table { min-width: 850px; }#indicator-table th, #indicator-table td { height: 42px; }#indicator-table tbody th { text-align: left; }.strategy-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; }
.action-log-meta { margin: 0 0 12px; color: var(--color-muted); font-size: .78rem; }#action-log-table { min-width: 1420px; font-size: .82rem; }#action-log-table th, #action-log-table td { height: 40px; padding: 5px 8px; }#action-log-table tbody th[scope="row"] { text-align: left; font-variant-numeric: tabular-nums; }.action-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 590; white-space: nowrap; }.action-badge.buy { background: rgba(36,217,154,.14); color: #087f55; }.action-badge.sell { background: rgba(255,91,119,.13); color: #c44151; }.action-log-empty { padding: 18px 8px; color: var(--color-muted); font-size: .82rem; text-align: center; }
.chart-card[data-chart] { cursor: zoom-in; transition: transform .18s ease, box-shadow .18s ease; }.chart-card[data-chart]:hover, .chart-card[data-chart]:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(10,37,64,.1); outline: none; }.chart-card[data-chart]:focus-visible { box-shadow: 0 16px 32px rgba(10,37,64,.1), 0 0 0 4px rgba(0,113,227,.35); }.dashboard-footnote { max-width: 78ch; margin: -2px 0 14px; color: var(--color-muted); font-size: .78rem; line-height: 1.6; }
.has-note { position: relative; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.partial-month-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(0,113,227,.12); color: #0064c4; font-size: .68rem; font-weight: 700; letter-spacing: .01em; text-decoration: none; vertical-align: middle; }
.has-note::after { content: attr(data-note); position: absolute; z-index: 6; top: calc(100% + 6px); left: 50%; width: max-content; max-width: 240px; padding: 8px 10px; border: 1px solid rgba(0,0,0,.08); border-radius: 10px; background: rgba(255,255,255,.98); box-shadow: 0 8px 22px rgba(10,37,64,.16); color: var(--color-text); font-size: .74rem; font-weight: 400; line-height: 1.5; text-align: left; text-decoration: none; white-space: normal; transform: translateX(-50%); opacity: 0; visibility: hidden; transition: opacity .14s ease; pointer-events: none; }
.has-note:hover::after, .has-note:focus-visible::after { opacity: 1; visibility: visible; }
.has-note:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,.35); border-radius: 6px; }.chart-modal { inset: 0; width: min(1740px, calc(100% - 36px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))); max-width: none; max-height: min(94dvh, 100%); margin: auto; overflow: auto; border: 1px solid rgba(0,0,0,.08); border-radius: 26px; padding: 24px; color: var(--color-text); background: rgba(252,252,253,.97); box-shadow: 0 30px 90px rgba(10,20,45,.32); }.chart-modal::backdrop { background: rgba(0,0,0,.42); backdrop-filter: blur(8px); }.chart-modal-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }.chart-modal-header h2 { margin: 0; font-size: 1.55rem; font-weight: 600; letter-spacing: -.025em; }.modal-close { width: 36px; height: 36px; border: 1px solid rgba(0,0,0,.08); border-radius: 50%; background: #fff; color: #424245; font-size: 1.6rem; line-height: 1; cursor: pointer; }.chart-modal-description, .chart-modal-hint { margin: 7px 0 14px; color: var(--color-muted); font-size: .82rem; }.chart-modal-hint { margin: 11px 0 0; font-size: .74rem; }.modal-canvas-wrap { position: relative; overflow: hidden; }.modal-canvas-wrap canvas { display: block; width: 100%; height: min(56dvh, 640px); border-radius: 16px; background: linear-gradient(180deg, rgba(245,245,247,.85), rgba(255,255,255,.5)); }.chart-tooltip { position: absolute; z-index: 2; min-width: 158px; max-width: 265px; max-height: calc(100% - 16px); padding: 10px 12px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: rgba(255,255,255,.97); box-shadow: 0 12px 28px rgba(10,37,64,.16); color: var(--color-text); font-size: .78rem; line-height: 1.55; font-variant-numeric: tabular-nums; pointer-events: none; }.chart-tooltip strong { display: block; margin-bottom: 3px; }.chart-tooltip span { display: block; }.chart-tooltip .tooltip-action { margin-top: 5px; font-weight: 590; }.chart-tooltip .tooltip-action.buy { color: #087f55; }.chart-tooltip .tooltip-action.sell { color: #c44151; }.chart-tooltip .tooltip-detail { margin-top: 3px; color: #68686d; font-size: .73rem; }.chart-zoom { margin-top: 12px; padding: 9px 12px 11px; border: 1px solid rgba(0,0,0,.07); border-radius: 12px; background: rgba(245,245,247,.6); }.chart-zoom-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--color-muted); font-size: .75rem; font-weight: 590; }.chart-zoom-label output { color: var(--color-action-hover); font-variant-numeric: tabular-nums; }.chart-navigator { position: relative; height: 62px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: rgba(255,255,255,.6); }.chart-navigator canvas { display: block; width: 100%; height: 100%; }.chart-zoom-selection { position: absolute; top: 5px; bottom: 5px; z-index: 1; border: 1px solid var(--color-action); background: rgba(0,113,227,.12); pointer-events: none; }.chart-zoom-track { position: absolute; inset: 0; z-index: 2; }.chart-zoom-track input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; appearance: none; pointer-events: none; background: transparent; }.chart-zoom-track input::-webkit-slider-thumb { width: 14px; height: 38px; border: 2px solid #fff; border-radius: 4px; appearance: none; background: var(--color-action); box-shadow: 0 1px 5px rgba(0,0,0,.28); cursor: ew-resize; pointer-events: auto; }.chart-zoom-track input::-moz-range-thumb { width: 11px; height: 34px; border: 2px solid #fff; border-radius: 4px; background: var(--color-action); box-shadow: 0 1px 5px rgba(0,0,0,.28); cursor: ew-resize; pointer-events: auto; }
.table-card { margin-top: 14px; }#strategy-table { min-width: 1500px; table-layout: fixed; font-size: .78rem; }#strategy-table tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; background: #fbfbfd; }#strategy-table thead th:first-child { position: sticky; left: 0; z-index: 3; background: #fbfbfd; }#strategy-table th, #strategy-table td { height: 42px; padding: 5px 4px; }#strategy-table thead th { height: 58px; white-space: normal; line-height: 1.2; }#strategy-table th:nth-child(1) { width: 6.5%; }#strategy-table th:nth-child(2) { width: 5.5%; }#strategy-table th:nth-child(3) { width: 7.5%; }#strategy-table th:nth-child(n + 4) { width: 6.708%; }.strategy-cell-ma200 { background: #f2f7ff; }.strategy-cell-candidate-a { background: #eefaf9; }.strategy-cell-qqq-buy-hold { background: #fff8ec; }thead .strategy-cell-ma200 { background: #e5f0ff; }thead .strategy-cell-candidate-a { background: #dff4f2; }thead .strategy-cell-qqq-buy-hold { background: #fff1d7; }
.money { font-weight: 600; }.positive { color: var(--color-positive); }.negative { color: var(--color-negative); }.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; }
.strategy-summary { gap: var(--space-4); margin: var(--space-4) 0; }
.strategy-card { border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.strategy-card strong { font-size: var(--font-card-value); }
.strategy-card-ma200 { border-color: var(--color-formal); }
.strategy-card-candidate_a { border-color: var(--color-shadow); }
.strategy-card-qqq_buy_hold { border-color: var(--color-benchmark); }
.result-tabs button[aria-selected="true"] { background: var(--color-surface-solid); }
.date-presets[hidden], .tax-rate-inputs[hidden], .effective-range[hidden] { display: none; }
@media (max-width: 1180px) { .calculator-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }.calculator-form .calculate-actions { align-self: end; margin-top: 0; }.strategy-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.chart-layout { grid-template-columns: 1fr; }.chart-card-wide, .chart-card:nth-child(2), .chart-card:nth-child(4) { grid-column: auto; }.chart-card canvas, .chart-card:nth-child(2) canvas, .chart-card:nth-child(4) canvas { height: 250px; } }
@media (max-height: 900px) { .chart-modal { padding: 16px 20px; } .modal-canvas-wrap canvas { height: min(48dvh, 480px); } .chart-modal-header h2 { font-size: 1.28rem; } }
@media (max-width: 820px) { .chart-modal { width: calc(100% - 20px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); padding: 16px; border-radius: 20px; } .modal-canvas-wrap canvas { height: min(48dvh, 420px); } .page-shell { width: min(100% - 20px, 760px); margin: 10px auto 44px; }.site-nav { gap: 8px; margin-bottom: 30px; padding-left: 12px; }.site-brand { font-size: .8rem; }.view-link { min-height: 44px; padding-inline: 10px; font-size: .76rem; }.calculator-heading, .dashboard-overview { align-items: start; flex-direction: column; }.dashboard-pills { justify-content: start; }.calculator-form { grid-template-columns: 1fr; }.strategy-summary, .skeleton-cards { grid-template-columns: 1fr; }.chart-heading { flex-direction: column; }.chart-heading p:not(.section-kicker) { text-align: left; }.chart-card { padding: 14px; }.chart-card canvas { height: 225px !important; }[data-chart="market"] #market-chart { height: 300px !important; }.chart-select-label select { max-width: 100%; }.date-presets, .cost-presets { flex-wrap: wrap; }.cost-tax-grid, .tax-rate-inputs { grid-template-columns: minmax(0, 1fr); }.date-presets button, .cost-presets button, .cost-tax-grid input, .tax-rate-inputs input { min-height: 44px; }.tax-toggle { min-height: 44px; } #strategy-table { min-width: 1400px; table-layout: auto; } #strategy-table th, #strategy-table td { padding: 6px 7px; } #strategy-table thead th { white-space: nowrap; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media (prefers-reduced-transparency: reduce) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { background: #fff; backdrop-filter: none; } }
/* Narrow viewports are the ones most likely to be a lower-power phone stacking several blurred,
   scrolling cards; drop the glass effect there instead of only gating it on prefers-reduced-transparency. */
@media (max-width: 820px) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (max-width: 820px) { .tax-toggle input { min-height: 16px; } }
@media (prefers-contrast: more) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { border-color: var(--color-text); } }
::selection { background: rgba(0,113,227,.22); color: var(--color-text); }
.table-scroll::-webkit-scrollbar { height: 8px; }.table-scroll::-webkit-scrollbar-track { background: transparent; }.table-scroll::-webkit-scrollbar-thumb { background: #c7c7cc; border-radius: 999px; }.table-scroll::-webkit-scrollbar-thumb:hover { background: #aeaeb2; }
.chart-select-label select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M1 1l5 5 5-5' stroke='%236e6e73' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 10px; padding-right: 28px; }
.view-link:focus-visible, .site-brand:focus-visible, .calculate-button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.text-button:focus-visible, .date-presets button:focus-visible, .modal-close:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,113,227,.3); border-radius: 8px; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--color-action); color: #fff; font-weight: 590; font-size: .85rem; text-decoration: none; transition: top .16s ease; }
.skip-link:focus { top: 12px; }
.strategy-dashboard.is-loading { opacity: .45; filter: saturate(.55); pointer-events: none; transition: opacity .25s ease, filter .25s ease; }
.status.loading::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 7px; border: 2px solid rgba(0,113,227,.25); border-top-color: var(--color-action); border-radius: 50%; vertical-align: -2px; animation: status-spin .7s linear infinite; }
@keyframes status-spin { to { transform: rotate(360deg); } }
@media (prefers-color-scheme: dark) {
  :root { --color-bg: #0a0a0a; --color-surface: rgba(28,28,30,.72); --color-surface-solid: #1c1c1e; --color-text: #f5f5f7; --color-muted: #98989d; --color-border: rgba(255,255,255,.1); --color-action: #0a84ff; --color-action-hover: #409cff; --color-formal: #409cff; --color-shadow: #bf8cff; --color-benchmark: #ffb340; --color-positive: #30d158; --color-negative: #ff6961; --shadow-card: 0 8px 30px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.05); --focus-ring: 0 0 0 4px rgba(10,132,255,.4); color: var(--color-text); background: var(--color-bg); }
  body { background: radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.05) 0, transparent 60%), #0a0a0a; }
  .eyebrow, .section-kicker { color: #409cff; }
  h1 { color: #f5f5f7; }
  .subtitle { color: #98989d; }
  .site-nav { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.76); box-shadow: 0 6px 22px rgba(0,0,0,.38); }
  .site-brand { color: #f5f5f7; }
  .view-link { color: #98989d; }
  .view-link:hover { color: #409cff; background: rgba(10,132,255,.12); }
  /* #0a84ff（暗色模式的--color-action）配白字只有3.64:1，未达WCAG AA正文4.5:1；
     换成#0071e3（浅色模式同名变量的值），实测4.69:1。 */
  .view-link[aria-current="page"] { color: #fff; background: #0071e3; box-shadow: 0 2px 10px rgba(10,132,255,.24); }
  .calculate-button { background: #0074e0; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
  .calculate-button:hover { background: #0064c4; box-shadow: 0 4px 14px rgba(10,132,255,.32); }
  .view-link:focus-visible, .site-brand:focus-visible, .calculate-button:focus-visible { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 0 0 4px rgba(10,132,255,.4); }
  .card, .material-card { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.72); box-shadow: 0 8px 30px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.05); }
  .table-scroll { scrollbar-color: #48484a transparent; }
  .table-scroll::after { background: linear-gradient(180deg, transparent, rgba(10,10,10,.94)); }
  .table-shell::after { background: linear-gradient(90deg, transparent, rgba(10,10,10,.8)); }
  .table-scroll::-webkit-scrollbar-thumb { background: #48484a; }
  .table-scroll::-webkit-scrollbar-thumb:hover { background: #636366; }
  th, td { border-right-color: rgba(255,255,255,.1); border-bottom-color: rgba(255,255,255,.1); }
  thead th { background: #1c1c1e; color: #f5f5f7; }
  .row-label { background: #1c1c1e; }
  .crosshair-row > td, .crosshair-row > th { box-shadow: inset 0 1px 0 rgba(10,132,255,.55), inset 0 -1px 0 rgba(10,132,255,.55); }
  .crosshair-col { box-shadow: inset 1px 0 0 rgba(10,132,255,.4), inset -1px 0 0 rgba(10,132,255,.4); }
  .average-row td { box-shadow: inset 0 1px rgba(255,255,255,.04); }
  .status { border-top-color: rgba(255,255,255,.1); color: #98989d; }
  .status.error { color: #ff453a; }
  .calculator h2 { color: #f5f5f7; }
  .text-button { color: #409cff; }
  .calculator-intro { color: #98989d; }
  .calculator-form { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.72); box-shadow: 0 8px 26px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04); }
  .calculator-form label { color: #f5f5f7; }
  .field-primary input { border-color: rgba(10,132,255,.4); background: rgba(10,132,255,.08); }
  .calculator-form label.field-secondary, .calculator-form .field-secondary label { color: #98989d; }
  .calculator-form input, .chart-select-label select { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #f5f5f7; }
  .calculator-form input:focus, .chart-select-label select:focus { border-color: #0a84ff; box-shadow: 0 0 0 4px rgba(10,132,255,.25); }
  .chart-select-label select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2398989d' d='M1 1l5 5 5-5' stroke='%2398989d' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  .date-presets { color: #98989d; }
  .date-presets button { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #c7c7cc; }
  .date-presets button.selected, .date-presets button:hover { background: rgba(10,132,255,.18); color: #409cff; }
  .field-help { color: #98989d; }
  .field-error, .form-error { color: #ff6961; }
  .form-error { background: rgba(255,69,58,.12); }
  .parameter-group { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.5); }
  .parameter-group > summary { color: #f5f5f7; }
  .parameter-group[open] > summary, .scenario-section + .scenario-section { border-color: rgba(255,255,255,.1); }
  .scenario-section h3 { color: #f5f5f7; }
  .risk-notices { border-color: rgba(255,159,10,.28); background: rgba(255,159,10,.1); color: #ffd08a; }
  .result-tabs { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.9); }
  .result-tabs button { color: #98989d; }
  .result-tabs button[aria-selected="true"] { background: #3a3a3c; color: #409cff; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
  .secondary-button { border-color: rgba(255,255,255,.16); background: #2c2c2e; color: #409cff; }
  .scale-toggle { border-color: rgba(255,255,255,.16); background: #2c2c2e; }
  .scale-toggle-button[aria-pressed="true"] { background: #3a3a3c; color: #409cff; }
  .calculator-note { color: #98989d; }
  .cost-tax-options { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.5); }
  .cost-tax-options summary { color: #f5f5f7; }
  .cost-tax-grid label, .tax-toggle, .tax-rate-inputs label { color: #f5f5f7; }
  .cost-tax-grid input, .tax-rate-inputs input { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #f5f5f7; }
  .cost-tax-grid input:focus, .tax-rate-inputs input:focus { border-color: #0a84ff; box-shadow: 0 0 0 4px rgba(10,132,255,.25); }
  .cost-presets { color: #98989d; }
  .cost-presets button { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #c7c7cc; }
  .cost-presets button.selected, .cost-presets button:hover { background: rgba(10,132,255,.18); color: #409cff; }
  .cost-tax-disclaimer { color: #98989d; }
  .long-history-options { border-color: rgba(255,159,67,.28); background: rgba(48,36,24,.5); }
  .long-history-options summary { color: #ffb066; }
  .long-history-banner { border-color: rgba(255,159,67,.3); background: rgba(48,36,24,.7); color: #ffc78f; }
  .tax-liquidation { color: #f5f5f7; }
  .dashboard-footnote { color: #98989d; }
  .calculator-status { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
  .dashboard-overview h3, .chart-heading h3 { color: #f5f5f7; }
  .dashboard-overview p:not(.section-kicker) { color: #98989d; }
  .info-pill { border-color: rgba(10,132,255,.3); background: rgba(10,132,255,.14); color: #409cff; }
  .effective-range { border-color: rgba(10,132,255,.3); background: rgba(10,132,255,.12); color: #409cff; }
  .effective-range-label { color: #409cff; }
  .strategy-card { border-color: rgba(255,255,255,.08); box-shadow: 0 6px 20px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.04); }
  .strategy-card p { color: #c7c7cc; }
  .strategy-card strong { color: #f5f5f7; }
  .strategy-card dt { color: #8e8e93; }
  .strategy-card-ma200 { background: linear-gradient(140deg, rgba(10,132,255,.16), rgba(28,28,30,.5)); border-color: rgba(10,132,255,.4); box-shadow: 0 8px 22px rgba(10,132,255,.14), inset 0 1px rgba(255,255,255,.05); }
  .strategy-card-candidate_a { background: linear-gradient(140deg, rgba(100,210,255,.14), rgba(28,28,30,.5)); }
  .strategy-card-qqq_buy_hold { background: linear-gradient(140deg, rgba(255,159,10,.16), rgba(28,28,30,.5)); }
  .live-badge { background: rgba(10,132,255,.16); color: #409cff; }
  .partial-month-badge { background: rgba(10,132,255,.16); color: #409cff; }
  .chart-card, .indicator-card { border-color: rgba(255,255,255,.1); background: rgba(28,28,30,.68); box-shadow: 0 8px 26px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04); }
  .chart-heading p:not(.section-kicker) { color: #8e8e93; }
  .chart-select-label { color: #98989d; }
  .chart-card canvas { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.12)); }
  .chart-legend { color: #98989d; }
  .legend-line { background: #0a84ff; }
  .legend-line.price { background: #f5f5f7; }
  .allocation-scale { color: #8e8e93; }
  .chart-card[data-chart]:hover, .chart-card[data-chart]:focus-visible { box-shadow: 0 16px 32px rgba(0,0,0,.55); }
  .chart-card[data-chart]:focus-visible { box-shadow: 0 16px 32px rgba(0,0,0,.55), 0 0 0 4px rgba(10,132,255,.4); }
  .chart-card[data-chart]:has(.chart-select-label:hover, .chart-select-label select:focus-visible) { box-shadow: 0 8px 26px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04); }
  .chart-legend button.legend-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(10,132,255,.4); }
  .chart-modal { border-color: rgba(255,255,255,.12); color: #f5f5f7; background: rgba(20,20,22,.97); }
  .chart-modal::backdrop { background: rgba(0,0,0,.6); }
  .modal-close { border-color: rgba(255,255,255,.14); background: #1c1c1e; color: #c7c7cc; }
  .chart-modal-description, .chart-modal-hint { color: #98989d; }
  .modal-canvas-wrap canvas { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.1)); }
  .chart-tooltip { border-color: rgba(255,255,255,.12); background: rgba(28,28,30,.97); box-shadow: 0 12px 28px rgba(0,0,0,.5); color: #f5f5f7; }
  .chart-tooltip .tooltip-action.buy { color: #32d74b; }
  .chart-tooltip .tooltip-action.sell { color: #ff6961; }
  .chart-tooltip .tooltip-detail { color: #98989d; }
  .action-log-meta, .action-log-empty { color: #98989d; }
  .action-badge.buy { background: rgba(50,215,75,.16); color: #32d74b; }
  .action-badge.sell { background: rgba(255,105,97,.16); color: #ff6961; }
  .inline-tooltip { border-color: rgba(255,255,255,.12); background: rgba(28,28,30,.97); color: #f5f5f7; }
  .chart-zoom { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
  .chart-zoom-label { color: #98989d; }
  .chart-zoom-label output { color: #409cff; }
  .chart-navigator { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
  .chart-zoom-selection { border-color: #0a84ff; background: rgba(10,132,255,.16); }
  .chart-zoom-track input::-webkit-slider-thumb { border-color: #1c1c1e; background: #0a84ff; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
  .chart-zoom-track input::-moz-range-thumb { border-color: #1c1c1e; background: #0a84ff; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
  .strategy-cell-ma200 { background: rgba(10,132,255,.14); }
  .strategy-cell-candidate-a { background: rgba(100,210,255,.12); }
  .strategy-cell-qqq-buy-hold { background: rgba(255,159,10,.14); }
  thead .strategy-cell-ma200 { background: #183554; }
  thead .strategy-cell-candidate-a { background: #2a404b; }
  thead .strategy-cell-qqq-buy-hold { background: #523b19; }
  .positive { color: #32d74b; }
  .negative { color: #ff6961; }
  ::selection { background: rgba(10,132,255,.4); color: #f5f5f7; }
  .status.loading::after { border-color: rgba(10,132,255,.3); border-top-color: #0a84ff; }
}
@media (prefers-color-scheme: dark) and (prefers-contrast: more) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { border-color: #f5f5f7; } }
@media (prefers-color-scheme: dark) and (prefers-reduced-transparency: reduce) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { background: #1c1c1e; backdrop-filter: none; }.chart-modal { background: #141416; }.chart-tooltip, .inline-tooltip { background: #1c1c1e; } }
@media (prefers-color-scheme: dark) and (max-width: 820px) { .card, .material-card, .calculator-form, .chart-card, .indicator-card { background: #1c1c1e; backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-color-scheme: dark) { #strategy-table tbody th[scope="row"], #strategy-table thead th:first-child { background: #1c1c1e; }.has-note::after { border-color: rgba(255,255,255,.14); background: #1c1c1e; color: #f5f5f7; box-shadow: 0 8px 22px rgba(0,0,0,.5); }.has-note:focus-visible { box-shadow: 0 0 0 3px rgba(10,132,255,.45); } }

/* The public calculator now compares exactly three tracks. Keep the desktop
   summary at three equal columns instead of retaining the former five-track grid. */
@media (min-width: 1181px) { .strategy-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.strategy-card-ma200_candidate_d { background: linear-gradient(140deg, #e9f8ef, #fbfefc); }
.strategy-card-candidate_a_candidate_d { background: linear-gradient(140deg, #fbeefa, #fffafd); }
.strategy-card-focus { border-color: rgba(22,135,84,.42); box-shadow: 0 9px 25px rgba(22,135,84,.11), inset 0 1px rgba(255,255,255,.9); }
.strategy-card-candidate_a_candidate_d.strategy-card-focus { border-color: rgba(179,77,143,.38); box-shadow: 0 9px 25px rgba(179,77,143,.1), inset 0 1px rgba(255,255,255,.9); }
.strategy-role-badge { margin-left: auto; padding: 2px 7px; border-radius: 999px; font-size: .66rem; font-weight: 700; white-space: nowrap; }
.strategy-role-badge.focus { background: rgba(22,135,84,.12); color: #116d45; }
.strategy-card-candidate_a_candidate_d .strategy-role-badge.focus { background: rgba(179,77,143,.11); color: #923d74; }
.strategy-role-badge.live { background: rgba(0,113,227,.11); color: #0064c4; }
.strategy-role-badge.comparison { background: rgba(0,0,0,.055); color: #66666b; }
.strategy-role-badge.benchmark { background: rgba(229,138,0,.12); color: #9b5c00; }
.strategy-cell-ma200-candidate-d { background: #eef9f2; }
.strategy-cell-candidate-a-candidate-d { background: #fcf0f8; }
thead .strategy-cell-ma200-candidate-d { background: #ddf2e5; }
thead .strategy-cell-candidate-a-candidate-d { background: #f5dff0; }
.strategy-card { position: relative; background: rgba(255,255,255,.92) !important; border-color: rgba(0,0,0,.08); box-shadow: 0 6px 20px rgba(10,37,64,.05); }
.strategy-card::before { content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 4px; border-radius: 0 0 4px 4px; background: #e58a00; }
.strategy-card-ma200_candidate_d::before { background: var(--color-action); }.strategy-card-candidate_a_candidate_d::before { background: #9b51e0; }
.strategy-card-subtitle { display: block; min-height: 1.25em; margin: -5px 0 12px; color: var(--color-muted); font-size: .72rem; }
.strategy-role-badge.formal { background: rgba(0,113,227,.11); color: #0064c4; }.strategy-role-badge.shadow { background: rgba(155,81,224,.11); color: #7540ad; }
.strategy-card .secondary-metric { opacity: .72; }.strategy-switch-redline { color: #7c3d00 !important; }
@media (prefers-color-scheme: dark) {
  .strategy-card-ma200_candidate_d { background: linear-gradient(140deg, rgba(48,209,88,.14), rgba(28,28,30,.5)); }
  .strategy-card-candidate_a_candidate_d { background: linear-gradient(140deg, rgba(255,122,200,.14), rgba(28,28,30,.5)); }
  .strategy-card-focus { border-color: rgba(48,209,88,.4); box-shadow: 0 9px 25px rgba(48,209,88,.12), inset 0 1px rgba(255,255,255,.05); }
  .strategy-card-candidate_a_candidate_d.strategy-card-focus { border-color: rgba(255,122,200,.4); box-shadow: 0 9px 25px rgba(255,122,200,.11), inset 0 1px rgba(255,255,255,.05); }
  .strategy-role-badge.focus { background: rgba(48,209,88,.16); color: #5de779; }
  .strategy-card-candidate_a_candidate_d .strategy-role-badge.focus { background: rgba(255,122,200,.15); color: #ff8fd0; }
  .strategy-role-badge.live { background: rgba(10,132,255,.16); color: #409cff; }
  .strategy-role-badge.comparison { background: rgba(255,255,255,.08); color: #aeaeb2; }
  .strategy-role-badge.benchmark { background: rgba(255,159,10,.16); color: #ffb340; }
  .strategy-card { background: rgba(28,28,30,.82) !important; }.strategy-card-ma200_candidate_d::before { background: #409cff; }.strategy-card-candidate_a_candidate_d::before { background: #bf8cff; }.strategy-card-subtitle { color: #98989d; }.strategy-role-badge.formal { background: rgba(10,132,255,.16); color: #409cff; }.strategy-role-badge.shadow { background: rgba(191,140,255,.16); color: #bf8cff; }.strategy-switch-redline { color: #ffd08a !important; }
  .strategy-cell-ma200-candidate-d { background: rgba(48,209,88,.11); }
  .strategy-cell-candidate-a-candidate-d { background: rgba(255,122,200,.11); }
  thead .strategy-cell-ma200-candidate-d { background: #203e2a; }
  thead .strategy-cell-candidate-a-candidate-d { background: #45283b; }
}
@media print {
  :root, body { background: #fff !important; color: #000; }
  body { background-image: none !important; }
  .page-shell { width: 100%; margin: 0; }
  .site-nav, .text-button, .date-presets, .calculator-form, .skip-link, .chart-modal { display: none !important; }
  .card, .material-card, .calculator-form, .chart-card, .indicator-card, .strategy-card { border: 1px solid #999 !important; background: #fff !important; box-shadow: none !important; backdrop-filter: none !important; }
  .table-scroll { max-height: none !important; overflow: visible !important; }
  .table-scroll::after { display: none !important; }
  thead th, .row-label, #strategy-table tbody th[scope="row"] { position: static !important; background: #f0f0f0 !important; }
  .chart-layout { grid-template-columns: 1fr; }
  .chart-card, .indicator-card, .strategy-card, tr { break-inside: avoid; }
  .positive { color: #0a6b3d !important; }.negative { color: #a32b33 !important; }
  a[href]::after { content: ""; }
}
