:root {
  /* the logo's green and gold; --bg is overridden from data/theme.json (Kit Manager, Site look) */
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #1f2a24;
  --muted: #5b675f;
  --line: #e1e4de;
  --field-line: #c6ccc4;
  --image-bg: #f3f4f1;
  --shadow: 0 1px 2px rgba(25, 45, 32, 0.07), 0 6px 18px rgba(25, 45, 32, 0.07);
  --shadow-up: 0 2px 4px rgba(25, 45, 32, 0.09), 0 12px 28px rgba(25, 45, 32, 0.14);
  --accent: #2a5c3b;
  --accent-dark: #1f4a2f;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1ec;
  --gold: #c79846;
  --gold-ink: #85601c;
  --gold-soft: #f8f1e3;
  --gold-line: #ead9b4;
  --dark: #1c3324;
  --focus: #1f6feb;
  --radius: 10px;
  --wrap: 1180px;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0.4em 0 0.3em; }
h2 { font-size: 1.5rem; margin: 1.6em 0 0.6em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
/* only on test deploys (build.py staging_banner) */
.staging-banner { background: #9a3412; color: #fff; text-align: center; font-size: .85rem; padding: 5px 16px; }
.staging-banner a { color: inherit; text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 0 18px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); font: 600 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); filter: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 80px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  font: 700 1.7rem/1.05 var(--serif); margin-right: auto; }
.brand img { flex: none; }
@media (max-width: 640px) { .brand { font-size: 1.3rem; gap: 8px; } .brand img { width: 44px; height: 44px; } }
.brand em { font-style: italic; color: var(--accent); font-weight: 400; }
.nav-toggle { display: none; }
.site-nav { display: flex; align-items: center; gap: 12px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav li a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav li a:hover { background: var(--accent-soft); }
.site-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.basket { margin: 0; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  font: 600 0.85rem var(--sans); color: var(--ink); background: var(--surface); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: " \25BE"; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; flex-direction: column; gap: 0; min-width: 11rem;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-up); }
.lang-menu li a { padding: 8px 10px; white-space: nowrap; }
.lang-menu a[aria-current] { box-shadow: none; font-weight: 700; }
@media (max-width: 860px) {
  .header-inner { padding-bottom: 2px; }  /* the menu button wraps to its own row and would touch the header's edge */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line);
    border-radius: 999px; background: var(--surface); font: 600 0.95rem var(--sans); color: var(--ink); cursor: pointer; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .site-nav.open { display: flex; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; }
  .site-nav ul { flex-direction: column; }
  .site-nav li a { padding: 12px 16px; }
  .site-nav .country-btn { display: block; box-sizing: border-box; width: 100%; min-height: 44px; text-align: center; }
  .site-nav .lang-menu summary, .basket .btn { display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; width: 100%; min-height: 44px; text-align: center; }
  .site-nav .country-btn[hidden] { display: none; }
  .basket .btn { width: 100%; }
  .lang-menu ul { position: static; box-shadow: none; margin-top: 6px; }
}

/* hero */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 32px 20px 40px; }
.hero-img img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(25, 45, 32, 0.18); max-height: 520px; width: auto; margin: 0 auto; }
@media (max-width: 760px) { .hero-inner { grid-template-columns: 1fr; } }

/* range tiles */
.tiles { list-style: none; padding: 0; margin: 0 0 48px; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.tile a:hover { border-color: var(--accent); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--image-bg); padding: 8px; }
.tile-title { font: 600 1.1rem var(--serif); padding: 10px 14px 0; }
.tile-count { color: var(--muted); font-size: 0.9rem; padding: 0 14px 12px; }

/* kit cards */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid > .trimmed { display: none; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--image-bg); padding: 8px; }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; flex: 1; }
.card-range { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.card-title { font: 600 1.08rem/1.3 var(--serif); }
.card-facts { font-size: 0.88rem; color: var(--muted); }
.card-price { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 0.92rem; }
.card[hidden] { display: none; }
/* a tile for a kit in several colours: the colours listed under it; choosing one changes the picture */
.card-group { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.card-group:hover { border-color: var(--accent); }
.card-group > a { border: 0; border-radius: 0; flex: 1; transform: none; }
.card-group > a:hover { transform: none; }
.card-colours { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.card-colours .colour-opt { font: inherit; font-size: 0.82rem; cursor: pointer; padding: 2px 9px 2px 4px; gap: 5px; }
.card-colours .colour-opt .swatch { width: 14px; height: 14px; }

/* shop */
.shop { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; margin-bottom: 48px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; }
.filters h2 { margin: 0; font-size: 1.15rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-toggle { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; font-weight: 600; font-size: 0.92rem; border: 0; padding: 0; }
.field legend { padding: 0; margin-bottom: 4px; }
.field label { font-weight: 400; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.field input[type=search], .field input[type=email], .field input[type=tel], .field input:not([type]), .field select, .field textarea {
  font: 400 1rem var(--sans); padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.price label { display: inline-flex; }
.price input { width: 70px; font: 1rem var(--sans); padding: 6px 8px; border: 1px solid var(--field-line); border-radius: 8px; }
.filters .btn { margin-top: 16px; width: 100%; }
.count { margin: 0 0 12px; color: var(--muted); }
.empty { padding: 32px; text-align: center; background: var(--surface); border-radius: var(--radius); }
@media (max-width: 860px) {
  .shop { grid-template-columns: 1fr; }
  .filters { position: static; }
  .filters-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font: 600 0.9rem var(--sans); }
  .js .filter-fields { display: none; }
  .js .filter-fields.open { display: block; }
}

/* kit page */
.crumbs { font-size: 0.9rem; color: var(--muted); margin-top: 18px; }
.crumbs a { color: var(--muted); }
.kit { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .kit { grid-template-columns: 1fr; } }
.gallery #gallery-main { width: 100%; max-height: 78vh; object-fit: contain; background: var(--image-bg); border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumbs button { border: 2px solid var(--line); border-radius: 8px; background: var(--surface); padding: 4px; cursor: pointer; width: 110px; font: 0.8rem var(--sans); color: var(--muted); }
.gallery-thumbs button[aria-pressed=true] { border-color: var(--accent); color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 70px; object-fit: contain; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: var(--muted); margin: 8px 0 0; }
.credit { font-style: italic; color: var(--muted); }
.colour-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.colour-h { font-weight: 600; margin-right: 2px; }
.colour-opt { display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 6px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.colour-opt:hover { border-color: var(--accent); }
.colour-opt[aria-current=true] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.colour-opt .swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.buy-box { display: grid; gap: 10px; margin: 18px 0 8px; }
.buy { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.buy-label { font-weight: 600; }
.buy-price { font: 600 1.25rem var(--serif); }
.buy .fabric { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.buy .fabric select { flex: 1; max-width: 22rem; padding: 6px 8px; font: inherit; border: 1px solid var(--field-line);
  border-radius: 6px; background: var(--surface); color: var(--ink); }
@media (max-width: 420px) { .buy { grid-template-columns: 1fr auto; } .buy .btn { grid-column: 1 / -1; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 20px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.threads, .related { margin-top: 24px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); vertical-align: middle; }
.related { margin-bottom: 48px; }

/* prose pages */
.prose { max-width: 760px; padding-bottom: 48px; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact-form .btn { margin-top: 8px; }
.contact-dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); background: var(--surface); }
.contact-dialog::backdrop { background: rgba(20, 34, 25, 0.45); }
.contact-dialog h2 { margin-top: 0; padding-right: 48px; }
.contact-dialog .contact { gap: 24px; }
.dialog-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.dialog-close .btn { font-size: 1.4rem; line-height: 1; padding: 4px 12px; }
.hidden-field { position: absolute; left: -9999px; }

/* footer */
.site-footer { background: var(--dark); color: #e6e9e3; margin-top: 40px; font-size: 0.92rem; }
.site-footer a { color: #e9d4a6; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 24px; padding: 32px 20px; }
.footer-links { list-style: none; padding: 0; margin: 0; line-height: 2; }
.brand-small { display: flex; align-items: center; gap: 10px; font: 700 1.35rem var(--serif); color: #fff; margin-top: 0; }
.brand-small img { background: #fbf8f0; border-radius: 10px; padding: 2px; }
.legal { color: #bfc8c0; }
.lang-list a[aria-current] { font-weight: 700; color: #fff; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* badges, PDF preview */
.badge { display: inline-block; font: 600 0.72rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.badge-options { background: var(--accent-soft, #efe3c2); color: var(--ink, #2a2a2a); }
.card-options { display: block; margin: 0.15rem 0; }
.badge-live { background: var(--accent); color: var(--accent-ink); }
.buy-pdf { border-style: dashed; }
.pdf-dialog { border: 0; border-radius: var(--radius); padding: 24px; max-width: 440px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.pdf-dialog::backdrop { background: rgba(20, 34, 25, 0.45); }
.pdf-dialog h2 { margin-top: 0; }

/* basket */
.basket-link { gap: 6px; }
.basket-total:not(:empty) { padding-left: 8px; border-left: 1px solid currentColor; }
.basket-link.bump { animation: bump 0.7s ease; }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.12); background: var(--accent); color: var(--accent-ink); } 100% { transform: scale(1); } }
.btn.is-added { background: var(--accent-dark); border-color: var(--accent-dark); }
.added-note { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 12px 16px; border-radius: var(--radius);
  background: #e6f4ea; border: 1px solid #1d6b3a; color: #14502a; font-size: 1rem; font-weight: 600; }
.added-note[hidden] { display: none; }
.added-note a { color: inherit; }
.added-note.flash { animation: flash 0.9s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(29, 107, 58, 0.6); } 100% { box-shadow: 0 0 0 12px rgba(29, 107, 58, 0); } }
@media (prefers-reduced-motion: reduce) { .basket-link.bump, .added-note.flash { animation: none; } }
.basket-page { margin-bottom: 48px; }
.basket-lines { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.basket-line { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.basket-line img { width: 64px; height: 64px; object-fit: contain; background: var(--image-bg); border-radius: 6px; }
.qty input { width: 64px; font: 1rem var(--sans); padding: 6px 8px; border: 1px solid var(--field-line); border-radius: 8px; }
.basket-summary { max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.basket-message { color: #9b1c1c; font-weight: 600; }
.basket-section { margin-bottom: 36px; }
.basket-section > h2 { margin-bottom: 4px; }
.basket-line-pdf { grid-template-columns: 64px 1fr auto; }
@media (max-width: 560px) { .basket-line { grid-template-columns: 56px 1fr; } .basket-line .qty, .basket-line .linkish { grid-column: 2; } }
.buy-pdf .buy-price { font: 0.9rem/1.3 var(--sans); }

/* thread families */
.families { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.families li { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.fam-name { font-weight: 600; }
.fam-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.fam-dots .swatch { width: 18px; height: 18px; }
.fam-meta { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
@media (max-width: 560px) { .families li { grid-template-columns: 1fr auto; } .fam-dots { grid-column: 1 / -1; grid-row: 2; } }

/* where we sell: country button, notice bar, hidden options */
[data-sell][hidden], .card[hidden], .geo-na[hidden] { display: none !important; }
.card-price .sep::before { content: " \00b7\00a0"; font-weight: 400; }  /* a plain space after an escape only ends it */
.country-btn { font: inherit; font-size: 0.92rem; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.country-btn:hover { background: var(--accent-soft); }
.country-btn[hidden] { display: none; }
.geo-bar { background: var(--gold-soft); border-bottom: 1px solid var(--gold-line); font-size: 0.95rem; }
.geo-bar[hidden] { display: none; }
.geo-bar-inner { padding-top: 8px; padding-bottom: 8px; }
.geo-bar p { margin: 0; padding: 2px 0; }
.geo-bar p[hidden] { display: none; }
.geo-bar .btn-small { min-height: 32px; padding: 2px 12px; margin-left: 4px; }
.geo-na { margin: 0; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-weight: 600; }
.country-dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
.country-dialog::backdrop { background: rgba(20, 34, 25, 0.45); }
.country-dialog h2 { margin-top: 0; }
.country-dialog select { width: 100%; }
.basket-dest { max-width: 420px; margin-bottom: 20px; }
.basket-dest .basket-message { margin: 8px 0 0; }
.basket-line-na { border-color: #9b1c1c; }
.basket-line-na img { opacity: 0.55; }
.line-na { color: #9b1c1c; }
.basket-summary .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* depth: shadows on white cards; a gold line on the header, like the needle in the logo */
.site-header { background: #fff; border-top: 4px solid var(--gold); box-shadow: 0 2px 12px rgba(25, 45, 32, 0.08); border-bottom-color: transparent; }
.btn { background: linear-gradient(180deg, #33704a, var(--accent)); box-shadow: 0 2px 6px rgba(42, 92, 59, 0.28); transition: box-shadow .15s, transform .15s, filter .15s; }
.btn:hover { box-shadow: 0 4px 12px rgba(42, 92, 59, 0.38); transform: translateY(-1px); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { box-shadow: none; transform: none; }
.btn.is-added { background: var(--accent-dark); }
.hero { background: linear-gradient(135deg, #fff 0, #f4f8f4 55%, #f8f2e5 100%); border-bottom: 0; box-shadow: 0 6px 20px rgba(25, 45, 32, 0.06); }
.card a, .tile a, .card-group { box-shadow: var(--shadow); border-color: transparent; border-radius: 14px; }
.card a:hover, .tile a:hover, .card-group:hover { box-shadow: var(--shadow-up); border-color: transparent; }
.card img, .tile img { background: linear-gradient(160deg, #fff, var(--image-bg)); }
.basket-summary, .basket-line { box-shadow: var(--shadow); border-color: transparent; background: #fff; }
.gallery #gallery-main { box-shadow: var(--shadow); background: #fff; }
.site-footer { background: linear-gradient(180deg, #24402d, var(--dark)); }
.fact-notes { list-style: none; margin: 0; padding: 0; }

/* the add buttons in the buy box: one size, one width */
.buy .btn { font-size: 0.95rem; min-width: 13rem; padding: 0 16px; white-space: normal; text-align: center; }
@media (max-width: 420px) { .buy .btn { min-width: 0; } }
.buy { grid-template-columns: 6rem 1fr auto; }
@media (max-width: 420px) { .buy { grid-template-columns: 1fr auto; } }
.buy .btn { min-height: 0; height: 34px; white-space: nowrap; }

.build-id { margin: 8px 0 0; font-size: 0.62rem; opacity: 0.35; }
/* a tile with colour options is one box: the picture link inside it takes no shadow or corners of its own */
.card-group > a, .card-group > a:hover { box-shadow: none; border-radius: 0; border: 0; }

/* cart page: the lines on the left, the totals and payment on the right */
.basket-section { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; }
.basket-section[hidden] { display: none; }
.basket-section > h2, .basket-section > p, .basket-section > ul { grid-column: 1; }
.basket-section > .basket-summary { grid-column: 2; grid-row: 1 / span 3; max-width: none; position: sticky; top: 96px; }
@media (max-width: 900px) {
  .basket-section { grid-template-columns: minmax(0, 1fr); }
  .basket-section > .basket-summary { grid-column: 1; grid-row: auto; position: static; }
}
.basket-summary > .field:first-child { margin-top: 0; margin-bottom: 8px; }
.basket-dest:has(#geo-message[hidden]) { margin: 0; }

/* cart page: kits and PDF charts are two separate panels, each with its own colour */
.basket-section { --sect: var(--accent); --sect-soft: var(--accent-soft); background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  border-top: 6px solid var(--sect); padding: 22px 24px 24px; margin-bottom: 28px; }
#pdf-section { --sect: var(--gold-ink); --sect-soft: var(--gold-soft); }
.basket-section > h2 { color: var(--sect); margin-top: 0; }
.basket-section .basket-line { background: #fff; box-shadow: none; border: 1px solid var(--line); }
.basket-section .basket-summary { background: var(--sect-soft); box-shadow: none; border: 0; }
#pdf-section .btn { background: linear-gradient(180deg, #98702a, var(--sect)); border-color: var(--sect); box-shadow: 0 2px 6px rgba(133, 96, 28, 0.3); }
@media (max-width: 560px) { .basket-section { padding: 16px; } }

/* coloured panels: kits and filters in the logo's green, PDF charts in its gold */
.buy, .filters, .contact-form, .empty { background: #f2f7f3; border: 1px solid #d5e3d9; box-shadow: none; }
.buy-pdf { background: var(--gold-soft); border-color: var(--gold-line); }
.basket-section { background: #f7faf7; }
#pdf-section { background: #fcf8ef; }
.basket-section .basket-line { background: #fff; box-shadow: none; }
.basket-section .basket-summary { background: var(--sect-soft); box-shadow: none; }

/* the Payhip block matches the PayPal one: a heading line, the totals, then one full-width pill button */
.basket-summary .pay-head { margin: 0 0 4px; }
.basket-summary .pay-head + .muted { margin: 0 0 8px; }
.btn-pay { width: 100%; min-height: 48px; font-size: 1.05rem; }

/* "What's included", closed under the kit and PDF rows of the buy box */
.includes { margin: 6px 0 12px; font-size: 0.92rem; }
.includes summary { cursor: pointer; color: var(--accent); font-weight: 600; width: max-content; }
.includes > :not(summary) { margin: 6px 0 0; }
.includes ul { padding-left: 1.2em; }
.includes li { margin: 2px 0; }

/* home page carousel: slides share one grid cell so the box keeps the tallest slide's size */
.hero-carousel { position: relative; display: grid; justify-items: center; height: 340px; min-width: 0; }
.hero-slide { grid-area: 1 / 1; align-self: center; justify-self: center; position: relative; display: block; max-width: 100%; max-height: 100%; opacity: 0; visibility: hidden; transition: opacity 1.2s, visibility 1.2s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-carousel .hero-slide img { display: block; width: auto; height: auto; max-width: 100%; max-height: 340px; margin: 0; }
.hero-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #fff;
  background: rgba(25, 45, 32, 0.78); border-radius: 0 0 var(--radius) var(--radius); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.hero-slide:hover .hero-info, .hero-slide:focus-visible .hero-info { opacity: 1; transform: none; }
.hero-name { font-weight: 600; }
.hero-info .card-price { margin: 0; padding: 0; white-space: nowrap; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.6rem; line-height: 1;
  color: #fff; background: rgba(25, 45, 32, 0.55); opacity: 0; transition: opacity .2s, background .2s; }
.hero-prev { left: 8px; }
.hero-next { right: 8px; }
.hero-carousel:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { background: rgba(25, 45, 32, 0.85); }
@media (hover: none) { .hero-nav { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-slide, .hero-info { transition: none; } }

/* finished size: hover (or focus) shows the size on the other fabrics */
.size-tip { position: relative; cursor: help; border-bottom: 1px dotted var(--muted); }
.size-pop { position: absolute; right: 0; top: 100%; z-index: 5; display: none; flex-direction: column; gap: 4px; margin-top: 6px; padding: 10px 14px; white-space: nowrap;
  font-weight: 400; font-size: 0.92rem; color: #fff; background: rgba(25, 45, 32, 0.95); border-radius: 8px; box-shadow: 0 6px 18px rgba(25, 45, 32, 0.25); }
.size-tip:hover .size-pop, .size-tip:focus .size-pop { display: flex; }
@media (max-width: 480px) { .size-pop { white-space: normal; min-width: 220px; } }

/* Google Pay under the PayPal buttons, same width */
.googlepay { margin-top: 0.6rem; min-height: 0; }
.googlepay:empty { display: none; }
.googlepay > button, .googlepay > div { width: 100%; }

/* "New" badge on tiles, and the home page's strip of new designs */
.badge-new { background: var(--accent); color: var(--accent-ink); }
.new-designs { margin-top: 2rem; }
