/*
  Pennock: single-speed steel bicycle product page (Screenery template)
  The page is a drafting sheet: drafting white ground, graphite ink in two line weights (1:2), centre lines, dimension
  lines with filled arrowheads, title blocks. One accent, drafting red, marks the rider's own figures and nothing else.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Shared: section heads, buttons, fields, segmented radios, notes
   4. Header
   5. General arrangement (hero) and the sheet frame, title block
   6. The bicycle drawing (SVG classes shared by hero and tool)
   7. Fit and build tool, readouts, bill, geometry chart
   8. Specification, details, revisions
   9. Order and fitting flow, issued stamp
  10. Workshop, questions, footer
  11. Motion
  12. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette */
  --paper: #f2f4f2;        /* drafting white */
  --paper-2: #e8ebe8;      /* a sheet laid on the sheet */
  --ink: #1c2026;          /* graphite, thick line */
  --ink-2: #4a525b;        /* secondary text, thin line */
  --line: #a3aab0;         /* hairlines that carry no text */
  --grid: #e1e5e2;         /* faint drafting grid */
  --red: #c2361f;          /* the rider's own numbers */
  --red-ink: #a32a16;      /* red for small text and errors */
  --red-wash: #f5e2da;
  --alloy: #c8ccd0;

  /* Type */
  --f-draw: "Xanh Mono", "Courier New", monospace;
  --f-text: "Figtree", system-ui, sans-serif;
  --t-display: clamp(2.35rem, 1.2rem + 3.6vw, 4.25rem);
  --t-h2: clamp(1.6rem, 1.2rem + 1.1vw, 2.125rem);
  --t-body: 1rem;
  --t-small: 0.8125rem;

  /* Space and lines */
  --gut: clamp(1rem, 0.4rem + 2.6vw, 2.75rem);
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 7rem;
  --thick: 1.5px;
  --thin: 0.75px;
  --radius: 0px;
  --max: 1400px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-color: var(--ink-2) var(--paper-2); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-text);
  caret-color: var(--red);
  accent-color: var(--ink);
  overflow-x: clip;
}
::selection { background: var(--red-wash); color: var(--ink); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--ink-2); border: 3px solid var(--paper-2); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--red); }
h1, h2, h3 { font-family: var(--f-draw); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
.skip { position: absolute; left: var(--s4); top: -60px; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); z-index: 50; }
.skip:focus { top: var(--s2); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.small { font-size: var(--t-small); color: var(--ink-2); }

/* ---------- 3. Shared ---------- */
main > section { max-width: var(--max); margin: 0 auto; padding: var(--s8) var(--gut); border-top: var(--thin) solid var(--line); }
main > section:first-child { border-top: 0; }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s4) var(--s7); align-items: end; margin-bottom: var(--s7); }
.head h2 { font-size: var(--t-h2); }
.head p { max-width: 62ch; color: var(--ink-2); }
h3 { font-size: 1.25rem; margin-bottom: var(--s4); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-height: 46px; padding: 0 var(--s5);
  font: 500 0.9375rem/1 var(--f-text); text-decoration: none; cursor: pointer;
  border: var(--thick) solid var(--ink); border-radius: var(--radius);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; }
.btn--ink:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--wide { width: 100%; line-height: 1.2; text-wrap: balance; padding-top: var(--s2); padding-bottom: var(--s2); }
.btn[disabled] { cursor: progress; opacity: 0.85; }

.field { display: grid; gap: var(--s2); margin: 0 0 var(--s5); padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .ctrl__set > legend { font: 500 var(--t-small)/1.3 var(--f-text); color: var(--ink); padding: 0; margin-bottom: var(--s2); }
.opt-l, .legend-note { color: var(--ink-2); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"] {
  width: 100%; min-height: 46px; padding: 0 var(--s3);
  font: 400 1rem/1 var(--f-text); color: var(--ink);
  background: #fafbfa; border: var(--thin) solid var(--ink-2); border-radius: var(--radius);
  box-shadow: inset 0 0 0 0.75px transparent;
  transition: box-shadow 0.15s var(--ease), border-color 0.15s;
}
input::placeholder { color: #6b737b; }
input:hover { border-color: var(--ink); }
input:focus-visible { outline: 0; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px var(--red-wash); }
input[aria-invalid="true"] { border-color: var(--red-ink); box-shadow: inset 0 0 0 1px var(--red-ink); }
input[type="number"] { font-family: var(--f-draw); font-size: 1.25rem; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.unit-in { position: relative; }
.unit-in span { position: absolute; right: var(--s3); top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: var(--t-small); pointer-events: none; }
.err { color: var(--red-ink); font-size: var(--t-small); line-height: 1.4; }
.err::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1.5px solid currentColor; transform: rotate(45deg) translateY(-1px); vertical-align: middle; }
.hint { font-size: var(--t-small); color: var(--ink-2); line-height: 1.45; }

/* Segmented radios: a row of cells on a ruled strip */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: var(--thin) solid var(--ink-2); margin-bottom: var(--s3); }
.seg label { position: relative; display: grid; cursor: pointer; }
.seg label + label { border-left: var(--thin) solid var(--ink-2); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 44px; padding: 0 var(--s2); font: 400 1rem/1.1 var(--f-draw); text-align: center; transition: background-color 0.15s, color 0.15s; }
.seg--2 span { font: 500 0.875rem/1.2 var(--f-text); padding: var(--s2); }
.seg label:hover span { background: var(--paper-2); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -4px; }

/* Notes */
.note { display: flex; gap: var(--s3); padding: var(--s4); border: var(--thin) solid currentColor; }
.note--err { color: var(--red-ink); background: var(--red-wash); }
.note--err p { color: var(--ink); margin-bottom: var(--s3); }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s6);
  padding: var(--s3) var(--gut);
  background: var(--paper);
  border-bottom: var(--thin) solid var(--ink-2);
}
.mark { display: flex; align-items: baseline; gap: var(--s3); text-decoration: none; }
.mark__glyph { width: 32px; height: 20px; align-self: center; fill: none; stroke: var(--ink); stroke-width: 1.5; }
.mark__name { font: 400 1.5rem/1 var(--f-draw); }
.mark__sub { font-size: var(--t-small); color: var(--ink-2); }
.top__nav { display: flex; gap: var(--s5); margin-left: auto; }
.top__nav a { font-size: 0.9375rem; text-decoration: none; padding: var(--s2) 0; }
.top__nav a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.top__cta { min-height: 40px; padding: 0 var(--s4); gap: var(--s2); }
.top__cta b { font: 400 1rem/1 var(--f-draw); }

/* ---------- 5. General arrangement ---------- */
.ga { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s6) var(--s7); align-items: center; padding-top: var(--s6) !important; padding-bottom: var(--s7) !important; }
.ga__title { font-size: var(--t-display); line-height: 1.02; max-width: 12ch; }
.lede { margin-top: var(--s5); max-width: 40ch; font-size: 1.0625rem; color: var(--ink-2); }
.ga__act { margin-top: var(--s6); display: grid; gap: var(--s4); justify-items: start; }
.ga__price { font-size: 0.9375rem; color: var(--ink); max-width: 34ch; }
.ga__price b { font: 400 1.375rem/1 var(--f-draw); margin-right: var(--s1); }
.ga__price span { display: block; color: var(--ink-2); font-size: var(--t-small); margin-top: var(--s1); }

.sheet { margin: 0; border: var(--thick) solid var(--ink); background: var(--paper); position: relative; }
.sheet::before { /* inner frame line, 6 px in, like a drawing border */
  content: ""; position: absolute; inset: 6px; border: var(--thin) solid var(--ink-2); pointer-events: none;
}
.sheet__draw {
  position: relative;
  aspect-ratio: 2060 / 1440;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  margin: 6px 6px 0;
}
.sheet__draw > svg { display: block; width: 100%; height: 100%; }
.tblock { margin: 0 6px; border-top: var(--thin) solid var(--ink-2); }
.tblock dl { display: grid; grid-template-columns: 2.2fr 0.6fr 1fr 0.9fr 1.7fr 1.4fr 0.5fr; margin: 0; }
.tblock dl > div { padding: var(--s2) var(--s3); border-left: var(--thin) solid var(--ink-2); min-width: 0; }
.tblock dl > div:first-child { border-left: 0; }
.tblock dt { font-size: 0.6875rem; color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; }
.tblock dd { margin: 0; font: 400 0.875rem/1.25 var(--f-draw); }
.tblock__name dd { font-size: 0.9375rem; }
.tblock__rev dd { font-size: 1.25rem; line-height: 1; color: var(--ink); }
.sheet__key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s5); font-size: var(--t-small); color: var(--ink-2); padding: var(--s2) var(--s3) var(--s3); margin: 0 6px 6px; border-top: var(--thin) solid var(--ink-2); }
.sheet__key > span { display: inline-flex; align-items: center; gap: var(--s2); }
.key { display: inline-block; flex: none; width: 22px; height: 0; border-top: 2px solid var(--red); }
.key--cl { border-top: 1px dashed var(--ink-2); }

/* ---------- 6. The bicycle drawing ---------- */
.bike { --k: 2.2; overflow: visible; }
.bike .gnd { stroke: var(--ink); stroke-width: calc(var(--k) * 1px); }
.bike .cl { stroke: var(--ink-2); stroke-width: calc(var(--k) * 0.75px); fill: none; }
.bike .tyre { fill: none; stroke: var(--ink); stroke-width: calc(var(--k) * 1.6px); }
.bike .rim { fill: none; stroke: var(--ink); stroke-width: calc(var(--k) * 0.75px); }
.bike .hub { fill: var(--paper); stroke: var(--ink); stroke-width: calc(var(--k) * 1.2px); }
.bike .chain { stroke: var(--ink); stroke-width: calc(var(--k) * 1px); stroke-dasharray: calc(var(--k) * 4px) calc(var(--k) * 2px); }
.bike .ring { fill: none; stroke: var(--ink); stroke-width: calc(var(--k) * 1.2px); }
.bike .tube-o { stroke: var(--ink); fill: none; stroke-linecap: butt; }
.bike path.tube-o, .bike path.tube-f { stroke-linecap: round; stroke-linejoin: round; }
.bike .tube-o-c { fill: var(--ink); }
.bike .tube-f { stroke: var(--paint, #3b4045); fill: none; transition: stroke 0.35s var(--ease); }
.bike .tube-f.alloy { stroke: var(--alloy); }
.bike .shell { fill: var(--paint, #3b4045); transition: fill 0.35s var(--ease); }
.bike .lugline { stroke: var(--ink); stroke-width: calc(var(--k) * 0.75px); opacity: 0.7; }
.bike .saddle { fill: var(--ink); }
.bike .rail { stroke: var(--ink); stroke-width: calc(var(--k) * 1px); }
.bike .crank { stroke: var(--ink); stroke-linecap: round; }
.bike .crank-f { stroke: var(--alloy); stroke-linecap: round; }
.bike .pedal { fill: var(--ink); }
.bike .ext { stroke: var(--ink-2); stroke-width: calc(var(--k) * 0.6px); }
.bike .dim { stroke: var(--ink); stroke-width: calc(var(--k) * 0.75px); fill: none; }
.bike .arr { fill: var(--ink); }
.bike .lbl { font-family: var(--f-draw); fill: var(--ink); stroke: var(--paper); paint-order: stroke; stroke-linejoin: round; text-anchor: middle; dominant-baseline: central; }
.bike .you.ext, .bike .you.dim { stroke: var(--red); }
.bike .arr.you, .bike .layer-dim .you ~ .arr { fill: var(--red); }
.bike .lbl.you { fill: var(--red-ink); }
.bike .call { fill: none; stroke: var(--ink-2); stroke-width: calc(var(--k) * 0.75px); stroke-dasharray: calc(var(--k) * 6px) calc(var(--k) * 3px); }
.bike .call-tag { fill: var(--paper); stroke: var(--ink); stroke-width: calc(var(--k) * 0.75px); }

/* ---------- 7. Fit and build ---------- */
.fit__grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-areas: "ctrl draw" "ctrl read";
  grid-template-rows: auto 1fr;
  gap: var(--s5) var(--s7);
  align-items: start;
}
.ctrl { grid-area: ctrl; }
.out { display: contents; }
.out__sheet { grid-area: draw; }
.read { grid-area: read; display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: var(--s5); align-items: start; }
.ctrl__set { border: 0; border-top: var(--thin) solid var(--ink-2); margin: 0; padding: var(--s4) 0 var(--s5); min-width: 0; }
.ctrl__set:first-child { border-top: var(--thick) solid var(--ink); }
.ctrl__set > legend { float: left; width: 100%; margin-bottom: var(--s3); }
.ctrl__set > legend + * { clear: both; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); clear: both; }
.pair .field { margin-bottom: var(--s2); }
.fitmsg { margin-top: var(--s3); padding: var(--s3); font-size: 0.9375rem; line-height: 1.45; border: var(--thin) solid var(--ink-2); background: #fafbfa; }
.fitmsg b { font-family: var(--f-draw); font-weight: 400; color: var(--red-ink); font-size: 1.0625rem; }
.fitmsg[data-mode="outside"] { border-color: var(--red-ink); background: var(--red-wash); }
.fitmsg[data-mode="invalid"] { color: var(--ink-2); border-style: dashed; }

.opts { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--thin) solid var(--ink-2); margin-bottom: var(--s3); }
.opt { position: relative; display: grid; justify-items: center; gap: 2px; padding: var(--s3) var(--s2); cursor: pointer; text-align: center; transition: background-color 0.15s, color 0.15s; }
.opt + .opt { border-left: var(--thin) solid var(--ink-2); }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt__ic { width: 40px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.opt__name { font-size: 0.875rem; font-weight: 500; }
.opt__price { font-size: 0.75rem; color: var(--ink-2); }
.opt:hover { background: var(--paper-2); }
.opt:has(input:checked) { background: var(--ink); color: var(--paper); }
.opt:has(input:checked) .opt__price { color: #cfd3d6; }
.opt:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -4px; }

.swatches { display: grid; border-top: var(--thin) solid var(--ink-2); }
.sw { position: relative; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s2); border-bottom: var(--thin) solid var(--ink-2); cursor: pointer; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sw__chip { width: 26px; height: 16px; background: var(--c); border: var(--thin) solid var(--ink); }
.sw__name { font-size: 0.9375rem; }
.sw__price { font-size: 0.75rem; color: var(--ink-2); text-align: right; }
.sw:hover { background: var(--paper-2); }
.sw:has(input:checked) { background: var(--paper-2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sw:has(input:checked) .sw__name::after { content: ""; display: inline-block; width: 7px; height: 12px; margin-left: 10px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.sw:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -3px; }

.strip { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: 0 6px 6px; padding: var(--s2) var(--s3); border-top: var(--thin) solid var(--ink-2); font-size: var(--t-small); color: var(--ink-2); }
.strip b { font-family: var(--f-draw); font-weight: 400; font-size: 0.9375rem; color: var(--ink); }

.read dl { margin: 0; display: grid; border-top: var(--thick) solid var(--ink); }
.read dl > div { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: var(--thin) solid var(--line); }
.read dt { font-size: var(--t-small); color: var(--ink-2); }
.read dd { margin: 0; font: 400 1.125rem/1.2 var(--f-draw); text-align: right; }
.read .you dd { color: var(--red-ink); }
.read .read__feel, .read__fit > div:last-child { grid-template-columns: 1fr; }
.read .read__feel dd, .read__post { font: 400 0.875rem/1.45 var(--f-text) !important; text-align: left !important; color: var(--ink); }
.read__post[data-warn="true"] { color: var(--red-ink) !important; }
.flash { animation: flash 0.9s var(--ease); }
@keyframes flash { from { background: var(--red-wash); } to { background: transparent; } }

.bill { display: grid; gap: var(--s4); border-top: var(--thick) solid var(--ink); }
.bill table { width: 100%; }
.bill th, .bill td { text-align: left; padding: var(--s2) 0; border-bottom: var(--thin) solid var(--line); font-size: 0.875rem; font-weight: 400; vertical-align: baseline; }
.bill td { text-align: right; white-space: nowrap; padding-left: var(--s3); font-family: var(--f-draw); font-size: 1rem; }
.bill tfoot th { font-weight: 600; border-bottom: var(--thick) solid var(--ink); }
.bill tfoot td { font-size: 1.5rem; border-bottom: var(--thick) solid var(--ink); }

.geo { margin-top: var(--s8); }
.geo__wrap { overflow-x: auto; border-top: var(--thick) solid var(--ink); }
.geo__table { width: 100%; min-width: 520px; }
.geo__table th, .geo__table td { padding: var(--s2) var(--s3); border-bottom: var(--thin) solid var(--line); text-align: right; font-weight: 400; }
.geo__table thead th { font: 400 1.25rem/1 var(--f-draw); padding-top: var(--s3); padding-bottom: var(--s3); border-bottom: var(--thin) solid var(--ink-2); }
.geo__table thead th:first-child { font: 500 var(--t-small)/1 var(--f-text); color: var(--ink-2); text-align: left; }
.geo__table tbody th { text-align: left; font-size: 0.875rem; }
.geo__table td { font: 400 1rem/1.2 var(--f-draw); }
.geo__table .unit { color: var(--ink-2); font-size: 0.75rem; }
.geo__table .on { color: var(--red-ink); background: var(--red-wash); }
.geo .small { margin-top: var(--s3); max-width: 80ch; }

/* ---------- 8. Specification, details, revisions ---------- */
.spec__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.mat { margin: 0; border-top: var(--thick) solid var(--ink); }
.mat > div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s4); padding: var(--s3) 0; border-bottom: var(--thin) solid var(--line); }
.mat dt { font: 400 1rem/1.4 var(--f-draw); }
.mat dd { margin: 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 52ch; }
.parts table { width: 100%; border-top: var(--thick) solid var(--ink); }
.parts th, .parts td { padding: var(--s3) 0; border-bottom: var(--thin) solid var(--line); text-align: left; font-weight: 400; font-size: 0.9375rem; vertical-align: baseline; }
.parts td { text-align: right; font-family: var(--f-draw); font-size: 1rem; white-space: nowrap; padding-left: var(--s4); }
.parts thead th { font-size: var(--t-small); color: var(--ink-2); }
.parts thead th:not(:first-child) { text-align: right; }
.parts tfoot th { font-weight: 600; }
.parts tfoot th, .parts tfoot td { border-bottom: var(--thick) solid var(--ink); }
.parts tfoot td { font-size: 1.25rem; }

.details__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s7); }
.detail { margin: 0; display: grid; gap: var(--s4); align-content: start; }
.detail__svg { width: 100%; max-width: 320px; justify-self: center; height: auto; overflow: visible; }
.detail figcaption { font-size: 0.9375rem; max-width: 44ch; }
.detail figcaption b { font: 400 1.5rem/1 var(--f-draw); margin-right: var(--s2); display: inline-grid; place-items: center; width: 34px; height: 34px; border: var(--thin) solid var(--ink); border-radius: 50%; vertical-align: -6px; }
.detail figcaption span { display: block; color: var(--ink-2); margin-top: var(--s2); }
.d-obj { fill: var(--paper); stroke: var(--ink); stroke-width: 2.25; stroke-linejoin: round; }
.d-lug { fill: #e2e2db; }
.d-alloy { fill: var(--alloy); }
.d-thin { fill: none; stroke: var(--ink); stroke-width: 1; }
.d-cl path { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 18 4 3 4; }
.d-ring { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.d-dim path { fill: none; stroke: var(--ink); stroke-width: 1; }
.d-dim text { font: 400 15px var(--f-draw); fill: var(--ink); text-anchor: middle; stroke: var(--paper); stroke-width: 4px; paint-order: stroke; }

.revs__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--s7); align-items: start; }
.revs__table { width: 100%; border-top: var(--thick) solid var(--ink); }
.revs__table th, .revs__table td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: var(--thin) solid var(--line); text-align: left; vertical-align: baseline; font-weight: 400; }
.revs__table thead th { font-size: var(--t-small); color: var(--ink-2); }
.revs__table td { font-size: 0.9375rem; }
.revs__table td.num { font-family: var(--f-draw); white-space: nowrap; }
.revs__table .rev { font: 400 1.25rem/1 var(--f-draw); width: 3rem; }
.revs__table .rev::before { content: ""; display: inline-block; width: 0; height: 0; }
.revs__table tr.now { background: var(--paper-2); }
.revs__table tr.now .rev { color: var(--ink); }
.queue { border-top: var(--thick) solid var(--ink); padding-top: var(--s4); }
.queue__list { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.queue__list li { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: var(--thin) solid var(--line); font-size: 0.9375rem; }
.queue__list .num { font-family: var(--f-draw); font-size: 1rem; }
.queue__list .you .num { color: var(--red-ink); }

/* ---------- 9. Order and fitting ---------- */
.ordr__form { border: var(--thick) solid var(--ink); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; border: 0; border-bottom: var(--thin) solid var(--ink-2); }
.tab { position: relative; cursor: pointer; }
.tab + .tab { border-left: var(--thin) solid var(--ink-2); }
.tab input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tab span { display: grid; place-items: center; min-height: 54px; padding: 0 var(--s4); font: 400 1.125rem/1.1 var(--f-draw); text-align: center; }
.tab:hover span { background: var(--paper-2); }
.tab input:checked + span { background: var(--ink); color: var(--paper); }
.tab input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -5px; }
.ordr__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ordr__fields { padding: var(--s6); }
.ordr__fields > .small { margin-top: var(--s3); }
.ordr__sum { padding: var(--s6); border-left: var(--thin) solid var(--ink-2); background: #fafbfa; }
.ordr__sum table { width: 100%; border-top: var(--thick) solid var(--ink); margin-bottom: var(--s4); }
.ordr__sum th, .ordr__sum td { padding: var(--s3) 0; border-bottom: var(--thin) solid var(--line); text-align: left; font-weight: 400; font-size: 0.9375rem; vertical-align: baseline; }
.ordr__sum th { color: var(--ink-2); padding-right: var(--s3); }
.ordr__sum td { text-align: right; font-family: var(--f-draw); }
.ordr__sum tr:first-child td { font-family: var(--f-text); font-size: 0.875rem; }
.ordr__sum .sum th { color: var(--ink); font-weight: 600; }
.ordr__sum .sum td { font-size: 1.375rem; }
.ordr__sum .sum th, .ordr__sum .sum td { border-bottom: var(--thick) solid var(--ink); }

.check { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; cursor: pointer; font-size: 0.9375rem; font-weight: 400 !important; margin: 0 !important; }
.check input { position: absolute; z-index: 1; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.check__box { width: 24px; height: 24px; border: var(--thick) solid var(--ink); display: grid; place-items: center; background: #fafbfa; }
.check__box .i { width: 18px; height: 18px; opacity: 0; stroke-width: 2; }
.check input:checked + .check__box { background: var(--ink); color: var(--paper); }
.check input:checked + .check__box .i { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--red); outline-offset: 2px; }
.check input[aria-invalid="true"] + .check__box { border-color: var(--red-ink); }

.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.slots__day { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 0; border-top: var(--thick) solid var(--ink); }
.slots__day legend { float: left; width: 100%; font: 400 1rem/1 var(--f-draw); padding: var(--s3) 0 var(--s2); }
.slot { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); min-height: 44px; align-items: center; padding: 0 var(--s3); border: var(--thin) solid var(--ink-2); margin-top: -0.75px; cursor: pointer; clear: both; }
.slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.slot span { font: 400 1.0625rem/1 var(--f-draw); }
.slot small { font-size: 0.75rem; color: var(--ink-2); }
.slot:hover { background: var(--paper-2); }
.slot:has(input:checked) { background: var(--ink); color: var(--paper); }
.slot:has(input:checked) small { color: #cfd3d6; }
.slot:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: -4px; }
.slot.is-taken { cursor: not-allowed; background: var(--paper-2); }
.slot.is-taken span { text-decoration: line-through; color: var(--ink-2); }
.slot.is-taken input { cursor: not-allowed; }

.spin { width: 16px; height: 16px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ordr__form[data-state="loading"] .ordr__fields { opacity: 0.7; }

.ordr__result { margin-top: var(--s5); }
.issued { display: grid; grid-template-columns: auto 1fr; gap: var(--s6); align-items: center; padding: var(--s6); border: var(--thick) solid var(--ink); outline: 0; }
.issued:focus { outline: 0; }
.issued__stamp { display: grid; justify-items: center; gap: 2px; padding: var(--s4) var(--s5); border: 2px solid var(--red); color: var(--red-ink); transform: rotate(-4deg); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.issued__stamp b { font: 400 1.75rem/1 var(--f-draw); letter-spacing: 0; }
.issued__text { display: grid; gap: var(--s3); justify-items: start; max-width: 64ch; }

/* ---------- 10. Workshop, questions, footer ---------- */
.shop__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); align-items: start; }
.addr { display: grid; gap: var(--s4); justify-items: start; border-top: var(--thick) solid var(--ink); padding-top: var(--s4); }
.addr address { font: 400 1.25rem/1.4 var(--f-draw); font-style: normal; }
.hours { width: 100%; margin-top: var(--s3); }
.hours th, .hours td { text-align: left; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: var(--thin) solid var(--line); font-weight: 400; font-size: 0.9375rem; vertical-align: baseline; }
.hours th { white-space: nowrap; }
.hours td { color: var(--ink-2); }
.faq { border-top: var(--thick) solid var(--ink); }
.faq details { border-bottom: var(--thin) solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 56px; padding: var(--s3) 0; cursor: pointer; list-style: none; font: 400 1.125rem/1.3 var(--f-draw); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform 0.25s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq summary:hover { color: var(--ink-2); }
.faq details p { padding: 0 0 var(--s4); max-width: 64ch; color: var(--ink-2); }

.foot { max-width: var(--max); margin: 0 auto; padding: var(--s6) var(--gut) var(--s8); border-top: var(--thick) solid var(--ink); display: grid; grid-template-columns: auto 1fr auto; gap: var(--s5); align-items: baseline; font-size: var(--t-small); color: var(--ink-2); }
.foot__mark { font: 400 1.25rem/1 var(--f-draw); color: var(--ink); }

/* ---------- 11. Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Signature: the general arrangement is drafted. Centre lines, then the object from left to right, then dimensions. */
  .ga [data-hero-drawing]:not(.is-drawn) .layer-cl { animation: fade 0.6s var(--ease) both; }
  .ga [data-hero-drawing]:not(.is-drawn) .layer-obj { animation: draft 1.5s var(--ease) 0.25s both; }
  .ga [data-hero-drawing]:not(.is-drawn) .layer-dim { animation: draftdim 1s var(--ease) 1.25s both; }
  .ga [data-hero-drawing]:not(.is-drawn) .layer-callout { animation: fade 0.8s var(--ease) 1.8s both; }
  @keyframes draft { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes draftdim { from { opacity: 0; filter: blur(2px); } to { opacity: 1; filter: blur(0); } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .bike .layer-dim text { transition: opacity 0.2s; }
}
@media (prefers-reduced-motion: reduce) {
  .spin { animation-duration: 2.4s; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- 12. Narrow screens ---------- */
@media (max-width: 1180px) {
  .ga { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s5); }
  .ga__title { font-size: clamp(2.1rem, 0.2rem + 3.3vw, 3.1rem); max-width: none; }
  .lede { font-size: 1rem; }
  .tblock dl { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .tblock dl > div:nth-child(5) { border-left: 0; }
  .tblock dl > div:nth-child(n+5) { border-top: var(--thin) solid var(--ink-2); }
  .tblock__rev { grid-column: span 2; }
  .read { grid-template-columns: 1fr 1fr; }
  .bill { grid-column: 1 / -1; }
  .details__row { gap: var(--s5); }
}
@media (max-width: 1000px) {
  .ga { grid-template-columns: 1fr; }
  .ga__copy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s3) var(--s6); align-items: end; }
  .ga__title { max-width: 16ch; grid-row: span 2; font-size: clamp(2.2rem, 0.4rem + 4.4vw, 3.4rem); }
  .lede { margin-top: 0; }
  .ga__act { margin-top: 0; grid-column: 2; }
}
@media (max-width: 960px) {
  .top__nav { display: none; }
  .top__cta { margin-left: auto; }
  .head { grid-template-columns: 1fr; margin-bottom: var(--s6); }
  .fit__grid { grid-template-columns: 1fr; grid-template-areas: "draw" "ctrl" "read"; }
  .ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s6); }
  .ctrl__set:first-child { grid-column: 1 / -1; }
  .ctrl__set:nth-child(2) { border-top: var(--thick) solid var(--ink); }
  .spec__grid, .revs__grid, .shop__grid { grid-template-columns: 1fr; gap: var(--s6); }
  .details__row { grid-template-columns: 1fr 1fr; }
  .detail:last-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .ordr__grid { grid-template-columns: 1fr; }
  .ordr__sum { border-left: 0; border-top: var(--thin) solid var(--ink-2); }
  .foot { grid-template-columns: 1fr; gap: var(--s2); }
}
@media (max-width: 680px) {
  main > section { padding-top: var(--s7); padding-bottom: var(--s7); }
  .mark__sub { display: none; }
  .ga__copy { display: block; }
  .ga__title { font-size: clamp(2.1rem, 9.4vw, 2.6rem); }
  .lede { margin-top: var(--s4); font-size: 1rem; }
  .ga__act { margin-top: var(--s5); }
  .tblock dl { grid-template-columns: 1fr 1fr 1fr; }
  .tblock dl > div:nth-child(n) { border-left: var(--thin) solid var(--ink-2); border-top: var(--thin) solid var(--ink-2); }
  .tblock dl > div:nth-child(3n+1) { border-left: 0; }
  .tblock dl > div:nth-child(-n+3) { border-top: 0; }
  .tblock__name { grid-column: 1 / -1; border-left: 0 !important; }
  .tblock__rev { grid-column: auto; }
  .tblock__name + div { border-left: 0 !important; }
  .tblock dl > div:nth-child(2) ~ div { border-top: var(--thin) solid var(--ink-2); }
  .tblock dl > div:nth-child(5) { border-left: 0 !important; }
  .tblock dl > div:nth-child(3), .tblock dl > div:nth-child(4), .tblock dl > div:nth-child(6), .tblock dl > div:nth-child(7) { border-left: var(--thin) solid var(--ink-2); }
  .ctrl { display: block; }
  .ctrl__set:nth-child(2) { border-top: var(--thin) solid var(--ink-2); }
  .read { grid-template-columns: 1fr; }
  .details__row { grid-template-columns: 1fr; }
  .detail:last-child { grid-template-columns: 1fr; }
  .detail__svg { max-width: 260px; }
  .mat > div { grid-template-columns: 1fr; gap: var(--s1); }
  .revs__table thead { display: none; }
  .revs__table, .revs__table tbody { display: block; }
  .revs__table tr { display: grid; grid-template-columns: 2.5rem 1fr auto; gap: var(--s1) var(--s3); padding: var(--s3) var(--s2); border-bottom: var(--thin) solid var(--line); }
  .revs__table td { border: 0; padding: 0; }
  .revs__table td:nth-child(3) { grid-column: 2 / -1; grid-row: 2; }
  .revs__table td:nth-child(4) { grid-column: 3; grid-row: 1; text-align: right; color: var(--ink-2); }
  .revs__table .rev { grid-row: 1 / span 2; }
  .ordr__fields, .ordr__sum { padding: var(--s5) var(--s4); }
  .slots { grid-template-columns: 1fr; }
  .tab span { font-size: 1rem; }
  .issued { grid-template-columns: 1fr; padding: var(--s5); }
  .issued__stamp { justify-self: start; }
  .queue__list li { grid-template-columns: 5.5rem 1fr; }
  .hours th { white-space: normal; }
  .geo__wrap { overflow: visible; }
  .geo__table { min-width: 0; }
  .geo__table th, .geo__table td { padding: var(--s2) 3px; }
  .geo__table th:first-child { padding-left: var(--s1); }
  .geo__table td { font-size: 0.9375rem; }
  .geo__table thead th { font-size: 1.0625rem; }
  .geo__table tbody th { font-size: 0.8125rem; line-height: 1.25; }
  .geo__table td:last-child, .geo__table th:last-child { padding-right: var(--s1); }
}
