/* Shared styles for manual.html (EN) and manual.es.html (ES). Same tokens as index.html; always dark. */
:root {
  --bg: #101010; --ink: #e6e6e6; --muted: #9a9a9a; --rule: #2a2a2a; --accent: #f08a4f; --panel: #171717;
  --pcb: #111312; --silk: #f1efe6; --cap: #e6e1d4; --cap-fn: #3a3f3c; --cap-play: #e2692b; --gold: #d3aa55;
  --led: #ff3b25; --led-dim: #8e2a1b; --led-amber: #ffb02e;
  --f-ui: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-body: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 24px 16px 72px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 820px) { .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

.top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.back, .lang a { font-family: var(--f-ui); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 8px; padding: 9px 14px; }
.back:hover, .lang a:hover { border-color: var(--accent); color: var(--accent); }
.lang { display: flex; gap: 6px; }
.lang a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

nav.toc { position: sticky; top: 20px; font-family: var(--f-ui); font-size: 12.5px; }
nav.toc b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
nav.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
nav.toc a { color: var(--ink); text-decoration: none; display: block; padding: 3px 0; }
nav.toc a:hover { color: var(--accent); }
@media (max-width: 820px) {
  nav.toc { position: static; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; }
  nav.toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
}

main { min-width: 0; max-width: 72ch; }
h1 { font-family: var(--f-ui); font-weight: 600; font-size: clamp(28px, 4.4vw, 38px); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 12px; text-wrap: balance; }
.lede { color: var(--muted); font-size: 17px; margin: 0 0 8px; }
h2 { font-family: var(--f-ui); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin: 52px 0 14px; padding-top: 14px; border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
h3 { font-family: var(--f-ui); font-size: 15px; font-weight: 600; margin: 26px 0 8px; }
p, li, dd, td { text-wrap: pretty; }
ol, ul { padding-left: 1.3em; display: grid; gap: 6px; }
.muted { color: var(--muted); }

kbd { font-family: var(--f-ui); font-size: 12.5px; border: 1px solid #3a3a3a; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #1c1c1c; white-space: nowrap; }
.btn { font-family: var(--f-ui); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  border-radius: 4px; padding: 1px 6px; background: var(--cap-fn); color: var(--silk); }
.btn.play { background: var(--cap-play); color: #1a0d05; }
.btn.num { background: var(--cap); color: #1b1d1b; }

.tip { border-left: 3px solid var(--accent); background: var(--panel); padding: 10px 14px; border-radius: 0 6px 6px 0; margin: 16px 0; }
.tip b:first-child { font-family: var(--f-ui); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-right: 6px; }

.tbl { width: 100%; overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--f-ui); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td:first-child { white-space: nowrap; }
td.n { font-family: var(--f-ui); color: var(--muted); width: 2.5em; }

/* panel map */
.map { background: var(--pcb); border-radius: 14px; padding: 16px; margin: 16px 0; box-shadow: inset 0 0 0 1px #2a2c2a; max-width: 440px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; font-family: var(--f-ui); }
.map .lcd { grid-column: 1 / -1; background: #a6d2bd; color: #0f2e28; border-radius: 4px; padding: 10px 12px; font-size: 11px; font-weight: 600; letter-spacing: .06em; line-height: 1.5; box-shadow: 0 0 0 6px #121413; margin: 6px 6px 12px; }
.map .c { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; text-align: center; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; padding: 2px; }
.map .n { background: var(--cap); color: #1b1d1b; border-radius: 50%; font-size: 15px; }
.map .f { background: var(--cap-fn); color: var(--silk); border-radius: 50%; }
.map .p { background: var(--cap-play); color: #1a0d05; border-radius: 50%; }
.map .k { background: repeating-conic-gradient(#2b2f2d 0 5deg, #191b1a 5deg 10deg); color: var(--silk); border-radius: 50%; font-size: 16px; }

/* LED swatches */
.led { display: inline-block; width: 14px; height: 7px; border-radius: 1px; vertical-align: middle; margin-right: 4px; background: #4a1a14; }
.led.on { background: var(--led); box-shadow: 0 0 6px 1px rgba(255,59,37,.8); }
.led.dim { background: var(--led-dim); }
.led.amber { background: var(--led-amber); box-shadow: 0 0 6px 1px rgba(255,176,46,.8); }
.led.blink { animation: blink .5s steps(1) infinite; }
@keyframes blink { 50% { background: #4a1a14; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .led.blink { animation: none; } }

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 36px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--cap); color: #1b1d1b;
  font-family: var(--f-ui); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
footer { margin-top: 56px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--muted); }
table.kits { font-size: 13.5px; }
table.kits td, table.kits th { padding-right: 12px; white-space: nowrap; }

/* mobile section picker (built by manual.js), back-to-top button, current section in the contents */
.jump { display: none; }
nav.toc a[aria-current] { color: var(--accent); }
@media (max-width: 820px) {
  .js nav.toc { display: none; }
  .js .jump { display: block; position: sticky; top: 0; z-index: 5; margin: -12px -16px 0; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--rule); }
  .js h2, .js h3 { scroll-margin-top: 72px; }
}
.jump select { width: 100%; font: 600 14px var(--f-ui); color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 11px 36px 11px 12px;
  appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(-45deg, transparent 50%, var(--accent) 50%);
  background-position: right 18px center, right 13px center; background-size: 5px 5px; background-repeat: no-repeat; }
.jump select:focus-visible, .totop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.totop { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--cap-play); color: #1a0d05; font: 600 20px var(--f-ui); cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.totop.show { opacity: 1; pointer-events: auto; transform: none; }
@media (prefers-reduced-motion: reduce) { .totop { transition: none; } }
