/*
 * 7segmentdisplay.com
 * The page is the board: solder-mask green ground, silkscreen-white
 * lettering, gold pads for anything you can press. Red appears only
 * inside a display.
 */

@font-face {
  font-family: "Sono";
  src: url("../assets/fonts/sono-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --mask: #0f4a33;          /* solder mask: the page ground */
  --mask-deep: #0a3524;     /* mask over bare laminate: menu, code, footer */
  --copper: #17603f;        /* mask over copper: raised areas */
  --silk: #f2f5ec;          /* silkscreen white */
  --silk-soft: #b9cdc0;     /* secondary text */
  --line: rgba(242, 245, 236, 0.22);
  --pad: #ebc53a;           /* solder pad gold */
  --pad-hi: #f7da6a;
  --pad-ink: #12301f;
  --face: #16171d;          /* display face */
  --seg: #ff3b1e;           /* lit segment */
  --seg-off: #2a1a1c;
  --body: #c5c6be;          /* display module body */
  --paper: #ffffff;
  --ink: #17211b;

  --font-silk: "Sono", "Segoe UI", system-ui, sans-serif;
  --font-text: "Figtree", "Segoe UI", system-ui, sans-serif;

  --wrap: 64rem;
  --chamfer: 16px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mask);
  color: var(--silk);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Sono is fixed-width by default; text uses its proportional form. */
  font-variation-settings: "MONO" 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 0;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1rem + 3.4vw, 2.85rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.7vw, 2.15rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.08rem; }

p { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--pad);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { color: var(--pad); }

:focus-visible {
  outline: 3px solid var(--pad);
  outline-offset: 3px;
}

img, svg, video { max-width: 100%; }

code, pre, output {
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 1;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  background: var(--pad);
  color: var(--pad-ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-silk);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus { top: 0.75rem; }

.offscreen {
  position: fixed;
  left: -100rem;
  top: 0;
}

/* -------------------------------------------------------------- buttons */

.pad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 0;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
  background: var(--pad);
  color: var(--pad-ink);
  border: 2px solid var(--pad);
  border-radius: 3px;
  padding: 0.7em 1.35em;
  text-decoration: none;
  white-space: nowrap;
}

a.pad-btn:hover {
  background: var(--pad-hi);
  border-color: var(--pad-hi);
  color: var(--pad-ink);
}

/* An empty footprint: the pad is drawn but nothing is fitted yet. */
.pad-btn.is-off {
  background: transparent;
  color: var(--pad);
  border-style: dashed;
  cursor: default;
}

.pad-btn-small { font-size: 0.9rem; padding: 0.45em 0.9em; }
.pad-btn-large { font-size: 1.3rem; padding: 0.8em 1.7em; }

.silk-btn {
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 0;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--silk);
  background: transparent;
  border: 1.5px solid var(--silk);
  border-radius: 999px;
  padding: 0.5em 1em;
  cursor: pointer;
}

.silk-btn:hover { background: rgba(242, 245, 236, 0.14); }

.silk-btn[aria-pressed="true"] {
  background: var(--silk);
  color: var(--mask-deep);
}

.silk-btn-small { font-size: 0.85rem; padding: 0.35em 0.85em; }

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--mask-deep);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-height: 3.5rem;
}

.brand {
  font-family: var(--font-silk);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links ul {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0 0.25rem;
}

.nav-links a {
  display: block;
  font-family: var(--font-silk);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--silk-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.95rem 0 0.8rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--silk);
  border-bottom-color: var(--pad);
}

/* ----------------------------------------------------------------- hero */

.hero { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }

.lead {
  max-width: 62ch;
  margin-top: 1rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  color: var(--silk);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}

.cta-note { color: var(--silk-soft); }

.stage {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  filter: drop-shadow(0 1.1rem 1.4rem rgba(3, 20, 13, 0.55));
}

.stage img { display: block; height: auto; }

/* -------------------------------------------------------------- display */

.d7 {
  display: block;
  width: 100%;
  height: auto;
  --lum: 0.9;
}

.d7-body { fill: var(--body); }
.d7-face { fill: var(--face); }
.d7-seg { fill: var(--seg-off); }
.d7-seg.on { fill: var(--seg); opacity: var(--lum); }
.d7-halo { fill: none; }
.d7-halo.on { fill: var(--seg); opacity: calc(var(--lum) * 0.6); }

.d7-live .d7-seg {
  cursor: pointer;
  stroke: transparent;
  stroke-width: 0.5;
  pointer-events: all;
}

.d7-live .d7-seg:not(.on):hover { fill: #5c2620; }

/* -------------------------------------------------------------- console */

.console {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem 2.5rem;
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--copper);
  clip-path: polygon(
    var(--chamfer) 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer),
    100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%,
    var(--chamfer) 100%, 0 calc(100% - var(--chamfer)), 0 var(--chamfer));
}

html:not(.js) .console { display: none; }

.console-title { grid-column: 1 / -1; font-size: 1.35rem; }

.scenes,
.hosts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.field { margin-top: 1.25rem; }
.console-board .field { margin-top: 0; }

.field label,
.jumpers legend {
  display: block;
  font-family: var(--font-silk);
  font-weight: 600;
  font-size: 1rem;
  padding: 0;
}

.field output { font-weight: 500; color: var(--pad); margin-left: 0.5em; }

.text-in {
  display: block;
  width: 100%;
  max-width: 15rem;
  margin-top: 0.5rem;
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 1;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  color: var(--silk);
  background: var(--mask-deep);
  border: 1.5px solid var(--silk);
  border-radius: 3px;
  padding: 0.35em 0.6em;
}

.hint {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--silk-soft);
  max-width: 46ch;
}

.msg {
  margin-top: 0.4rem;
  min-height: 1.5em;
  font-size: 0.95rem;
  color: var(--pad);
}

.range-in {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 17rem;
  height: 2rem;
  margin: 0.35rem 0 0;
  background: transparent;
  cursor: pointer;
}

.range-in::-webkit-slider-runnable-track { height: 3px; background: var(--silk); border-radius: 2px; }
.range-in::-moz-range-track { height: 3px; background: var(--silk); border-radius: 2px; }

.range-in::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.05rem;
  height: 1.7rem;
  margin-top: calc(1.5px - 0.85rem);
  background: var(--pad);
  border: 0;
  border-radius: 2px;
}

.range-in::-moz-range-thumb {
  width: 1.05rem;
  height: 1.7rem;
  background: var(--pad);
  border: 0;
  border-radius: 2px;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  max-width: 17rem;
  padding-inline: 0.2rem;
  font-family: var(--font-silk);
  font-size: 0.82rem;
  color: var(--silk-soft);
}

.jumpers {
  border: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  min-width: 0;
}

.jumper-row {
  display: flex;
  align-items: flex-end;
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.jumper {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.jumper input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.jumper-name {
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 1;
  font-weight: 500;
  font-size: 1rem;
}

/* A solder jumper as printed on the board: two pads inside a silkscreen
   outline. The chosen one is bridged. */
.jumper-pad {
  position: relative;
  display: block;
  width: 2.1rem;
  height: 3.1rem;
  border: 1.5px solid var(--silk);
  border-radius: 1.05rem;
  background: linear-gradient(var(--pad), var(--pad)) center / 0 0 no-repeat;
}

.jumper-pad::before,
.jumper-pad::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  right: 0.28rem;
  height: 1rem;
  background: var(--pad);
}

.jumper-pad::before { top: 0.28rem; border-radius: 0.75rem 0.75rem 0.15rem 0.15rem; }
.jumper-pad::after { bottom: 0.28rem; border-radius: 0.15rem 0.15rem 0.75rem 0.75rem; }

.jumper input:checked ~ .jumper-pad { background-size: 0.6rem 1.1rem; }
.jumper:hover .jumper-pad { border-color: var(--pad-hi); }
.jumper input:focus-visible ~ .jumper-pad { outline: 3px solid var(--pad); outline-offset: 3px; }

.jumper-legend {
  writing-mode: vertical-rl;
  font-family: var(--font-silk);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--silk-soft);
  padding-bottom: 0.2rem;
}

.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.console-call h3,
.console-wire h3,
.lib-sketch h3 { font-size: 1rem; }

.code {
  margin: 0.6rem 0 0;
  padding: 0.95rem 1.1rem;
  background: var(--mask-deep);
  color: var(--silk);
  border-radius: 4px;
  font-size: 0.93rem;
  font-weight: 450;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}

.console-call .code { min-height: 4.9rem; }

.bytes {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.bytes li {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.bytes b {
  width: 100%;
  padding: 0.5em 0;
  background: var(--mask-deep);
  border-radius: 3px;
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 1;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.bytes span {
  font-size: 0.72rem;
  color: var(--silk-soft);
  white-space: nowrap;
}

/* ------------------------------------------------------------- sections */

.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }

.section-lead {
  max-width: 64ch;
  margin-top: 0.9rem;
  font-size: 1.12rem;
  color: var(--silk-soft);
}

.prose { max-width: 66ch; }
.prose p { margin-top: 1rem; }
.prose h2 + p { margin-top: 1.1rem; }

.sub { margin-top: 3rem; }

.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 3rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.points p { margin-top: 0.4rem; color: var(--silk-soft); }
.after-points { margin-top: 2.25rem; }

/* Lists marked with a plated via. */
.points li,
.rings li {
  position: relative;
  padding-left: 1.9rem;
}

.points li::before,
.rings li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 0.95rem;
  height: 0.95rem;
  border: 0.24rem solid var(--pad);
  border-radius: 50%;
}

.rings {
  display: grid;
  gap: 0.9rem;
  list-style: none;
  max-width: 70ch;
  margin: 2.25rem 0 0;
  padding: 0;
}

.rings-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 3rem;
  max-width: none;
}

.rings strong,
.part-list strong { font-weight: 650; }

/* ---------------------------------------------------------------- parts */

.view {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  margin-top: 2.5rem;
}

.back { margin-top: 3.5rem; }
.back .view-figure { margin-top: 1.25rem; }

.view-figure { margin: 0; }
.view-figure figcaption { margin-top: 0.75rem; font-size: 0.92rem; color: var(--silk-soft); }

.view-text p { margin-top: 0.85rem; color: var(--silk-soft); }

.dim {
  position: relative;
  height: 1.5rem;
  margin-top: 0.75rem;
  border-inline: 1.5px solid var(--silk);
  text-align: center;
}

.dim::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1.5px solid var(--silk);
}

.dim span {
  position: relative;
  padding: 0 0.6rem;
  background: var(--mask);
  font-family: var(--font-silk);
  font-size: 0.9rem;
  line-height: 1.5rem;
}

.pcb { display: block; width: 100%; height: auto; }
.pcb-board { fill: #0b3b28; stroke: rgba(242, 245, 236, 0.45); stroke-width: 0.12; }
.pcb-pad { fill: var(--pad); }
.pcb-hole { fill: #062417; }
.pcb-ic { fill: #1f2023; }
.pcb-lead, .pcb-end, .pcb-mark { fill: #c9ccd0; }
.pcb-res { fill: #2c2d31; }
.pcb-cap { fill: #8c6f5c; }
.pcb-silk { fill: var(--silk); font-family: var(--font-silk); font-weight: 500; }
.pcb-silk-line { fill: none; stroke: var(--silk); stroke-width: 0.14; }
.pcb-part { transition: opacity 0.15s; }
.pcb-part:not([data-part="misc"]) { cursor: pointer; }
.pcb.has-active .pcb-part { opacity: 0.25; }
.pcb.has-active .pcb-part.is-active { opacity: 1; }

.part-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.part-list li { display: grid; }

.part-list button {
  display: grid;
  grid-template-columns: 4.3rem minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.6rem;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--silk-soft);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.part-list b {
  font-family: var(--font-silk);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--pad);
  padding-top: 0.1em;
}

.part-list strong { color: var(--silk); }

.part-list button:hover,
.part-list button.is-hot,
.part-list button[aria-pressed="true"] { background: var(--copper); }

/* --------------------------------------------------------------- wiring */

.hosts { margin-top: 1.75rem; }

.wiring {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  margin-top: 2rem;
}

.wiring-figure { margin: 0; }

.wd { display: block; width: 100%; height: auto; }
.wd-block { fill: var(--mask-deep); stroke: rgba(242, 245, 236, 0.45); stroke-width: 1.5; }
.wd-pad { fill: var(--pad); }
.wd-wire { fill: none; stroke: var(--silk); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.wd-dot { fill: var(--silk); }
.wd-text { fill: var(--silk); font-family: var(--font-silk); font-weight: 500; font-size: 15px; }
.wd-title { font-weight: 600; fill: var(--silk-soft); font-size: 13px; }

.note {
  margin-top: 1rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--pad);
  color: var(--silk-soft);
  font-size: 0.98rem;
}

/* --------------------------------------------------------------- tables */

.table {
  width: 100%;
  border-collapse: collapse;
}

.table caption {
  padding-bottom: 0.4rem;
  font-family: var(--font-silk);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: left;
}

.table th,
.table td {
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  font-family: var(--font-silk);
  font-weight: 600;
}

.table thead th { font-size: 0.9rem; color: var(--silk-soft); font-weight: 500; }

.wiring-table td {
  font-family: var(--font-silk);
  font-variation-settings: "MONO" 1;
  font-weight: 500;
}

.table-scroll { margin-top: 1.75rem; overflow-x: auto; }

.specs th { width: 13.5rem; }
.specs td { color: var(--silk-soft); }

.compare { min-width: 46rem; }
.compare th,
.compare td { padding-left: 0.9rem; font-size: 0.97rem; }
.compare thead th { font-size: 1rem; color: var(--silk); font-weight: 600; vertical-align: bottom; }
.compare thead span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--silk-soft); font-family: var(--font-text); }
.compare tbody th { width: 11.5rem; padding-left: 0; }
.compare td { color: var(--silk-soft); }
.compare .ours { background: var(--copper); color: var(--silk); }

.links { margin-top: 1.25rem; color: var(--silk-soft); }
.links a { color: var(--silk); margin-right: 1.25rem; }
.links a:hover { color: var(--pad); }

.sources { margin-top: 1rem; font-size: 0.92rem; color: var(--silk-soft); max-width: 78ch; }
.sources a { color: var(--silk); margin-right: 1.25rem; white-space: nowrap; }
.sources a:hover { color: var(--pad); }
.scroll-hint { display: none; margin-top: 0.6rem; font-size: 0.88rem; color: var(--silk-soft); }

/* -------------------------------------------------------------- library */

.calls,
.boards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
}

.calls code,
.boards code {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.86rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.calls p { margin-top: 0.3rem; font-size: 0.9rem; line-height: 1.45; color: var(--silk-soft); }

.lib {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2.5rem 3rem;
  align-items: start;
  margin-top: 3.5rem;
}

.lib-install h3 { margin-top: 2rem; }
.lib-install h3:first-child { margin-top: 0; }
.lib-install p { margin-top: 0.7rem; color: var(--silk-soft); }

.steps {
  margin: 0.8rem 0 0;
  padding-left: 1.4rem;
  color: var(--silk-soft);
}

.steps li { padding-left: 0.3rem; margin-top: 0.45rem; }
.steps li::marker { font-family: var(--font-silk); font-weight: 600; color: var(--pad); }
.steps b { color: var(--silk); font-weight: 600; }

.examples {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.4rem 1.25rem;
  margin: 0.8rem 0 0;
}

.examples dt { font-family: var(--font-silk); font-weight: 500; }
.examples dd { margin: 0; color: var(--silk-soft); }

.code-tall { font-size: 0.84rem; }

/* -------------------------------------------------------------- gallery */

.section-paper {
  background: var(--paper);
  color: var(--ink);
}

.section-paper h2 { color: var(--mask); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.75rem;
}

.gallery figure { margin: 0; }

.gallery img,
.gallery video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #3d4a42;
}

.tag {
  display: inline-block;
  margin-left: 0.2rem;
  padding: 0.05em 0.6em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-silk);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ faq */

.faq { margin: 1.75rem 0 0; border-bottom: 1px solid var(--line); }

.faq > div {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: 0.4rem 3rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}

.faq dt {
  font-family: var(--font-silk);
  font-weight: 600;
  line-height: 1.35;
}

.faq dd { margin: 0; color: var(--silk-soft); max-width: 62ch; }

/* ------------------------------------------------------------------ buy */

.section-buy { background: var(--copper); }

.buy {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  margin-top: 1.75rem;
}

.buy-action .cta-note { margin-top: 1rem; max-width: 40ch; color: var(--silk); }
.buy-box h3 { font-size: 1rem; margin-top: 1.25rem; }
.buy-box h3:first-child { margin-top: 0; }
.buy-box p { margin-top: 0.3rem; }

/* --------------------------------------------------------------- footer */

.footer {
  background: var(--mask-deep);
  padding-block: 2.75rem 3.5rem;
  font-size: 0.92rem;
  color: var(--silk-soft);
}

.footer p { max-width: 78ch; margin-top: 0.6rem; }

.footer-brand {
  font-family: var(--font-silk);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--silk);
}

.footer a { color: var(--silk); }
.footer a:hover { color: var(--pad); }

/* ------------------------------------------------------------ narrower */

@media (max-width: 62rem) {
  .calls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib { grid-template-columns: minmax(0, 1fr); }
  .view,
  .wiring { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 46rem) {
  .nav-row { flex-wrap: wrap; justify-content: space-between; padding-top: 0.5rem; }
  .nav-links { order: 3; flex: 0 0 100%; }
  .nav-links ul { justify-content: flex-start; gap: 1.25rem; }
  .nav-links a { padding: 0.55rem 0 0.5rem; }
  html { scroll-padding-top: 7rem; }

  .console { grid-template-columns: minmax(0, 1fr); }
  .points,
  .rings-wide,
  .gallery,
  .part-list,
  .buy { grid-template-columns: minmax(0, 1fr); }
  .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boards code { font-size: 0.74rem; }
  /* Narrow the comparison so the next column shows at the edge. */
  .compare { min-width: 40rem; }
  .compare th,
  .compare td { padding-left: 0.7rem; font-size: 0.9rem; }
  .compare tbody th { width: 6.5rem; }
  .scroll-hint { display: block; }
  .faq > div { grid-template-columns: minmax(0, 1fr); }
  .specs th { width: 9rem; }
  .bytes span { font-size: 0.62rem; }
  .bytes b { font-size: 0.95rem; }
}

@media (max-width: 34rem) {
  /* Call gallery: one per row, display on the left, call and note beside it. */
  .calls { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .calls li {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    column-gap: 0.9rem;
    align-items: start;
  }
  .calls .display-host { grid-row: 1 / span 2; }
  .calls code { margin-top: 0; font-size: 0.8rem; }
  .code-tall { font-size: 0.78rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pcb-part { transition: none; }
}
