:root {
  --bg: #f4f6f9; --panel: #ffffff; --ink: #14202e; --muted: #5d6b7b; --line: #dde3ea;
  --accent: #0b4f8a; --sale: #c0262d; --sale-bg: #fdecec; --good: #1f7a45; --good-bg: #e6f4ec;
  --pill: #eef2f7; --shadow: 0 1px 2px rgba(16,32,48,.06), 0 2px 8px rgba(16,32,48,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e141b; --panel: #161f29; --ink: #e6edf4; --muted: #93a2b3; --line: #263241;
    --accent: #6fb3f2; --sale: #ff7a7f; --sale-bg: #3a1a1d; --good: #6fd39a; --good-bg: #16301f;
    --pill: #1f2a37; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e141b; --panel: #161f29; --ink: #e6edf4; --muted: #93a2b3; --line: #263241;
  --accent: #6fb3f2; --sale: #ff7a7f; --sale-bg: #3a1a1d; --good: #6fd39a; --good-bg: #16301f;
  --pill: #1f2a37; --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 6px; }
.brand { text-decoration: none; }
.tagline { margin: 0 0 18px; }
.sports { display: inline-flex; background: var(--pill); border-radius: 999px; padding: 3px; gap: 2px; }
.sports a { padding: 5px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.sports a:hover { color: var(--ink); }
.sports a[aria-current="page"] { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); }
h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
h1 span { color: var(--accent); }
.sub { color: var(--muted); }
h2 { font-size: 15px; margin: 26px 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.deal { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
.deal:hover { border-color: var(--accent); }
.deal .n { font-weight: 600; }
.deal .p { font-size: 20px; font-weight: 700; margin-top: 4px; }

.filters { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.filters input[type=search], .filters select { font: inherit; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.filters input[type=search] { flex: 1 1 220px; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; color: inherit; background: var(--panel); border: 0; padding: 7px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }
.chk { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); cursor: pointer; }
.count { margin-left: auto; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 420px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; }
.card.sale { border-color: color-mix(in srgb, var(--sale) 45%, var(--line)); }
.top { display: flex; gap: 12px; padding: 14px 14px 10px; }
.top img { width: 64px; height: 64px; object-fit: contain; border-radius: 6px; background: #fff; flex: none; }
.title { font-weight: 650; font-size: 15px; line-height: 1.25; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.pill { background: var(--pill); border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.pill.hobby { color: var(--accent); }
.best { margin-left: auto; text-align: right; flex: none; }
.best .p { font-size: 22px; font-weight: 750; }
.best .s { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; border-radius: 5px; padding: 1px 6px; }
.badge.sale { background: var(--sale-bg); color: var(--sale); }
.badge.low { background: var(--good-bg); color: var(--good); }
.badge.oos { background: var(--pill); color: var(--muted); }
.spark { padding: 0 14px; color: var(--accent); }
.spark svg { width: 100%; height: 34px; display: block; }
.spark .lbl { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
td { padding: 6px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
td.pr { text-align: right; white-space: nowrap; font-weight: 600; }
td.pr s { color: var(--muted); font-weight: 400; margin-right: 4px; }
tr.oos td { color: var(--muted); }
td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }
.more-rows { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 14px; text-align: left; }

details.hits { border-top: 1px solid var(--line); padding: 8px 14px 12px; margin-top: auto; }
details.hits summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; }
details.hits summary::-webkit-details-marker { display: none; }
details.hits summary::before { content: "▸ "; }
details.hits[open] summary::before { content: "▾ "; }
.hits h4 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hits ul { margin: 0; padding-left: 18px; }
.hits .note { font-size: 12.5px; color: var(--muted); margin-top: 8px; font-style: italic; }

.loadmore { display: block; margin: 20px auto; font: inherit; padding: 9px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: inherit; cursor: pointer; }
.stores { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.stores span { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.stores .bad { color: var(--sale); }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* Product pages */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a, .site a.home { color: var(--accent); text-decoration: none; }
.prod-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 18px; }
.prod-head img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 10px; }
.prod-head h1 { font-size: 26px; line-height: 1.2; }
.prod-best { font-size: 30px; font-weight: 750; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.panel.pad { padding: 4px 18px 16px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.panel ul { margin: 0; padding-left: 18px; }
.two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; color: var(--accent); text-decoration: none; font-size: 13px; }
.card .title a { color: inherit; text-decoration: none; }
.card .title a:hover { text-decoration: underline; }
.browse details { margin: 4px 0; }
.browse summary { cursor: pointer; font-weight: 600; }
.browse ul { columns: 2 260px; margin: 8px 0 12px; padding-left: 18px; }
.browse a { color: var(--accent); text-decoration: none; }
.brand { font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--ink) !important; }
.brand span { color: var(--accent); }
.page-h1 { font-size: 22px; margin: 14px 0 4px; letter-spacing: -.01em; }
.tagline a { color: var(--accent); }
.price-filter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.price-filter span { min-width: 9.5em; font-variant-numeric: tabular-nums; }
.price-filter input { width: 150px; accent-color: var(--accent); }
@media (max-width: 480px) { .price-filter { flex: 1 1 100%; } .price-filter input { flex: 1; width: auto; } }
