:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1c1b18;
  --muted: #6f6a60;
  --line: #e4dfd4;
  --accent: #2f5d3a;
  --accent-soft: #e8f0e9;
  --gold: #9a7b3f;
  --shadow: 0 1px 2px rgba(28, 27, 24, 0.05), 0 8px 24px rgba(28, 27, 24, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(16px, 4vw, 48px) 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.2px;
  margin: 0;
}
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.meta { font-size: 12.5px; color: var(--muted); text-align: right; }
.meta .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

main { padding: 22px clamp(16px, 4vw, 48px) 64px; }

/* The controls scroll away like any other block. They used to be sticky, and
   a sticky block taller than the viewport pins to the top and paints over
   everything that scrolls under it — the results were there, hidden behind
   the filters, on a phone first and then on a desk once the garment, colour
   and mill rows made the block tall. Only the slim view row below stays put. */
.controls {
  position: static;
  background: var(--bg);
  padding: 14px 0 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.searchwrap { margin-bottom: 14px; }
#q {
  width: 100%;
  padding: 15px 18px;
  font-size: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  outline: none;
}
#q:focus { border-color: var(--accent); }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.2px; }
.field select,
.field input {
  padding: 9px 11px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  outline: none;
}
.field select:focus,
.field input:focus { border-color: var(--accent); }

/* ── Fabrics view (one card per cloth) ──────────────────────────────────────── */
.clothcard .ccode { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.clothcard .stock { margin-top: 2px; }
.showmore {
  grid-column: 1 / -1; justify-self: center; margin: 10px 0 30px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid var(--accent); background: var(--card); color: var(--accent);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
.showmore:hover { background: var(--accent); color: #fff; }

/* ── Mill chips (logos), country chips (flags), weight scale ─────────────── */
.millrow { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; align-items: center; }
.millchip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all 0.12s ease; position: relative;
}
.millchip img { height: 24px; width: auto; max-width: 84px; object-fit: contain; display: block; }
.millchip .mname { white-space: nowrap; }
.millchip:hover:not([disabled]) { border-color: var(--accent); box-shadow: var(--shadow); }
.millchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.millchip.on::after { content: "✓"; font-size: 11px; font-weight: 700; margin-left: 2px; }
.millchip.soon { opacity: 0.45; cursor: default; }
.millchip.soon img { filter: grayscale(1); }
.millchip small { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
/* When some are on, the others step back so the selection reads at a glance. */
.millrow.has-on .millchip:not(.on):not(.soon) { opacity: 0.72; }
.millrow.has-on .millchip:not(.on):not(.soon):hover { opacity: 1; }

.countryfield { grid-column: span 2; }
.flagchips { display: flex; flex-wrap: wrap; gap: 6px; }
.flagchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font-size: 13px; cursor: pointer; transition: all 0.12s ease;
}
.flagchip .flag { font-size: 16px; line-height: 1; }
.flagchip:hover { border-color: var(--accent); }
.flagchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.weightfield { grid-column: span 2; min-width: 220px; }
.weightfield > span output { font-weight: 600; color: var(--ink); margin-left: 6px; }
.wrange { position: relative; height: 34px; padding-top: 12px; }
.wrange .wtrack { position: absolute; left: 8px; right: 8px; top: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.wrange .wfill { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; opacity: 0.85; }
.wrange input[type="range"] {
  position: absolute; left: 0; right: 0; top: 8px; width: 100%; height: 24px; margin: 0; padding: 0;
  background: none; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; outline: none;
}
.wrange input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 24px; }
.wrange input[type="range"]::-moz-range-track { background: transparent; height: 24px; }
.wrange input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
  width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.wrange input[type="range"]::-moz-range-thumb {
  pointer-events: auto; cursor: grab; width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.wrange input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; background: var(--accent-soft); }
.wrange input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrange .wticks { position: absolute; left: 8px; right: 8px; top: 30px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); pointer-events: none; }
.wrange.active .wticks { color: var(--accent); }
@media (max-width: 720px) { .countryfield, .weightfield { grid-column: 1 / -1; } }

.fibres { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Retail price row + the wardrobe project (signed in only) ─────────────── */
.pricerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 9px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.pricerow select { padding: 6px 10px; font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.pfield { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.pfield input { width: 92px; padding: 6px 9px; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.pnote { font-size: 12px; color: var(--muted); margin-left: auto; }
.msrp { font-size: 13px; color: var(--ink); }
.msrp b { font-variant-numeric: tabular-nums; }
.addto { margin-top: 6px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.addto:hover { background: var(--accent); color: #fff; }
.projectbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 11px 15px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; }
.projectbar b { font-weight: 600; }
.projectbar .explore { margin-left: auto; color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.projectbar .explore:hover { text-decoration: underline; }

/* The one thing that stays put while the results scroll: the level, the
   count and Reset. Two lines tall at most, so it can never cover the page. */
.viewrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.toggle button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
}
.toggle button.active { background: var(--ink); color: #fff; }
.resultcount { font-size: 13px; color: var(--muted); margin-right: auto; }
.reset {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
.reset:hover { border-color: var(--accent); color: var(--accent); }

.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card .cardbody { display: flex; flex-direction: column; gap: 10px; }
.card .cardtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card .cardtop .logo { max-height: 26px; max-width: 96px; width: auto; object-fit: contain; flex: 0 0 auto; }

.card .cover {
  margin: -18px -18px 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #efece6;
  border-radius: var(--radius) var(--radius) 0 0;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cover.swatch { aspect-ratio: 4 / 3; }

/* Fallback covers for Articles with no scraped swatch of their own — see
   UFF.coverFor. A card should never be a blank rectangle when the book it
   belongs to is photographed. */
.card .cover { position: relative; }
.card .cover.strip {
  aspect-ratio: 4 / 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  background: var(--line);
}
.card .cover.book img { object-fit: cover; }
.card .cover.flat { aspect-ratio: 4 / 3; }
.card .cover.none {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, #efece6, #efece6 8px, #eae6de 8px, #eae6de 16px);
}
.card .cover.none span {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}
.coverbadge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-weight: 600;
}
.card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  line-height: 1.15;
}
.card .mill { font-size: 12.5px; color: var(--gold); font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }
.card .sub { font-size: 13px; color: var(--muted); }
.card .desc { font-size: 13.5px; color: #44413a; }
.card .desc.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1eee7;
  color: #57534a;
}
.tag.fibre { background: var(--accent-soft); color: var(--accent); }
.tag.garment { background: #efeaf2; color: #5b4a6b; }
.tag.pat { background: #eef1f4; color: #495a6b; text-transform: capitalize; }
.tag.col { background: #f3efe9; color: #57534a; display: inline-flex; align-items: center; gap: 5px; text-transform: capitalize; }
.tag.col .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); display: inline-block; }
.tag.season { background: #eef1f4; color: #4a5663; }
.tag.season.current { background: #e6f3ea; color: #2f6f43; }
.tag.season.past { background: #f1eee9; color: #8a7f6f; }
.tag.spec { background: #eef0ee; color: #4c5a52; }

/* "Fetch similar" — card button + attribute picker modal */
.findsim {
  margin-top: 12px;
  align-self: flex-start;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.findsim:hover { border-color: var(--accent); }
.findsim:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.simcard {
  position: relative;
  width: min(520px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 30px clamp(20px, 4vw, 34px) 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.simcard h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 24px; margin: 0 34px 2px 0; line-height: 1.15; }
.simcard h3 em { font-style: italic; color: var(--accent); }
.simsub { font-size: 12.5px; color: var(--gold); font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; margin: 0 0 14px; }
.simq { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.simopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.simopt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.simopt:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.simopt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.simopt b { font-size: 14.5px; color: var(--ink); }
.simopt span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simopt.on { border-color: var(--accent); background: var(--accent-soft); }
.simopt.on b::before { content: "✓ "; color: var(--accent); }
.simfoot { display: flex; justify-content: flex-end; margin-top: 18px; }
.simgo {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.simgo:hover:not(:disabled) { transform: translateY(-1px); }
.simgo:disabled { opacity: 0.45; cursor: default; }
.simgo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Stock lights — one palette everywhere (cloth tile, article chip, bunch LED):
   green in stock · yellow low / partial · orange out / depleted · red discontinued · grey unknown */
:root {
  --led-green: #4a9a5e; --led-yellow: #d6a13a; --led-orange: #e07b2a; --led-red: #b4452f; --led-grey: #b8b2a6;
}
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.stock .sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--led-grey); display: inline-block; }
.stock.in-stock, .stock.active { color: var(--accent); }
.stock.in-stock .sdot, .stock.active .sdot { background: var(--led-green); }
.stock.low .sdot { background: var(--led-yellow); }
.stock.low { color: #97701f; }
.stock.out .sdot { background: var(--led-orange); }
.stock.out { color: #9a5a1e; }
.stock.discontinued .sdot { background: var(--led-red); }
.stock.discontinued { color: #9a4332; }

/* The LED itself: a bunch's / article's rolled-up light. */
.led { display: inline-flex; align-items: center; gap: 6px; }
.led i { width: 9px; height: 9px; border-radius: 50%; background: var(--led-grey); display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,0.7) inset; }
.led.green i { background: var(--led-green); }
.led.yellow i { background: var(--led-yellow); }
.led.orange i { background: var(--led-orange); }
.led.red i { background: var(--led-red); }
.tag.stocktag { display: inline-flex; align-items: center; gap: 6px; background: #f1efea; color: #4c5a52; }
.tag.stocktag.green { background: #e6f3ea; color: #2f6f43; }
.tag.stocktag.yellow { background: #f8f0dc; color: #7d5d17; }
.tag.stocktag.orange { background: #fbe9d9; color: #8a4a17; }
.tag.stocktag.red { background: #f6e3df; color: #8c3a2c; }
.quizbanner .led { margin: 0 2px 0 4px; vertical-align: middle; }
.refs > summary .led { margin-right: 2px; }
/* Per-cloth dot in the gallery tile. */
.cdot { width: 8px; height: 8px; border-radius: 50%; background: var(--led-grey); display: inline-block; margin-right: 5px; vertical-align: middle; flex: none; }
.cdot.in-stock { background: var(--led-green); }
.cdot.low { background: var(--led-yellow); }
.cdot.out { background: var(--led-orange); }
.cdot.discontinued { background: var(--led-red); }
.cloth.st-out img, .cloth.st-discontinued img { filter: saturate(0.6); opacity: 0.85; }

.price { display: flex; gap: 16px; align-items: baseline; margin-top: 2px; }
.price .big { font-size: 20px; font-weight: 600; }
.price .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.price .small { font-size: 14px; color: #44413a; }

.pricematrix { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.pricematrix th, .pricematrix td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.pricematrix th:first-child, .pricematrix td:first-child { text-align: left; color: var(--muted); }
.pricematrix thead th { color: var(--muted); font-weight: 600; }

details.more > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--accent);
  list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }

.empty { text-align: center; color: var(--muted); padding: 64px 16px; font-size: 16px; }

/* ── The journey strip ──────────────────────────────────────────────────────
   Three steps in one row, one card, numbered because the order is real. */
.journey {
  list-style: none; margin: 18px 0 8px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
  overflow: hidden;
}
.journey li + li { border-left: 1px solid var(--line); }
.journey a {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 14px 18px; color: var(--ink); text-decoration: none;
}
.journey a:hover { background: var(--accent-soft); }
.journey a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.journey .jn {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 19px;
  color: var(--gold); border: 1px solid var(--gold);
}
.journey .jt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.journey .jt b { font-weight: 600; font-size: 15px; }
.journey .jt small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.journey .jgo { margin-left: auto; font-weight: 600; color: var(--accent); }
@media (max-width: 860px) {
  .journey { grid-template-columns: 1fr; }
  .journey li + li { border-left: 0; border-top: 1px solid var(--line); }
}

/* The quiz lives inside the search bar: a shortcut into the finder, not a door of its own. */
.searchwrap { position: relative; }
.searchwrap #q { padding-right: 210px; }
.quizlink {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.quizlink:hover { background: var(--accent); color: #fff; }
@media (max-width: 640px) {
  .searchwrap #q { padding-right: 18px; }
  .quizlink { position: static; transform: none; margin-top: 8px; }
}

/* Houses with no books yet: a footnote after the chips, never a dead chip. */
.soonnote { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* Everything narrower than a mill, behind one disclosure. */
.morefilters { margin-bottom: 12px; }
.morefilters > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.morefilters > summary::-webkit-details-marker { display: none; }
.morefilters > summary::before { content: "▸"; color: var(--muted); font-size: 11px; }
.morefilters[open] > summary::before { content: "▾"; }
.morefilters > summary:hover { border-color: var(--accent); }
.morefilters .fcount {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.morefilters[open] > summary { margin-bottom: 12px; }
.morefilters .fibres { margin-bottom: 0; }

.quizbanner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
}
.quizbanner button {
  margin-left: auto;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
}
.fibrelbl { align-self: center; margin-right: 4px; font-size: 13px; color: var(--muted); }

/* Quiz overlay */
[hidden] { display: none !important; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.quizcard {
  position: relative;
  width: min(560px, 100%);
  background: var(--card);
  border-radius: 18px;
  padding: 30px clamp(20px, 4vw, 38px) 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.quizclose {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.quizprogress { display: flex; justify-content: center; margin-bottom: 14px; }
.quizprogress i {
  width: 30px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 3px;
  display: inline-block;
}
.quizprogress i.on { background: var(--accent); }
.quizcard h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin: 6px 0 4px;
}
.photoonly {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.photoonly:hover { border-color: var(--ink); color: var(--ink); }
.photoonly input { accent-color: var(--accent); margin: 0; cursor: pointer; }
.photoonly:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.quizsub {
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 auto 18px;
  max-width: 42ch;
}
.gpprice { color: var(--gold); font-weight: 600; font-size: 14px; margin: 3px 0 2px; }
.gpprice span { color: var(--muted); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.gpbadge { color: var(--gold); font-weight: 600; font-size: 12.5px; text-transform: none; letter-spacing: 0; }

.clothwrap { grid-column: 1 / -1; margin-bottom: 4px; }
.clothhead { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 12px; }
.clothgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.cloth { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.cloth img, .cloth .noimg { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--accent-soft); }
.cloth figcaption { padding: 7px 9px; display: flex; flex-direction: column; gap: 1px; }
.cloth figcaption b { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cloth figcaption span { font-size: 11px; color: var(--muted); }
.cloth figcaption .clothspec { font-size: 10.5px; color: var(--muted); opacity: 0.85; margin-top: 1px; }

.mcard.clickable { cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease; }
.mcard.clickable:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.mcard.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card.clickable { cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease; }
.card.clickable:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card.clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cardlink { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent); }

.quizopts { display: grid; gap: 10px; }
.quizopt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  font: inherit;
  font-size: 15.5px;
  text-align: left;
  transition: all 0.12s ease;
}
.quizopt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.quizopt .qi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.quizopt .qi svg { width: 21px; height: 21px; }
.quizopt:hover .qi { background: #fff; }
.quiznav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.quiznav button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.quizstepn { font-size: 12.5px; color: var(--muted); }

/* Admin + portal */
.loginwrap { display: flex; justify-content: center; padding: 60px 16px; }
.logincard {
  width: min(360px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.logincard h2 { font-family: "Cormorant Garamond", serif; font-size: 26px; margin: 0 0 6px; }
.logincard input, .logincard button { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }
.logincard button { background: var(--ink); color: #fff; border: 0; cursor: pointer; }
.loginerr { color: #b4452f; font-size: 13px; min-height: 16px; margin: 0; }

.adminnav { margin: 16px 0 18px; }
.adminnav .signout { margin-left: auto; color: var(--muted); }
.tab { animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.adminhint { font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.pricelist { display: flex; flex-direction: column; gap: 8px; }
.prow { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.prowhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; }
.prowhead:hover { background: #faf8f3; }
.prowhead .psub { display: block; font-size: 12.5px; color: var(--muted); }
.ptag { font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.pedit { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.pmatrix { border-collapse: collapse; }
.pmatrix th, .pmatrix td { padding: 4px 6px; }
.pmatrix th { font-size: 11px; color: var(--muted); text-transform: uppercase; text-align: center; }
.pmatrix td:first-child { color: var(--muted); font-size: 13px; }
.pmatrix input { width: 74px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; text-align: right; }

.formcard {
  max-width: 620px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.formcard .field.wide, .formcard button, .formcard .formmsg, .formcard .linkout, .formcard .garmentset { grid-column: 1 / -1; }
.formcard input, .formcard select, .formcard textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; width: 100%;
}
.formcard button { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 600; }
.garmentset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.garmentset legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.garmentchecks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.garmentchecks label { font-size: 14px; display: flex; align-items: center; gap: 5px; }
.formmsg { font-size: 13.5px; margin: 4px 0 0; min-height: 18px; }
.formmsg.ok { color: var(--accent); }
.formmsg.err { color: #b4452f; }
.linkout p { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.linkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1; }
.linkrow button { width: auto; padding: 10px 16px; }

/* Heritage page */
.topnav { display: flex; align-items: center; gap: 16px; }
.navlink { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.navlink:hover { text-decoration: underline; }
.heritageintro { max-width: 760px; margin: 20px 0 8px; }
.heritageintro p { font-size: 16px; color: #44413a; line-height: 1.55; }

.millgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.mcard {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mcard.soon { opacity: 0.9; }
.soonbadge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold, #9a7b3f);
  color: #fff;
}
.mlogo {
  height: 56px;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.mlogo img { max-height: 52px; max-width: 180px; width: auto; object-fit: contain; }
.mlogo .noLogo { font-family: "Cormorant Garamond", serif; font-size: 24px; }
.mcard h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 27px;
  margin: 0;
  line-height: 1.1;
}
.mtagline { font-size: 14px; color: var(--gold); font-style: italic; }
.mmeta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.mstory { font-size: 14.5px; color: #44413a; line-height: 1.5; margin: 6px 0 2px; }
.mfortes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.forte { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.mfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.mcount { font-size: 12.5px; color: var(--muted); }
.mlinks { display: flex; gap: 14px; }
.mfoot a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent); white-space: nowrap; }
.mfoot a:hover { text-decoration: underline; }
.mfoot .site { color: var(--muted); font-weight: 500; }

/* ── Weaves & Patterns ─────────────────────────────────────────────────────── */
.wfilters {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--line);
  margin: 16px 0 4px; padding: 12px 0 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.wfrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wtabs { flex: 0 0 auto; }
.wtabs button { font-size: 13.5px; padding: 9px 16px; }
.wtabs button b { font-weight: 600; margin-left: 5px; opacity: 0.6; font-variant-numeric: tabular-nums; }
#wq {
  flex: 1 1 320px; min-width: 220px;
  padding: 11px 15px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); outline: none;
}
#wq:focus { border-color: var(--accent); }
.wfacet { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wfacet > .wlab { flex: 0 0 84px; }
.wfacet > .wlab2 { flex: 0 0 auto; margin-left: 10px; }
.wchips { display: flex; flex-wrap: wrap; gap: 7px; }
.wfacet .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 12px; }
.wfacet .chip b { font-weight: 600; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wfacet .chip.on b { color: rgba(255, 255, 255, 0.8); }
.wfacet .chip.nil { opacity: 0.4; }
.wfbooks select {
  padding: 6px 10px; font: inherit; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); outline: none;
}
.wfbooks select:focus { border-color: var(--accent); }
#wempty .empty { margin-top: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wtoggle { display: none; }
@media (max-width: 720px) {
  .wfilters { position: static; }
  .wcard, .wfam { scroll-margin-top: 12px; } /* nothing sticky to clear here */
  .wfacet > .wlab { flex-basis: 100%; }
  .wfacet > .wlab2 { margin-left: 0; }
  .wtoggle { display: inline-block; }
  .wtabs { flex: 1 0 100%; }
  .wtabs button { flex: 1; }
  .wfilters:not(.open) .wfacet { display: none; }
  .wfbooks select { width: 100%; }
}

.wnav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.wnav a { text-decoration: none; color: var(--accent); padding: 4px 0; border-bottom: 2px solid transparent; }
.wnav a:hover { border-bottom-color: var(--accent); }
.wsection { margin-top: 26px; }
.wh { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 34px; margin: 18px 0 4px; line-height: 1.1; }
.wh small { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-left: 10px; }
.wfam { margin-top: 30px; }
.wfam h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.wintro { max-width: 760px; font-size: 14.5px; color: #44413a; line-height: 1.5; margin: 0 0 6px; }
.wgridcards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.wcard, .wfam { scroll-margin-top: 190px; } /* clear the sticky filter bar on a #hash jump */
.wcard { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 22px 18px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.wcard h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 26px; margin: 14px 0 0; line-height: 1.1; }
.wstrip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin: 0 -22px; background: var(--line); border-bottom: 1px solid var(--line); }
.wstrip.empty { display: flex; align-items: center; justify-content: center; height: 64px; background: var(--accent-soft); color: var(--muted); font-size: 12px; }
.wtile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--card); }
.wtile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.15s ease; }
.wtile:hover img { transform: scale(1.06); }
.wtile .cdot { position: absolute; right: 5px; bottom: 5px; margin: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.9); }
.wtile .noimg { display: block; width: 100%; height: 100%; background: var(--accent-soft); }
.wlook b, .mstory b { font-weight: 600; color: #2f2c26; }
.wlab { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; align-self: center; margin-right: 2px; }
.mfoot .wmore { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.mfoot .wmore:hover { text-decoration: underline; }
.mcount .led { margin-right: 6px; vertical-align: middle; }
.wall { margin: 4px -22px -18px; padding: 10px 22px 18px; background: #faf8f4; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.wgroup h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wgroup h4 a { text-decoration: none; color: inherit; }
.wgroup h4 a b { font-weight: 600; }
.wgroup h4 a span { color: var(--muted); }
.wgroup h4 a:hover b { text-decoration: underline; }
.wgroup .wgn { color: var(--muted); font-size: 12px; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.wtile.big { aspect-ratio: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-decoration: none; color: inherit; }
.wtile.big img, .wtile.big .noimg { aspect-ratio: 1 / 1; height: auto; }
.wtile.big .wcap { display: flex; flex-direction: column; padding: 5px 7px 6px; font-size: 11px; line-height: 1.25; }
.wtile.big .wcap b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wtile.big .wcap small { color: var(--muted); font-size: 10.5px; }
.wtile.big .cdot { position: static; margin: 0 4px 1px 0; box-shadow: none; }
@media (max-width: 720px) { .wgridcards { grid-template-columns: 1fr; } .wstrip { grid-template-columns: repeat(4, 1fr); } .wstrip .wtile:nth-child(n+5) { display: none; } }

.foot { padding: 18px clamp(16px, 4vw, 48px) 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

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

@media (max-width: 560px) {
  .meta { text-align: left; }
}

/* Individual references inside a range Article (Cloth Reference [DB]). */
.refs { margin-top: 8px; font-size: 12.5px; }
.refs > summary { cursor: pointer; color: var(--accent); list-style: none; display: flex; align-items: center; gap: 6px; }
.refs > summary::-webkit-details-marker { display: none; }
.refs > summary .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.reflist { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow: auto; border-top: 1px solid var(--line); }
.reflist li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.reflist li .rref { font-variant-numeric: tabular-nums; min-width: 78px; }
.reflist li .rcol { color: var(--muted); flex: 1; }
.reflist li b { margin-left: auto; font-weight: 600; }
.reflist li.off { color: var(--muted); }
.reflist li.off b { color: #b4632b; }

/* House signature — bottom-right on every page (shared stylesheet). */
body::after {
  content: "Envisioned by Brunold Bespoke";
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(10px, 2.5vw, 18px);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: var(--gold);
  opacity: 0.8;
  text-shadow: 0 1px 2px rgba(246, 244, 239, 0.9);
  pointer-events: none;
  z-index: 50;
}

/* ── The route: cut-length from the mills, or FORMENS stock ───────────────── */
.routerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
/* A segment wider than the screen scrolls inside itself; the page must never
   grow wider than the phone. */
.routerow .seg { display: inline-flex; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; background: var(--card); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; box-shadow: var(--shadow); }
.routerow .seg::-webkit-scrollbar { display: none; }
.routerow .seg button {
  border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.routerow .seg button:last-child { border-right: 0; }
.routerow .seg button:hover { color: var(--ink); }
.routerow .seg button.on { background: var(--ink); color: #fff; }
.routerow .seg button small { font-size: 11.5px; opacity: 0.7; margin-left: 5px; font-variant-numeric: tabular-nums; }
.routerow .routenote { font-size: 12.5px; color: var(--muted); }
.tag.route { background: #e4ebf3; color: #2b4a6f; }
.tag.cat { background: #f2ece2; color: #6c5731; font-variant-numeric: tabular-nums; }

/* ── The doors: who is reading, and whose wardrobe ─────────────────────── */
.doors { margin: 18px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doorslabel { font-size: 13px; color: var(--muted); }
.doorrow { display: flex; gap: 8px; flex-wrap: wrap; }
.door {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 14px; min-width: 150px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; font: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.door:hover { border-color: var(--accent); }
.door.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.door b { font-size: 14px; font-weight: 600; }
.door small { font-size: 12px; color: var(--muted); }
.wardroberow { margin-left: auto; display: flex; gap: 6px; }
.wardroberow .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.voicebar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.voicebar .chips { display: inline-flex; gap: 4px; }
.voicebar .chip { padding: 3px 9px; font-size: 12px; }
.voicebar .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
@media (max-width: 860px) { .wardroberow { margin-left: 0; } }

/* ── Doors, once chosen ───────────────────────────────────────────────────── */
.doors .doorsmini { display: none; }
.doors.chosen .doorslabel, .doors.chosen .doorrow, .doors.chosen .wardroberow { display: none; }
.doors.chosen .doorsmini { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); width: 100%; }
.doors.chosen .doorsmini b { color: var(--ink); font-weight: 600; }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.doors.chosen .doorsmini .linkbtn { font-size: 12.5px; }
.empty .linkbtn { font-size: inherit; }
.doors.chosen .doorsmini .ways { margin-left: auto; display: inline-flex; gap: 14px; }
.doors.chosen .doorsmini .ways a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 12.5px; }
.doors.chosen ~ .journey { display: none; }

/* ── The garment first ────────────────────────────────────────────────────── */
.gsteps { display: grid; gap: 8px; margin: 0 0 12px; }
.grow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.grow.sub { padding-left: 4px; }
.glab { font-size: 12px; color: var(--muted); min-width: 52px; text-transform: uppercase; letter-spacing: 0.4px; }
.gchip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 15px;
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.grow.sub .gchip { padding: 6px 12px; font-size: 13px; }
.gchip small { font-size: 11px; color: var(--muted); margin-left: 5px; }
.gchip:hover { border-color: var(--accent); }
.gchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.gchip.on small { color: rgba(255,255,255,0.7); }

.budgetrow { margin: 4px 0 12px; }
.budgetfield { max-width: 520px; }
.budgetfield > span { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.budgetfield output { font-weight: 600; color: var(--ink); }
.budgetfield .reset { padding: 3px 9px; font-size: 12px; }
.bnote { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.colourrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.cchip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 5px 11px 5px 6px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.cchip i { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.12); }
.cchip:hover { border-color: var(--accent); }
.cchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.colourrow .reset { padding: 3px 9px; font-size: 12px; }

/* ── Mills: the marks alone, behind a disclosure ───────────────────────────── */
.millsbox { margin-bottom: 12px; }
.millsbox > summary {
  list-style: none; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink);
}
.millsbox > summary::-webkit-details-marker { display: none; }
.millsbox > summary::before { content: "▸"; color: var(--muted); font-size: 11px; }
.millsbox[open] > summary::before { content: "▾"; }
.millsbox .millhint { font-weight: 400; color: var(--muted); font-size: 12px; }
.millsbox .millrow { margin-top: 10px; }
.millchip.logoonly { padding: 8px 14px; min-width: 96px; height: 52px; justify-content: center; }
.millchip.logoonly img { height: 34px; max-width: 120px; }
.millchip.logoonly.on::after { position: absolute; top: 4px; right: 8px; }
.millchip.logoonly { position: relative; }

@media (max-width: 640px) {
  .glab { min-width: 0; flex-basis: 100%; }
  .doors.chosen .doorsmini .ways { margin-left: 0; flex-basis: 100%; }
  .millchip.logoonly { min-width: 80px; height: 46px; }
  .millchip.logoonly img { height: 28px; max-width: 96px; }
}

/* ── Timeless pieces (/pieces) ──────────────────────────────────────────── */
.piecesintro { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.piecesintro p { margin: 0; }
.piecesintro .wardroberow { margin: 0; }
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; padding: 0 0 32px; }
.pgroup { grid-column: 1 / -1; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 28px; margin: 12px 0 -6px; }
.piece { display: grid; grid-template-columns: 208px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.phero { background: linear-gradient(180deg, #f3efe7, #e9e3d7); display: flex; align-items: center; justify-content: center; padding: 18px 12px; }
.phero img { max-width: 100%; max-height: 300px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(28, 27, 24, 0.18)); }
/* A styled render brings its own ground and shadow. It sits at the top of the
   column at its own 4:5, whole, and fades into a ground the colour of its own
   bottom edge so the column can be as tall as the rails without a seam. */
.phero.styled { padding: 0; background: linear-gradient(180deg, #e2d7c9 0%, #e9e2d6 60%, #ece6db 100%); align-items: flex-start; }
.phero.styled img { width: 100%; height: auto; max-height: none; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; filter: none;
  -webkit-mask-image: linear-gradient(#000 82%, transparent 100%); mask-image: linear-gradient(#000 82%, transparent 100%); }
.pbody { padding: 16px 18px 14px; min-width: 0; }
.phead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.phead h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 26px; margin: 0; line-height: 1.1; }
.pcolours { display: inline-flex; gap: 4px; flex: none; }
.pcolours .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); display: inline-block; }
.pline { margin: 6px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.pactions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pbtn { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.pbtn:hover { border-color: var(--accent); color: var(--accent); }
.pbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pbtn.primary:hover { filter: brightness(1.08); color: #fff; }
.pbtn.ghost { border-style: dashed; color: var(--muted); }
.prail h3 { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; margin: 0 0 8px; }
.prail h3 small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12.5px; }
.pdivider { border: 0; border-top: 1px dashed var(--line); margin: 12px 0; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.ptile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); font-size: 11.5px; line-height: 1.25; min-width: 0; }
.ptile .cover { aspect-ratio: 1 / 1; height: auto; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #eee; }
.ptile .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile .cover .coverbadge { display: none; }
.ptile .cover.none span, .ptile .cover.flat { font-size: 10px; }
.ptile:hover .cover { border-color: var(--accent); }
.ptile .pt-code { font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .pt-mill { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile .pt-w { color: var(--muted); }
.pmore { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 500; color: var(--accent); text-decoration: none; }
.pempty { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }
@media (max-width: 560px) {
  .piece { grid-template-columns: 1fr; }
  .phero { padding: 14px; }
  .phero img { max-height: 220px; }
  .phero.styled img { max-height: 440px; }
}

/* ── Fit ──────────────────────────────────────────────────────────────────── */
.slotfit { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.slotfit select, .sfit { font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.sfit { display: block; margin-top: 4px; max-width: 120px; }
.linerow { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.linerow .linelab { font-size: 12.5px; color: var(--muted); min-width: 92px; }
.linerow .chips { margin: 0; }
.slinesel { margin-left: 6px; display: inline-block; }
.sfit + .slinesel { margin-top: 4px; }
