/* Timbre (DEMOS_PLAN.md D5): a fictional audio brand's launch page for one product, Timbre One. Its own brand, nothing
   of Sunglint's: the warm stone ground the headphones are lit on (the 3D view is drawn on it, transparent, so the page
   and the scene are one surface), near-black ink, Manrope alone, round where a hand would touch (pills, dots) and
   square everywhere else. The product carries it: hairlines between things, one dark band for the close-ups, nothing
   that moves on its own. Every text pair passes WCAG AA; no text is set over the 3D view or a picture. */
/* fonts.mjs: begin (written by tools/fonts.mjs; do not edit by hand) */
@font-face {
  font-family: "Manrope";
  src: url("/demos/ecommerce/fonts/manrope.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
/* fonts.mjs: end */

:root {
  --ground: #D8D5CF;      /* the studio's ground: tools/timbre-look.mjs and the stills are drawn on it */
  --ink: #1B1A18;         /* 11.6 : 1 on the ground */
  --ink-2: #48443E;       /* 6.4 : 1 on the ground */
  --line: #B4AFA6;        /* hairlines (decoration, not a control's edge) */
  --edge: #6F6A62;        /* a control's edge: 3.6 : 1 on the ground, 4.4 : 1 on the panel */
  --panel: #F2F0EC;
  --dark: #1B1A18;
  --on-dark: #ECE9E3;     /* 14.9 : 1 on dark */
  --on-dark-2: #B3AEA6;   /* 7.8 : 1 on dark */
  --error: #9E2A1C;       /* 6.3 : 1 on the panel */
  --gut: 32px;
  --bar: 36px;            /* the demo's own label, above everything (the dialogs open below it) */
  --head: 60px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar) + var(--head)); scroll-padding-bottom: 72px; }   /* a section lands flush under the
   header; a focused control is never scrolled under the buy bar */
/* One scrollbar: the open dialog's own (D5b). The page's goes, and the page is held where it was by its width (app.js
   measures it as --sbw), so nothing behind the backdrop moves and the backdrop and the sheet reach the window's edge
   (D6: a reserved gutter stayed outside both as a pale strip). */
html:has(dialog[open]) { overflow: hidden; padding-right: var(--sbw, 0px); }
body { margin: 0; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gut); }

/* The way in and the demo's own label. */
.skip { position: fixed; left: var(--gut); top: calc(var(--bar) + var(--head) + 48px); z-index: 40; padding: 10px 16px; background: var(--ink); color: var(--ground);
  font-weight: 600; text-decoration: none; border-radius: 999px; transform: translateY(-400px); }   /* off screen until focused */
.skip:focus-visible { transform: none; }
/* The demo's label stays in view (D5b), so "nothing is sold" is on screen whenever an address is asked for. */
.demo-bar { position: sticky; top: 0; z-index: 21; display: flex; align-items: center; gap: 16px; height: var(--bar); padding: 0 var(--gut); background: var(--ink);
  color: var(--on-dark); font-size: 13px; }
.demo-bar p { color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar .short { display: none; }
.demo-bar :focus-visible { outline-color: var(--on-dark); }
.back { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* The header: the wordmark, three sections and the bag. Over the one dark band it turns ink (app.js), so it never caps
   the band as a pale lid (D5b). The wordmark is set as the face plate's etch is: Manrope 600 in spaced capitals. */
.top { position: sticky; top: var(--bar); z-index: 20; background: var(--ground); border-bottom: 1px solid var(--line);
  transition: background-color 200ms, color 200ms, border-color 200ms; }
.top.on-dark { background: var(--dark); color: var(--on-dark); border-bottom-color: #3A3833; box-shadow: inset 0 1px #3A3833; }   /* apart from the label */
.top.on-dark .bag-btn { border-color: var(--on-dark-2); }
.top.on-dark .count { background: var(--on-dark); color: var(--dark); }
.top.on-dark :focus-visible { outline-color: var(--on-dark); }
.top-in { display: flex; align-items: center; gap: 32px; height: var(--head); }
.logo { font-weight: 600; font-size: 16px; letter-spacing: 0.24em; text-transform: uppercase; margin-right: -0.24em; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.bag-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 16px; border: 1px solid var(--edge);
  border-radius: 999px; background: transparent; font-size: 15px; font-weight: 600; cursor: pointer; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  background: var(--ink); color: var(--ground); font-size: 13px; font-variant-numeric: tabular-nums; }

/* The hero: the headphones on the left, everything needed to buy them on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center;
  padding-top: 24px; padding-bottom: 56px; }
.stage { position: relative; aspect-ratio: 6 / 5; }
@media (min-width: 1000px) {   /* the first view is the hero alone: no band of the next section closes it (D5b) */
  .hero { min-height: calc(100svh - var(--bar) - var(--head) - 1px); }
}
.still { position: absolute; inset: 0; }
.still img { width: 100%; height: 100%; }
.still.on { z-index: 1; }
#c { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#c:active { cursor: grabbing; }
#c:focus-visible { outline-offset: -2px; }
.live .still { visibility: hidden; }
.stage-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.stage-note b { font-weight: 600; color: var(--ink); }
.stage-note .desc { display: none; }   /* the phone's descriptor (below 640 px the kicker moves here) */

.buy { display: grid; grid-template-areas: "kicker" "name" "lead" "price" "cw" "add" "added" "promises"; align-content: center; }
.kicker { grid-area: kicker; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
h1 { grid-area: name; margin-top: 10px; font-size: clamp(44px, 6vw, 88px); font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; }
.lead { grid-area: lead; margin-top: 20px; max-width: 30em; font-size: 19px; color: var(--ink-2); }
.buy .price { grid-area: price; margin-top: 24px; }
.price .amount { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price .vat { font-size: 14px; color: var(--ink-2); margin-left: 6px; }

.cw { grid-area: cw; margin-top: 24px; }
.cw legend { padding: 0; font-size: 15px; color: var(--ink-2); }
.cw legend span { color: var(--ink); font-weight: 600; }
.swatches { display: flex; gap: 18px; margin-top: 12px; }
.sw { position: relative; display: grid; justify-items: center; gap: 6px; flex: 0 0 64px; cursor: pointer; font-size: 13px; color: var(--ink-2); }   /* a fixed width: the chosen name's bold moves nothing */
.sw input { position: absolute; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.dot { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(27 26 24 / 0.35); }
.sw input:checked + .dot { outline: 2px solid var(--ink); outline-offset: 3px; }
.sw input:checked ~ .sw-name { color: var(--ink); font-weight: 600; }
.sw input:focus-visible + .dot { outline: 2px dashed var(--ink); outline-offset: 5px; }
/* timbre-swatches: each colourway's shell | leather as its still draws them (tools/timbre-stills.mjs); never by hand */
.sw-graphite .dot { background: linear-gradient(135deg, #474749 50%, #434240 50%); }
.sw-sand .dot { background: linear-gradient(135deg, #aea89e 50%, #917f6d 50%); }
.sw-moss .dot { background: linear-gradient(135deg, #646c59 50%, #4e4e45 50%); }
.sw-chalk .dot { background: linear-gradient(135deg, #b8b5b1 50%, #a29b91 50%); }
/* timbre-swatches: end */

.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 28px; border: 1px solid var(--ink);
  border-radius: 999px; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--ground); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn.wide { width: 100%; }
.buy .add { grid-area: add; margin-top: 28px; justify-self: start; min-width: 240px; }
.added { grid-area: added; min-height: 24px; margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.added button { padding: 0; border: 0; background: none; font-weight: 600; color: var(--ink); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; }
.promises { grid-area: promises; display: grid; gap: 6px; margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--ink-2); }

/* The close-ups, on the one dark band. */
.details { background: var(--dark); color: var(--on-dark); padding: 96px 0; }
.details :focus-visible { outline-color: var(--on-dark); }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: end; margin-bottom: 48px; }
h2 { font-size: clamp(32px, 4vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; }
.sec-head p { max-width: 34em; color: var(--on-dark-2); font-size: 18px; }
/* Each close-up at its own shape: the cup wide beside the yoke tall, three across, the edge-lit whole headphone as a
   strip. The yoke is cut a little to stand as tall as the cup (8 and 4 columns of 12). */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px 24px; }
.tile { grid-column: span 4; }
.tile img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #2a2926; }
.t-cup { grid-column: span 8; }
/* The first pair stands exactly as tall: both images are given the cup's height (8 columns at 3 : 2), worked out from
   the grid's own width, so the two never round apart. */
.tiles { container-type: inline-size; --pair: calc(((100cqw - 264px) * 8 / 12 + 168px) / 1.5); }
.t-cup img, .t-yoke img { height: var(--pair); aspect-ratio: auto; }
.t-edge { grid-column: span 12; }
.t-edge img { aspect-ratio: 2 / 1; background: var(--dark); }   /* on the band's own ink (tools/timbre-stills.mjs) */
.tile h3 { margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.tile p { margin-top: 6px; font-size: 15px; color: var(--on-dark-2); max-width: 30em; }

/* Sound: the profile chosen, its curve. */
.sound { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "text curve" "figures figures";
  gap: 48px 56px; padding-top: 112px; padding-bottom: 112px; align-items: center; }
.sound-text { grid-area: text; }
.sound-text > p { margin-top: 20px; color: var(--ink-2); font-size: 18px; }
.seg { display: inline-flex; margin-top: 28px; padding: 4px; border: 1px solid var(--edge); border-radius: 999px; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.seg input:checked + span { background: var(--ink); color: var(--ground); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.profile-note { margin-top: 14px; min-height: 3.1em; font-size: 15px; color: var(--ink-2); }
.curve { grid-area: curve; }
.curve svg { width: 100%; height: auto; color: var(--ink-2); }
.curve figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.curve .grid { stroke: var(--line); stroke-width: 1; }
.curve .zero { stroke: var(--edge); stroke-width: 1; stroke-dasharray: 4 4; }
.curve .label { fill: currentColor; font: 500 12px var(--font); }
.curve .resp { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.curve .band { fill: var(--ink); fill-opacity: 0.06; }
.figures { grid-area: figures; display: grid; grid-template-columns: calc((100% - 56px) * 5 / 12 + 56px) repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line); }   /* the second figure's rule where the curve starts */
.figures li { display: grid; gap: 4px; padding: 24px 24px 0 0; }
.figures li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.figures b { font-size: clamp(32px, 3.4vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.figures span { font-size: 15px; color: var(--ink-2); }

/* Specifications: the drawing to scale beside one hairline per row. */
.specs { border-top: 1px solid var(--line); }
.specs-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; padding-top: 96px; padding-bottom: 96px; }
.drawing { margin-top: 40px; }
.dwg { position: relative; }
.dwg img { width: 100%; height: auto; }
.dims { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dims path { fill: none; vector-effect: non-scaling-stroke; }
.dims .ext { stroke: var(--edge); stroke-width: 1; }
.dims .dim, .dims .tick { stroke: var(--ink); stroke-width: 1; }
/* The labels at the dimension lines' middles, in the drawing's own millimetres (art/timbre/drawing.py's FRAME:
   428 x 246 mm, y down from 210 mm above the floor). */
.dim-l { position: absolute; transform: translate(-50%, -50%); padding: 0 4px; background: var(--ground); font-size: 13px;
  font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dim-w { left: 29.907%; top: 91.06%; }
.dim-d { left: 83.645%; top: 91.06%; }
.dim-h { left: 3.738%; top: 45.53%; transform: translate(-50%, -50%) rotate(-90deg); }
.drawing figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.spec-list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec-list > div:first-child { border-top: 1px solid var(--line); }
.spec-list dt { font-weight: 600; }
.spec-list dd { color: var(--ink-2); text-wrap: pretty; }

.last { border-top: 1px solid var(--line); }   /* full width, as the specs' rule above it */
.last-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 72px; padding-bottom: 96px; }
.last h2 { flex: 1 1 100%; }
.last .price { margin-right: auto; }

.foot { background: var(--dark); color: var(--on-dark-2); padding: 48px 0; font-size: 14px; }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: baseline; }
.foot .logo { color: var(--on-dark); }
.foot p { max-width: 56em; }
.foot a { color: var(--on-dark); text-underline-offset: 3px; }
.foot :focus-visible { outline-color: var(--on-dark); }

/* The buy bar (D6, the critic's round-2 note): once the hero's button has scrolled away, buying stays one click off,
   until the closing section offers its own (app.js shows it while neither is in view). */
.buybar { position: fixed; inset: auto 0 0; z-index: 19; background: var(--panel); border-top: 1px solid var(--line); }
.buybar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.bb-what { margin-right: auto; font-size: 15px; color: var(--ink-2); }
.bb-what b { margin-right: 6px; font-weight: 700; color: var(--ink); }
.bb-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.buybar .btn { height: 44px; padding: 0 22px; font-size: 15px; }

/* The bag and the checkout: modal dialogs (the browser keeps the focus inside and Escape closes them), each a sheet
   from the right that opens below the demo's label, so "nothing is sold" stays readable while an address is asked for. */
dialog { padding: 0; border: 0; background: var(--panel); color: var(--ink); }
dialog::-webkit-scrollbar { width: 8px; }
dialog::-webkit-scrollbar-thumb { background: var(--edge); border: 2px solid var(--panel); border-radius: 999px; }
dialog::-webkit-scrollbar-button { display: none; }
@supports not selector(::-webkit-scrollbar) { dialog { scrollbar-width: thin; scrollbar-color: var(--edge) transparent; } }
dialog::backdrop { top: var(--bar); background: rgb(27 26 24 / 0.5); }
.drawer, .checkout { max-width: 100%; height: calc(100% - var(--bar)); max-height: none; margin: var(--bar) 0 0 auto; }
.drawer { width: min(440px, 100%); }
.drawer-in { display: flex; flex-direction: column; min-height: 100%; padding: 24px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 24px; letter-spacing: -0.02em; }
.close { width: 44px; height: 44px; border: 1px solid var(--edge); border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; }
.empty { margin-top: 24px; color: var(--ink-2); }
.lines { display: grid; gap: 0; margin-top: 8px; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line .thumb { grid-row: span 2; width: 72px; height: 72px; background: var(--ground); }   /* the whole headphone: its phone still */
.line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line .what { font-weight: 600; }
.line .what span { display: block; font-weight: 400; font-size: 14px; color: var(--ink-2); }
.line .cost { align-self: start; font-weight: 600; font-variant-numeric: tabular-nums; }   /* on the name's line */
.line .qty { grid-column: 2 / 4; display: flex; align-items: center; gap: 4px; }
.line span.qty { font-size: 14px; color: var(--ink-2); }   /* "Quantity 1" at the colour line's size */
.qty button { width: 36px; height: 36px; border: 1px solid var(--edge); border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; }
.qty output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty .remove { width: auto; height: auto; margin-left: auto; padding: 4px 0; border: 0; border-radius: 0; font-size: 14px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px; }
.sums { display: grid; gap: 8px; margin-top: 20px; font-size: 15px; }
.sums > div { display: flex; justify-content: space-between; gap: 16px; }
.sums dt { color: var(--ink-2); }
.sums dd { font-variant-numeric: tabular-nums; }
.sums .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.sums .total dt { color: var(--ink); }
.drawer-foot { display: grid; gap: 10px; padding-top: 24px; }
.bag-promises { display: grid; gap: 4px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }

.checkout { width: min(1000px, 100%); }
.co-in { padding: 24px 32px 32px; }
.co-note { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.co-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; margin-top: 16px; align-items: start; }
.co-fields fieldset + fieldset, .co-fields .pay { margin-top: 28px; }
.co-fields legend, .pay h3, .co-sum h3 { padding: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700; line-height: 1.2; }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field label { font-size: 15px; font-weight: 600; }
/* Square, as every box that is not a pill (D5b: fields, cards and the error box had a third radius). */
.field input, .field select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 0; background: #fff; }
.field select { appearance: none; padding-right: 44px; background: #fff no-repeat right 16px center / 12px 8px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231B1A18' stroke-width='1.6'/%3E%3C/svg%3E"); }
.field input:focus-visible, .field select:focus-visible { outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.err { font-size: 14px; color: var(--error); font-weight: 600; }
.err:empty { display: none; }
.row2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 16px; }
.co-error { margin-bottom: 8px; padding: 14px 16px; border: 1px solid var(--error); color: var(--error); font-weight: 600; }
.co-error ul { margin-top: 6px; padding-left: 20px; list-style: disc; font-weight: 500; }
.co-error a { color: var(--ink); text-underline-offset: 3px; }
.opt { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--edge); cursor: pointer; }
.opt + .opt { margin-top: 10px; }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.opt:has(input:checked) { border-color: var(--ink); background: #E7E4DE; }   /* a hairline and a fill */
.opt b { font-weight: 600; margin-right: 6px; }
.opt-price { font-weight: 600; }
.pay { padding: 16px; border: 1px dashed var(--edge); }
.pay h3 { margin-bottom: 6px; }
.pay p { color: var(--ink-2); font-size: 15px; }
.co-sum { padding: 20px; background: #E7E4DE; position: sticky; top: 24px; }
.co-sum .btn { margin-top: 20px; }
.sum-pay { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.co-bar { display: none; }
/* The order placed: what was bought, in its colourway, beside what happens next. */
.done { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; padding: 32px 0 8px; }
.done-pic { aspect-ratio: 1; background: var(--ground); }
.done-pic img { width: 100%; height: 100%; object-fit: contain; }
.done h3 { font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; }
.done-text > p { margin-top: 12px; color: var(--ink-2); }
.done .lines { margin-top: 16px; border-top: 1px solid var(--line); }
.done .line { grid-template-columns: minmax(0, 1fr) auto; }
.done .line .thumb { display: none; }
.done .line .qty { grid-column: 1 / -1; }
.done .sums { margin-top: 12px; }
.done .btn { margin-top: 28px; }

/* Hover styles only where a pointer can hover: on a touch screen a tap leaves :hover on (D6: the phone's sticky Place
   order stayed in its lighter hover ink after a tap and read as disabled). */
@media (hover: hover) {
  .back:hover { text-decoration: underline; text-underline-offset: 3px; }
  .nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
  .bag-btn:hover, .btn.quiet:hover, .close:hover, .qty button:hover { border-color: var(--ink); }
  .top.on-dark .bag-btn:hover { border-color: var(--on-dark); }
  .sw:hover .dot { box-shadow: inset 0 0 0 1px var(--ink); }
  .btn.primary:hover { background: #34322e; }
}

/* The 3D view alone, filling the window: what tools/timbre-stills.mjs and timbre-look.mjs photograph (?frame=1). */
.frame body > :not(main), .frame main > :not(.hero), .frame .buy, .frame .stage-note, .frame .still { display: none; }
html.frame { scrollbar-gutter: auto; overflow: hidden; }   /* the canvas is the whole window: no reserved gutter */
.frame .hero { display: block; padding: 0; max-width: none; }
.frame .stage { position: fixed; inset: 0; aspect-ratio: auto; width: auto; margin: 0; }   /* not the tablet's 560 px (D5b) */

@media (max-width: 999px) {
  :root { --gut: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 8px; }
  .stage-col { margin: 0 calc(-1 * var(--gut)); }
  .stage { width: min(100%, 560px); margin-inline: auto; }   /* a tablet keeps the button in its first view */
  .buy { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .buy { grid-template-areas: "kicker kicker" "name price" "cw cw" "add add" "added added" "lead lead" "promises promises"; }
  .kicker { margin-bottom: 8px; }
  h1 { margin-top: 0; font-size: clamp(32px, 10.2vw, 48px); }
  .buy .price { margin-top: 0; text-align: right; }
  .price .amount { font-size: 24px; }
  .buy .price .vat { margin-left: 4px; font-size: 12px; }
  .buy .add { min-width: 280px; }
  .stage-note { padding: 0 var(--gut); }
  .sec-head, .specs-in, .sound { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sound { grid-template-areas: "text" "curve" "figures"; padding-top: 80px; padding-bottom: 80px; }
  /* Two columns: the wide ones across both (the edge-lit strip shows its middle at 3 : 2), the pair cut to 3 : 4. */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .tile, .t-yoke { grid-column: span 1; }
  .t-cup, .t-band, .t-controls, .t-edge { grid-column: span 2; }
  .t-cup img, .t-yoke img { height: auto; }
  .t-cup img { aspect-ratio: 3 / 2; }
  .t-yoke img, .t-cushion img { aspect-ratio: 3 / 4; }
  .t-edge img { aspect-ratio: 3 / 2; }
  .details { padding: 72px 0; }
  .specs-in { padding-top: 72px; padding-bottom: 72px; }
  .co-cols { grid-template-columns: minmax(0, 1fr); }
  .co-sum { position: static; }
  .done { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .done-pic { max-width: 320px; }
}

@media (max-width: 640px) {
  :root { --gut: 16px; --head: 56px; }
  html { font-size: 16px; }
  .demo-bar { font-size: 12px; gap: 12px; }
  .demo-bar .long { display: none; }
  .demo-bar .short { display: inline; }
  .top-in { justify-content: space-between; }
  .nav { display: none; }             /* the wordmark and the bag: the sections are a scroll away (D5b) */
  .bag-btn { padding-left: 12px; font-size: 14px; }
  .stage { aspect-ratio: 10 / 9; }    /* taller than the 6 : 5 (the headphone about 72 % of the width), with its own stills,
                                         and Add to bag still in the first view at 390 x 664 and 360 x 640 */
  .cw legend { float: left; line-height: 40px; }   /* the colourway's name and its four dots on one row */
  .swatches { justify-content: flex-end; gap: 10px; margin-top: 0; }
  .swatches .sw { flex: 0 0 40px; }
  .cw { margin-top: 10px; }
  .cw legend { font-size: 14px; }
  .buy .add { width: 100%; margin-top: 12px; }
  .hero { gap: 10px; padding-top: 0; }   /* the frame has its own air above the headband */
  .stage-note { margin-top: 4px; font-size: 13px; }
  .cw-now { display: none; }          /* the colourway's legend names it a line below */
  .dot { width: 40px; height: 40px; }
  .sw input { width: 40px; height: 40px; }
  .sw { gap: 2px; }
  .sw-name { font-size: 12px; line-height: 16px; white-space: nowrap; }
  .added { margin-top: 6px; }
  .lead { margin-top: 12px; font-size: 17px; }
  .tile h3 { font-size: 16px; }
  .tile p { font-size: 14px; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .kicker { display: none; }          /* the descriptor rides the note row under the stage (D6) */
  .stage-note .desc { display: inline; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
  .figures li, .figures li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .co-in { padding: 16px 16px 0; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  /* The total and the button stay in view while the fields are filled, and when the form is refused. */
  .co-sum .btn { display: none; }
  .co-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin: 24px -16px 0; padding: 12px 16px; background: var(--panel); border-top: 1px solid var(--line); }
  .co-bar p { font-size: 15px; color: var(--ink-2); }
  .co-bar b { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
  .co-bar .btn { height: 48px; padding: 0 22px; }
  .done { padding-bottom: 24px; }
  .buybar-in { gap: 14px; height: 60px; }
  .bb-what { font-size: 13px; line-height: 1.3; }
  .bb-what b { display: block; margin: 0; font-size: 15px; }
}

/* Under 375 px the legend's name and the four dots do not fit on one row (at 360 the chosen Graphite's ring met the
   name; at 320 every dot did): the chosen colourway is already the bold name under its dot, so the legend keeps its
   name for screen readers only. timbre-check.mjs's `row` holds it. */
@media (max-width: 374px) {
  .cw legend span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Reduced motion: nothing animates (the 3D view is its pictures, app.js). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
