/* Self-hosted fonts (SIL OFL 1.1, see fonts/README.txt). */
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 700; src: url("/static/fonts/archivo-latin-ext-700-normal.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; }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 700; src: url("/static/fonts/archivo-latin-700-normal.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: "Archivo"; font-style: normal; font-display: swap; font-weight: 800; src: url("/static/fonts/archivo-latin-ext-800-normal.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; }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 800; src: url("/static/fonts/archivo-latin-800-normal.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: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 400; src: url("/static/fonts/ibm-plex-sans-latin-ext-400-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 400; src: url("/static/fonts/ibm-plex-sans-latin-400-normal.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: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 600; src: url("/static/fonts/ibm-plex-sans-latin-ext-600-normal.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 600; src: url("/static/fonts/ibm-plex-sans-latin-600-normal.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; }

/* SpoolRadar design system: a calm Nordic price comparison where the product brings the colour.
   White page, one brand blue, filters in a left sidebar with counts, real product photos and filament colour dots.
   Green means "good price"; it is the only other colour with a meaning. Spacing 4/8/16/32. */
:root {
  color-scheme: light;
  --surface: #f4f6f8;          /* page behind panels, member tables */
  --surface-raised: #ffffff;   /* panels, inputs, rows */
  --ink: #1b1f24;
  --ink-muted: #5f6873;
  --line: #e2e6ea;
  --line-strong: #cdd3d9;
  --spool: #1559b7;            /* brand blue: links, buttons, selected filters */
  --spool-tint: #e9f1fc;
  --on-spool: #ffffff;
  --btn: #1559b7;
  --on-btn: #ffffff;
  --hl: #e4f4ea;               /* best price background */
  --on-hl: #0f6b3c;
  --cheapest: #13804b;         /* good: best price, price went down */
  --cheapest-tint: #f3faf6;
  --check: #8a5a00;
  --check-tint: #fdf3dd;
  --price-up: #c0392b;
  --price-up-tint: #fdecea;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 32px;
  --radius-tag: 4px;
  --radius: 6px;
  --radius-chip: 999px;

  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-body);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/22px var(--font-body);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden; /* the page never scrolls sideways; wide tables scroll in their own frame */
}
a { color: var(--spool); text-decoration: none; }
a:hover { text-decoration: underline; }
:is(a, button, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--spool); outline-offset: 2px; }
input[type=radio], input[type=checkbox] { accent-color: var(--spool); }

/* ------------------------------------------------------------ type */
h1 { font: 700 28px/34px var(--font-head); letter-spacing: -0.015em; margin: var(--space-3) 0 var(--space-1); }
h2 { font: 700 19px/26px var(--font-head); margin: var(--space-4) 0 var(--space-2); }
.label, th, legend { font: 600 13px/18px var(--font-body); }
.muted, .sub { color: var(--ink-muted); }
.sub, .small { font-size: 13px; line-height: 18px; }
.num, .kg, .mono { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ layout */
main { padding: 0 var(--space-4) var(--space-4); max-width: 1440px; margin: 0 auto; }
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  padding: 10px max(var(--space-4), calc((100% - 1440px) / 2 + var(--space-4)));  /* content lines up with main, bar stays full width */
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}
.brand { font: 700 21px/28px var(--font-head); color: var(--ink); letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
/* a spool seen from the side: rim, filament, hub */
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, var(--surface-raised) 0 3px, var(--ink) 3.5px 5px, var(--spool) 5.5px 9px, var(--ink) 9.5px 11px); }
nav { display: flex; gap: var(--space-3); }
nav a { color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
nav a:hover { text-decoration: none; border-bottom-color: var(--line-strong); }
nav a[aria-current="page"] { font-weight: 600; color: var(--spool); border-bottom-color: var(--spool); }
.check { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.running { color: var(--spool); font-weight: 600; }
.back { margin: var(--space-3) 0 0; }

/* ------------------------------------------------------------ controls */
button { font: inherit; cursor: pointer; }
.btn {
  display: inline-block; padding: 7px var(--space-3); border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink);
  font-weight: 600; line-height: 20px;
}
.btn:hover { text-decoration: none; border-color: var(--ink-muted); }
.btn.selected { border-color: var(--spool); color: var(--spool); }
.btn.primary { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary.htmx-request { opacity: 0.6; }
select, input[type=search] {
  font: inherit; padding: 6px 10px; min-height: 38px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface-raised); color: var(--ink);
}
input[type=search] { min-width: 0; width: 100%; }
.setrow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

/* filter bar (history page) */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); padding: var(--space-3) 0; margin: 0 0 var(--space-2); border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field.grow { flex: 1 1 200px; }
.label, legend { color: var(--ink-muted); }
fieldset.chips { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
fieldset.chips legend { padding: 0; width: 100%; margin-bottom: var(--space-1); }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 5px 12px; border-radius: var(--radius-chip); border: 1px solid var(--line-strong); background: var(--surface-raised); color: var(--ink); font-size: 14px; line-height: 20px; }
.chip input:checked + span { border-color: var(--spool); background: var(--spool-tint); color: var(--spool); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--spool); outline-offset: 2px; }

/* ------------------------------------------------------------ tables */
.count { margin: 0; }
.table-frame { overflow-x: auto; max-width: 100%; border-top: 1px solid var(--line); }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th { color: var(--ink-muted); white-space: nowrap; padding-top: 8px; padding-bottom: 8px; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.num, td.kg { font: 400 14px/20px var(--font-body); font-variant-numeric: tabular-nums; }
td.kg { font: 700 18px/24px var(--font-head); letter-spacing: -0.01em; }
td.prod, th.prod { min-width: 280px; }
table.prices th.num { width: 9em; }
td.prod .pname { color: var(--ink); font-weight: 600; }
td.prod .pname:hover { color: var(--spool); }
.prodtext .meta { margin-top: 3px; font-size: 13px; line-height: 18px; color: var(--ink-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.prodtext .meta .mshop { color: var(--ink); font-weight: 600; }
.prodtext .tags { margin-top: 6px; line-height: 0; }
.prodtext .tags:not(:has(.tag)) { display: none; }
.prodtext .tags .tag { margin-bottom: 0; }
td.kg .chg { font: 600 12px/16px var(--font-body); letter-spacing: 0; margin-top: 2px; }
td.note { max-width: 520px; }
td.empty { text-align: center; padding: var(--space-4) var(--space-3); }
.approx { color: var(--ink-muted); }
.ext { margin-left: 2px; }
.ext:hover { text-decoration: none; }
tr.soldout td, tr.older td { color: var(--ink-muted); }
tr.soldout .pname, tr.older .pname, tr.soldout .mshop, tr.older .mshop { color: var(--ink-muted); }
tbody > tr:not(.members-row):not(.more-row):hover > td { background: var(--surface); }
tr.cheapest > td { background: var(--cheapest-tint); }
tbody > tr.cheapest:hover > td { background: var(--cheapest-tint); }
tr.cheapest td.kg { color: var(--cheapest); }
tr.cheapest td.kg::before { content: "Best price"; display: block; margin-bottom: 2px; font: 600 11px/16px var(--font-body); letter-spacing: 0.01em; color: var(--on-hl); }
.up { color: var(--price-up); }
.down { color: var(--cheapest); }

/* ------------------------------------------------------------ filament colour dots */
.sws { display: inline-flex; align-items: center; gap: 3px; }
.sw { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #999);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18); vertical-align: middle; }
.sw-hvid, .sw-transparent { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.3); }
.sw-transparent { background: repeating-conic-gradient(#d7dde3 0 25%, #fff 0 50%) 0 0 / 6px 6px; }
.sw-sølv { background: linear-gradient(135deg, #eef0f2, #a9afb5 55%, #e3e6e9); }
.sw-guld { background: linear-gradient(135deg, #f3dc8a, #b8902a 55%, #ead17a); }
.sw-flerfarvet, .sw-all { background: conic-gradient(#d23a2e, #f4cf1d, #2f9a4c, #2563c9, #8452c2, #d23a2e); }
.sw-ukendt { background: none; box-shadow: inset 0 0 0 1px var(--ink-muted); }
.swmore { font-size: 12px; color: var(--ink-muted); margin-left: 2px; }
.cnames.multi { display: none; }

/* ------------------------------------------------------------ tags */
.tag {
  display: inline-block; padding: 1px 7px; margin: 0 var(--space-1) var(--space-1) 0;
  border-radius: var(--radius-tag); border: 0;
  font: 600 12px/18px var(--font-body); white-space: nowrap; color: var(--ink-muted); background: var(--surface);
}
.tag.hs { color: var(--spool); background: var(--spool-tint); }
.tag.lowtag { color: var(--on-hl); background: var(--hl); }
.tag.check, .tag.cond { color: var(--check); background: var(--check-tint); }
.tag.refill { color: var(--ink-muted); background: var(--surface); }
.tag.bad { color: var(--price-up); background: var(--price-up-tint); }
.hsbtns { display: inline-flex; gap: var(--space-1); margin: 0 var(--space-1) var(--space-1) 0; }
.mini { padding: 0 8px; font: 600 12px/20px var(--font-body); border: 1px solid var(--check); border-radius: var(--radius-tag); background: transparent; color: var(--check); }

/* ------------------------------------------------------------ chart */
.chartbox { position: relative; height: 320px; margin: var(--space-3) 0; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.prodcell { display: flex; gap: 12px; align-items: flex-start; }
.prodtext { min-width: 0; flex: 1; }
.thumb { flex: none; width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.thumb.sm { width: 32px; height: 32px; display: inline-block; vertical-align: middle; margin-right: var(--space-1); }
.thumb.ph { visibility: visible; background: var(--surface); }
.offerhead { display: flex; gap: var(--space-4); align-items: flex-start; }
.offerhead h1 { margin-top: 0; }
.offerimg { max-width: 240px; max-height: 240px; width: auto; height: auto; flex: none; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
details.variants { margin-top: 4px; }
details.variants summary { cursor: pointer; font-size: 13px; color: var(--spool); font-weight: 600; }
details.variants ul { margin: 4px 0 0; padding-left: 1.1em; font-size: 0.85em; }
td.low { color: var(--ink-muted); }

.add-form { align-items: flex-end; }
.add-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); margin: var(--space-3) 0; }
.add-thumb { width: 64px; height: 64px; object-fit: contain; vertical-align: middle; margin-right: var(--space-2); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg a { padding: 5px 10px; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--ink-muted); background: var(--surface-raised); }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a + a { border-left: 1px solid var(--line-strong); }
.seg a[aria-current="true"] { background: var(--spool-tint); color: var(--spool); }
.orig { color: var(--ink-muted); font-size: 12px; }
.foot { margin: var(--space-4) 0 0; padding: var(--space-4); color: var(--ink-muted); font-size: 13px; line-height: 20px; background: var(--surface); border-top: 1px solid var(--line); }
.foot > div { max-width: calc(1440px - 2 * var(--space-4)); margin: 0 auto; }
.mshop { font-weight: 600; }
.fullTitle { word-break: break-word; }
.famform { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.famform input[list] { min-width: 22em; max-width: 100%; }

/* ------------------------------------------------------------ overview: sidebar filters + results */
.overview { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: var(--space-4); align-items: start; margin-top: var(--space-3); }
.side { min-width: 0; }
.fdetails > summary { display: none; }
.fbody { display: flex; flex-direction: column; gap: var(--space-3); }
.fgroup { border: 0; margin: 0; padding: 0 0 var(--space-3); min-width: 0; border-bottom: 1px solid var(--line); }
.fh { display: block; padding: 0; margin: 0 0 6px; font: 600 14px/20px var(--font-body); color: var(--ink); }
.opt, .flinks a { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: var(--radius); font-size: 14px; line-height: 20px; color: var(--ink); cursor: pointer; }
.opt:hover, .flinks a:hover { background: var(--surface); text-decoration: none; }
.opt input { margin: 0; flex: none; }
.opt .t, .flinks .t { flex: 1; min-width: 0; }
.opt:has(input:checked) .t, .flinks a[aria-current] .t { font-weight: 600; }
.flinks { list-style: none; margin: 0; padding: 0; }
.flinks a[aria-current] { color: var(--spool); background: var(--spool-tint); }
.n { color: var(--ink-muted); font-size: 12px; }
:is(.fcolours, .froll) .opt:has(.n[data-n="0"]):not(:has(input:checked)) { display: none; }
.fcolours .sw { width: 14px; height: 14px; }
details.fall > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--spool); padding: 4px 0; list-style: none; }
details.fall > summary::-webkit-details-marker { display: none; }
details.fall > summary::after { content: " +"; }
details.fall[open] > summary { display: none; }
.fclear { font-size: 13px; font-weight: 600; }
.results { min-width: 0; }
.search input[type=search] { min-height: 44px; font-size: 16px; padding: 8px 14px; border-radius: var(--radius); }
.reshead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); margin: var(--space-3) 0 var(--space-2); }
.reshead .count b { font-weight: 700; }
.sortsel { display: inline-flex; align-items: center; gap: var(--space-2); }
.sortsel select { min-height: 34px; padding: 4px 8px; }
.tablenote { margin: var(--space-2) 0 0; }


/* ------------------------------------------------------------ phone */
@media (max-width: 720px) {
  body { font-size: 15px; line-height: 22px; }
  main { padding: var(--space-1) var(--space-3) var(--space-4); }
  h1 { font-size: 24px; line-height: 30px; margin: var(--space-2) 0; overflow-wrap: anywhere; }
  h2 { margin-top: var(--space-3); }
  .sub, .small { font-size: 14px; line-height: 20px; }
  .tag { font-size: 13px; line-height: 20px; margin: 6px var(--space-1) 0 0; }

  /* header: brand + currency + submit on one row, nav scrolls inside its own row */
  main { padding: 0 var(--space-3) var(--space-4); }
  h1 { margin-top: var(--space-3); }
  .top { gap: 0 var(--space-2); padding: var(--space-2) var(--space-3) 0; align-items: center; }
  .top::after { order: 4; margin-top: 0; }
  .foot { padding: var(--space-3); }
  .brand { order: 1; padding: var(--space-1) 0; font-size: 19px; gap: 6px; }
  .check { order: 2; margin-left: auto; width: auto; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
  nav { order: 3; flex: 1 0 100%; margin: 0 calc(-1 * var(--space-3)); padding: 0 var(--space-3); gap: var(--space-3);
        overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav::-webkit-scrollbar { display: none; }
  nav a { padding: 10px 0 8px; white-space: nowrap; flex: none; }
  .lg { display: none; }
  .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px var(--space-3); }
  .seg a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 9px; font-size: 14px; }
  .ext { min-width: 40px; min-height: 40px; margin: -10px -6px -10px 0; align-items: center; justify-content: center; display: inline-flex; vertical-align: middle; }
  .mini { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .hsbtns { gap: var(--space-2); }

  /* filters: the sidebar becomes a collapsible "Filters" button with a summary */
  .filter-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--space-2); }
  .filter-bar select, .filter-bar input[type=search] { min-height: 44px; font-size: 16px; }
  .fdetails > summary {
    display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 12px;
    cursor: pointer; list-style: none; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-raised);
  }
  .fdetails > summary::-webkit-details-marker { display: none; }
  .fdetails > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 3px 0; border: solid var(--ink-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .fdetails[open] > summary::after { transform: rotate(225deg); margin-bottom: -3px; }
  .ftitle { font-weight: 600; }
  .fsum { flex: 1; min-width: 0; color: var(--ink-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fbody { padding: var(--space-3) 4px var(--space-1); }
  .opt, .flinks a { min-height: 40px; }
  .chip span { padding: 9px 14px; }

  /* price list: one card per offer */
  .cards-frame { overflow: visible; background: none; border-radius: 0; }
  table.prices, table.prices tbody { display: block; }
  table.prices thead { display: none; }
  table.prices tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-2);
    grid-template-areas: "prod prod" "price kg" "pack kg";
    margin: 0; padding: 14px 0; background: none;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  table.prices td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; position: static; background: none; text-align: left; }
  table.prices td.prod { grid-area: prod; }
  table.prices td.price { grid-area: price; align-self: end; margin-top: var(--space-2); font: 600 16px/22px var(--font-body); }
  table.prices td.pack { grid-area: pack; color: var(--ink-muted); font: 400 14px/20px var(--font-mono); white-space: normal; }
  table.prices td.kg { grid-area: kg; align-self: end; text-align: right; font: 800 26px/30px var(--font-head); letter-spacing: -0.03em; margin-top: var(--space-2); padding: 0 4px; }
  table.prices td.kg::after { content: attr(data-label); display: block; font: 600 12px/16px var(--font-body); color: var(--ink-muted); letter-spacing: 0.04em; }
  table.prices td.kg .chg { display: none; }
  table.prices td.pack .sub { display: inline; }
  table.prices td.pack .sub::before { content: "· "; }
  table.prices td.empty { grid-column: 1 / -1; padding: var(--space-3); text-align: center; }
  table.prices tr:has(td.empty) { display: block; }
  table.prices tr.cheapest { background: none; }
  table.prices tr.cheapest > td { background-color: transparent; }
  table.prices tr.soldout td, table.prices tr.older td { color: var(--ink-muted); }
  .prodcell { gap: 12px; }
  .thumb { width: 56px; height: 56px; }
  .thumb.sm { width: 32px; height: 32px; }
  .prodtext > a { font-weight: 600; font-size: 16px; line-height: 22px; overflow-wrap: anywhere; }
  details.variants { margin-top: 0; }
  details.variants summary { display: flex; align-items: center; min-height: 40px; font-size: 14px; }
  details.variants ul { margin: 0; padding-left: 0; font-size: 14px; line-height: 20px; list-style: none; }
  details.variants:not(.members) li { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; }

  /* plain tables: compact cards instead of sideways scrolling */
  table.obs, table.obs tbody, table.hist, table.hist tbody, table.shoptbl, table.shoptbl tbody, table.dealtbl, table.dealtbl tbody { display: block; }
  table.obs thead, table.hist thead, table.shoptbl thead, table.dealtbl thead { display: none; }
  table.obs tr, table.hist tr, table.shoptbl tr, table.dealtbl tr { display: grid; column-gap: var(--space-2); row-gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.obs tbody tr:last-child, table.hist tbody tr:last-child, table.shoptbl tbody tr:last-child, table.dealtbl tbody tr:last-child { border-bottom: 0; }
  :is(table.obs, table.hist, table.shoptbl, table.dealtbl) td { display: block; padding: 0; border: 0; min-width: 0; max-width: none; white-space: normal; }
  table.obs tr { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "time price kg" "stock src src"; align-items: baseline; }
  table.obs .c-time { grid-area: time; font-size: 14px; color: var(--ink-muted); }
  table.obs .c-price { grid-area: price; text-align: right; }
  table.obs .c-kg { grid-area: kg; text-align: right; font-weight: 600; min-width: 4.5em; }
  table.obs .c-stock { grid-area: stock; font-size: 14px; color: var(--ink-muted); }
  table.obs .c-src { grid-area: src; text-align: right; color: var(--ink-muted); }
  table.hist tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date kg" "prod prod" "shop shop"; align-items: baseline; }
  table.hist .c-date { grid-area: date; color: var(--ink-muted); }
  table.hist td.kg { grid-area: kg; font-size: 18px; text-align: right; }
  table.hist td.prod { grid-area: prod; }
  table.hist .c-shop { grid-area: shop; color: var(--ink-muted); font-size: 14px; }
  table.shoptbl tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "shop n" "shop n2" "status adapter" "note note" "checked checked"; align-items: baseline; row-gap: 4px; }
  table.shoptbl .c-shop { grid-area: shop; overflow-wrap: anywhere; }
  table.shoptbl .c-shop > a { font-weight: 600; }
  table.shoptbl .c-n { grid-area: n; text-align: right; }
  table.shoptbl .c-n::after { content: " PETG offers"; font-family: var(--font-body); color: var(--ink-muted); font-size: 14px; }
  table.shoptbl .c-n + .c-n { grid-area: n2; }  /* the PLA count: its own line, the two counts used to sit on top of each other */
  table.shoptbl .c-n + .c-n::after { content: " PLA offers"; }
  table.shoptbl .c-status { grid-area: status; }
  table.shoptbl .c-adapter { grid-area: adapter; text-align: right; color: var(--ink-muted); font-size: 14px; }
  table.shoptbl .c-note { grid-area: note; }
  table.shoptbl .c-checked { grid-area: checked; color: var(--ink-muted); }
  table.shoptbl .c-checked::before { content: "Last checked "; }
  table.dealtbl tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "deal deal" "date src"; }
  table.dealtbl .c-deal { grid-area: deal; overflow-wrap: anywhere; }
  table.dealtbl .c-deal a { display: inline-block; padding: 4px 0; }
  table.dealtbl .c-date { grid-area: date; color: var(--ink-muted); }
  table.dealtbl .c-src { grid-area: src; color: var(--ink-muted); font-size: 14px; }

  /* other pages */
  .chartbox { height: 240px; margin: var(--space-2) 0; }
  .offerhead { flex-direction: column; gap: var(--space-2); }
  .offerimg { max-width: 160px; max-height: 160px; }
  .fullTitle { overflow-wrap: anywhere; }
  .setrow .btn { min-width: 64px; }
  .famform { align-items: stretch; }
  .famform input[list] { min-width: 0; width: 100%; min-height: 44px; font-size: 16px; }
  .setrow, .famform { gap: var(--space-2); }
  .add-form { align-items: stretch; }
  .cta-submit { flex-direction: column; align-items: stretch; }
  .errorpage { margin: var(--space-3) auto; }
  .errorpage .btn { margin: 0 var(--space-2) var(--space-2) 0; }
  .subq .acts input[type=text] { min-width: 0; width: 100%; min-height: 40px; font-size: 16px; }
  .subq .acts form { width: 100%; }
}

/* ------------------------------------------------------------ SEO pages: intro, prose, top lists */
.intro { margin: 0 0 var(--space-2); max-width: 90ch; color: var(--ink-muted); }
.prose { max-width: 76ch; }
.home-info { margin-top: var(--space-4); }
.prose h1 { margin-top: var(--space-2); }
.prose h3 { font: 700 16px/22px var(--font-head); margin: var(--space-3) 0 var(--space-1); }
.prose p, .prose ul { margin: 0 0 var(--space-2); }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: var(--space-1); }
.prose .lead { font-size: 17px; line-height: 26px; }
.prose .related { margin-top: var(--space-3); color: var(--ink-muted); }
.prose table.compare th, .prose table.compare td { white-space: normal; padding: 8px 12px; }
.prose table.compare thead th { width: 28%; }
.prose table.compare tbody th { text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 20px; color: var(--ink); background: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.toplist { list-style: none; margin: 0 0 var(--space-3); padding: 0; border-top: 3px solid var(--line-strong); }
.toplist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.toplist a { color: var(--ink); }
.toplist li:last-child { border-bottom: 0; }
.toplist li:first-child .tl-kg { color: var(--cheapest); }
.tl-main { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; }
.tl-rank { color: var(--ink-muted); font-family: var(--font-mono); font-weight: 400; margin-right: var(--space-1); }
.tl-shop { grid-column: 1; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.tl-kg { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font: 800 19px/24px var(--font-head); letter-spacing: -0.01em; white-space: nowrap; }
.tl-unit { display: block; font: 400 12px/16px var(--font-body); color: var(--ink-muted); }
.footlinks { margin-top: var(--space-1); }
@media (max-width: 720px) {
  .intro { font-size: 14px; line-height: 20px; }
  .prose .lead { font-size: 16px; line-height: 24px; }
  .toplist .ext { margin-top: -10px; margin-bottom: -10px; }
}

/* ------------------------------------------------------------ family members (full-width row under the family) */
tr.members-row { display: none; }
tr:has(details.members[open]) + tr.members-row { display: table-row; }
tr.members-row > td { padding: var(--space-2) var(--space-3) var(--space-3); background: var(--surface); }
.mgroups { display: grid; gap: var(--space-3); }
.mshophead { font: 700 15px/22px var(--font-head); margin: 0 0 var(--space-1); text-transform: none; letter-spacing: 0; }
.mshophead .sub { font: 400 13px/20px var(--font-body); margin-left: var(--space-1); }
table.mtbl { width: 100%; table-layout: fixed; border-collapse: collapse; background: var(--surface-raised); border: 1px solid var(--line); }
table.mtbl th:first-child, table.mtbl td:first-child { padding-left: 12px; }
table.mtbl + details, details.mmore table.mtbl { margin-top: 0; }
table.mtbl th, table.mtbl td { padding: 6px 12px; font-size: 14px; line-height: 20px; vertical-align: middle; }
table.mtbl th { font-size: 11px; }
table.mtbl tr:last-child td { border-bottom: 0; }
table.mtbl col.c-name { width: 46%; }
table.mtbl col.c-pack { width: 15%; }
table.mtbl col.c-price { width: 15%; }
table.mtbl col.c-kg { width: 12%; }
table.mtbl col.c-links { width: 12%; }
table.mtbl .m-meta { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
table.mtbl .m-meta .tag { margin: 0 0 0 4px; font-size: 11px; line-height: 16px; }
table.mtbl td.m-name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
table.mtbl td.m-links { text-align: right; white-space: nowrap; }
table.mtbl td.m-links .ext { margin: 0; font-weight: 600; font-size: 13px; }
table.mtbl td.m-kg b { font-weight: 700; }
table.mtbl .unit { font: 400 12px/16px var(--font-body); color: var(--ink-muted); }
table.mtbl tr.soldout td { color: var(--ink-muted); }
details.mmore > summary { cursor: pointer; padding: 6px 12px; font-size: 13px; color: var(--ink); font-weight: 600; border: 1px solid var(--line); border-top: 0; background: var(--surface-raised); }
details.mmore[open] > summary { border-bottom: 0; }
details.mmore[open] table.mtbl { border-top: 0; }

@media (max-width: 720px) {
  table.prices tr:has(details.members[open]) + tr.members-row { display: block; }
  table.prices tr.members-row { display: none; margin: 0 0 var(--space-3); padding: 0; background: none; border: 0; }
  table.prices tr.members-row > td { display: block; padding: 0 0 var(--space-2) var(--space-2); background: none; border-left: 3px solid var(--line-strong); }
  .mgroups { gap: var(--space-2); }
  table.mtbl, table.mtbl tbody, table.mtbl colgroup { display: block; border: 0; background: none; }
  table.mtbl colgroup, table.mtbl thead { display: none; }
  table.mtbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-2); grid-template-areas: "name name" "price kg" "pack links"; padding: 10px 12px; margin: var(--space-1) 0 0; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 0; }
  table.mtbl td:first-child { padding-left: 0; }
  table.mtbl td { display: block; padding: 0; border: 0; min-width: 0; font-size: 14px; }
  table.mtbl td.m-name { grid-area: name; margin-bottom: var(--space-1); }
  table.mtbl td.m-name a { font-weight: 600; }
  table.mtbl td.m-pack { grid-area: pack; color: var(--ink-muted); text-align: left; }
  table.mtbl td.m-price { grid-area: price; font-weight: 600; text-align: left; }
  table.mtbl td.m-price .orig { display: inline; margin-left: 4px; font-weight: 400; }
  table.mtbl td.m-kg { grid-area: kg; align-self: center; text-align: right; font-size: 20px; line-height: 24px; white-space: nowrap; }
  table.mtbl td.m-links { grid-area: links; text-align: right; white-space: nowrap; }
  table.mtbl td.m-links .ext { display: inline-flex; min-height: 40px; align-items: center; margin: -8px 0; }
  details.mmore > summary { display: flex; align-items: center; min-height: 40px; margin-top: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius); }
  details.mmore[open] > summary { border-bottom: 1px solid var(--line); }
}

/* ------------------------------------------------------------ "Show more" buttons and paging */
.morebtn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent;
  color: var(--ink); font-weight: 600; font-size: 14px; line-height: 20px; text-decoration: none; cursor: pointer;
}
.morebtn:hover { border-color: var(--spool); color: var(--spool); }
.morebtn:focus-visible { outline: 2px solid var(--spool); outline-offset: 2px; }
tr.more-row > td { text-align: center; padding: var(--space-3); border-bottom: 0; }
.mshopmore { text-align: left; }
.pager { margin: var(--space-3) 0 0; }
@media (max-width: 720px) {
  table.prices tr.more-row { display: block; margin: 0; padding: 0; background: none; border: 0; }
  table.prices tr.more-row > td { padding: var(--space-2) 0; }
  tr.more-row .morebtn { display: flex; width: 100%; }
  .mshopmore .morebtn { display: flex; width: 100%; }
}

/* ------------------------------------------------------------ sortable column headers */
th.sortable { padding: 0; }
th.sortable > a {
  display: flex; align-items: baseline; gap: 4px; padding: 8px 14px; color: inherit; text-decoration: none; white-space: nowrap;
}
th.sortable:first-child > a { padding-left: 0; }
th.sortable.num > a { justify-content: flex-end; }
th.sortable .arr { color: var(--line-strong); font-weight: 400; font-size: 12px; }
th.sortable > a:hover .arr { color: var(--ink-muted); }
th.sortable > a:hover { text-decoration: underline; text-decoration-color: var(--line); }
th[aria-sort] > a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--spool); }
th[aria-sort] .arr { color: var(--ink); }

/* ------------------------------------------------------------ overview layout on narrow screens */
@media (max-width: 900px) {
  .overview { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .side { position: static; max-height: none; overflow: visible; padding: 0; }
  .fdetails > summary {
    display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 12px;
    cursor: pointer; list-style: none; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-raised);
  }
  .fdetails > summary::-webkit-details-marker { display: none; }
  .ftitle { font-weight: 600; }
  .fsum { flex: 1; min-width: 0; color: var(--ink-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fbody { padding: var(--space-3) 4px var(--space-1); }
  .results { display: flex; flex-direction: column; }
}
@media (max-width: 720px) {
  .overview { display: flex; flex-direction: column; align-items: stretch; }
  .sortsel { flex: 1 0 100%; }
  .sortsel select { flex: 1; min-height: 40px; }
  .results { display: contents; }
  .search { order: -1; }
  .reshead { margin-top: var(--space-2); }
  .sortsel .label { display: none; }
}

/* ------------------------------------------------------------ price list: every offer is its own card */
.foot { background: var(--surface-raised); }
.cards-frame { border-top: 0; }
table.prices { border-collapse: separate; border-spacing: 0 10px; margin-top: -10px; }
table.prices thead th { border-bottom: 0; padding-bottom: 0; }
table.prices > tbody > tr > td {
  background: var(--surface-raised); padding: 16px;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
table.prices > tbody > tr > td:first-child { border-left: 1px solid var(--line-strong); border-radius: 8px 0 0 8px; padding-left: 16px; }
table.prices > tbody > tr > td:last-child { border-right: 1px solid var(--line-strong); border-radius: 0 8px 8px 0; padding-right: 16px; }
table.prices > tbody > tr:not(.members-row):not(.more-row):hover > td { background: var(--surface-raised); border-color: var(--ink-muted); }
table.prices > tbody > tr.cheapest > td, table.prices > tbody > tr.cheapest:hover > td { background: var(--cheapest-tint); border-color: var(--cheapest); }
table.prices th.sortable:first-child > a { padding-left: 16px; }
table.prices th.sortable:last-child > a { padding-right: 16px; }
/* an opened family: its offers hang under the card as one piece */
table.prices > tbody > tr:has(details.members[open]) > td { border-bottom-color: transparent; }
table.prices > tbody > tr:has(details.members[open]) > td:first-child { border-bottom-left-radius: 0; }
table.prices > tbody > tr:has(details.members[open]) > td:last-child { border-bottom-right-radius: 0; }
table.prices > tbody > tr.members-row > td {
  background: var(--surface-raised); border-top: 0; border-radius: 0 0 8px 8px; padding: 0 16px 16px 84px;
  position: relative; top: -11px;
}
table.prices > tbody > tr.members-row > td::before { content: ""; display: block; border-top: 1px dashed var(--line-strong); margin: 0 0 var(--space-3) -68px; }
table.prices > tbody > tr.more-row > td { background: none; border: 0; padding: var(--space-3) 0; }

@media (max-width: 720px) {
  table.prices { border-spacing: 0; margin-top: 0; }
  table.prices tr {
    padding: 14px; margin: 0 0 10px; background: var(--surface-raised);
    border: 1px solid var(--line-strong); border-radius: 8px;
  }
  table.prices > tbody > tr > td, table.prices > tbody > tr > td:first-child, table.prices > tbody > tr > td:last-child,
  table.prices > tbody > tr:not(.members-row):not(.more-row):hover > td,
  table.prices > tbody > tr.cheapest > td, table.prices > tbody > tr.cheapest:hover > td { border: 0; border-radius: 0; padding: 0; background: none; }
  table.prices tr.cheapest { background: var(--cheapest-tint); border-color: var(--cheapest); }
  table.prices tr:has(details.members[open]) { border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: 0; }
  table.prices > tbody > tr.members-row { margin: 0 0 10px; padding: 0 10px 12px; background: var(--surface-raised); border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 8px 8px; }
  table.prices > tbody > tr.members-row > td { position: static; padding: 0 0 0 10px; border-left: 3px solid var(--line-strong); }
  table.prices > tbody > tr.members-row > td::before { display: none; }
  table.prices tr.more-row { border: 0; background: none; padding: 0; }
}

/* ------------------------------------------------------------ bigger listing cards */
table.prices > tbody > tr > td { padding-top: 22px; padding-bottom: 22px; }
table.prices > tbody > tr > td:first-child { padding-left: 22px; }
table.prices > tbody > tr > td:last-child { padding-right: 22px; }
table.prices th.sortable:first-child > a { padding-left: 22px; }
table.prices th.sortable:last-child > a { padding-right: 22px; }
table.prices .prodcell { gap: 18px; }
table.prices .thumb { width: 88px; height: 88px; border-radius: 8px; }
table.prices td.prod .pname { font-size: 17px; line-height: 24px; }
table.prices .prodtext .meta { margin-top: 5px; font-size: 14px; line-height: 20px; }
table.prices .prodtext .meta .sw { width: 14px; height: 14px; }
table.prices .prodtext .tags { margin-top: 8px; }
table.prices .prodtext .tag { font-size: 13px; line-height: 20px; padding: 1px 8px; }
table.prices details.variants { margin-top: 8px; }
table.prices details.variants summary { font-size: 14px; }
table.prices td.num { font-size: 16px; line-height: 24px; }
table.prices td.num .sub { font-size: 13px; }
table.prices td.kg { font-size: 24px; line-height: 30px; }
table.prices tr.cheapest td.kg::before { font-size: 12px; }
table.prices td.kg .chg { font-size: 13px; }
table.prices > tbody > tr.members-row > td { padding-left: 128px; padding-right: 22px; }
table.prices > tbody > tr.members-row > td::before { margin-left: -106px; }

@media (max-width: 720px) {
  table.prices tr { padding: 18px; }
  table.prices .prodcell { gap: 14px; }
  table.prices .thumb { width: 76px; height: 76px; }
  table.prices td.prod .pname { font-size: 17px; line-height: 24px; }
  table.prices td.price { font-size: 17px; margin-top: 14px; }
  table.prices td.kg { font-size: 30px; line-height: 34px; margin-top: 14px; }
  table.prices > tbody > tr > td, table.prices > tbody > tr > td:first-child, table.prices > tbody > tr > td:last-child { padding: 0; }
  table.prices > tbody > tr.members-row > td { padding: 0 0 0 10px; }
}

/* ------------------------------------------------------------ every listing card has the same height */
table.prices > tbody > tr:not(.members-row):not(.more-row) > td:not(.empty) { height: 164px; }
table.prices .prodtext .tags { height: 24px; line-height: 24px; }
table.prices .prodtext .tags .mini { line-height: 20px; }
table.prices details.variants:not([open]) > summary { line-height: 20px; }
table.prices .prodtext { overflow: hidden; }
table.prices td.prod .pname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.prices .prodtext .meta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
table.prices .prodtext .meta > * { flex: none; }
table.prices .prodtext .meta .cnames { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
table.prices .prodtext .tags { white-space: nowrap; overflow: hidden; }
table.prices .prodtext .tags:not(:has(.tag)) { display: block; visibility: hidden; height: 0; margin: 0; }
@media (max-width: 720px) {
  table.prices > tbody > tr:not(.members-row):not(.more-row) > td:not(.empty) { height: auto; }
  table.prices tr:not(.members-row):not(.more-row) { min-height: 280px; grid-template-rows: 1fr auto auto; }
  table.prices td.prod .pname { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ------------------------------------------------------------ compact listing cards (overrides the sizes above) */
table.prices > tbody > tr > td { padding-top: 14px; padding-bottom: 14px; }
table.prices > tbody > tr > td:first-child, table.prices th.sortable:first-child > a { padding-left: 18px; }
table.prices > tbody > tr > td:last-child, table.prices th.sortable:last-child > a { padding-right: 18px; }
table.prices > tbody > tr:not(.members-row):not(.more-row) > td:not(.empty) { height: 104px; }
table.prices .prodcell { gap: 16px; align-items: center; }
table.prices .thumb { width: 72px; height: 72px; }
table.prices td.prod .pname { font-size: 16px; line-height: 22px; }
table.prices .prodtext .meta { margin-top: 3px; font-size: 14px; line-height: 20px; }
table.prices .pline { display: flex; align-items: center; gap: 4px 12px; margin-top: 6px; min-height: 22px; white-space: nowrap; overflow: hidden; }
table.prices .pline:not(:has(.tag)):not(:has(details)) { display: none; }
table.prices .pline details.variants { margin: 0; flex: none; }
table.prices .pline details.variants[open] { flex: 1 0 100%; white-space: normal; }
table.prices .pline details.variants summary { font-size: 13px; line-height: 22px; }
table.prices .pline .tags { display: inline-flex; gap: 4px; margin: 0; height: auto; line-height: normal; overflow: hidden; }
table.prices .pline .tags:not(:has(.tag)) { display: none; }
table.prices .pline .tag { margin: 0; font-size: 12px; line-height: 20px; padding: 0 7px; }
.tag.hsq { color: var(--ink-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
table.prices td.num { font-size: 15px; line-height: 22px; }
table.prices td.kg { font-size: 22px; line-height: 28px; }
table.prices > tbody > tr.members-row > td { padding-left: 106px; padding-right: 18px; }
table.prices > tbody > tr.members-row > td::before { margin-left: -88px; }

@media (max-width: 720px) {
  table.prices tr { padding: 14px; }
  table.prices tr:not(.members-row):not(.more-row) { min-height: 0; grid-template-rows: auto auto auto; }
  table.prices > tbody > tr:not(.members-row):not(.more-row) > td:not(.empty) { height: auto; }
  table.prices .prodcell { align-items: flex-start; gap: 12px; }
  table.prices .thumb { width: 64px; height: 64px; }
  table.prices td.price { font-size: 16px; margin-top: 10px; }
  table.prices td.kg { font-size: 26px; line-height: 30px; margin-top: 10px; }
  table.prices > tbody > tr > td, table.prices > tbody > tr > td:first-child, table.prices > tbody > tr > td:last-child { padding: 0; }
  table.prices > tbody > tr.members-row > td { padding: 0 0 0 10px; }
  table.prices .pline { flex-wrap: wrap; white-space: normal; }
}

/* ------------------------------------------------------------ history page filter bar: pick-one segments and on/off ticks */
.segctl { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface-raised); }
.segctl > a, .segctl .chip span {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: 0;
  font-size: 14px; line-height: 20px; color: var(--ink); background: transparent; text-decoration: none; white-space: nowrap;
}
.segctl > * + * { border-left: 1px solid var(--line-strong); }
.segctl > a[aria-current="true"], .segctl .chip input:checked + span { background: var(--spool); color: var(--on-spool); font-weight: 600; }
.segctl .chip input:focus-visible + span { outline-offset: -3px; outline-color: var(--on-spool); }
fieldset.ticks { gap: var(--space-1) var(--space-3); }
.tick { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--spool); cursor: pointer; }
.filter-bar .fbody { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) 0; padding: 0; }
.filter-bar .fdetails .fbody > * { padding: 0 var(--space-3); border-left: 1px solid var(--line); }
.filter-bar .fdetails .fbody > :first-child { padding-left: 0; border-left: 0; }
@media (max-width: 900px) {
  .filter-bar .fbody { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--space-3); }
  .filter-bar .fdetails .fbody > *, .filter-bar .fdetails .fbody > :first-child { padding: 0; border-left: 0; }
  .segctl { display: flex; }
  .segctl > a, .segctl > .chip { flex: 1 1 0; }
  .segctl > a, .segctl .chip span { min-height: 42px; justify-content: center; padding: 0 8px; width: 100%; }
  fieldset.ticks { flex-direction: column; align-items: flex-start; gap: 0; }
  .tick { min-height: 40px; font-size: 15px; }
  .tick input { width: 20px; height: 20px; }
}

/* the product column takes what is left; long names and colour rows are cut with an ellipsis instead of widening the table */
@media (min-width: 721px) {
  table.prices { table-layout: fixed; }
  table.prices th.prod { width: auto; }
  table.prices th.num { width: 8.5em; }
  table.prices td.prod { min-width: 0; }
}

/* ------------------------------------------------------------ breathing room under the header on every page */
main { padding-top: 40px; }
main h1, .prose h1 { margin-top: 0; }
@media (max-width: 720px) {
  main { padding-top: 24px; }
  main h1, .prose h1 { margin-top: 0; }
}

/* ------------------------------------------------------------ coupons page */
.cpgroups { display: grid; gap: var(--space-3); max-width: 880px; margin-top: var(--space-3); }
.cpshop { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 8px; padding: 16px 20px; }
.cpshop-name { margin: 0 0 var(--space-2); font-size: 18px; line-height: 24px; }
.cpshop-name a { color: var(--ink); }
.cplist { list-style: none; margin: 0; padding: 0; }
.cp { display: flex; align-items: center; gap: var(--space-3); padding: 12px 0; border-top: 1px solid var(--line); }
.cp:first-child { border-top: 0; padding-top: 4px; }
.cpmain { flex: 1; min-width: 0; }
.cptitle { font-weight: 600; font-size: 16px; line-height: 22px; }
.cpmeta { font-size: 13px; line-height: 18px; color: var(--ink-muted); margin-top: 2px; }
.cpcode { flex: none; display: inline-flex; align-items: stretch; padding: 0; border: 1.5px dashed var(--spool); border-radius: var(--radius); background: var(--spool-tint); color: var(--spool); cursor: pointer; font: inherit; overflow: hidden; }
.cpcode-text { padding: 8px 14px; font: 700 16px/22px var(--font-head); letter-spacing: 0.04em; }
.cpcopy { display: inline-flex; align-items: center; padding: 0 12px; background: var(--spool); color: var(--on-spool); font-size: 13px; font-weight: 600; }
.cpcode:hover .cpcopy { filter: brightness(1.1); }
.cpcode.copied { border-color: var(--cheapest); background: var(--cheapest-tint); color: var(--cheapest); }
.cpcode.copied .cpcopy { background: var(--cheapest); }
.cpempty, .cpfoot { margin-top: var(--space-3); }
.cpacts { display: inline-flex; gap: 6px; margin-top: 6px; }
.cpacts form { margin: 0; }
.cpadmin { margin-top: var(--space-4); max-width: 880px; }
.cpform { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 8px; padding: 16px 20px; }
.cpform input[type=text], .cpform input[type=url], .cpform input[type=date], .cpform select { font: inherit; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-raised); color: var(--ink); width: 100%; }
.cpform-actions { display: flex; align-items: flex-end; }
.cpadmin-list { list-style: none; margin: 0; padding: 0; background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: 8px; }
.cpadmin-list li { padding: 12px 16px; border-top: 1px solid var(--line); }
.cpadmin-list li:first-child { border-top: 0; }
.cpctx { margin-top: 4px; font-style: italic; }
@media (max-width: 720px) {
  .cpshop { padding: 14px; }
  .cp { flex-direction: column; align-items: stretch; gap: 10px; }
  .cpcode { justify-content: space-between; }
  .cpcode-text { font-size: 18px; }
}
