/* Visual structure follows the supplied institutional dashboard reference. */
:root {
  --navy: #062d5b; --navy-2: #0b467f; --ink: #071f3b;
  --muted: #718196; --line: #d8e2ed; --canvas: #fff;
  --soft: #f4f7fb; --radius: 10px; --shadow: 0 3px 14px #062d5b04;
  --font-cn: "KaiTi", "STKaiti", "楷体", Arial, sans-serif;
  --font-ui: Arial, "Microsoft YaHei", sans-serif;
  font-family: var(--font-cn); background: #fff; color: var(--ink);
}
html, body { background: #fff; }
body { font-family: var(--font-cn); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
.site-header { height: auto; background: #fff; box-shadow: 0 4px 18px #062d5b0b; }
.header-inner { width: min(1800px, calc(100% - 48px)); max-width: none; min-height: 76px; padding: 10px 0; gap: 28px; }
.brand { gap: 13px; }
.brand-mark { width: 43px; height: 43px; }
.brand small { display: block; margin: 0 0 3px; font-family: var(--font-ui); font-size: 10px; font-weight: 700; color: var(--navy-2); letter-spacing: 1.5px; }
.brand strong { font-family: var(--font-cn); color: var(--ink); font-size: clamp(24px, 1.8vw, 30px); line-height: 1.15; letter-spacing: 1px; font-weight: 700; }
.top-nav { height: auto; gap: 7px; align-items: center; padding-top: 12px; }
.nav-link { min-height: 36px; padding: 7px 16px; border: 1px solid transparent; border-radius: 10px; font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: #526e8a; }
.nav-link.active { color: var(--navy); background: #eaf1f8; border-color: #c9d9e8; }
.nav-link.active:after { display: none; }
.nav-link:hover { color: var(--navy-2); background: #f4f7fb; }
.nav-count { background: #dce7f2; color: #496d90; font-size: 10px; }
.header-tools { gap: 13px; font-family: var(--font-ui); }
.local-label { font-size: 11px; color: #657c92; }
.button { font-family: var(--font-ui); font-size: 13px; border-radius: 7px; font-weight: 600; }
.button-small { font-size: 12px; padding: 7px 11px; }
.button-outline { border-color: #adc0d4; }
.button-outline:hover { color: white; background: var(--navy-2); border-color: var(--navy-2); }
.text-button { font-family: var(--font-ui); font-size: 12px; }
.app-shell { width: min(1800px, calc(100% - 48px)); max-width: none; padding: 22px 0 0; }
.page-heading { margin-bottom: 14px; align-items: center; }
.eyebrow, .section-kicker { color: var(--navy-2); font-family: var(--font-ui); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 4px; }
h1 { font-family: var(--font-cn); font-size: 30px; color: var(--ink); font-weight: 700; line-height: 1.12; }
.page-subtitle { margin-top: 7px; font-size: 14px; color: #627990; }
.page-meta { max-width: 510px; display: grid; grid-template-columns: auto auto; gap: 5px 14px; align-items: center; justify-items: end; font-family: var(--font-ui); }
.page-meta strong { font-size: 12px; color: #49637e; font-weight: 500; }
.page-meta #updatedAt { font-size: 11px; color: #718196; }
.badge { font-family: var(--font-ui); font-size: 11px; padding: 4px 7px; }
.badge-demo { color: #8c612b; background: #fff6e5; border-color: #dbc49d; }
.badge-live { color: #296a5a; background: #eef8f3; border-color: #c4ded2; }
.badge-pending, .badge-muted { color: #667b90; background: #f3f6f9; border-color: #dbe5ee; }
.status-banner { min-height: 35px; margin-bottom: 19px; padding: 8px 12px; font-family: var(--font-ui); font-size: 12px; line-height: 1.6; border-radius: 7px; }
.status-banner.is-live { min-height: 0; padding: 0 0 4px; margin-top: -3px; margin-bottom: 14px; border: 0; background: white; color: #718196; }
.status-banner.is-live .status-dot { display: none; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 12px; }
.section-heading h2 { font-family: var(--font-cn); font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: 1px; }
.heading-note { color: var(--muted); font-size: 14px; white-space: nowrap; }
.weekly-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 22px; }
.panel { border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.panel-heading { padding: 13px 16px 11px; gap: 10px; }
.panel-heading h2 { color: var(--ink); font-family: var(--font-cn); font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: .5px; }
.panel-heading h3 { font-family: var(--font-cn); font-size: 19px; font-weight: 700; color: var(--ink); }
.subtle-label { color: #718196; font-family: var(--font-ui); font-size: 11px; }
.observations-panel .panel-heading, .representative-panel .panel-heading { border-bottom: 1px solid #e6edf4; margin-bottom: 12px; padding-bottom: 10px; }
.observations-panel .observation-list { padding: 0 14px 11px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-content: start; counter-reset: observation; max-height: 235px; overflow-y: auto; }
.observation { position: relative; padding: 8px 10px 9px 35px; border: 0; border-left: 2px solid #bfd0e1; background: #f7f9fc; counter-increment: observation; min-height: 0; }
.observation:last-child:nth-child(odd) { grid-column: 1 / -1; }
.observation:before { content: counter(observation); position: absolute; top: 11px; left: 9px; width: 17px; height: 18px; display: grid; place-items: center; border-radius: 3px; color: white; background: var(--navy-2); font-family: var(--font-ui); font-size: 10px; font-weight: 700; }
.observation-meta { font-family: var(--font-ui); margin-bottom: 6px; font-size: 10px; color: #7c8fa1; gap: 8px; flex-wrap: wrap; }
.observation-kind { font-size: 10px; color: #5f7e9b; letter-spacing: 0; }
.observation h3 { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); margin-bottom: 5px; }
.observation p { font-size: 14px; color: #3e566f; line-height: 1.65; }
.panel-bottom-note { background: #fff; color: #718196; font-size: 12px; padding: 8px 15px; border-top-color: #e6edf4; }
.representative-panel { display: flex; flex-direction: column; }
.stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0 14px 14px; flex: 0 0 auto; align-content: start; }
.stat-card { min-height: 112px; padding: 11px 13px; border: 1px solid #dce5ee; border-top: 3px solid #799eba; border-radius: 7px; box-shadow: none; background: #fbfcfe; }
button.stat-card { background: #fbfcfe; }
button.stat-card.active { border-color: #9db7d0; border-top-color: var(--navy-2); background: #f3f7fc; }
button.stat-card.active:before { display: none; }
.stat-label { font-size: 13px; gap: 7px; }
.stat-name { color: #183d62; font-family: var(--font-cn); font-size: 16px; font-weight: 700; }
.stat-label .mini-category { font-family: var(--font-ui); font-size: 9px; color: #7e94a8; }
.stat-value { margin-top: 5px; font-family: var(--font-ui); font-size: 25px; line-height: 1.25; color: var(--navy); font-weight: 600; }
.stat-value small { font-size: 12px; color: #718196; }
.stat-bottom { margin-top: 8px; font-family: var(--font-ui); font-size: 11px; color: #718196; gap: 9px; }
.market-data-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.indicators-panel .panel-heading, .chart-panel .panel-heading { padding: 16px 17px 13px; }
.table-toolbar { padding: 0 16px 13px; gap: 14px; align-items: center; flex-direction: row; }
.category-filters { gap: 4px; }
.category-filters button { font-family: var(--font-ui); font-size: 12px; padding: 5px 10px; color: #526f89; border-radius: 6px; }
.category-filters button.active { background: #eaf1f8; border-color: #bdcfe1; color: var(--navy); font-weight: 700; }
.search-box { height: 34px; width: 205px; border-color: #cbd9e6; border-radius: 6px; }
.search-box input { font-family: var(--font-ui); font-size: 12px; }
.search-box input::placeholder { color: #8195a7; }
.data-table { font-size: 14px; }
.data-table th { background: #eef3f8; padding: 10px 12px; color: #3b5b79; font-family: var(--font-cn); font-size: 14px; font-weight: 700; }
.data-table td { padding: 10px 12px; border-bottom-color: #e4ebf2; }
.data-table tbody tr:nth-child(even) { background: #fbfcfe; }
.data-table tbody tr:hover { background: #f1f6fb; }
.metric-name-button { font-family: var(--font-cn); font-size: 16px; color: #163b60; font-weight: 700; }
.metric-symbol { font-family: var(--font-ui); font-size: 11px; color: #71869a; margin-top: 2px; }
.data-table td.numeric { font-family: var(--font-ui); font-size: 13px; }
.category-label { font-size: 14px; color: #52708d; }
.unit-inline { font-family: var(--font-cn); font-size: 12px; color: #718196; margin-left: 5px; }
.source-label { font-size: 12px; color: #627d94; max-width: 170px; }
.date-label { font-family: var(--font-ui); font-size: 12px; color: #62778d; }
.table-star { font-size: 21px; }
.row-details { font-size: 18px; color: #6687a6; }
.table-empty { font-size: 14px!important; color: #718196; }
.segmented { border-color: #c6d5e4; background: #f3f7fb; border-radius: 7px; padding: 3px; }
.segmented button { font-family: var(--font-ui); font-size: 12px; min-width: 44px; padding: 5px 9px; border-radius: 4px; color: #67829b; }
.segmented button.active { color: white; background: var(--navy-2); box-shadow: none; }
.chart-toolbar { padding: 0 17px; gap: 10px; }
.metric-selector-label { display: inline; font-size: 14px; color: #57738d; }
.chart-toolbar select { font-family: var(--font-cn); font-size: 15px; min-width: 170px; max-width: 280px; padding: 5px 25px 5px 9px; border-color: #b7cada; border-radius: 5px; }
.chart-summary { padding: 10px 17px 0; min-height: 47px; }
.chart-summary strong { font-family: var(--font-ui); font-size: 27px; }
.chart-summary .unit, .chart-summary .change { font-size: 13px; }
.chart-summary .chart-date { font-family: var(--font-ui); font-size: 12px; color: #718196; }
.chart-area { height: 275px; padding: 2px 15px 0; }
.chart-axis { font-size: 11px; fill: #718196; }
.chart-grid { stroke: #dbe4ed; }
.chart-path { stroke: var(--navy-2); stroke-width: 2; }
.chart-footnote { min-height: 0; padding: 8px 17px; font-family: var(--font-cn); font-size: 13px; color: #6a8298; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top-color: #e4ebf2; }
.empty-chart { padding: 16px; }
.empty-chart strong { font-family: var(--font-cn); font-size: 17px; color: #557793; }
.empty-chart p { font-size: 14px; color: #718196; max-width: 430px; line-height: 1.7; }
.portfolio-intro { padding: 14px 16px; background: #f4f7fb; border-color: var(--line); border-radius: 8px; margin-bottom: 18px; }
.portfolio-intro strong { font-family: var(--font-cn); font-size: 18px; font-weight: 700; color: #163c62; }
.portfolio-intro p { font-size: 14px; color: #617a92; margin-top: 3px; max-width: none; }
.portfolio-layout { grid-template-columns: minmax(420px, 1fr) minmax(0, 1.18fr); gap: 18px; }
.heading-count { font-family: var(--font-ui); font-size: 14px; color: #7f93a6; }
.watchlist-actions { font-size: 13px; color: #68839a; padding: 0 16px 12px; }
.watchlist-table td:first-child, .watchlist-table th:first-child { padding-left: 16px; }
.weight-input { width: 68px; padding: 5px 7px; border-color: #c1d1df; font-family: var(--font-ui); font-size: 13px; }
.weight-summary { padding: 13px 16px; background: #f5f8fb; border-top-color: var(--line); }
.weight-summary span { font-size: 14px; color: #58738d; }
.weight-summary strong { font-family: var(--font-ui); font-size: 18px; }
.field-hint { padding: 0 16px 13px; background: #f5f8fb; font-size: 13px; color: #6e8498; line-height: 1.7; }
.inline-error { font-size: 13px; padding: 10px 16px; }
.portfolio-ranges { margin: 0 16px 13px; }
.portfolio-stat-grid { padding: 13px 16px; background: #fbfcfe; }
.portfolio-stat span { font-size: 14px; color: #54738f; }
.portfolio-stat strong { font-family: var(--font-ui); font-size: 24px; }
.portfolio-stat small { font-size: 12px; color: #718196; }
.portfolio-chart { height: 275px; padding-top: 10px; }
.analysis-method { padding: 12px 16px; font-size: 13px; color: #627a91; line-height: 1.7; }
.analysis-method strong { color: #2c5275; font-family: var(--font-ui); font-size: 12px; }
.analysis-method:empty { display: none; }
.analysis-note { color: #8a754c; font-size: 12px; margin-top: 3px; }
.calculation-details { margin-top: 6px; }
.calculation-details summary { cursor: pointer; color: #436b8d; font-size: 13px; }
.calculation-details p { margin-top: 8px; color: #718196; }
.research-boundary { margin-top: 18px; padding: 16px; }
.boundary-title h2 { font-size: 19px; font-weight: 700; }
.boundary-grid strong { font-size: 16px; color: #385d7e; }
.boundary-grid p { font-size: 14px; color: #6b8096; line-height: 1.7; }
.site-footer { padding: 22px 0; margin-top: 4px; border-top: 1px solid #e6edf4; font-size: 12px; color: #7b8da0; }
.site-footer strong { font-size: 14px; color: #496a88; font-weight: 700; }
.empty-state strong { font-size: 17px; color: #486d8c; }
.empty-state p { font-size: 14px; color: #718196; }
.detail-drawer { width: 440px; }
.detail-drawer h2 { font-family: var(--font-cn); font-size: 28px; font-weight: 700; }
.drawer-symbol { font-family: var(--font-ui); font-size: 12px; }
.drawer-value { font-family: var(--font-ui); }
.drawer-metadata div { font-size: 15px; }
.drawer-metadata dt { color: #6e8498; }
.drawer-description { font-size: 15px; color: #54718b; }
.toast { font-family: var(--font-ui); font-size: 13px; }
.update-notes summary { cursor: pointer; color: #426a8d; font-size: 13px; }
.update-notes summary span { float: right; color: #7e93a6; font-size: 11px; }
.update-notes[open] summary span { display: none; }
.update-notes-body { max-height: 230px; overflow-y: auto; padding-top: 10px; font-size: 13px; color: #5a738b; line-height: 1.65; }
.update-notes-body section + section { margin-top: 12px; }
.update-notes-body strong { color: #264d71; display: block; margin-bottom: 3px; }
@media (min-width: 1500px) {
  .market-data-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 18px; }
  .market-data-grid .table-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; }
  .market-data-grid .search-box { width: 100%; }
  .market-data-grid .data-table th, .market-data-grid .data-table td { padding-left: 9px; padding-right: 9px; }
  .market-data-grid .data-table th:nth-child(6), .market-data-grid .data-table td:nth-child(6) { display: none; }
  .market-data-grid .chart-area { height: 330px; }
}
@media (max-width: 1150px) {
  .header-inner { gap: 18px; }
  .brand strong { font-size: 25px; }
  .brand small { font-size: 8px; letter-spacing: 1.1px; }
  .brand-mark { width: 36px; height: 36px; }
  .nav-link { font-size: 12px; padding: 7px 11px; }
  .header-tools .local-label { display: none; }
  .weekly-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .observations-panel .observation-list { grid-template-columns: 1fr; }
  .stat-grid { align-content: stretch; }
  .stat-card { display: flex; flex-direction: column; justify-content: center; }
  .stat-bottom { flex-wrap: wrap; gap: 4px; }
  .table-toolbar { align-items: flex-start; flex-direction: column; gap: 11px; }
  .search-box { width: 100%; }
  .portfolio-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-inner, .app-shell { width: calc(100% - 28px); }
  .header-inner { min-height: 76px; padding: 10px 0 8px; flex-wrap: wrap; gap: 9px 12px; }
  .brand { flex: 1; }
  .brand strong { font-size: 24px; }
  .brand small { display: block; font-size: 7px; letter-spacing: .9px; }
  .brand-mark { width: 35px; height: 35px; }
  .header-tools { margin-left: auto; }
  .header-tools .button { font-size: 11px; padding: 7px 8px; }
  .top-nav { order: 3; width: 100%; padding: 0; margin: 0; height: auto; gap: 8px; }
  .nav-link { min-height: 32px; font-size: 12px; padding: 5px 14px; }
  .app-shell { padding-top: 19px; }
  .page-heading { align-items: flex-start; gap: 13px; }
  h1 { font-size: 27px; }
  .page-subtitle { font-size: 13px; line-height: 1.7; max-width: 290px; }
  .page-meta { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; max-width: 220px; }
  .page-meta strong { font-size: 11px; }
  .page-meta #updatedAt { font-size: 10px; max-width: none; }
  .page-meta .segmented button { font-size: 11px; padding: 4px 7px; }
  .page-meta .badge { font-size: 10px; }
  .status-banner { font-size: 11px; margin-bottom: 17px; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 25px; }
  .heading-note { font-size: 12px; white-space: normal; text-align: right; }
  .weekly-grid { grid-template-columns: 1fr; gap: 13px; margin-bottom: 18px; }
  .observations-panel .observation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .observation { min-height: 115px; }
  .observation h3 { font-size: 15px; }
  .observation p { font-size: 13px; }
  .stat-grid { gap: 9px; padding: 0 12px 12px; }
  .stat-card { min-height: 113px; }
  .stat-name { font-size: 16px; }
  .stat-value { font-size: 25px; }
  .stat-bottom { flex-wrap: nowrap; font-size: 10px; }
  .panel-heading { padding: 12px 14px 10px; }
  .panel-heading h2 { font-size: 23px; }
  .panel-heading h3 { font-size: 18px; }
  .section-kicker, .eyebrow { font-size: 9px; }
  .table-toolbar { padding: 0 13px 12px; }
  .category-filters { gap: 3px; }
  .category-filters button { padding: 5px 8px; font-size: 11px; }
  .data-table th { font-size: 13px; }
  .metric-name-button { font-size: 15px; }
  .chart-toolbar { padding: 0 14px; gap: 7px; }
  .metric-selector-label { display: none; }
  .chart-toolbar select { font-size: 14px; max-width: 200px; min-width: 130px; }
  .chart-toolbar .text-button { font-size: 11px; }
  .chart-summary { padding: 10px 14px 0; }
  .chart-summary strong { font-size: 25px; }
  .chart-summary .chart-date { font-size: 11px; }
  .chart-area { height: 235px; padding: 2px 9px 0; }
  .chart-footnote { padding: 8px 14px; font-size: 12px; }
  .segmented button { min-width: 35px; padding: 4px 6px; font-size: 11px; }
  .portfolio-intro { padding: 12px 14px; }
  .portfolio-intro strong { font-size: 17px; }
  .portfolio-intro p { font-size: 13px; }
  .portfolio-intro>.badge { display: none; }
  .watchlist-actions>span { font-size: 12px; }
  .watchlist-actions .button { font-size: 11px; }
  .weight-summary strong { font-size: 17px; }
  .weight-summary span { font-size: 13px; }
  .field-hint { font-size: 12px; }
  .portfolio-stat span { font-size: 13px; }
  .portfolio-stat strong { font-size: 23px; }
  .portfolio-stat small { font-size: 11px; }
  .portfolio-chart { height: 250px; }
  .analysis-method { font-size: 12px; }
  .boundary-grid { grid-template-columns: 1fr; gap: 12px; }
  .boundary-grid strong { font-size: 15px; }
  .boundary-grid p { font-size: 13px; }
  .site-footer { font-size: 11px; align-items: flex-start; gap: 7px; }
  .site-footer>div { gap: 12px; }
  .site-footer strong { font-size: 13px; }
  .detail-drawer { width: 100%; }
}
@media (max-width: 450px) {
  .brand strong { font-size: 21px; }
  .brand small { font-size: 6px; letter-spacing: .6px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand { gap: 8px; }
  .header-tools .button { font-size: 10px; padding: 7px; }
  .header-tools .button svg { display: none; }
  .page-heading { flex-direction: column; gap: 12px; }
  .page-meta { display: grid; grid-template-columns: auto auto; max-width: none; width: 100%; align-items: center; gap: 5px 10px; }
  .page-meta .segmented { justify-self: start; }
  .page-meta strong { justify-self: start; }
  .observations-panel .observation-list { grid-template-columns: 1fr; }
  .observation { min-height: auto; }
  .stat-bottom { flex-wrap: wrap; }
  .chart-panel .panel-heading { align-items: flex-start; gap: 8px; }
  .chart-panel .panel-heading h2 { font-size: 22px; }
  .chart-panel .segmented button { font-size: 10px; min-width: 31px; padding: 4px; }
}
