:root {
  color-scheme: light;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
  --page: #f7f9fc;
  --panel: #fff;
  --ink: #162333;
  --muted: #526476;
  --primary: #195f9e;
  --outline: #dce4ec;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1232px; margin: auto; padding: 0 30px 40px; }
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 20px;
  row-gap: 8px;
  min-height: 65px;
  padding: 12px 0;
  border-bottom: 1px solid var(--outline);
}
nav a { color: var(--primary); text-decoration: none; }
nav a:hover { text-decoration: underline; }
.site-link { font-weight: 650; }
.nav-links { display: flex; gap: 18px; font-size: .88rem; }
header, .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
header { align-items: end; margin-top: 35px; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.12rem; }
p { margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
select, input {
  border: 1px solid var(--outline);
  background: var(--panel);
  border-radius: 7px;
  font: inherit;
  color: #192938;
  margin-left: 4px;
  padding: 7px 8px;
}
input { width: 10rem; }
.segmented {
  display: inline-flex;
  gap: 1px;
  border: 1px solid var(--outline);
  border-radius: 9px;
  padding: 3px;
  background: #eaf0f6;
}
.segmented button {
  border: 0;
  border-radius: 6px;
  padding: 7px 13px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
}
.segmented button[aria-pressed="true"] {
  background: #e8f0fe;
  color: #1a56c4;
  box-shadow: inset 0 0 0 1px #b9cdf4;
  font-weight: 650;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 10px;
}
.card { padding: 17px 16px; }
.card:first-child { border-top: 2px solid var(--primary); padding-top: 16px; }
.card strong { display: block; font-size: 1.45rem; margin-top: 5px; overflow-wrap: anywhere; }
.card.limited strong { color: #a83327; }
.card span { color: var(--muted); font-size: .82rem; }
.panel { margin-top: 18px; padding: 20px 22px 12px; }
#chart { display: block; width: 100%; height: 230px; margin-top: 12px; }
#chart[hidden] { display: none; }
#empty-chart { padding: 34px 0; text-align: center; }
#chart text { fill: #526574; font: 11px system-ui, sans-serif; }
#chart line { stroke: #dce6ee; }
#chart circle { fill: #286da9; }
#chart .trend { stroke: #286da9; stroke-width: 2; }
#chart .trend[data-partial] { stroke: #89aeca; stroke-dasharray: 3 3; }
#chart circle[data-partial] { fill: #89aeca; }
#chart rect { fill: #aa3c32; }
#chart rect[data-partial] { fill: #cc948f; }
#chart :is(rect, circle):hover { fill: #153f70; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; margin-top: 10px; }
th, td {
  border-bottom: 1px solid #e8eef2;
  padding: 8px 10px;
  white-space: nowrap;
  text-align: right;
}
th:first-child, td:first-child { text-align: left; }
thead { background: #f1f5f9; }
tbody th { font-weight: 600; }
tbody tr:hover { background: #f4f8fc; }
th button {
  border: 0;
  background: none;
  color: #3c5365;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 5px 0;
}
th[aria-sort] button { color: #12677c; }
.site-mobile-sort { display: none; }
.site-table tfoot { background: #f1f5f9; font-weight: 650; }
.empty-table { padding: 20px 0; text-align: center; }
footer { color: #526574; font-size: .82rem; line-height: 1.6; margin: 15px 2px; }
@media (max-width: 650px) {
  main { padding: 0 14px 24px; }
  header, .section-header { flex-wrap: wrap; }
  header { margin-top: 24px; }
  .panel { padding: 14px 12px 10px; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .site-mobile-sort { display: block; }
  .site-table table, .site-table tbody, .site-table tfoot { display: block; }
  .site-table thead { display: none; }
  .site-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 9px 10px;
    gap: 6px 8px;
    border: 1px solid var(--outline);
    border-radius: 7px;
    margin-bottom: 7px;
  }
  .site-table tfoot { background: transparent; }
  .site-table tfoot tr { background: #f1f5f9; }
  .site-table th, .site-table td {
    text-align: left;
    border: 0;
    padding: 0;
    white-space: normal;
  }
  .site-table th { grid-column: span 2; }
  .site-table td:nth-child(2) { text-align: right; }
  .site-table td:nth-child(n+3)::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: .72rem;
    margin-bottom: 2px;
  }
}
