:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --hairline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.1);
  --accent: #2361b3;
  --series-micro: #2a78d6;
  --series-factory: #eb6834;
  --tier-entry: #e1e0d9;
  --tier-mid: #b7d3f6;
  --tier-upper: #6da7ec;
  --tier-premium: #1c5cab;
  --tier-premium-ink: #ffffff;
  --tier-upper-ink: #0b0b0b;
  --good: #006300;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #242422;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9a988f;
    --hairline: #2c2c2a;
    --border: rgba(255, 255, 255, 0.1);
    --accent: #6da7ec;
    --series-micro: #3987e5;
    --series-factory: #d95926;
    --tier-entry: #383835;
    --tier-mid: #184f95;
    --tier-upper: #2a78d6;
    --tier-premium: #86b6ef;
    --tier-premium-ink: #0b0b0b;
  --tier-upper-ink: #ffffff;
    --good: #0ca30c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #242422;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #9a988f;
  --hairline: #2c2c2a;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #6da7ec;
  --series-micro: #3987e5;
  --series-factory: #d95926;
  --tier-entry: #383835;
  --tier-mid: #184f95;
  --tier-upper: #2a78d6;
  --tier-premium: #86b6ef;
  --tier-premium-ink: #0b0b0b;
  --tier-upper-ink: #ffffff;
  --good: #0ca30c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 var(--font);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.5rem 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }
code { font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.3em; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.lede { color: var(--ink-2); max-width: 70ch; font-size: 1.02rem; }
.sub { display: block; color: var(--muted); font-size: 0.82rem; font-weight: normal; }
.unknown { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.prose { max-width: 75ch; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-header nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; padding: 4px 0; }
.site-header nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 0.85rem; padding: 1rem 0 2rem; }
.crumbs { margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); }

/* filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 1rem 0;
}
.filters label { font-size: 0.8rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.filters .range { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--ink-2); }
.filters .pair { display: flex; gap: 6px; }
.filters .pair input { width: 5.5rem; }
.filters-wrap > summary {
  display: none; cursor: pointer; font-weight: 600; padding: 10px 14px; margin: 1rem 0 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
@media (max-width: 719px) {
  .filters-wrap > summary { display: block; }
  .filters-wrap[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .filters-wrap[open] > summary + .filters { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
}
.f-search { flex: 1 1 220px; }
.f-search input { width: 100%; }
input, select, button { font: inherit; font-size: 0.9rem; color: var(--ink); }
input[type="search"], input[type="number"], select {
  background: var(--page); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; min-height: 34px;
}
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { flex-direction: row; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--ink); }
.btn, .btn-quiet {
  display: inline-flex; align-items: center; gap: 0.35em; min-height: 34px; padding: 6px 14px; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 0.9rem;
}
.btn { background: var(--accent); color: var(--surface); border: 0; font-weight: 600; }
.btn-quiet { background: transparent; color: var(--ink-2); border: 1px solid var(--border); }
.result-count { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; }
.cheapest { margin: -0.25rem 0 0.75rem; font-size: 0.95rem; }
.filters fieldset.chips { flex: 1 1 100%; border: 0; margin: 0; padding: 0; min-width: 0; }
.filters .chips legend { font-size: 0.8rem; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.chips .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.filters .chips label {
  flex-direction: row; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--ink);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px 3px 6px; cursor: pointer; background: var(--page);
}
.filters .chips label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chips input { margin: 0; accent-color: var(--accent); }
.chips .swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--swatch); border: 1px solid var(--border); }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
table.data thead th {
  position: sticky; top: 0; background: var(--surface); font-size: 0.78rem; color: var(--ink-2); font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--ink-2);
}
table.data tbody tr:last-child > * { border-bottom: 0; }
table.data tbody th { font-weight: normal; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data.compact th, table.data.compact td { padding: 6px 10px; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: " ↕"; color: var(--muted); font-weight: normal; }
th[aria-sort="ascending"]::after { content: " ↑"; color: var(--ink); }
th[aria-sort="descending"]::after { content: " ↓"; color: var(--ink); }
.watch-cell { min-width: 240px; }
.watch-cell a { font-weight: 600; text-decoration: none; }
.brand-name { color: var(--ink-2); font-weight: 500; }
td.pick, th.pick { width: 32px; }
table.data .movement-cell { min-width: 150px; }
.compare-bar {
  position: sticky; bottom: 12px; margin: 12px auto 0; display: flex; gap: 12px; align-items: center; justify-content: flex-end;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; width: fit-content; margin-left: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.compare-bar[hidden], .compare-link[hidden] { display: none; }

.tier { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 0.75rem; line-height: 1.5; background: var(--tier-entry); color: var(--ink); }
.tier-mid { background: var(--tier-mid); }
.tier-upper { background: var(--tier-upper); color: var(--tier-upper-ink); }
.tier-premium { background: var(--tier-premium); color: var(--tier-premium-ink); }

.meter { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: var(--surface-2); position: relative; vertical-align: middle; overflow: hidden; }
.meter::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--ink-2); border-radius: 3px; }

/* watch page */
.watch-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; }
.eyebrow { color: var(--muted); margin: 1rem 0 0; font-size: 0.85rem; }
.meta { color: var(--ink-2); margin: 0.25rem 0; }
.price-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; }
.price-box .price { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.price-box .label { color: var(--muted); font-size: 0.8rem; }
.compare-toggle { margin-top: 8px; font-size: 0.85rem; display: flex; gap: 6px; align-items: center; }
.compare-link { font-size: 0.85rem; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 1rem; }
@media (min-width: 960px) { .watch-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.spec-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }
.spec-group h2 { margin-top: 1rem; font-size: 1rem; border-bottom: 1px solid var(--hairline); padding-bottom: 6px; }
dl.specs { margin: 0; }
dl.specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; }
dl.specs dt { color: var(--ink-2); }
dl.specs dd { margin: 0; text-align: right; }
dl.specs.inline { display: flex; flex-wrap: wrap; gap: 8px 24px; }
dl.specs.inline > div { border: 0; flex-direction: column; gap: 0; }
dl.specs.inline dd { text-align: left; }
.callout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px 12px; }
.callout h2 { font-size: 1rem; }
.peer-list { padding-left: 1.4em; margin: 0; font-size: 0.88rem; }
.peer-list li { padding: 2px 0; }
.peer-list li .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.peer-list li.current { font-weight: 700; }
.data-quality { margin-top: 2rem; }
.sources { font-size: 0.85rem; padding-left: 1.2em; overflow-wrap: anywhere; }

/* compare */
.compare-controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin: 1rem 0; }
.compare-controls label { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; }
.compare-controls select { max-width: 80vw; }
.compare-table th[scope="col"] { min-width: 160px; white-space: normal; }
.compare-table .section-row th { background: var(--surface-2); font-weight: 600; color: var(--ink); }
.compare-table tr.differs > th[scope="row"] { box-shadow: inset 3px 0 0 var(--accent); }
.compare-table td.best { color: var(--good); font-weight: 600; }
.compare-table .remove { min-height: 26px; padding: 2px 8px; font-size: 0.75rem; margin-top: 4px; }

/* value strip chart */
.vc { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px 16px; }
.vc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.85rem; color: var(--ink-2); align-items: center; }
.vc-legend .sub { display: inline; }
.key { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.key.cat-microbrand { background: var(--series-micro); border-radius: 50%; }
.key.cat-factory { background: var(--series-factory); transform: rotate(45deg) scale(0.9); }
.key-median { width: 2px; height: 14px; background: var(--ink); vertical-align: -3px; }
.vc-section { font-size: 0.95rem; margin: 1.25rem 0 0.25rem; }
.vc-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 6px 0; }
@media (min-width: 720px) { .vc-row { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: center; } }
.vc-axis-row { padding: 0; }
.vc-axis { position: relative; height: 18px; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.vc-axis span:first-child { transform: none; }
.vc-axis span:last-child { transform: translateX(-100%); }
.vc-label { font-size: 0.9rem; }
.vc-family { font-weight: 600; }
.vc-strip { position: relative; height: 44px; border-bottom: 1px solid var(--hairline); }
.vc-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hairline); }
.vc-median { position: absolute; top: 8px; bottom: 8px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.vc-dot {
  position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  transform: translateY(calc(var(--level, 0) * 7px)); display: grid; place-items: center; border-radius: 50%;
}
.vc-dot::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--series-micro); box-shadow: 0 0 0 2px var(--surface);
}
.vc-dot.cat-factory::before { background: var(--series-factory); border-radius: 1px; transform: rotate(45deg) scale(0.9); }
.vc-dot:hover::before, .vc-dot:focus-visible::before { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.vc-dot:focus-visible { outline: none; }
.vc-tooltip {
  position: absolute; z-index: 5; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; font-size: 0.82rem; max-width: 260px;
}
.vc-tooltip[hidden] { display: none; }
.vc-tooltip .tt-price { font-size: 1rem; }
.vc-tooltip .tt-detail { color: var(--muted); }

@media (forced-colors: active) {
  .vc-dot::before, .key { forced-color-adjust: none; }
}

/* images */
.thumb {
  --size: 56px;
  display: inline-block; flex: none; width: var(--size); height: var(--size); border-radius: 6px; overflow: hidden;
  background: #fff; border: 1px solid var(--border); vertical-align: middle;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.compare-thumb { --size: 120px; margin-bottom: 6px; }
.watch-link { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.watch-link > span:last-child { min-width: 0; }
.watch-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 1rem; align-items: start; }
@media (min-width: 820px) { .watch-top { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); } }
.gallery { margin: 0; }
.gallery.empty {
  aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: var(--radius); border: 1px dashed var(--border);
  color: var(--muted); font-size: 0.9rem; background: var(--surface);
}
.hero-img { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hero-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.hero-img figcaption { font-size: 0.75rem; padding: 4px 10px; background: var(--surface); color: var(--muted); border-top: 1px solid var(--border); }
.hero-img figcaption a { color: var(--muted); }
.gallery-thumbs { list-style: none; padding: 0; margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs li { width: 72px; height: 72px; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* buying */
.quick-specs { list-style: none; padding: 0; margin: 10px 0; font-size: 0.88rem; color: var(--ink-2); }
.quick-specs li { padding: 2px 0; }
.buy-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.buy-list .btn, .buy-list .btn-quiet { width: 100%; justify-content: center; min-height: 40px; }
.buy-list .sub { text-align: center; }
.sub-inline { font-weight: normal; opacity: 0.85; }
.disclosure { font-size: 0.75rem; color: var(--muted); margin: 8px 0 0; }
.compare-buy { min-height: 28px; padding: 2px 10px; font-size: 0.8rem; margin: 4px 0; }
.side { display: flex; flex-direction: column; gap: 16px; }
.ad-slot { min-height: 90px; }

.trend.up { color: var(--good, #1a7f37); font-weight: 600; }
.trend.down { color: var(--muted, #6b7280); }
