:root {
  color-scheme: light dark;
  --bg: light-dark(#f5f5f1, #171d1e);
  --surface: light-dark(#fff, #232b2c);
  --ink: light-dark(#1f2d30, #f2f3ed);
  --muted: light-dark(#617174, #abb8b7);
  --line: light-dark(#dfe6e2, #374445);
  --soft: light-dark(#edf3ef, #2a3938);
  --accent: light-dark(#276b64, #75b5a8);
  --accent-soft: light-dark(#e1efea, #24413e);
  --warning: light-dark(#9a5d25, #e0ae7d);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); }
body { margin: 0; min-width: 320px; }
button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: "Songti SC", "SimSun", serif; font-weight: 500; }
.site-header, .primary-nav, .footer { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .nav-inner, .main, .footer { width: min(100%, 1160px); margin: 0 auto; }
.header-inner { min-height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 7px; background: var(--accent); color: var(--surface); font: 24px "Songti SC", serif; }
.brand strong { display: block; font-size: 18px; font-weight: 500; letter-spacing: .07em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.source-label { color: var(--muted); font-size: 12px; }
.nav-inner { display: flex; gap: 29px; padding: 0 30px; }
.nav-inner button { border: 0; border-bottom: 2px solid transparent; padding: 16px 1px 13px; background: transparent; color: var(--muted); font-size: 13px; }
.nav-inner button[aria-current="page"] { border-color: var(--accent); color: var(--accent); font-weight: 500; }
.main { padding: 32px 30px 50px; min-height: 600px; }
.demo-banner, .error-banner, .notice { padding: 12px 15px; border-radius: 7px; font-size: 12px; line-height: 1.6; margin-bottom: 17px; }
.demo-banner { color: var(--warning); background: var(--soft); border-left: 3px solid var(--warning); }
.error-banner { color: var(--warning); background: var(--surface); border-left: 3px solid var(--warning); }
.notice { color: var(--ink); background: var(--accent-soft); border-left: 3px solid var(--accent); }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 23px; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .13em; font-weight: 500; }
.page-head h1 { font-size: clamp(27px, 3vw, 35px); line-height: 1.25; margin: 8px 0; }
.page-head p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.freshness { color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; white-space: pre-line; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 13px 17px; margin-bottom: 18px; }
.filter-bar label { color: var(--muted); font-size: 12px; }
.filter-bar select { min-width: 175px; max-width: 100%; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.filter-bar > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric, .panel, .book-head { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.metric { padding: 17px 19px; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; font: 500 31px "Songti SC", "SimSun", serif; margin: 8px 0 3px; }
.metric small { font-size: 11px; }
.analysis-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 13px; margin-bottom: 29px; }
.panel { padding: 20px; min-width: 0; }
.panel h2, .section-heading h2 { font-size: 21px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.section-heading span, .caption { color: var(--muted); font-size: 11px; line-height: 1.6; }
.bar-chart { min-height: 215px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 7px; border-bottom: 1px solid var(--line); padding: 20px 7px 0; }
.bar-day { min-width: 0; height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; text-align: center; }
.bar-value, .bar-label { color: var(--muted); font-size: 11px; white-space: nowrap; }
.bar { width: min(100%, 30px); min-height: 3px; background: var(--accent); border-radius: 4px 4px 0 0; }
.bar-label { margin-bottom: 8px; }
.caption { margin-top: 11px; }
.methodology p { border-top: 1px solid var(--line); padding: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.methodology h2 { margin-bottom: 15px; }
.methodology b { display: block; color: var(--ink); font-weight: 500; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 13px 15px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--soft); color: var(--muted); font-weight: 400; white-space: nowrap; }
.title-cell { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }
.sub-cell { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.rank-number { font: 500 18px "Songti SC", serif; }
.rank-up { color: var(--accent); }
.rank-down { color: var(--warning); }
.text-action { border: 0; background: transparent; color: var(--accent); padding: 7px 0; white-space: nowrap; font-size: 12px; }
.empty { padding: 22px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.7; }
.book-head { display: flex; align-items: flex-start; gap: 18px; padding: 19px; margin-bottom: 18px; }
.book-symbol { width: 80px; height: 105px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--surface); border-radius: 5px; font: 34px "Songti SC", serif; }
.book-head h2 { font-size: 30px; margin: 6px 0 8px; }
.book-head p { color: var(--muted); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.tags span { background: var(--soft); color: var(--muted); padding: 5px 8px; border-radius: 4px; font-size: 11px; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-bottom: 13px; }
.measure-list { margin: 14px 0 0; }
.measure-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.measure-list dt { color: var(--muted); }
.measure-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.change-list { margin-top: 15px; }
.change-event { border-left: 2px solid var(--line); padding: 0 0 18px 14px; margin-left: 3px; position: relative; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.change-event::before { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); left: -4.5px; top: 3px; }
.change-event time { display: block; color: var(--muted); font-size: 11px; }
.book-history { margin-bottom: 13px; }
.book-history .table-wrap { margin-top: 13px; }
.footer { max-width: none; padding: 18px max(30px, calc((100vw - 1100px) / 2)); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); font-size: 11px; }
@media (max-width: 700px) {
  .header-inner, .nav-inner { padding-left: 16px; padding-right: 16px; }
  .header-inner { min-height: 62px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .source-label { font-size: 11px; }
  .nav-inner { justify-content: space-between; gap: 8px; }
  .nav-inner button { font-size: 12px; }
  .main { padding: 24px 16px 32px; }
  .page-head { display: block; }
  .page-head h1 { font-size: 26px; }
  .freshness { display: block; text-align: left; margin-top: 11px; }
  .filter-bar > span { width: 100%; margin-left: 0; }
  .metric-grid { gap: 7px; }
  .metric { padding: 11px 8px; }
  .metric strong { font-size: 23px; }
  .metric span { font-size: 11px; }
  .metric small { font-size: 10px; line-height: 1.3; }
  .analysis-grid, .book-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  th, td { padding: 11px 8px; }
  #sector-panel th:nth-child(3), #sector-panel td:nth-child(3) { display: none; }
  #book-panel th:nth-child(4), #book-panel td:nth-child(4) { display: none; }
  .footer { padding: 16px; }
}
