/* BuildToSizePlans: one stylesheet.
   Tokens come from the product renders and the shop logo:
   navy #1F3A5F, ground #FAF6EE, accent #C67C2A, ply #D6BA8A,
   board #DEB887, board edge #B08454, cut mark #C83C28.
   Mobile first. No external fonts. Light and dark through prefers-color-scheme. */

:root {
  /* brand constants (do not change with the theme) */
  --navy: #1F3A5F;
  --navy-deep: #14273F;
  --paper: #FAF6EE;
  --amber: #C67C2A;
  --timber: #DEB887;
  --timber-2: #D6BA8A;
  --timber-edge: #B08454;
  --cut: #C83C28;

  /* semantic tokens, light theme */
  --bg: #FAF6EE;
  --bg-2: #F2EBDC;
  --surface: #FFFDF8;
  --text: #24221E;
  --muted: #5A554C;
  --heading: #1F3A5F;
  --link: #1F3A5F;
  --accent-ink: #8A500C;
  --rule: #D9CFBB;
  --rule-strong: #1F3A5F;
  --tick: rgba(31, 58, 95, .55);
  --focus: #C83C28;
  --sheet: #FAF6EE;            /* ground behind renders: always the paper colour */
  --sheet-edge: #D9CFBB;
  --shadow: 0 1px 0 rgba(31, 58, 95, .08), 0 10px 24px -18px rgba(31, 58, 95, .45);

  --font-display: "DIN Alternate", "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem);
  --step-3: clamp(1.8rem, 1.35rem + 2.2vw, 2.7rem);
  --step-4: clamp(2.1rem, 1.25rem + 4.4vw, 3.6rem);

  --gap: clamp(1rem, .6rem + 1.6vw, 1.75rem);
  --section: clamp(2.75rem, 1.8rem + 4.5vw, 5.5rem);
  --wrap: 72rem;
  --gutter: clamp(1rem, .5rem + 2.4vw, 2rem);
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1929;
    --bg-2: #132238;
    --surface: #172A44;
    --text: #EAE3D4;
    --muted: #B3AB9B;
    --heading: #F5EEDF;
    --link: #F0C891;
    --accent-ink: #EDB36A;
    --rule: #2B4264;
    --rule-strong: #DEB887;
    --tick: rgba(222, 184, 135, .6);
    --focus: #FF8A70;
    --sheet-edge: #2B4264;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 28px -18px rgba(0, 0, 0, .9);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font-body);
  overflow-wrap: break-word;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; letter-spacing: 0; }
p, ul, ol, dl, figure, table { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .3em; }
a { color: var(--link); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
/* on the navy header, nav, footer and buy bar the red ring is too faint: use white */
.site-header :focus-visible, .site-footer :focus-visible, .buybar :focus-visible { outline-color: #fff; }
strong, b { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
::selection { background: var(--timber); color: var(--navy-deep); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: .5rem; top: -4rem; z-index: 20;
  background: var(--amber); color: var(--navy-deep); padding: .7rem 1rem; font-weight: 650;
}
.skip:focus { top: .5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
/* grid children may shrink below their content, so a wide table scrolls inside its own box instead of widening the page */
.hero-grid > *, .kit-hero-grid > *, .cols > *, .fig-grid > *, .kit-grid > *, .dims > *, .steps > *, .howbuy > *, .foot-grid > * { min-width: 0; }
.narrow { max-width: 46rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.eyebrow {
  font: 600 .78rem/1.2 var(--font-mono);
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 .9rem;
}
.lede { font-size: var(--step-1); line-height: 1.45; max-width: 38em; }

/* ---------- ruler: the tick strip from the logo ---------- */
.ruler {
  height: 12px;
  background:
    linear-gradient(var(--tick), var(--tick)) 0 0 / 100% 1.5px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1.5px, transparent 1.5px 40px) 0 0 / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--tick) 0 1px, transparent 1px 8px) 0 0 / 100% 6px no-repeat;
}

/* ---------- header ---------- */
.site-header { background: var(--navy); color: #fff; }
.site-header .ruler { --tick: rgba(255, 255, 255, .5); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; min-height: 44px; min-width: 0; }
.brand svg { width: clamp(2.4rem, 1.6rem + 3vw, 3.4rem); height: auto; flex: none; }
.brand-name { font: 700 clamp(1.05rem, .85rem + 1.2vw, 1.3rem)/1 var(--font-display); letter-spacing: .005em; white-space: nowrap; }
@media (max-width: 24rem) { .hide-xs { display: none; } }
.brand-name span { color: var(--timber); }
.masthead-link {
  color: #fff; font-size: var(--step--1); white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-nav { background: var(--navy-deep); }
/* four short items that fit a 360 px screen; on anything narrower they wrap to a second row, never scroll */
.site-nav ul {
  list-style: none; margin: 0 -.5rem; padding: 0; display: flex; flex-wrap: wrap; column-gap: .1rem;
}
.site-nav li { margin: 0; flex: none; }
.site-nav a:focus-visible { outline-offset: -3px; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 .5rem;
  color: #E8EDF4; text-decoration: none; font-size: .95rem; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--timber); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--cut); color: #fff; font-weight: 650; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.25rem;
  font: 650 1.05rem/1.1 var(--font-body); text-decoration: none; text-align: center;
  border: 2px solid var(--heading); border-radius: var(--radius);
  color: var(--heading); background: transparent; cursor: pointer;
}
.btn:hover { background: var(--bg-2); }
.btn-buy {
  background: var(--amber); border-color: var(--amber); color: var(--navy-deep);
  box-shadow: 0 3px 0 var(--timber-edge);
}
.btn-buy:hover { background: #D48A36; border-color: #D48A36; }
.btn-buy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--timber-edge); }
.btn-buy .ext { font: 400 .8em/1 var(--font-mono); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- sections ---------- */
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 46rem; margin-bottom: calc(var(--gap) * 1.2); }
.section-head p:last-child { margin-bottom: 0; }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(2rem, 1rem + 5vw, 4.5rem) var(--section); }
.hero-grid { display: grid; gap: calc(var(--gap) * 1.4); align-items: start; }
.hero h1 em { font-style: normal; color: var(--accent-ink); display: block; }
.hero .lede { margin-bottom: 1.5rem; }
.hero-grid > .kit-strip { margin: 0; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem 3.5rem; }
  .hero-grid > :first-child { grid-column: 1; grid-row: 1; }
  .hero-card { grid-column: 2; grid-row: 1; }
  .hero-grid > .kit-strip { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(6, 1fr); }
}

/* the six kits as small pictures, in the first screen */
.kit-strip { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.kit-strip li { margin: 0; }
.kit-strip a { display: block; text-decoration: none; color: var(--heading); font-size: .85rem; font-weight: 600; line-height: 1.25; min-height: 44px; }
.kit-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--sheet); border: 1px solid var(--sheet-edge); border-radius: var(--radius); padding: .3rem; margin-bottom: .35rem; }
.kit-strip a:hover img { border-color: var(--rule-strong); }
@media (min-width: 40rem) { .kit-strip { grid-template-columns: repeat(6, 1fr); } }

/* the two-run card: numbers read from the real spreadsheet */
.recalc {
  background: var(--surface); border: 1px solid var(--rule); border-top: 6px solid var(--navy);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1rem .9rem;
}
.recalc-title { font: 600 .78rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.recalc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.recalc th, .recalc td { padding: .42rem .45rem; border-bottom: 1px solid var(--rule); font-weight: 400; }
.recalc td { text-align: right; white-space: nowrap; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.recalc tbody th { text-align: left; padding-left: 0; }
.recalc thead th { text-align: right; font: 600 .8rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--rule-strong); white-space: nowrap; }
.recalc thead td { border-bottom: 2px solid var(--rule-strong); }
.recalc thead th { white-space: normal; vertical-align: bottom; }
@media (max-width: 23rem) {                /* the card must fit a 320 px screen */
  .recalc { padding-inline: .75rem; }
  .recalc th, .recalc td { padding-inline: .25rem; }
  .recalc td { font-size: .86rem; }
  .recalc .answer td { font-size: 1.05rem; }
}
.recalc .group th { font: 600 .8rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); padding-top: .8rem; border-bottom: 0; }
.recalc .typed td { background: #FFF3B0; color: #1E1E1E; }     /* the spreadsheet's yellow input cells */
.recalc .answer td { font-weight: 700; font-size: 1.15rem; color: var(--heading); }
.recalc tbody tr:last-child > * { border-bottom: 0; }
.recalc-note { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
@media (prefers-color-scheme: dark) { .recalc { border-top-color: var(--timber); } }

/* ---------- three points: one board, three cuts ---------- */
.board3 { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0; counter-reset: none; }
.prose .board3 h3, .prose .howbuy h3 { margin-top: 0; }
.board3 > li {
  margin: 0; padding: 1.2rem 1.1rem 1.3rem;
  background: var(--timber); color: #2A2114;
  border: 2px solid var(--timber-edge); border-bottom-width: 0;
  background-image: repeating-linear-gradient(100deg, transparent 0 46px, rgba(176, 132, 84, .5) 46px 47.5px);
  position: relative;
}
.board3 > li:last-child { border-bottom-width: 2px; }
.board3 > li + li::before {            /* the cut mark between two pieces */
  content: ""; position: absolute; left: -8px; right: -8px; top: -3px; height: 4px; background: var(--cut); z-index: 1;
}
.board3 h3 { color: var(--navy-deep); font-size: 1.35rem; margin-bottom: .35rem; }
.board3 p { margin: 0; line-height: 1.5; }
@media (min-width: 52rem) {
  .board3 { grid-template-columns: repeat(3, 1fr); }
  .board3 > li { border-bottom-width: 2px; border-right-width: 0; padding: 1.5rem 1.4rem 1.6rem; }
  .board3 > li:last-child { border-right-width: 2px; }
  .board3 > li + li::before { left: -3px; right: auto; top: -10px; bottom: -10px; width: 4px; height: auto; }
}

/* ---------- figures: every picture sits on a sheet with an honest label ---------- */
.fig { margin: 0 0 1.25rem; }
.fig-sheet {
  background: var(--sheet); border: 1px solid var(--sheet-edge); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.fig-sheet img, .fig-sheet video { width: 100%; }
.fig-zoom { display: block; cursor: zoom-in; }
/* pages of the PDFs and the kit's own graphics hold small print: on a phone they keep a readable width and scroll */
.only-wide { display: none; }
@media (max-width: 44rem) {
  .fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig-scroll img { width: 46rem; max-width: none; }
}
@media (min-width: 44.01rem) { .only-narrow { display: none; } }
.fig-pad .fig-sheet { padding: clamp(.75rem, 3vw, 1.75rem); }
.fig figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .55rem; line-height: 1.45; }
.kind {
  display: inline-block; font: 600 .8rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  padding: .28rem .4rem; margin-right: .45rem; border: 1px solid currentColor; border-radius: 2px;
  color: var(--muted); vertical-align: .08em; white-space: nowrap;
}
.kind-ai { color: #fff; background: var(--cut); border-color: var(--cut); }
.fig-grid { display: grid; gap: var(--gap); }
@media (min-width: 44rem) { .fig-grid.two { grid-template-columns: 1fr 1fr; } }

/* ---------- kit cards ---------- */
.kit-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
@media (min-width: 40rem) { .kit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .kit-grid { grid-template-columns: repeat(3, 1fr); } }
.kit-card {
  margin: 0; display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.kit-card-img { background: var(--sheet); padding: 1rem; border-bottom: 1px solid var(--sheet-edge); }
.kit-card-img img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.kit-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.kit-card h3 { font-size: 1.5rem; margin: 0; }
.kit-card h3 a { color: inherit; text-decoration: none; }
.kit-card h3 a::after { content: ""; position: absolute; inset: 0; }       /* whole card is the link */
.kit-card:hover { border-color: var(--rule-strong); }
.kit-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.kit-card h3 a:focus-visible { outline: none; }
.kit-card p { margin: 0; }
.kit-card .ranges { list-style: none; margin: .2rem 0 0; padding: .6rem 0 0; border-top: 1px dashed var(--rule); font: 400 .84rem/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.kit-card .ranges li { margin: 0; display: flex; justify-content: space-between; gap: .75rem; }
.kit-card .ranges span:first-child { font-family: var(--font-body); color: var(--muted); }
.kit-card-foot { margin-top: auto; padding-top: .7rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.price { font: 700 1.45rem/1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.price small { font: 400 .8rem/1 var(--font-mono); color: var(--muted); letter-spacing: .05em; margin-left: .3rem; }
.price-what { display: block; font-size: var(--step--1); color: var(--muted); margin-top: .35rem; }
.kit-card-what { font-size: var(--step--1); color: var(--accent-ink); font-weight: 600; }
.go { font-weight: 650; color: var(--link); }
a.go { display: inline-flex; align-items: center; min-height: 44px; }
.go::after { content: " \2192"; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.25rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table-wrap table { margin: 0; min-width: 30rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font: 600 .8rem/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--rule-strong); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- sizes you can type: each input drawn as a board with its default cut ---------- */
.dims { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem 2.5rem; }
@media (min-width: 52rem) { .dims { grid-template-columns: 1fr 1fr; } }
.dim { margin: 0; }
.dim-name { font-weight: 650; }
.dim-detail { display: block; font-size: var(--step--1); color: var(--muted); line-height: 1.4; }
.dim-board {
  position: relative; height: 16px; margin: .55rem 0 .3rem;
  background: var(--timber); border: 1.5px solid var(--timber-edge);
  background-image: repeating-linear-gradient(100deg, transparent 0 30px, rgba(176, 132, 84, .55) 30px 31px);
}
.dim-board::after {                    /* the default, as a cut mark */
  content: ""; position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px;
  left: var(--p, 50%); background: var(--cut);
}
.dim-ends { display: flex; justify-content: space-between; gap: 1rem; font: 400 .86rem/1.35 var(--font-mono); font-variant-numeric: tabular-nums; }
.dim-ends span:last-child { text-align: right; }
.dim-ends b { display: block; font-size: 1rem; }
.dim-default { font-size: var(--step--1); color: var(--muted); margin: .25rem 0 0; }
.dim-default i { font-style: normal; display: inline-block; width: 3px; height: .9em; background: var(--cut); margin-right: .4rem; vertical-align: -.1em; }
.dim-text { margin: .3rem 0 0; font-size: .95rem; }
.dims-more { margin-top: 1.5rem; }
.dims-more > .dims { padding: .5rem 1rem 1.1rem; }
/* the jump links under the facts strip */
.jump { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; margin-top: 1rem; font-size: .95rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- kit page ---------- */
.crumbs { font-size: var(--step--1); color: var(--muted); padding-top: 1rem; }
.crumbs a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
.crumbs { padding-top: .25rem; }
.kit-hero { padding-block: 1.25rem var(--section); }
.kit-hero-grid { display: grid; gap: 1.1rem; align-items: start; }
.kit-hero h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); max-width: 14em; margin-bottom: 0; }
.kit-hero .fig { margin-bottom: 0; }
@media (min-width: 60rem) {
  .kit-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 3rem; row-gap: 1.5rem;
    grid-template-areas: "head media" "body media"; grid-template-rows: auto 1fr;
  }
  .kit-hero-head { grid-area: head; }
  .kit-hero-body { grid-area: body; }
  .kit-hero-media { grid-area: media; }
}
.buybox { border-top: 2px solid var(--rule-strong); padding-top: 1.1rem; margin-top: 1.4rem; }
.buybox .price { font-size: 2.2rem; }
.buybox .btn-buy { width: 100%; margin: .9rem 0 .7rem; min-height: 54px; font-size: 1.15rem; }
@media (min-width: 30rem) { .buybox .btn-buy { width: auto; min-width: 16rem; } }
.buy-note { font-size: var(--step--1); color: var(--muted); margin: 0; max-width: 34em; }
.buy-note + .buy-note { margin-top: .35rem; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.facts li { margin: 0; padding: .8rem .9rem; background: var(--surface); }
.facts b { display: block; font: 700 1.2rem/1.15 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--heading); }
.facts span { font-size: .84rem; color: var(--muted); line-height: 1.3; display: block; margin-top: .2rem; }
@media (min-width: 52rem) { .facts.four { grid-template-columns: repeat(4, 1fr); } }

.files { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: 2px solid var(--rule-strong); }
.files > li { margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--rule); display: grid; gap: .15rem .9rem; }
.files .fname { font: 700 1rem/1.3 var(--font-mono); color: var(--heading); overflow-wrap: anywhere; }
.files p { margin: 0; }
.files ul { margin: .35rem 0 0; font-size: .95rem; }
@media (min-width: 44rem) { .files > li { grid-template-columns: 13.5rem 1fr; } }

.steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr; counter-reset: step; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { margin: 0; counter-increment: step; }
.steps .fig-sheet { box-shadow: none; }
.steps p { margin: .5rem 0 0; font-size: var(--step--1); line-height: 1.4; display: grid; grid-template-columns: auto 1fr; gap: .5rem; }
.steps p::before { content: counter(step); font: 700 .8rem/1.5rem var(--font-mono); width: 1.5rem; height: 1.5rem; text-align: center; border-radius: 50%; background: var(--navy); color: #fff; }

.cols { display: grid; gap: var(--gap); }
@media (min-width: 52rem) { .cols { grid-template-columns: 1fr 1fr; gap: 3rem; } .cols.wide-left { grid-template-columns: 1.25fr 1fr; } }
.plain { list-style: none; padding: 0; }
.plain li { padding: .45rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.buylist { list-style: none; padding: 0; margin: 0 0 1rem; }
.buylist li { margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem; align-items: baseline; }
.buylist b { font: 700 1.5rem/1 var(--font-mono); color: var(--accent-ink); text-align: right; }

.callout { border: 1px solid var(--rule); border-left: 6px solid var(--cut); background: var(--surface); padding: 1rem 1.1rem; border-radius: var(--radius); margin: 0 0 1.25rem; }
.callout > :last-child { margin-bottom: 0; }
.callout h3 { margin-bottom: .5rem; }
.callout.is-note { border-left-color: var(--navy); }
@media (prefers-color-scheme: dark) { .callout.is-note { border-left-color: var(--timber); } }
.verbatim { font-size: .95rem; line-height: 1.55; }
ul.safety { padding-left: 1.1em; margin-bottom: .6rem; }
ul.safety li + li { margin-top: .45em; }

details { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin: 0 0 .6rem; }
summary { cursor: pointer; padding: .85rem 2.6rem .85rem 1rem; font-weight: 650; min-height: 48px; display: flex; align-items: center; position: relative; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font: 400 1.5rem/1 var(--font-mono); color: var(--accent-ink); }
details[open] > summary::after { content: "\2212"; }
details > .details-body { padding: 0 1rem 1rem; }
details > .details-body > :last-child { margin-bottom: 0; }

.howbuy { list-style: none; margin: 0; padding: 0; counter-reset: how; display: grid; gap: 1rem; }
@media (min-width: 52rem) { .howbuy { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.howbuy li { margin: 0; counter-increment: how; padding-top: .9rem; border-top: 2px solid var(--rule-strong); position: relative; }
.howbuy li::before { content: counter(how); font: 700 .85rem/1 var(--font-mono); color: var(--accent-ink); display: block; margin-bottom: .45rem; letter-spacing: .08em; }
.howbuy h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.howbuy p { margin: 0; font-size: .97rem; }

.table-wrap table.proof-table { min-width: 0; }
.proof-table td:first-child { font-weight: 650; }
.proof-table th, .proof-table td { padding-inline: .55rem; }

/* related kits, compact */
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
@media (min-width: 40rem) { .related { grid-template-columns: 1fr 1fr; } }
.related li { margin: 0; }
.related a { display: grid; grid-template-columns: 5.5rem 1fr; gap: .9rem; align-items: center; padding: .6rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); text-decoration: none; min-height: 44px; }
.related a:hover { border-color: var(--rule-strong); }
.related img { background: var(--sheet); border-radius: 2px; aspect-ratio: 4 / 3; object-fit: contain; padding: .25rem; }
.related b { display: block; font: 700 1.15rem/1.2 var(--font-display); color: var(--heading); }
.related span { font-size: var(--step--1); color: var(--muted); }

/* sticky buy bar on small screens; site.js hides it while the main button is on screen */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .55rem var(--gutter) calc(.55rem + env(safe-area-inset-bottom, 0px));
  background: var(--navy); color: #fff; border-top: 3px solid var(--amber);
  transition: transform .2s ease, visibility 0s linear 0s;
}
.buybar[hidden] { display: none; }
.buybar.is-away { transform: translateY(110%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.buybar-price { display: flex; flex-direction: column; }
.buybar .price-what { color: #C9D3E0; margin-top: .2rem; font-size: .8rem; }
.buybar .price { color: #fff; font-size: 1.3rem; }
.buybar .price small { color: #C9D3E0; }
.buybar .btn-buy { min-height: 44px; padding: .5rem 1rem; box-shadow: none; }
/* room for the bar at the end of the page, in the footer's own colour */
.has-buybar .site-footer { padding-bottom: calc(2rem + 5rem); }
@media (min-width: 60rem) { .buybar { display: none; } .has-buybar .site-footer { padding-bottom: 2rem; } }

/* ---------- prose pages ---------- */
.page-head { padding-block: clamp(1.75rem, 1rem + 4vw, 3.5rem) 1.25rem; }
/* text pages: one centred reading column */
.page-head, .prose { margin-inline: auto; max-width: 44rem; }
.page-head h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); }
.prose { padding-bottom: var(--section); }
.linklist .prose li { margin: 0; }
.linklist .prose li a { display: inline-flex; align-items: center; min-height: 44px; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose > :first-child { margin-top: 0; }
.stub-note { border: 1px dashed var(--rule-strong); padding: .9rem 1rem; border-radius: var(--radius); color: var(--muted); font-size: var(--step--1); }

/* tool pages */
.tool { border: 1px solid var(--rule); border-top: 6px solid var(--navy); background: var(--surface); border-radius: var(--radius); padding: 1.1rem; margin: 0 0 1.5rem; box-shadow: var(--shadow); }
.tool label { display: block; font-weight: 650; margin-bottom: .3rem; }
.tool input, .tool select { font: inherit; min-height: 44px; padding: .4rem .6rem; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); background: var(--bg); color: var(--text); max-width: 100%; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #D7DEE8; padding-block: 2.5rem 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .ruler { --tick: rgba(255, 255, 255, .35); margin-bottom: 2rem; }
.foot-grid { display: grid; gap: 1.75rem; }
@media (min-width: 52rem) { .foot-grid { grid-template-columns: 1.3fr 1fr 1.2fr; gap: 3rem; } }
.site-footer h2 { font: 600 .78rem/1.2 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--timber); margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.site-footer p > a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer p { margin: 0 0 .7em; max-width: 34em; }
.site-footer p + h2 { margin-top: 1.6rem; }
.site-footer .foot-end { max-width: none; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .18); color: #AEBACA; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-nav, .buybar, .site-footer, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
