/* ============================================================
   sportkledingwijzer.nl — loads after /assets/family.css (shared neutrals, Figtree, pebble radii, lockup).
   The design page ../design/system.html loads both files, so it cannot drift from the site.
   ============================================================ */

/* ACCENT: den. 5.7 on papier, white on den 6.4. Dark ground: #8fcfae. */
:root {
  --accent: #2e6a4f;
  --accent-soft: #e0eee6;
  --accent-tint: #8fcfae;
  --accent-text: #ffffff;
  --ok: #2d7048;
  --warn: #8a5a10;
  --warn-soft: #f6ecd9;
}

/* ============================================================
   BASE
   ============================================================ */
h1 { font-size: var(--text-2xl); font-weight: var(--w-head); line-height: 1.12; margin: 0; letter-spacing: -0.022em; }
h2 { font-size: var(--text-l); font-weight: var(--w-head); line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.01em; }
h3 { font-size: var(--text-m); line-height: 1.3; margin: 0; font-weight: var(--w-strong); }
p { margin: 0 0 var(--space-3); max-width: 65ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.soft, .hint { font-size: var(--text-s); color: var(--text-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 9; }

/* ============================================================
   FRAME
   ============================================================ */
main { padding: 10px 16px var(--space-5); }
.site-footer p { margin: 0 0 var(--space-2); max-width: 75ch; }

/* ============================================================
   COMPONENTS
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); font: var(--w-strong) var(--text-sm)/1 var(--font); padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.1); }
input[type=search], select { font: var(--text-m) var(--font); min-height: var(--tap); padding: 0.5em 0.9em; border: 1px solid var(--line); border-radius: var(--radius-field); background: var(--surface); color: var(--text); width: 100%; }
input[type=search]:hover, select:hover { border-color: #d9c7b5; }
.badge { display: inline-block; font-size: var(--text-2xs); font-weight: var(--w-strong); padding: 0 0.55em; line-height: 1.6; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-text); margin-left: 0.3em; }
/* pill: 36px visual, 44px hit area */
.pill { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-size: var(--text-xs); font-weight: var(--w-label); text-decoration: none; margin: 0 var(--space-1) var(--space-1) 0; }
.pill::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill-x { gap: 0.35em; background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: var(--w-strong); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip > span { position: relative; display: inline-flex; align-items: center; gap: 0.4em; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--bg); font-size: var(--text-s); font-weight: var(--w-label); cursor: pointer; }
.chip > span::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; bottom: -2px; }
.chip > span:hover { color: var(--accent); }
.chip input:checked + span { background: var(--accent); color: var(--accent-text); }
.chip input:checked + span .count { color: inherit; opacity: .85; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.count { font-size: var(--text-xs); font-weight: 500; color: var(--text-soft); font-variant-numeric: tabular-nums; }

/* ============================================================
   HOME
   ============================================================ */
.hero { padding: 0; max-width: 640px; }
.hero h1 { margin-bottom: var(--space-2); }
.lead { font-size: var(--text-m); color: var(--text-soft); margin-bottom: 0; }
/* search: one pill with the button inside */
.bigsearch, .searchbar { display: flex; align-items: center; gap: var(--space-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 5px 5px 5px 18px; }
.bigsearch { margin-top: 20px; }
.bigsearch input, .searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; min-height: var(--tap); font-size: var(--text-sm); border-radius: 0; }
.bigsearch input:hover, .searchbar input:hover { border: 0; }
.bigsearch input::placeholder, .searchbar input::placeholder { color: var(--text-soft); }
.bigsearch input:focus-visible, .searchbar input:focus-visible { outline: none; }
.bigsearch:focus-within, .searchbar:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.bigsearch .btn, .searchbar .btn { flex: none; min-height: var(--tap); }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; max-width: none; }
.examples .soft { margin-right: 2px; font-size: var(--text-xs); }
.examples .pill { margin: 0; }
section + section { margin-top: 26px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 760px; }
.tile-item { background: var(--surface); border-radius: var(--radius-tile); padding: 16px; display: grid; align-content: start; gap: 10px; }
.tile { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; color: var(--text); text-decoration: none; min-height: var(--tap); }
.tile-mark { grid-row: span 2; display: flex; }
.tile-name { font-weight: var(--w-head); font-size: 1.1875rem; line-height: 1.25; }
.tile:hover .tile-name { color: var(--accent); }
.tile-count { font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-unit { font-size: var(--text-s); font-weight: var(--w-label); color: var(--text-soft); }
.tile-note { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--text-soft); margin-top: 6px; }
.tile-links .pill { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.tile-links .pill:hover { background: var(--accent); color: var(--accent-text); }
.how { max-width: 65ch; }
.how ol { margin: 0 0 var(--space-3); padding-left: 1.2em; }
.how li { margin-bottom: var(--space-2); }
.how li::marker { color: var(--accent); font-weight: var(--w-strong); }
.disclosure { font-size: var(--text-xs); color: var(--text-soft); margin: var(--space-3) 0 0; }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.searchbar { margin-bottom: var(--space-4); max-width: 640px; }
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-4) var(--space-5); align-items: start; }
.filters { background: var(--surface); border-radius: var(--radius-tile); }
.filters > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px; font-weight: var(--w-strong); cursor: pointer; list-style: none; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: ""; width: 0.5em; height: 0.5em; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.filters[open] > summary::after { transform: rotate(-135deg); }
.filters-body { padding: var(--space-3) 18px 18px; display: grid; gap: var(--space-4); border-top: 1px solid var(--line); }
.group { border: 0; padding: 0; margin: 0; min-width: 0; }
.group legend { font-weight: var(--w-strong); font-size: var(--text-sm); padding: 0; margin-bottom: var(--space-2); }
.seg { display: grid; gap: 2px; }
.seg-item { display: flex; justify-content: space-between; align-items: center; min-height: var(--tap); padding: 0 14px; border-radius: var(--radius-pill); color: var(--text); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.seg-item:hover { background: var(--bg); }
.seg-item.on { background: var(--accent-soft); color: var(--accent); font-weight: var(--w-strong); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.field { display: grid; gap: var(--space-1); }
.field label { font-size: var(--text-xs); font-weight: var(--w-label); color: var(--text-soft); }
.filters select { background: var(--surface); border-color: var(--line-strong); }
.check { display: flex; align-items: center; gap: 0.6em; min-height: var(--tap); cursor: pointer; font-size: var(--text-sm); }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; border: 2px solid var(--line-strong); border-radius: 6px; background: var(--surface) center / 12px 12px no-repeat; cursor: pointer; }
.check input:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6 9.6 3.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check:hover input:not(:checked) { border-color: var(--accent); }
.check-label { flex: 1; min-width: 0; }
.switch { font-weight: var(--w-label); font-size: var(--text-s); min-height: var(--tap); }
.group > .hint { margin: 0; }
.more > summary { cursor: pointer; font-size: var(--text-s); font-weight: var(--w-strong); color: var(--accent); min-height: var(--tap); display: flex; align-items: center; }
.apply { display: flex; align-items: center; gap: var(--space-3); }
.apply .btn { min-height: 52px; padding: 0 22px; font-size: var(--text-m); }
.apply .clear { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--text-s); font-weight: var(--w-label); }
.results { min-width: 0; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.results-head h1 { font-size: 1.625rem; }
.sortline { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-s); }
.sort { position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill); color: var(--text); text-decoration: none; font-weight: var(--w-label); }
.sort::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
.sort:hover { background: var(--surface); }
.sort.on { background: var(--accent-soft); color: var(--accent); font-weight: var(--w-strong); }
.active { margin: 0 0 var(--space-2); max-width: none; }
.read { margin: 0 0 var(--space-3); }

/* cards: a pebble on vlak, image on a white well, brand, name, price, stock, shop pill. The whole card is the shop link. */
.cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: var(--space-3); }
.card { position: relative; background: var(--surface); border-radius: var(--radius-card); padding: 8px 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.card-img { position: relative; aspect-ratio: 1 / 1; background: #fff; border-radius: var(--radius-img); overflow: hidden; }
.card-img img { position: absolute; inset: var(--space-2); width: calc(100% - 2 * var(--space-2)); height: calc(100% - 2 * var(--space-2)); object-fit: contain; }
.card-body { padding: 8px 6px 0; display: flex; flex-direction: column; gap: 0; flex: 1; }
.card p { margin: 0; }
.brandline { font-size: var(--text-2xs); color: var(--text-soft); min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card h3 { font-size: var(--text-sm); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.price-row { display: flex; align-items: baseline; gap: var(--space-2); margin-top: 4px !important; }
.price { font-size: 1.125rem; font-weight: var(--w-head); font-variant-numeric: tabular-nums; }
.price-row s { font-size: var(--text-xs); color: var(--text-soft); }
.deal { font-size: var(--text-2xs); font-weight: var(--w-strong); color: var(--accent); }
.stock { font-size: var(--text-2xs); font-weight: var(--w-label); display: flex; align-items: center; gap: 0.45em; margin: 6px 0 10px !important; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.stock-ok { color: var(--ok); }
.stock-unknown { color: var(--warn); }
.shop { display: flex; align-items: center; justify-content: center; min-height: 42px; margin: auto -6px 0; border-radius: var(--radius-pill); background: var(--accent-soft); font-size: var(--text-s); font-weight: var(--w-strong); color: var(--accent); text-decoration: none; }
.shop::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.card:hover .shop { background: var(--accent); color: var(--accent-text); }
.shop:focus-visible { outline: none; }
.card:has(.shop:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin: var(--space-4) 0 0; }
.pg { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0 0.9em; border-radius: var(--radius-pill); background: var(--surface); color: var(--text); text-decoration: none; font-weight: var(--w-label); font-variant-numeric: tabular-nums; }
.pg:hover { color: var(--accent); }
.pg.on { background: var(--accent); color: var(--accent-text); }
.gap { padding: 0 var(--space-1); color: var(--text-soft); }

.empty { background: var(--surface-soft); border-radius: var(--radius-tile); padding: var(--space-4) 20px; margin-top: var(--space-3); }
.empty h2 { margin-bottom: var(--space-2); }
.help { margin: 0; padding-left: 1.2em; }
.help li { margin-bottom: var(--space-2); max-width: 65ch; }

/* ============================================================
   CATEGORY PAGES
   ============================================================ */
.crumbs { margin: 0 0 var(--space-1); font-size: var(--text-s); color: var(--text-soft); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 0.55em; color: var(--text-soft); opacity: .6; }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text-soft); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); font-weight: var(--w-label); }
.cat-head { max-width: 760px; margin-bottom: var(--space-3); }
.cat-head h1 { margin-bottom: var(--space-2); }
.cat-head .lead { margin-bottom: var(--space-3); }
.cat-intro { margin: 0; }
.pills.kenmerken { margin: 0 0 var(--space-4); }
.cat-more { max-width: 65ch; margin-top: var(--space-5); }
.cat-more h2 { margin-bottom: var(--space-2); }
.cat-more p { margin-bottom: var(--space-2); }
.results > .sortline { margin-bottom: var(--space-2); flex-wrap: wrap; }
.check-link { color: var(--text); text-decoration: none; }
.check-link:hover .check-label { text-decoration: underline; text-underline-offset: 3px; }
.fixed { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.fixed .pill { margin: 0; }
.legend-s { flex: 0 0 100%; margin: 0; font-weight: var(--w-strong); font-size: var(--text-sm); }
.related { margin-top: var(--space-5); }
.related h2 { font-size: var(--text-m); margin-bottom: var(--space-2); }
.related h2:not(:first-child) { margin-top: var(--space-4); }
.pills, .tile-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pills .pill, .tile-links .pill { margin: 0; }
.pill .count { margin-left: 0.45em; }
.results > .cards:first-child { margin-top: 0; }
.results > .sortline + .cards { margin-top: var(--space-2); }
@media (min-width: 900px) { .cat-head h1, .hero h1 { font-size: 2.25rem; } }

@media (min-width: 900px) {
  main { padding-top: var(--space-4); }
  .filters > summary { display: none; }
  .filters { position: sticky; top: var(--space-3); max-height: calc(100vh - 2 * var(--space-3)); overflow-y: auto; }
  .filters .filters-body { border-top: 0; padding-top: 18px; }
}
@media (max-width: 899px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apply { flex-direction: column; align-items: stretch; text-align: center; }
  .apply .clear { justify-content: center; }
  .results-head { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
}
