:root {
  --bg: #0f1012;
  --bg-2: #16181b;
  --card: #1b1e22;
  --line: #2a2e34;
  --text: #e9eaec;
  --muted: #9aa0a8;
  --dim: #838992;      /* 4.5:1 or better on every ground here (WCAG AA) */
  --red: #e0302b;
  --red-2: #ff5a4f;
  --red-soft: rgba(224, 48, 43, .12);
  --ok: #4cc38a;
  --warn: #f2b84b;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 16, 18, .82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.brand img { width: 24px; height: 24px; display: block; }
nav.top ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
nav.top ul a { color: var(--muted); font-size: 14px; font-weight: 500; }
nav.top ul a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 900px; height: 900px;
  background: radial-gradient(closest-side, rgba(224, 48, 43, .22), transparent 70%);
  pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; position: relative; }
.eyebrow { color: var(--red-2); font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.035em; margin: 14px 0 18px; }
h1 span { color: var(--red); }
/* The product's name leads the homepage heading, so search engines read it as the heading's subject. */
h1 .name { display: block; margin-bottom: 10px; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.01em; color: var(--text); }
.lede { font-size: 18px; color: var(--muted); max-width: 30em; margin: 0 0 28px; }
.hero img { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55)); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); color: var(--text); background: var(--card);
  cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: #3a3f47; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-2); border-color: var(--red-2); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 52px; border-top: 1px solid var(--line); }
.stat { position: relative; padding: 22px 22px 6px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat::before { content: ""; position: absolute; top: -1px; left: 22px; width: 28px; height: 2px; background: var(--red); }
.stat:first-child::before { left: 0; }
.stat .sico { display: block; width: 22px; height: 22px; fill: none; stroke: var(--red-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.stat .num { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat .num b { font: 700 clamp(28px, 3vw, 38px)/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat .num .x { font-weight: 500; color: var(--muted); margin: 0 1px; }
.stat .unit { font-size: 15px; font-weight: 500; color: var(--muted); }
.stat .lbl { display: block; margin-top: 8px; font: 600 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }

/* ---------- sections ---------- */
section { padding: 84px 0; border-top: 1px solid var(--line); }
section.alt { background: var(--bg-2); }
.head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.head h2 { font-size: 34px; letter-spacing: -.025em; line-height: 1.1; margin: 10px 0 0; }
.head p { color: var(--muted); margin: 0; max-width: 34em; }
h3 { font-size: 17px; margin: 0 0 6px; letter-spacing: -.01em; }

.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.ico { width: 38px; height: 38px; border-radius: 10px; background: var(--red-soft); color: var(--red-2); display: grid; place-items: center; margin-bottom: 14px; }
.ico svg { width: 20px; height: 20px; }

/* ---------- patterns ---------- */
.pattern { padding: 14px 14px 16px; text-align: center; }
.pattern svg { width: 100%; aspect-ratio: 90 / 50; background: #121417; border-radius: 10px; border: 1px solid var(--line); }
.pattern svg .stone { fill: #23262b; }
.pattern svg .trace { fill: none; stroke: var(--red); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; opacity: .9; }
.pattern svg .dot { fill: #fff; }
.pattern h3 { margin: 12px 0 0; font-size: 14px; }
.pattern.custom svg { display: grid; }
.pattern.custom .phases { aspect-ratio: 90 / 50; border-radius: 10px; border: 1px dashed #3a3f47; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 14px; text-align: left; }
.phase { font: 500 11.5px/1 var(--mono); color: var(--muted); display: flex; justify-content: space-between; background: #121417; border-radius: 6px; padding: 6px 8px; }
.phase b { color: var(--text); font-weight: 600; }

/* ---------- control ---------- */
.control { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.device { background: #0b0c0d; border-radius: 18px; padding: 22px; border: 1px solid var(--line); display: flex; gap: 24px; align-items: center; justify-content: center; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.lcd { width: 320px; height: 170px; background: #000; border-radius: 4px; outline: 6px solid #1c1f23; font: 12px/1 var(--mono); color: #fff; display: flex; flex-direction: column; overflow: hidden; flex: none; }
.lcd .bar { display: flex; justify-content: space-between; padding: 7px 10px; background: #18233a; font-weight: 700; }
.lcd .bar .ok { color: #4cd38d; }
.lcd .body { flex: 1; display: flex; gap: 12px; padding: 10px; }
.lcd .huge { font: 700 42px/1 var(--mono); letter-spacing: -.04em; }
.lcd .unit { color: #9aa0a8; margin-left: 4px; }
.lcd .kv { display: flex; justify-content: space-between; color: #9aa0a8; margin-bottom: 5px; }
.lcd .kv b { color: #fff; font-weight: 500; }
.lcd .prog { height: 5px; background: #222; margin: 0 10px 7px; border-radius: 3px; overflow: hidden; }
.lcd .prog i { display: block; height: 100%; width: 42%; background: var(--red); }
.lcd .hint { display: flex; justify-content: space-between; padding: 5px 10px 7px; color: #9aa0a8; border-top: 1px solid #222; }
.lcd .hint .stop { color: #ff5a4f; }
.knob { width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a3d42, #121315 70%); border: 1px solid #2e3136; position: relative; flex: none; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.knob::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--red); }
.gestures { display: grid; gap: 10px; margin-top: 24px; }
.gesture { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: baseline; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.gesture b { font: 700 12px/1 var(--mono); letter-spacing: .1em; color: var(--red-2); }
.gesture span { color: var(--muted); font-size: 14px; }

/* ---------- build steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { counter-increment: step; position: relative; padding-top: 50px; }
.step::before { content: counter(step, decimal-leading-zero); position: absolute; top: 18px; left: 22px; font: 700 13px/1 var(--mono); color: var(--red-2); }
.step a.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }

/* ---------- parts ---------- */
.featured { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0; padding: 0; overflow: hidden; margin-bottom: 36px; }
.featured .stage { position: relative; min-height: 380px; background: radial-gradient(ellipse at center, #22262b, #121417 75%); cursor: pointer; }
.featured .stage img { position: absolute; inset: 0; margin: auto; max-height: 86%; max-width: 86%; object-fit: contain; }
.featured .stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.featured .info { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; border-left: 1px solid var(--line); }
.featured .info p { color: var(--muted); margin: 0; }
.play { position: absolute; left: 18px; bottom: 18px; }

.group-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.group-title h3 { font-size: 19px; margin: 0; }
.group-title span { color: var(--dim); font-size: 13px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.part { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.part:hover { border-color: #43484f; transform: translateY(-2px); }
.part .thumb { aspect-ratio: 4 / 3; background: radial-gradient(ellipse at center, #262a30, #16181b 75%); cursor: pointer; position: relative; }
.part .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.part .thumb .badge { position: absolute; top: 8px; right: 8px; font: 600 10.5px/1 var(--mono); background: rgba(0,0,0,.55); color: var(--muted); padding: 4px 6px; border-radius: 5px; }
.part .meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.part .name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.part .dims { font: 12px/1 var(--mono); color: var(--dim); }
.part .dl { display: flex; gap: 6px; margin-top: auto; }

/* ---------- viewer modal ---------- */
dialog.viewer { width: min(1100px, 94vw); height: min(760px, 88vh); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #121417; color: var(--text); overflow: hidden; }
dialog.viewer::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
dialog.viewer .vbar { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; z-index: 2; background: linear-gradient(#121417, transparent); }
dialog.viewer .vbar h3 { margin: 0; font-size: 16px; }
dialog.viewer .vbar .dims { color: var(--dim); font: 12px var(--mono); }
dialog.viewer .vbar .sp { flex: 1; }
dialog.viewer .canvas { position: absolute; inset: 0; }
dialog.viewer .help { position: absolute; left: 16px; bottom: 14px; color: var(--dim); font-size: 12px; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font: 13px var(--mono); }

/* ---------- tables ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 999px; font: 600 13px var(--sans); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--text); border-color: var(--text); color: #111; }
.panel[hidden] { display: none; }
table.bom { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.bom th { text-align: left; font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line); background: #191c20; }
.bom td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bom tr:last-child td { border-bottom: 0; }
.bom td.q { font: 600 13px var(--mono); white-space: nowrap; width: 64px; color: var(--text); }
.bom td.ref { font: 12px var(--mono); color: var(--dim); white-space: nowrap; }
.bom td.n { color: var(--muted); font-size: 13px; }
.bom td.b { width: 150px; text-align: right; white-space: nowrap; }
.bom .cat td { background: #15171a; font: 600 12px var(--mono); color: var(--red-2); letter-spacing: .06em; text-transform: uppercase; padding: 10px 16px; }
.tag { display: inline-block; font: 600 10.5px/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: rgba(242,184,75,.12); color: var(--warn); margin-left: 6px; vertical-align: 1px; }
.note { color: var(--dim); font-size: 13px; margin-top: 14px; }

/* ---------- pcb ---------- */
.pcb { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 22px 0; }
.specs div { background: var(--card); padding: 12px 14px; }
.specs b { display: block; font-size: 15px; }
.specs span { color: var(--dim); font-size: 12px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; color: var(--muted); font-size: 14px; }
.checks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 4px; border: 1.5px solid var(--red-2); }

/* ---------- firmware ---------- */
pre.term { background: #0b0c0d; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0; font: 13px/1.8 var(--mono); color: #cfd3d8; overflow-x: auto; }
pre.term .c { color: var(--dim); }
pre.term .p { color: var(--red-2); user-select: none; }

/* ---------- safety ---------- */
.safety { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rule { border-left: 3px solid var(--red); background: var(--card); border-radius: 0 12px 12px 0; padding: 16px 18px; }
.rule b { display: block; margin-bottom: 4px; }
.rule span { color: var(--muted); font-size: 13.5px; }

footer { padding: 40px 0 60px; color: var(--dim); font-size: 13px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap, .control, .pcb, .featured { grid-template-columns: 1fr; }
  .featured .info { border-left: 0; border-top: 1px solid var(--line); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .g3, .g4, .steps, .safety { grid-template-columns: repeat(2, 1fr); }
  nav.top ul { display: none; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .steps, .safety { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  section { padding: 60px 0; }
  .device { flex-direction: column; }
  .lcd { transform: scale(.9); }
  .bom td.ref, .bom th.ref { display: none; }
}

/* ---------- software screens ---------- */
.gestures-row { margin-bottom: 30px; }
.gestures-row .gesture { grid-template-columns: 60px 1fr; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
.shot { margin: 0; }
.shot .screen { aspect-ratio: 320 / 170; background: #0a0c10; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 6px #16181c, 0 0 0 7px var(--line), 0 14px 30px rgba(0,0,0,.45); margin: 7px; position: relative; }
.shot iframe { position: absolute; left: 0; top: 0; width: 320px; height: 170px; border: 0; pointer-events: none; transform-origin: 0 0; }
.shot figcaption { margin-top: 12px; }
.shot figcaption b { display: block; font-size: 14px; }
.shot figcaption span { color: var(--dim); font-size: 13px; }

/* ---------- firmware build ---------- */
.fw { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.dl-card { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }
.dl-card .btn { align-self: flex-start; }
.fw-steps { list-style: none; counter-reset: fw; margin: 0; padding: 0; display: grid; gap: 12px; }
.fw-steps li { counter-increment: fw; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 14px 58px; display: grid; gap: 8px; }
.fw-steps li::before { content: counter(fw); position: absolute; left: 18px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--red-soft); color: var(--red-2); font: 700 13px/26px var(--mono); text-align: center; }
.fw-steps li > span { color: var(--muted); font-size: 14px; }
.fw-steps pre.term { padding: 10px 14px; font-size: 13px; line-height: 1.6; }
@media (max-width: 980px) { .shots { grid-template-columns: repeat(2, 1fr); } .fw { grid-template-columns: 1fr; } .dl-card { position: static; } }
@media (max-width: 620px) { .shots { grid-template-columns: 1fr; } }
.pattern svg { max-height: 190px; }

/* ---------- multi-page ---------- */
img { height: auto; }
nav.top ul a.active { color: var(--text); position: relative; }
nav.top ul a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 2px; background: var(--red); border-radius: 2px; }
.pagehead { position: relative; overflow: hidden; padding: 64px 0 40px; }
.pagehead::before { content: ""; position: absolute; right: -200px; top: -380px; width: 760px; height: 760px; background: radial-gradient(closest-side, rgba(224, 48, 43, .18), transparent 70%); pointer-events: none; }
.pagehead .wrap { position: relative; }
.pagehead h1 { font-size: clamp(34px, 5vw, 52px); margin: 12px 0 12px; }
.pagehead .lede { margin: 0; }
.pagehead .lede + .lede { margin-top: 14px; }
/* A page's own action, top right beside its heading (Community: Message us directly). */
.pagehead .pagehead-act { position: absolute; top: 0; right: 24px; }
@media (max-width: 720px) {
  .pagehead .pagehead-act { position: static; margin-bottom: 20px; }
}
.lede b { color: var(--text); font-weight: 600; }
section.first { border-top: 0; padding-top: 12px; background: transparent; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 56px; }
.pg { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.pg:hover { text-decoration: none; border-color: #43484f; }
.pg span { color: var(--dim); font-size: 12px; }
.pg.next { text-align: right; margin-left: auto; }
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: border-color .15s, transform .15s; }
.tile:hover { text-decoration: none; border-color: #43484f; transform: translateY(-2px); }
.tile b { margin-top: auto; padding-top: 6px; color: var(--red-2); font-size: 13px; }
@media (max-width: 980px) {
  nav.top ul { display: flex; overflow-x: auto; gap: 16px; margin-left: 12px; scrollbar-width: none; }
  nav.top ul a { white-space: nowrap; font-size: 13px; }
  nav.top ul a.active::after { bottom: -6px; }
  .brand { flex: none; }
}
@media (max-width: 620px) { .pg { min-width: 0; flex: 1; } .brand span { display: none; } nav.top .wrap { gap: 12px; } nav.top ul { gap: 12px; margin-left: auto; } }
.hero .wrap + .wrap { display: block; }
.bom td.pic { width: 72px; padding: 8px 0 8px 12px; }
.bom td.pic img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 8px; display: block; }
.bom td.pic .nopic { display: block; width: 56px; height: 56px; border-radius: 8px; border: 1px dashed var(--line); }
.bom td { vertical-align: middle; }
@media (max-width: 620px) { .bom td.pic { width: 52px; padding-left: 8px; } .bom td.pic img, .bom td.pic .nopic { width: 40px; height: 40px; } }
.howto { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 0 12px 12px 0; padding: 18px 22px; }
.howto h3 { margin-bottom: 10px; }
.howto ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }

/* ---------- build guide ---------- */
.buildlayout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding-top: 8px; padding-bottom: 24px; }
.toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; border-left: 2px solid transparent; }
.toc a span { font: 600 11px/20px var(--mono); color: var(--dim); }
.toc a:hover { background: var(--card); color: var(--text); text-decoration: none; }
.toc a.on { color: var(--text); background: var(--card); border-left-color: var(--red); }
.toc a.on span { color: var(--red-2); }
.buildmain { min-width: 0; }
.bsec { padding: 0 0 56px; margin-bottom: 56px; border-top: 0; border-bottom: 1px solid var(--line); }
.bsec:last-child { border-bottom: 0; margin-bottom: 0; }
.bsec h2 { font-size: 30px; letter-spacing: -.02em; margin: 8px 0 6px; }
.bsec .intro { color: var(--muted); margin: 0 0 22px; font-size: 16px; }
.bsec h3.sub { font-size: 16px; margin: 26px 0 10px; }
.bsec > p { color: var(--muted); font-size: 14px; }
.partsbox { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }
.partsbox:has(> div:only-of-type) { grid-template-columns: 1fr; }
.partsbox h4 { margin: 0 0 12px; font: 600 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.partsbox > .btn { grid-column: 1 / -1; justify-self: start; }
.pplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pp { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pp img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: radial-gradient(ellipse at center, #262a30, #16181b 75%); border-radius: 8px; border: 1px solid var(--line); padding: 4px; }
.pp:hover { color: var(--text); text-decoration: none; }
.pp:hover img { border-color: #43484f; }
.hwlist { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.hwlist li { display: grid; grid-template-columns: 36px 46px 1fr; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.hwlist img, .hwlist .nopic { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: #fff; display: block; }
.hwlist .nopic { background: transparent; border: 1px dashed var(--line); }
.hq { font: 600 12.5px var(--mono); color: var(--text); }
.partsbox .more { font-size: 13px; font-weight: 600; }
.bsteps { counter-reset: bs; list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.bsteps li { counter-increment: bs; position: relative; padding-left: 38px; color: var(--muted); font-size: 14.5px; }
.bsteps li::before { content: counter(bs); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--red-soft); color: var(--red-2); font: 700 12px/24px var(--mono); text-align: center; }
.callout { display: flex; gap: 12px; padding: 12px 16px; border-radius: 10px; font-size: 14px; margin: 14px 0; background: rgba(76, 195, 138, .08); border: 1px solid rgba(76, 195, 138, .25); }
.callout b { color: var(--ok); flex: none; }
.callout span { color: var(--muted); }
.callout.warn { background: rgba(242, 184, 75, .08); border-color: rgba(242, 184, 75, .3); }
.callout.warn b { color: var(--warn); }
.tbc { display: inline-block; font: 600 10.5px/1 var(--mono); padding: 4px 7px; border-radius: 5px; background: rgba(242, 184, 75, .12); color: var(--warn); margin-right: 6px; vertical-align: 1px; letter-spacing: .04em; text-transform: uppercase; }
table.wiring { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 13.5px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wiring th { text-align: left; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 10px 14px; background: #191c20; border-bottom: 1px solid var(--line); }
.wiring td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.wiring tr:last-child td { border-bottom: 0; }
.bsec .safety { grid-template-columns: repeat(2, 1fr); }
.part.flash { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@media (max-width: 980px) {
  .buildlayout { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; max-height: none; }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
  .partsbox { grid-template-columns: 1fr; }
}
@media (max-width: 620px) { .toc ol { grid-template-columns: 1fr; } .bsec .safety { grid-template-columns: 1fr; } }
.callout.danger { flex-direction: column; gap: 6px; padding: 16px 18px 16px 20px; background: rgba(224, 48, 43, .12); border: 1px solid rgba(224, 48, 43, .5); border-left: 4px solid var(--red); margin: 0 0 22px; }
.callout.danger > b { color: var(--red-2); font-size: 16px; }
.callout.danger > b::before { content: "⚠ "; }
.callout.danger span { color: var(--text); }
.callout span b { color: var(--text); }

dialog.pdfviewer .vbar { position: static; background: #16181b; border-bottom: 1px solid var(--line); }
dialog.pdfviewer[open] { display: flex; flex-direction: column; }
dialog.pdfviewer iframe { flex: 1; width: 100%; border: 0; background: #525659; }
dialog.pdfviewer .help { position: static; padding: 8px 16px; border-top: 1px solid var(--line); background: #16181b; }

/* ---------- firmware: OS notes + USB note ---------- */
.usbnote { display: flex; gap: 20px; align-items: flex-start; background: rgba(242, 184, 75, .07); border: 1px solid rgba(242, 184, 75, .3); border-left: 4px solid var(--warn); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin-bottom: 28px; }
.usbnote img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 10px; flex: none; }
.usbnote h3 { margin: 0 0 8px; color: var(--warn); }
.usbnote p { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.usbnote p:last-child { margin-bottom: 0; }
.usbnote b { color: var(--text); }
.os { display: grid; gap: 10px; }
.os > div { display: grid; gap: 6px; }
.os > div > span:not(.ostag) { color: var(--muted); font-size: 14px; }
.ostag { justify-self: start; font: 600 11px/1 var(--mono); letter-spacing: .04em; padding: 4px 7px; border-radius: 5px; background: rgba(154, 160, 168, .12); color: var(--muted); }
.ostag.ok { background: rgba(76, 195, 138, .12); color: var(--ok); }
.fw-steps li > span code, .os code { font-size: .85em; }
@media (max-width: 620px) { .usbnote { flex-direction: column; } }
.tile.placeholder { border-style: dashed; }

/* ---------- background page ---------- */
.creditgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.creditgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.creditgroup h3 { margin: 0 0 12px; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.credits li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.credits li:last-child { border-bottom: 0; padding-bottom: 0; }
.credits b { font-size: 14.5px; }
.credits span { grid-column: 1; color: var(--muted); font-size: 13.5px; }
.credits em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 500 11.5px var(--mono); font-style: normal; color: var(--dim); white-space: nowrap; }
/* A group credited by name only: one wrapping line, names apart by a dot. */
.names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); font-size: 14.5px; }
.names li:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--dim); }
.names .more { color: var(--dim); }
@media (max-width: 980px) { .creditgrid { grid-template-columns: 1fr; } }
.gnum, .pnum { font-family: var(--mono); color: var(--red-2); font-weight: 600; }
.pnum { font-size: 12.5px; margin-right: 2px; }
/* five stats: on 3- and 2-column layouts let the last one fill its row */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 8px; }
  .stat:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .stat:nth-child(3n+1)::before { left: 0; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3n+1) { border-left: 1px solid var(--line); padding-left: 22px; }
  .stat:nth-child(3n+1)::before { left: 22px; }
  .stat:nth-child(2n+1) { border-left: 0; padding-left: 0; }
  .stat:nth-child(2n+1)::before { left: 0; }
}
.why-intro { font-size: 18px; margin: 0 0 18px; }
.reasons .card h3 { margin: 10px 0 8px; font-size: 17px; }
.reasons .card p { font-size: 14.5px; }
.learned .card h3 { font-size: 16.5px; margin: 0 0 8px; }
.learned .card p { font-size: 14.5px; }
.closing { margin: 26px 0 0; font-size: 17px; color: var(--text); }

/* ---------- board gallery ---------- */
.gallery { max-width: 520px; width: 100%; justify-self: center; }
.gstage { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.slide { position: absolute; inset: 0; display: none; cursor: zoom-in; }
.slide.on { display: block; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slide[data-pdf] { background: #fff; }
.gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: rgba(15, 16, 18, .72); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.gnav svg { display: block; }
.gnav:hover { background: var(--red); }
.gnav.prev { left: 10px; }
.gnav.next { right: 10px; }
.gbar { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13.5px; }
.gcap { color: var(--text); font-weight: 500; }
.gcount { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.gdots { display: flex; gap: 6px; margin-top: 8px; }
.gdots button { width: 22px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.gdots button.on { background: var(--red); }
dialog.lightbox[open] { display: flex; flex-direction: column; }
dialog.lightbox .vbar { position: static; background: #16181b; border-bottom: 1px solid var(--line); }
.lb-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; padding: 12px; }
.lb-body img { max-width: 100%; max-height: 100%; object-fit: contain; }

.hero .lede + .lede { margin-top: -14px; }

/* ---------- knob tour (firmware page, assets/tour.js) ---------- */
.tour { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 22px; }
.tour-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tour-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: 500 14px/1 var(--sans); cursor: pointer; }
.tour-tabs button span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--text); font: 600 11px/1 var(--mono); }
.tour-tabs button:hover { color: var(--text); }
.tour-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--red); background: var(--red-soft); }
.tour-tabs button[aria-selected="true"] span { background: var(--red); }
.tour-tabs .tour-play { margin-left: auto; padding: 7px; width: 34px; justify-content: center; }
.tour-play svg { width: 16px; height: 16px; fill: currentColor; }
.tour-play .i-play, .tour.paused .tour-play .i-pause { display: none; }
.tour.paused .tour-play .i-play { display: inline; }
.tour-stage { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 32px; align-items: center; }
.tour-screen { position: relative; aspect-ratio: 320 / 170; background: #0a0c10; border-radius: 6px; overflow: hidden; margin: 7px; box-shadow: 0 0 0 7px #16181c, 0 0 0 8px var(--line), 0 18px 40px rgba(0,0,0,.5); }
.tour-screen iframe { position: absolute; left: 0; top: 0; width: 320px; height: 170px; border: 0; pointer-events: none; transform-origin: 0 0; }
.tour-control { position: relative; display: grid; place-items: center; }
.tour-knob { width: 100%; max-width: 170px; overflow: visible; }
.tour-knob .dial { transform-origin: 60px 60px; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.tour-knob .press { transform-origin: 60px 60px; transition: transform .12s ease-out, filter .35s ease-out; }
.tour-knob.down .press { transform: scale(.93); filter: drop-shadow(0 0 7px rgba(255, 90, 79, .85)) drop-shadow(0 0 16px rgba(224, 48, 43, .5)); }
/* a hold glows for as long as it is held and swells towards the 600 ms mark */
.tour-knob.holding .press { filter: drop-shadow(0 0 10px rgba(255, 90, 79, .95)) drop-shadow(0 0 26px rgba(224, 48, 43, .7)); transition: transform .12s ease-out, filter .6s ease-in; }
/* and lets go of it slowly */
.tour-knob.released .press { transition: transform .12s ease-out, filter .8s ease-out; }
.tour-gesture { margin-top: 14px; height: 18px; font: 700 13px/18px var(--mono); letter-spacing: .14em; color: var(--red-2); opacity: 0; }
.tour-gesture.on { animation: tour-gesture 1.1s ease-out; }
@keyframes tour-gesture { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; } }
.tour-caption { margin: 22px 0 0; min-height: 3.2em; color: var(--muted); font-size: 16px; max-width: 46em; }
.tour-caption b { color: var(--text); }
@media (max-width: 720px) {
  .tour { padding: 14px 14px 16px; }
  .tour-stage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .tour-control { display: flex; justify-content: center; gap: 16px; }
  .tour-knob { width: 96px; }
  .tour-gesture { margin-top: 0; width: 64px; }
  .tour-tabs button { font-size: 13px; padding: 6px 11px 6px 6px; }
  .tour-gesture { font-size: 11px; letter-spacing: .08em; }
  .tour-caption { font-size: 15px; min-height: 4.8em; }
}

/* ---------- Build Your Own: dropdown and step strip ---------- */
nav.top .has-sub { position: relative; }
nav.top .has-sub > a::before { content: ""; position: absolute; right: -13px; top: 50%; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); opacity: .7; }
nav.top .has-sub { margin-right: 10px; }
nav.top .sub { display: none; position: absolute; top: 100%; left: -14px; margin: 0; padding: 8px; min-width: 200px; flex-direction: column; gap: 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
nav.top .has-sub::after { content: ""; position: absolute; left: -14px; right: -14px; top: 100%; height: 14px; }
nav.top .sub { margin-top: 14px; }
nav.top .has-sub:hover .sub, nav.top .has-sub:focus-within .sub { display: flex; }
nav.top .sub a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
nav.top .sub a:hover, nav.top .sub a[aria-current] { background: var(--bg-2); color: var(--text); }
nav.top .sub a span, .stepbar a span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--text); font: 600 11px/1 var(--mono); flex: none; }
nav.top .sub a[aria-current] span { background: var(--red); }

.stepbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.stepbar .wrap { display: flex; gap: 6px; height: 48px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.stepbar a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.stepbar a:hover { color: var(--text); text-decoration: none; background: var(--bg-2); }
.stepbar a.on { color: var(--text); background: var(--red-soft); }
.stepbar a.on span { background: var(--red); }
.stepbar a + a::before { content: ""; width: 14px; height: 1px; background: var(--line); margin: 0 4px 0 -14px; }
.stepbar a + a { margin-left: 14px; }
@media (max-width: 980px) {
  nav.top .sub, nav.top .has-sub::after { display: none !important; }
  nav.top .has-sub > a::before { display: none; }
  nav.top .has-sub { margin-right: 0; }
}

/* ---------- Use It: how-to clips ---------- */
.clip { margin: 0; }
.clip-media { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px dashed #3a3f46; display: grid; place-items: center; }
.clip-media video, .clip-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip-soon { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.clip-soon svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); fill: var(--muted); }
.clip-3d { border-style: solid; border-color: var(--line); background: radial-gradient(120% 90% at 50% 40%, #23262b, var(--card)); }
.clip-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.clip-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 14px 10px; background: linear-gradient(transparent, rgba(10, 11, 13, .85)); color: var(--text); font-size: 13.5px; line-height: 1.4; opacity: 0; transition: opacity .3s; }
.clip-3d.ready .clip-cap { opacity: 1; }
.clip-replay { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(15, 16, 18, .7); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .3s; }
.clip-replay svg { width: 16px; height: 16px; fill: currentColor; }
.clip-replay:hover { color: var(--text); }
.clip-3d.ready .clip-replay { opacity: 1; }
/* play / pause: every animation starts paused */
.clip-toggle { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: 0; transition: opacity .25s; }
.clip-3d.ready .clip-toggle { opacity: 1; }
.clip-toggle span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(15, 16, 18, .72); border: 1px solid rgba(255, 255, 255, .14); color: var(--text); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); transition: transform .15s, background .15s, opacity .25s; }
.clip-toggle svg { width: 28px; height: 28px; fill: currentColor; }
.clip-toggle .i-pause, .clip-3d.playing .clip-toggle .i-play { display: none; }
.clip-3d.playing .clip-toggle .i-pause { display: block; }
@media (hover: hover) { .clip-toggle:hover span { transform: scale(1.06); background: var(--red); border-color: var(--red); } }
/* while playing the button hides, and shows as pause for a moment after the mouse
   moves or a finger taps (clips.js sets .controls), or while it has keyboard focus;
   the mouse pointer hides with it */
.clip-3d.playing .clip-toggle span { opacity: 0; }
.clip-3d.playing.controls .clip-toggle span, .clip-3d.playing .clip-toggle:focus-visible span { opacity: 1; }
.clip-3d.playing:not(.controls) .clip-toggle { cursor: none; }
.clip-replay, .clip-cap { z-index: 2; }
.clip-cap { pointer-events: none; }
.tour-bigplay { position: absolute; z-index: 2; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(15, 16, 18, .78); color: var(--text); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: transform .15s, background .15s; }
.tour-bigplay svg { width: 30px; height: 30px; fill: currentColor; }
.tour-bigplay:hover { transform: scale(1.06); background: var(--red); border-color: var(--red); }
.tour:not(.paused) .tour-bigplay { display: none; }
/* a how-to step shown as the machine's own screen */
.clip-lcd { display: flex; align-items: center; justify-content: center; gap: 7%; border-style: solid; border-color: var(--line); background: radial-gradient(120% 90% at 50% 40%, #23262b, var(--card)); }
.clip-lcd .screen { position: relative; width: 54%; aspect-ratio: 320 / 170; background: #0a0c10; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 6px #16181c, 0 0 0 7px var(--line), 0 14px 30px rgba(0, 0, 0, .45); }
.clip-lcd iframe { position: absolute; left: 0; top: 0; width: 320px; height: 170px; border: 0; pointer-events: none; transform-origin: 0 0; }
/* step number and title above each how-to */
.clip figcaption { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.clip-step { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font: 700 16px/1 var(--mono); }
#howto .grid { row-gap: 40px; }
/* the video of the machine running, full width */
.run-video { max-width: 960px; }
/* the knob beside it, still: the knob tour's drawing */
.lcd-knob { width: 17%; flex: none; }

/* ---------- Build Your Own: intro and licence box ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.licences { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.licences h3 { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red-2); margin: 0 0 8px; }
.licences dl { margin: 0; display: grid; gap: 0; }
.licences dl div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12.5px; line-height: 1.45; }
.licences dt { color: var(--muted); }
.licences dd { margin: 0; font-weight: 600; white-space: nowrap; }
.licences p { margin: 8px 0 0; color: var(--dim); font-size: 11.5px; line-height: 1.45; }
@media (max-width: 980px) { .intro { grid-template-columns: 1fr; gap: 24px; } }
footer .foot-alp { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; color: var(--muted); font-weight: 600; vertical-align: -3px; }
footer .foot-alp:hover { color: var(--text); text-decoration: none; }
footer .foot-alp img { width: 18px; height: 18px; }
/* Beside the credit, on its right: a long line (firmware.html) wraps within its column, and the column drops below only on a narrow screen. */
footer .legal { flex: 1 1 320px; margin: 0; text-align: right; }
@media (max-width: 620px) { footer .legal { text-align: left; } }
.notfound { min-height: calc(100vh - 220px); }
.notfound .lede { margin-bottom: 28px; }

/* ---------- YappityYap: forms, the email code, the place named ---------- */
.community [hidden], .talk [hidden] { display: none !important; }
.community input, .community select, .community textarea, .talk input, .talk select, .talk textarea {
  font: 15px var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); width: 100%;
}
.community input:focus, .community select:focus, .community textarea:focus,
.talk input:focus, .talk select:focus, .talk textarea:focus { outline: 2px solid var(--red-2); outline-offset: 1px; border-color: transparent; }
.community textarea, .talk textarea { resize: vertical; }
.offer { position: relative; display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin: 12px 0; }
.offer p { margin: 0; font-size: 14px; }
.offer .lead { font-weight: 600; padding-right: 26px; }
.offer .small { color: var(--muted); font-size: 13px; }
.offer .dismiss { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--dim); font-size: 18px; line-height: 1; cursor: pointer; }
.offer .dismiss:hover { background: var(--card); color: var(--text); }
.offer .code { display: grid; gap: 8px; }
.offer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.offer-row input, .offer-row select { flex: 1 1 200px; width: auto; }
.year { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.alert { margin: 12px 0 0; padding: 10px 13px; border-radius: 10px; background: var(--red-soft); color: var(--red-2); font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; font: 13px var(--sans); color: var(--muted); cursor: pointer; }
.linkish:hover { color: var(--text); text-decoration: underline; }
.linkish.strong { color: var(--red-2); font-weight: 600; }
.via { margin: 18px 0 0; font-size: 12px; color: var(--dim); text-align: right; }
.via a { color: inherit; display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.via img { border-radius: 4px; display: inline-block; }
button[disabled] { opacity: .6; cursor: progress; }
.keep-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.keep-line img { border-radius: 3px; display: inline-block; }

/* ---------- Community (assets/community.js) ---------- */
.community { max-width: 860px; }
.cm-gold { color: var(--warn); letter-spacing: 1px; }
.cm-summary { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
/* Where the visitor writes: tinted and edged in red, unlike the list's grey cards. */
.cm-cta { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding: 18px 22px; border-radius: 14px; border: 1px solid rgba(224, 48, 43, .5); background: linear-gradient(135deg, rgba(224, 48, 43, .12), rgba(212, 176, 106, .06)); }
.cm-cta-text { display: grid; gap: 3px; }
.cm-cta-text b { font-size: 17px; }
.cm-cta-text span { font-size: 14px; color: var(--muted); }
.cm-cta-text .cm-cta-note { font-size: 12.5px; color: var(--dim); }
.cm-cta-act { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cm-cta-stars { display: flex; }
.cm-cta-stars button { background: none; border: 0; padding: 0 3px; font-size: 30px; line-height: 1; color: var(--warn); cursor: pointer; }
.cm-cta-stars button:focus-visible { outline: 2px solid var(--warn); outline-offset: 2px; border-radius: 4px; }
.cm-listhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 40px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cm-listhead h2 { font-size: 20px; letter-spacing: -.01em; margin: 0; }
.cm-compose { display: grid; gap: 10px; margin-bottom: 4px; }
.cm-compose-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-height: 28px; }
.cm-as { margin-left: auto; font-size: 12px; color: var(--dim); }
.cm-stars { display: flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.cm-stars span { margin-right: 8px; }
.cm-stars button { background: none; border: 0; padding: 0 2px; font-size: 24px; line-height: 1; color: var(--warn); cursor: pointer; }
.cm-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.cm-kind { margin-right: auto; font-size: 12.5px; color: var(--dim); }
.cm-policy { margin: 0; }
.cm-sorts { margin: 0; }
.cm-sorts .tab { padding: 5px 11px; font-size: 12px; }
.cm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-item { width: 100%; display: flex; gap: 16px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 15px var(--sans); cursor: pointer; }
.cm-item:hover { border-color: #43484f; }
.cm-item .cm-score { min-width: 28px; text-align: center; font: 600 14px var(--mono); color: var(--muted); }
.cm-main { display: grid; gap: 3px; min-width: 0; }
.cm-main b { font-weight: 600; overflow-wrap: anywhere; }
.cm-meta { font-size: 12.5px; color: var(--dim); }
.cm-empty { padding: 20px 16px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; }
.cm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.cm-open h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 12px; }
.cm-post { padding: 14px 0; }
.cm-post.opening { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.cm-who { margin: 0 0 6px; font-size: 13px; color: var(--dim); }
.cm-who b { color: var(--text); font-weight: 600; }
.cm-who .cm-team { color: var(--red-2); }
.cm-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.cm-actions .vote { background: none; border: 0; padding: 0 2px; color: var(--dim); cursor: pointer; font-size: 12px; }
.cm-actions .vote.on, .cm-actions .vote:hover { color: var(--red-2); }
.cm-actions .cm-score { font: 600 13px var(--mono); color: var(--muted); min-width: 14px; text-align: center; }
.cm-count { margin: 22px 0 0; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cm-replies { list-style: none; margin: 0; padding: 0; }
.cm-replies > li { border-bottom: 1px solid var(--line); }
.cm-replies.nested { margin-left: 22px; border-left: 2px solid var(--line); padding-left: 16px; }
.cm-replies.nested > li { border-bottom: 0; }
.cm-reply { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 18px; }
.cm-reply.under { margin: 0 0 14px 22px; }
.cm-report { margin-top: 8px; max-width: 420px; }

/* ---------- Message us (assets/talk.js) ---------- */
.talk { max-width: 720px; }
.messages { display: grid; gap: 14px; }
.talk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.talk-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.hours { margin: 0; font-size: 13px; color: var(--muted); }
.hours .open { color: var(--ok); font-weight: 600; }
.hours .soon { color: var(--warn); font-weight: 600; }
.hours .shut { color: var(--red-2); font-weight: 600; }
.thread { list-style: none; margin: 0; padding: 2px 6px 2px 0; display: grid; gap: 10px; align-content: start; max-height: min(440px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.thread li.again { margin-top: -6px; }
.thread li.again .who { display: none; }
.thread li { max-width: 82%; display: grid; gap: 3px; }
.thread li .who { font-size: 12px; color: var(--dim); }
.thread li p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread li.mine { justify-self: end; text-align: right; }
.thread li.mine p { background: var(--red); color: #fff; border-bottom-right-radius: 6px; text-align: left; }
.thread li.team { justify-self: start; }
.thread li.team p { background: var(--bg-2); color: var(--text); border-bottom-left-radius: 6px; }
.status { margin: -2px 0 0; display: flex; justify-content: flex-end; font-size: 13px; }
.status .typing { color: var(--muted); font-style: italic; }
.status .chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 12px; border-radius: 999px; line-height: 1.35; }
.status .chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; }
.status .chip.wait { color: var(--muted); }
.status .chip.wait .dot { background: var(--dim); }
.status .chip.searching .dot { animation: status-pulse 1.4s ease-in-out infinite; }
.status .chip.person { color: var(--muted); box-shadow: inset 0 0 0 1px rgba(224, 48, 43, .35); }
.status .chip.person .dot { background: var(--ok); }
.status .chip .seen { color: var(--dim); }
@keyframes status-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status .chip.searching .dot { animation: none; } }
.given { margin: 0; }
.compose { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.thread:not([hidden]) ~ .compose { border-top: 1px solid var(--line); padding-top: 16px; }
.clear { margin-left: auto; background: none; border: 0; padding: 0; font: 13px var(--sans); color: var(--dim); cursor: pointer; text-decoration: underline; }
.clear:hover { color: var(--text); }
.clearing { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.clearing p { margin: 0; font-size: 14px; }
.clearing .clearing-title { font-weight: 600; font-size: 15px; }
.clearing .about summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.clearing .about p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.clearing-actions { display: flex; align-items: center; gap: 14px; }

/* ---------- the builders' stars, and asking from a build step ---------- */
.rating-home { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--muted); }
.rating-home:hover { color: var(--text); text-decoration: none; }
.ask-build { padding-top: 32px; }
.ask-build a { display: inline-flex; gap: 8px; align-items: baseline; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 14px; }
.ask-build a:hover { text-decoration: none; border-color: #43484f; color: var(--text); }
.ask-build b { color: var(--red-2); }

/* ---------- privacy, support: cards of prose ---------- */
.doc .card .eyebrow + h3 { margin-top: 10px; }
.doc .card ol { color: var(--muted); font-size: 14px; margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.doc .card b { color: var(--text); font-weight: 600; }
.doc .head { margin: 56px 0 24px; }
.doc .note { margin-top: 28px; }
.doc .updated { color: var(--dim); font-size: 13px; margin: 24px 0 0; }
footer .legal a { color: var(--muted); }
footer .legal a:hover { color: var(--text); }

/* ---------- Apple's "Download on the App Store" badge, as Apple supplies it ----------
   Never recolour, crop or restyle the artwork. Shown at 40 px tall (Apple's onscreen
   minimum), with at least a quarter of its height clear around it. */
.store-badge { display: inline-block; margin-top: 16px; padding: 0; line-height: 0; }
.store-badge img { display: block; height: 40px; width: auto; }
.pagehead .store-badge { margin-top: 22px; }
