/* RGB Rings: the field instrument of the UAV Overhead family. Tokens and rules: .superpowers/design/design-spec.md.
   Lean on purpose for the Pi Zero: no backdrop-filter, no blur, one shadow. */

@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/chakra-petch-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/chakra-petch-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-var-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/fonts/jetbrains-mono-var-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0a0e14; --card: #10151e; --surface-2: #161c28; --surface-3: #1b2333; --sidebar: #0c1119;
  --fg: #e8edf4; --muted: #8a97ab; --muted-strong: #a7b3c6;
  --border: #5d6b82; --line: #3b475c; --grid: #232c3b;
  --hud: #ffb020; --hud-fg: #0a0e14; --signal: #35d6e5; --lime: #a3e635; --orange: #f97316; --slate: #7c8aa5; --danger: #f2555a;
  --hud-a10: rgb(255 176 32 / .1);
  --display: "Chakra Petch", "Bahnschrift", "DIN Alternate", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-sm: 5px; --r-md: 8px; --r-lg: 11px;
  --pad: 16px; --gutter: 16px; --tabbar: 64px;
  --nav-clear: calc(var(--tabbar) + 1px + var(--s4) + env(safe-area-inset-bottom, 0px));
  --ease: 120ms ease-out;
  color-scheme: dark;
  accent-color: var(--hud);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--fg); font: 400 17px/1.5 var(--sans);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; background-position: -1px -1px;
  padding-bottom: var(--nav-clear);
}
/* The phone tab bar is fixed: content, focus and scroll-into-view all stop above it (and its 1px edge). */
html { scroll-padding-bottom: var(--nav-clear); scroll-padding-top: calc(var(--chrome-h, 56px) + var(--s2)); }
a { color: var(--hud); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: var(--s2) 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--hud) !important; outline-offset: 2px !important; }
.skip { position: absolute; left: var(--s2); top: -100px; z-index: 10; background: var(--hud); color: var(--hud-fg); padding: 10px 16px; border-radius: var(--r-md); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s2); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--fg); line-height: 1.15; letter-spacing: .01em; }
h1 { font-size: 28px; font-weight: 700; margin: 2px 0 0; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 var(--s3); }
h3 { font-size: 16px; font-weight: 600; margin: var(--s4) 0 var(--s2); }
.kicker, .tool-section > h3 { font: 600 12px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--hud); margin: 0; }
.lead { color: var(--muted-strong); margin: var(--s2) 0 0; max-width: 62ch; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.block { display: block; } .end { text-align: right; } .mono.b { font-weight: 700; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.error { color: var(--danger); margin: var(--s1) 0; }
.error:empty { display: none; }

/* ---------- Header ---------- */
.chrome { position: sticky; top: 0; z-index: 4; background: var(--bg); }
.top { display: flex; gap: var(--s2); align-items: center; min-height: 56px; padding: 6px var(--gutter); background: var(--bg); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg); text-decoration: none; font: 700 15px var(--display); letter-spacing: .2em; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; }
.brand .word { overflow: hidden; text-overflow: ellipsis; }
.brand .word span { color: var(--hud); }
.brand svg { width: 22px; height: 22px; flex: none; }
.glyph-mark { color: var(--hud); }
.glyph-mark .hub { fill: var(--signal); }
/* Connection: a quiet dot and label. The pill shape is kept for race state only. */
.conn { flex: none; display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.conn.ok { color: var(--muted-strong); }
.conn.ok::before { background: var(--lime); }
.conn.bad { color: var(--danger); }
.conn.bad::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
/* The account pill shrinks before anything else and ellipsises; it never pushes the header past the screen. */
.who { display: inline-block; flex: 0 1 auto; min-width: 0; min-height: 44px; line-height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--fg); text-decoration: none; font-size: 15px; font-weight: 600; max-width: min(40vw, 16rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color var(--ease); }
.who:hover { background: var(--surface-2); }
/* Page banners (bridge offline, your login changed) stay on screen under the header while the page scrolls. */
#alerts { display: grid; gap: var(--s2); padding: var(--s2) var(--gutter); border-bottom: 1px solid var(--line); }
#alerts:not(:has(.banner)) { display: none; }
#alerts > div:empty { display: none; }
#alerts .banner { max-width: calc(1120px - 2 * var(--gutter)); margin: 0 auto; width: 100%; }
.conn-short, .narrow-only { display: none; }
/* A session banner shrinks to its first sentence and buttons after 8 s (main.js). */
/* Shrunk after 8 s: the second sentence leaves the screen but stays for screen readers (never silently removed). */
.banner.brief .more { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 599px) {
  /* 390 px: brand, a short link word and the account pill always fit. */
  .conn-long, .wide-only { display: none; }
  .conn-short, .narrow-only { display: inline; }
  /* Every line of the sticky chrome costs the page: banners are one tight line where they can be. */
  #alerts { padding: 6px var(--gutter); gap: 6px; }
  #alerts .banner { padding: 4px var(--s2) 4px var(--s3); font-size: 15px; line-height: 1.35; gap: 0 var(--s2); min-height: 44px; }
  #alerts .banner .grow { flex-basis: 160px; }
  #alerts .banner button { min-height: 44px; padding: 4px 10px; }
}
/* Narrow phones: a tighter wordmark and a shorter pill, so "RGB/RINGS", the link word and a long name all fit. */
@media (max-width: 400px) { .who { max-width: 8rem; padding: 0 12px; } .brand { letter-spacing: .12em; gap: 8px; } }
/* Very narrow phones: the link shows as its dot only (the words stay for screen readers). */
@media (max-width: 379px) { .who { max-width: 6.5rem; } .brand { letter-spacing: .08em; gap: 6px; } } /* the short link word stays on screen */

/* ---------- Chips, tags, dots, badges ---------- */
.chip { --tone: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border: 1px solid var(--tone); border-radius: var(--r-sm); background: color-mix(in srgb, var(--tone) 12%, var(--card)); color: var(--tone); font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip.nodot::before { display: none; }
.chip.hud { --tone: var(--hud); } .chip.lime { --tone: var(--lime); } .chip.signal { --tone: var(--signal); } .chip.muted { --tone: var(--muted-strong); }
.chip.danger { --tone: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--card)); }
/* GO: the moment after a countdown's green. Solid lime with dark words, so it reads apart from the Running chip. */
.chip.go { --tone: var(--lime); background: var(--lime); color: var(--bg); }
.chip.lg { min-height: 36px; font-size: 15px; padding: 4px 14px; }
.chip.lg::before { width: 10px; height: 10px; }
.top .chip { font-size: 12px; min-height: 28px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; font: 500 12px var(--mono); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 0 6px; color: var(--muted-strong); white-space: nowrap; }
.tag.danger { color: var(--danger); border-color: var(--danger); }
.tag.hud { color: var(--hud); border-color: var(--hud); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(255 255 255 / .25); flex: none; }
.dot.lg { width: 16px; height: 16px; }
.pbar { display: inline-block; width: 4px; align-self: stretch; min-height: 24px; border-radius: 2px; flex: none; }
.rank { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 6px; border-radius: var(--r-sm); border: 1px solid var(--border); font: 700 13px var(--mono); color: var(--muted-strong); }
.rank.p1 { background: var(--hud); border-color: var(--hud); color: var(--hud-fg); }
.rank.p2, .rank.p3 { border-color: var(--hud); color: var(--hud); }
.gnum { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 6px; border-radius: var(--r-sm); border: 1px solid var(--border); font: 700 13px var(--mono); color: var(--fg); background: var(--sidebar); flex: none; }

/* ---------- Nav ---------- */
#nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 4; display: flex; background: var(--card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
#nav .nav-group { display: none; }
#nav a { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--tabbar); padding: 6px 2px; color: var(--muted-strong); text-decoration: none; font-size: 13px; font-weight: 600; transition: color var(--ease), background-color var(--ease); }
#nav a svg { width: 22px; height: 22px; }
#nav a::before { content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; background: var(--hud); border-radius: 0 0 2px 2px; opacity: 0; transition: opacity var(--ease); }
#nav a[aria-current="page"] { color: var(--hud); }
#nav a[aria-current="page"]::before { opacity: 1; }
#nav a.extra { display: none; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: 1120px; margin: 0 auto; padding: var(--s4) var(--gutter) var(--s6); outline: none; min-width: 0; }
.page { display: grid; gap: var(--s4); min-width: 0; }
.page > * { min-width: 0; }

@media (min-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  :root { --pad: 20px; --gutter: 24px; }
}
@media (min-width: 900px) {
  :root { --nav-clear: 0px; }
  body { padding-bottom: 0; display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .chrome { grid-column: 1 / -1; }
  /* Banners line up with the page column, not the whole window. */
  #alerts { padding-left: calc(224px + var(--gutter)); }
  #nav { position: sticky; top: var(--chrome-h, 56px); bottom: auto; grid-row: 2; align-self: start; flex-direction: column; gap: 2px; height: calc(100vh - var(--chrome-h, 56px)); padding: var(--s4) var(--s3); background: var(--sidebar); border-top: 0; border-right: 1px solid var(--border); }
  #nav .nav-group { display: block; padding: var(--s4) var(--s3) var(--s1); }
  #nav .nav-group:first-child { padding-top: 0; }
  #nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: var(--s3); min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-md); font-size: 15px; }
  #nav a svg { width: 18px; height: 18px; }
  #nav a::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 2px; height: auto; border-radius: 2px; }
  #nav a:hover { background: var(--surface-2); color: var(--fg); }
  #nav a[aria-current="page"] { background: var(--hud-a10); color: var(--hud); }
  #nav a.extra { display: flex; }
  #nav a.more { display: none; }
  main { width: 100%; padding-top: var(--s5); }
}

.page > div:empty { display: none; }
/* ---------- Page head ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); padding: var(--s1) 0 var(--s1); }
.page-head > .titles { flex: 1 1 260px; min-width: 0; }
.page-head > .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.page-head h1 { overflow-wrap: anywhere; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--pad); min-width: 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.card-head h2 { margin: 0; flex: 1 1 auto; }
.narrow { max-width: 440px; width: 100%; justify-self: center; }
.section + .section { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.section > .kicker { margin-bottom: var(--s1); }
/* HUD corner brackets: four amber L-corners from gradients, no markup. */
.hud-frame {
  background:
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) top left / 14px 2px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) top left / 2px 14px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) top right / 14px 2px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) top right / 2px 14px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) bottom left / 14px 2px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) bottom left / 2px 14px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) bottom right / 14px 2px no-repeat,
    linear-gradient(var(--frame, var(--hud)), var(--frame, var(--hud))) bottom right / 2px 14px no-repeat,
    var(--card);
}

details.card > summary, details.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2); min-height: 48px; margin: calc(var(--s2) * -1) 0; font: 600 18px var(--display); }
details.disclosure > summary { font: 600 15px var(--sans); color: var(--muted-strong); margin: 0; min-height: 44px; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary::after, details.disclosure > summary::after { content: ""; width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--hud); border-bottom: 2px solid var(--hud); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--ease); flex: none; }
details.disclosure > summary::after { margin-left: 4px; }
details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.card[open] > summary { margin-bottom: var(--s3); }
details.card > summary > h2 { margin: 0; font: inherit; } /* a summary that is a heading looks like every other */
details.disclosure[open] > summary { color: var(--fg); }

/* ---------- Forms ---------- */
/* Forms never stretch across a laptop: a field, or a row or pair of them, is at most about 60 characters wide. */
.field, .row:has(> .field), .pair { max-width: 36rem; }
.field { display: grid; gap: 6px; margin: var(--s3) 0; min-width: 0; }
.field > span { font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.field > small { font-size: 13px; }
input, select, textarea { background: var(--sidebar); color: var(--fg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; min-height: 48px; font: inherit; width: 100%; max-width: 100%; transition: border-color var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--hud); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select { appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb020' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
textarea { min-height: 96px; resize: vertical; }
/* Styled like every other control (round 10): the field fill and 3:1 edge, 28 px for gloves, amber with a dark tick when
   on. Forced colors get the native box back. One rule (round 11: a second, 22 px one above it was dead weight). */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; min-height: 0; flex: none; margin: 0; padding: 0; cursor: pointer; display: inline-grid; place-content: center; background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-sm); }
input[type=checkbox]:checked { background: var(--hud); border-color: var(--hud); }
input[type=checkbox]:checked::after { content: ""; width: 13px; height: 7px; border: solid var(--hud-fg); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
@media (forced-colors: active) { input[type=checkbox] { appearance: auto; -webkit-appearance: auto; } input[type=checkbox]:checked::after { content: none; } }
/* An action in flight (button() sets aria-busy): further presses are ignored, and the cursor says so. */
button[aria-busy="true"] { cursor: progress; }
input[type=color] { width: 72px; padding: 4px; cursor: pointer; }
input[type=range] { padding: 0; border: 0; background: none; min-height: 48px; cursor: pointer; }
input[type=number] { font-family: var(--mono); }
.check { display: flex; gap: var(--s3); align-items: center; min-height: 48px; cursor: pointer; }
.check.show-pass { margin: calc(var(--s2) * -1) 0 0; font-size: 15px; color: var(--muted-strong); }
.row { display: flex; gap: var(--s2) var(--s3); flex-wrap: wrap; align-items: flex-end; }
.row.center { align-items: center; }
.row > .field { flex: 1 1 150px; margin: var(--s2) 0; }
.row > .field.short { flex: 0 1 120px; }
.row:has(> .field) > button, .row:has(> .field) > .btn { min-height: 48px; margin-bottom: var(--s2); }
.row.actions { margin-top: var(--s4); }
.grow { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); }
.pair > .field { margin: var(--s2) 0; }
.stack-btns { display: grid; gap: var(--s2); }
@media (min-width: 600px) { .stack-btns { display: flex; flex-wrap: wrap; } .stack-btns > .btn { flex: 1 1 auto; } }
/* Welcome's Jump in: two equal columns (they were two widths); an odd last button spans both, so four make a 2 × 2. */
@media (min-width: 600px) { .stack-btns.jump { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .stack-btns.jump > :last-child:nth-child(odd) { grid-column: 1 / -1; } .stack-btns.jump > .btn { text-align: center; text-wrap: balance; } }
.run-total { display: grid; text-align: right; }
.run-total > .mono { font-weight: 700; }
/* Pilot page: the times are the page's data, so they read a step above the names (round 9). */
.rowlink > .stack.end > .mono.b, .run-total > .mono { font-size: 20px; font-variant-numeric: tabular-nums; }
.run-total > .meta { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
label.btn:focus-within { outline: 2px solid var(--hud); outline-offset: 2px; }

@media (max-width: 480px) { .row.stack-narrow > .field { flex-basis: 100%; } }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
/* Pilot color: the eight palette swatches as radios, with Custom for the browser's picker. */
.swatches { border: 0; margin: var(--s2) 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 36rem; }
.swatches > legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.swatches > .swatch-hint { flex: 1 0 100%; margin: 2px 0 0; }
.swatch { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 2px solid transparent; border-radius: var(--r-md); cursor: pointer; }
.swatch > input { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); max-width: none; min-height: 0; margin: 0; opacity: 0; cursor: pointer; } /* covers the 2 px edge: the whole 44 px is the target */
.swatch > .chip-colour { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .35); }
.swatch:has(> input:checked), .swatch.custom.on { border-color: var(--hud); background: var(--hud-a10); }
.swatch:has(> input:focus-visible) { outline: 2px solid var(--hud); outline-offset: 2px; }
.swatch.taken::after { content: ""; position: absolute; left: 50%; top: 5px; bottom: 5px; width: 3px; border-radius: 2px; background: var(--fg); box-shadow: 0 0 0 1px var(--bg); transform: translateX(-50%) rotate(45deg); pointer-events: none; } /* taken: a slash across the color (the corner dot read as a badge) */
.swatch.custom { padding: 0 12px; background: var(--surface-2); border-color: var(--border); font-weight: 600; font-size: 14px; color: var(--muted-strong); }
.swatch.custom.on { color: var(--hud); }

/* ---------- Buttons ---------- */
button, .btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 8px 16px; border: 1px solid transparent; border-radius: var(--r-md); background: var(--hud); color: var(--hud-fg); font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color var(--ease), filter var(--ease), border-color var(--ease), color var(--ease); -webkit-tap-highlight-color: transparent; }
button:hover, .btn:hover { filter: brightness(1.08); }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button.ghost, .btn.ghost { background: transparent; color: var(--fg); border-color: var(--border); }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); filter: none; }
button.danger, .btn.danger { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); border-color: var(--danger); }
/* Hover deepens the tint only to 14 %, where danger text still reads at 4.6:1 (20 % was 4.26:1). */
button.danger:hover, .btn.danger:hover { background: color-mix(in srgb, var(--danger) 14%, var(--card)); filter: none; }
button.quiet { background: transparent; color: var(--muted-strong); border-color: transparent; }
button.quiet:hover { background: var(--surface-2); color: var(--fg); filter: none; }
/* Destructive, two tiers: irreversible is .danger (tint and edge); reversible (retire, archive, remove from the map) is .quiet.danger. */
button.quiet.danger { background: transparent; border-color: transparent; color: var(--danger); }
button.quiet.danger:hover { background: color-mix(in srgb, var(--danger) 12%, var(--card)); }
button.danger.solid { background: var(--danger); color: var(--hud-fg); }
button.danger.solid:hover { background: var(--danger); filter: brightness(1.08); }
button.lg, .btn.lg { min-height: 56px; font-size: 18px; padding: 10px 22px; }
button.block, .btn.block { width: 100%; }
/* Disabled is readable (muted text, 6.2:1 on a card), never a faded copy of the live button: the stale Abort is the
   one control a pilot needs explained at the moment it is dead. Round 9: it no longer passes for a live ghost button
   either. No fill, a faint hatch and the weak --line edge (live controls have the 3:1 --border), and hover does nothing.
   (The Callouts toggle's dashed edge means "off", not "unavailable".) */
button:disabled, button:disabled:hover { opacity: 1; cursor: not-allowed; filter: none; color: var(--muted); border-color: var(--line); background: repeating-linear-gradient(135deg, transparent 0 7px, rgb(138 151 171 / .07) 7px 14px); }
button.quiet:disabled { background: transparent; border-color: transparent; }
button.mute svg { width: 20px; height: 20px; flex: none; }
/* Callouts On / Off: the state word is a small tag, lime when on. Off is quiet, never the loudest thing on the
   card: a dashed gray edge, gray words and the crossed speaker. */
button.mute { white-space: nowrap; }
button.mute > .state { min-width: 3.2ch; padding: 1px 6px; border: 1px solid currentColor; border-radius: var(--r-sm); font: 700 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
button.mute[aria-pressed="false"] { color: var(--muted-strong); border-color: var(--muted); border-style: dashed; }
button.mute[aria-pressed="false"] > .state { color: var(--muted-strong); }
/* Segmented control: pressed is a fill, focus is the outline. They never look alike. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: calc(var(--r-md) + 4px); max-width: 100%; }
.seg > button { background: transparent; color: var(--muted-strong); border-color: transparent; flex: 1 1 auto; }
.seg > button:hover { background: var(--surface-3); color: var(--fg); filter: none; }
.seg > button[aria-pressed="true"] { background: var(--hud-a10); color: var(--hud); border-color: var(--hud); }
.seg.full { display: flex; width: 100%; }
.seg.full > button { flex: 1 1 0; }
/* Gate palette buttons in the editor share the pressed language. */
.palette { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }
.palette > button[aria-pressed="true"] { background: var(--hud-a10); color: var(--hud); border-color: var(--hud); }
.palette > .gate-pick { display: inline-flex; align-items: center; gap: var(--s2); padding-left: var(--s2); }
.palette > .gate-pick .gnum { min-width: 34px; height: 26px; }

/* ---------- Lists ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; min-height: 56px; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list > li > .empty, .list > li > .state { flex: 1 1 100%; }
a.rowlink { display: flex; align-items: center; gap: var(--s3); min-height: 56px; margin: calc(var(--s2) * -1) 0; padding: var(--s2) var(--s1); flex: 1 1 200px; min-width: 0; color: var(--fg); text-decoration: none; border-radius: var(--r-md); transition: background-color var(--ease); }
a.rowlink:hover { background: var(--surface-2); }
a.rowlink::after { content: ""; width: 8px; height: 8px; margin-left: auto; margin-right: 6px; border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg); flex: none; }
a.rowlink:hover::after { border-color: var(--hud); }
a.rowlink .name { font-weight: 600; overflow-wrap: anywhere; }
a.rowlink .meta { color: var(--muted); font: 500 13px var(--mono); }
a.rowlink .stack { display: grid; gap: 2px; min-width: 0; }
a.rowlink svg { width: 20px; height: 20px; color: var(--muted-strong); flex: none; }
.list.boxed > li { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); margin-bottom: var(--s2); }
.actions-row { display: flex; flex-wrap: wrap; gap: var(--s2); width: 100%; }
/* A track's actions: one row on a laptop; on a phone Race is full width, the ghosts two to a row, Archive last. */
.track-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
@media (max-width: 599px) {
  .track-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track-actions > .btn:not(.ghost), .track-actions > .quiet { grid-column: 1 / -1; }
}
.track-actions > .quiet.danger { margin-left: auto; }
/* A row with its own action (Edit) has no row chevron: one affordance per row. */
.list > li:has(> button) > a.rowlink::after { display: none; }

/* ---------- States ---------- */
.empty { border: 1px dashed var(--line); border-radius: var(--r-md); padding: var(--s5) var(--s4); text-align: center; color: var(--muted); }
.empty > p { margin: 0 0 var(--s3); }
.empty > p:last-child { margin: 0; }
.skeleton { display: grid; gap: 10px; padding: var(--s2) 0; }
.skeleton > span { display: block; height: 18px; border-radius: var(--r-sm); background: var(--surface-2); animation: shimmer 1.4s ease-in-out infinite; }
.skeleton > span:nth-child(2) { width: 82%; animation-delay: .15s; }
.skeleton > span:nth-child(3) { width: 64%; animation-delay: .3s; }
@keyframes shimmer { 50% { opacity: .45; } }
.banner { --tone: var(--hud); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0; padding: var(--s3) var(--s4); border: 1px solid var(--tone); border-left-width: 4px; border-radius: var(--r-md); background: color-mix(in srgb, var(--tone) 10%, var(--card)); color: var(--fg); }
.banner > p { margin: 0; }
.banner .grow { flex: 1 1 220px; }
.banner.danger { --tone: var(--danger); }
.banner.signal { --tone: var(--signal); }
.banner.lime { --tone: var(--lime); }
.banner b { color: var(--tone); }
.banner a { color: var(--fg); font-weight: 600; }
.secret { font: 700 22px var(--mono); color: var(--hud); user-select: all; margin: var(--s1) 0; overflow-wrap: anywhere; }
/* A login phrase: three words that never break inside (a third word like sprint-finish stays whole), with spaced,
   muted hyphens between them, so it can't be misread as four words. The line wraps between words only. */
.secret.phrase { font-size: 26px; line-height: 1.35; }
.secret.phrase > .phrase-unit { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
.secret.phrase .phrase-sep { color: var(--muted); margin: 0 .3em; font-weight: 400; }
/* The Pi didn't answer the first call: no tabs, since none of them can open anything yet. */
body.unreachable #nav, body.unreachable #who { display: none; }
body.unreachable { padding-bottom: 0; }
body.unreachable main { grid-column: 1 / -1; }
/* A fresh Pi before its admin exists: no tabs and no Log in either, since every one led to an empty page. */
body.setup-pending #nav, body.setup-pending #who { display: none; }
body.setup-pending { padding-bottom: 0; }
body.setup-pending main { grid-column: 1 / -1; }
/* Live's held Start with the bridge down: a quiet line, since the page banner above is the one danger block. */
.held-note { margin: var(--s2) 0 0; color: var(--muted-strong); font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: max-content; max-width: min(92vw, 480px); z-index: 6; padding: 12px 16px 12px 18px; background: var(--card); color: var(--fg); border: 1px solid var(--border); border-left: 4px solid var(--signal); border-radius: var(--r-md); box-shadow: 0 8px 24px rgb(0 0 0 / .45); font-weight: 500; }
/* Round 11 (walk 3): a toast is words only, so a tap on it goes through to what is under it (in landscape it landed
   on the "I passed gate" button just tapped, and the next tap hit the toast). */
.toast { pointer-events: none; }
.toast.ok { border-left-color: var(--lime); }
.toast.bad { border-left-color: var(--danger); }
/* The two toast regions never leave the page (screen readers keep watching them): empty, they are invisible. */
.toast:empty { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; box-shadow: none; }
/* Phones: the toast is a line in the sticky chrome under the header, so it never covers the page. */
@media (max-width: 899px) { .toast:not(:empty) { position: static; transform: none; width: auto; max-width: none; padding: 8px var(--gutter); border-width: 0 0 1px; border-left-width: 4px; border-radius: 0; box-shadow: none; font-size: 15px; } }
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) { /* bottom: auto: the base rule's bottom with this top stretched it into a tall box mid-screen (round 9). */
  .toast:not(:empty) { position: fixed; top: calc(var(--chrome-h, 44px) + var(--s2)); bottom: auto; height: auto; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 480px); border-width: 1px 1px 1px 4px; border-radius: var(--r-md); box-shadow: 0 8px 24px rgb(0 0 0 / .45); } }
@media (min-width: 900px) { .toast { bottom: 24px; } }
/* Round 11 (UX 9): a notice no longer wipes an unread error; when both show they stack, the notice above. */
@media (min-width: 900px) { body:has(#toast-alert:not(:empty)) #toast:not(:empty) { bottom: 88px; } }
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) { #toast:not(:empty) + #toast-alert:not(:empty) { top: calc(var(--chrome-h, 44px) + var(--s2) + 56px); } }

/* ---------- Confirm dialog (ui.js confirmDialog) ---------- */
dialog.modal { padding: 0; border: 0; background: transparent; color: var(--fg); width: min(100% - 2 * var(--gutter), 440px); max-width: none; margin: auto; }
dialog.modal::backdrop { background: rgb(5 7 10 / .72); }
.modal-card { background: var(--card); border: 1px solid var(--border); border-top: 4px solid var(--hud); border-radius: var(--r-lg); padding: var(--s5) var(--pad) var(--pad); box-shadow: 0 8px 24px rgb(0 0 0 / .45); }
dialog.modal.danger .modal-card { border-top-color: var(--danger); }
dialog.modal.danger .kicker { color: var(--danger); }
.modal-card h2 { margin: var(--s1) 0 var(--s2); font-size: 22px; overflow-wrap: anywhere; }
.modal-body { color: var(--muted-strong); }
.modal-body > p { margin: 0 0 var(--s2); overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap-reverse; gap: var(--s2) var(--s3); justify-content: flex-end; margin-top: var(--s5); }
.modal-actions > button { flex: 1 1 150px; min-height: 52px; }

/* ---------- Progress ---------- */
/* The track has a 3:1 edge, so an empty (0 %) bar is still visibly a bar; the percentage sits right beside it. */
progress.bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--sidebar); overflow: hidden; color: var(--hud); }
progress.bar::-webkit-progress-bar { background: var(--sidebar); border-radius: var(--r-sm); }
progress.bar::-webkit-progress-value { background: var(--hud); border-radius: var(--r-sm); }
progress.bar::-moz-progress-bar { background: var(--hud); border-radius: var(--r-sm); }
.progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; max-width: 480px; margin: var(--s2) 0; }
.progress > .pct { font: 600 13px var(--mono); color: var(--muted-strong); min-width: 4ch; text-align: right; }
/* Wireless update rows: one shape in every state (head line, then the bar on its own line); cyan while the gate
   restarts and syncs, so a finished download no longer looks like one in progress. */
.ota-row > .progress { flex: 1 1 100%; max-width: none; margin: 0; }
.ota-row.syncing progress.bar { color: var(--signal); }
.ota-row.syncing progress.bar::-webkit-progress-value { background: var(--signal); }
.ota-row.syncing progress.bar::-moz-progress-bar { background: var(--signal); }

/* ---------- Page layouts (design-spec.md §15: one measure per page) ---------- */
/* Forms cap their fields at 36rem; a form-only card caps there too, so a laptop shows no empty right half. */
.card.form-card { max-width: calc(36rem + 2 * var(--pad) + 2px); }
/* A short list (a name, a tag, Edit) doesn't stretch its name 900 px away from its button on a laptop. */
.card.list-card { max-width: calc(48rem + 2 * var(--pad) + 2px); }
/* Round 8: one measure per page, so a column of cards never steps in and out on a laptop.
   - .page.measure (Users, Pilots): the whole column, head included, is one list width; every card fills it.
   - .page.measure.forms (Me): all forms, so the column is one form width.
   - .duo: two cards that belong together (a list and its Add form; Add a board and Boards plugged into the Pi;
     Light test and Simulated passes). Stacked full width, side by side from 1200 px, with equal heights. A hidden
     card takes no column, so its partner fills the row.
   - .page.editor (track editor): from 1200 px, Details and More tools are a side column beside the map.
   Everything else (Gates, Debug, Tracks, the editor below 1200 px) is full width. */
.page.measure { --measure: calc(48rem + 2 * var(--pad) + 2px); max-width: var(--measure); }
.page.measure.forms { --measure: calc(36rem + 2 * var(--pad) + 2px); }
.page.measure .card, .duo > .card, .page.editor .card { max-width: none; }
.duo { display: grid; gap: var(--s4); min-width: 0; }
.duo > * { min-width: 0; }
/* Two cards sharing one side of a .duo (Users: Add a user over Add a guest), spaced like the page's cards. */
.duo-col { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 1200px) {
  .duo { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .page.measure:has(> .duo) { max-width: none; }
  /* Row 3 is 1fr: the tall map's extra height lands under More tools, not between Details and More tools (round 9
     shared it across both auto rows and opened a 270 px gap in the side column). */
  .page.editor { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; }
  .page.editor > * { grid-column: 1 / -1; }
  .page.editor > .ed-details { grid-column: 1; grid-row: 2; }
  /* The map stays in view while the side column scrolls (sticky-map.js sets --sticky-top: under the chrome, or with
     its foot on screen when the card is taller than the window). It sticks inside its own column: it covers nothing. */
  .page.editor > .ed-map { grid-column: 2; grid-row: 2 / span 2; position: sticky; top: var(--sticky-top, calc(var(--chrome-h, 56px) + var(--s5))); }
  .page.editor > .ed-tools { grid-column: 1; grid-row: 3; margin-bottom: var(--sticky-pad, 0px); }
  /* Round 11: the map is no taller than lets the whole card (map to Save) fit under the chrome (sticky-map.js mapCap). */
  .page.editor > .ed-map .map { max-height: var(--map-max, 70vh); }
}

/* ---------- Race HUD ---------- */
.live-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.live-grid > * { min-width: 0; }
@media (min-width: 1100px) {
  .live-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr; grid-template-areas: "race map" "splits map" "start map"; align-items: start; }
  .live-grid > .race-card { grid-area: race; }
  .live-grid > .splits-card { grid-area: splits; }
  .live-grid > .start-card { grid-area: start; }
  .live-grid > .map-card { grid-area: map; position: sticky; top: calc(var(--chrome-h, 56px) + var(--s5)); }
  .live-grid:has(> .map-card[hidden]) { grid-template-columns: minmax(0, 760px); grid-template-areas: "race" "splits" "start"; }
}
/* Race state is the card's whole look: frame brackets, a top band and the timer color all follow it. */
.race-card { --state: var(--muted); --frame: var(--state); border-top: 4px solid var(--state); }
/* GO (2 s after green): a thick lime band and, on Live, a bigger chip, so the moment can't be missed. Static: no motion. */
.race-card[data-go] { border-top-width: 10px; }
.race-card[data-go]:not(.tv-panel) .chip.go { font-size: 20px; min-height: 40px; padding: 4px 18px; letter-spacing: .16em; box-shadow: 0 0 0 4px rgb(163 230 53 / .28); }
/* The race card is one frame: its tiles are fills on --sidebar, not boxes in the box (uav keeps hard edges for controls). */
.race-card .tile { border-color: transparent; }
.race-card[data-state="armed"], .race-card[data-state="countdown"] { --state: var(--hud); }
.race-card[data-state="running"] { --state: var(--lime); }
.race-card[data-state="finished"] { --state: var(--signal); }
.race-card[data-state="aborted"] { --state: var(--danger); }
.race-card .timer, .race-card .tv-timer { color: var(--state); }
.race-card[data-state="idle"] .timer, .race-card[data-state="idle"] .tv-timer { color: var(--muted-strong); }
.race-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
/* The state chip and Callouts share the top row; the pilot's name gets a row of its own, never squeezed. */
.race-pilot { font: 600 20px var(--display); order: 3; flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.race-top .mute { margin-left: auto; }
.splits-card .splits { margin-top: 0; }
@media (max-width: 599px) {
  /* Phones: the tab bar already says "Live"; the h1 stays for screen readers, and the race card moves up. */
  .live-head .page-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live-head { display: contents; }
}
.timer { font: 700 56px/1.05 var(--mono); font-variant-numeric: tabular-nums; color: var(--hud); margin: var(--s3) 0 var(--s4); letter-spacing: -.02em; }
@media (max-width: 359px) { .timer { font-size: 44px; } }
@media (min-width: 600px) { .timer { font-size: 80px; } }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: 0 0 var(--s4); }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .live-grid .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Readouts size to their own box (container units), so a 6-digit time never truncates. */
.tile { background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; min-width: 0; container-type: inline-size; }
.tile > .label { display: block; font: 600 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-strong); }
@media (max-width: 899px) { .tile > .label { font-size: 14px; } } /* round 11 (UX 6): read outdoors at arm's length */
.tile > .value { display: block; font: 700 min(28px, 24cqi)/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.tile.next.has > .value { color: var(--lime); }
.stale { margin: 0 0 var(--s3); }

.splits { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.splits:empty { display: none; }
.splits > li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: var(--s3); align-items: center; min-height: 36px; padding: 4px 8px; border-radius: var(--r-sm); font-size: 15px; }
.splits > li > .t { font: 600 15px var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.splits > li > .l { font: 600 12px var(--mono); letter-spacing: .08em; color: var(--muted-strong); text-transform: uppercase; }
.splits > li > .what { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; color: var(--muted-strong); }
.splits > li.lap { background: var(--surface-2); }
.splits > li.lap > .what, .splits > li.lap > .t { color: var(--fg); font-weight: 700; }
.splits > li.pb > .t { color: var(--lime); }
.splits > li.warn > .what { color: var(--fg); }
.splits .chip { min-height: 22px; font-size: 12px; padding: 1px 7px; }

/* Live race card */
.race-card[data-stale] { --state: var(--muted); }
.race-card[data-stale] .timer, .race-card[data-stale] .tv-timer, .race-card[data-stale] .tile.next.has > .value { color: var(--muted); }
.race-result { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: calc(var(--s2) * -1) 0 var(--s4); font: 600 16px var(--mono); color: var(--fg); }
.race-result .chip { min-height: 26px; }
@media (max-width: 599px) {
  /* Between runs a phone shows the clock and Start, not four empty readouts. */
  .race-card[data-state="idle"] .tiles { display: none; }
}
@media (max-width: 1099px) {
  /* Between runs (phone and narrow laptop): race card, then the start form, then the map. */
  .live-grid[data-active="false"] > .race-card { order: -2; }
  .live-grid[data-active="false"] > .start-card { order: -1; }
  /* Signed out: watching, not racing. The race card, the map and the splits come first; "Log in to race" last. */
  .live-grid[data-active="false"][data-guest="true"] > .start-card { order: 1; }
  /* The Start button stays in reach at the bottom of the screen while the form is open. */
  .start-card[open] > .start-actions { position: sticky; bottom: var(--s3); z-index: 2; margin: var(--s4) calc(var(--pad) * -1) calc(var(--pad) * -1); padding: var(--s3) var(--pad); background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -14px 14px -10px rgb(0 0 0 / .55); }
/* The shadow says the Start row floats over the form (a field behind it scrolls out), not that it cut a field off. */
}
@media (max-width: 899px) { .start-card[open] > .start-actions { bottom: calc(var(--tabbar) + 1px + env(safe-area-inset-bottom, 0px)); } }
/* A field focused mid-form scrolls clear of the sticky Start row too, not just the tab bar. */
@media (max-width: 1099px) { html:has(.live-grid[data-active="false"] .start-card[open]) { scroll-padding-bottom: calc(var(--nav-clear) + 96px); } }

/* ---------- Map ---------- */
.mapbox { width: 100%; overflow: hidden; border-radius: var(--r-md); }
/* Touch over a map. Live and TV maps offer no zoom of their own: a finger scrolls the page and a pinch zooms the
   page, as on any picture. A track's page zooms its map with two fingers (enableZoom): one finger still scrolls the
   page up and down, the pinch goes to the map. Only the editor's map takes every touch (drag a gate). */
.map { --u: .03; --k: 1; width: 100%; height: auto; max-height: 70vh; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.mapbox.zoomable .map { touch-action: pan-y; max-height: 80vh; } /* the track page's map fills its card's width at 1280 × 800, not letterboxed */
@media (min-width: 900px) { .mapbox.zoomable .map { --k: 1.3; } } /* an 860 px map: words a size up, not specks */
.zoom-btns { display: flex; gap: var(--s1); }
.zoom-btns > .zoom-btn { min-width: 44px; padding: 0; font: 700 20px/1 var(--mono); }
@media (max-width: 420px) { .map-legend { gap: 6px 12px; font-size: 13px; } } /* the four keys stay on one line at 390 */
.mapbox.edit .map { touch-action: none; }
.map-area { fill: var(--sidebar); stroke: var(--border); stroke-width: calc(var(--u) * 1.5px); }
.map-grid line { stroke: var(--grid); stroke-width: calc(var(--u) * 1px); }
.map-route line { stroke: var(--slate); stroke-width: calc(var(--u) * 2px); stroke-dasharray: calc(var(--u) * 8px) calc(var(--u) * 6px); }
.map-step { fill: var(--muted-strong); font: 600 calc(var(--u) * 13px * var(--k)) var(--mono); text-anchor: middle; paint-order: stroke; stroke: var(--sidebar); stroke-width: calc(var(--u) * 4px); stroke-linejoin: round; }
.map-arrowhead { fill: var(--slate); }
.map-hit { fill: transparent; cursor: pointer; }
.map-ring { stroke: var(--signal); stroke-width: calc(var(--u) * 6px); stroke-linecap: round; }
.map-dir { stroke: var(--fg); stroke-width: calc(var(--u) * 2px); }
.map-label { fill: var(--fg); font: 700 calc(var(--u) * 14px * var(--k)) var(--display); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: var(--sidebar); stroke-width: calc(var(--u) * 4px); stroke-linejoin: round; }
.map-gate.next .map-ring { stroke: var(--lime); stroke-width: calc(var(--u) * 7px); }
.map-halo { stroke: var(--lime); stroke-width: calc(var(--u) * 20px); stroke-linecap: round; opacity: .5; animation: halo-pulse 1.2s ease-out infinite; }
.map-gate.next .map-label { fill: var(--lime); }
.map-gate.cleared .map-ring { stroke: var(--hud); }
.map-gate.cleared .map-label { fill: var(--hud); }
.map-gate.offline .map-ring { stroke: var(--muted); stroke-dasharray: calc(var(--u) * 6px) calc(var(--u) * 5px); }
.map-gate.selected .map-hit { stroke: var(--hud); stroke-width: calc(var(--u) * 2px); stroke-dasharray: calc(var(--u) * 5px) calc(var(--u) * 4px); }
@keyframes halo-pulse { from { opacity: .55; } to { opacity: 0; } }
.item-fill { fill: var(--orange); } .item-pole { stroke: var(--fg); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.item-pad { fill: rgb(163 230 53 / .2); stroke: var(--lime); stroke-width: calc(var(--u) * 1.5px); }
.item-wall { stroke: var(--muted-strong); stroke-width: calc(var(--u) * 8px); stroke-linecap: round; }
.item-zone { fill: rgb(242 85 90 / .18); stroke: var(--danger); stroke-width: calc(var(--u) * 1.5px); stroke-dasharray: calc(var(--u) * 6px) calc(var(--u) * 4px); }
.item-text { fill: var(--fg); font: 700 calc(var(--u) * 13px * var(--k)) var(--sans); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: var(--sidebar); stroke-width: calc(var(--u) * 4px); stroke-linejoin: round; }
.map-scale line { stroke: var(--fg); stroke-width: calc(var(--u) * 2px); }
.map-scale-text { fill: var(--muted-strong); font: 600 calc(var(--u) * 12px * var(--k)) var(--mono); text-anchor: middle; dominant-baseline: middle; }
.map-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2) var(--s4); margin-top: var(--s2); font: 500 14px var(--mono); color: var(--muted-strong); }
/* Live is read at arm's length mid-run: its map words are a size up from the editor's. */
.map-card .map { --k: 1.15; }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
/* A frozen run (link lost): the map dims and stops pulsing with the gray clock; the legend says it is old. */
.map-legend > .stale-note { display: none; color: var(--danger); }
.map-card.stale .map-legend > .stale-note, .tv-right.stale .map-legend > .stale-note { display: inline-flex; }
.map-card.stale .mapbox, .tv-right.stale .mapbox, .tv-right.stale > .tv-board { opacity: .65; } /* dim, but leg labels and the board header keep 3:1 */
.map-card.stale .map-halo, .tv-right.stale .map-halo { animation: none; opacity: 0; }
.map-legend i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; }
.map-legend .sw-next { background: var(--lime); box-shadow: 0 0 0 3px rgb(163 230 53 / .3); }
.map-legend .sw-wait { background: var(--signal); }
.map-legend .sw-cleared { background: var(--hud); }
.map-legend .sw-offline { background: linear-gradient(90deg, var(--muted) 0 40%, transparent 40% 60%, var(--muted) 60%); } /* two dashes at any size (the 5 px period read as ticks on TV) */
/* The obstacle key (tracks.js propsKey): one small mark per kind, drawn the way the map draws it. */
.props-key i { width: 14px; height: 14px; border-radius: 0; }
.props-key .k-cone { background: var(--orange); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.props-key .k-flag { background: linear-gradient(var(--fg), var(--fg)) 0 0 / 2px 100% no-repeat, linear-gradient(var(--orange), var(--orange)) 2px 0 / 10px 7px no-repeat; }
.props-key .k-wall { height: 5px; background: var(--muted-strong); border-radius: 3px; }
.props-key .k-zone { background: rgb(242 85 90 / .18); border: 1.5px dashed var(--danger); }
.props-key .k-pad { background: rgb(163 230 53 / .2); border: 1.5px solid var(--lime); }

/* Flying order */
.order { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.order > .stop { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); font: 600 14px var(--mono); }
.order > .stop.start { border-color: var(--hud); color: var(--hud); }
.order > .stop small { font-size: 12px; letter-spacing: .1em; color: var(--muted-strong); }
.order > .sep { color: var(--muted); font: 600 14px var(--mono); }

/* Live map: the card names the track; between runs a tag says whether it is the next run's or the last run's. */
.map-card .card-head h2 { overflow-wrap: anywhere; }
.map-tag { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px 8px; white-space: nowrap; }
.mapbox:focus-visible { outline-offset: 3px; }
/* ---------- Leaderboards ---------- */
.boards-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); align-items: start; }
/* Time trial: one table per lap count; from 1200 px two a row (a half table hides When, like Best lap). */
.trial-groups { display: grid; gap: var(--s2) var(--s5); }
.trial-group { min-width: 0; }
/* A hidden column keeps its <col> width in a fixed table: zero it, so Time and Gap sit at the card's right edge. */
@media (min-width: 1200px) { .boards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .boards-grid > .card:not(.wide) { display: flex; flex-direction: column; } /* an empty half fills its height */
  .boards-grid > .card:not(.wide) > .empty { flex: 1 1 auto; display: grid; place-content: center; }
  /* An empty half keeps its own height (a one-line empty state), so it isn't a 250 px dashed void beside a full table. */
  .boards-grid > .card:not(.wide):has(> .empty) { align-self: start; }
  .boards-grid > .card:not(.wide) > .empty { flex: none; }
  .trial-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trial-group .board .when { display: none; } .trial-group .board .c-when { width: 0; } .boards-grid > .wide { grid-column: 1 / -1; } .boards-grid > :not(.wide) .board .when { display: none; } .boards-grid > :not(.wide) .board .c-when { width: 0; }
  /* Half-width tables drop Gap too, so Time is the right-hand column in every table on the page. */
  .boards-grid > :not(.wide) .board .gap { display: none; } .boards-grid > :not(.wide) .board .c-gap { width: 0; } }
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; }
.filters > .field { margin: 0; flex: 1 1 220px; }
.filters > .seg { flex: 1 1 300px; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.board { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.board th, .board td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board td { height: 52px; }
.board th { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); padding-top: 0; }
.board .c-rank { width: 3.5rem; }
.board .c-time { width: 7rem; }
.board .c-gap { width: 6.5rem; }
.board .c-when { width: 10.5rem; }
.board th.when, .board td.when { padding-left: var(--s5); }
.board th.num, .board td.num { text-align: right; }
.board td.time { font: 700 19px var(--mono); color: var(--fg); }
.board tbody tr.p1 td.time { color: var(--hud); } /* P1's row, whatever its place in the table (P4 under the podium) */
.board td.gap { font: 500 14px var(--mono); color: var(--muted-strong); }
.board td.when { font-size: 13px; color: var(--muted); }
.board .pilot { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* The name link fills the rest of the cell, so even "Al" is a 44 px+ target. */
.board .pilot a { display: flex; align-items: center; flex: 1 1 auto; min-width: 44px; min-height: 44px; color: var(--fg); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: var(--r-sm); }
.board .pilot a:hover { background: var(--surface-2); }
/* The name is its own flex child: an anonymous text item never gets an ellipsis, so long names were cut silently. */
.board .pilot a > .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pilot .pbar { height: 28px; min-height: 0; align-self: center; }
.board td.time .sub-gap { display: none; }
/* A phone: no When, and no Gap column (a name like "admin" read "ad…" beside the avatar); the gap is a small second
   line under the time, so the name gets the freed room. */
@media (max-width: 480px) { .board .when { display: none; } .board .c-when { width: 0; } .board .c-time { width: 5.25rem; } .board .gap { display: none; } .board .c-gap { width: 0; } .board td.time .sub-gap { display: block; font: 500 12px/1.2 var(--mono); color: var(--muted-strong); } .board .c-rank { width: 2.75rem; }
  .board th, .board td { padding-inline: 6px; } /* "12.345" and a 32 px rank still fit; a 12-letter name shows whole at 360 */
}
@media (max-width: 480px) { .board .pilot { gap: 6px; } .board .pilot .avatar.sm { width: 24px; height: 24px; } }

/* Leaderboards podium: three steps over the podium art; the words sit on the steps (scrim .88). */
.podium .card-head { margin-bottom: var(--s3); }
.podium-when { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); }
.podium-stage { position: relative; display: flex; align-items: flex-end; min-height: 176px; padding: var(--s3) var(--s3) 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sidebar); }
.podium-stage > .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: var(--s2); width: 100%; max-width: 720px; margin: 0 auto; padding: 0; list-style: none; }
.step { display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 0; padding: var(--s3) var(--s2) var(--s4); text-align: center; background: rgb(16 21 30 / .88); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; }
.step.pos1 { grid-column: 2; grid-row: 1; min-height: 132px; border-color: var(--hud); border-top-width: 3px; }
.step.pos2 { grid-column: 1; grid-row: 1; min-height: 112px; }
.step.pos3 { grid-column: 3; grid-row: 1; min-height: 96px; }
.step .pname { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 0 4px; color: var(--fg); font-weight: 600; text-decoration: none; border-radius: var(--r-sm); }
.step .pname:hover { background: var(--surface-2); }
.step .pname > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .pbar { height: 20px; min-height: 0; align-self: center; }
.step .ptime { font: 700 19px var(--mono); color: var(--fg); }
.step.pos1 .ptime { font-size: 23px; color: var(--hud); }
@media (min-width: 600px) { .podium-stage { min-height: 210px; padding: var(--s4) var(--s5) 0; } .step.pos1 { min-height: 150px; } .step.pos2 { min-height: 124px; } .step.pos3 { min-height: 106px; } }
/* Round 11: P4 onwards carry on under the steps, in the same card (no thin half card beside Best 3). */
.podium .next-up > h3 { margin: var(--s5) 0 var(--s3); font: 600 16px/1.2 var(--display); letter-spacing: .01em; color: var(--fg); } /* a heading, not a second mono label on the table head */
.card.empty-line > h2 { margin-bottom: var(--s1); }
.card.empty-line > p { margin: 0; }
/* Leaderboards: a refresh after a run stamps the filters card; the stamp glows lime for a moment, then rests muted. */
.board-updated { flex: 1 1 100%; margin: 0; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-strong); }
.board-updated.fresh { animation: board-fresh 2.4s ease-out; }
@keyframes board-fresh { from { color: var(--lime); text-shadow: 0 0 10px color-mix(in srgb, var(--lime) 45%, transparent); } to { color: var(--muted-strong); text-shadow: none; } }

/* ---------- Charts ---------- */
.chart { width: 100%; max-width: 560px; height: auto; display: block; margin: var(--s3) 0; }
.chart polyline { fill: none; stroke: var(--hud); stroke-width: 2; }
.chart circle { fill: var(--hud); }
.chart circle.invalid { fill: var(--card); stroke: var(--muted); stroke-width: 2; }
.chart circle.best { fill: var(--lime); }
.chart text { fill: var(--muted-strong); font: 12px var(--mono); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); }

/* ---------- Admin ---------- */
.gate-row { display: grid !important; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
.gate-row > .head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.gate-row > .head .name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.gstatus { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gate-row .mac { font: 500 13px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
/* The gate's name leads its row, and on a laptop its status sits right after it, not 600 px away. */
.gate-row > .head .name:not(.mono) { font: 600 18px/1.2 var(--display); }
@media (min-width: 900px) { .gate-row > .head .name { flex: 0 1 auto; } }
.gate-row .row-ota-why { margin: 0; }
.gate-row .row-ota-why:empty { display: none; }
.user-row { display: grid !important; gap: var(--s2); grid-template-columns: minmax(0, 1fr); }
.user-row > .head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.user-row > .head b { font-size: 17px; margin-right: var(--s1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row > .ctl { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: flex-start; }
/* Actions, opened: one full-width column on a phone; one row on a laptop with Delete set apart at the end. */
.user-row .disclosure[open] { flex: 1 1 100%; }
.user-acts { display: grid; gap: var(--s2); margin-top: var(--s2); }
.user-acts > button { width: 100%; }
@media (min-width: 600px) { .user-acts { display: flex; flex-wrap: wrap; } .user-acts > button { width: auto; } .user-acts > :last-child { margin-left: auto; } }
/* A role pick is a draft until Save: Not saved, Save role and Keep appear beside the select only while it differs. */
.user-row .role-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); flex: 0 1 auto; }
.user-row .role-ctl > select { flex: 0 1 160px; width: auto; }
.user-row details { flex: 1 1 200px; }
/* Round 11 (design 6): Actions reads as a control of the select's weight: a ghost-button edge, 48 px, the same radius. */
.user-row details.disclosure > summary { width: fit-content; min-height: 48px; padding: 0 var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg); }
.user-row details.disclosure > summary:hover { background: var(--surface-2); }
/* Track editor: the selected gate's tools sit under the map as one toolbar. */
.gate-tools { display: grid; gap: var(--s2); margin: var(--s3) 0 0; padding: var(--s3); background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-md); }
.gate-tools-head { display: flex; align-items: center; gap: var(--s3); margin: 0; }
/* One-shot actions (rotate, point, flash) are plain ghost buttons; Remove, reversible, sits apart at the end. */
.gate-tools .gate-acts svg { width: 18px; height: 18px; flex: none; }
.gate-tools .gate-acts > .quiet.danger { margin-left: var(--s3); } /* Remove follows the row, a step apart, not alone at the far right */
.tool-section { padding: var(--s4) 0; border-top: 1px solid var(--line); }
.tool-section > h3 { margin-bottom: var(--s2); }
/* More tools rows: two fields a row, the button beside the last field or, when it would be alone, full width. */
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); align-items: end; max-width: 36rem; }
.tool-grid > .field { margin: 0; }
.tool-grid > button { min-height: 48px; }
.tool-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.tool-section > .stack-btns + p { margin-top: var(--s3); }
.log-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.log-info { margin: var(--s2) 0; }
.log { list-style: none; margin: 0; padding: var(--s1); max-height: 420px; overflow-y: auto; background: var(--sidebar); border: 1px solid var(--border); border-radius: var(--r-md); }
.log > li { display: grid; grid-template-columns: 5.5rem 4.75rem minmax(0, 1fr); gap: var(--s2); align-items: center; min-height: 32px; padding: 2px var(--s2); border-radius: var(--r-sm); font: 13px/1.4 var(--mono); }
.log > li.none { display: block; padding: var(--s2); font-family: var(--sans); }
.sim-board { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); }
.sim-board > p { margin: 0; flex: 1 1 220px; }
.log > li > .t { color: var(--muted); }
.log > li > .x { color: var(--muted-strong); overflow-wrap: anywhere; }
.log > li > .chip { min-height: 22px; font-size: 12px; padding: 1px 6px; justify-content: center; }
.log > li.k-pass > .x, .log > li.k-warn > .x { color: var(--fg); }
.log > li.k-warn { background: color-mix(in srgb, var(--danger) 8%, var(--sidebar)); }
@media (max-width: 480px) { .log > li { grid-template-columns: 4.75rem minmax(0, 1fr); } .log > li > .t { grid-column: 1 / -1; } }
.range-row { display: flex; gap: var(--s3); align-items: center; }
.range-row > output { font: 600 14px var(--mono); min-width: 3ch; text-align: right; }

/* Track editor: the "Not saved" tag beside Save, and the template prompt on a new, empty track. */
.row.actions > .unsaved-tag { align-self: center; }
.tpl-hint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s3); }
/* A tool below the map says what it did beside its button, and in a strip right above the map. */
.tool-done { margin: var(--s2) 0 0; color: var(--lime); font-weight: 600; }
.tool-done:empty { display: none; }
.map-msg { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--lime); border-left-width: 4px; border-radius: var(--r-md); background: color-mix(in srgb, var(--lime) 10%, var(--card)); color: var(--fg); font-weight: 600; }
@media (min-width: 1200px) { .page.editor .stack-btns { display: grid; } } /* the side column: one full-width button a row */
.tool-note:empty { display: none; }
.tool-note > .banner { margin: 0 0 var(--s3); }
/* Track editor: "Tap places" sits right above the map, so picking a kind and tapping the map is one screen on a
   phone (it was a select one screen below). Four columns on a phone: two rows of 44 px buttons. */
.place-kinds { display: grid; gap: var(--s1); margin: 0 0 var(--s3); }
.kinds-h { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); }
.seg.kinds { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
.seg.kinds > button { padding-left: 4px; padding-right: 4px; }
@media (max-width: 699px) { .seg.kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tool-note .banner .field { flex: 1 1 12rem; margin: 0; }
.gate-tools .pair.xy > .field { margin: 0; }
.kbd-hint { margin: 0; }

/* ---------- Auth pages ---------- */
.auth { position: relative; padding-top: var(--s4); }
.auth .glyph { display: block; width: 40px; height: 40px; margin-bottom: var(--s3); }
/* Login's other ways in (a username, I'm new) sit just under Log in: full width on a phone, side by side above 600 px. */
.auth-card .row.actions + .stack-btns { margin-top: var(--s2); }
@media (min-width: 900px) {
  /* Radar rings round the card (the uav login motif): sized so all three clear the 440 px card. */
  .auth::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 880px; height: 880px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, transparent 0 259px, rgb(255 176 32 / .3) 260px 262px, transparent 263px 339px, rgb(53 214 229 / .24) 340px 341px, transparent 342px 419px, rgb(93 107 130 / .45) 420px 421px, transparent 422px); }
}

/* ---------- Generated art (public/art) ---------- */
/* Generated art (public/art). Decoration under words: wherever text sits on it, a scrim of at least .70 (large
   text) or .80 (body text) keeps AA, measured against each image's brightest pixels (spec §11). One treatment for
   all four images (spec §12): desaturated and dimmed like uav's hero photo, so the art never outshouts the
   content. It only darkens, so every contrast figure in §11 still holds. */
img.art { display: block; max-width: 100%; height: auto; filter: saturate(.45) brightness(.72) contrast(1.05); }
.empty.has-art { display: grid; justify-items: center; gap: var(--s3); }
.empty.has-art > .art { width: min(100%, 320px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-md); }
.hero { position: relative; margin: 0 0 var(--s4); aspect-ratio: 16 / 7; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--sidebar); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(10 14 20 / .7)); }
.hero > .art { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.card > .auth-art { position: relative; height: 132px; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) var(--s4); overflow: hidden; border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; background: var(--sidebar); }
.auth-art > .art { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.auth-art::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, var(--card)); }
@media (min-width: 900px) {
  /* The card sits in the middle of the window, so the radar rings round it clear the header. */
  .auth { min-height: calc(100vh - var(--chrome-h, 56px) - 96px); display: grid; align-content: center; }
  .card > .auth-art { height: 156px; }
}

/* ---------- TV mode (design-spec.md §14) ---------- */
/* One screen, read from about 3 m. The race panel fills the left; on the right the map takes every pixel the top 5
   leaves, so gate state reads at 1280 × 800 and under a banner too (it used to be a 24vh box, 20vh under a banner). */
body.tv { padding-bottom: 0; display: flex; flex-direction: column; min-height: 100vh; background-image: none; }
body.tv .top, body.tv #nav { display: none; }
body.tv .chrome { position: static; }
body.tv #alerts { padding: var(--s4) var(--s5) 0; border: 0; }
body.tv #alerts .banner { max-width: none; font-size: clamp(18px, 1.6vw, 30px); padding: clamp(10px, 1vw, 20px) clamp(16px, 1.6vw, 28px); border-left-width: 8px; }
body.tv main { max-width: none; padding: var(--s5); }
.tv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-bottom: var(--s3); }
.tv-bar .brand { flex: 0 0 auto; font-size: clamp(18px, 1.5vw, 30px); } /* the brand on the link's tier, not under it */
.tv-bar > .row { transition: opacity .4s; }
body.tv-calm .tv-bar > .row:not(:focus-within) { opacity: 0; pointer-events: none; } /* a tap on a faded button only wakes the bar */
.tv-bar .brand svg { width: clamp(28px, 2.2vw, 46px); height: clamp(28px, 2.2vw, 46px); }
.tv-bar .mid { flex: 1 1 auto; display: flex; gap: var(--s3); justify-content: center; align-items: center; }
.tv-bar .conn::before { width: 12px; height: 12px; }
.tv-bar .mid .chip.lg { font-size: clamp(16px, 1.3vw, 24px); min-height: 40px; }
/* Secondary words scale with the screen: 19 px at 1280, 29 px at 1920. */
.tv-bar .conn, .tv-board-note, .tv .board th, .tv .map-legend, .tv-attract .kicker { font-size: clamp(18px, 1.5vw, 30px); }
.tv-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.tv-right { display: grid; gap: var(--s4); min-width: 0; align-content: start; }
@media (min-width: 900px) {
  /* Exactly one screen tall, so the right column can hand the map whatever the board does not use. */
  body.tv { height: 100vh; min-height: 0; }
  body.tv main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body.tv .page { flex: 1 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .tv-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); align-items: stretch; min-height: 0; }
  .tv-right { display: flex; flex-direction: column; min-height: 0; }
  .tv-right > .tv-board { flex: none; }
  .tv-map:not([hidden]) { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: var(--s3) var(--s4); }
  .tv-map > .mapbox { position: relative; flex: 1 1 0; min-height: 160px; }
  .tv-map > .mapbox > .map { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; }
}
@media (max-width: 899px) { .tv .map { max-height: 40vh; } }
.tv-panel { position: relative; display: flex; flex-direction: column; container-type: inline-size; }
.tv-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.tv-head .chip.lg { font: 700 clamp(20px, 2.2vw, 40px)/1 var(--display); letter-spacing: .08em; min-height: clamp(40px, 4vw, 64px); padding: 6px clamp(12px, 1.2vw, 22px); gap: clamp(8px, .8vw, 14px); }
.tv-head .chip.lg::before { width: clamp(12px, 1vw, 18px); height: clamp(12px, 1vw, 18px); }
.tv-pilot { font: 700 clamp(32px, 4vw, 64px)/1.05 var(--display); flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line beside the avatar: the TV stays one screen */
/* A finished run's placing and PB under the time, read at 3 m (round 9). The pilot's board row gets a band. */
.tv-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s2) var(--s4); margin: calc(var(--s2) * -1) 0 clamp(var(--s4), 1.6vw, var(--s6)); /* round 11: room above the tiles at 3 m */ font: 700 clamp(24px, 2.4vw, 44px)/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--fg); }
.tv-result .chip.lg { font: 700 clamp(20px, 2vw, 36px)/1 var(--display); letter-spacing: .08em; min-height: clamp(40px, 3.6vw, 60px); padding: 6px clamp(12px, 1.2vw, 22px); }
.tv-panel.has-result .splits > li:nth-child(n+3) { display: none; }
/* 1366 x 768: still one screen. Two splits while racing; during a finish hold the result line takes their place. */
@media (min-width: 900px) and (max-height: 780px) { .tv-panel .splits > li:nth-child(n+3) { display: none; } .tv-panel.has-result .splits { display: none; } }
.tv-board tr.this-run > td { background: var(--surface-2); }
.tv-board tr.this-run > td:first-child { box-shadow: inset 4px 0 0 var(--hud); }
.tv-timer { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; font: 700 clamp(64px, min(23cqi, 18vh), 240px)/1 var(--mono); min-height: 1.1em; font-variant-numeric: tabular-nums; letter-spacing: -.03em; margin: var(--s3) 0; white-space: nowrap; }
.tv .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tv .tile { padding: clamp(8px, 1vh, 16px) clamp(12px, 1.2vw, 22px); }
/* Labels, split words and chips are at least 22 px at 1280 and about 30 px at 1920 (they were 14-18 px). */
.tv .tile > .label { font-size: clamp(22px, 1.6vw, 32px); }
/* 2×2 TV tiles are about 290 px wide at a 1280 laptop: values are about 64 px there, 96 px on a 1080p TV. */
.tv .tile > .value { font-size: clamp(32px, min(22cqi, 7vh), 96px); }
.tv .splits { display: flex; flex-direction: column; gap: 4px; max-height: none; overflow: visible; margin-top: var(--s2); }
.tv .splits > li { font-size: clamp(22px, 1.7vw, 34px); grid-template-columns: clamp(6.5rem, 8vw, 10rem) minmax(0, 1fr) auto; min-height: clamp(44px, 3.4vw, 64px); }
.tv .splits > li > .t { font-size: clamp(24px, 2vw, 40px); }
.tv .splits > li > .l { font-size: clamp(22px, 1.6vw, 30px); }
.tv .splits .chip { font-size: clamp(22px, 1.6vw, 30px); min-height: clamp(34px, 2.6vw, 48px); padding: 2px clamp(10px, .8vw, 16px); }
.tv .splits .chip::before { width: clamp(10px, .7vw, 14px); height: clamp(10px, .7vw, 14px); }
/* A warning (missed gate, off course, false start) is a red strip across its row, not only a chip. */
.tv .splits > li.warn { background: color-mix(in srgb, var(--danger) 14%, var(--card)); box-shadow: inset 6px 0 0 var(--danger); padding-left: 16px; }
.tv .board { max-width: none; }
.tv .board td { height: clamp(44px, 5.6vh, 72px); padding-top: 2px; padding-bottom: 2px; }
.tv .board td.time, .tv .board .pilot a { font-size: clamp(22px, 2.2vw, 36px); }
.tv .board .rank { font-size: clamp(16px, 1.5vw, 24px); height: clamp(28px, 2.6vw, 40px); min-width: clamp(32px, 3vw, 48px); }
.tv .board .c-rank { width: clamp(3.5rem, 5vw, 5.5rem); }
.tv .board .c-time { width: clamp(7rem, 12vw, 13rem); }
.tv .board .gap, .tv .board .when, .tv .board .c-gap, .tv .board .c-when { display: none; }
.tv .board .pilot .pbar { width: 6px; height: clamp(28px, 2.6vw, 44px); }
.tv h2 { font-size: clamp(20px, 1.8vw, 30px); }
.tv-board h2 { margin-bottom: var(--s1); }
.tv-board-note { margin: 0 0 var(--s2); font-family: var(--mono); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-strong); }
/* Map words are sized in screen pixels; on a TV they, the gate bars, rings and direction lines scale up with --k. */
.tv .map { --k: 1.75; }
@media (min-width: 1600px) { .tv .map { --k: 2.25; } }
.tv .map-ring { stroke-width: calc(var(--u) * 6px * var(--k)); }
.tv .map-gate.next .map-ring { stroke-width: calc(var(--u) * 7px * var(--k)); }
.tv .map-halo { stroke-width: calc(var(--u) * 20px * var(--k)); }
.tv .map-dir { stroke-width: calc(var(--u) * 2px * var(--k)); }
.tv .map-legend { gap: var(--s2) var(--s5); margin-top: var(--s2); }
.tv .map-legend i { width: clamp(24px, 1.8vw, 36px); height: clamp(6px, .5vw, 10px); }
/* TV states are read from across the room too: the stale strip and the Pi-unreachable page at banner size. */
.tv .stale, body.tv.unreachable main { font-size: clamp(18px, 1.6vw, 30px); }
/* Round 11: a public TV shows no "You're now signed in as …" banner (main.js skips it there too); it pushed the
   panel down 71 px for 8 s on a screen nobody reads it from. */
body.tv #session-alert { display: none; }
/* The TV says the bridge is down itself (its Bridge offline chip and "Gates offline"): the page banner would only push
   the panel down and the board's last rows off a screen nobody scrolls (round 10). */
body.tv #bridge-alert { display: none; }
/* Between runs a gray 0.000 (or the last run's time beside "Fly next") said nothing: the attract screen has no timer.
   During a finish hold, Lap and Next gate say nothing either: Last lap and Best lap stay, the result line breathes. */
.tv-panel.attract .tv-timer { display: none; }
.tv-panel.has-result:not(.attract) .tiles > .tile:nth-child(-n+2) { display: none; }
/* Until the first lap closes, Last lap and Best lap would be two big dashes: Lap and Next gate stand alone. */
.tv-panel.first-lap:not(.attract) .tiles > .tile:nth-child(n+3) { display: none; }
/* A small TV map (1280 × 800): leg labels give way to the gates they describe. */
.tv-map > .mapbox { container-type: inline-size; }
@container (max-width: 450px) { .tv .map-step { display: none; } }
/* TV between runs: the attract screen over the TV art, inside the HUD brackets. */
.tv-panel > :not(.tv-art) { position: relative; z-index: 1; }
.tv-art, .tv-attract { display: none; }
.tv-panel.attract .tv-art { display: block; position: absolute; inset: 6px; z-index: 0; overflow: hidden; border-radius: calc(var(--r-lg) - 4px); pointer-events: none; }
.tv-art > .art { width: 100%; height: 100%; object-fit: cover; }
.tv-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 14 20 / .88) 0%, rgb(10 14 20 / .78) 38%, rgb(10 14 20 / .78) 52%, rgb(10 14 20 / .9) 70%); }
.tv-panel.attract .tiles, .tv-panel.attract .splits, .tv-panel.attract .tv-result { display: none; }
.tv-panel.attract .tv-timer { flex: 0 1 auto; font-size: clamp(56px, min(16cqi, 13vh), 170px); }
.tv-panel.attract .tv-attract { display: grid; align-content: end; gap: var(--s2); flex: 1 1 auto; padding-bottom: var(--s2); }
.tv-attract-title { margin: 0; font: 700 clamp(36px, 4.4vw, 84px)/1 var(--display); color: var(--fg); }
.tv-steps { margin: var(--s2) 0 0; padding-left: 1.6em; font: 600 clamp(18px, 1.8vw, 34px)/1.4 var(--sans); color: var(--fg); }
.tv-steps li::marker { color: var(--hud); font-family: var(--mono); }
.tv-paused { margin: var(--s2) 0 0; max-width: 34ch; font: 600 clamp(18px, 1.8vw, 34px)/1.4 var(--sans); color: var(--fg); }

/* ---------- Short landscape phones (spec §12) ---------- */
/* Only the slim header is sticky; banners scroll with the page; the tab bar is one 48 px row of icon + word; Live
   keeps its h1 for screen readers only, as on a portrait phone. */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --tabbar: 48px; }
  .chrome { display: contents; }
  .top { position: sticky; top: 0; z-index: 4; min-height: 44px; padding-block: 0; grid-column: 1 / -1; }
  #alerts { grid-column: 1 / -1; }
  #nav a { flex-direction: row; gap: 6px; padding: 0 2px; }
  .live-head .page-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .live-head { display: contents; }
  main { padding-top: var(--s3); }
}
/* A wide landscape phone (932 x 430) gets the sidebar: it scrolls on its own, so Gates, Debug and TV stay reachable
   (round 9 clipped them, and More is hidden at this width). Tighter group labels; links keep their 44 px. */
@media (min-width: 900px) {
  #nav { overflow-y: auto; overscroll-behavior: contain; }
}
@media (min-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  #nav { padding-block: var(--s2); }
  #nav .nav-group { padding: var(--s2) var(--s3) 2px; }
  #nav a { gap: var(--s3); padding: 0 var(--s3); }
}
/* Short landscape phone mid-race: chip, pilot and Callouts share one row, the timer is smaller, and Abort sits
   beside the readouts, so the whole race card fits above the tab bar without a scroll. */
@media (max-height: 500px) and (orientation: landscape) {
  .race-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "stale stale" "top top" "timer timer" "result result" "tiles abort"; column-gap: var(--s3); align-items: end; padding-block: var(--s3); }
  .race-card > .stale { grid-area: stale; }
  .race-card > .race-top { grid-area: top; flex-wrap: nowrap; }
  .race-card .race-pilot { order: 0; flex: 1 1 auto; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .race-card .race-who { order: 0; flex: 1 1 auto; } /* the avatar and name (spec §9) share the chip's row too */
  .race-card > .timer { grid-area: timer; font-size: 52px; margin: var(--s2) 0; }
  .race-card > .race-result { grid-area: result; }
  .race-card[data-state="idle"] .tiles { display: none; } /* like a portrait phone: no four empty "–" tiles between runs */
  .race-card > .tiles { grid-area: tiles; margin: 0; }
  .race-card > button.danger { grid-area: abort; width: auto; padding-inline: var(--s4); }
}

/* ---------- Lights & FAQ ---------- */
.lights { width: 100%; border-collapse: collapse; font-size: 15px; }
.lights caption { text-align: left; }
.lights th, .lights td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.lights thead th { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); padding-top: 0; }
.lights tbody th { font-weight: 600; color: var(--fg); width: 30%; }
.lights tr:last-child > * { border-bottom: 0; }
.light-name { display: flex; align-items: flex-start; gap: 10px; }
.light-swatch { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .35); box-shadow: 0 0 0 1px rgb(0 0 0 / .4); }
.light-swatch.breathing { animation: light-breathe 4s ease-in-out infinite; }
.light-swatch.blinking { animation: light-blink 1s steps(1, end) infinite; }
.light-swatch.pulsing { animation: light-breathe 1s ease-in-out infinite; }
@keyframes light-breathe { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes light-blink { 50% { opacity: .15; } }
.note { border-left: 3px solid var(--signal); padding-left: var(--s3); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq details > p { margin: 0 0 var(--s2); max-width: 65ch; }
/* A phone: each row stacks (light, then what it means, then what to do), each cell labeled. The roles in help.js keep
   it a table for screen readers. */
@media (max-width: 599px) {
  .lights thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lights tr { display: block; padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
  .lights tbody tr:last-child { border-bottom: 0; }
  .lights th, .lights td { display: block; border: 0; padding: 4px 0; width: auto; }
  .lights tbody th { width: auto; }
  .lights td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted-strong); }
}

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .map-gate.next .map-ring { stroke-width: calc(var(--u) * 9px); }
  .map-halo { opacity: .35; }
  button:active:not(:disabled), .btn:active { transform: none; }
}

/* ---------- Focus landings ---------- */
/* The router focuses <main> on every page change for screen readers; it is a region, not a control. */
#view:focus, #view:focus-visible { outline: none !important; }
/* Round 11: it lands on the page's h1 instead (the heading is read out); a heading is not a control either. */
#view h1[tabindex="-1"]:focus { outline: none !important; }

/* ---------- Windows high contrast (forced colors) ---------- */
/* Tints and gradient brackets vanish there: pressed states get a system outline, framed cards a system edge. */
@media (forced-colors: active) {
  .seg > button[aria-pressed="true"], .palette > button[aria-pressed="true"], .seg.kinds > button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .race-card, .hud-frame { border: 2px solid CanvasText; }
  .chip, .tag { border: 1px solid CanvasText; }
  button:disabled { border-style: dashed; color: GrayText; }
  /* Color is the data here (pilot colors, a progress fill): keep it, with a system edge (round 10). */
  .dot, .pbar, .swatch > .chip-colour { forced-color-adjust: none; border: 1px solid CanvasText; }
  progress.bar { forced-color-adjust: none; border-color: CanvasText; }
  .swatch:has(> input:checked) { outline: 2px solid Highlight; outline-offset: 2px; }
  /* Round 11: a gate's state is its color (waiting cyan, next lime, cleared amber): maps and their key keep theirs. */
  .map, .map-legend i { forced-color-adjust: none; }
}
/* Avatars (spec §9): a round picture beside a name (alt="": the name says who), ringed in the pilot's color when
   --ring is set. Sizes: sm 28 px (lists, boards), md 40 px (Live, podium), lg 64 px (pilot page, Me). */
.avatar { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; background: var(--sidebar); box-shadow: 0 0 0 2px var(--ring, var(--border)); }
.avatar.sm { width: 28px; height: 28px; }
.avatar.md { width: 40px; height: 40px; }
.avatar.lg { width: 64px; height: 64px; }
/* The picker: the presets as radios in labeled tiles (at least 84 × 88 px, so whole names fit); the chosen one ringed and tinted amber. */
.avatar-pick { max-width: 36rem; margin: var(--s2) 0; }
.avatar-grid { border: 0; margin: var(--s2) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; min-width: 0; }
.avatar-grid > legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--muted-strong); }
.avatar-tile { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 88px; padding: 6px 2px; border: 2px solid transparent; border-radius: var(--r-md); cursor: pointer; font-size: 13px; line-height: 1.2; color: var(--muted-strong); text-align: center; overflow-wrap: break-word; }
.avatar-tile > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.avatar-tile > img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--sidebar); }
.avatar-tile:has(> input:checked) { border-color: var(--hud); background: var(--hud-a10); color: var(--hud); }
.avatar-tile:has(> input:focus-visible) { outline: 2px solid var(--hud); outline-offset: 2px; }
.avatar-photo { margin-top: var(--s2); }
@media (forced-colors: active) {
  .avatar-tile:has(> input:checked) { outline: 2px solid Highlight; outline-offset: 2px; }
}
/* Avatars beside names (spec §9). Live: the avatar and the name share the line the name had. TV: they scale up. */
.race-who { order: 3; flex: 1 1 100%; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.race-who > .race-pilot { order: 0; flex: 1 1 auto; }
.avatar.tv { width: clamp(48px, 5vw, 96px); height: clamp(48px, 5vw, 96px); }
.tv .board .avatar.sm { width: clamp(28px, 2.6vw, 44px); height: clamp(28px, 2.6vw, 44px); }
