/* Threadset. Type: Young Serif headings, Work Sans for everything else ("Corner tailor").
   Layout: a printed menswear lookbook. Numbered looks on studio-grey plates,
   prices on swing tags, care-label type for the small print. Square edges, hairlines,
   no shadows: the clothes are the only objects on the page. */
:root {
  --ground: #f4f4f1;      /* page */
  --surface: #fbfbf9;     /* dialogs, inputs */
  --plate: #e6e5e0;       /* studio backdrop behind the clothes */
  --ink: #16171b;
  --muted: #6c6d73;
  --line: #d9d8d2;
  --accent: #2c3a5a;      /* raw indigo, like dry denim */
  --accent-soft: #e2e5ec;
  --thread: #a53a2f;      /* selvedge red, used as a stitch line only */
  --on-ink: #f4f4f1;
  --flat-line: #2a2b30;   /* outline on the technical flats */
  --good: #2f6b4a;
  --bad: #a53a2f;
  --shade: rgba(22, 23, 27, 0.5);

  --display: "Young Serif", Georgia, serif;
  --body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Work Sans", "Helvetica Neue", Arial, sans-serif; /* labels and prices: same plain sans, set in caps */

  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.9rem, 3.4vw, 2.75rem);
  --step-3: clamp(3.1rem, 8.4vw, 7rem);
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 56px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111215;
    --surface: #18191d;
    --plate: #d8d7d1;
    --ink: #ecebe6;
    --muted: #9a9ba2;
    --line: #2b2c32;
    --accent: #a9b8dc;
    --accent-soft: #1d2333;
    --thread: #d26a5c;
    --on-ink: #111215;
    --flat-line: #2a2b30;
    --good: #7cc29b;
    --bad: #e08476;
    --shade: rgba(0, 0, 0, 0.66);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111215;
  --surface: #18191d;
  --plate: #d8d7d1;
  --ink: #ecebe6;
  --muted: #9a9ba2;
  --line: #2b2c32;
  --accent: #a9b8dc;
  --accent-soft: #1d2333;
  --thread: #d26a5c;
  --on-ink: #111215;
  --flat-line: #2a2b30;
  --good: #7cc29b;
  --bad: #e08476;
  --shade: rgba(0, 0, 0, 0.66);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.015em; text-wrap: balance; }
/* Young Serif has no italic, so emphasis is the selvedge red instead */
h1 em, h2 em { font-style: normal; font-weight: 400; color: var(--thread); }
.wrap { max-width: 1360px; margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { display: inline-block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.note { font-size: 0.82rem; color: var(--muted); }
.ok { color: var(--good); font-size: 0.9rem; }
.err { color: var(--bad); font-size: 0.9rem; margin: 0; }

/* Buttons: rectangular, like a shop's */
.btn {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn.light { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.btn.light:hover { background: transparent; color: var(--on-ink); }
.btn.block { width: 100%; padding-block: 1em; }
.btn.sm { padding: 0.55em 1em; font-size: 0.7rem; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* Top bar */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 64px; }
.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  grid-column: 2;
  grid-row: 1;
  line-height: 1;
}
.bar-nav { grid-column: 1; grid-row: 1; display: flex; gap: 26px; }
.bar-nav a { text-decoration: none; color: var(--muted); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.bar-nav a:hover { color: var(--ink); }
.bar-account { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 14px; }
.bar-account .acts { display: inline-flex; gap: 8px; }
.bar-account .btn { padding: 0.7em 1.1em; font-size: 0.7rem; }
.allowance { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.allowance:empty { display: none; }
@media (max-width: 860px) {
  .bar-in { grid-template-columns: auto 1fr; }
  .wordmark { grid-column: 1; }
  .bar-nav { display: none; }
  .bar-account { grid-column: 2; }
  .allowance { display: none; }
}
@media (max-width: 480px) { .bar-account .btn.ghost.opt-sm { display: none; } .wordmark { font-size: 1.3rem; } }

/* Hero: the cover of the lookbook */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  padding-block: clamp(40px, 7vw, 96px) clamp(40px, 6vw, 80px);
}
.hero h1 {
  font-size: var(--step-3);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 18px 0 28px;
  font-weight: 400;
}
.hero h1 em { display: block; }
.hero-copy > p { max-width: 44ch; color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-copy > .hero-line {
  margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.hero-line span:not(.sep) { color: var(--ink); }
.hero-line .sep { color: var(--line); margin-inline: 6px; }
.hero-feature { display: grid; gap: 10px; width: 100%; max-width: 440px; justify-self: end; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-feature { justify-self: stretch; max-width: 420px; }
}

/* Catalogue: occasion index + looks */
.catalogue {
  scroll-margin-top: 72px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
.side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); align-self: start; max-height: calc(100dvh - 104px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 24px; }
.side-toggle { display: none; }
.side-nav { display: grid; gap: 26px; }
.side-group { display: grid; gap: 0; }
.side-group .label { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.occ {
  appearance: none; background: none; border: 0; text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 5px 0;
  font-size: 0.95rem; color: var(--muted);
  transition: color 0.12s ease;
}
.occ:hover { color: var(--ink); }
.occ[aria-current="true"] { color: var(--ink); font-weight: 600; }
.occ[aria-current="true"] span:first-child { text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.occ .n { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.occ.sub { padding-left: 16px; font-size: 0.9rem; }
.occ.all { font-family: var(--display); font-size: 1.35rem; color: var(--ink); padding-top: 0; }
.occ.all[aria-current="true"] { font-weight: 400; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.toolbar-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.budget { display: flex; align-items: center; gap: 14px; flex: 1 1 260px; min-width: 0; max-width: 460px; }
.budget output { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 6.5ch; font-size: 0.85rem; }
.budget input[type="range"] { flex: 1; accent-color: var(--ink); min-width: 0; }
.sort { display: flex; align-items: center; gap: 10px; }
.sort select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.2em 0.2em;
  font-size: 0.9rem;
  cursor: pointer;
}
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 34px; height: 18px; border-radius: 999px; border: 1px solid var(--ink); position: relative; transition: background 0.15s; flex: none; }
.toggle .track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform 0.15s, background 0.15s; }
.toggle input:checked + .track { background: var(--ink); }
.toggle input:checked + .track::after { transform: translateX(16px); background: var(--ground); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.fit-banner {
  margin: 14px 0 0; font-size: 0.88rem; color: var(--accent);
  border-left: 2px solid var(--accent); padding: 4px 0 4px 12px;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
}
.fit-banner button { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: inherit; font-size: inherit; }

@media (max-width: 960px) {
  .catalogue { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .side { position: static; max-height: none; overflow: visible; padding: 0; }
  .side-toggle {
    display: flex; width: 100%; gap: 10px; align-items: baseline;
    background: transparent; border: 1px solid var(--ink); border-radius: var(--radius);
    padding: 0.8em 1em; cursor: pointer; font-weight: 500;
  }
  .side-toggle::after { content: "+"; color: var(--muted); margin-left: auto; padding-left: 10px; font-size: 1.1rem; line-height: 1; }
  .side-toggle[aria-expanded="true"]::after { content: "–"; }
  .side-nav {
    display: none; margin-top: 10px; padding: 18px 16px; background: var(--surface);
    border: 1px solid var(--line);
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; align-items: start;
  }
  .side-group:first-child { grid-column: 1 / -1; }
  .side-toggle[aria-expanded="true"] + .side-nav { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .toggle .track, .toggle .track::after { transition: none; } }

/* Looks */
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 28px 18px; }
.results-head h2 { font-size: var(--step-2); margin: 0; line-height: 1; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 40px 20px;
  padding-bottom: 80px;
}
.card {
  position: relative;
  display: grid; gap: 14px; cursor: pointer; text-align: left; padding: 0; color: inherit;
  background: none; border: 0;
}
.card-meta { display: grid; gap: 3px; }
.card-occ { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--display); font-size: 1.22rem; line-height: 1.2; font-weight: 400; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-sub { display: flex; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.lock { font-size: 0.78rem; color: var(--muted); text-align: right; }
.lock.open { color: var(--good); }
.empty { grid-column: 1 / -1; padding: 48px 0; color: var(--muted); }
.hero-cap { color: var(--ink); }

/* The plate: clothes laid flat on a studio backdrop */
.flatlay {
  position: relative;
  background: var(--plate);
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.6fr);
  padding: 19% 11% 8%;
  gap: 4% 6%;
  overflow: hidden;
  transition: background 0.25s ease;
}
.card:hover .flatlay { background: color-mix(in srgb, var(--plate) 88%, #000); }
.flatlay > div { min-width: 0; min-height: 0; display: flex; justify-content: center; align-items: center; }
.flatlay svg, .flatlay img { width: 100%; height: 100%; object-fit: contain; overflow: visible; }
.flatlay img { mix-blend-mode: multiply; }
.flatlay .slot-outer { grid-column: 1; grid-row: 1; }
.flatlay .slot-top { grid-column: 2; grid-row: 1; }
.flatlay .slot-bottom { grid-column: 1 / span 2; grid-row: 2; justify-self: center; width: 56%; }
.flatlay .slot-feet { grid-column: 1; grid-row: 3; }
.flatlay .slot-extra { grid-column: 2; grid-row: 3; }
.flatlay:not(:has(.slot-extra)) .slot-feet { grid-column: 1 / span 2; justify-self: center; width: 42%; }
.flatlay.solo-top .slot-top { grid-column: 1 / span 2; justify-self: center; width: 60%; }
/* Real product photos sit on white, so give them a white plate */
.flatlay.products { background: #fff; }
/* A full outfit photo fills the plate */
.flatlay.photo { display: block; padding: 0; }
.flatlay.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }

.plate-no {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: #3b3c42;
}
/* Swing tag: the price hangs off the corner on a thread */
.swing {
  position: absolute; right: 12px; top: 0; z-index: 1;
  display: grid; justify-items: center; gap: 0;
  background: #f7f6f2; color: #16171b;
  padding: 16px 9px 7px; min-width: 58px;
  clip-path: polygon(14% 0, 86% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
}
.swing::before { content: ""; position: absolute; top: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--plate); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.swing-price { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; }
.swing-sub { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6c6d73; }

/* Technical flats: outline in ink, flat garment colour */
.garment .body { stroke: var(--flat-line); stroke-width: 0.7; stroke-linejoin: round; }
.garment .detail { fill: none; stroke: var(--flat-line); stroke-width: 0.55; stroke-linecap: round; opacity: 0.85; }
.garment .stitch { fill: none; stroke: var(--flat-line); stroke-width: 0.4; stroke-dasharray: 1.1 1.1; opacity: 0.6; }
.garment .crease { fill: none; stroke: var(--flat-line); stroke-width: 0.4; stroke-linecap: round; opacity: 0.35; }
.garment .dot { fill: var(--flat-line); }
.garment .sole { fill: #f4f3ef; stroke: var(--flat-line); stroke-width: 0.6; }
.garment .sole.dark { fill: #2a2622; }

/* Sections */
section.band { border-top: 1px solid var(--ink); padding-block: clamp(56px, 8vw, 112px); }
.band h2 { font-size: var(--step-2); line-height: 1.04; margin: 14px 0 16px; max-width: 22ch; }
.band p.lede { color: var(--muted); max-width: 46ch; margin: 0; font-size: 1.05rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 48px; align-items: start; }
.how { list-style: none; padding: 0; margin: 48px 0 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 32px; }
.how li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 18px; }
.how li::before { content: "0" counter(step); display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--thread); margin-bottom: 14px; }
.how h3 { margin: 0 0 8px; font-size: 1.5rem; }
.how p { margin: 0; color: var(--muted); font-size: 0.97rem; max-width: 36ch; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0; border: 1px solid var(--ink); }
.plan { padding: 28px; display: grid; gap: 18px; align-content: start; }
.plan + .plan { border-left: 1px solid var(--ink); }
@media (max-width: 560px) { .plan + .plan { border-left: 0; border-top: 1px solid var(--ink); } }
.plan.member { background: var(--ink); color: var(--on-ink); }
.plan.member .label, .plan.member .note { color: color-mix(in srgb, var(--on-ink) 65%, transparent); }
.plan.member .btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.plan.member .btn:hover { background: transparent; color: var(--on-ink); }
.plan .price { font-family: var(--display); font-size: 3.2rem; font-weight: 400; line-height: 1; }
.plan .price small { font-family: var(--body); font-size: 0.9rem; font-weight: 400; opacity: 0.65; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.95rem; }
.plan li { display: flex; gap: 12px; }
.plan li::before { content: "—"; opacity: 0.45; flex: none; }

section.band.inverse { background: var(--accent); color: #f4f4f1; border-top: 0; }
:root[data-theme="dark"] section.band.inverse { background: #1d2538; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) section.band.inverse { background: #1d2538; } }
.band.inverse p.lede, .band.inverse .note, .band.inverse .label { color: rgba(244, 244, 241, 0.7); }
.band.inverse .field { background: transparent; border: 0; border-bottom: 1px solid rgba(244, 244, 241, 0.5); border-radius: 0; color: #f4f4f1; padding-inline: 0; }
.band.inverse .field::placeholder { color: rgba(244, 244, 241, 0.45); }
.band.inverse .btn.light { background: #f4f4f1; color: #16171b; border-color: #f4f4f1; }
.band.inverse .btn.light:hover { background: transparent; color: #f4f4f1; }
.band.inverse .ok { color: #f4f4f1; }
form.inline { display: grid; gap: 8px; max-width: 480px; }
.inline-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.inline-row .field { flex: 1 1 220px; min-width: 0; }
#news-msg { margin: 12px 0 0; min-height: 1.4em; }

.field {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0.75em 0.9em;
  width: 100%;
}
.field:focus { border-color: var(--ink); outline: none; }

.ad-wrap { display: grid; gap: 8px; padding-block: 40px; }
.ad { min-height: 90px; display: grid; }
.ad-placeholder {
  border: 1px dashed var(--line); padding: 24px;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: center;
  color: var(--muted); font-size: 0.9rem; text-align: center;
}
.ad-placeholder strong { color: var(--ink); font-family: var(--display); font-weight: 400; }

footer { border-top: 1px solid var(--ink); padding-block: 40px 64px; font-size: 0.85rem; color: var(--muted); }
.foot { display: grid; gap: 8px; }
.foot p { margin: 0; max-width: 72ch; }
.foot p:empty { display: none; }
.foot .wordmark { font-size: 2rem; color: var(--ink); margin-bottom: 10px; }

/* Dialogs */
dialog {
  border: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}
dialog.wide { width: min(1080px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--shade); }
dialog[open] { animation: rise 0.22s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.dlg { padding: 36px 32px 32px; display: grid; gap: 16px; position: relative; }
.dlg h2 { font-size: var(--step-2); line-height: 1.02; margin: 0; }
.dlg > p { margin: 0; color: var(--muted); }
.dlg .eyebrow { margin: 0; }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.close {
  position: absolute; right: 14px; top: 12px; z-index: 3;
  background: transparent; border: 0; width: 36px; height: 36px;
  font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted);
}
.close:hover { color: var(--ink); }
.stack { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.check strong { color: var(--ink); font-weight: 500; }
.check input { margin-top: 0.3em; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.check.small { font-size: 0.82rem; }
.switch { font-size: 0.9rem; color: var(--muted); margin: 0; }
.switch button { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* Fit dialog */
.fit-field { display: grid; gap: 8px; }
.fit-row { display: flex; justify-content: space-between; align-items: baseline; }
.fit-row output { font-size: 0.95rem; }
.fit-field input[type="range"] { accent-color: var(--ink); width: 100%; }
.fit-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fit-ranges { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); }
.opt { text-transform: none; letter-spacing: 0; font-family: var(--body); }

/* Outfit detail */
.detail { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; position: relative; }
.detail > .flatlay { align-self: start; position: sticky; top: 0; }
.detail-body { display: grid; gap: 16px; align-content: start; min-width: 0; padding: 36px 32px 32px; }
@media (max-width: 780px) {
  .detail { grid-template-columns: 1fr; }
  .detail > .flatlay { position: relative; max-height: 62vh; aspect-ratio: 4 / 4.2; }
  .detail-body { padding: 22px 18px 24px; }
}
.detail h2 { font-size: var(--step-2); line-height: 1.02; margin: 0; padding-right: 40px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.chip { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.why { font-size: 1.05rem; margin: 0; max-width: 52ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.section-head h3 { margin: 0; font-size: 1.3rem; }
.pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pieces li {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.thumb { width: 52px; height: 64px; background: var(--plate); display: grid; place-items: center; padding: 6px; }
.thumb svg, .thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb img { mix-blend-mode: multiply; }
.piece-name { font-weight: 500; font-size: 0.95rem; }
.piece-shop { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.piece-fit { font-size: 0.72rem; color: var(--accent); border: 1px solid currentColor; padding: 0 6px; margin-left: 8px; white-space: nowrap; }
.pieces .price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.pick { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--thread); margin-left: 8px; white-space: nowrap; }
.pieces .options { grid-column: 1 / -1; margin-top: -2px; }
.pieces .options summary { cursor: pointer; font-size: 0.82rem; color: var(--accent); list-style: none; padding-left: 66px; width: fit-content; }
.pieces .options summary:hover { text-decoration: underline; }
.pieces .options summary::-webkit-details-marker { display: none; }
.pieces .options summary::after { content: " +"; }
.pieces .options[open] summary::after { content: " –"; }
.pieces .options .pieces { margin: 6px 0 0 66px; }
.pieces li.alt { border-bottom-style: dashed; grid-template-columns: minmax(0, 1fr) auto auto; padding-block: 9px; }
.pieces li.alt:last-child { border-bottom: 0; }
.totals { display: grid; gap: 6px; padding: 16px 0 4px; border-top: 1px solid var(--ink); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-variant-numeric: tabular-nums; font-size: 0.92rem; color: var(--muted); }
.total-row span:last-child { font-family: var(--mono); color: var(--ink); }
.total-row.main { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.total-row.low, .total-row.low span:last-child { color: var(--accent); font-weight: 500; }
.vote { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vote .btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (max-width: 480px) {
  .pieces li { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .thumb { width: 44px; height: 54px; }
  .pieces li .shop { grid-column: 2 / -1; justify-self: start; }
  .pieces li.alt { grid-template-columns: minmax(0, 1fr) auto auto; }
  .pieces li.alt .shop { grid-column: auto; }
  .pieces .options summary { padding-left: 58px; }
  .pieces .options .pieces { margin-left: 0; }
}

/* Checkout */
.applepay {
  background: #000; color: #fff; border: 1px solid #000; border-radius: 6px;
  height: 48px; width: 100%; font-weight: 600; font-size: 1rem; cursor: pointer;
}
:root[data-theme="dark"] .applepay { background: #fff; color: #000; border-color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .applepay { background: #fff; color: #000; border-color: #fff; } }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary { display: flex; justify-content: space-between; border-block: 1px solid var(--line); padding: 14px 0; font-size: 0.95rem; }
.preview-flag { font-size: 0.78rem; color: var(--muted); border: 1px dashed var(--line); padding: 10px 12px; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--on-ink); padding: 12px 20px; font-size: 0.9rem; z-index: 50;
  max-width: calc(100vw - 32px);
}

/* Guide: occasion first, then budget, then the looks */
.guide { display: grid; gap: 28px; padding-bottom: 80px; }
.step-head { display: grid; gap: 6px; justify-items: start; }
.step-head h2 { font-size: var(--step-2); line-height: 1.02; margin: 4px 0 0; max-width: 20ch; }
.step-head p { margin: 0; color: var(--muted); }
.occ-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 16px; }
@media (max-width: 1100px) { .occ-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .occ-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }
.occ-tile { appearance: none; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; display: grid; gap: 4px; min-width: 0; }
.occ-tile .flatlay { margin-bottom: 8px; }
.occ-tile:hover .flatlay { background: color-mix(in srgb, var(--plate) 88%, #000); }
.occ-tile-name { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; font-weight: 400; }
.occ-tile:hover .occ-tile-name { text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.occ-tile-sub { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.more-occ { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { appearance: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 0.45em 1em; font-size: 0.9rem; cursor: pointer; }
.pill:hover { border-color: var(--ink); }
.browse-all {
  appearance: none; background: none; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: 18px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.75rem); text-align: left;
}
.browse-all:hover span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.crumbs { display: flex; gap: 10px; align-items: baseline; font-size: 0.85rem; color: var(--muted); padding-bottom: 14px; }
.crumbs button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.occ.browse { font-weight: 500; color: var(--ink); }

/* Membership: yearly or monthly */
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp { position: relative; display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); cursor: pointer; }
.pp input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pp:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-name { font-family: var(--display); font-size: 1.2rem; }
.pp-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-note { font-size: 0.8rem; color: var(--muted); }
