/* plasticiet.com's type: Neuzeit S Book for running text, Book Heavy for
   headings and UI. The shop body stays in Helvetica; the offer uses both. */
@font-face {
  font-family: "Neuzeit";
  src: url("media/brand/neuzeit-book.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neuzeit";
  src: url("media/brand/neuzeit-book-heavy.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f7f5;
  --paper: #fff;
  --ink: #141414;
  --muted: #6d6d68;
  --line: #e3e3df;
  --soft: #3c3c38;
  --ink-hover: #2a2a2a;
  --sold: #7a4036;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Brushed steel, lit from above: the rail, its fittings and the hangers. */
  --steel-tube: linear-gradient(180deg, #c9c9c4 0%, #f3f3ef 24%, #b4b4ae 52%, #76766f 82%, #8e8e88 100%);
  --steel-rod: linear-gradient(90deg, #7d7d77 0%, #e4e4df 45%, #a3a39d 70%, #6f6f69 100%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: #dedcd6; }

/* ---------- header ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 32px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
/* The logo and menu as on plasticiet.com. */
.brand { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); }
.wordmark { display: block; line-height: 0; padding: 10px 0; margin: -10px 0; }
.wordmark img { width: 134px; height: auto; }
/* Book Heavy as plasticiet.com sets it: thickened a hair, fading on hover. */
.toplink, .cart-btn, .online-offer, .offer-close {
  -webkit-text-stroke: .1px currentColor;
  text-shadow: 0 0 1px currentColor;
  transition: opacity .25s ease;
}
.toplink, .cart-btn {
  font: 800 18px/1.5 "Neuzeit", var(--font);
  color: var(--ink);
  text-decoration: none;
}
.cart-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font-size: 16px; text-transform: lowercase; transition: opacity .25s ease, background-color .3s ease, color .3s ease; }
.cart-icon { flex: none; }
/* Once something is in it, the cart lights up in plasticiet's orange and the
   header stays at the top of the window, so the cart is always in sight. */
.topbar.has-cart { position: sticky; top: 0; z-index: 10; }
.cart-btn.has-items {
  padding: 8px 12px 8px 14px;
  margin: -8px 0;   /* a bigger button, not a taller header */
  border-radius: 999px;
  background: #ff6200;
  color: #fff;
}
.cart-btn.has-items .cart-count { background: #f4f1e8; color: #2a2824; }
/* How many pieces are in the cart, on a paper ticket like the ones on the
   rail's hangers, hung a little askew. */
.cart-count {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 1px;
  background: #f4f1e8;
  color: #2a2824;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .2);
  font: 700 12px/20px var(--font);
  text-align: center;
  text-shadow: none;
  -webkit-text-stroke: 0;
  font-variant-numeric: tabular-nums;
  transform: rotate(-4deg);
}
.cart-count[hidden], .detail-cart[hidden] { display: none; }
@keyframes cart-bump { 30% { transform: rotate(-4deg) scale(1.45); } 60% { transform: rotate(-4deg) scale(.92); } }
@keyframes cart-glow { from { box-shadow: 0 0 0 0 rgb(255 98 0 / .55); } to { box-shadow: 0 0 0 14px rgb(255 98 0 / 0); } }
.cart-btn.bump { animation: cart-glow .8s ease-out; }
.cart-btn.bump .cart-count { animation: cart-bump .5s ease-out; }
@media (prefers-reduced-motion: reduce) { .cart-btn.bump, .cart-btn.bump .cart-count { animation: none; } }
@media (hover: hover) {
  .wordmark:hover, .toplink:hover, .cart-btn:hover { opacity: .65; }
  .cart-btn.has-items:hover { opacity: 1; background: #d94f00; }
}

/* Read by screen readers and search engines, not drawn. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- offer ---------- */
/* A line of type under the header, the same weight as the menu on plasticiet.com. */
.online-offer {
  width: 100%;
  display: block;
  padding: 14px 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-align: center;
  font: 800 15px/1.35 "Neuzeit", var(--font);
  letter-spacing: -.001em;
}
.online-offer:focus-visible { outline: 2px solid var(--ink); outline-offset: -5px; }
.offer-dialog button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
body.offer-open { overflow: hidden; }
.offer-dialog {
  width: min(28rem, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 36px 32px 28px;
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}
.offer-dialog::backdrop { background: rgb(20 20 20 / .48); }
.offer-dialog p { margin: 0; font: 400 16px/1.5 "Neuzeit", var(--font); }
.offer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: none;
  padding: 8px;
  font: 800 16px/1 "Neuzeit", var(--font);
  letter-spacing: -.001em;
  text-transform: lowercase;
}
.offer-dialog h2 {
  margin: 0 72px 16px 0;
  font: 800 clamp(26px, 5vw, 32px)/1.2 "Neuzeit", var(--font);
  letter-spacing: -.01em;
}
#offer-description { max-width: 36ch; }
.offer-dialog .offer-example { margin-top: 12px; color: #717171; }
.offer-dialog .offer-example:empty { display: none; }
.offer-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  padding: 12px 18px;
  border: 1px solid #141414;
  border-radius: 5px;
  background: #fff;
  color: #141414;
  font: 800 14px/1 "Neuzeit", var(--font);
  letter-spacing: -.001em;
  transition: opacity .25s ease;
}
.offer-dialog .offer-pickup {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #717171;
  font-size: 14px;
}
@media (hover: hover) {
  .online-offer:hover, .offer-close:hover, .offer-cta:hover { opacity: .65; }
}
@media (max-width: 540px) {
  .online-offer { padding: 12px 20px; font-size: 14px; }
  .offer-dialog { padding: 32px 22px 24px; }
}

/* ---------- rail ---------- */
.room { padding: 8px 0 48px; }

/* Material toggle and colour swatches above the rail. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  padding: 18px 32px 0;
}
.materials { position: relative; display: flex; border: 1px solid var(--line); background: var(--paper); }
/* The ink sits above the hairline dividers and under the labels, so a
   divider does not cut the pill while it travels. */
.mat-indicator {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--ink);
  pointer-events: none;
  transition: transform .48s cubic-bezier(.22, .8, .28, 1), width .48s cubic-bezier(.22, .8, .28, 1);
}
.materials button {
  position: relative;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: color .1s ease;
}
.materials button span { position: relative; z-index: 2; }
/* The short name ("MOP") is shown on a phone instead of the long one. */
.mat-short { display: none; }
.materials button + button::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
@media (hover: hover) { .materials button:hover { color: var(--ink); } }
.materials button[aria-pressed="true"],
.materials button[aria-pressed="true"]:hover {
  color: var(--bg);
  /* Paper once the pill has covered the label, muted as soon as it leaves. */
  transition: color .1s ease .28s;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px 0;
}
/* 0fr collapses a colour that belongs to the other material. min-width: 0
   is what lets a flex item actually reach zero. */
.swatch-slot {
  display: grid;
  flex: none;
  grid-template-columns: 1fr;
  min-width: 0;
  transition: grid-template-columns .48s cubic-bezier(.22, .8, .28, 1), opacity .36s ease;
}
.swatch-slot.is-out { grid-template-columns: 0fr; opacity: 0; }
.swatch-clip { overflow: hidden; min-width: 0; }
.swatch {
  display: block;
  width: 24px;
  height: 24px;
  margin: 5px 4px 5px 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tone) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
  transition: transform .4s cubic-bezier(.22, .8, .28, 1), box-shadow .35s ease;
}
.swatch:disabled { opacity: 1; }
@media (hover: hover) { .swatch:hover { transform: scale(1.12); } }
.swatch[aria-pressed="true"],
.swatch[aria-pressed="true"]:hover {
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .14),
    0 0 0 2px var(--bg),
    0 0 0 3.5px var(--ink);
}
.swatch-all {
  flex: none;
  padding: 4px 2px 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transition: color .25s ease;
}
@media (hover: hover) { .swatch-all:hover { color: var(--ink); } }
.swatch-all[aria-pressed="true"] { color: var(--ink); }
.swatch-all[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 3px; }
.filters.is-instant .mat-indicator,
.filters.is-instant .swatch-slot,
.filters.is-instant .swatch,
.filters.is-instant .swatch-all,
.filters.is-instant .materials button { transition: none; }

.rack {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: #c8c8c2 transparent;
  scrollbar-width: thin;
}
.rack:focus-visible { outline: none; }
.rack-inner {
  position: relative;
  width: max-content;
  min-width: 100%;
  padding: 50px 36px 28px;
}
/* A steel tube on two ceiling drops, with end caps. */
.rail {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--steel-tube);
  box-shadow: 0 3px 4px -1px rgba(20, 20, 18, .22);
}
.rail::before,
.rail::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--steel-rod);
  box-shadow: 0 1px 2px rgba(20, 20, 18, .25);
}
.rail::before { left: -4px; }
.rail::after { right: -4px; }
.rack .rail {
  position: absolute;
  top: 38px;
  left: 28px;
  right: 28px;
}
.drop {
  position: absolute;
  top: -30px;
  width: 4px;
  height: 31px;
  background: var(--steel-rod);
}
/* Ceiling plate */
.drop::before {
  content: "";
  position: absolute;
  top: 0;
  left: -9px;
  width: 22px;
  height: 4px;
  border-radius: 1px;
  background: var(--steel-tube);
  box-shadow: 0 1px 1px rgba(20, 20, 18, .2);
}
/* Collar where the drop meets the tube */
.drop::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 10px;
  height: 6px;
  border-radius: 2px;
  background: var(--steel-rod);
}
.rail > .drop:first-child { left: 42px; }
.rail > .drop:last-child { right: 42px; }

/* Slots sit on the rail at --x, set by the rail physics in rail.js. Only the
   sheet itself takes the pointer, so a sheet seen edge-on is hit where it
   is drawn, not across its full width. */
.sheets {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.slot {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;               /* the sheet overflows both ways from --x */
  display: flex;
  justify-content: center;
  transform: translateX(var(--x, 0px));
  pointer-events: none;
}
/* Beats the inline z-index the rail sets on sheets still turning back. */
.slot.is-active { z-index: 3 !important; }
/* Behind the sheets that stay, so a departure does not cover the result. */
.slot[data-leaving],
.slot[data-leaving] .hang,
.slot[data-leaving] .hit { pointer-events: none; }
.slot[data-leaving] { z-index: 0; }
.slot.arrive { animation: sheet-arrive .52s cubic-bezier(.16, .84, .3, 1) both; }
@keyframes sheet-arrive { from { opacity: 0; } to { opacity: 1; } }
.slot .hang { pointer-events: auto; }
/* An invisible strip over the sheet's share of the rail, so an edge-on
   sheet is as easy to find as its spacing allows. */
.hit {
  position: absolute;
  top: -24px;
  left: calc(var(--hit, 0px) / -2);
  width: var(--hit, 0px);
  height: calc(var(--h) + var(--k) * 12px);
  pointer-events: auto;
}
.rack .hang, .rack .board { transform-style: preserve-3d; }
.rack .hang { transition: none; }

.hang {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  transform: rotate(var(--lean));
  transform-origin: 50% calc(var(--k) * 1.55px);
  transition: transform .45s ease;
}
.hang:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }
/* On the rail the sheet is turned in 3D, which would skew its outline, so
   the focus ring goes on the sheet's flat hit strip instead. */
.rack .hang:focus-visible { outline: none; }
.slot:has(.hang:focus-visible) .hit { outline: 2px solid var(--ink); outline-offset: 6px; }

.hanger-svg {
  display: block;
  width: calc(var(--k) * 8.6px);
  height: calc(var(--k) * 15px);
  margin-top: calc(var(--k) * -1.15px);
  margin-bottom: calc(var(--k) * -4.15px);
  overflow: visible;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.rack .hanger-svg { margin-top: calc(var(--k) * -1.15px - 18px); }
.board {
  position: relative;
  z-index: 1;
  width: var(--w);
  height: var(--h);
  background: var(--tone, #ccc);
  box-shadow:
    var(--t) 0 0 color-mix(in srgb, var(--tone, #ccc) 55%, #161616),
    calc(var(--k) * 0.35px) calc(var(--k) * 1.3px) calc(var(--k) * 1.6px) rgba(20, 20, 18, .16);
}
/* The crop itself lives in face.css, shared with checkout. */
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(0, 0, 0, .06);
}
/* The sheet's thickness, folded back from the right edge. It shows when
   the sheet hangs edge-on and disappears when it faces the room. */
.edge {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--t);
  height: 100%;
  background: color-mix(in srgb, var(--tone, #ccc) 55%, #161616);
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
  pointer-events: none;
}
/* Steel clamp across the top edge, about 30 cm long, shorter on narrow
   offcuts. Two screws hold the jaws shut. */
.clamp {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: calc(var(--k) * -1.2px);
  width: min(calc(var(--w) * .84), calc(var(--k) * 30px));
  height: calc(var(--k) * 2.6px);
  transform: translateX(-50%) translateZ(.5px);
  border-radius: 2px;
  background: var(--steel-tube);
  box-shadow: 0 1px 2px rgba(20, 20, 18, .3);
}
.clamp::before,
.clamp::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(var(--k) * 1.1px);
  height: calc(var(--k) * 1.1px);
  margin-top: calc(var(--k) * -.55px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c9c9c3, #4a4a45 70%);
}
.clamp::before { left: calc(var(--k) * 1.2px); }
.clamp::after { right: calc(var(--k) * 1.2px); }
/* Paper tickets. The size tag hangs on a short string from the middle of
   the clamp and turns with the sheet. A stack also carries a count, which
   stays facing the room while the sheet hangs edge-on and gives way to the
   size tag once the sheet is pulled out. */
.tag, .count {
  position: absolute;
  z-index: 3;
  white-space: nowrap;
  padding: 2px 4px 1px;
  background: #f4f1e8;
  color: #2a2824;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .14);
  pointer-events: none;
}
.tag {
  top: calc(var(--k) * 1.4px + 5px);
  left: 50%;
  transform: translateX(-50%) translateZ(1px);
}
.count {
  top: calc(var(--k) * 6.4px + 5px);
  left: 0;
  transform: translateX(-50%);
  transition: opacity .15s ease;
}
.count:empty { display: none; }
.slot.is-active .count,
.slot.lifted .count { opacity: 0; }
.tag::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 1px;
  height: 5px;
  background: #8d887e;
}
/* Sold, or on hold while someone pays: greyed out, but left hanging so the
   size still shows. */
.slot.sold .board, .mount.sold .board { filter: grayscale(1); opacity: .45; }
.slot.sold .tag { color: var(--sold); }
/* The last few of a stack: the ticket turns plasticiet's orange. Gone: it
   says so, on the sold colour, and the sheet stays to show its size. */
.slot.low .count { background: #ff6200; color: #fff; font-weight: 700; }
.slot.sold .count { background: var(--sold); color: #f4f1e8; }
.slot.in-cart .tag, .slot.in-cart .count { background: var(--ink); color: var(--bg); }
.slot.in-cart .tag::before { background: var(--ink); }

.caption { margin: 18px 0 0; text-align: center; min-height: 3.1em; }
.caption .cn { display: block; font-size: 15px; }
.caption .cs { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
/* A real sale of the last half hour, with a small orange dot. */
.just-sold { margin: 8px 0 0; text-align: center; color: var(--soft); font-size: 13px; }
.just-sold::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: #ff6200; }
.just-sold[hidden] { display: none; }
.viewing { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.viewing-who { margin: 2px 0 0; text-align: center; color: var(--muted); font-size: 12px; font-style: italic; opacity: .8; }

/* The queue is the same paper as the rail, with the count and nothing else. */
.queue {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--bg);
}
.queue-text { width: min(26rem, 100%); text-align: center; }
.queue h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  outline: none;
}
.queue p { margin: 10px 0 0; color: var(--muted); }

.room-end {
  position: relative;
  padding: 28px 32px 0;
}
.note {
  width: min(38rem, calc(100% - 64px));
  margin: 0 auto;
}
/* On a wide screen the legs hang beside the note and Practical Information,
   from the top, so neither waits below them. */
.legs {
  position: absolute;
  right: 32px;
  top: 28px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 0;
}
.leg { width: 8.25rem; margin: 0; }
.leg img { display: block; width: auto; max-width: 100%; height: 248px; }
.leg[data-piece="mop-half-leg"] img { height: 150px; }
.leg figcaption { margin-top: 8px; }
.leg-name, .leg-price { display: block; font-size: 13px; line-height: 1.35; }
.leg-price { margin-top: 2px; font-variant-numeric: tabular-nums; }
.leg button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 8px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
}
.leg button:disabled { opacity: .35; cursor: default; }
.leg.is-gone img { opacity: .4; }
@media (hover: hover) {
  .leg button:hover:not(:disabled) { background: var(--ink-hover); }
}
/* Below 1280px they would touch the centred text, so they follow the note. */
@media (max-width: 1280px) {
  .legs { position: static; justify-content: flex-end; margin-top: 28px; }
}
.note p { margin: 0 0 12px; color: var(--soft); }
.note a, .fine-note a, .prose a, .foot a { text-underline-offset: 2px; }
.fine-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- practical information, under the rail ---------- */
.day {
  width: min(38rem, calc(100% - 64px));
  margin: 0 auto 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.day h2 { margin: 0 0 14px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.day a { text-underline-offset: 2px; }
/* The day, the hours and the place first, as the invoice's Collection block. */
.day-when { padding: 14px 16px; background: var(--paper); border-left: 3px solid var(--ink); }
.day-when p { margin: 0; }
.day-date { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.day-time { margin-top: 2px !important; color: var(--soft); }
.day-place { margin-top: 6px !important; }
.day-facts { margin: 18px 0 0; }
.day-facts > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.day-facts > div:last-child { border-bottom: 1px solid var(--line); }
.day-facts dt { font-weight: 600; }
.day-facts dd { margin: 0; color: var(--soft); }
.day-final { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
/* Only what goes wrong if missed: the day, the transport, final sales. */
.day-facts strong, .day-final strong { color: var(--ink); font-weight: 600; }
/* A phone: each label over its answer. */
@media (max-width: 560px) {
  .day-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .day-facts dt, .day-facts dd { font-size: 15px; }
}

/* ---------- footer ---------- */
.foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
/* Who made the site, kept faint. */
.credit { font-size: 12px; text-decoration: none; opacity: .6; transition: opacity .25s ease; }
.credit:hover, .credit:focus-visible { opacity: 1; text-decoration: underline; }

/* ---------- detail ---------- */
/* The detail view floats over the rail rather than replacing it, so the
   rail stays in view, softened, behind the lifted sheet. */
.detail {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  /* A window shorter than the card scrolls it, so Add is always in reach. */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(.85);
  backdrop-filter: blur(10px) saturate(.85);
}
/* A bar across the top of an open sheet, like the header it covers: the way
   back on the left, the cart on the right. Both stay put while the card
   scrolls. */
.detail::before {
  content: "";
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.detail > .detail-close {
  position: fixed;
  top: 0;
  left: 28px;
  z-index: 3;
  height: 56px;
  margin: 0 -8px;
  padding: 0 8px;
  background: none;
  border: 0;
  font-size: 15px;
}
@media (hover: hover) { .detail-close:hover { text-decoration: underline; text-underline-offset: 3px; } }
.detail-cart { position: fixed; top: 17px; right: 28px; z-index: 3; }
.detail-stage {
  position: relative;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 64px 32px 40px;
  cursor: zoom-out;
}
.mount {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 30px 40px rgba(20, 20, 18, .18));
  cursor: default;
}
.detail .hang { cursor: default; }
.dims { position: relative; margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.detail-info {
  position: relative;
  max-width: 420px;
  margin: 80px 56px 24px 0;   /* clear of the bar when the card scrolls */
  padding: 28px 28px 20px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 28px 60px -24px rgba(20, 20, 18, .3);
}
.card-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  margin-top: 10px;
}
.card-nav button {
  padding: 10px 0;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 14px;
}
@media (hover: hover) { .card-nav button:hover:not(:disabled) { border-color: var(--ink); } }
.card-nav button:disabled { opacity: .35; cursor: default; }
.slot.lifted .hang { visibility: hidden; }
.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.detail-info h1 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.blurb { margin: 0 0 22px; color: var(--soft); max-width: 38ch; }
.specs {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 7px 12px;
  margin: 0 0 20px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.specs dt { margin: 0; color: var(--muted); }
.specs dd { margin: 0; }
.specs .flaws { font-weight: 600; }
.specs s { color: var(--muted); }
.specs dd small { margin-left: 4px; color: var(--muted); font-size: 12px; }
.detail-info .pickup {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 16px;
  font-size: 14px;
}
.price {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.price s { margin-right: 6px; color: var(--muted); font-size: 15px; letter-spacing: 0; }
.price small { margin-left: 4px; color: var(--muted); font-size: 13px; }
.qty-total { display: block; margin-top: 2px; font-size: 14px; }
/* What is already in the cart from this hanger, with the way to it. */
.kept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #ff6200;
  background: #fff3ea;
  font-size: 14px;
  font-weight: 600;
}
.kept[hidden] { display: none; }
.kept b { margin-right: 4px; color: #d94f00; }
.kept button { flex: none; background: none; border: 0; padding: 4px 0; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.buy.is-added { background: #d94f00; }
.cart-msg { margin: 10px 0 0; color: #8d2f2f; font-size: 13px; line-height: 1.4; }
.cart-msg[hidden] { display: none; }
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.qty button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 20px;
}
.qty button:disabled { opacity: .35; }
.qty-n { min-width: 2ch; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.qty-of { color: var(--muted); font-size: 13px; }
.buy {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  text-decoration: none;
  font-size: 15px;
}
@media (hover: hover) {
  .buy:hover { background: var(--ink-hover); }
  .buy.is-added:hover { background: #d94f00; }
}
.buy:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

/* ---------- cart ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 20, 18, .28);
}
.drawer {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--line);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.drawer-head button { background: none; border: 0; font-size: 14px; padding: 6px 0; }
@media (hover: hover) { .drawer-head button:hover { text-decoration: underline; text-underline-offset: 3px; } }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.drawer-body .cart-msg { margin: 12px 24px 0; }
.lines { list-style: none; margin: 0; padding: 4px 24px; }
.lines li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.lines .thumb { position: relative; width: 56px; height: 72px; overflow: hidden; background: #eceae4; }
.lines .meta { font-size: 14px; }
.lines .meta small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.lines .end { text-align: right; }
.line-price { display: block; font-variant-numeric: tabular-nums; font-size: 14px; }
.line-price s, .line-price small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.line-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.line-qty button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 16px;
}
.line-qty button:disabled { opacity: .35; }
.line-qty span { min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.remove {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (hover: hover) { .remove:hover { color: var(--ink); } }
.lines .empty { display: block; border: 0; padding: 48px 0; text-align: center; color: var(--muted); }
.drawer-foot {
  padding: 16px 24px 20px;
  display: grid;
  gap: 12px;
}
/* Only the way to pay stays pinned, so a long cart on a small phone still
   shows its sheets. */
.drawer-pay {
  padding: 12px 24px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.buy-total { font-variant-numeric: tabular-nums; }
.drawer-foot .pickup { margin: 0; font-size: 13px; color: var(--soft); }
.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.totals dt { color: var(--muted); }
.totals dt small { font-size: 12px; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { color: var(--ink); font-size: 16px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- terms ---------- */
.prose {
  width: min(40rem, calc(100% - 48px));
  margin: 36px auto 72px;
}
.prose h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.prose h2 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; }
.prose p { margin: 0 0 12px; color: var(--soft); }

/* A phone held either way: narrow, or short in landscape. */
@media (max-width: 860px), (max-height: 500px) {
  .topbar, .foot { padding-left: 16px; padding-right: 16px; }
  .wordmark img { width: 108px; }
  .toplink { font-size: 16px; }
  .cart-btn { font-size: 15px; }
  .rack-inner { padding-left: 16px; padding-right: 16px; }
  .filters { padding: 14px 16px 0; }
  /* The colours scroll sideways on a phone; fade the edge so they look it,
     with room at the end to scroll the last one clear of the fade. The
     materials scroll too once there are more than fit. */
  .swatches, .materials { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .swatches {
    justify-content: flex-start; padding: 4px 32px 4px 0;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .swatches::-webkit-scrollbar, .materials::-webkit-scrollbar { display: none; }
  .swatch, .materials button { flex: none; }
  .mat-long { display: none; }
  .mat-short { display: inline; }
  .tag, .count { font-size: 11px; }
  .room-end { padding: 28px 16px 0; }
  .note { width: auto; }
  .day { width: auto; margin: 0 16px 40px; }
  .leg img { height: 200px; }
  .leg[data-piece="mop-half-leg"] img { height: 121px; }
  .detail { display: block; }
  .detail-stage { height: auto; padding: 72px 16px 8px; }
  .detail > .detail-close { left: 16px; }
  .detail-cart { right: 16px; }
  .detail-info { max-width: none; margin: 0 16px 32px; padding: 20px 18px 16px; }
  .detail-info h1 { font-size: 28px; }
  /* Keep the price and the button in reach while the details scroll: the
     quantity beside the price, the button under both. */
  .buy-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin: 0 -18px;
    padding: 12px 18px;
    background: var(--paper);
    box-shadow: 0 -1px 0 var(--line);
  }
  .buy-bar .price { flex: none; margin: 0; line-height: 1.1; }
  .buy-bar .price s { display: block; margin: 0; font-size: 12px; }
  .buy-bar .kept { flex: 1 0 100%; margin: 0; }
  .buy-bar .qty { flex: 1 1 auto; justify-content: flex-end; gap: 6px; margin: 0; }
  .buy-bar .buy { flex: 1 0 100%; }
  .buy-bar .cart-msg { flex: 1 0 100%; margin-top: 2px; }
  .buy-bar .qty[hidden] + .buy { flex: 1 1 auto; }
  /* One line: the short form of each, every link still a fingertip tall
     without making the line taller. */
  .foot { flex-wrap: nowrap; align-items: baseline; gap: 12px; font-size: 12px; white-space: nowrap; }
  .foot > * { padding: 12px 0; margin: -12px 0; }
  .foot .long { display: none; }
}

/* A phone on its side: less around the rail, and the add bar scrolls with
   the card instead of covering half the screen. */
@media (max-height: 500px) {
  .topbar { padding-top: 12px; padding-bottom: 10px; }
  .online-offer { padding-top: 8px; padding-bottom: 8px; }
  .filters { padding-top: 8px; }
  .room { padding-top: 0; }
  .buy-bar { position: static; }
  .detail::before { height: 48px; }
  .detail > .detail-close { height: 48px; }
  .detail-cart { top: 13px; }
  .detail-stage { padding-top: 60px; }
}

/* Fingers need about 44px. Grow the hit area, not the layout. */
@media (pointer: coarse) {
  .toplink, .cart-btn { padding: 12px 8px; margin: -12px -8px; }
  .cart-btn.has-items { padding-top: 11px; padding-bottom: 11px; margin: -11px 0; }
  .materials button { padding-top: 12px; padding-bottom: 12px; }
  .swatch-all { padding-top: 12px; padding-bottom: 12px; }
  /* Bigger colours, each a fingertip across. */
  .swatch { width: 30px; height: 30px; margin: 7px 4px; }
  .card-nav button { padding: 12px 0; }
  .remove { padding: 14px 0 12px; margin-top: -8px; margin-bottom: -12px; }
  .line-qty button { width: 44px; height: 44px; }
  .drawer-head button { padding: 12px 8px; margin: -12px -8px; }
  .leg button { padding-top: 13px; padding-bottom: 13px; }
  .kept button { padding: 12px 0; margin: -8px 0; }
  .offer-close { top: 8px; right: 10px; padding: 14px; }
  .offer-cta { min-height: 44px; }
  /* A plain veil instead of a full-screen blur, which is slow on cheaper phones. */
  .detail-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }
}

/* Taps on the rail and its controls answer at once: no double-tap zoom, no
   tap flash, and no image menu on a long press. */
.rack, .filters, .legs, .detail, .drawer { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.rack, .detail-stage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) {
  .hang, .mat-indicator, .swatch-slot, .swatch, .swatch-all, .materials button { transition: none; }
  .slot.arrive { animation: none; }
}
