/* ══ Build page — one cloth, presented as a build page ═════════
 * The stylesheet for components/build-page.php alone: the hero, the fabric comparison, the
 * uses, one detail photograph, the seven-step configurator, the questions and the closing band.
 *
 * Every selector sits under .bld (the page's own <main>) or body.build-page, so nothing here
 * reaches another page of the site. The page has its own ground and its own working colour —
 * #F8FAFB paper, #12212E type, #2C5F7D for anything that acts — declared once in the token block
 * below, because no other page is drawn on them. Every colour in the file comes from one of those
 * variables or from tokens.css.
 *
 * Geometry follows the house language in style.css: square corners, 1px hairlines, small spaced
 * capitals for a label or a button. The configurator's state (.is-done, .is-locked, .is-review,
 * .is-over, body.cfg-kbd, aria-checked, aria-selected) belongs to assets/js/product-build.js;
 * this file only paints it.
 */

/* ── tokens, ground and the page's measure ───────────────────────────────────────────────────── */
.bld {
  --bld-paper: #F8FAFB;
  --bld-ink: #12212E;
  --bld-accent: #2C5F7D;
  --bld-white: #FFFFFF;
  --bld-line: #DCE4EA;
  --bld-mute: #5F7381;
  /* the numbered tile's own label: readable on --bld-tint, where --bld-mute is not */
  --bld-label: #43596A;
  --bld-tint: #E9F0F4;
  --bld-bad: #B23E2B;
  --bld-bad-tint: #FBEEEA;
  /* the site's own frame: an 80% column with a 10% gutter either side (tokens.css `--frame`) */
  --bld-gut: var(--frame);
  --bld-max: 100%;

  /* the page paints its own ground edge to edge, so it takes over main's measure and gutter */
  max-width: none;
  margin: 0;
  padding: 0;
  background: var(--bld-paper);
  color: var(--bld-ink);
  font-family: var(--op-f-body), system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

/* Form controls do not inherit type on their own. :where() keeps this rule's weight at one class,
   so a control that does want the display face (a question, a heading-like button) still gets it. */
.bld :where(button, input, textarea, select) { font-family: inherit; color: inherit }

/* The markup switches its panes and its drawers with the `hidden` attribute, and a rule such as
   .cfg-size{display:flex} outranks it, so this one line has to win. */
[hidden] { display: none !important }

/* One measure for every block: the site's own 80% column, with the gutter sitting outside it, so a
   full-bleed band can line its own text up with the columns above it.
   The theme sets no global border-box, and the boxes below state width:100% and carry their own
   gutter: unless they are border-box that gutter is added on top of the window, which pushed the
   whole column past the right edge (the page read as shifted right, its right side cut off). */
.bld-hero,
.bld-sec,
.cfg-shell,
.cfg-sum__head { box-sizing: border-box }

.bld-hero,
.bld-sec {
  width: 100%;
  max-width: calc(var(--bld-max) + 2 * var(--bld-gut));
  margin-inline: auto;
  padding-inline: var(--bld-gut);
  padding-block: clamp(36px, 5vw, 68px);
}

/* ── type: the two faces the site has, and the one under it ─────────────────────────────────── */
.bld-h2 {
  margin: 0 0 var(--s4);
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: clamp(23px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--bld-ink);
  text-wrap: balance;
}

.bld-kicker {
  margin: 0 0 var(--s2);
  max-width: none;
  font-size: var(--op-label);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bld-accent);
}

/* a focus ring of this page's working blue, on anything the keyboard reaches past the site's own */
.bld :focus-visible {
  outline: 2px solid var(--bld-accent);
  outline-offset: 2px;
}

/* the numbered tiles the theme prints while the camera is still out: same tile, this page's grey */
.bld .ph { background: var(--bld-tint) }
.bld .ph__label { color: var(--bld-label) }

/* ── the page's two buttons, and the nav's copy of them ──────────────────────────────────────
 * Solid for the one action, outlined for the other. The configurator's footer uses the same
 * skin under its own class names, so both are declared together and never drift apart. */
.bld-btn,
.cfg-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 15px 30px;
  border: 1px solid var(--bld-ink);
  border-radius: 0;
  background: transparent;
  color: var(--bld-ink);
  font-size: var(--op-label);
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.bld-btn:hover,
.bld-btn:focus-visible,
.cfg-nav__btn:hover,
.cfg-nav__btn:focus-visible {
  background: var(--bld-ink);
  border-color: var(--bld-ink);
  color: var(--bld-white);
}

.bld-btn--primary,
.cfg-nav__btn--primary {
  background: var(--bld-accent);
  border-color: var(--bld-accent);
  color: var(--bld-white);
}

.bld-btn--primary:hover,
.bld-btn--primary:focus-visible,
.cfg-nav__btn--primary:hover,
.cfg-nav__btn--primary:focus-visible {
  background: var(--bld-ink);
  border-color: var(--bld-ink);
  color: var(--bld-white);
}

.bld-btn--ghost {
  background: transparent;
  border-color: var(--bld-ink);
  color: var(--bld-ink);
}

/* a disabled control is greyed unmistakably and cannot be clicked */
.bld-btn:disabled,
.cfg-nav__btn:disabled,
.cfg-nav__btn[disabled] {
  background: var(--bld-tint);
  border-color: var(--bld-line);
  color: var(--bld-mute);
  cursor: not-allowed;
}

/* ── 01 · hero: the claim left, the cloth right ────────────────────────────────────────────── */
.bld-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(28px, 4vw, 56px) clamp(36px, 5vw, 64px);
}

.bld-hero__txt { max-width: 54ch }

.bld-hero h1 {
  margin: 0 0 .5rem;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--bld-ink);
  text-wrap: balance;
}

/* the cloth's own name, under the campaign line and above the sentence */
.bld-hero__name {
  margin: 0 0 var(--s3);
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--bld-accent);
}

.bld-lede {
  margin: 0 0 var(--s4);
  max-width: 46ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--bld-mute);
}

/* the facts the record holds — a strip of square tags, hairlines shared between neighbours */
.bld-chips {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}

.bld-chip {
  margin-left: -1px;
  padding: .5rem .95rem;
  border: 1px solid var(--bld-line);
  background: var(--bld-white);
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--bld-mute);
}

.bld-chip:first-child { margin-left: 0 }

.bld-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 0;
}

/* Landscape, like the photographs themselves: the frame carries the shape of the shots the owner
   uploads, and the picture is fitted into it whole, so no cloth is cropped at the edge of the box. */
.bld-hero__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bld-tint);
}

.bld-hero__media .ph {
  height: 100%;
  aspect-ratio: auto;
}

.bld-hero__media img,
.bld-hero__media .ph__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 03 · where it goes: one square tile per use, all in one row ───────────────────────────
   The row flows along one line whatever the record holds, and the columns share it equally, so a
   fifth or sixth application shrinks the tiles a little instead of starting a second line. */
.bld-uses {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bld-use {
  display: grid;
  gap: .6rem;
  align-content: start;
}

.bld-use .ph {
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* the use's own photograph, in the same square frame the numbered tile keeps: a landscape photo is
   cropped from its middle rather than letterboxed, so the row stays one clean line of squares. */
.bld-use__frame {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bld-tint);
}

.bld-use__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bld-use__label {
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--bld-mute);
}

/* ── 04 · one detail, at close range ─────────────────────────────────────────────────────── */
.bld-detail__fig { margin: 0 }

.bld-detail .ph--wide { width: 100% }

.bld-detail__cap {
  margin: .7rem 0 0;
  max-width: 62ch;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--bld-mute);
}

/* ── 05 · the configurator ────────────────────────────────────────────────────────────────── */
.cfg { scroll-margin-top: var(--s3) }

/* the seven steps: one strip, hairlines shared between cells; the current step is the dark one */
.cfg-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-top: 1px solid var(--bld-ink);
  border-bottom: 1px solid var(--bld-line);
  background: var(--bld-white);
}

.cfg-steps::-webkit-scrollbar { display: none }

.cfg-step {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .5rem;
  min-width: 112px;
  min-height: 56px;
  padding: .8rem .9rem;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: var(--op-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: left;
  color: var(--bld-mute);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}

.cfg-step + .cfg-step { border-left: 1px solid var(--bld-line) }
.cfg-step:hover { background: var(--bld-tint); color: var(--bld-ink) }

.cfg-step__n {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  opacity: .78;
}

.cfg-step__t { flex: 1 1 auto }

/* the current step: solid ink, white label */
.cfg-step[aria-selected="true"] {
  background: var(--bld-ink);
  color: var(--bld-white);
}

.cfg-step[aria-selected="true"] .cfg-step__n { opacity: 1 }

/* a step already answered carries a tick in its own corner, so the name keeps its room */
.cfg-step.is-done::after {
  content: "✓";
  position: absolute;
  top: .3rem;
  right: .35rem;
  font-size: .68rem;
  line-height: 1;
  color: var(--bld-accent);
}

.cfg-step[aria-selected="true"].is-done::after { color: var(--bld-white) }

/* a step not reached yet: quiet, but still legible, and it cannot be clicked */
.cfg-step.is-locked,
.cfg-step:disabled {
  background: none;
  color: var(--bld-mute);
  opacity: .6;
  cursor: default;
}

.cfg-step.is-locked:hover { background: none; color: var(--bld-mute) }

/* the sheet: panes on the left, the running summary on the right */
.cfg-form { margin: 0 }

.cfg-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
  margin-top: var(--s4);
}

.cfg-panes { min-width: 0 }
.cfg-pane { padding: 0 }

/* a small caption over a group of controls */
.cfg-sub {
  margin: 0 0 .7rem;
  max-width: none;
  font-size: var(--op-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bld-mute);
}

/* labels that only a screen reader reads; clipped, never display:none, so they stay in the page */
.cfg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* the option grids: one column for a list of options, two for a handful of short names */
.cfg-opts {
  display: grid;
  gap: .65rem;
  margin: 0 0 var(--s3);
}

.cfg-opts--one { grid-template-columns: minmax(0, 1fr) }
.cfg-opts--two { grid-template-columns: repeat(2, minmax(0, 1fr)) }

/* the card: the choosing control is the bordered rectangle, and the link that explains the option
   sits under it as its own quiet line, so a click on one never counts as a click on the other */
.cfg-opt {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
}

.cfg-opts--two > .cfg-opt--other { grid-column: 1 / -1 }

.cfg-opt__pick {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .9rem 1rem;
  border: 1px solid var(--bld-line);
  border-radius: 0;
  background: var(--bld-white);
  font-size: .98rem;
  line-height: 1.4;
  text-align: left;
  color: var(--bld-ink);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.cfg-opt__pick:hover { border-color: var(--bld-accent); background: var(--bld-tint) }

.cfg-opt__t {
  display: block;
  font-weight: 600;
  color: var(--bld-ink);
}

.cfg-opt--wide .cfg-opt__pick { padding: 1rem 1.1rem }

/* the chosen option: the working blue on its edge, a tint behind it */
.cfg-opt__pick[aria-checked="true"] {
  border-color: var(--bld-accent);
  background: var(--bld-tint);
  color: var(--bld-ink);
}

/* the answer that is not on the list: a dashed card, and its own field underneath */
.cfg-opt--other .cfg-opt__pick {
  border-style: dashed;
  background: transparent;
}

.cfg-opt--other .cfg-opt__pick[aria-checked="true"] {
  border-style: solid;
  border-color: var(--bld-accent);
  background: var(--bld-tint);
}

.cfg-other { display: block }
.cfg-other textarea { width: 100% }

/* the link that explains an option — a line of small capitals at the right-hand end of the
   option's own box, never a second button */
.cfg-detail {
  align-self: flex-end;
  padding: .1rem 0;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bld-mute);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.cfg-detail:hover,
.cfg-detail:focus-visible {
  color: var(--bld-accent);
  border-bottom-color: var(--bld-accent);
}

/* ── the controls inside a pane ────────────────────────────────────────────────────────────── */
/* one field, wherever it appears: the size boxes, the quantity box, a free-text area */
.cfg-textarea,
.cfg-other textarea,
.cfg-field input,
.cfg-size input,
.cfg-qty input {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--bld-line);
  border-radius: 0;
  background: var(--bld-white);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bld-ink);
  appearance: none;
}

.cfg-textarea,
.cfg-other textarea { resize: vertical; min-height: 96px }
.cfg-textarea--tall { min-height: 190px }
.cfg-textarea::placeholder,
.cfg-other textarea::placeholder { color: var(--bld-mute) }

/* the pills: a word-sized answer, each one a square tag */
.cfg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 var(--s3);
}

.cfg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1.05rem;
  border: 1px solid var(--bld-line);
  border-radius: 0;
  background: var(--bld-white);
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--bld-ink);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

.cfg-pill:hover { border-color: var(--bld-accent); background: var(--bld-tint) }

.cfg-pill[aria-checked="true"] {
  border-color: var(--bld-accent);
  background: var(--bld-tint);
  color: var(--bld-ink);
  font-weight: 600;
}

/* a size typed rather than picked: two boxes and their unit */
.cfg-size,
.cfg-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 var(--s3);
  font-size: .9rem;
  color: var(--bld-mute);
}

.cfg-size label,
.cfg-qty label {
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.cfg-size input { width: 88px; min-height: 44px; text-align: center }
.cfg-qty input { width: 132px; min-height: 44px }

.cfg-size__u {
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bld-mute);
}

.cfg-hint {
  margin: 0 0 var(--s3);
  max-width: 56ch;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--bld-mute);
}

/* ── the artwork: one drop zone, one hidden but focusable input ────────────────────────────── */
.cfg-upload { margin: var(--s4) 0 0 }
.cfg-upload:first-child { margin-top: 0 }

.cfg-drop {
  display: block;
  padding: 1.4rem 1.1rem;
  border: 1px dashed var(--bld-line);
  background: var(--bld-white);
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, border-style .16s ease;
}

.cfg-drop:hover,
.cfg-drop:focus-within {
  border-color: var(--bld-accent);
  background: var(--bld-tint);
}

/* a file being dragged over the zone */
.cfg-drop.is-over {
  border-style: solid;
  border-color: var(--bld-accent);
  background: var(--bld-tint);
}

/* a file already chosen */
.cfg-drop.has {
  border-style: solid;
  border-color: var(--bld-ink);
  text-align: left;
}

.cfg-drop__t {
  display: block;
  font-size: .98rem;
  line-height: 1.45;
  color: var(--bld-ink);
}

.cfg-drop__s {
  display: block;
  margin-top: .3rem;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--bld-mute);
}

.cfg-drop__has { display: block }
.cfg-drop__has span { display: block }

.cfg-drop__bar {
  display: flex;
  justify-content: flex-end;
  margin-top: .35rem;
}

.cfg-drop__err {
  margin: .4rem 0 0;
  max-width: 58ch;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--bld-bad);
}

/* the line under a box that was answered but not filled in — a dashed card with no text, a custom
   size with no numbers: the same red as any other flagged field, and it is only in the page while
   the answer is missing */
.cfg-other__err,
.cfg-size__err {
  margin: .4rem 0 0;
  max-width: 58ch;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--bld-bad);
}

/* inside the size row, the sentence takes a line of its own under the boxes */
.cfg-size__err { flex: 1 0 100%; margin-top: .1rem }

/* the real input: out of sight but still in the tab order, and it comes back when focused */
.cfg-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.cfg-file:focus-visible {
  position: static;
  width: 100%;
  height: auto;
  margin: .5rem 0 0;
  padding: .5rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  border: 1px solid var(--bld-accent);
  background: var(--bld-white);
}

/* one checkbox line, its own row, tall enough for a thumb */
.cfg-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  margin: .6rem 0 0;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--bld-ink);
  cursor: pointer;
}

.cfg-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--bld-accent);
}

/* ── where the logo sits: four little diagrams, drawn in the current colour ────────────────── */
.cfg-pos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: start;
  gap: .5rem;
  margin: 0 0 .8rem;
}

.cfg-pos__cell {
  display: grid;
  justify-items: center;
  gap: .35rem;
  padding: .4rem .45rem .45rem;
  border: 1px solid var(--bld-line);
  border-radius: 0;
  background: var(--bld-white);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--bld-mute);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.cfg-pos__cell svg {
  display: block;
  width: 40px;
  height: 46px;
  color: var(--bld-mute);
}

.cfg-pos__cell:hover { border-color: var(--bld-accent) }

.cfg-pos__cell[aria-checked="true"] {
  border-color: var(--bld-accent);
  background: var(--bld-tint);
  color: var(--bld-ink);
}

/* the diagram follows the choice: its strokes are currentColor */
.cfg-pos__cell[aria-checked="true"] svg { color: var(--bld-accent) }

/* a text button — "Remove" — that is a word, not a box */
.cfg-link {
  min-height: 44px;
  padding: .35rem .1rem;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bld-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cfg-link:hover { color: var(--bld-ink) }

/* ── the panel's footer: Back · step count · Next ─────────────────────────────────────────── */
.cfg-nav {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--bld-line);
}

.cfg-nav__mid {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-width: 0;
}

.cfg-nav__count {
  font-size: var(--op-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--bld-mute);
}

/* Review opens the summary drawer, and only a phone has a drawer */
.cfg-nav__review { display: none }

/* ── the running summary ─────────────────────────────────────────────────────────────────── */
.cfg-sum {
  display: flex;
  flex-direction: column;
  padding: var(--s3);
  border: 1px solid var(--bld-line);
  background: var(--bld-white);
}

.cfg-sum__head { display: none }
.cfg-sum__body { min-width: 0 }

.cfg-sum__h {
  margin: 0 0 .9rem;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--bld-ink);
}

.cfg-rows {
  margin: 0 0 var(--s3);
  padding: 0;
}

/* one row: the label in small capitals, the value beside it */
.cfg-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: .6rem;
  padding: .5rem 0;
  border-top: 1px solid var(--bld-line);
}

.cfg-row dt {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--bld-mute);
}

.cfg-row dd {
  margin: 0;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--bld-ink);
  overflow-wrap: anywhere;
}

/* a choice not made yet: a dash, in the quietest grey the page has */
.cfg-row dd.is-empty { color: var(--bld-mute) }

.cfg-note {
  margin: 0 0 var(--s3);
  max-width: none;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--bld-mute);
}

.cfg-sum__body > .bld-btn {
  width: 100%;
  margin-bottom: .5rem;
}

.cfg-send { margin-bottom: .5rem }

/* ── the form that carries the sheet, in the summary ──────────────────────────────────────── */
.cfg-contact {
  margin: var(--s4) 0 0;
  padding-top: var(--s3);
  border-top: 1px solid var(--bld-line);
}

.cfg-contact__h {
  margin: 0 0 .9rem;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--bld-ink);
}

.cfg-field { margin: 0 0 .7rem }

.cfg-field label {
  display: block;
  margin-bottom: .3rem;
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bld-mute);
}

/* a field the browser or the form flagged: a red edge and a pale red ground, never a lighter
   letter, so what was typed stays readable */
.cfg-field.is-bad label { color: var(--bld-bad) }

.cfg-field.is-bad input,
.cfg-field input[aria-invalid="true"],
.cfg-textarea[aria-invalid="true"],
.cfg-other textarea[aria-invalid="true"],
.cfg-size input[aria-invalid="true"] {
  border-color: var(--bld-bad);
  background: var(--bld-bad-tint);
}

/* the one line the page speaks back on: quiet until it has something to say */
.cfg-status {
  margin: var(--s3) 0 0;
  max-width: none;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--bld-ink);
}

.cfg-status:empty { display: none }

/* ── what arrives back when the sheet is sent ─────────────────────────────────────────────── */
.cfg-done {
  margin: var(--s3) 0 0;
  padding: var(--s2);
  border: 1px solid var(--bld-accent);
  background: var(--bld-tint);
}

.cfg-done__h {
  margin: 0 0 .35rem;
  max-width: none;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--bld-ink);
}

.cfg-done__s {
  margin: 0 0 .7rem;
  max-width: none;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--bld-mute);
}

/* the sheet as it was sent: wrapped, scrollable, and never wider than the panel it sits in */
.cfg-done__pre {
  margin: 0;
  max-width: 100%;
  max-height: 220px;
  overflow: auto;
  padding: .6rem;
  border: 1px solid var(--bld-line);
  background: var(--bld-white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--bld-ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ── 06 · the questions ───────────────────────────────────────────────────────────────────── */
.bld-faq { border-top: 1px solid var(--bld-ink) }
.bld-faq__item { border-bottom: 1px solid var(--bld-line) }

.bld-faq__q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  width: 100%;
  min-height: 44px;
  padding: 1.1rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.35;
  text-align: left;
  color: var(--bld-ink);
  cursor: pointer;
  transition: color .16s ease;
}

.bld-faq__q:hover { color: var(--bld-accent) }

/* the sign, drawn by the sheet, so the label stays one line of text */
.bld-faq__q::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--op-f-body), system-ui, sans-serif;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--bld-accent);
}

.bld-faq__q[aria-expanded="true"]::after { content: "–" }

/* the open question keeps its ink; the height itself is the behaviour library's to animate */
.bld-faq__item[data-state="open"] .bld-faq__q { color: var(--bld-ink) }

.bld-faq__a {
  margin: 0;
  padding: 0 0 1.1rem;
  max-width: 62ch;
  font-size: .98rem;
  line-height: 1.65;
  color: var(--bld-mute);
}

/* ── 07 · the way out, on a full-width band of this page's ink ────────────────────────────── */
.bld-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 72px);
  padding-inline: max(var(--bld-gut), calc((100% - var(--bld-max)) / 2));
  background: var(--bld-ink);
  color: var(--bld-white);
}

.bld-cta__txt { max-width: 56ch }

.bld-cta__h {
  margin: 0 0 .5rem;
  font-family: var(--op-f-display), Georgia, "Songti SC", serif;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--bld-white);
}

.bld-cta__p {
  margin: 0;
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bld-white);
  opacity: .84;
}

.bld-cta__act {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
}

/* on ink the pair turns over: the solid one is a white block, the outlined one a white line */
.bld-cta .bld-btn--primary {
  background: var(--bld-white);
  border-color: var(--bld-white);
  color: var(--bld-ink);
}

.bld-cta .bld-btn--primary:hover,
.bld-cta .bld-btn--primary:focus-visible {
  background: transparent;
  color: var(--bld-white);
}

.bld-cta .bld-btn--ghost {
  border-color: var(--bld-white);
  color: var(--bld-white);
  background: transparent;
}

.bld-cta .bld-btn--ghost:hover,
.bld-cta .bld-btn--ghost:focus-visible {
  background: var(--bld-white);
  color: var(--bld-ink);
}

/* ── wide screens: the summary rides along beside the pane it describes ───────────────────── */
@media (min-width: 901px) {
  .cfg-sum {
    position: sticky;
    top: 96px; /* clear of the site's sticky header */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

/* ── wide screens: the sheet is given the room to be read ─────────────────────────────────────
 * The page's frame keeps a 10vw margin of white on each side of every column, and the summary
 * was reading in a 310px strip while that margin sat empty beside it: a value such as "Not yet,
 * we quote first" broke over three lines. On a wide window the summary's column grows with the
 * window and the sheet itself reaches out into the right margin — never past the window's edge —
 * so its rows read in one or two lines and the pane beside it keeps a workable width. */
@media (min-width: 1200px) {
  .cfg-body { grid-template-columns: minmax(0, 1fr) minmax(360px, 28vw) }

  .cfg-sum { margin-right: calc(-1 * min(var(--bld-gut) * .5, 120px)) }
}

/* ── 900px and under: one column, and the configurator's two fixed pieces ─────────────────── */
@media (max-width: 900px) {
  .bld-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
  }

  .bld-hero__txt { max-width: none }

  .bld-uses { grid-template-columns: repeat(2, minmax(0, 1fr)) }

  /* the comparison table keeps its three columns and scrolls inside its own frame */
  .bld-table-wrap { margin-inline: calc(var(--bld-gut) * -1); padding-inline: var(--bld-gut) }

  .cfg-body {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
  }

  /* a phone reads the options one under another */
  .cfg-opts--two { grid-template-columns: minmax(0, 1fr) }

  /* the seven steps stay one row and scroll sideways; nothing wraps, nothing is hidden */
  .cfg-step {
    flex: 0 0 auto;
    min-width: 118px;
  }

  /* the summary becomes a drawer rising from the bottom of the window */
  .cfg-sum {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-height: 85vh;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--bld-line);
    box-shadow: 0 -12px 32px rgb(18 33 46 / 16%);
    transform: translateY(100%);
    transition: transform .24s ease;
  }

  .cfg-sum.is-review,
  [data-build].is-review .cfg-sum { transform: translateY(0) }

  .cfg-sum__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    width: 100%;
    min-height: 44px;
    padding: .9rem var(--bld-gut);
    border: 0;
    border-bottom: 1px solid var(--bld-line);
    background: var(--bld-white);
    font-size: var(--op-label);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bld-ink);
    cursor: pointer;
  }

  .cfg-sum__count { font-weight: 600 }

  /* the chevron the drawer is opened by: up while shut, down while open */
  .cfg-sum__chev {
    display: block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-135deg);
    transition: transform .2s ease;
  }

  .cfg-sum.is-review .cfg-sum__chev,
  [data-build].is-review .cfg-sum__chev { transform: rotate(45deg) }

  .cfg-sum__body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: var(--s3) var(--bld-gut) calc(var(--s3) + env(safe-area-inset-bottom, 0px));
  }

  /* the panel's footer becomes a bar fixed to the bottom of the window, under the drawer */
  .cfg-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    margin: 0;
    padding: .7rem var(--bld-gut) calc(.7rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--bld-line);
    background: var(--bld-white);
  }

  .cfg-nav__btn {
    flex: 0 0 auto;
    padding: 14px 18px;
  }

  .cfg-nav__btn--primary { flex: 1 1 auto }
  .cfg-nav__count { display: none }
  .cfg-nav__review { display: inline-flex }

  /* a thumb, not a cursor: the "View details" line under each card is a target too */
  .cfg-detail {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .1rem 0;
  }

  /* the drawer is open: the bar gets out of its way */
  [data-build].is-review .cfg-nav { display: none }

  /* the page leaves the height of that bar free, so nothing ends up under it */
  body.build-page,
  body.cfg-page { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) }

  /* the floating WhatsApp button would sit on top of the bar */
  body.build-page .wa-float,
  body.cfg-page .wa-float { display: none }

  /* the closing band stacks its words above its buttons */
  .bld-cta {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--bld-gut);
  }

  .bld-cta__act { justify-content: flex-start }
}

/* ── the window's own keyboard: the fixed bar would cover the field being typed into ──────── */
body.cfg-kbd .cfg-nav { display: none }
body.cfg-kbd.build-page,
body.cfg-kbd.cfg-page { padding-bottom: 0 }

/* ── a moved page is not what a visitor with reduced motion asked for ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bld-btn,
  .cfg-nav__btn,
  .cfg-step,
  .cfg-pill,
  .cfg-opt__pick,
  .cfg-pos__cell,
  .cfg-drop,
  .cfg-sum,
  .cfg-sum__chev { transition: none }
}


/* ── one field's own complaint ────────────────────────────────────────────────────────────────
 * product-build.js writes this sentence under the input that stopped the send. It carries the
 * same red as the border so the two read as one thing. */
.cfg-err {
  display: block;
  margin: .35rem 0 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--bld-bad);
}

/* ── the site's cookie card ────────────────────────────────────────────────────────────────────
 * style.css fixes that card to the same bottom corner as the configurator's bar, so on a phone
 * it lands on top of Back / Review / Next. The card keeps its own place and simply sits above
 * the bar while the visitor is on this page — neither hides the other. */
@media (max-width: 900px) {
  body.build-page .consent,
  body.cfg-page .consent {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* ══ The quick-custom page ════════════════════════════════════════════════════════════════════
 * The configurator now lives in Customization, not on a product page, so the page it sits in
 * provides the measure the build page used to: one column of the house width, its own gutter.
 * Nothing else here is new — the steps, cards, drawer and sheet are the ones below.
 */
/* The banner is drawn on a page whose main carries the top padding it cancels with a negative
   margin; this main has no such padding, so the page's own banner keeps its margin at zero. */
.cfg-page .banner { margin-top: 0 }

.cfg-shell {
  width: 100%;
  max-width: calc(var(--bld-max) + 2 * var(--bld-gut));
  margin-inline: auto;
  padding-inline: var(--bld-gut);
  padding-block: clamp(28px, 4vw, 60px);
}

.cfg-shell .entry { max-width: 68ch; margin: 0 0 var(--s5) }

.cfg-shell .cfg { padding-block: 0 }

/* The step bar prints every step the configurator can ask and the browser hides the ones this
   product does not walk; a flex child ignores `hidden` without this. The summary rows are the
   same: a row a track never fills is hidden, not left as a dash under a heading nobody chose. */
.cfg-step[hidden],
.cfg-row[hidden] { display: none !important }

/* A step whose label is long ("Anything else") still gets its number and name on one line. */
.cfg-step__t { white-space: nowrap }

/* ── the facts, as a small table under the cloth's name ─────────────────────────────────────
   The record's own numbers, read where the buyer meets the cloth: one row per fact with a hairline
   between the rows. The composition is the page's heading, so it is not a row of its own. */
.bld-facts {
  width: 100%;
  max-width: 34rem;
  margin: var(--s4) 0 0;
  border-collapse: collapse;
  border-top: 1px solid var(--bld-ink);
}

.bld-facts tr + tr { border-top: 1px solid var(--bld-line) }

.bld-facts th,
.bld-facts td {
  padding: .55rem 0;
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
}

.bld-facts th {
  width: 38%;
  padding-right: var(--s2);
  font-size: var(--op-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--bld-mute);
}

.bld-facts td {
  font-size: .95rem;
  line-height: 1.45;
  color: var(--bld-ink);
  overflow-wrap: anywhere;
}

/* the small print a value carries: which product the number is quoted for */
.bld-facts__note {
  display: block;
  margin-top: 2px;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--bld-mute);
}

/* the small arrow after a fact that is open to customization: the word and its arrow are one link
   down to the options it names, and the link reads as that one word. */
.bld-facts__jump {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--bld-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.bld-facts__jump-i { display: block }

.bld-facts__jump:hover,
.bld-facts__jump:focus-visible {
  color: var(--bld-ink);
  border-bottom-color: currentColor;
}

/* the section's heading clears the site's sticky header when a link lands on it */
#bld-runs-h { scroll-margin-top: 96px }

/* ── available customization ────────────────────────────────────────────────────────────────
   One card per option, three to a row. The frame holds the finish's own photographs: the picture
   opens the site's photo viewer, where the rest of them can be stepped through. The name under it
   is the link to the page that explains the option, and its stretched hit area makes the whole card
   that link — the frame keeps a click of its own, one layer above, so a photograph still opens. */
/* the way into the configurator, under the options it is built from */
.bld-runs__act {
  margin-top: var(--s4);
}

.bld-runs__group {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid var(--bld-line);
}

/* the first group carries the ruled line under the section's heading */
.bld-runs__group:first-of-type {
  border-top-color: var(--bld-ink);
}

.bld-runs__h3 {
  margin: 0 0 var(--s3);
  font-size: var(--op-label);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bld-label);
}

.bld-opts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Three to a row, each frame 28% smaller than the section's own measure: the row is held to 72%
   of the section's measure and centred in it (it was 80%), so the cards and their 4:3 frames shrink
   evenly and the gutters stay the same. */
@media (min-width: 901px) {
  .bld-opts { max-width: 72%; margin-inline: auto }
}

.bld-opt {
  position: relative;
  display: grid;
  gap: .6rem;
  align-content: start;
}

/* the frame: the finish's own 4:3 crop behind a hairline, the same shape whether or not it holds a
   photograph, so the row stays even while the camera is still out */
.bld-opt__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bld-line);
  background: var(--bld-white);
  transition: border-color .16s ease;
}

/* the picture's own link sits above the card's stretched link, so the photograph still opens larger */
.bld-opt__frame .proc-card__open {
  position: relative;
  z-index: 1;
}

.bld-opt:hover .bld-opt__frame,
.bld-opt:focus-within .bld-opt__frame {
  border-color: var(--bld-ink);
}

.bld-opt__empty {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bld-tint);
}

/* the option's name: 1.33rem, 30% down from the doubled 1.9rem, so a long name such as
   "Straight edge, round corner" still reads at a glance without dwarfing its frame */
.bld-opt__t {
  margin: 0;
  font-size: 1.33rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--bld-ink);
}

.bld-opt__a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.bld-opt__a:hover,
.bld-opt__a:focus-visible {
  color: var(--bld-accent);
  border-bottom-color: var(--bld-accent);
}

/* the whole card opens the option's page; the frame's link stays a tab stop of its own above it */
.bld-opt__a::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (max-width: 900px) {
  /* the uses wrap three to a row on a phone; the facts table keeps a narrow label column */
  .bld-uses {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bld-facts th { width: 44% }
  .bld-opts { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
