/* FilamentRadar. One family (Bricolage Grotesque, self-hosted), cool paper + navy ink + signal orange;
   the colour comes from the filament itself (colour strip, price bars, swatches). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap;
  src: url(/static/fonts/bricolage-3.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 300 800; font-stretch: 100%; font-display: swap;
  src: url(/static/fonts/bricolage-2.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #eceee8;
  --ink: #14213d;
  --ink-2: #4a5568;
  --line: #d9dcd6;
  --line-strong: #b9bdb5;
  --signal: #f4611a;
  --signal-ink: #ffffff;
  --signal-soft: #fdeadf;
  --ok: #1f7a45;
  --ok-soft: #e3f2e8;
  --no: #b3261e;
  --no-soft: #f9e5e3;
  --warn: #7a5a00;
  --warn-soft: #fbf1cf;
  --radius: 6px;
  --radius-lg: 12px;
  --measure: 66ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1626; --surface: #161f33; --surface-2: #1e2a44; --ink: #eef1f6; --ink-2: #a3acbc;
    --line: #26314a; --line-strong: #3a4763; --signal: #ff7a33; --signal-soft: #3a2314;
    --ok: #57c47f; --ok-soft: #143122; --no: #f28b82; --no-soft: #3d1a17; --warn: #f2d15a; --warn-soft: #3a3110;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  font-size: 1rem; line-height: 1.55; font-optical-sizing: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }
a, button, summary, select, label.check { cursor: pointer; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5rem; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.05rem); line-height: 1.05; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
.wrap { width: min(1360px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: var(--measure); line-height: 1.5; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 1.25rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.brand svg { color: var(--signal); }
.brand b { color: var(--signal); font-weight: 700; }
.header-search { display: flex; flex: 1 1 260px; max-width: 480px; }
.header-search input { flex: 1; min-width: 0; padding: .5rem .8rem; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.header-search button { padding: .5rem .9rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; font: inherit; font-weight: 600; }
.site-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.site-nav a { color: var(--ink-2); font-weight: 500; }
.site-nav a:hover { color: var(--ink); }

/* buttons, chips, badges */
.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { filter: brightness(.95); }
.btn-sm { padding: .35rem .7rem; font-size: .875rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.1rem; font-weight: 700; border-radius: 8px; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn-lg:hover { filter: brightness(1.06); box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: .85rem; font-weight: 500; border: 1px solid transparent; }
.chip small { color: var(--ink-2); font-weight: 400; font-variant-numeric: tabular-nums; }
a.chip:hover { text-decoration: none; border-color: var(--ink); }
.chip-mat { background: var(--signal-soft); color: #8a3306; }
@media (prefers-color-scheme: dark) { .chip-mat { color: #ffb08a; } }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-x { background: var(--surface); border-color: var(--line-strong); }
.dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); vertical-align: -.05em; flex: none; }
.stock { font-size: .8rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.stock.ok { color: var(--ok); background: var(--ok-soft); }
.stock.no { color: var(--no); background: var(--no-soft); }

/* home: hero */
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { max-width: 22ch; }
.hero .lead { margin-top: 1rem; }
.hero-search { display: grid; grid-template-columns: minmax(14rem, 1fr) auto auto auto auto; gap: .5rem; align-items: center; margin-top: 1.5rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
.hero-search input, .hero-search select { padding: .65rem .8rem; border: 1px solid transparent; border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
.hero-search input { font-size: 1.05rem; }
.hero-search select { border-color: var(--line); }
.check { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; font-size: .95rem; padding: 0 .4rem; }
.check input { accent-color: var(--signal); width: 1rem; height: 1rem; }
@media (max-width: 900px) {
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search input { grid-column: 1 / -1; }
  .hero-search .btn { justify-content: center; }
}

/* home: colour spectrum */
.spectrum { margin-top: 1.75rem; }
.spectrum-bar { display: flex; height: 28px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line-strong); }
.spectrum-bar a { display: block; height: 100%; min-width: 5px; }
.spectrum-bar a:hover, .spectrum-bar a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.spectrum-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .45rem 1rem; margin-top: .75rem; font-size: .95rem; color: var(--ink-2); }
.spectrum-legend a { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.spectrum-legend .dot { width: .95em; height: .95em; }
.spectrum-legend small { font-variant-numeric: tabular-nums; font-size: .85em; }

/* home: radar */
.section { padding: 2.5rem 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 2rem; margin-bottom: 1rem; }
.section-head p { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.radar { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.radar li { display: grid; grid-template-columns: 6.5rem 1fr 5.5rem 6rem minmax(12rem, 18rem) 7.5rem; grid-template-areas: "mat bar min med who count"; gap: .3rem 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.radar .mat { grid-area: mat; font-weight: 700; font-size: 1.05rem; }
.radar .bar { grid-area: bar; position: relative; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.radar .bar span { position: absolute; top: 0; bottom: 0; background: var(--signal); border-radius: 999px; }
.radar .bar i { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); }
.radar .min { grid-area: min; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.radar .med { grid-area: med; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.radar .who { grid-area: who; font-size: .9rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar .who a { color: var(--ink); }
.radar .count { grid-area: count; text-align: right; font-size: .9rem; white-space: nowrap; }
.radar .count a { text-decoration: underline; text-underline-offset: .15em; text-decoration-color: var(--line-strong); }
.radar-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-2); margin: .3rem 0 0; }
@media (max-width: 900px) {
  .radar li { grid-template-columns: 1fr auto auto; grid-template-areas: "mat min med" "bar bar bar" "who who count"; gap: .25rem .75rem; }
  .radar .who { white-space: normal; }
}

/* home: material guide */
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 2.5rem; border-top: 1px solid var(--line-strong); }
.guide > div { padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--line); }
.guide h3 { margin-bottom: .35rem; }
.guide .mats { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: 0 0 .5rem; font-weight: 600; }
.guide .mats a { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--signal); }
.guide .mats span { color: var(--ink-2); font-weight: 400; }
.guide p { margin: 0 0 .35rem; color: var(--ink-2); font-size: .95rem; }
.guide .watch { color: var(--ink); font-size: .9rem; }
.guide .watch::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--signal); margin-right: .45em; vertical-align: .1em; }

/* home: checks + shops */
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem 2.5rem; margin: 0; }
.checks div { border-top: 3px solid var(--ink); padding-top: .6rem; }
.checks dt { font-weight: 600; margin-bottom: .25rem; }
.checks dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
.shop-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.shop-list li { display: grid; grid-template-columns: minmax(10rem, 1.2fr) 1fr 1fr auto; gap: 1rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.shop-list li a:first-child { font-weight: 600; }
.shop-list .from { font-variant-numeric: tabular-nums; }
.shop-list .from b { font-weight: 700; }
@media (max-width: 640px) { .shop-list li { grid-template-columns: 1fr auto; } .shop-list .hide-m { display: none; } }
.home-foot { padding: 2.5rem 0 1rem; max-width: var(--measure); color: var(--ink-2); }

/* shared: tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-weight: 600; color: var(--ink-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table.compact th, .table.compact td { padding: .4rem .6rem; }
.table-wide { min-width: 680px; }

/* listings layout */
.listing-head { padding: 1.5rem 0 .5rem; }
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; align-items: start; padding-bottom: 2rem; }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } }
.sidebar { position: sticky; top: 70px; max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: transparent transparent; scrollbar-gutter: stable; padding-right: .4rem; margin-right: -.4rem; }
.sidebar:hover, .sidebar:focus-within { scrollbar-color: var(--line-strong) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.sidebar:hover::-webkit-scrollbar-thumb, .sidebar:focus-within::-webkit-scrollbar-thumb { background: var(--line-strong); }
@media (max-width: 800px) { .sidebar { position: static; max-height: none; } }
.filters { display: flex; flex-direction: column; gap: .5rem; }
.sidebar-toggle > summary { display: none; list-style: none; margin-bottom: .6rem; }
.sidebar-toggle > summary::-webkit-details-marker { display: none; }
@media (max-width: 800px) {
  .sidebar-toggle > summary { display: inline-flex; }
  .sidebar-toggle > summary::after { content: " ▾"; }
  .sidebar-toggle[open] > summary::after { content: " ▴"; }
}
.fgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem; }
.fgroup summary { font-weight: 600; font-size: .9rem; list-style: none; display: flex; justify-content: space-between; }
.fgroup summary::after { content: "+"; color: var(--ink-2); }
.fgroup[open] summary::after { content: "–"; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup .check, .fgroup .field { display: flex; gap: .4rem; align-items: center; font-size: .9rem; margin: .4rem 0; }
.field { justify-content: space-between; }
.field input, .field select { width: 7.5rem; padding: .3rem .4rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; }
.field select { width: auto; max-width: 9rem; }
.facet { list-style: none; margin: .4rem 0 0; padding: 0; font-size: .9rem; }
.facet li a { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .15rem .3rem; border-radius: var(--radius); }
.facet li a small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.facet li a:hover { background: var(--surface-2); text-decoration: none; }
.facet li.active a { background: var(--signal-soft); color: var(--ink); font-weight: 600; }
.facet .dot { margin-right: .2rem; }
.results-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; font-size: .95rem; }
.active-chips { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.grid { display: grid; gap: 1rem; }
.cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.empty { padding: 2rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); text-align: center; }

/* card */
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.card:hover { border-color: var(--line-strong); }
.card.out { opacity: .7; }
.card-img { display: block; aspect-ratio: 1; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: .5rem; }
.spool-ph { width: 100%; height: 100%; padding: 1.2rem; background: var(--surface-2); }
.detail-img .spool-ph { padding: 2.5rem; }
.detail-img { flex-direction: column; }
.placeholder-note { margin: 0; padding: 0 1rem .8rem; text-align: center; }
.card-body { display: flex; flex-direction: column; gap: .35rem; padding: .7rem .8rem .8rem; flex: 1; }
.card-title { font-size: .95rem; font-weight: 600; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .85rem; color: var(--ink-2); margin: 0; }
.card-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.card-price { display: flex; align-items: baseline; gap: .5rem; margin-top: auto; }
.card-price strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.kg { color: var(--signal); font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; align-items: center; gap: .5rem; font-size: .8rem; flex-wrap: wrap; }
.card-foot .shop { color: var(--ink-2); }
.card-foot .btn { margin-left: auto; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin: 1.5rem 0; }
.pagination a, .pagination span { padding: .4rem .7rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: .9rem; }
.pagination span { border-color: transparent; background: transparent; }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* detail */
.crumbs { font-size: .875rem; color: var(--ink-2); padding: 1rem 0 .5rem; }
.detail { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } }
.detail-img { background: #fff; border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-img img { object-fit: contain; width: 100%; height: 100%; padding: 1rem; }
.detail-body h1 { margin-top: .5rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.price-box { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem; margin: 1rem 0; background: var(--paper); border-radius: var(--radius); }
.price-box .big { font-size: 1.9rem; margin-right: .5rem; font-variant-numeric: tabular-nums; }
.price-box p { flex-basis: 100%; margin: 0; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; font-size: .95rem; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; }
.section h2 + .muted { max-width: var(--measure); }

/* prose pages */
.prose { max-width: 72ch; padding: 1.5rem 0 2rem; }
.prose h2 { margin-top: 1.8rem; }
.prose ul { padding-left: 1.2rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line-strong); margin-top: 3rem; padding: 1.5rem 0 2rem; font-size: .875rem; color: var(--ink-2); }
.disclosure { color: var(--ink); font-weight: 500; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: .8rem 0; }

/* Amazon affiliate links: plain text links, no logo (Associates programme rules) */
.amazon-line { margin: 1.25rem 0 .5rem; }
.amazon-line a { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--signal); font-weight: 600; }
