/* Research cockpit · Emil design-engineering pass (2026-09-24).
   Neutral-blue revision: general UI backgrounds and controls do not use green.
   Red-up/green-down data, historical cold-zone markers and heatmap scales stay unchanged. */
:root {
  --bg: #f6f7f9;
  --card: #fff;
  --card2: #f1f3f6;
  --line: #dce3ea;
  --txt: #23343c;
  --sub: #596b73;
  --blue: #274e75;
  --accent: #274e75;
  --accent-tint: #eaf0f7;
  --accent-line: #c7d5e5;
  --ink: #152f40;
  --gold-ink: #73561f;
  --shadow-card: 0 2px 4px rgba(15,43,53,.035), 0 16px 35px -26px rgba(15,43,53,.22);
  --ui-ease: cubic-bezier(.23,1,.32,1);
}
body {
  background: radial-gradient(ellipse 70% 280px at 90% 0, rgba(71,105,159,.055), transparent), var(--bg);
}
body::before { background: linear-gradient(90deg, #15384a 0 58%, #4d6b91 58% 87%, #d08b69 87%); }
::selection { background: #dbe7f5; color: var(--ink); }
.editorial-layout .wrap { max-width: 1360px; padding: 18px 24px 44px; }
/* Dark title panel anchors the visual hierarchy; the mark remains the existing logo. */
.aloha-brand {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 110px; margin: 2px 0 14px; padding: 18px 28px;
  border: 1px solid #244459; border-radius: 18px;
  background: linear-gradient(112deg, #102b3c 5%, #19384e 65%, #243e60 100%);
  box-shadow: 0 20px 35px -28px rgba(9,40,53,.75);
}
.aloha-brand::after {
  content: ""; position: absolute; z-index: -1; right: -60px; top: -110px;
  width: 350px; height: 290px; border-radius: 50%;
  background: radial-gradient(circle, rgba(119,153,197,.13), transparent 68%);
  pointer-events: none;
}
.aloha-brand-mark { width: 66px; height: 66px; padding: 6px; border-radius: 16px; background: #f5f7fa; }
.aloha-brand h1 { color: #f9fcfb; font-size: clamp(26px, 2.7vw, 36px); letter-spacing: .015em; }
.aloha-brand .stamp { color: #d1dae5; letter-spacing: .025em; }
/* Header account shortcuts: visible role is server-confirmed, never a CSS-only gate. */
.aloha-brand-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.aloha-brand-actions button {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1px solid rgba(223,235,248,.48); border-radius: 11px;
  background: rgba(255,255,255,.08); color: #edf3fa;
}
.aloha-brand-actions button[hidden] { display: none !important; }
.aloha-brand-actions button:hover { background: rgba(255,255,255,.17); }
.aloha-brand-actions button.on { background: #fff; border-color: #fff; color: var(--ink); }
.aloha-brand-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.aloha-brand-actions svg { pointer-events: none; }
/* One desktop navigation row: large area switch and smaller page choices. */
body.dw-mode nav#mainnav {
  display: grid !important; grid-template-columns: auto minmax(0,1fr);
  gap: 10px; align-items: center; top: 8px;
  margin: 0 0 16px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px -25px rgba(18,48,58,.4);
}
.dw-mode #mainnav .dw-areas {
  width: auto; align-self: stretch; align-items: center;
  gap: 2px; margin: 0; padding: 0 10px 0 0;
  border-bottom: 0; border-right: 1px solid var(--line);
}
.dw-mode #mainnav .dw-areas button {
  min-width: 92px !important; min-height: 40px;
  padding: 7px 10px !important; font-size: 13px !important;
  border-radius: 9px; color: #435967;
}
.dw-mode #mainnav .dw-areas button.on {
  background: #e4ebf5; color: #244969;
}
.dw-mode #mainnav .nav-group[data-group=market],
.dw-mode #mainnav .nav-group[data-group=tools] { min-width: 0; width: 100%; }
.dw-mode #mainnav .nav-btns {
  border: 0; background: transparent; padding: 0; gap: 4px;
}
.dw-mode #mainnav .nav-btns button {
  min-height: 40px; border-radius: 9px; color: #425666; font-weight: 600;
}
.dw-mode #mainnav .nav-btns button.on,
.dw-mode #mainnav .nav-btns button.on:hover { background: var(--ink); color: #fff; }
.dw-mode #mainnav .nav-btns button:not(.on):hover { background: #edf1f7; color: var(--ink); }
.dw-mode main [id] { scroll-margin-top: 92px; }
/* Clear hierarchy: page heading, secondary tabs, then time-of-day filters. */
.editorial-layout .dw-head { margin: 10px 0 12px; align-items: center; }
.editorial-layout .dw-head h2 { font-size: 27px; letter-spacing: -.025em; line-height: 1.25; }
.dw-head h2 { border-left-color: #c77d67; }
.dw-subtabs {
  gap: 7px; margin-bottom: 15px; padding: 4px;
  border: 1px solid var(--line); background: #e8edf3; border-radius: 11px;
}
.dw-subtabs [role=tab] {
  min-height: 42px; padding: 9px 12px; border: 0;
  background: transparent; color: #425a61; box-shadow: none;
}
.dw-subtabs [role=tab][aria-selected=true] { background: var(--ink); color: #fff; box-shadow: none; }
.editorial-layout .dw-slot-nav { margin: 12px 0 14px; gap: 8px; }
.editorial-layout .dw-slot-nav .btn { min-height: 48px; border-color: var(--line); background: #fff; }
.dw-today-nav .btn.dw-now, .dw-slot-nav .btn.dw-now {
  color: #244b73; background: #edf3fa; border-color: #9eb8d4;
  box-shadow: inset 0 0 0 1px rgba(36,75,115,.05);
}
.editorial-layout .dw-slot { margin: 14px 0 22px; border-radius: 14px; }
.editorial-layout .dw-slot > summary { padding: 13px 18px; }
.dw-section-heading, .dw-section > summary {
  background: linear-gradient(100deg, #f6f8fb, #fff 78%);
}
.dw-section .dw-section-number { background: #e8eef5; color: #214363; }
.card, .dw-card, .editorial-layout .card, .editorial-layout .dw-card {
  border-radius: 13px; box-shadow: var(--shadow-card);
}
.dw-morning-temp { border-color: #ced9e6; background: linear-gradient(105deg, #f7f9fc, #fff); }
.dw-lead-card { background: linear-gradient(130deg, #fff, #f4f7fb); }
.ai-head { background: linear-gradient(120deg, #fff 35%, #eef3f9); }
.editorial-layout .dw-ai-news > li { border-top-color: #c6d4e4; }
.editorial-layout .ai-insight { border-left-color: #9db5d2; background: #f5f7fa; }
th { background: #eef2f7; color: var(--ink); }
.btn { border-color: #cbd6e4; border-radius: 9px; }
/* Older theme's hard-coded green highlights also need neutral treatment. */
.dw-conclusion { background: var(--accent-tint); }
tr.ms-current td { background: #eaf0f7 !important; }
#page-ai-news { --ai-accent: #274e75; --ai-tint: #eaf0f7; }
.ai-table th { color: #274e75; }
.ai-download:hover { background: #193c60; }
.dw-slot-now { box-shadow: 0 0 0 2px rgba(39,78,117,.12); }
/* Frequent navigation and keyboard activation are immediate; only pointer
   presses on ordinary action buttons get a small, interruptible response. */
.btn { transition: transform 140ms var(--ui-ease), background-color 160ms ease, border-color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .btn:active:not(:focus-visible) { transform: scale(.975); }
}
@media (hover: hover) and (pointer: fine) {
  .dw-mode #mainnav .dw-areas button:not(.on):hover { background: #f0f3f7; }
  .editorial-layout .dw-slot-nav .btn:not(.dw-now):hover { background: #eef3f9; border-color: #9eb8d4; }
}
@media (max-width: 700px) {
  .editorial-layout .wrap { padding: 10px 12px 32px; }
  .aloha-brand { min-height: 0; margin: 0 0 10px; padding: 11px 13px; gap: 12px; border-radius: 14px; }
  .aloha-brand-mark { width: 46px; height: 46px; padding: 4px; border-radius: 10px; }
  .aloha-brand h1 { font-size: clamp(18px, 5vw, 22px); line-height: 1.24; }
  .aloha-brand .stamp { font-size: 11px; color: #d3deeb; margin-top: 3px; }
  .aloha-brand h1 { overflow: hidden; text-overflow: ellipsis; }
  .aloha-brand-actions { gap: 4px; }
  .aloha-brand-actions button { width: 38px; height: 40px; border-radius: 9px; }
  body.dw-mode nav#mainnav { grid-template-columns: minmax(0,1fr); gap: 2px; top: 0; margin-bottom: 10px; padding: 5px; border-radius: 11px; }
  .dw-mode #mainnav .dw-areas { width: 100%; padding: 0 0 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dw-mode #mainnav .dw-areas button { min-width: 0 !important; flex: 1 1 0 !important; min-height: 36px; padding: 5px !important; }
  .dw-mode #mainnav .nav-btns button { min-height: 38px; }
  .dw-mode main [id] { scroll-margin-top: 116px; }
  .editorial-layout .dw-head { margin: 8px 0 12px; }
  .editorial-layout .dw-head h2 { font-size: 23px; }
  .dw-subtabs { margin-bottom: 11px; }
  .editorial-layout .dw-slot-nav { margin: 8px 0 12px; gap: 6px; }
  .editorial-layout .dw-slot-nav .btn { min-height: 46px; padding: 6px; }
  .editorial-layout .dw-slot > summary { padding: 11px 12px; }
  .editorial-layout .dw-slot > summary .dw-section-copy { font-size: 17px; }
  .editorial-layout .dw-slot > summary .dw-slot-window,
  .dw-morning-temp-trend p, .dw-asof { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; transform: none; }
}
@media (prefers-contrast: more) {
  body.dw-mode nav#mainnav, .card, .dw-card { border-color: #45636a; }
  .dw-subtabs, .editorial-layout .dw-slot-nav .btn { border-color: #45636a; }
}
@media print {
  .aloha-brand-actions { display: none; }
  .aloha-brand { color: #000; background: #fff; box-shadow: none; }
  .aloha-brand h1, .aloha-brand .stamp { color: #000; }
  body.dw-mode nav#mainnav { box-shadow: none; }
}

/* 方法与回测：仅本页；清晰层级、原生控件、收益与风险等重。 */
#page-backtest{--method-ink:#1d2937;--method-muted:#536172;--method-line:#dce2e9;--method-surface:#f5f7fa;--method-accent:#244e78;color:var(--method-ink);font-size:14px;line-height:1.75}
#page-backtest .card{padding:28px;margin-bottom:24px;border:1px solid var(--method-line);border-radius:16px;background:#fff;box-shadow:none;transition:none}
#page-backtest h2{margin:0 0 18px;color:var(--method-ink);font-size:clamp(20px,1.7vw,24px);font-weight:650;line-height:1.45;letter-spacing:-.025em}
#page-backtest h3{margin:28px 0 12px;color:var(--method-ink);font-size:18px;line-height:1.5}
#page-backtest .st-lead{max-width:88ch;margin:0 0 16px;font-size:14px;line-height:1.85}
#page-backtest :is(.section-note,.stamp,.sxo-note,.sxo-small,.sxo-who){color:var(--method-muted);font-size:13px;line-height:1.75}
#page-backtest .section-note{margin:14px 0 20px}
#page-backtest .sxo-eyebrow{color:var(--method-muted);font-size:12px;letter-spacing:.06em;margin:0 0 12px}
#page-backtest .sxo-audit-summary h2{font-size:clamp(26px,2.4vw,34px)}
#page-backtest .sxo-audit-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;max-width:780px;margin:24px 0;color:var(--method-muted);font-size:12px}
#page-backtest .sxo-audit-facts b{display:block;color:var(--method-ink);font-size:23px;font-variant-numeric:tabular-nums;font-weight:600;margin-bottom:4px}
#page-backtest .sxo-why{margin:20px 0 12px;padding:16px 18px;border-left:3px solid var(--method-accent);border-radius:0 10px 10px 0;background:var(--method-surface);font-size:14px;line-height:1.8}
#page-backtest .scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#9aa9b8 #f1f4f7}
#page-backtest .st-table :is(th,td){padding:12px;font-size:13px;line-height:1.65;border-bottom-color:var(--method-line)}
#page-backtest .st-table th{background:#f0f3f7;color:#34465a;font-weight:600}
#page-backtest .st-table :is(th,td).num{text-align:right;font-variant-numeric:tabular-nums lining-nums}
#page-backtest .st-table :is(th,td):not(.num){text-align:left}
#page-backtest .st-table .st-hl td{background:#edf2f8}
#page-backtest .sxo-sep td{padding-top:18px;padding-bottom:8px;color:var(--method-muted);font-size:12px;font-weight:600;background:#fafbfc}
#page-backtest .sxo-table{min-width:600px}
#page-backtest .sxo-role{min-width:0}
#page-backtest .sxo-role .sxo-table{min-width:380px}
#page-backtest .sxo-table .sxo-small{min-width:260px;max-width:440px;margin-top:8px}
#page-backtest .sxo-plans{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0 0;align-items:start}
#page-backtest :is(.sxo-plan,.sxo-profile){padding:20px;border-radius:12px;background:#fff}
#page-backtest .sxo-plan>header{display:block;margin:0 0 16px}
#page-backtest :is(.sxo-plan,.sxo-profile,.sxo-role) h3{margin:0 0 14px;font-size:17px;line-height:1.5}
#page-backtest .sxo-kpi{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0;padding:12px 0;border-top:1px solid var(--method-line);border-bottom:1px solid var(--method-line);color:var(--method-muted);font-size:12px}
#page-backtest .sxo-kpi b{display:block;margin-top:4px;font-size:19px;font-weight:650;line-height:1.35;letter-spacing:-.02em}
#page-backtest .sxo-steps{table-layout:fixed}
#page-backtest .sxo-steps :is(th,td){padding:9px 7px;font-size:13px;white-space:normal;overflow-wrap:anywhere;vertical-align:top}
#page-backtest .sxo-steps :is(th,td):first-child{width:45%;min-width:0}
#page-backtest .sxo-steps :is(th,td):nth-child(2){width:20%}
#page-backtest .sxo-steps :is(th,td):nth-child(3){width:35%}
#page-backtest .sxo-today{margin-top:16px;padding:14px;border-radius:10px;background:var(--method-surface);font-size:13px;line-height:1.8}
#page-backtest .sxo-note{margin-top:14px}
#page-backtest .sxo-roles{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:22px 0}
#page-backtest .sxo-profiles{gap:20px}
#page-backtest .sxo-profile dl div{display:block;line-height:1.8}
#page-backtest .sxo-profile dt{margin-bottom:4px}
#page-backtest .sxo-slider{max-width:none;margin:24px 0 18px;padding:16px 20px;border:1px solid var(--method-line);border-radius:12px;background:#f8fafc}
#page-backtest .sxo-presets{gap:4px;margin-bottom:16px}
#page-backtest .sxo-presets .btn{padding:9px 16px;border-color:transparent;background:transparent;color:var(--method-muted);font-size:13px}
#page-backtest .sxo-presets .btn.on{border-color:var(--method-accent);background:var(--method-accent);color:#fff;font-weight:600}
#page-backtest .sxo-slider-head{gap:12px;font-size:13px;font-variant-numeric:tabular-nums}
#page-backtest .sxo-slider-head span{color:var(--method-muted);font-size:13px}
#page-backtest .sxo-track{height:48px}
#page-backtest .sxo-track:before,#page-backtest .sxo-fill{top:22px}
#page-backtest .sxo-fill{background:var(--method-accent)}
#page-backtest .sxo-track input{height:48px}
#page-backtest .sxo-track input::-webkit-slider-thumb{width:44px;height:44px;border:2px solid var(--method-accent);background:#fff;box-shadow:none}
#page-backtest .sxo-track input::-moz-range-thumb{box-sizing:border-box;width:44px;height:44px;border:2px solid var(--method-accent);background:#fff}
#page-backtest .sxo-track input:focus-visible::-webkit-slider-thumb{outline:3px solid #1769ba;outline-offset:3px}
#page-backtest .sxo-track input:focus-visible::-moz-range-thumb{outline:3px solid #1769ba;outline-offset:3px}
#page-backtest .sxo-ticks{height:22px;font-size:12px;color:var(--method-muted)}
#page-backtest .sxo-date-fields{display:flex;gap:16px;flex-wrap:wrap;margin-top:14px}
#page-backtest .sxo-date-fields label{display:flex;align-items:center;gap:8px;color:var(--method-muted);font-size:13px}
#page-backtest .sxo-date-fields input{min-height:44px;max-width:100%;border:1px solid #aebbc9;border-radius:8px;background:#fff;padding:8px;font:inherit;color:var(--method-ink)}
#page-backtest .sxo-chart{margin:24px 0 16px;padding:12px 0 0;overflow-x:auto;overscroll-behavior-x:contain}
#page-backtest .bt-axis{font-size:13px}
#page-backtest .bt-legend{gap:8px 20px;margin:14px 0;font-size:13px}
#page-backtest .bt-k{white-space:nowrap}
#page-backtest .lab-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0 20px;align-items:start}
#page-backtest .lab-grid fieldset{padding:16px;border-radius:12px}
#page-backtest .lab-grid legend{font-size:14px;padding:0 8px}
#page-backtest .lab-grid label{gap:12px;margin:10px 0;font-size:13px;color:var(--method-muted)}
#page-backtest .lab-grid select{min-height:44px;min-width:44px;width:58%;max-width:58%;padding:8px;border-color:#aebbc9;border-radius:8px;font-size:14px}
#page-backtest .lab-actions{gap:12px;margin:20px 0 28px}
#page-backtest .st-kpis{gap:12px;margin:22px 0}
#page-backtest .st-kpis div{padding:16px;background:var(--method-surface);border-radius:10px}
#page-backtest .st-kpis span{color:var(--method-muted);font-size:13px}
#page-backtest .st-kpis b{display:block;margin-top:6px;font-size:20px;font-weight:650}
#page-backtest .st-appendix{padding:16px 22px}
#page-backtest summary{min-height:44px;padding:10px 4px;font-size:14px;line-height:1.75;color:var(--method-accent);border-radius:6px;cursor:pointer}
#page-backtest summary::marker{color:var(--method-accent)}
#page-backtest details[open]>summary{margin-bottom:12px}
#page-backtest .st-more{border-top-style:solid}
#page-backtest .sxo-today details{overflow-x:auto}
#page-backtest .btn{min-width:44px;min-height:44px;padding:10px 16px;border:1px solid #b4c2d1;border-radius:9px;background:#f1f5fa;color:var(--method-accent);font-size:14px;box-shadow:none;transition:none}
#page-backtest .btn-ghost{background:#fff;color:var(--method-muted)}
#page-backtest :is(button,select,input,summary,a,[tabindex]):focus-visible{outline:3px solid #1769ba;outline-offset:3px}
#page-backtest .btn:active{transform:none;box-shadow:inset 0 0 0 2px #9bb2ca}
@media(hover:hover) and (pointer:fine){#page-backtest .btn:not(.on):not(:disabled):hover{background:#e9eff7;border-color:#8ba3be}#page-backtest summary:hover{background:#edf2f8}}
@media(max-width:1100px){#page-backtest .sxo-roles{grid-template-columns:1fr}#page-backtest .lab-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){#page-backtest :is(.sxo-plans,.sxo-profiles){grid-template-columns:1fr}}
@media(max-width:600px){
 #page-backtest .card{padding:18px 14px;margin-bottom:18px;border-radius:12px}
 #page-backtest h2{font-size:21px;margin-bottom:16px}#page-backtest h3{font-size:17px}
 #page-backtest .sxo-audit-facts{gap:10px}#page-backtest .sxo-audit-facts b{font-size:16px;white-space:nowrap}
 #page-backtest .sxo-plans{gap:16px}#page-backtest :is(.sxo-plan,.sxo-profile){padding:14px 10px}
 #page-backtest .sxo-kpi{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px}#page-backtest .sxo-kpi b{font-size:20px}
 #page-backtest .sxo-steps :is(th,td){padding:9px 5px}#page-backtest .sxo-today{padding:12px}
 #page-backtest .sxo-slider{padding:14px 12px}#page-backtest .sxo-presets{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}
 #page-backtest .sxo-presets .btn{padding:8px 2px;font-size:12px}#page-backtest .sxo-slider-head{flex-wrap:wrap;gap:4px}
 #page-backtest .sxo-slider-head span{order:3;flex-basis:100%;text-align:center}#page-backtest .sxo-slider-head b{font-size:12px}
 #page-backtest .sxo-why{padding:14px}#page-backtest .sxo-date-fields input{font-size:16px}
 #page-backtest .sxo-chart .bt-chart,#page-backtest [data-lab="out"]>.bt-chart{min-width:900px}
 #page-backtest [data-lab="out"]{overflow-x:auto;overscroll-behavior-x:contain}#page-backtest .bt-legend{gap:6px 14px}
 #page-backtest .lab-grid{grid-template-columns:1fr;gap:16px}#page-backtest .lab-grid select{font-size:16px}#page-backtest .lab-grid fieldset{padding:12px 14px}
 #page-backtest .st-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}#page-backtest .st-kpis div{padding:14px 12px}#page-backtest .st-appendix{padding:12px 14px}
}
@media(prefers-reduced-motion:reduce){#page-backtest,#page-backtest *,#page-backtest *::before,#page-backtest *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(prefers-contrast:more){#page-backtest{--method-line:#6b7b8e;--method-muted:#34465a}#page-backtest :is(.card,.sxo-plan,.sxo-profile,select,.btn){border-color:#6b7b8e}}


/* 顶部导航一行平铺（2026-09-28）：七个主题等宽排成一条矩形，没有第二行；管理员入口接在末尾。 */
body.dw-mode nav#mainnav { display: flex !important; align-items: stretch; gap: 6px; }
.dw-mode #mainnav .dw-areas { display: flex; flex: 1 1 auto; width: auto; min-width: 0; gap: 4px; padding: 0; border: 0; }
.dw-mode #mainnav .dw-areas button { flex: 1 1 0 !important; min-width: 0 !important; white-space: nowrap; }
.dw-mode #mainnav .nav-group-admin { flex: 0 0 auto; }
@media (max-width: 700px) {
  body.dw-mode nav#mainnav { padding: 4px; gap: 4px; }
  .dw-mode #mainnav .dw-areas { gap: 2px; padding: 0; border: 0; }
  .dw-mode #mainnav .dw-areas button { padding: 5px 2px !important; font-size: 13px !important; }
}
/* 2026-09-29 易用性：账户按钮带文字，新读者能看出这里可以登录。 */
.aloha-brand-actions button#header-account { width: auto; min-width: 42px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 700px) {
  .aloha-brand-actions button#header-account { padding: 0 9px 0 7px; gap: 3px; font-size: 12px; }
  .aloha-brand-actions button#header-account svg { width: 18px; height: 18px; }
}
