:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.10);
  --west: #2a78d6;      /* categorical slot 1 */
  --china: #eb6834;     /* categorical slot 2 */
  --other: #b9b8b1;
  --west-wash: rgba(42, 120, 214, 0.10);
  --china-wash: rgba(235, 104, 52, 0.10);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.45; }
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 80px; }
h1 { font-size: 24px; font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 620; margin: 0 0 2px; }
.sub { color: var(--ink-2); margin: 0 0 18px; max-width: 860px; }
.asof { color: var(--muted); font-size: 12.5px; }
a { color: var(--west); text-decoration: none; }
a:hover { text-decoration: underline; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 22px; }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 14px 16px; }
.tile .label { color: var(--ink-2); font-size: 12.5px; }
.tile .value { font-size: 30px; font-weight: 640; margin: 2px 0 2px; letter-spacing: -0.01em; }
.tile .value small { font-size: 15px; font-weight: 500; color: var(--ink-2); margin-left: 4px; }
.tile .note { color: var(--muted); font-size: 12px; }

.verdict { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 14px 18px; margin-bottom: 22px; }
.verdict p { margin: 6px 0; max-width: 940px; }
.verdict b { font-weight: 620; }

.card { background: var(--surface); border: 1px solid var(--ring); border-radius: 10px; padding: 16px 18px 14px; margin: 0 0 18px; }
.card-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.card .desc { color: var(--ink-2); margin: 2px 0 10px; max-width: 900px; }
.card .src { color: var(--muted); font-size: 12px; margin-top: 8px; }
.card .take { margin: 8px 0 0; max-width: 940px; }
.toggle { font: inherit; font-size: 12px; color: var(--ink-2); background: none; border: 1px solid var(--ring); border-radius: 6px; padding: 3px 8px; cursor: pointer; white-space: nowrap; }
.toggle:hover { background: var(--page); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.dot { border-radius: 50%; }
.sw.line { width: 16px; height: 2px; border-radius: 1px; }
.sw.hatch { background: repeating-linear-gradient(135deg, var(--west) 0 2px, var(--west-wash) 2px 4px); }

svg { display: block; overflow: visible; }
svg text { font-family: inherit; }
.tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.lbl { fill: var(--ink-2); font-size: 12px; }
.lbl-strong { fill: var(--ink); font-size: 12px; font-weight: 600; }
.val { fill: var(--ink-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--axis); stroke-width: 1; }
.hit { fill: transparent; cursor: default; }
.mark-hover { opacity: 0.75; }

.tip { position: fixed; pointer-events: none; background: var(--surface); border: 1px solid var(--ring); box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px; max-width: 320px; z-index: 10; display: none; }
.tip .t-title { color: var(--ink-2); font-size: 12px; margin-bottom: 4px; }
.tip .t-row { display: flex; align-items: center; gap: 8px; }
.tip .t-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tip .t-key { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.tip .t-note { color: var(--muted); font-size: 11.5px; margin-top: 4px; }

table.data { border-collapse: collapse; font-size: 12.5px; margin-top: 10px; width: 100%; }
table.data th, table.data td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--grid); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data th { color: var(--ink-2); font-weight: 560; }
.hidden { display: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.foot { color: var(--muted); font-size: 12px; margin-top: 28px; }
.foot li { margin: 3px 0; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr; } }
.sw.ring { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--surface); }
.panel-h { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 16px 0 4px; }
