:root {
  --bg: #ffffff;
  --fg: #1b1f24;
  --muted: #5a636e;
  --border: #e2e5e9;
  --surface: #f6f7f9;
  --th-bg: #f1f3f6;
  --row-hover: #f8fafc;
  --link: #0a58ad;
  --notice-bg: #fff7e0;
  --notice-border: #e9c46a;
  --info-bg: #eef4fc;
  --info-border: #8fb3e3;
  --official-bg: #e4f3e8; --official-fg: #1c6532;
  --aggregator-bg: #e6eefc; --aggregator-fg: #1d4d9c;
  --reseller-bg: #f1e8fb; --reseller-fg: #64309a;
  --good: #1c6532;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --fg: #e4e7eb;
    --muted: #9aa4b0;
    --border: #2b3139;
    --surface: #181c21;
    --th-bg: #1d2228;
    --row-hover: #171b20;
    --link: #7db4f5;
    --notice-bg: #2b2413;
    --notice-border: #8a6d25;
    --info-bg: #15202e;
    --info-border: #36597f;
    --official-bg: #173222; --official-fg: #8fd6a4;
    --aggregator-bg: #1a2a45; --aggregator-fg: #9cbcf5;
    --reseller-bg: #2e2142; --reseller-fg: #d0abf5;
    --good: #8fd6a4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
p, li, dd { overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 6px 10px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 18px; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; }
.stamp-bar { font-size: 13px; color: var(--muted); padding-top: 10px; }
.stamp { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }

main { padding-bottom: 48px; }
h1 { font-size: clamp(24px, 3.2vw, 34px); line-height: 1.2; letter-spacing: -0.015em; margin: 18px 0 12px; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 24px 0 8px; }
.lede { font-size: 17px; color: var(--fg); max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-top: 16px; }
.breadcrumb a { color: var(--muted); }

.notice, .callout {
  border-left: 4px solid var(--notice-border);
  background: var(--notice-bg);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 14px 0;
  max-width: 90ch;
}
.callout { border-left-color: var(--info-border); background: var(--info-bg); }
.notice p, .callout p { margin: 4px 0; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 10px 0 8px;
  max-width: 100%;
}
.table-wrap.tall { max-height: 78vh; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
caption { text-align: left; padding: 8px 10px; font-size: 13px; color: var(--muted); caption-side: top; }
th, td { padding: 7px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--th-bg);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow-wrap: normal;
}
tbody tr:hover td { background: var(--row-hover); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
td.spec { min-width: 12em; }
td.prov { min-width: 9em; }
.price { font-weight: 600; }
.sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; white-space: normal; }
.ratio-good { color: var(--good); font-weight: 600; }
.sort-btn { all: unset; cursor: pointer; }
.sort-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
th[data-sort] .sort-btn::after { content: " \2195"; color: var(--muted); font-weight: 400; }
th[aria-sort="ascending"] .sort-btn::after { content: " \2191"; }
th[aria-sort="descending"] .sort-btn::after { content: " \2193"; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.b-first_party { background: var(--official-bg); color: var(--official-fg); }
.b-aggregator { background: var(--aggregator-bg); color: var(--aggregator-fg); }
.b-reseller { background: var(--reseller-bg); color: var(--reseller-fg); }
.b-flag { background: var(--notice-bg); color: var(--fg); border: 1px solid var(--notice-border); font-weight: 500; white-space: normal; }

details.note summary { cursor: pointer; color: var(--link); font-size: 12.5px; }
details.note div { font-size: 12.5px; color: var(--muted); max-width: 34em; white-space: normal; margin-top: 4px; }

.legend { font-size: 13px; color: var(--muted); max-width: 90ch; }
.legend p { margin: 4px 0; }

dl.facts { display: grid; grid-template-columns: minmax(9em, max-content) 1fr; gap: 6px 18px; margin: 12px 0; max-width: 90ch; }
dl.facts dt { font-weight: 600; color: var(--muted); font-size: 14px; }
dl.facts dd { margin: 0; }
@media (max-width: 560px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
}

ul.issues { padding-left: 20px; max-width: 90ch; }
ul.issues li { margin: 6px 0; }
.faq dt { font-weight: 600; margin-top: 14px; }
.faq dd { margin: 4px 0 0; max-width: 80ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface); }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted); }
.site-footer .wrap { padding-top: 18px; padding-bottom: 28px; }
.site-footer p { margin: 6px 0; max-width: 90ch; }
.site-footer a { color: var(--muted); }
