/* ==========================================================================
   PactoTech — design system
   A small hardware company's site: closer to a component manufacturer or a
   well-made datasheet than a landing page. Flat dark surfaces, 1px hairlines,
   one sans, cyan used sparingly. No gradients, glows, blur or decorative motion.
   Motion belongs to the interactive explainers, where it explains something.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces: flat, same family as the PactoTech Utility */
  --bg: #0d1116;
  --bg-2: #11161b;
  --band: #19212a;       /* alternating section bands: clearly lighter than --bg, so the change shows on a dull monitor (Lee, 2026-11-14) */
  --surface: #151a20;
  --surface-2: #1c2229;
  --surface-3: #242c35;
  --stage: #1c2229;      /* behind product cut-outs */
  --stage-lit: #3a434d;  /* behind black products that vanish on --stage */
  --line: #2a323c;
  --line-2: #3a444f;
  --line-3: #6b7883;     /* control outlines: at least 3:1 on every surface */

  /* Text: every token passes AA (4.5:1) on every surface above */
  --text: #e8eef2;
  --text-2: #bcc7cf;
  --muted: #a0adb8;
  --dim: #8e9ca8;

  /* Brand: the single accent */
  --cyan: #3bc6f3;
  --cyan-hi: #8fe0ff;
  --cyan-lo: #1786b4;
  --on-cyan: #06141b;    /* text on solid cyan */
  --teal: #70c0c8;
  --teal-2: #5e9da3;
  --slate: #262a2f;

  /* Data colours: for seats and states in the explainers, not for decoration */
  --magenta: #ff4f9a;
  --amber: #ffb547;
  --lime: #a6e64a;
  --red: #ff5d5d;
  --violet: #9b8cff;

  /* Players (match the Tester colours where possible) */
  --p1: var(--cyan);
  --p2: var(--magenta);
  --p3: var(--amber);
  --p4: var(--lime);

  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  /* Type: one sans. Mono only for spec values, pin labels and code. */
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: var(--font-body);
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.1875rem;
  --fs-2xl: clamp(1.3rem, 1.2rem + 0.4vw, 1.5rem);
  --fs-3xl: clamp(1.45rem, 1.3rem + 0.6vw, 1.85rem);  /* h2 */
  --fs-hero: clamp(1.9rem, 1.6rem + 1.2vw, 2.75rem);  /* h1 */

  /* Space + shape */
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --r-sm: 3px;
  --r: 4px;
  --r-lg: 6px;
  --r-xl: 6px;

  /* Kept as tokens because page CSS still reads them; both are deliberately no shadow at all. */
  --shadow: 0 0 #0000;
  --glow: 0 0 #0000;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 60px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-md)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;   /* clip, unlike hidden, can't be panned sideways on phones and leaves sticky bars alone */
}
html { overflow-x: clip; }
/* Inter's contextual alternates turn the x in "x64" into a multiplication sign. Every real × on the site is typed as ×. */
*, ::before, ::after { font-variant-ligatures: no-contextual !important; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-hi); }
/* Links inside running text are underlined, so colour isn't the only thing marking them. */
main p a:not(.btn), main td a:not(.btn), main dd a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(59, 198, 243, 0.35); color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1, h2 { font-weight: 500; }
h1 { font-size: var(--fs-hero); line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); line-height: 1.18; }
h3 { font-size: var(--fs-xl); line-height: 1.3; letter-spacing: 0; }
h4 { font-size: var(--fs-md); line-height: 1.35; letter-spacing: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em; }
kbd {
  display: inline-block; padding: 0.05em 0.4em; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--line-2); font-size: 0.82em;
}
main kbd, main code { font-size: max(0.85em, var(--fs-xs)); }
hr { border: 0; height: 1px; background: var(--line); margin: 2rem 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--cyan); color: var(--on-cyan); padding: 10px 14px; border-radius: var(--r); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 860px; }
.container--wide { max-width: 1440px; }
.section { position: relative; padding-block: clamp(44px, 6vw, 80px); }
.section--tight { padding-block: clamp(28px, 4vw, 48px); }
.section + .section--flush { padding-top: 0; }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.split--wide-left { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split--wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.flex { display: flex; gap: var(--gap, 10px); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split--wide-left, .split--wide-right { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Type helpers ---------- */
/* A plain category label above a heading. Write it in sentence case in the markup. */
.eyebrow { display: block; font: 500 var(--fs-sm)/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); margin-bottom: 8px; }
.lead { font-size: var(--fs-lg); color: var(--text-2); max-width: 68ch; line-height: 1.6; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.hl { color: var(--cyan); }
.nowrap { white-space: nowrap; }
/* A label printed on the board: <span class="pin">DISC</span> */
.pin { display: inline-block; padding: 0 0.4em; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font: 500 max(0.82em, var(--fs-xs))/1.5 var(--font-mono); white-space: nowrap; }

/* ---------- Buttons: one primary, one secondary ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent;
  font: 600 0.9375rem/1 var(--font-body); cursor: pointer; white-space: nowrap;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.btn .ico { width: 18px; height: 18px; }
.btn--primary { color: var(--on-cyan); background: var(--cyan); border-color: var(--cyan); }
@media (hover: hover) { .btn--primary:hover { color: var(--on-cyan); background: var(--cyan-hi); border-color: var(--cyan-hi); } }
.btn--ghost, .btn--secondary { color: var(--text); background: transparent; border-color: var(--line-3); }
@media (hover: hover) { .btn--ghost:hover, .btn--secondary:hover { color: var(--text); border-color: var(--cyan); } }
.btn--sm { height: 36px; padding: 0 12px; font-size: var(--fs-sm); }
.btn--lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { color: var(--muted); background: var(--surface-2); border-color: var(--line-2); pointer-events: none; }
.link-arrow { display: inline-block; font-weight: 500; }
.link-arrow::after { content: '→'; margin-left: 6px; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2);
  font: 500 var(--fs-xs)/1 var(--font-body); cursor: pointer; user-select: none;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.chip:hover { border-color: var(--line-3); color: var(--text); }
.chip[aria-pressed='true'], .chip.is-on { color: var(--on-cyan); background: var(--cyan); border-color: var(--cyan); }
.chip[aria-pressed='true'] .dim, .chip.is-on .dim, .chip[aria-pressed='true'] .muted, .chip.is-on .muted { color: inherit; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border-radius: var(--r-sm);
  font: 500 var(--fs-xs)/1.25 var(--font-body); letter-spacing: 0; text-transform: none;
  background: transparent; color: var(--text-2); border: 1px solid var(--line-2);
}
.badge--ok { color: var(--ok); border-color: #2f6b47; }
.badge--bad { color: var(--bad); border-color: #7a3a3a; }
.badge--warn { color: var(--warn); border-color: #75602a; }
.badge--new { color: var(--text-2); border-color: var(--line-3); }

/* ---------- Cards ---------- */
.card {
  position: relative; border-radius: var(--r-lg); padding: clamp(16px, 2.4vw, 24px);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.12s;
}
.card--hover:hover { border-color: var(--line-3); }
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav .nav-trigger {
  height: 36px; padding: 0 12px; border-radius: var(--r); display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-weight: 500; font-size: 0.9375rem; background: none; border: 0; cursor: pointer;
}
.nav > a:hover, .nav .nav-trigger:hover, .nav > a[aria-current='page'], .nav .nav-trigger[aria-current='page'] { color: var(--text); background: var(--surface-2); }
.nav-item { position: relative; }
.nav-trigger::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.7; }
.mega {
  position: absolute; top: calc(100% + 11px); left: 50%; transform: translateX(-50%); width: min(720px, 92vw);
  padding: 8px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line-2);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  opacity: 0; visibility: hidden; transition: opacity 0.1s, visibility 0.1s;
}
/* Bridges the gap between the trigger and the menu so the pointer can cross it. */
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mega--2 { grid-template-columns: repeat(2, 1fr); width: min(520px, 92vw); }
/* A lone last item in a 3-column menu (e.g. Encoders: 5 boards + "ATLAS0 vs ATLAS1" + "Compare") becomes a slim
   full-width footer link instead of sitting by itself on a third row. */
.mega:not(.mega--2) > a:last-child:nth-child(3n + 1) {
  grid-column: 1 / -1; justify-content: center; padding: 8px 10px; margin-top: 4px;
  border-top: 1px solid var(--line); border-radius: 0;
}
.mega:not(.mega--2) > a:last-child:nth-child(3n + 1) .thumb { width: 30px; height: 30px; }
.mega:not(.mega--2) > a:last-child:nth-child(3n + 1) div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nav-item:hover .mega, .nav-item:focus-within .mega, .nav-item.is-open .mega { opacity: 1; visibility: visible; }
.mega a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--r); color: var(--text); }
.mega a:hover { background: var(--surface-2); color: var(--text); }
.mega .thumb { width: 56px; height: 56px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; flex: none; color: var(--muted); }
.mega .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.mega strong { display: block; font-weight: 600; font-size: 0.9375rem; }
.mega span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-2); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-3); color: var(--text); }
/* Currency chooser, beside the cart. The label shows the code; the real <select> lies invisibly over it, so a tap opens the system's own picker. */
.cur { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text); font: 600 var(--fs-sm)/1 var(--font-body); cursor: pointer; }
.cur:hover { border-color: var(--line-3); }
.cur:focus-within { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cur__chev { width: 12px; height: 12px; color: var(--text-2); }
.cur__sel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cur__sel option, .cur__sel optgroup { color: #111; background: #fff; }
.cur__rate { color: var(--text-2); font: 400 var(--fs-xs)/1.2 var(--font-body); white-space: nowrap; }
.cart-line .meta small { margin-left: 3px; }
@media (max-width: 1180px) { .cur__rate { display: none; } }
@media (max-width: 380px) { .cur { padding: 0 8px; } }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-sm);
  background: var(--cyan); color: var(--on-cyan); font: 700 0.6875rem/18px var(--font-body); text-align: center;
  display: none;
}
.cart-count.has { display: block; }
.menu-btn { display: none; }
@media (max-width: 1000px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header-actions { margin-left: auto; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  padding: calc(var(--header-h) + 8px) var(--gutter) 40px; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity 0.12s, visibility 0.12s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu .close { position: absolute; top: 10px; right: var(--gutter); }
.mobile-menu h6 { font: 600 var(--fs-xs)/1 var(--font-body); color: var(--muted); margin: 24px 0 8px; }
.mobile-menu a { display: block; padding: 11px 0; font: 500 1.0625rem/1.25 var(--font-body); color: var(--text); border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); background: var(--bg-2); padding: 40px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.site-footer h6 { font: 600 var(--fs-sm)/1.2 var(--font-body); color: var(--text); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 7px; }
.site-footer li a { color: var(--text-2); font-size: var(--fs-sm); }
.site-footer li a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: center; padding: calc(var(--header-h) + clamp(28px, 5vw, 64px)) 0 clamp(32px, 5vw, 64px); }
.hero .lead { font-size: var(--fs-lg); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-meta { display: flex; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta strong { display: block; font: 600 var(--fs-md)/1.3 var(--font-body); color: var(--text); }
.hero-meta span { font-size: var(--fs-sm); color: var(--muted); }

/* Page hero (product / inner pages) */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(24px, 4vw, 48px)) 0 clamp(28px, 4vw, 48px); }
.crumbs { font: 400 var(--fs-xs)/1.4 var(--font-body); color: var(--muted); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--cyan-hi); }
.page-hero .crumbs { margin-bottom: 14px; }

/* ---------- Section backgrounds: flat ---------- */
.surface-band { background: var(--band); border-block: 1px solid var(--line-2); }

/* Product image stage: the board, on nothing */
.stage { position: relative; display: grid; place-items: center; }
.stage img { position: relative; max-height: 100%; width: auto; }

/* ---------- Product cards ---------- */
.pcard { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.12s; color: var(--text); }
.pcard:hover { color: var(--text); border-color: var(--line-3); }
.pcard__media { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 20px; background: var(--stage); border-bottom: 1px solid var(--line); }
.pcard__media img { max-height: 100%; width: auto; object-fit: contain; }
.pcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard__title { font: 600 1.125rem/1.25 var(--font-body); margin: 0; }
.pcard__sub { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.pcard__foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard .badge { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--surface); }
.price { font: 600 1.125rem/1 var(--font-body); color: var(--text); }
.price small { font: 400 var(--fs-xs)/1 var(--font-body); color: var(--muted); margin-left: 4px; }
/* Key facts on one plain line, separated by middle dots */
.spec-pills { margin: 6px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); line-height: 1.45; color: var(--text-2); }
.spec-pills li { display: inline; }
.spec-pills li:not(:last-child)::after { content: ' · '; color: var(--muted); }

/* ---------- Buy box ---------- */
.buybox { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.buybox .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.buybox .price { font-size: 1.75rem; }
.buybox .note { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.buybox .note .ico { width: 16px; height: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-3); border-radius: var(--r); height: 48px; }
.qty button { width: 40px; height: 100%; background: none; border: 0; cursor: pointer; font-size: 1.125rem; color: var(--text-2); }
.qty button:hover { color: var(--text); }
.qty input { width: 36px; text-align: center; background: none; border: 0; color: var(--text); font: 600 1rem var(--font-body); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Sticky product sub-nav: the section links scroll sideways, price and Add stay pinned to the right. */
.subnav { position: sticky; top: var(--header-h); z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; align-items: center; gap: 2px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav strong { font-weight: 600; margin-right: 12px; white-space: nowrap; }
.subnav a:not(.btn) { align-self: stretch; display: inline-flex; align-items: center; white-space: nowrap; padding: 0 10px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.subnav a:not(.btn):hover { color: var(--text); }
.subnav a:not(.btn).is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
.subnav .spacer { margin-left: auto; }
/* Section rail: on a window wide enough to have a margin, a page's own sections sit in the left margin and the one
   you are reading is marked. Narrower windows keep the row under the header. site.js marks the current section. */
@media (min-width: 1100px) {
  .subnav--rail { position: fixed; top: calc(var(--header-h) + 56px); left: max(16px, calc((100vw - 1240px) / 2 - 144px)); width: 150px; z-index: 40; background: none; border: 0; }
  .subnav--rail .container { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: auto; max-width: none; margin: 0; padding: 0; overflow: visible; }
  .subnav--rail strong { margin: 0 0 8px; padding-left: 12px; white-space: normal; color: var(--muted); font: 500 var(--fs-xs)/1.3 var(--font-body); }
  .subnav--rail a:not(.btn) { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line-2); white-space: normal; font-size: 0.8125rem; line-height: 1.3; }
  .subnav--rail a:not(.btn).is-active { border-left-color: var(--cyan); color: var(--text); font-weight: 600; box-shadow: none; }
}
.subnav .btn { height: 36px; flex: none; }
.subnav .container:has(.subnav__buy) { padding-right: 0; }
.subnav__buy { position: sticky; right: 0; z-index: 1; flex: none; align-self: stretch; display: flex; align-items: center; gap: 10px; margin-left: auto; padding: 0 var(--gutter) 0 14px; background: var(--bg); }
.subnav__buy .price { white-space: nowrap; }
@media (max-width: 1100px) { .subnav__buy { padding-left: 10px; border-left: 1px solid var(--line); } }
@media (max-width: 480px) { .subnav__buy .price small { display: none; } .subnav .container:has(.subnav__buy) > strong { display: none; } }

/* ---------- Feature list ---------- */
.feat h4 { margin: 0 0 3px; font-size: var(--fs-md); }
.feat p { color: var(--text-2); font-size: var(--fs-sm); margin: 0; }
/* Plain feature columns: a thin rule above each item, no card, no icon. Same look as .pd-flist on the joystick pages. Use on a .grid. */
.feat-cols { gap: 0 clamp(20px, 3vw, 36px); }
.feat-cols > * { display: block; padding: 14px 0; border-top: 1px solid var(--line); color: var(--text); }
.feat-cols h3, .feat-cols h4 { margin: 0 0 4px; font: 600 1rem/1.35 var(--font-body); color: var(--text); }
.feat-cols p { margin: 0; font-size: 0.9375rem; color: var(--text-2); }
@media (hover: hover) { .feat-cols a:hover h3 { color: var(--cyan-hi); } }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--text-2); }
.checklist li::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233bc6f3' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/16px no-repeat; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table.spec caption { caption-side: top; text-align: left; padding: 10px 14px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
table.spec th, table.spec td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec thead th { font: 600 var(--fs-xs)/1.3 var(--font-body); color: var(--text-2); background: var(--surface-2); position: sticky; top: 0; }
table.spec tbody th { font-weight: 500; color: var(--text); white-space: nowrap; }
table.spec td { color: var(--text-2); }
table.spec tr:last-child > * { border-bottom: 0; }
table.spec .yes { color: var(--ok); font-weight: 500; }
table.spec .no { color: var(--dim); }
/* Key/value spec table (specTable() in components.mjs): sans throughout, with mono only on the numbers and pin names it marks */
table.spec--kv tbody th { width: 38%; font-weight: 400; color: var(--text-2); white-space: normal; }
table.spec--kv td { color: var(--text); }
table.spec--kv td.is-prose { color: var(--text-2); }
@media (max-width: 480px) { table.spec--kv th, table.spec--kv td { padding: 8px 10px; } }

/* ---------- Accordion (details) ---------- */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 14px 2px; font: 500 1rem/1.4 var(--font-body); color: var(--text); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font: 400 1.25rem/1.1 var(--font-body); color: var(--muted); flex: none; }
.acc details[open] summary::after { content: '−'; }
.acc .acc-body { padding: 0 2px 16px; color: var(--text-2); max-width: 75ch; }
.acc .acc-body > :last-child { margin-bottom: 0; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 0; padding: 0; border-radius: var(--r); background: none; border: 1px solid var(--line-2); flex-wrap: wrap; overflow: hidden; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 0; border: 0; background: none; color: var(--text-2); cursor: pointer; font-weight: 500; font-size: var(--fs-sm); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
[role='tabpanel'][hidden] { display: none; }

/* ---------- Callouts ---------- */
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); font-size: 0.9375rem; }
.callout .ico { color: var(--cyan); margin-top: 3px; }
.callout--warn { border-color: #75602a; }
.callout--warn .ico { color: var(--warn); }
.callout p:last-child { margin: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 8px; }
.steps > li { counter-increment: step; position: relative; padding: 12px 14px 12px 52px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.steps > li::before { content: counter(step); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: var(--r-sm); display: grid; place-items: center; font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); }
.steps h4 { margin: 2px 0 3px; }
.steps p { margin: 0; color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Cart drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, 0.6); opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 301; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2); transform: translateX(100%); transition: transform 0.2s ease-out; }
.drawer.is-open { transform: none; }
.drawer.is-open + .drawer-scrim, .drawer-scrim.is-open { opacity: 1; visibility: visible; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; font-size: var(--fs-xl); }
.drawer .items { flex: 1; overflow-y: auto; padding: 4px 20px; }
.drawer .empty { text-align: center; color: var(--muted); padding: 60px 10px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line .thumb { width: 64px; height: 64px; border-radius: var(--r); background: var(--surface-2); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-line strong { display: block; font-size: var(--fs-sm); line-height: 1.3; }
.cart-line .meta { font-size: var(--fs-xs); color: var(--muted); }
.cart-line .qty { height: 32px; margin-top: 6px; }
.cart-line .qty button { width: 30px; font-size: 1rem; }
.cart-line .qty input { width: 28px; font-size: var(--fs-sm); }
.cart-line .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-xs); text-decoration: underline; }
.drawer footer { padding: 14px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer footer .row { display: flex; justify-content: space-between; align-items: baseline; }
.drawer footer .fine { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; margin: 0; }

/* Toast */
.toast { position: fixed; left: 16px; right: 16px; bottom: 20px; z-index: 400; width: fit-content; max-width: calc(100vw - 32px); margin-inline: auto; transform: translateY(140%); padding: 10px 14px; border-radius: var(--r); background: var(--surface-3); border: 1px solid var(--line-3); color: var(--text); font-size: var(--fs-sm); transition: transform 0.15s ease-out, opacity 0.15s, visibility 0.15s; opacity: 0; visibility: hidden; }
.toast .ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.toast.show { transform: none; opacity: 1; visibility: visible; }

/* ---------- Media ---------- */
.media-frame { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame figcaption { position: absolute; left: 0; bottom: 0; padding: 4px 10px; border-top-right-radius: var(--r); background: var(--bg); font-size: var(--fs-xs); color: var(--text-2); }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.gallery > * { grid-column: span 4; aspect-ratio: 4/3; }
.gallery > .wide { grid-column: span 8; }
.gallery > .tall { grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 800px) { .gallery > *, .gallery > .wide { grid-column: span 12; } }
.yt { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #000; }
.yt iframe, .yt button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt button { cursor: pointer; background: center/cover no-repeat; display: grid; place-items: center; }
.yt button::after { content: ''; width: 60px; height: 42px; border-radius: var(--r-lg); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/24px no-repeat; border: 1px solid var(--line-3); transition: background-color 0.12s, border-color 0.12s; }
.yt button:hover::after { background-color: var(--surface-3); border-color: var(--cyan); }
.yt .yt-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px; background: var(--bg); border-top: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 500; text-align: left; pointer-events: none; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(20px, 3.4vw, 36px); background: var(--surface); border: 1px solid var(--line-2); }

/* ---------- Interactive demo shells: calm frame, the explainer inside does the moving ---------- */
.demo { position: relative; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; }
.demo__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.demo__bar .label { font: 500 var(--fs-xs)/1 var(--font-body); color: var(--muted); margin-right: 2px; }
.demo__body { padding: clamp(14px, 2.4vw, 24px); }
.demo__caption { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.9375rem; min-height: 4.2em; background: var(--surface); }
.demo__caption strong { color: var(--text); }
.lcd { font-family: var(--font-mono); background: #02060a; border: 1px solid #12303d; border-radius: var(--r); color: #7fe3ff; }

/* Numbers */
.stat strong { display: block; font: 600 1.5rem/1.15 var(--font-body); }
.stat > span { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Shared components (src/components.mjs) ---------- */

/* Marks a missing fact for Lee. One class, so they can all be found and removed: grep class="todo" */
/* controllerKey(): the Utility's controller graphic with every button named. Its colours are the app's own. */
.padkey { margin: 0; max-width: 400px; }
.padkey svg { display: block; width: 100%; height: auto; }
.padkey__body { fill: #1b232c; stroke: var(--cyan); stroke-opacity: 0.55; stroke-width: 3; }
.padkey__btn { fill: #243039; stroke: #0d1116; stroke-width: 2.5; }
.padkey__dpad { stroke-width: 2; }
.padkey__t { fill: #c9d4de; font-family: var(--font-body); font-weight: 800; text-anchor: middle; }
.padkey figcaption { margin-top: 6px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.45; }
/* controlTable(): terminal names on other controllers */
.ctlnames { display: grid; gap: 10px; margin-top: 18px; }
.ctlnames__t th[scope=row] code { font-weight: 600; }
.ctlnames__t td, .ctlnames__t th { white-space: nowrap; }
.ctlnames__n { display: block; margin-top: 2px; color: var(--text-2); font: 400 var(--fs-xs)/1.2 var(--font-body); }
/* Even columns: the terminal column takes what it needs, the six controller columns share the rest equally */
.ctlnames__t { table-layout: fixed; width: 100%; min-width: 860px; }
.ctlnames__t th:first-child { width: 31%; }
.ctlnames__t th:not(:first-child), .ctlnames__t td { width: 11.5%; }
.ctlnames__t td, .ctlnames__t thead th { white-space: normal; }
/* wireColourTable(): the colour fills its cell, as on Lee's printed chart */
.wirecol { display: grid; gap: 10px; max-width: 420px; }
.wirecol__t { width: 100%; border-collapse: collapse; border: 2px solid var(--line-3); }
.wirecol__t th, .wirecol__t td { padding: 7px 12px; border: 1px solid var(--line-3); text-align: center; font: 700 var(--fs-sm)/1.2 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; }
.wirecol__t thead th, .wirecol__t tbody th { background: var(--surface); color: var(--text); }
.todo { display: inline-block; padding: 2px 7px; border: 1px dashed var(--amber); border-radius: var(--r-sm); color: var(--amber); font: 500 var(--fs-xs)/1.45 var(--font-body); }
.todo b { font-weight: 700; }

/* trustBlock(): shipping, returns, support */
.trust { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.trust__title { margin: 0; padding: 10px 14px; font-size: var(--fs-md); border-bottom: 1px solid var(--line); }
.trust__list { margin: 0; }
.trust__list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.trust__list > div:last-child { border-bottom: 0; }
.trust__list dt { color: var(--muted); }
.trust__list dd { margin: 0; color: var(--text); }
.trust__list dd .todo { margin: 2px 4px 2px 0; }
.trust__list dd p { margin: 0 0 4px; }
@media (max-width: 480px) { .trust__list > div { grid-template-columns: 1fr; } }

/* trustBlock({ compact: true }): the strip at the top of the footer */
.trust-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 24px; margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.trust-strip > div { min-width: 0; font-size: var(--fs-sm); }
.trust-strip dt { color: var(--muted); font-size: var(--fs-xs); }
.trust-strip dd { margin: 2px 0 0; color: var(--text); }
.trust-strip dd a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.trust-strip__wide { grid-column: 1 / -1; }
.board-drawing { margin: 0; }
.board-drawing img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); }
.board-drawing figcaption { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.trust-strip__todo { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 900px) { .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* worksWith(): compatibility list */
.works__names { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; }
.works__names li { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--text-2); }
.works__title { margin: 0 0 8px; font-size: var(--fs-md); }
.works__note { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.works .table-wrap + .works__title { margin-top: 18px; }
.works__note--after { margin-top: 10px; }
.works .works__status { font-weight: 500; color: var(--text); }
.works table th:first-child { width: 240px; min-width: 150px; }

/* photo(): a real photo in a plain frame. photoSlot(): the same frame, saying which photo goes there. */
:where(.photo, .photo-slot) { margin: 0; }  /* zero specificity, so .stack spacing still applies */
.photo { align-self: start; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.photo img { width: 100%; height: auto; }
.photo figcaption { padding: 8px 12px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.photo-slot { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; aspect-ratio: var(--ratio, 4 / 3); padding: clamp(14px, 3vw, 24px); border: 1px dashed var(--line-3); border-radius: var(--r-lg); background: var(--surface); }
.photo-slot strong { color: var(--text); font-weight: 600; }
.photo-slot span { color: var(--text-2); font-size: var(--fs-sm); }
.photo-slot code { color: var(--muted); font-size: var(--fs-xs); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Dark products (black switches, black plastic) on a cut-out: a lighter flat stage so they read on the dark theme */
.media--lit { background: var(--stage-lit) !important; }

/* in-page links land below the sticky header + section bar (page CSS can override per section) */
section[id], .section[id] { scroll-margin-top: calc(var(--header-h) + 56px); }

.ctlnames__d { font: 400 var(--fs-sm)/1.3 var(--font-body); color: var(--text-2); }

/* Section rail on a mid-width window (a 1080p display with a normal window, or scaled): there is no spare margin,
   so the page content moves over to make room for it. */
@media (min-width: 1100px) and (max-width: 1559.98px) {
  .subnav--rail { left: 16px; width: 156px; }
  /* content sits to the right of the rail with a clear gap, centred in what is left, never wider than the normal page */
  main:has(> .subnav--rail) > :not(.subnav--rail) .container { max-width: 1160px; width: auto; margin-left: calc(188px + max(0px, (100vw - 188px - 1160px) / 2)); margin-right: 0; }
}

/* Site search: a panel under the header, results as you type */
.ssearch { position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 90; padding: 14px 0 18px; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.ssearch .container { max-width: 760px; }
.ssearch__box { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: var(--r-lg); border: 1px solid var(--line-3); background: var(--surface); }
.ssearch__box:focus-within { border-color: var(--cyan); }
.ssearch__box .ico { flex: none; color: var(--text-2); }
.ssearch__box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 500 1.0625rem/1 var(--font-body); }
.ssearch__box input::-webkit-search-cancel-button { display: none; }
.ssearch__x { flex: none; padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: none; color: var(--text-2); font: 500 var(--fs-xs)/1.2 var(--font-mono); cursor: pointer; }
.ssearch__results { list-style: none; margin: 10px 0 0; padding: 6px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); max-height: min(60vh, 520px); overflow-y: auto; }
.ssearch__results li { margin: 0; }
.ssearch__results a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: var(--r); color: var(--text); font-size: var(--fs-md, 1rem); }
.ssearch__results a .g { flex: none; color: var(--muted); font-size: var(--fs-xs); }
.ssearch__results li[aria-selected="true"] a, .ssearch__results a:hover { background: var(--surface-2); }
.ssearch__results mark { background: none; color: var(--cyan); font-weight: 600; }
.ssearch__empty { padding: 12px; color: var(--text-2); font-size: var(--fs-sm); }

/* Dimensions drawing + 3D model + CAD downloads (components.mjs dimsViewer): Builder resources and product pages.
   The drawing column never gets taller than the window. */
.sp-cad { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 14px; }
.sp-cad span { flex: 1 1 320px; }
.sp-dimrow { display: grid; grid-template-columns: minmax(0, min(50%, calc((100vh - 200px) / 1.15))) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.sp-view { position: relative; min-height: 420px; border-radius: var(--r-lg); border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 35%, #2a333d 0%, #151a20 70%); overflow: hidden; }
.sp-view model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; --poster-color: transparent; --progress-bar-color: var(--cyan); }
@media (max-width: 1099.98px) { .sp-dimrow { grid-template-columns: minmax(0, 1fr); } .sp-view { min-height: 0; aspect-ratio: 4 / 3; } }
.sp-dimrow__draw > figure { margin: 0; height: 100%; }
.sp-dimrow__draw .board-drawing img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.sp-view__hint { position: absolute; left: 0; bottom: 0; margin: 0; padding: 4px 10px; border-top-right-radius: var(--r); background: var(--bg); color: var(--text-2); font-size: var(--fs-xs); pointer-events: none; }

/* Photo viewer (site.js photos()): any photo opens big */
figure.photo img, .media-frame img { cursor: zoom-in; }
:is(a, button) :is(figure.photo, .media-frame) img, [data-no-zoom] img { cursor: auto; }
.lb { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; padding: 24px 8px; background: rgba(4, 6, 8, 0.94); }
.lb[hidden] { display: none; }
.lb__fig { margin: 0; display: grid; justify-items: center; gap: 10px; max-height: 100%; min-width: 0; }
.lb__img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: var(--r); background: #000; }
.lb__cap { color: var(--text-2); font-size: var(--fs-sm); text-align: center; max-width: 80ch; }
.lb__x { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lb__nav { width: 48px; height: 64px; border: 0; border-radius: var(--r); background: var(--surface-2); color: var(--text); font-size: 2rem; cursor: pointer; }
.lb__nav[hidden] { visibility: hidden; display: block; }
.lb__x:hover, .lb__nav:hover { background: var(--surface-3); }
@media (max-width: 600px) { .lb { grid-template-columns: 0 minmax(0, 1fr) 0; padding: 60px 8px 16px; } .lb__nav { display: none; } }

/* Accessory hookup (components.mjs accessoryHookup) */
.sp-hdr { display: flex; gap: 4px; margin-top: 10px; }
.sp-hdr span { flex: 1; text-align: center; padding: 6px 4px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line-2); font: 500 var(--fs-xs)/1.1 var(--font-mono); color: var(--text); white-space: nowrap }
.sp-hdr--col span { display: grid; gap: 2px; padding: 8px 4px; }
.sp-hdr--col b { font: 700 var(--fs-sm)/1.1 var(--font-mono); }
.sp-hdr--col small { font: 500 var(--fs-xs)/1.1 var(--font-body); }
.sp-hookup { align-items: center; }
.sp-hookup__fig { position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.sp-hookup__fig img { display: block; width: 100%; height: auto; }
.sp-hookup__mk { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: #06222c; font: 700 14px/1 var(--font-body); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55); }
.sp-hookup__pc { position: absolute; left: 54%; top: 3%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: #fff; font: 600 var(--fs-xs)/1.4 var(--font-body); white-space: nowrap; }
.sp-hookup__list { margin: 0; padding: 0; list-style: none; counter-reset: hk; display: grid; gap: 14px; }
.sp-hookup__list li { counter-increment: hk; position: relative; padding-left: 42px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.sp-hookup__list li::before { content: counter(hk); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: #06222c; font: 700 14px/1 var(--font-body); }
.sp-hookup__list b { color: var(--text); }

/* Suggested extras: a joystick board's buy box (components.mjs buyBox addons) and the cart drawer (site.js recsHtml) */
.badge--rec { color: var(--cyan-hi, var(--cyan)); border-color: color-mix(in srgb, var(--cyan) 55%, transparent); }
.addons { display: grid; gap: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.addons__h { font: 500 var(--fs-xs)/1.3 var(--font-body); color: var(--muted); margin-bottom: 4px; }
.addon { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; }
.addon + .addon { border-top: 1px solid var(--line); }
.addon__img { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.addon__img img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.addon__txt { min-width: 0; font-size: var(--fs-sm); line-height: 1.35; }
.addon__txt a { color: var(--text); }
.addon__txt .badge { margin-left: 4px; vertical-align: 1px; }
.addon__txt small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--fs-xs); }
.addon__buy { display: flex; align-items: center; gap: 10px; }
.buybox .addon__buy .price { font-size: 1rem; }
@media (max-width: 480px) { .addon { grid-template-columns: 48px minmax(0, 1fr); } .addon__buy { grid-column: 2; } }
.cart-recs { margin-top: 18px; }
.cart-recs__h { font: 600 var(--fs-sm)/1.3 var(--font-body); color: var(--text); margin-bottom: 4px; }
.cart-rec { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-rec .thumb { width: 64px; height: 64px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.cart-rec .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-rec a { color: var(--text); }
.cart-rec strong { display: block; font-size: var(--fs-sm); line-height: 1.3; }
.cart-rec .badge { margin: 4px 0; }
.cart-rec .meta { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.35; }
.cart-rec .btn { margin-top: 6px; }

