:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --text: #0b0b0b; --text-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11,11,11,0.10); --accent: #2a78d6;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
  --pos: #2a78d6; --neg: #e34948; --neutral: #c3c2b7; --good-text: #006300;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --text: #ffffff; --text-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10); --accent: #3987e5;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --pos: #3987e5; --neg: #e66767; --neutral: #383835; --good-text: #0ca30c;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
header { display: flex; align-items: baseline; gap: 16px; padding: 18px 28px 0; }
header h1 { font-size: 18px; margin: 0; font-weight: 600; }
header .sub { color: var(--muted); font-size: 12px; }
nav { display: flex; gap: 4px; padding: 12px 28px 0; border-bottom: 1px solid var(--grid); }
nav button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--text-2); font: inherit; cursor: pointer; }
nav button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
main { padding: 16px 28px 48px; max-width: 1280px; margin: 0 auto; }
.view { display: none; } .view.active { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 10px 0 16px; }
.filters label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; }
select, input[type=number], input[type=text], input[type=search] { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--axis); border-radius: 6px; padding: 5px 8px; }
button.primary { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
button.ghost { font: inherit; background: none; border: 1px solid var(--axis); color: var(--text-2); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.card .desc { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart { width: 100%; height: 360px; }
.chart.small { height: 230px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.grid .card { margin: 0; }
table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; margin-top: 8px; }
table.data th, table.data td { padding: 5px 8px; border-bottom: 1px solid var(--grid); text-align: right; font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 500; }
.tablewrap { overflow-x: auto; max-height: 360px; overflow-y: auto; }
.hidden { display: none !important; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tile .label { color: var(--muted); font-size: 12px; }
.tile .value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.tile .note { color: var(--text-2); font-size: 12px; }
.hero { font-size: 48px; font-weight: 600; line-height: 1.1; }
.hero-wrap { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 4px; }
.hero-wrap .unit { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.form-grid label > * { font-size: 13px; }
.search-wrap { position: relative; }
.search-list { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--axis); border-radius: 6px; max-height: 240px; overflow-y: auto; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.search-list div { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.search-list div:hover { background: var(--grid); }
.search-list small { color: var(--muted); margin-left: 6px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--grid); color: var(--text-2); font-size: 12px; margin-right: 6px; }
.note { color: var(--muted); font-size: 12px; }
.error { color: var(--neg); font-size: 13px; }
.pos { color: var(--good-text); } .neg { color: var(--neg); }
.method p { margin: 6px 0; }
.method code { background: var(--grid); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.loading { opacity: 0.5; }
