:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5c6168;
  --line: #e4e0da;
  --paper: #f3efe8;
  --card: #fff;
  --accent: #6e3f28;
  --accent-soft: #f3ebe4;
  --ref: #eef2f4;
  --ref-line: #c9d4db;
  --empty: #f3f1ec;
  --shadow: 0 8px 24px #3c241214;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }

a { color: var(--accent); }

header.site { padding: 16px 0 8px; }

.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}

h2, h3 { font-family: Georgia, serif; margin: 0; }

.lede { margin: 6px 0 0; color: var(--muted); }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.stat-row li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: .8rem;
}

.stat-row strong { font-variant-numeric: tabular-nums; }

.evidence-panel {
  margin: 10px 0 0;
  max-width: 78ch;
}

.evidence-panel summary {
  cursor: pointer;
  font-weight: 750;
  color: var(--accent);
}

.evidence-panel:not([open]) > .evidence-body { display: none; }

.evidence-body { padding-top: 8px; }

.evidence-body h3 { margin: 14px 0 4px; font-size: 1rem; }

.import-ui {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.import-ui label { display: block; margin-top: 6px; font-size: .85rem; }

.import-status { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 12px;
  padding: 8px 0;
  background: color-mix(in srgb, var(--paper) 92%, white);
  border-bottom: 1px solid var(--line);
}

.filter-card {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.filter-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
}

.showing { margin: 0; font-size: .92rem; font-weight: 700; }

.filter-axis { margin: 8px 0 0; padding: 0; border: 0; min-width: 0; }

.filter-axis legend {
  padding: 0;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip, .text-btn {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 7px 12px;
  max-width: 100%;
  text-align: left;
}

.chip { min-height: 40px; }

.chip.is-on, .chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip .count {
  display: inline-block;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  opacity: .8;
}

.text-btn {
  border-radius: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
}

.text-btn:disabled { opacity: .45; cursor: default; }

.axis-note { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }

.breadth-note, .customer-filter-note {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
  max-width: 78ch;
}

.section {
  margin: 0 0 18px;
  min-width: 0;
}

.section-head { margin-bottom: 8px; }

.section-head p, .empty-line {
  margin: 0 0 8px;
  color: var(--muted);
}

.group { margin-top: 12px; min-width: 0; }

.group h3 { font-size: 1.05rem; }

.group .group-count { color: var(--muted); font-weight: 650; font-size: .85rem; }

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.card:hover, .card:focus-visible { box-shadow: var(--shadow); outline: none; }

.shot-frame {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4px;
  padding: 4px;
  background: #efeae4;
}

.card img.mosaic,
.card img.retail-photo,
.board-hero img,
.product img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  background: #f3efe9;
}

.card-body, .product .pad { padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.card h3, .product h3 { font-size: 1rem; line-height: 1.2; }

.meta, .card-meta { margin: 0; color: var(--muted); font-size: .82rem; }

.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }

.tag, .missing-data, .colorway-count {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 6px;
}

.tag { background: var(--accent-soft); color: var(--accent); }

.tag.ref { background: #e4ebf0; color: #234; }

.missing-data { background: var(--empty); color: var(--muted); }

.colorway-count { background: #efe7c8; color: #3d3416; }

.breadth-facts {
  margin: 0;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
}

.fact, .uncertainty { margin: 0; font-size: .78rem; color: var(--ink); }

.coverage-note, .coverage-meta, .manual-evidence {
  margin: 8px 0 0;
  font-size: .84rem;
  max-width: 78ch;
}

.coverage-note { color: var(--ink); font-weight: 650; }

.coverage-meta, .manual-evidence { color: var(--muted); }

.trend-chart { display: block; color: var(--accent); }

.back { font-weight: 750; text-decoration: none; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.product {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.board-hero { margin-bottom: 12px; }

footer { padding: 8px 0 28px; color: var(--muted); font-size: .82rem; }

.loading { padding: 48px 0; color: var(--muted); }

@media (max-width: 420px) {
  body { overflow-x: hidden; }
  .wrap { width: calc(100% - 20px); }
  header.site { padding: 8px 0 2px; }
  .lede { margin-top: 2px; }
  .filter-bar { position: static; padding-top: 4px; margin-bottom: 6px; }
  .filter-card { padding: 8px; }
  .showing { font-size: .78rem; }
  .filter-axis { margin-top: 4px; }
  .empty-line { margin-bottom: 4px; }
  .section-head { margin-bottom: 4px; }
  .filter-head { align-items: stretch; }
  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip, .text-btn { max-width: 100%; white-space: normal; }
  .chip { min-height: 32px; padding: 4px 8px; font-size: .78rem; }
  h1 { font-size: 1.45rem; }
  .stat-row { gap: 4px; }
  .stat-row li { padding: 2px 8px; font-size: .75rem; }
  .showing .meta { display: none; }
  .group { margin-top: 4px; }
  .shot-frame { grid-template-columns: 1fr 1fr; }
  .group-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .card img.mosaic,
  .card img.retail-photo,
  .board-hero img,
  .product img { object-fit: contain; max-width: 100%; height: 168px; }
  .section { padding: 0; }
}
