:root {
  /* The ur-tones family: cool grey surfaces, one neutral outline for every
     module, teal only for what can be pressed, and a colour per cable. */
  --bg: #e6eaee; --surface: #fbfcfd; --sunk: #eff2f5; --line: #d0d7de; --module: #8e9aa6;
  --fg: #142130; --muted: #536274;
  --press: #0b7a70; --press-fg: #ffffff; --press-soft: #d9efec; --press-ink: #076158;
  --power: #c98a12; --audio: #2f6fb0; --light: #8a63d2; --line-c: #4c9a3c;
  --ok: #1f7a45; --bad: #b3261e; --wip: #b07400;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tray: 0 1px 0 rgba(20, 33, 48, .06), 0 10px 30px -14px rgba(20, 33, 48, .4);
  /* Names the bench and simulator rules still use, until they are redone. */
  --accent: var(--press-ink); --notice: #fff1cf; --code: var(--sunk);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1318; --surface: #141c23; --sunk: #10171d; --line: #26323c; --module: #5b6a78;
    --fg: #dde6ee; --muted: #94a3b2;
    --press: #3cc4b3; --press-fg: #04201c; --press-soft: #123430; --press-ink: #6fd9cb;
    --power: #f0b13a; --audio: #5b9be0; --light: #a888ec; --line-c: #7cc46b;
    --ok: #6fcf93; --bad: #f2827a; --wip: #f2c45a;
    --tray: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
    --notice: #3a3220; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 var(--sans); }
h1, h2, h3 { font-family: var(--round); letter-spacing: -.015em; }
:focus-visible { outline: 3px solid var(--press); outline-offset: 2px; }
header, main, footer, .notice { max-width: 46rem; margin: 0 auto; padding: 0 16px; }
header { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: center;
  padding-top: .8rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--round); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  text-decoration: none; color: var(--fg); margin-right: auto; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .95rem; }
nav.site a { color: var(--muted); text-decoration: none; padding: .15rem 0; border-bottom: 2px solid transparent; }
nav.site a:hover { color: var(--fg); border-bottom-color: var(--press); }
details.langs { position: relative; font-size: .85rem; margin-left: auto; }
details.langs summary { list-style: none; cursor: pointer; padding: .15rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg); background: var(--surface); white-space: nowrap; }
details.langs summary::-webkit-details-marker { display: none; }
details.langs summary::after { content: " ▾"; color: var(--muted); }
details.langs[open] summary::after { content: " ▴"; }
details.langs ul { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 20; margin: 0; padding: .3rem;
  list-style: none; min-width: 9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgb(0 0 0 / .12); }
details.langs li a, details.langs li span { display: block; padding: .35rem .6rem; border-radius: 5px; text-decoration: none; color: var(--fg); }
details.langs li a:hover { background: var(--sunk); }
details.langs li span[aria-current] { font-weight: 600; color: var(--muted); }
a { color: var(--press-ink); }
.notice { background: var(--notice); padding: .6rem 16px; margin-top: 1rem; border-radius: 4px; }
main { padding-top: 1rem; padding-bottom: 2rem; }
h1 { line-height: 1.25; margin-top: 1.5rem; }
h2 { margin-top: 2.25rem; line-height: 1.3; }
code { background: var(--code); padding: 0 .25em; border-radius: 3px; font: .9em var(--mono); }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
footer { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: .8rem; padding-bottom: 2rem;
  display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; align-items: baseline; }
footer p { margin: 0; }
footer .urtones { margin-left: auto; }
footer a { color: var(--muted); }
footer a:hover { color: var(--press-ink); }
.root { text-align: center; padding-top: 15vh; }
.languages { list-style: none; padding: 0; font-size: 1.25rem; }
.languages li { margin: .5rem 0; }
.donate-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.donate figure { margin: 0; max-width: 100%; }
.donate code { word-break: break-all; }
/* A build: its pictogram, title and one line, then its tabs (each a page). */
.build-head { display: flex; gap: 1rem; align-items: center; margin-top: 1.25rem; }
.build-head img { width: 96px; height: 64px; flex: none; }
.build-head h1 { margin: 0; }
.build-head .lede { margin: .15rem 0 0; color: var(--muted); }
.profile-id { font-size: .75rem; }
nav.tabs { flex-wrap: wrap; gap: .2rem; border-bottom: 1px solid var(--line); margin: 1rem 0 1.25rem; }
.tabs a { padding: .5rem .7rem; border-bottom: 3px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--press); font-weight: 600; }
@media (max-width: 480px) {
  nav.tabs { flex-wrap: wrap; }
  .tabs a { padding: .4rem .55rem; }
  .build-head img { width: 72px; height: 48px; }
}
.not-yet { color: var(--muted); }
/* Where a build stands: each part a row of stages, a dot per stage. */
.stages { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .75rem 1rem; }
.stages li { display: flex; flex-direction: column; align-items: flex-start; font-size: .9rem; }
.stages .note, .stages a { font-size: .8rem; }
.stages .note { color: var(--muted); }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; border: 2px solid var(--module); margin-bottom: .2rem; }
.done .dot { background: var(--ok); border-color: var(--ok); }
.wip .dot { background: var(--wip); border-color: var(--wip); }
.na .dot { border-style: dashed; }
.stage-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .8rem; margin-top: 1.5rem; }
.stage-key .dot { vertical-align: -.1rem; margin: 0 .3rem 0 0; }
/* A build's downloads: a pack's full hash, to check before installing it. */
.packs { list-style: none; padding: 0; }
.packs li { margin: .4rem 0; }
.sha-label { font-size: .8rem; color: var(--muted); }
.sha { word-break: break-all; }
.verify { color: var(--muted); font-size: .9rem; }
/* The simulator takes more width than the text column, centred on it. */
.simulator { padding: .75rem 0; width: min(72rem, calc(100vw - 32px)); margin-left: calc(50% - min(36rem, 50vw - 16px)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sim-warning { font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; display: inline-block; }

/* The bench's visual language: every module the same neutral outline (what
   a thing is, its title and icon say); the cables and their connectors are
   the only coloured lines, by what they carry; teal only on what you press.
   Layout: power | signer | peer; each connector sits on the module's edge
   facing its pair, half in, half out. */
.bench { position: relative; display: grid; grid-template-columns: minmax(6rem, 8rem) minmax(16rem, 1fr) minmax(11rem, 14rem);
  column-gap: 4.5rem; align-items: stretch; padding: 1.4rem 1.6rem; background: var(--sunk);
  box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; }
.bench[data-orient="v"] { grid-template-columns: minmax(0, 1fr); row-gap: 2.6rem; column-gap: 0; padding: 1.6rem .9rem; }
.col { display: flex; flex-direction: column; justify-content: center; gap: 1rem; min-width: 0; }
.mod { position: relative; background: var(--surface); border: 2px solid var(--module); border-radius: 14px; padding: .7rem .9rem; }
.bench .mod[hidden] { display: none; }
.mod-title { margin: 0 0 .5rem; font-size: 1rem; text-align: center; }
.mod-icon { font-size: 1.6rem; margin: .2rem 0; text-align: center; }
.mod-charger { text-align: center; }
.mod-wallet { border-radius: 30px; }
/* The signer and its peers share the row's height, so their facing ports
   (at the same percentage) line up; the charger stays small, centred on 5V. */
.col-signer .mod, .col-peer .mod { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.bench[data-orient="v"] .col-signer .mod, .bench[data-orient="v"] .col-peer .mod { flex: none; }

/* Connectors: a tag on the edge, outlined in its cable's colour. */
.port { position: absolute; z-index: 2; font: 600 .72rem/1.2 var(--sans); padding: .2rem .4rem; border-radius: 6px;
  border: 2px solid var(--module); background: var(--surface); color: var(--fg); white-space: nowrap; }
.port.p-power { border-color: var(--power); }
.port.p-audio { border-color: var(--audio); }
.port.p-air { border-color: var(--audio); border-style: dashed; }
.port.p-light { border-color: var(--light); }
.port.p-phone { border-color: var(--line-c); }
[data-port$=".qr"], [data-port$=".camera"] { --at: 26%; }
[data-port$=".in"], [data-port$=".jack"] { --at: 82%; }
/* Side by side: on the left and right edges, at heights that line up
   across modules, upright, in a margin of the module kept for them so they
   never cover what is inside. */
.bench[data-orient="h"] { --margin: 1.3rem; }
.bench[data-orient="h"] .port { writing-mode: vertical-rl; padding: .4rem .15rem; }
.bench[data-orient="h"] .col-power .edge-signer-side { right: 0; top: 50%; transform: translate(50%, -50%); }
.bench[data-orient="h"] .col-signer .edge-power-side { left: 0; top: 50%; transform: translate(-50%, -50%); }
.bench[data-orient="h"] .col-signer .edge-peer-side { right: 0; top: var(--at, 50%); transform: translate(50%, -50%); }
.bench[data-orient="h"] .col-peer .edge-signer-side { left: 0; top: var(--at, 50%); transform: translate(-50%, -50%); }
.bench[data-orient="h"] .col-power .mod { padding-right: var(--margin); }
.bench[data-orient="h"] .col-signer .mod { padding-left: var(--margin); padding-right: var(--margin); }
.bench[data-orient="h"] .col-peer .mod { padding-left: var(--margin); }
/* Ports on a module's top or bottom edge (the handset and the wallet held
   to it, one above the other): upright text in either layout. */
.bench .port.edge-top, .bench .port.edge-bottom { writing-mode: horizontal-tb; padding: .2rem .4rem; left: var(--at, 50%); }
.bench .port.edge-top { top: 0; transform: translate(-50%, -50%); }
.bench .port.edge-bottom { bottom: 0; transform: translate(-50%, 50%); }
.col-peer .mod-phone { flex: none; }
/* Stacked (narrow): every connector moves to the top or bottom edge, still
   labelled, at the same x across modules. */
.bench[data-orient="v"] .port { writing-mode: horizontal-tb; }
.bench[data-orient="v"] .col-power .edge-signer-side { left: 50%; bottom: 0; transform: translate(-50%, 50%); }
.bench[data-orient="v"] .col-signer .edge-power-side { left: 50%; top: 0; transform: translate(-50%, -50%); }
.bench[data-orient="v"] .col-signer .edge-peer-side { left: var(--at, 50%); bottom: 0; transform: translate(-50%, 50%); }
.bench[data-orient="v"] .col-peer .edge-signer-side { left: var(--at, 50%); top: 0; transform: translate(-50%, -50%); }
.bench[data-orient="v"] .port.edge-top { left: var(--at, 50%); top: 0; transform: translate(-50%, -50%); }
.bench[data-orient="v"] .port.edge-bottom { left: var(--at, 50%); bottom: 0; transform: translate(-50%, 50%); }
.bench[data-orient="v"] [data-port$=".qr"], .bench[data-orient="v"] [data-port$=".camera"] { --at: 25%; }
.bench[data-orient="v"] [data-port$=".in"], .bench[data-orient="v"] [data-port$=".jack"] { --at: 75%; }
.bench[data-orient="v"] .mod { padding-top: 1.3rem; padding-bottom: 1.3rem; }

/* Cables: the only coloured lines, by what they carry; they move only
   while they carry something (power is lit, steady: being on is not activity). */
svg.cables { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
svg.cables path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.c-power { stroke: var(--power); }
.c-audio { stroke: var(--audio); }
.c-air { stroke: var(--audio); stroke-dasharray: 8 7; }
.c-light { stroke: var(--light); stroke-dasharray: 1 9; }
.c-phone { stroke: var(--line-c); }
svg.cables path.busy:not(.c-power) { stroke-dasharray: 10 8; animation: flow 2.1s linear infinite; }
svg.cables path.busy.c-light { stroke-dasharray: 1 9; }
svg.cables path.busy.c-air { stroke-dasharray: 8 7; }
@keyframes flow { to { stroke-dashoffset: -90; } }
.port.busy.p-audio { background: color-mix(in srgb, var(--audio) 18%, var(--surface)); }
.port.busy.p-air { background: color-mix(in srgb, var(--audio) 18%, var(--surface)); }
.port.busy.p-light { background: color-mix(in srgb, var(--light) 18%, var(--surface)); }
.port.busy.p-phone { background: color-mix(in srgb, var(--line-c) 18%, var(--surface)); }
/* Emitting light (the QR): rings out of the port, off the screen. */
.port.emit::before, .port.emit::after { content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--light); animation: ring-out 1.6s ease-out infinite; pointer-events: none; }
.port.emit::after { animation-delay: .8s; }
@keyframes ring-out { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.8); } }
/* Listening: the IN port pulses in; the microphone draws rings inwards. */
.port.listening { box-shadow: 0 0 0 3px color-mix(in srgb, var(--audio) 35%, transparent); }
.yw-mic { position: relative; }
.yw-mic.capturing::before { content: ""; position: absolute; left: -.2rem; top: -.1rem; width: 1.4rem; height: 1.4rem; border-radius: 50%;
  border: 2px solid var(--muted); animation: ring-in 1.4s ease-in infinite; pointer-events: none; }
@keyframes ring-in { from { opacity: 0; transform: scale(2); } to { opacity: .9; transform: scale(.5); } }

/* The legend, always under the bench: only the cables this bench uses. */
.legend { list-style: none; padding: 0; margin: .4rem 0 .6rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .88rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .45rem; }
.legend i { display: inline-block; width: 28px; height: 0; border-top: 4px solid var(--module); }
.legend .l-power i { border-top-color: var(--power); }
.legend .l-audio i { border-top-color: var(--audio); }
.legend .l-air i { border-top-color: var(--audio); border-top-style: dashed; }
.legend .l-light i { border-top-color: var(--light); border-top-style: dotted; }
.legend .l-phone i { border-top-color: var(--line-c); }

/* The signer (Cable y QR): a black OLED and five round buttons. */
.sim-device { display: flex; flex-direction: column; gap: .8rem; align-items: center; background: var(--sunk);
  padding: .8rem; border-radius: 10px; outline-offset: 3px; }
.sim-oled { width: 100%; max-width: 512px; aspect-ratio: 2 / 1; image-rendering: pixelated;
  background: #000; border: 6px solid #000; border-radius: 6px; }
.sim-buttons { display: grid; grid-template-columns: repeat(3, 2.8rem); grid-template-rows: repeat(3, 2.8rem); gap: .3rem; }
.sim-buttons button { font-size: 1rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--fg); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
/* Down while the firmware is given the button, whoever pressed it. */
.sim-buttons button:active, .sim-buttons button.down { background: var(--press); color: var(--press-fg); border-color: var(--press); transform: translateY(1px); }
.sim-buttons [data-btn="up"] { grid-column: 2; grid-row: 1; }
.sim-buttons [data-btn="left"] { grid-column: 1; grid-row: 2; }
.sim-buttons [data-btn="ok"] { grid-column: 2; grid-row: 2; }
.sim-buttons [data-btn="right"] { grid-column: 3; grid-row: 2; }
.sim-buttons [data-btn="down"] { grid-column: 2; grid-row: 3; }
.sim-led { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-end; margin: -.2rem .2rem .2rem 0;
  font: .65rem/1 var(--sans); color: var(--muted); cursor: help; }
.led-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #3a3f3a; border: 1px solid #555; transition: background .05s; }
.sim-led.on .led-dot { background: #4cff6a; box-shadow: 0 0 6px #4cff6a; }

/* The wallets (both builds): a phone's screen. */
.wd-screen { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; }
.wd-title { margin: 0; text-align: center; color: var(--muted); }
.wd-screen button { padding: .4rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); cursor: pointer; text-align: left; }
.wd-status { margin: 0; color: var(--muted); font-size: .8rem; min-height: 1.2em; }
.wd-out { width: 100%; font: .7rem/1.3 var(--mono); }
.wd-opts { margin: 0; display: flex; gap: .8rem; }
.wd-row { margin: 0; display: flex; gap: .4rem; align-items: center; }
.wd-row > button.wd-psbt { flex: 1; }
.wd-row select { font: inherit; padding: .25rem; border-radius: 8px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); }
.wd-screen button.wd-stop { margin-left: auto; text-align: center; }
.wd-warn { color: var(--wip); font-size: 1.1rem; cursor: help; }
.wd-check { margin: 0; font: .72rem/1.35 var(--mono); white-space: pre-line; overflow-wrap: anywhere; }
.wd-check:empty { display: none; }
.yw-cam, .yw-mic { margin: 0; font-size: .8rem; }
.yw-cam { order: -1; }
.mic-level { width: 100%; }
.mic-note { margin: 0; font-size: .75rem; color: var(--muted); }
.yw-tools { margin: 0; display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; }
/* The wallet (Cable y QR): a phone with an app; who runs it is chosen
   inside. Account, three actions, and a card with what you need for what
   you just did. Only what you press is teal. */
.bench[data-orient="h"]:has(.mod-wallet) { grid-template-columns: minmax(5rem, 7rem) minmax(13.5rem, 1fr) minmax(14rem, 21rem); }
.col-peer .mod-wallet { padding-top: .7rem; padding-bottom: .7rem; padding-right: .7rem; }
.col-far .mod-wallet { padding: .7rem; }
.bench[data-orient="h"] .col-far .mod-wallet { padding-left: var(--margin); }
/* Stacked, the wallet's connectors sit on its top edge: room kept above its app bar. */
.bench[data-orient="v"] .mod-wallet { padding: 1.3rem .7rem .7rem; }
.wl-screen { flex: 1; display: flex; flex-direction: column; gap: .7rem; background: var(--sunk); border-radius: 22px; padding: .8rem; min-height: 26rem; font-size: .9rem; }
.wl-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.wl-bar .mod-title { margin: 0; font-size: 1.05rem; text-align: left; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: .2rem .65rem; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--press); color: var(--press-fg); }
/* The selector sits at the wallet's right edge: its tips open leftwards. */
.seg button[data-tip]:hover::after, .seg button[data-tip]:focus-visible::after, .seg button[data-tip].tip-open::after { left: auto; right: 0; transform: none; }
.wl-sim, .wl-yours { flex: 1; display: flex; flex-direction: column; gap: .7rem; }
.wl-screen [data-panel][hidden] { display: none; }
.wl-acct { margin: 0; background: var(--surface); border-radius: 14px; padding: .6rem .75rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .7rem; }
.wl-acct dt { color: var(--muted); }
.wl-acct dd { margin: 0; font-family: var(--mono); overflow-wrap: anywhere; }
.wl-acct .wd-warn { font-family: var(--sans); }
.wl-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.wl-acts button { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 12px; padding: .55rem .3rem;
  font: inherit; font-size: .82rem; line-height: 1.2; cursor: pointer; }
.wl-acts button span { display: block; font-size: 1.3rem; margin-bottom: .15rem; }
.wl-acts button:hover { border-color: var(--press); }
.wl-acts button:active { background: var(--press); color: var(--press-fg); border-color: var(--press); }
.wl-card { display: flex; flex-direction: column; gap: .5rem; }
.wl-card:empty { display: none; }
.card { background: var(--surface); border-radius: 14px; padding: .7rem .8rem; }
.card h4 { margin: 0 0 .35rem; font: 600 .95rem/1.3 var(--round); }
.card.ok h4 { color: var(--ok); }
.card.bad h4 { color: var(--bad); }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .15rem 0; border-bottom: 1px dashed var(--line); }
.card .row:last-of-type { border-bottom: 0; }
.card .row span { color: var(--muted); }
.card .row code { background: none; padding: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.card .row:not(.addr) code { white-space: nowrap; }
.card .row span { flex: 0 1 auto; }
.card .row.addr code { font-size: .78rem; }
.card .line { margin: .1rem 0; font: .8rem/1.35 var(--mono); overflow-wrap: anywhere; }
.card .note { color: var(--muted); font-size: .82rem; margin: .4rem 0 0; }
.card progress { display: block; width: 100%; height: 6px; margin-top: .4rem; accent-color: var(--muted); }
.wl-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; font-size: .82rem; color: var(--muted); }
.wl-foot label:first-child { margin-right: auto; }
.wl-foot select { font: inherit; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: .1rem .3rem; }
.wl-foot button.wd-stop { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: .05rem .4rem; cursor: pointer; }
.wl-yours p { margin: 0; }
.wl-yours .yw-cam { order: 0; }
.wl-yours button.mic-toggle { width: 100%; padding: .6rem; border-radius: 12px; border: 0; background: var(--press); color: var(--press-fg); font: inherit; font-weight: 600; cursor: pointer; }
.wl-yours button.mic-toggle[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 2px var(--press); }
.wl-yours .mic-note { margin-top: auto; }
/* The first time: a passive hint, folded away once you know. */
details.first { background: var(--surface); border-radius: 14px; box-shadow: var(--tray); padding: .7rem 1rem; margin: 0 0 1rem; }
details.first summary { cursor: pointer; font-weight: 600; }
details.first ol { margin: .5rem 0 .2rem; padding-left: 1.3rem; }
details.first li { margin: .2rem 0; }
details.kcode { display: inline; }
details.kcode summary { display: inline; cursor: pointer; color: var(--muted); text-decoration: underline dotted; }
details.kcode[open] { display: block; }
details.kcode code { display: block; margin-top: .2rem; font-family: var(--mono); overflow-wrap: break-word; word-spacing: .1em; }
.sim-mobile { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 10px; font-size: .85rem; }
.sim-mobile[hidden] { display: none; }
.sim-mobile-close { margin-left: auto; border: 0; background: none; color: var(--fg); cursor: pointer; font-size: 1rem; }

.sim-status { color: var(--muted); font-size: .9rem; margin: .7rem 0 .2rem; min-height: 1.2em; }
.sim-built { color: var(--muted); font-size: .8rem; }
.echo { font-size: .8rem; max-height: 14rem; overflow: auto; background: var(--code); padding: .5rem; }

/* Tooltips: mouse, keyboard focus and tap (ui.mjs toggles .tip-open). */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after, [data-tip].tip-open::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  width: max-content; max-width: 16rem; white-space: normal; writing-mode: horizontal-tb; padding: .35rem .5rem; border-radius: 6px;
  background: var(--fg); color: var(--bg); font: .75rem/1.35 var(--sans); z-index: 10; pointer-events: none; }
.port[data-tip] { position: absolute; }
/* Inside a module the tip goes to the module's help strip (ui.mjs), never over its buttons. */
.mod [data-tip]:hover::after, .mod [data-tip]:focus-visible::after, .mod [data-tip].tip-open::after { content: none; }
.mod-help { box-sizing: content-box; margin: auto 0 0; padding-top: .4rem; height: calc(4 * 1.35 * .75rem); overflow-y: auto;
  flex: none; border-top: 1px dashed var(--line); color: var(--muted); font: .75rem/1.35 var(--sans); text-align: left; }
.mod-help:empty::before { content: "ⓘ"; opacity: .5; }
.info { cursor: help; }

/* The PEX: a signer with no screen, a telephone, a wallet at its handset. */
.vs-device { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: var(--sunk);
  padding: .8rem; border-radius: 10px; cursor: help; }
.ph-phone { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.ph-hook { padding: .45rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); cursor: pointer; font-weight: 600; }
button.ph-hook[aria-pressed="true"] { background: var(--press); color: var(--press-fg); border-color: var(--press); }
.ph-keypad { display: grid; grid-template-columns: repeat(3, 2.7rem); gap: .35rem; outline-offset: 3px; }
.ph-keypad button { height: 2.7rem; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); cursor: pointer; font-size: 1.1rem;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.ph-keypad button small { font-size: .55rem; letter-spacing: .05em; min-height: .5rem; color: var(--muted); }
.ph-keypad button.down, .ph-keypad button:active { background: var(--press); color: var(--press-fg); border-color: var(--press); transform: translateY(1px); }
.ph-row { margin: 0; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.ph-flash { width: 2.2rem; height: 1.8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); cursor: pointer; font-weight: 700; }
.ph-type { height: 1.8rem; padding: 0 .6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); cursor: pointer; white-space: nowrap; }
button.ph-type[aria-pressed="true"] { background: var(--press); color: var(--press-fg); border-color: var(--press); }
.ph-type:disabled { opacity: .45; cursor: not-allowed; }
.sim-credits { list-style: none; padding: 0; margin: .4rem 0; font-size: .75rem; color: var(--muted); }
.col-signer .mod-voice-signer { flex: none; }

/* The PEX's bench: charger over signer | the telephone | you over the
   wallet. The telephone's connectors on its right edge (earpiece above,
   microphone below); room above it for the earpiece's bubble. Stacked:
   charger, signer, telephone, you (a chip on the left, clear of the cables
   to the wallet), the wallet. */
.bench:has(.col-far) { --bubble-room: 8rem; }
.bench[data-orient="h"]:has(.col-far) { grid-template-columns: minmax(8rem, 10rem) minmax(12.5rem, 1fr) minmax(14rem, 21rem);
  grid-template-rows: auto 1fr; column-gap: 5rem; row-gap: 2.4rem; }
.bench[data-orient="h"]:has(.col-far) .col-power { grid-column: 1; grid-row: 1; }
.bench[data-orient="h"]:has(.col-far) .col-signer { grid-column: 1; grid-row: 2; justify-content: flex-start; }
.bench[data-orient="h"]:has(.col-far) .col-peer { grid-column: 2; grid-row: 1 / 3; }
.bench[data-orient="h"]:has(.col-far) .col-far { grid-column: 3; grid-row: 1 / 3; }
.col-peer:has(.mod-phone) { padding-top: var(--bubble-room, 0); justify-content: flex-start; }
.col-far { justify-content: flex-start; gap: 2.4rem; }
.bench[data-orient="h"] .col-peer .edge-far-side { right: 0; top: var(--at, 50%); transform: translate(50%, -50%); }
.bench[data-orient="h"] .col-far .edge-peer-side { left: 0; top: var(--at, 50%); transform: translate(-50%, -50%); }
.bench[data-orient="h"] .col-peer .mod-phone { padding-right: var(--margin); }
.bench[data-orient="h"] .col-far .mod { padding-left: var(--margin); }
[data-port="phone.ear"] { --at: 22%; }
[data-port="phone.mic"] { --at: 78%; }
[data-port="wallet.mic-near"] { --at: 22%; }
[data-port="wallet.speaker-near"] { --at: 62%; }
.bench[data-orient="v"] .col-peer .edge-far-side { left: var(--at, 50%); bottom: 0; transform: translate(-50%, 50%); }
.bench[data-orient="v"] .col-far .edge-peer-side { left: var(--at, 50%); top: 0; transform: translate(-50%, -50%); }
.bench[data-orient="v"] [data-port="phone.ear"] { --at: 55%; }
.bench[data-orient="v"] [data-port="phone.mic"], .bench[data-orient="v"] [data-port="wallet.speaker-near"] { --at: 88%; }
.bench[data-orient="v"] [data-port="wallet.mic-near"] { --at: 67%; }
/* The telephone cable at the left, clear of the bubble's tail on the earpiece. */
.bench[data-orient="v"]:has(.col-far) [data-port$=".line"] { --at: 15%; }
/* You: a small module, your ear on its edge (upright: the module is short). */
.mod-you { align-self: flex-start; max-width: 46%; padding: .55rem .8rem; }
.bench[data-orient="h"] .mod-you { max-width: none; }
.bench[data-orient="h"] .col-far .mod-you { padding-left: 2.8rem; }
.bench[data-orient="h"] .mod-you .port { writing-mode: horizontal-tb; padding: .2rem .4rem; }
.bench[data-orient="v"] .col-far .mod-you { padding-top: 1.1rem; padding-bottom: .55rem; }
.you-who { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .45rem; }
.you-who .mod-icon { margin: 0; font-size: 1.5rem; }
.you-who .mod-title { margin: 0; font-family: var(--round); font-weight: 700; }
.you-who small { color: var(--muted); font-size: .8rem; }
/* The earpiece's transcript: a comic speech bubble, its tail on the earpiece
   (voice-ui.mjs places it and sets --tail); the text scrolls if long. */
.bubble { position: absolute; z-index: 4; left: 0; top: 0; margin: 0; width: max-content; max-width: min(22rem, calc(100% - 1rem), var(--cap, 100%));
  background: var(--surface); color: var(--fg); border: 2px solid var(--fg); border-radius: 18px; padding: .4rem .8rem .5rem;
  font-size: .9rem; line-height: 1.35; box-shadow: var(--tray); }
.bubble::after { content: ""; position: absolute; bottom: -11px; left: var(--tail, 50%); width: 18px; height: 18px; background: var(--surface);
  border-right: 2px solid var(--fg); border-bottom: 2px solid var(--fg); transform: translateX(-50%) rotate(45deg) skew(12deg, 12deg); }
.bubble small { display: block; font-size: .72rem; color: var(--muted); }
/* Whole lines only, so no letter is cut (3 beside the telephone, 5 stacked). */
.bubble .said { display: block; max-height: calc(1.35em * var(--said-lines, 3)); overflow-y: auto; }
.bench[data-orient="v"]:has(.col-far) { --bubble-room: 10rem; --said-lines: 5; }
.bubble .said:empty::before { content: "…"; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  svg.cables path.busy, svg.cables path.busy:not(.c-power) { animation: none; stroke-width: 6; }
  .port.emit::before, .port.emit::after, .yw-mic.capturing::before { animation: none; opacity: .8; }
  .led-dot { transition: none; }
}

/* The home page: a wider column, the headline beside a keypad to play. */
body:has(.home) header, body:has(.home) main, body:has(.home) footer { max-width: 70rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding: 1.5rem 0 2rem; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.1; }
.hero .lede { color: var(--muted); max-width: 46ch; margin: 1rem 0 1.4rem; font-size: 1.1rem; }
.cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.cta a, .acts a { padding: .6rem 1.1rem; border-radius: 12px; text-decoration: none; font-weight: 600; white-space: nowrap; }
.cta .main, .acts a.main { background: var(--press); color: var(--press-fg); }
.cta .alt, .acts a.alt { border: 1px solid var(--line); color: var(--fg); background: var(--surface); }
.urtones-line { color: var(--muted); font-size: .92rem; margin: 1rem 0 0; }
.dtmf { background: var(--surface); border-radius: 20px; box-shadow: var(--tray); padding: 1.2rem 1.2rem 1rem; }
.dtmf .grid { display: grid; grid-template-columns: 3.4rem repeat(4, 1fr); gap: .35rem; align-items: center; }
.dtmf .hz { font: .74rem/1 var(--mono); color: var(--muted); text-align: center; transition: color .1s; }
.dtmf .hz-row { text-align: right; padding-right: .3rem; }
.dtmf .hz.on { color: var(--fg); font-weight: 700; }
.dtmf button { aspect-ratio: 1.25; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk);
  color: var(--fg); font: 600 1.3rem/1 var(--round); cursor: pointer; }
.dtmf button.dim { color: var(--muted); font-size: 1.1rem; }
/* The neutral cross: the key's row and column, no colour of a cable. */
.dtmf button.cross { background: var(--line); }
.dtmf button.on { background: var(--fg); color: var(--surface); }
.dtmf .wave { display: block; width: 100%; height: 54px; margin-top: .8rem; }
.dtmf .wave polyline { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .55; vector-effect: non-scaling-stroke; }
.dtmf .wave .sum { stroke: var(--fg); stroke-width: 2.2; opacity: 1; }
.dtmf .cap { font-size: .9rem; color: var(--muted); margin: .4rem 0 0; min-height: 2.6em; }
/* The builds at a glance: a row each, a pictogram, what it is, two actions. */
.builds { display: grid; gap: .8rem; margin-bottom: 2rem; }
#builds { margin-top: 1rem; }
.build { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; gap: .4rem 1.2rem; align-items: center;
  background: var(--surface); border: 2px solid var(--module); border-radius: 16px; padding: 1rem 1.2rem; }
.build > img { width: 6rem; height: auto; color: var(--module); }
.build h3 { margin: 0; font-size: 1.3rem; }
.build p { margin: .15rem 0 .5rem; color: var(--muted); }
.build .talk { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .6rem; }
.chip { font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; color: var(--fg); }
.acts { display: flex; gap: .5rem; flex-wrap: wrap; }
/* Hardware stages as dots; the state is also in the title and hidden text. */
.dots { list-style: none; display: flex; gap: .45rem; padding: 0; margin: 0; }
.dots .dot { margin: 0; }
.prose h2 { margin-top: 2rem; }
.prose ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.prose li { padding-top: .6rem; border-top: 3px solid var(--line); color: var(--muted); }
.prose li strong { display: block; color: var(--fg); font-family: var(--round); font-size: 1.1rem; }
.prose p { max-width: 70ch; color: var(--muted); }
@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: .5rem; }
  .build { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .build > img { width: 4.5rem; }
  .build .acts { grid-column: 1 / -1; }
  .prose ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .dtmf { padding: .8rem; }
  .dtmf .grid { grid-template-columns: 2.6rem repeat(4, 1fr); gap: .25rem; }
  .cta a, .acts a { white-space: normal; }
}
/* The general downloads page: one neutral section per build. */
.dl-build { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .2rem 1rem 1rem; margin: 1rem 0; }
.install { color: var(--muted); font-size: .9rem; word-break: break-word; }

/* A build's gallery: cards for videos (links) and photos (served here). */
.gallery { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.gallery > li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; }
.gallery li.video { display: flex; gap: .8rem; align-items: flex-start; }
.gallery .g-icon { font-size: 1.6rem; line-height: 1; }
.gallery p { margin: .3rem 0 0; color: var(--muted); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; border-radius: 6px; display: block; margin-bottom: .5rem; }

/* Home: how it started, with the sister projects beside it (below it on narrow screens). */
.origin-row { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2rem; align-items: start; }
.origin-row .prose { max-width: none; }
.siblings { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .4rem 1rem .8rem; }
.siblings h2 { font-size: 1rem; margin: .6rem 0 .4rem; }
.siblings ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.siblings a { font-weight: 600; }
.siblings span { color: var(--muted); font-size: .85rem; }
@media (max-width: 720px) { .origin-row { grid-template-columns: 1fr; gap: 0; } }
