/* Moda — earth-toned, minimal, contemporary. Tokens first; components only use tokens. */
:root {
  color-scheme: light dark;
  --bg: #faf8f5;          /* ivory */
  --surface: #f3f0eb;     /* warm light grey: product tiles */
  --surface-2: #ede9e3;
  --ink: #1a1a1a;         /* near black */
  --muted: #6f6a64;
  --line: #e4e0da;
  --line-strong: #cfc9c1;
  --accent: #1a1a1a;      /* black is the working colour, like the reference */
  --accent-ink: #faf8f5;
  --accent-soft: #ede9e3;
  --clay: #a8603f;
  --clay-soft: #f1dfd5;
  --exact: #1a1a1a;  --exact-bg: #faf8f5;
  --close: #6f6a64;  --close-bg: #faf8f5;
  --similar: #6f6a64; --similar-bg: #faf8f5;
  --danger: #9c3f2a; --danger-bg: #f1dfd5;
  --ok-bg: #ede9e3;
  --radius: 0;
  --display: "Bodoni Moda", "Bodoni 72", "Didot", "Playfair Display", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161514; --surface: #201e1c; --surface-2: #2a2724; --ink: #f2eee8; --muted: #a39d95;
    --line: #34302c; --line-strong: #4d4841; --accent: #f2eee8; --accent-ink: #161514;
    --accent-soft: #2a2724; --clay: #d8916d; --clay-soft: #3a2a22;
    --exact: #f2eee8; --exact-bg: #161514; --close: #a39d95; --close-bg: #161514;
    --similar: #a39d95; --similar-bg: #161514; --danger: #e09a84; --danger-bg: #3a2a22; --ok-bg: #2a2724;
  }
}
:root[data-theme="dark"] {
  --bg: #161514; --surface: #201e1c; --surface-2: #2a2724; --ink: #f2eee8; --muted: #a39d95;
  --line: #34302c; --line-strong: #4d4841; --accent: #f2eee8; --accent-ink: #161514;
  --accent-soft: #2a2724; --clay: #d8916d; --clay-soft: #3a2a22;
  --exact: #f2eee8; --exact-bg: #161514; --close: #a39d95; --close-bg: #161514;
  --similar: #a39d95; --similar-bg: #161514; --danger: #e09a84; --danger-bg: #3a2a22; --ok-bg: #2a2724;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: 0; text-wrap: balance; }
code { font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.hint { color: var(--muted); font-size: 0.85rem; }
.eyebrow, .label { margin: 0; font-family: var(--sans); font-size: 0.66rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }

button, .button {
  font: 500 0.72rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.4rem; border: 1px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
button:hover, .button:hover { border-color: var(--ink); }
button:disabled { opacity: 0.55; cursor: progress; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.primary:hover { border-color: var(--accent); filter: brightness(0.94); }
.danger { color: var(--danger); border-color: var(--line); }
.danger:hover { border-color: var(--danger); }

input[type="text"], input[type="url"], input[type="number"], input[type="search"], input[type="file"],
select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 0.65rem 0.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { resize: vertical; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"], input[type="checkbox"] { accent-color: var(--accent); }

/* ---- store --------------------------------------------------------------------------- */

.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.6rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line);
}
.brand { grid-column: 2; font-family: var(--display); font-size: 1.7rem; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; padding-left: 0.22em; }
.brand small { display: block; text-align: center; margin: 0.15rem 0 0; font: 400 0.6rem var(--sans); color: var(--muted); letter-spacing: 0.26em; text-transform: uppercase; }
.topbar nav { grid-column: 3; display: flex; justify-content: flex-end; gap: 1.75rem; }
.topbar nav a { font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); }

.store-main { max-width: 1360px; margin: 0 auto; padding: 4rem clamp(1rem, 4vw, 3rem) 6rem; }
.hero { margin: 0 auto 3.5rem; max-width: 62ch; text-align: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 400; }
.lede { margin: 1rem auto 0; color: var(--muted); font-size: 0.95rem; max-width: 50ch; line-height: 1.7; }

.search-layout { display: grid; grid-template-columns: minmax(260px, 300px) 1fr; gap: 4rem; align-items: start; }
.panel { padding: 0; }
.query-panel { position: sticky; top: 1.5rem; display: grid; gap: 1.4rem; }
@media (max-width: 860px) {
  .search-layout { grid-template-columns: 1fr; gap: 2rem; }
  .query-panel { position: static; }
}

.dropzone {
  display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; text-align: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s, background-color 0.15s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-image { border-style: solid; border-color: var(--line); }
.dropzone img { width: 100%; height: 100%; object-fit: cover; }
.dz-empty { display: grid; gap: 0.35rem; padding: 1.5rem; }
.dz-empty strong { font-family: var(--sans); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; }
.dz-empty span { color: var(--muted); font-size: 0.8rem; }

.prompt-field textarea { resize: vertical; min-height: 5rem; line-height: 1.5; }
#go { width: 100%; }
.stylist { padding: 1.1rem 0 0; border-top: 1px solid var(--line); }
.stylist p { margin: 0; }
.stylist .note { font-family: var(--display); font-size: 1.08rem; line-height: 1.5; }
.stylist .read { margin-top: 0.55rem; }

.query-attrs { display: grid; gap: 0.5rem; }
.query-attrs p { margin: 0; }
.query-attrs .summary { font-size: 0.98rem; line-height: 1.5; }

.filters { display: grid; gap: 1.1rem; margin: 0; padding: 1.25rem 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.filters legend { padding: 0; float: left; width: 100%; margin-bottom: 0.9rem; font-size: 0.66rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }
.field { display: grid; gap: 0.5rem; }
.field > span { display: flex; justify-content: space-between; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; }
.field output { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 0.35rem 0.7rem; font-size: 0.72rem; letter-spacing: 0.06em; cursor: pointer; user-select: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.chip span:hover { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: 0.9rem; }

.status { min-height: 1.5em; margin: 0 0 1.5rem; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-align: center; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 3rem 1.25rem; }

.card { display: flex; flex-direction: column; background: transparent; }
.card.skeleton {
  min-height: 400px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .card.skeleton { animation: none; } }

.media { position: relative; overflow: hidden; background: var(--surface); }
.thumb { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); transition: transform 0.6s ease; }
.card:hover .thumb { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .card:hover .thumb { transform: none; } }
.thumb.placeholder {
  display: grid; place-items: end start; padding: 0.75rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--swatch, var(--surface-2)) 70%, white), var(--swatch, var(--surface-2)));
}
.thumb.placeholder span { padding: 0.15rem 0.55rem; font-size: 0.72rem; color: #2b2420; background: rgb(246 243 238 / 0.85); border-radius: var(--radius); }
.tier {
  position: absolute; top: 0.8rem; left: 0.8rem; padding: 0.35rem 0.6rem;
  font-size: 0.58rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em;
}
.tier-exact { color: var(--exact); background: var(--exact-bg); }
.tier-close { color: var(--close); background: var(--close-bg); }
.tier-similar { color: var(--similar); background: var(--similar-bg); }

.card .body { flex: 1; display: grid; gap: 0.35rem; align-content: start; justify-items: center; text-align: center; padding: 1rem 0.5rem 0.25rem; }
.card .meta { margin: 0; color: var(--muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.2em; }
.card h3 { font-family: var(--sans); font-weight: 400; font-size: 0.78rem; line-height: 1.5; letter-spacing: 0.08em; text-transform: uppercase; max-width: 28ch; }
.card .price { margin: 0; font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; }
.tag { padding: 0.1rem 0; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tag.hit { color: var(--ink); }
.tag + .tag::before { content: "·"; margin-right: 0.3rem; color: var(--muted); }
.tag.era { font-style: italic; }
.meters { display: grid; gap: 0.3rem; margin-top: 0.2rem; width: 9rem; }
.meter { display: grid; grid-template-columns: 1fr 2.2rem; gap: 0.5rem; align-items: center; font-size: 0.66rem; letter-spacing: 0.1em; color: var(--muted); }
.meter > span:first-child { display: none; }
.meter .track { height: 2px; overflow: hidden; background: var(--line); }
.meter .fill { display: block; height: 100%; background: var(--ink); }
.meter .num { text-align: right; font-variant-numeric: tabular-nums; }
.facts { margin: 0; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--muted); }
.facts.late { color: var(--clay); }
.shop { margin-top: auto; padding-top: 0.7rem; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); width: max-content; }
.shop:hover { color: var(--muted); border-bottom-color: var(--muted); }

/* ---- admin --------------------------------------------------------------------------- */

.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2rem;
  padding: 1.5rem 1.25rem; background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar nav { display: grid; gap: 0.1rem; }
.sidebar nav a { padding: 0.55rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-left: 1px solid transparent; }
.sidebar nav a:hover { color: var(--ink); }
.sidebar nav a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); }
.side-foot { margin-top: auto; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-flow: row wrap; align-items: center; gap: 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .side-foot { margin: 0 0 0 auto; }
}

.admin-main { width: 100%; max-width: 1200px; padding: 2rem clamp(1rem, 3vw, 3rem) 4rem; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: end; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 2.1rem; }
.page-head h2 { font-size: 1.3rem; }
.page-head p { margin: 0.3rem 0 0; color: var(--muted); }
.page-head .back { margin: 0 0 0.4rem; font-size: 0.8rem; }
.page-head .back a { text-decoration: none; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

.flash { margin-bottom: 1.25rem; padding: 0.8rem 1rem; background: var(--ok-bg); border-left: 2px solid var(--accent); }
.flash.error { color: var(--danger); background: var(--danger-bg); border-left-color: var(--danger); }
.flash ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.flash.warn { color: var(--close); background: var(--close-bg); border-left-color: var(--close); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin-bottom: 2rem; background: var(--line); border: 1px solid var(--line); }
.stat { padding: 1.1rem 1.2rem; background: var(--surface); }
.stat .label { font-size: 0.64rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; }
.stat .value { font-family: var(--display); font-weight: 400; font-size: 2.4rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .value.text { font-size: 1.15rem; padding: 0.55rem 0 0.35rem; font-weight: 400; }
.stat .sub { color: var(--muted); font-size: 0.82rem; }
.meter-bar { height: 2px; margin-top: 0.6rem; overflow: hidden; background: var(--line); }
.meter-bar span { display: block; height: 100%; background: var(--accent); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: 0.62rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-thumb { display: block; width: 40px; height: 50px; object-fit: cover; background: var(--surface-2); }
.flag { padding: 0.15rem 0.45rem; font-size: 0.7rem; white-space: nowrap; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); }
.flag.on { color: var(--exact); border-color: var(--exact); }
.flag.off { color: var(--danger); border-color: var(--danger); }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.toolbar input[type="search"] { max-width: 320px; }
.toolbar select { width: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; color: var(--muted); font-size: 0.85rem; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 980px) { .form-grid { grid-template-columns: 1fr; } }
.card-section { margin-bottom: 1.25rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); }
.card-section h2 { margin-bottom: 0.9rem; font-size: 1.1rem; }
.card-section > p:last-child { margin-bottom: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem 1rem; }
fieldset.fields { margin: 1rem 0 0; padding: 0; border: 0; min-width: 0; }
.fields .wide { grid-column: 1 / -1; }
.fields label { display: grid; gap: 0.35rem; font-size: 0.85rem; font-weight: 500; }
.fields label.check { display: flex; font-weight: 400; }
.fields small, .check small { color: var(--muted); font-weight: 400; }
.side .thumb { margin-bottom: 0.9rem; }
.side dl { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 0.9rem; margin: 0; font-size: 0.88rem; }
.side dt { color: var(--muted); }
.side dd { margin: 0; overflow-wrap: anywhere; }
pre.code { margin: 0 0 0.75rem; padding: 0.9rem; overflow-x: auto; font-size: 0.76rem; background: var(--surface-2); }

.sidebar .brand { grid-column: auto; font-size: 1.25rem; padding-left: 0.22em; }
.sidebar .brand small { text-align: left; }

/* ---- storefront chrome --------------------------------------------------------------- */

.skip { position: absolute; left: -999px; top: 0; padding: 0.6rem 1rem; background: var(--ink); color: var(--bg); z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.ribbon { text-align: center; padding: 0.55rem 1rem; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ribbon a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; }
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1.4rem clamp(1rem, 4vw, 3rem) 1rem; }
.header-row .brand { grid-column: 2; font-family: var(--display); font-size: 1.7rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; padding-left: 0.22em; text-align: center; }
.header-row .brand small { display: block; margin: 0.15rem 0 0; font: 400 0.58rem var(--sans); color: var(--muted); letter-spacing: 0.26em; }
.header-tools { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; }
.tool { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--ink); white-space: nowrap; }
.tool .count { display: inline-block; min-width: 1.1rem; margin-left: 0.25rem; padding: 0 0.3rem; font-size: 0.6rem; text-align: center; color: var(--bg); background: var(--ink); border-radius: 999px; }
.header-search { display: flex; border-bottom: 1px solid var(--line-strong); }
.header-search input { width: 15rem; padding: 0.4rem 0; font-size: 0.8rem; border: 0; background: transparent; }
.header-search input:focus { outline: none; }
.header-search button { padding: 0.3rem 0.4rem; border: 0; font-size: 0.6rem; }
.nav-toggle { grid-column: 1; justify-self: start; display: none; width: 2.4rem; height: 2.4rem; padding: 0.6rem; border: 0; background: transparent; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 1px; background: var(--ink); }

.site-nav { display: flex; justify-content: center; gap: 2.5rem; padding: 0 clamp(1rem, 4vw, 3rem) 1rem; }
.nav-group { display: flex; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.site-nav a { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--ink); padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.site-nav .nav-accent { color: var(--clay); }
.nav-search { display: none; }

@media (max-width: 900px) {
  .header-row { grid-template-columns: 2.4rem 1fr auto; padding: 1rem clamp(1rem, 4vw, 3rem) 0.9rem; }
  .header-row .brand { font-size: 1.4rem; }
  .header-search { display: none; }
  .header-tools { gap: 1rem; }
  .nav-toggle { display: flex; }
  .site-nav { display: none; flex-direction: column; gap: 1.25rem; padding: 1rem clamp(1rem, 4vw, 3rem) 1.5rem; border-top: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .nav-group { flex-direction: column; gap: 0; }
  .site-nav a { font-size: 0.78rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav-search { display: block; }
}

.site-main { max-width: 1360px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }
.crumbs { padding: 1.25rem 0 0; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.site-main .page-head { margin: 1.5rem 0 1.5rem; }
.site-main .page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.site-main .lede { margin-top: 0.6rem; }
.section { padding: 3.5rem 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head > a { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--ink); white-space: nowrap; }
.section-head .muted { margin: 0.4rem 0 0; max-width: 60ch; }
.store-main { padding-top: 0; }

/* hero */
.hero-editorial { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; padding: 3rem 0 0; }
.hero-media { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-copy h1 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); margin: 0.8rem 0 1rem; }
.hero-copy .lede { margin: 0 0 1.75rem; max-width: 46ch; }
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 900px) { .hero-editorial { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; } .hero-media { aspect-ratio: 4 / 3; } }

/* category tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.9rem; color: #fff; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; background: linear-gradient(transparent, rgb(20 18 16 / 0.65)); }
.tile-label small { display: block; margin-top: 0.15rem; font-size: 0.6rem; letter-spacing: 0.12em; opacity: 0.85; text-transform: none; }

/* stylist band */
.stylist-band { padding-top: 4rem; }
.stylist-band-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center; padding: 3rem clamp(1.25rem, 4vw, 3rem); background: var(--surface); }
.stylist-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0.6rem 0 0.8rem; }
.stylist-band .lede { margin: 0; }
.stylist-inline { display: grid; gap: 0.75rem; }
.stylist-inline input { padding: 1rem; background: var(--bg); }
@media (max-width: 900px) { .stylist-band-inner { grid-template-columns: 1fr; gap: 1.5rem; } }

/* recent searches */
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.recent { display: grid; grid-template-columns: 4rem 1fr; gap: 0.9rem; align-items: center; padding: 0.6rem; background: var(--surface); text-decoration: none; }
.recent img, .recent-ph { width: 4rem; height: 5rem; object-fit: cover; background: var(--surface-2); display: block; }
.recent-text { display: grid; gap: 0.2rem; font-size: 0.82rem; min-width: 0; }
.recent-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text .muted { font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* cards: links + save heart */
.card .media { display: block; text-decoration: none; }
.card h3 a { text-decoration: none; }
.card .save { position: absolute; right: 0.6rem; top: 0.6rem; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; background: rgb(250 248 245 / 0.85); color: var(--ink); font-size: 1rem; line-height: 1; letter-spacing: 0; text-transform: none; }
.card .save.on { color: var(--clay); }
:root[data-theme="dark"] .card .save, :root:not([data-theme="light"]) .card .save { background: rgb(250 248 245 / 0.85); color: #1a1a1a; }
.card .save.on { color: #a8603f; }

/* atlas strip */
.era-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.era-card { display: grid; gap: 0.35rem; padding: 1.4rem 1.2rem; background: var(--bg); text-decoration: none; }
.era-card .decade { font-family: var(--display); font-size: 2rem; line-height: 1; }
.era-card .era-name { font-size: 0.85rem; }
.era-card .muted { font-size: 0.72rem; }
.era-card:hover { background: var(--surface); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.steps h3 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0.75rem 0 0.5rem; }
.steps p { margin: 0; color: var(--muted); max-width: 40ch; }
.step-n { font-family: var(--display); font-size: 2rem; line-height: 1; }

.retailers { padding-top: 3rem; }
.retailer-list { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0.75rem 0 0; font-family: var(--display); font-size: 1.15rem; color: var(--muted); }

/* listings */
.listing-head { align-items: end; }
.sort { display: flex; align-items: center; gap: 0.6rem; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sort select { width: auto; padding: 0.45rem 0.6rem; font-size: 0.78rem; }
.subnav { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 0 0 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.subnav a { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.subnav a[aria-current="page"], .subnav a:hover { color: var(--ink); }
.site-main .status { text-align: left; }
.site-main .pager { justify-content: center; gap: 1.5rem; margin-top: 2.5rem; }

.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.style-tile { display: grid; gap: 0.5rem; align-content: start; padding: 1.5rem; background: var(--bg); text-decoration: none; }
.style-tile h2 { font-size: 1.4rem; }
.style-tile p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.style-tile:hover { background: var(--surface); }

/* atlas page */
.atlas { display: grid; gap: 0; }
.era-entry { display: grid; gap: 0.9rem; padding: 2rem 0; border-top: 1px solid var(--line); max-width: 78ch; }
.era-head { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: end; }
.era-head .decade { font-family: var(--display); font-size: 2.6rem; line-height: 0.9; }
.era-head h2 { font-size: 1.5rem; }
.era-dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.4rem 1rem; margin: 0; font-size: 0.9rem; }
.era-dl dt { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.era-dl dd { margin: 0; }
@media (max-width: 600px) { .era-dl { grid-template-columns: 1fr; } }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; padding-top: 1.5rem; }
.pdp-media { background: var(--surface); }
.pdp-media img { width: 100%; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
.pdp-info { display: grid; gap: 1.1rem; align-content: start; max-width: 56ch; }
.pdp-info h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.pdp-info .meta { margin: 0; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.pdp-price { margin: 0; font-size: 1.1rem; }
.pdp-price .live { font-size: 0.7rem; letter-spacing: 0.06em; }
.pdp-sizes .chips { margin-top: 0.5rem; }
.pdp-sizes .chip span { cursor: default; }
.pdp-info .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pdp-desc p, .pdp-summary { margin: 0.5rem 0 0; color: var(--muted); line-height: 1.7; }
.pdp-attrs dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.35rem 1rem; margin: 0.6rem 0 0; font-size: 0.9rem; }
.pdp-attrs dt { color: var(--muted); }
.pdp-attrs dd { margin: 0; }
.pdp-attrs a { color: var(--ink); }
@media (max-width: 900px) { .pdp { grid-template-columns: 1fr; gap: 1.5rem; } }

/* prose + forms */
.prose { max-width: 66ch; line-height: 1.75; }
.prose h2 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 2rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2rem; }
.legal p { color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.6rem 0 0; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; }
.contact-form { display: grid; gap: 1rem; max-width: 40rem; }
.contact-form label { display: grid; gap: 0.35rem; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea { font-size: 0.95rem; letter-spacing: 0; text-transform: none; }
.contact-aside p { margin: 0 0 1rem; }
.contact-aside .label { margin-bottom: 0.25rem; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }
.notify { margin-top: 1.5rem; }
.notify label { display: block; margin-bottom: 0.5rem; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sitemap { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.sitemap ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.sitemap a { text-decoration: none; }

/* footer */
.site-footer { margin-top: 5rem; border-top: 1px solid var(--line); padding: 3.5rem clamp(1rem, 4vw, 3rem) 2rem; }
.footer-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand .brand { font-family: var(--display); font-size: 1.4rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; }
.footer-brand p { color: var(--muted); max-width: 44ch; font-size: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.45rem; }
.site-footer li a { font-size: 0.85rem; text-decoration: none; color: var(--ink); }
.site-footer li a:hover { color: var(--muted); }
.newsletter { margin-top: 1.5rem; }
.newsletter label { display: block; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.newsletter-row { display: flex; }
.newsletter-row input { flex: 1; border-right: 0; }
.newsletter-row button { flex: 0 0 auto; }
.footer-base { max-width: 1360px; margin: 3rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.72rem; color: var(--muted); }
.social { display: flex; gap: 1.25rem; }
.social a { text-decoration: none; color: var(--ink); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.tool .count[hidden] { display: none; }
@media (max-width: 600px) { .ribbon { font-size: 0.58rem; letter-spacing: 0.1em; padding: 0.5rem 1rem; } }
.nav-toggle span { width: 100%; }
@media (max-width: 600px) {
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 0.75rem; }
  .card h3 { font-size: 0.7rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
}

/* ---- the stylist (home) ---------------------------------------------------------------- */

.min-header { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem clamp(1rem, 4vw, 3rem); }
.min-header .brand { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; padding-left: 0.22em; }
.min-nav { display: flex; gap: 1.5rem; }
.min-nav a { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.min-nav a:hover { color: var(--ink); }
.min-nav .count { display: inline-block; min-width: 1.1rem; margin-left: 0.25rem; padding: 0 0.3rem; font-size: 0.6rem; text-align: center; color: var(--bg); background: var(--ink); border-radius: 999px; }
.min-nav .count[hidden] { display: none; }

.stylist-main { max-width: 1360px; margin: 0 auto; padding: clamp(2rem, 8vh, 6rem) clamp(1rem, 4vw, 3rem) 4rem; }
.composer-wrap { max-width: 44rem; margin: 0 auto; text-align: center; }
.composer-wrap h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.composer-wrap .lede { margin: 1rem auto 2rem; max-width: 48ch; color: var(--muted); }

.composer { display: grid; gap: 1rem; text-align: left; }
.composer-box { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0.75rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s; }
.composer-box:focus-within { border-color: var(--ink); }
.composer-box textarea { border: 0; background: transparent; padding: 0.6rem 0.25rem; font-size: 1.05rem; line-height: 1.5; resize: none; min-height: 3.2rem; }
.composer-box textarea:focus { outline: none; }
.attach { position: relative; display: grid; place-items: center; width: 4rem; height: 4rem; overflow: hidden; cursor: pointer; background: var(--bg); border: 1px dashed var(--line-strong); color: var(--muted); transition: border-color 0.15s, color 0.15s; }
.attach:hover, .attach.dragging { border-color: var(--ink); color: var(--ink); }
.attach.has-image { border-style: solid; border-color: var(--line); }
.attach img { width: 100%; height: 100%; object-fit: cover; }
.attach-empty { display: grid; justify-items: center; gap: 0.15rem; font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase; }
.send { width: 3rem; height: 3rem; padding: 0; border: 0; background: var(--ink); color: var(--bg); }
.send:hover { background: var(--ink); opacity: 0.85; }
.suggestions, .recent-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.suggestions button, .chip-link { padding: 0.45rem 0.85rem; font: 400 0.78rem var(--sans); letter-spacing: 0.02em; text-transform: none; border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; }
.suggestions button:hover, .chip-link:hover { border-color: var(--ink); }
.recent-label { align-self: center; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.recent-chips:empty { display: none; }
.filters-disclosure { margin-top: 0.5rem; }
.filters-disclosure summary { cursor: pointer; list-style: none; display: inline-block; font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.filters-disclosure summary::before { content: "+ "; }
.filters-disclosure[open] summary::before { content: "– "; }
.filters-disclosure .filters { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--line); background: var(--surface); }

.answer { max-width: 1360px; margin: 3rem auto 0; display: grid; gap: 1.25rem; }
.answer .stylist { max-width: 60ch; margin: 0 auto; padding: 0; border: 0; text-align: center; }
.answer .stylist .note { font-family: var(--display); font-size: 1.25rem; line-height: 1.5; }
.answer .query-attrs { max-width: 60ch; margin: 0 auto; justify-items: center; text-align: center; }
.answer .query-attrs .tags { justify-content: center; }
.answer .status { margin: 0.5rem 0 0.25rem; }
.answer .status:empty { display: none; }

.min-footer { max-width: 1360px; margin: 4rem auto 0; padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.7rem; color: var(--muted); border-top: 1px solid var(--line); }
.min-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.min-footer a { text-decoration: none; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.62rem; }
.min-footer a:hover { color: var(--ink); }
@media (max-width: 600px) {
  .stylist-main { padding-top: 2rem; }
  .composer-box { grid-template-columns: auto 1fr auto; gap: 0.5rem; padding: 0.5rem; }
  .attach { width: 3.2rem; height: 3.2rem; }
  .send { width: 2.6rem; height: 2.6rem; }
  .composer-box textarea { font-size: 1rem; }
}
