/* Palette: VyRal design tokens, LeakReceipts Board family (vyral-design/tokens.css, 2026-10-22). LeakReceipts gold accent. */
:root {
  --bg: #101216; --surface: #171A20; --surface-2: #1E222B; --line: #2A2F3A;
  --text: #E9ECF1; --muted: #8B92A0;
  --accent: #F4A81D; --accent-hover: #FFC14D; --accent-ink: #101216; --accent-wash: rgba(244,168,29,0.08);
  --card: var(--surface); --ink: var(--text);
  --brand: var(--surface); --brand-ink: var(--text);
  --ok: #37B97A; --ok-bg: rgba(55,185,122,0.12); --bad: #E5484D; --bad-bg: rgba(229,72,77,0.12);
  --warn: #F4A81D; --warn-bg: rgba(244,168,29,0.10); --info: #E9ECF1; --info-bg: #1E222B;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --stripe: repeating-linear-gradient(45deg, #F4A81D 0 11px, #101216 11px 22px);
  --radius: 12px; --radius-control: 8px; --radius-chip: 6px; --gutter: 16px;
  font-family: var(--font-sans); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; }
.preview-banner { background: var(--accent); color: #1b1300; font-size: 12px; font-weight: 700; text-align: center; padding: 6px var(--gutter); letter-spacing: .02em; }
header.top { background: var(--brand); color: var(--brand-ink); padding: 14px var(--gutter) 0; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
nav.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a { flex: 0 0 auto; color: var(--brand-ink); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.12); white-space: nowrap; }
nav.tabs a[aria-current="page"] { background: #fff; color: var(--brand); }
main { padding: var(--gutter); max-width: 640px; margin: 0 auto; }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
input, select, textarea { width: 100%; font-size: 16px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
textarea { min-height: 64px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row > div { min-width: 0; }
button, .btn { display: inline-block; width: 100%; margin-top: 14px; font-size: 16px; font-weight: 700; padding: 13px; border: 0; border-radius: 12px; background: var(--brand); color: var(--brand-ink); cursor: pointer; text-align: center; text-decoration: none; }
button.secondary { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.verdict { border-radius: 12px; padding: 12px; font-weight: 700; margin-bottom: 10px; }
.v-ok { background: var(--ok-bg); color: var(--ok); }
.v-bad { background: var(--bad-bg); color: var(--bad); }
.v-warn { background: var(--warn-bg); color: var(--warn); }
.v-info { background: var(--info-bg); color: var(--info); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px; min-width: 0; }
.stat b { display: block; font-size: 18px; overflow-wrap: anywhere; }
.stat span { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.list .head b { overflow-wrap: anywhere; }
details.vera { background: var(--info-bg); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
details.vera summary { font-weight: 700; cursor: pointer; color: var(--info); }
details.vera p { margin-top: 8px; }
.draft-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--warn); }
.pending { border-left: 4px solid var(--accent); }
.promise { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding: 14px var(--gutter) 28px; max-width: 640px; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; }
.chips input { width: auto; }
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.picker button { width: auto; margin: 0; padding: 8px 10px; font-size: 13px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.picker button.on { background: var(--brand); color: #fff; }
.pill { white-space: nowrap; flex: 0 0 auto; }
@media print { header.top, .preview-banner, nav, .promise, details.vera, form { display: none !important; } }
.upload { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.upload input[type=file] { padding: 9px; font-size: 14px; }

/* ---- LeakReceipts Board overrides (2026-10-22) ---- */
.preview-banner { background: var(--surface-2); color: var(--muted); font: 600 11px/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top::before { content: ""; display: block; height: 6px; background: var(--stripe); margin: -14px calc(-1 * var(--gutter)) 12px; }
.brand { color: var(--text); }
.brand small { font: 600 10px/1.6 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: 1; }
nav.tabs a { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-control); font-size: 13px; }
nav.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
h1, h2 { color: var(--text); letter-spacing: -.01em; }
label, .stat span, .draft-tag { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.draft-tag { color: var(--accent); }
input, select, textarea { background: var(--surface-2); border-radius: var(--radius-control); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, .btn { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-control); font-weight: 800; }
button:hover, .btn:hover { background: var(--accent-hover); }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.secondary:hover { background: var(--surface-2); }
.card { border-radius: var(--radius); }
.stat { background: var(--surface-2); border-radius: var(--radius-control); }
.stat b, .verdict, .cardline { font-variant-numeric: tabular-nums; }
.stat b { font-family: var(--font-mono); }
.verdict { border-radius: var(--radius-control); border: 1px solid transparent; }
.v-ok { border-color: rgba(55,185,122,.35); } .v-bad { border-color: rgba(229,72,77,.35); } .v-warn { border-color: rgba(244,168,29,.35); } .v-info { border-color: var(--line); }
.pill, .chip { border-radius: var(--radius-chip); }
.chips label { border-radius: var(--radius-chip); background: var(--surface-2); text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.chip { background: var(--surface-2); }
details.vera { background: var(--accent-wash); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
details.vera summary { color: var(--accent); }
.picker button { background: var(--surface-2); color: var(--text); border-radius: var(--radius-chip); }
.picker button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
a { color: var(--accent); }
.list li { border-top-color: var(--line); }

/* 2026-10-23 optional cab mode: icons only, big targets for a mounted phone. */
.cab { display: grid; gap: 14px; padding: 8px 0; }
.cab button, .cab .btn { font-size: 40px; padding: 26px 10px; margin: 0; }
.cab .cab-big { font-size: 64px; padding: 44px 10px; }
.cab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cab .cab-sos { background: var(--bad, #b3261e); }
.cab #cab-exit { font-size: 22px; padding: 12px; }

/* ---- Panel fix round, track B (2026-10-24) ---- */
/* M1: a label that IS the chip row (label.chips) reads like the chips inside .chips: normal case, body size. Binding consent text must be readable. */
label.chips { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-chip); background: var(--surface-2); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); line-height: 1.4; }
label.chips input { width: auto; margin-top: 3px; flex: 0 0 auto; }
/* H7: a button that isn't switched on never looks live. */
button:disabled, button:disabled:hover { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: not-allowed; font-weight: 600; }
.off-note { display: block; margin-top: 6px; }
button:not(:disabled) + .off-note { display: none; }
/* L2: tap targets at least 44px. */
nav.tabs a, .picker button, details > summary, .header-tools button { min-height: 44px; display: inline-flex; align-items: center; }
details > summary { cursor: pointer; }
main a { display: inline-block; min-height: 44px; line-height: 44px; }
main p a, main li a { min-height: 0; line-height: inherit; padding: 10px 0; }
/* My loads: a load card is one big button that opens the whole grade. */
.list.loads button.load-open { all: unset; display: block; width: 100%; cursor: pointer; box-sizing: border-box; min-height: 44px; }
.list.loads button.load-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.load-detail .head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.load-detail .head button { width: auto; margin: 0; }
/* B1: the cab grid fits a 360px phone. */
.cab-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cab button, .cab .btn { font-size: 32px; overflow-wrap: anywhere; min-width: 0; }
.cab .cab-big { font-size: 52px; }
@media (max-width: 420px) { .cab-row { grid-template-columns: minmax(0, 1fr); } }
/* M7: language and theme switches live in the header on every screen. */
.header-tools { display: flex; gap: 8px; justify-content: flex-end; margin-top: -30px; }
.header-tools button { width: auto; margin: 0; padding: 6px 12px; font-size: 14px; font-weight: 700; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.header-tools button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Light theme: follows the phone unless the member picks one. */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #EEF0F4; --line: #D5D9E0; --text: #14171C; --muted: #5B6270;
  --accent: #B87500; --accent-hover: #9A6200; --accent-ink: #FFFFFF; --info: #14171C; --info-bg: #EEF0F4;
  --ok: #1E7F52; --bad: #C02B30; --warn: #9A6200; color-scheme: light; } }
:root[data-theme="light"] {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #EEF0F4; --line: #D5D9E0; --text: #14171C; --muted: #5B6270;
  --accent: #B87500; --accent-hover: #9A6200; --accent-ink: #FFFFFF; --info: #14171C; --info-bg: #EEF0F4;
  --ok: #1E7F52; --bad: #C02B30; --warn: #9A6200; color-scheme: light; }
/* 24 Oct: the outreach email shows in full; checkbox and radio rows on the new screens are at least 44px tall. */
.mail { border: 1px solid var(--line); border-radius: var(--radius-control); padding: 10px; margin-top: 10px; overflow-wrap: anywhere; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 8px 0 0; }
label.chips { min-height: 44px; }
h3 { font-size: 15px; margin: 14px 0 6px; color: var(--text); }

/* Panel 3r M12: quick tabs + grouped menu (same pattern as LeakReceipts Dispatch). The bar wraps; the menu lists every screen. */
nav.tabs { flex-wrap: wrap; overflow-x: visible; }
nav.tabs .tab-menu { flex: 1 0 100%; }
nav.tabs .tab-menu > summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); list-style: none; display: flex; align-items: center; min-height: 44px; }
nav.tabs .tab-menu > summary::-webkit-details-marker { display: none; }
nav.tabs .tab-menu-list { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; max-height: 60vh; overflow-y: auto; }
nav.tabs .tab-menu-list a { white-space: normal; }
nav.tabs .tab-group { margin: 8px 0 2px; font-size: 12px; color: var(--muted); }
/* Panel 3r M1: on a phone the EN/ES/Light buttons get their own row, so the app name never runs under them. */
@media (max-width: 480px) { .header-tools { margin-top: 8px; justify-content: flex-start; flex-wrap: wrap; } .brand { overflow-wrap: anywhere; } }

/* Round 2: More tools groups, listening bar, Add a load as the main action, draft tag spacing */
.tool-group { font-size: 15px; margin: 18px 0 6px; }
details.tool > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.tool-body { margin-top: 10px; }
.listen-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent); color: #fff; margin: 10px 0; }
.listen-bar button { background: #fff; color: #000; }
summary.primary-summary { display: inline-block; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.draft-tag { margin-left: 8px; }

/* Round 3 M-4: at phone width the header takes no more than about a quarter of the first view. Brand and the language and
   theme buttons share one row; the screens are one sideways-scrolling row with "All screens" first. When that menu is
   open, the row wraps so the full list shows. */
@media (max-width: 480px) {
  header.top { padding-top: 10px; }
  header.top::before { margin-top: -10px; margin-bottom: 8px; }
  header.top .head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .brand { font-size: 17px; line-height: 1.15; min-width: 0; }
  .brand small { display: none; }
  .header-tools { margin-top: 0; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; flex: 0 0 auto; }
  .header-tools button { padding: 6px 10px; min-width: 44px; justify-content: center; }
  nav.tabs { flex-wrap: nowrap; overflow-x: auto; padding: 8px 0; gap: 6px; }
  nav.tabs .tab-menu { flex: 0 0 auto; order: -1; }
  nav.tabs:has(.tab-menu[open]) { flex-wrap: wrap; overflow-x: visible; }
  nav.tabs .tab-menu[open] { flex: 1 0 100%; }
}

/* Round 3 (r1-L2): every field and tick box is at least 44px to tap. A tick box is 22px and its whole label row is the
   44px target; a tick box with no label row around it gets a 44px box of its own. */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; flex: 0 0 auto; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { min-height: 44px; }
:not(label) > input[type="checkbox"], :not(label) > input[type="radio"] { width: 44px; height: 44px; }
/* r1-M1: the Hands-free tick box sits on the line with its words, not above them. */
label.chips { align-items: center; flex-wrap: nowrap; }
label.chips input, .chips label input { margin-top: 0; }
label.chips input[type="checkbox"], .chips label input[type="checkbox"], label.chips input[type="radio"], .chips label input[type="radio"] { width: 22px; height: 22px; }
