/*
  Halden L6: desk lamp product page (Screenery template)
  1960s functionalist industrial design: warm off-white lacquer, grey panels, a 20 mm dot grid, hairlines, flush-left
  grotesk type in three sizes, measurements in mono, and one signal orange that only ever marks a control.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Components: buttons, push keys, slide scales, fields, radio, checkbox, stepper, notices
   4. Header
   5. Configurator: elevation board, control panel, spec strip
   6. Lamp drawing (finishes are custom properties on the svg)
   7. Plan view
   8. Parts
   9. Data tables and facts
  10. Order
  11. Service and revisions
  12. Footer
  13. Motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Surfaces: lacquer, panel, key */
  --paper: #efebe3;        /* warm off-white ground */
  --panel: #e4dfd5;        /* control panel and boards */
  --key: #f7f5f0;          /* push key face */
  --key-down: #d6d0c4;     /* pressed key */
  --ink: #22211f;          /* text, 14.6:1 on paper */
  --ink-2: #57534b;        /* secondary text, 6.9:1 on paper, 6.2:1 on panel */
  --line: #b5ad9e;         /* hairlines and ticks */
  --hair: rgb(34 33 31 / 0.16);

  /* The one signal colour. Controls only: slider knobs, the knobs on the lamp, the order button, key lamps. */
  --signal: #e8611f;
  --on-signal: #1b1a18;    /* 5.3:1 on signal */
  --signal-deep: #b9461a;  /* signal for thin strokes on paper (focus ring) */

  --err: #9a2b1d;          /* error text, 7.2:1 on paper */
  --ok: #2f5a3b;           /* success mark, 7.4:1 on paper */

  /* Light colour, set from the kelvin slider by script.js */
  --light: rgb(255 189 129);

  /* Type: three sizes doing the work, plus a data size */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, Menlo, monospace;
  --fs-s: 0.8125rem;       /* labels, captions, table meta */
  --fs-m: 1rem;            /* body */
  --fs-l: clamp(1.625rem, 1.1rem + 1.6vw, 2.5rem);   /* section headings */
  --fs-xl: clamp(2.5rem, 1.4rem + 3.6vw, 4.5rem);    /* the one display line */

  /* Space: a 4 px base, sections on a 96 px rhythm */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1360px;
  --r: 4px;                /* radius of keys and fields */
  --r-l: 10px;             /* radius of boards */

  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* exponential ease-out */
  --shadow-key: 0 1px 0 rgb(255 255 255 / 0.8) inset, 0 1px 2px rgb(34 33 31 / 0.18), 0 2px 6px rgb(34 33 31 / 0.06);
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; scrollbar-color: var(--line) var(--paper); accent-color: var(--signal); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs-m)/1.55 var(--sans); caret-color: var(--signal-deep);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal-deep); outline-offset: 3px; border-radius: 2px; }
.mono, output, time, .num, dd { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: var(--fs-s); color: var(--ink-2); line-height: 1.5; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.i--lg { width: 28px; height: 28px; stroke-width: 1.2; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 50; padding: var(--s2) var(--s4); background: var(--ink); color: var(--paper); border-radius: var(--r); }
.skip:focus { top: var(--s2); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--paper); border-radius: 6px; }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s5); border-radius: var(--r); border: 1px solid transparent;
  font: 600 var(--fs-m)/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--go { background: var(--signal); color: var(--on-signal); box-shadow: 0 1px 2px rgb(34 33 31 / .25), 0 3px 8px rgb(232 97 31 / .18); }
.btn--go:hover { background: #f06d2c; }
.btn--go:active { transform: translateY(1px); box-shadow: 0 0 1px rgb(34 33 31 / .3); }
.btn--plain { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--plain:hover { background: var(--key); }
.btn--wide { width: 100%; }
.btn[disabled] { cursor: progress; }

/* Push keys: rectangular keys with an indicator lamp that lights signal orange when on */
.keys { display: grid; gap: var(--s2); }
.keys--3 { grid-template-columns: repeat(3, 1fr); }
.keys--4 { grid-template-columns: repeat(2, 1fr); }
.key {
  position: relative; display: flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: var(--s2) var(--s3); text-align: left;
  background: var(--key); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  font: 500 var(--fs-s)/1.2 var(--sans); cursor: pointer; box-shadow: var(--shadow-key);
  transition: background-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.key:hover { background: #fff; }
.key__lamp { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--key-down); box-shadow: inset 0 1px 1px rgb(34 33 31 / .25); transition: background-color .2s var(--ease); }
.key[aria-pressed="true"], .key[aria-checked="true"] { background: var(--key-down); box-shadow: inset 0 1px 3px rgb(34 33 31 / .22); transform: translateY(1px); }
.key[aria-pressed="true"] .key__lamp, .key[aria-checked="true"] .key__lamp { background: var(--signal); box-shadow: 0 0 0 2px rgb(232 97 31 / .2); }
.key--tall { flex-wrap: wrap; align-content: center; column-gap: var(--s2); row-gap: 2px; }
.key--tall b { font: 500 var(--fs-m)/1 var(--mono); }
.key--tall small { flex-basis: 100%; padding-left: 16px; font: 400 var(--fs-s)/1 var(--mono); color: var(--ink-2); }
.sw { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1px solid rgb(34 33 31 / .35); }
.sw--grey { background: #e9e6df; }
.sw--graphite { background: #3a3936; }
.sw--alu { background: linear-gradient(160deg, #e1e3e2, #a9acab); }
.sw--oak { background: #b98a58; }

/* Slide scales: a native range on a ruled track with numbered ticks */
.scale { position: relative; padding-bottom: 22px; }
.scale input[type="range"] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 36px; margin: 0;
  background: transparent; cursor: pointer; position: relative; z-index: 1;
}
.scale input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); border-radius: 1px; }
.scale input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
.scale input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 30px; margin-top: -14px; border-radius: 3px;
  background: var(--signal); border: 1px solid rgb(34 33 31 / .45);
  box-shadow: 0 1px 2px rgb(34 33 31 / .3), inset 0 -8px 0 rgb(0 0 0 / .06);
}
.scale input[type="range"]::-moz-range-thumb { width: 14px; height: 30px; border-radius: 3px; background: var(--signal); border: 1px solid rgb(34 33 31 / .45); }
.scale input[type="range"]:focus-visible { outline: none; }
.scale input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
.scale input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
.scale__ticks {
  position: absolute; left: 7px; right: 7px; top: 22px; height: 8px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc((100% - 1px) / 18));
}
.scale__nums { position: absolute; left: 7px; right: 7px; bottom: 0; height: 16px; }
.scale__nums span {
  position: absolute; left: calc((var(--v) - var(--min)) / (var(--max) - var(--min)) * 100%); transform: translateX(-50%);
  font: 400 11px/16px var(--mono); color: var(--ink-2);
}

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; align-content: start; }
.field label, .field legend, .label { font: 500 var(--fs-s)/1.3 var(--sans); color: var(--ink); padding: 0; }
.opt { color: var(--ink-2); font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r);
  background: var(--key); color: var(--ink); font: 400 var(--fs-m)/1 var(--sans);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input.mono { font-family: var(--mono); }
.field input::placeholder { color: #67625a; }
.field input:hover { border-color: var(--ink-2); }
.field input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(232 97 31 / .35); }
.field input[aria-invalid="true"] { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.err { min-height: 0; font-size: var(--fs-s); color: var(--err); }
.err:empty { display: none; }
.hint { font-size: var(--fs-s); color: var(--ink-2); }
.radio, .check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s2) 0; cursor: pointer; font-size: var(--fs-m); }
.radio input, .check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.radio small { display: block; font-size: var(--fs-s); color: var(--ink-2); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--key); width: max-content; }
.stepper__b { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: var(--r); }
.stepper__b:hover { background: #fff; }
.stepper__b:disabled { color: #9c968a; cursor: not-allowed; background: none; }
.stepper output { min-width: 40px; text-align: center; font-size: var(--fs-m); }

/* ---------- 4. Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--hair); }
.top__in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: var(--s6); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.25rem/1 var(--sans); letter-spacing: -0.03em; }
.nav { display: flex; gap: var(--s5); margin-left: auto; font-size: var(--fs-s); }
.nav a { text-decoration: none; color: var(--ink-2); padding: var(--s2) 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.top__order { display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r); background: var(--key); font: 600 var(--fs-s)/1 var(--sans); text-decoration: none; }
.top__order .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.top__price { font-family: var(--mono); font-weight: 500; }

/* ---------- 5. Configurator ---------- */
.hero { max-width: var(--max); margin: 0 auto; padding: var(--s6) var(--gutter) 0; }
.hero__head { display: grid; grid-template-columns: auto minmax(0, 46ch); align-items: end; gap: var(--s5) var(--s7); margin-bottom: var(--s5); }
.hero__head h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.035em; line-height: .95; }
.lede { color: var(--ink-2); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); align-items: stretch; }

.board { margin: 0; background: var(--panel); border-radius: var(--r-l); border: 1px solid var(--hair); overflow: hidden; display: flex; flex-direction: column; }
.board svg { display: block; width: 100%; height: auto; }
.elev { flex: 1; min-height: 0; }
.board__cap { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s3) var(--s4); border-top: 1px solid var(--hair); font-size: var(--fs-s); color: var(--ink-2); }
.board__live { font-family: var(--mono); color: var(--ink); }

.panel { background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-l); padding: var(--s4); display: grid; gap: var(--s4); align-content: start; }
.ctl { margin: 0; padding: 0 0 var(--s4); border: 0; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-content: start; }
.ctl:last-child { border-bottom: 0; padding-bottom: 0; }
.ctl__label { float: left; padding: 0; font: 500 var(--fs-s)/1.3 var(--sans); }
.ctl__read { justify-self: end; font-size: var(--fs-s); font-weight: 500; }
.ctl > .scale, .ctl > .keys { grid-column: 1 / -1; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s4); margin-top: var(--s4); align-items: start; }
.buy { display: grid; gap: var(--s2); background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-l); padding: var(--s4); }
.buy__price { font: 500 2rem/1 var(--mono); letter-spacing: -0.02em; }
.buy__price small { font: 400 var(--fs-s)/1 var(--sans); color: var(--ink-2); letter-spacing: 0; }
.buy__lead { font-size: var(--fs-s); color: var(--ink-2); min-height: 2.6em; }
.buy__acts { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s1); }
.buy__acts .btn--go { flex: 1; }
.buy__note { font-size: var(--fs-s); color: var(--ink-2); }
.buy__note:empty { display: none; }

/* Spec strip: a ruled sheet, four columns by two rows */
.sheet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 2px solid var(--ink); }
.sheet > div { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--hair); }
.sheet > div:not(:nth-child(4n+1)) { padding-left: var(--s3); border-left: 1px solid var(--hair); }
.sheet dt { font-size: var(--fs-s); color: var(--ink-2); }
.sheet dd { margin: 2px 0 0; font-size: 1.0625rem; font-weight: 500; white-space: nowrap; }

/* ---------- 6. Lamp drawing ---------- */
.elev, .planv, .board--parts svg {
  --f-body: #ece9e2; --f-base: #dcd7cd; --f-stroke: #22211f;
}
.elev[data-finish="graphite"] { --f-body: #3d3c39; --f-base: #2e2d2b; }
.elev[data-finish="alu"] { --f-body: url(#alu); --f-base: url(#alu); }
.elev[data-finish="oak"] { --f-body: url(#alu); --f-base: url(#grain); }
.part, .joint { fill: var(--f-body); stroke: var(--f-stroke); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.part--base { fill: var(--f-base); }
.part--weight { fill: #c9a86a; }
.arm { stroke: var(--f-stroke); stroke-width: 14; stroke-linecap: round; }
.elev[data-finish="grey"] .arm, .elev[data-finish="alu"] .arm, .elev[data-finish="oak"] .arm, .lamp--quiet .arm { stroke: #8f8b83; }
.elev[data-finish="graphite"] .arm { stroke: #3d3c39; }
.spring { stroke: var(--f-stroke); stroke-width: 5; stroke-dasharray: 2 3; }
.joint__pin { fill: var(--f-stroke); }
.hanger { stroke: var(--f-stroke); stroke-width: 6; }
.knob { fill: var(--signal); stroke: var(--f-stroke); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.perf circle { fill: var(--f-stroke); opacity: .55; }
.elev[data-finish="graphite"] .perf circle { fill: #9d9990; opacity: 1; }
.diffuser { fill: var(--light); stroke: var(--f-stroke); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cable { fill: none; stroke: #8f8b83; stroke-width: 4; }
.desk__top { fill: #d3ccbf; }
.hair { stroke: var(--f-stroke); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.light { mix-blend-mode: multiply; transition: opacity .4s var(--ease); }
.light__cone { fill: url(#g-cone); }
.light__pool { fill: url(#g-pool); }
.dim, .dim__tick { stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dim__label { font: 500 22px var(--mono); fill: var(--ink); }

/* ---------- 7. Plan ---------- */
.sec { max-width: var(--max); margin: 0 auto; padding: var(--s9) var(--gutter) 0; }
.sec__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s4) var(--s7); align-items: end; padding-bottom: var(--s5); margin-bottom: var(--s6); border-bottom: 2px solid var(--ink); }
.sec__head h2 { font-size: var(--fs-l); }
.sec__head p { color: var(--ink-2); max-width: 62ch; }
.plan__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
.plan__desk { fill: #e8e2d6; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plan__cut { fill: var(--light); opacity: .22; mix-blend-mode: multiply; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.ring { fill: var(--light); fill-opacity: .2; mix-blend-mode: multiply; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ring__label { font: 500 30px var(--mono); fill: var(--ink); paint-order: stroke; stroke: #f6efe4; stroke-width: 6px; stroke-linejoin: round; }
.plan__paper { fill: rgb(255 255 255 / .55); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: all .4s var(--ease); }
.plan__label { font: 500 30px var(--mono); fill: var(--ink-2); }
.plan__label--edge { font-size: 27px; }
.plan__arm { stroke: #8f8b83; stroke-width: 14; stroke-linecap: round; }
.plan__base { fill: #dcd7cd; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plan__knob { fill: var(--signal); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan__head { fill: #ece9e2; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.board--plan svg { background: var(--panel); }
.plan__side { display: grid; gap: var(--s5); }
.verdict { font-size: 1.0625rem; line-height: 1.5; min-height: 4.6em; }
.mini { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.mini caption { text-align: left; font-weight: 500; padding-bottom: var(--s2); }
.mini th, .mini td { text-align: left; padding: var(--s2) 0; border-bottom: 1px solid var(--hair); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mini th { font-family: var(--sans); font-weight: 500; color: var(--ink-2); }
.mini td + td, .mini th + th { text-align: right; }

/* ---------- 8. Parts ---------- */
.parts__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: start; }
.board--parts { padding: var(--s4); }
.callouts line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.callouts circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.callouts text { font: 600 15px var(--mono); fill: var(--ink); text-anchor: middle; }

/* ---------- 9. Data ---------- */
.tablewrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.data th, .data td { text-align: left; padding: 10px var(--s3) 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.data thead th { font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--ink); }
.data tbody th { font-weight: 500; }
.data td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data--parts td:nth-child(3), .data--parts td:nth-child(4) { font-family: var(--sans); color: var(--ink-2); }
.data .num { text-align: right; padding-right: 0; }
.data--reach th, .data--reach td { padding-left: var(--s3); }
.data--reach th:first-child { padding-left: 0; }
.data--reach td { white-space: nowrap; }
.data--reach .is-on { background: var(--key); box-shadow: inset 1px 0 0 var(--hair), inset -1px 0 0 var(--hair); }
.data--reach thead .is-on { color: var(--ink); }
.data--reach thead .is-on::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--signal); vertical-align: 1px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s6); margin: var(--s7) 0 0; }
.facts > div { padding: var(--s3) 0; border-top: 1px solid var(--hair); }
.facts dt { font-size: var(--fs-s); color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font-family: var(--sans); }

/* ---------- 10. Order ---------- */
.order__grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s6); align-items: start; }
.summary { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--hair); border-radius: var(--r-l); padding: var(--s5); display: grid; gap: var(--s4); }
.summary h3 { font-size: 1.25rem; }
.summary__rows { margin: 0; display: grid; }
.summary__rows > div { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--hair); font-size: var(--fs-s); }
.summary__rows dd { margin: 0; }
.summary__total { border-bottom: 0 !important; border-top: 2px solid var(--ink); margin-top: var(--s1); font-size: var(--fs-m) !important; font-weight: 600; }
.summary__knobs, .summary__lead { font-size: var(--fs-s); color: var(--ink-2); }
.summary .btn { justify-self: start; }
.formbox { min-width: 0; }
.form { display: grid; gap: var(--s5); }
.row { display: grid; gap: var(--s4); }
.row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row--3 { grid-template-columns: 2fr 1fr 1.4fr; }
.form__foot { display: grid; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--hair); }
.spin { display: none; width: 16px; height: 16px; border: 2px solid rgb(27 26 24 / .3); border-top-color: var(--on-signal); border-radius: 50%; animation: spin .8s linear infinite; }
.is-sending .spin { display: inline-block; }
.is-sending .btn__text [data-out] { display: none; }
.is-sending .btn--go { background: #ef8a55; }
@keyframes spin { to { transform: rotate(360deg); } }
.errsum, .notice { border: 1px solid var(--err); border-radius: var(--r); padding: var(--s4); background: #f6e9e3; display: grid; gap: var(--s2); color: var(--ink); }
.errsum p, .notice p:first-child { display: flex; gap: var(--s2); align-items: center; color: var(--err); }
.errsum ul { margin: 0; padding-left: 24px; font-size: var(--fs-s); }
.errsum a { color: var(--err); }
.notice { margin-top: var(--s4); }
.notice .btn { justify-self: start; }
.done { border: 1px solid var(--ink); border-radius: var(--r-l); padding: var(--s6); background: var(--key); display: grid; gap: var(--s3); }
.done:focus { outline: none; }
.done h3 { font-size: var(--fs-l); }
.done__no { font-size: var(--fs-s); color: var(--ok); display: inline-flex; align-items: center; gap: var(--s2); }
.done__no::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.done .btn { justify-self: start; margin-top: var(--s2); }

/* ---------- 11. Service and revisions ---------- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-left: 1px solid var(--hair); }
.rule { padding: 0 var(--s5) var(--s2); border-right: 1px solid var(--hair); display: grid; gap: var(--s3); align-content: start; }
.rule h3 { font-size: 1.25rem; }
.rule p { color: var(--ink-2); max-width: 44ch; }
.revs { list-style: none; margin: 0; padding: 0; }
.revs li { display: grid; grid-template-columns: 140px 90px minmax(0, 64ch); gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.revs time { font-size: var(--fs-s); color: var(--ink-2); }
.revs b { font-weight: 600; }

/* ---------- 12. Footer ---------- */
.foot { margin-top: var(--s9); background: var(--panel); border-top: 1px solid var(--hair); }
.foot__in { max-width: var(--max); margin: 0 auto; padding: var(--s7) var(--gutter); display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: var(--s6); align-items: start; }
.foot address { font-style: normal; font-size: var(--fs-s); line-height: 1.7; }
.mark--foot { margin-bottom: var(--s2); }

/* ---------- 13. Motion ---------- */
.lamp #upper, .lamp #head, .light polygon, .light ellipse { transition: none; }
@media (prefers-reduced-motion: no-preference) {
  /* The signature moment: on load the lamp warms up, the cone rising from nothing to the set brightness. */
  .elev .light { animation: warm 1.4s var(--ease) .2s both; }
  @keyframes warm { from { opacity: 0; filter: blur(6px); } }
  .key, .btn { transition-duration: .2s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- 14. Narrow screens ---------- */
@media (max-width: 1180px) {
  .hero__grid, .hero__foot { grid-template-columns: minmax(0, 1fr); }
  .panel { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); }
  .panel .ctl:nth-last-child(2) { border-bottom: 0; padding-bottom: 0; }
  .nav { gap: var(--s4); }
}
@media (max-width: 960px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr); }
  .hero__grid, .plan__grid, .parts__grid, .order__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__head, .sec__head { grid-template-columns: minmax(0, 1fr); }
  .panel { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); }
  .summary { position: static; }
  .plan__side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .plan__side .keys { grid-column: 1 / -1; }
  .board--parts { max-width: 640px; }
  .nav { display: none; }
  .top__order { margin-left: auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) { .dims, .ring__label, .plan__label { display: none; } }
@media (max-width: 640px) {
  .hero { padding-top: var(--s5); }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel .ctl:nth-last-child(2) { border-bottom: 1px solid var(--hair); padding-bottom: var(--s4); }
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet > div:not(:nth-child(4n+1)) { padding-left: 0; border-left: 0; }
  .sheet > div:nth-child(even) { padding-left: var(--s3); border-left: 1px solid var(--hair); }
  .plan__side { grid-template-columns: minmax(0, 1fr); }
  .keys--3 .key:not(.key--tall) { flex-direction: column; align-items: flex-start; gap: 6px; }
  .row--2, .row--3 { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: minmax(0, 1fr); border-left: 0; }
  .rule { border-right: 0; border-top: 1px solid var(--hair); padding: var(--s5) 0; }
  .revs li { grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); }
  .revs li p { grid-column: 1 / -1; }
  .revs b { text-align: right; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .foot__in { grid-template-columns: minmax(0, 1fr); }
  .data--parts th:nth-child(4), .data--parts td:nth-child(4) { display: none; }
  .data--parts { font-size: 0.75rem; }
  .board__cap { font-size: 0.75rem; }
}
