/* ==============================================================   Issue #222 (driver v3 "Focus", slice 1 of 14): v3 design tokens,
   type, icons and base component classes for the HIDDEN v2 page ONLY
   (driver.html). Live driver.html stays byte-for-byte
   unchanged; this sheet is linked only by the v2 page. Source of truth:
   /workspace/pixel/v3/{tokens.css, design.md, contrast.md,
   feature-map.md} and the v3 mockups. Replaces the #141 monochrome
   token block and its amber/red allowlist values with the v3 tokens
   (--warn / --danger); the v3 colour semantics (amber
   = act soon, red = danger, always with an icon and words) govern new
   v3-* components. Existing v2 markup is NOT rebuilt in this slice:
   every pre-existing id/handler/timer keeps its behaviour, and the only
   screen restyle is the toast (white card, black 15px/500 text, radius
   18) with the same strings and timing.

   Served from the same origin as this sheet: Geist is self-hosted as
   driver-Geist.ttf next to this file (relative @font-face
   URL below, no third-party font request; Geist Mono was rejected by
   the type study - explore/type.png - so only Geist ships). No CDN, no
   external icons: Lucide SVGs are inlined at their point of use.

   Earlier layers kept below (history): #141 base styles + PR #155
   rendered-QA fixes, #143 active-job relayout, #142 offer/missed/
   cancelled relayout - all remapped onto the v3 token names.

   PR #155 rendered-QA fix (Pixel QA 2026-11-08,
   /workspace/pixel/qa/pr155-qa.md): the link to this sheet sits in
   head BEFORE the page's three legacy style blocks (two of them are
   inside body), so at equal specificity every later legacy rule won
   and the theme never took effect. The link stays in head (identical
   load timing, zero event/behaviour change) and every page-scoped
   selector below is prefixed "html body" so it outranks ALL later
   legacy blocks wherever they sit. Same-name legacy @keyframes
   (flashWarning) still win by document order, so their colour stops
   are neutralised inside the page itself; the same applies to routine
   inline style attributes, which no stylesheet rule can ever beat.
   ===================================================================== */

/* Self-hosted Geist (OFL, variable 100-900) from the v3 design pack.
   The file sits NEXT TO this sheet, so whatever origin serves
   /driver-theme.css also serves the font (same origin, no
   third-party request, no backend change needed). */
@font-face {
  font-family: "Geist";
  src: url("driver-Geist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* ---- Full v3 tokens.css (verbatim from Issue #222; replaces the
   #141 token block token-for-token) ---- */
/* Anytime driver v3 tokens (Pixel, 10 Nov 2026). Design proposal only, not applied to driver.html.
   Mostly black and white. Colour only to catch the eye: amber = act soon / take care (offer ending, time to set off, GPS weak, minor, flight delay); red = danger (cancel, no-show, missed, end call). */
:root {
  color-scheme: dark;
  /* Neutrals: four surfaces, lighter = closer to you */
  --canvas:   #000000;
  --surface:  #0F0F0F;   /* cards, rows */
  --raised:   #171717;   /* sheets, buttons */
  --overlay:  #222222;   /* pressed, selected-off */
  --surface-3: var(--overlay);   /* alias: send-pin hold fill (Pixel, 10 Nov 2026) */
  --hairline: #262626;   /* dividers, card edges (decorative) */
  --stroke:   #3D3D3D;   /* control outlines */
  /* Text */
  --text:     #FFFFFF;   /* 21:1 on canvas */
  --text-2:   #A8A8A8;   /* 8.9:1 canvas, 7.6:1 raised */
  --text-3:   #8C8C8C;   /* 6.3:1 canvas, 5.4:1 raised; captions only */
  --on-light: #000000;
  /* Meaning colours (desaturated for black). Never the only signal: always paired with an icon and words. */
  --warn:     #FFC857;   /* offer <=5 s, Time to set off, GPS lost */
  --warn-bg:  #2A2212;
  --danger:   #FF7B7B;   /* cancel, no-show, missed job, session ended */
  --danger-bg:#2A1515;
  /* Brand: owner decision recorded on #223 - the wordmark's capital
     A and T sit in the company's trademark brand green (the main
     website's --primary, index.html). A wordmark-ONLY exception to
     the colour-for-alerts rule. */
  --brand:    #00d664;
  /* Type: Geist for everything, tabular figures for money, times and timers. OFL; self-host in the app. */
  --font-ui: "Geist", Inter, system-ui, sans-serif;
  --font-num: "Geist", Inter, system-ui, sans-serif;  /* always with font-variant-numeric: tabular-nums (Geist Mono's wide full stop broke £24.80; see explore/type.png) */
  --t-glance: 72px/1    var(--font-num);   /* fare, meter, countdown; tracking -3px */
  --t-display: 40px/1.08 var(--font-ui);   /* the one thing on screen; weight 600, tracking -1.2px */
  --t-title: 28px/1.15 var(--font-ui);     /* weight 600, tracking -0.6px */
  --t-head: 20px/1.25 var(--font-ui);      /* weight 600 */
  --t-body: 17px/1.45 var(--font-ui);      /* weight 400 */
  --t-label: 15px/1.3 var(--font-ui);      /* weight 500 */
  --t-cap: 13px/1.2 var(--font-ui);        /* weight 500, uppercase, tracking .08em */
  /* Space (4pt) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --edge: 20px;  /* screen side margin */
  /* Shape */
  --r-control: 18px; --r-card: 22px; --r-sheet: 28px; --r-pill: 999px;
  /* Touch */
  --hit-primary: 64px;   /* the one primary action, bottom thumb zone */
  --hit-driving: 56px;   /* anything used while the car may move */
  --hit-min: 48px;
  /* Motion */
  --dur-tap: 90ms; --dur-sheet: 280ms; --dur-screen: 220ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);  /* sheets settle */
  --ease-std: cubic-bezier(.2, 0, 0, 1);
  /* Layers */
  --z-sheet: 20; --z-menu: 30; --z-takeover: 40; --z-toast: 50; --z-blocking: 60;
}
@media (prefers-reduced-motion: reduce) { :root { --dur-tap: 0ms; --dur-sheet: 0ms; --dur-screen: 0ms; } }

/* ---- v2 theme base (Issue #141, remapped to the v3 tokens by #222) ----
   Monochrome surfaces, type, focus ring, universal control states.
   "html body" prefixes keep every rule above the later-in-document
   legacy blocks (specificity, not order, is the win mechanism; the
   link itself loads from head exactly as before). */
html { color-scheme: dark; }
html body {
  background: var(--canvas);
  color: var(--text);
  font: 400 var(--t-body);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums; /* --font-num: fares/countdowns/meter */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
/* Legacy body.meter-active (0,1,1) would still beat the plain html body
   rule above (0,0,2) and repaint the canvas a legacy grey: keep the
   token canvas in that state too. Presentation only, no state change. */
html body.meter-active { background: var(--canvas); }
html body .header {
  background: var(--raised);
  color: var(--text);
  border-bottom: 1px solid var(--stroke);
}
html body .status-box { background: var(--raised); }
html body .job-card { background: var(--surface); }

/* Focus: form fields take a subtle 1px accent ring; buttons, links and
   role=button keep the 3px white ring outside a 3px neutral gap (v3:
   focus is always visible; the ring sits on the dark surroundings,
   never directly on a white button fill). The v3-kit page pins the
   same ring via .v3-focus. */
html body input:focus,
html body input:focus-visible,
html body textarea:focus,
html body textarea:focus-visible,
html body select:focus,
html body select:focus-visible {
  outline: 1px solid var(--brand);
  outline-offset: 3px;
}
html body button:focus-visible,
html body a:focus-visible,
html body [role="button"]:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}
html body .v3-focus {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* Universal states: pressed keeps the #141 inset stroke (safe on any
   fill, including the white primary); disabled is --raised with a
   --text-3 label and a --stroke border, fully opaque. The v3 button
   classes below add the v3 "pressed is --overlay" treatment. */
html body button:active:not(:disabled) { box-shadow: inset 0 0 0 2px currentColor; }
html body button:disabled,
html body button[disabled] {
  background: var(--raised);
  color: var(--text-3);
  border: 1px solid var(--stroke);
  opacity: 1;
  cursor: not-allowed;
}
html body input:disabled,
html body input[disabled],
html body input:read-only {
  opacity: 1;
}

/* Buttons are monochrome: primary white/black; secondary and
   destructive (danger/success) grey with white label + --stroke border.
   Never a coloured button fill, including inside coloured alerts. */
html body .btn-primary {
  background: var(--text);
  color: var(--on-light);
  border: 1px solid var(--stroke);
  min-height: var(--hit-min);
}
html body .btn-danger,
html body .btn-success {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--stroke);
  min-height: var(--hit-min);
}
/* The active-job Cancel button is painted by the MORE specific legacy
   rule .job-actions .btn-danger, which a prefixed single-class rule
   cannot beat: raise the selector the same way. Colours only - its
   size/layout stays legacy (touch targets and layout belong to later
   v3 slices). */
html body .job-actions .btn-danger {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--stroke);
}
html body .btn-start,
html body .btn-stop,
html body .btn-reset,
html body .btn-pause {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--stroke);
  min-height: var(--hit-min);
}
/* Inputs: grey surface, --stroke border, 17px white text (v3 field). */
html body input,
html body select,
html body textarea {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--stroke);
}
/* Offer 15s countdown is an explicit exclusion (offer ring and
   countdown stay monochrome): legacy .timer orange loses to the
   raised selector. */
html body .timer { color: var(--text); }
/* Routine status chips/badges: monochrome; the existing words carry the
   meaning (online/offline/tracking/card-paid/delayed). */
html body .status-indicator { background: var(--text-2); }
html body .status-indicator.online { background: var(--text); }
html body .status-indicator.busy,
html body .status-indicator.partial,
html body .status-indicator.suspended { background: var(--text-2); }
/* Pressed/dimmed contact chips keep opacity 1 (no opacity-dimmed text). */
html body .job-card .contact-btn:active { opacity: 1; }
/* Legacy orange flash becomes a neutral white-on-grey flash. The page's
   own later same-name keyframes still win by document order, so their
   stops are neutralised in the page (count-asserted pair); this copy
   keeps the same monochrome intent if that block ever moves. */
@keyframes flashWarning {
  0% { background-color: var(--text); color: var(--canvas); }
  100% { background-color: var(--raised); color: var(--text); }
}
/* Break/standby purple gradients become monochrome (accent fill). */
html body #btn-break { background: var(--text); color: var(--on-light); box-shadow: none; }
html body #break-hold-bar { background: var(--text); }
/* Passenger contact chips: monochrome secondary, explicit labels. */
html body .job-card .contact-btn-call,
html body .job-card .contact-btn-sms { background: var(--raised); color: var(--text); }
/* Toasts (Issue #222 restyle, the ONLY screen restyle in this slice):
   a white card at the top with black 15px/500 text, radius 18, one at
   a time - now full width with 16px side insets and a leading Lucide
   icon (mockups), rendered as a same-origin data-URI mask painted
   currentColor, so the existing showToast JS keeps its exact strings,
   dedupe/10s timing and classification (behaviour frozen). The
   .toast-alert class hook from #141 stays in the page JS; v3 toasts
   are deliberately neutral - colour classification of alert toasts
   belongs to the later alert-overlay slice, never the only signal
   (the words carry the meaning). */
html body .toast-msg {
  background: var(--text);
  color: var(--on-light);
  border: none;
  border-radius: var(--r-control);
  padding: 14px 16px;
  font: 500 15px/1.3 var(--font-ui);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  opacity: 1;
  transition: opacity var(--dur-screen) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: calc(100% - 32px);
  min-width: 0;
  max-width: none;
}
html body .toast-msg::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.75'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'%3E%3C/circle%3E%3Cpath%20d='M12%2016v-4'%3E%3C/path%3E%3Cpath%20d='M12%208h.01'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.75'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='12'%20r='10'%3E%3C/circle%3E%3Cpath%20d='M12%2016v-4'%3E%3C/path%3E%3Cpath%20d='M12%208h.01'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
}
html body .toast-msg.toast-alert { border: none; }
/* Meter display: monochrome (no red LED), tabular numerals.
   #223 r9 (owner decision): the amount keeps its legacy 22vw fluid
   size but is capped at 48px. 22vw of the 390px phone is 85.8px -
   3.5x the RATE/STOPPED row's 20.9px box, with the skewX box at 102%
   of the viewport width - which the owner read as hugely oversized;
   measured identical on pre-#222, origin/main~5 and HEAD (the size
   predates v3; nothing in #222/#223 sizes the legacy meter), so this
   is a cap, not a revert. At 200% zoom (195px CSS) 22vw is 42.9px,
   so the zoom behaviour is byte-identical. The meter's full redesign
   is #230 and stays out of scope. */
html body .meter-main-display {
  color: var(--text);
  text-shadow: none;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: min(22vw, 48px);
}

/* ---- Safe areas with viewport-fit=cover (page meta, PR #155 QA) ----
   body keeps ONLY the left/right insets (no edge is padded twice):
   the fixed header strip carries the top inset via its page inline
   padding calc(5px + env(safe-area-inset-top)), the fixed bottom
   owned-jobs drawer and the in-flow job action bar carry the bottom
   inset, and the fixed toast container is shifted down by the top
   inset so stacked toasts never clip under or overlap the taller
   header. env() resolves to 0 without viewport-fit=cover, so these
   are all no-ops on rectangular viewports. */
html body .job-actions { padding-bottom: env(safe-area-inset-bottom); }
html body #owned-jobs-section {
  border-top-color: var(--stroke);
  padding-bottom: env(safe-area-inset-bottom);
}
html body #toast-container-overlay {
  top: calc(70px + env(safe-area-inset-top));
}

/* ---- Exact alert allowlist (issue #141, values remapped to v3 by #222;
   scope unchanged in this slice - semantic re-classification, e.g.
   missed-job/lockout going red under v3 rules, happens with the
   full-screen alert rebuild in a later slice) ----
   Amber heading + 4px rail on neutral containers; red only for
   Job-Cancelled/no-show confirmations. Supporting text stays
   white/grey; buttons/textarea inside stay monochrome. No coloured
   button fills, chips, rings or routine surfaces anywhere. */
/* 8-9: system closed / connection lost / reconnecting / session expired /
    suspended / active elsewhere overlays. */
/* 7: SESSION TERMINATED / ENDED lockout (amber, not red). */
html body #lockout-modal { border-left: 4px solid var(--warn); }
html body #lockout-modal h2,
html body #lockout-title { color: var(--warn); }
/* 13: ALREADY LOGGED IN conflict + emergency panel. */
html body #conflict-modal { border-left: 4px solid var(--warn); }
html body #conflict-modal h2 { color: var(--warn); }
/* 18/20: Job Cancelled cooldown + cancellation confirmations: red.
   Issue #142: the rail moved from the screen edge onto the alert card
   (html body .v2-alert-card rules in the #142 section below); the red
   heading rule stays. */
html body #cooldown-modal h2 { color: var(--danger); }
/* 17: MISSED JOB OPPORTUNITY rewrite of #cooldown-modal: amber (the
   rewrite sets an inline amber border + heading in page JS). */
html body #cooldown-modal.alert-amber,
html body #cooldown-modal.alert-amber h1 { color: var(--warn); }
/* 22/23: reminders are the neutral v3 alert (s4); TIME TO SET OFF
   stays amber. Reminder titles are --text. */
html body #status-reminder-title { color: var(--text); }
/* Job offer box + 15s countdown: monochrome (explicit exclusion). */
html body .offer-box { border: 2px solid var(--stroke); }
/* Taxi-relay indicator dots: monochrome; the existing words carry state. */
html body .relay-dot.on { background: var(--text); }
html body .relay-dot.disc { background: var(--text-2); }
/* Owned-jobs drawer + grip: neutral rails/labels (routine chips). */
html body #owned-drawer-grip .grip-label { color: var(--text); }
html body #owned-drawer-grip .grip-count { background: var(--text); color: var(--on-light); }
/* Standby scanning ring: cyan glow removed; monochrome motion only. */
html body .cyber-ring {
  border-top-color: var(--text);
  border-bottom-color: var(--text);
  box-shadow: none;
}
html body .cyber-ring::before { box-shadow: none; }


/* ---- Issue #143: active job screen v2 relayout (en-route mockup plus the
    Job details & tools bottom sheet). Same specificity strategy as above:
    "html body"-prefixed everywhere, and two classes on rules that must beat
    the legacy body.job-active / body.meter-active button rules (0,2,1).
    Presentation only - the stage button, arrived/POB flow and reminders stay
    with #144; a swipe is never used and never cancels a job. No amber/red:
    monochrome surfaces with the existing alert allowlist untouched. ---- */

/* card shell: 20px gutter instead of the legacy 5px compact padding */
html body .job-card.v2-active-card { padding: 20px 20px 12px 20px; }
html body .v2-active-card #job-details-scroll-area { gap: 4px; padding-right: 0; }

/* header: "Current job" title + 48x48 hamburger (aria-label "Menu") */
html body .v2-aj-header { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
html body .v2-aj-title { font-size: 1.25rem; font-weight: 700; letter-spacing: normal; }
html body .v2-active-card .v2-hamburger {
  width: 48px; height: 48px; flex: 0 0 48px; min-height: 48px; padding: 0; margin: 0;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: 50%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; text-transform: none; letter-spacing: normal;
}
html body .v2-active-card .v2-hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* chips row: stage chip (mirrors the live stage label) + Status pill */
html body .v2-aj-chips { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; min-height: 48px; }
html body .v2-stage-chip { padding: 6px 12px; border-radius: var(--r-pill); background: var(--raised); color: var(--text); font-size: 0.875rem; font-weight: 600; }
html body .v2-active-card .v2-status-pill {
  width: auto; flex: 0 0 auto; min-height: 48px; padding: 8px 14px; margin: 0;
  border-radius: var(--r-pill); background: var(--surface); color: var(--text);
  border: 1px solid var(--stroke); font-size: 0.875rem; font-weight: 600;
  text-transform: none; letter-spacing: normal;
}
/* compact Status panel: mirrors the live dispatch/GPS/Auto/eligibility text */
html body .v2-status-panel { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-control); padding: 8px 12px; margin: 0 0 8px 0; }
html body .v2-status-line { color: var(--text-2); font-size: 0.875rem; line-height: 1.6; overflow-wrap: break-word; }

/* pre-POB large pickup address: 32px, wraps, never truncated */
html body .v2-addr-block { margin: 8px 0 4px 0; }
html body .v2-addr-tag { display: block; color: var(--text-3); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
html body .v2-addr-main { font-size: 32px; line-height: 1.12; font-weight: 700; color: var(--text); margin: 4px 0 0 0; white-space: normal; overflow-wrap: break-word; word-break: break-word; }

/* customer card: name + tracking eye chip + destination line + Call/SMS */
html body .v2-cust-card { background: var(--surface); border: 1px solid var(--raised); border-radius: var(--r-card); padding: 20px; margin: 12px 0; }
html body .v2-cust-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
html body .v2-cust-head h3 { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--text); }
html body .v2-cust-dest { color: var(--text-2); font-size: 1rem; margin: 8px 0; white-space: normal; overflow-wrap: break-word; word-break: break-word; }

/* payment card ("Card paid / Do not collect cash", when applicable) */
html body .v2-pay-card { background: var(--surface); border: 1px solid var(--raised); border-radius: var(--r-card); padding: 20px; margin: 12px 0; }
html body .v2-pay-card strong { display: block; font-size: 1rem; color: var(--text); }
html body .v2-pay-card p { color: var(--text-2); font-size: 0.875rem; margin: 4px 0 0 0; }

/* one-line truncated note preview (>=48px; opens Details; omitted if no note) */
html body .v2-active-card .v2-note-btn {
  width: 100%; min-height: 48px; padding: 10px 14px; margin: 12px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-control);
  color: var(--text); font-size: 0.9rem; font-weight: 400; text-align: left;
  text-transform: none; letter-spacing: normal;
}
html body .v2-note-btn .v2-note-text { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .v2-note-btn .v2-note-chevron { color: var(--text-2); flex: 0 0 auto; }

/* sticky bottom: "Job details & tools" secondary + 64px white stage primary */
html body .job-actions.v2-sticky-bottom { display: flex; flex-direction: column; gap: 12px; margin-top: auto; width: 100%; flex-shrink: 0; padding: 12px 0 env(safe-area-inset-bottom) 0; }
html body .v2-active-card .v2-secondary-btn {
  width: 100%; min-height: 48px; padding: 12px 16px; margin: 0;
  background: var(--raised); color: var(--text); border: 1px solid var(--stroke);
  border-radius: var(--r-control); font-size: 1rem; font-weight: 600;
  text-transform: none; letter-spacing: normal;
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action {
  flex: none; width: 100%; min-height: 64px; margin: 0; padding: 14px 16px;
  font-size: 1.125rem; font-weight: 700; border-radius: var(--r-control);
  text-transform: none; letter-spacing: normal;
}

/* Job details & tools bottom sheet: peek = the sticky button, half opens by
   default, Expand/tab taps reach full. Every detent is tap-reachable. */
html body .v2-sheet-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 7500; }
html body .v2-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; height: 55vh; margin: 0;
  background: var(--raised); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8); padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  z-index: 7501; overflow-y: auto;
}
html body .v2-sheet.v2-sheet-full { height: 88vh; }
html body .v2-grip { width: 48px; height: 5px; background: var(--text-2); border-radius: var(--r-pill); margin: 0 auto 12px auto; }
html body .v2-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
html body .v2-sheet-title { font-size: 1.25rem; margin: 0; font-weight: 700; color: var(--text); }
html body .v2-sheet-xbtn {
  width: auto; flex: 0 0 auto; min-height: 48px; padding: 8px 14px; margin: 0;
  background: var(--surface); color: var(--text); border: 1px solid var(--stroke);
  border-radius: var(--r-control); font-size: 0.875rem; font-weight: 600;
  text-transform: none; letter-spacing: normal;
}
html body .v2-sheet-tabs { display: flex; gap: 8px; margin: 8px 0 4px 0; }
html body .v2-tab {
  flex: 1 1 0; width: auto; min-height: 48px; padding: 10px 14px; margin: 0;
  border-radius: var(--r-pill); border: 1px solid var(--stroke);
  background: var(--surface); color: var(--text); font-size: 0.875rem;
  font-weight: 600; text-transform: none; letter-spacing: normal;
}
html body .v2-tab.v2-tab-selected { background: var(--text); color: var(--on-light); border-color: var(--text); }
html body .v2-line { border-bottom: 1px solid var(--hairline); padding: 10px 0; }
html body .v2-line-val { margin: 4px 0 0 0; color: var(--text); font-size: 1rem; white-space: normal; overflow-wrap: break-word; word-break: break-word; }
html body .v2-route { border-left: 2px solid var(--stroke); padding-left: 16px; margin: 12px 0; }
html body .v2-route .v2-addr-tag { margin-bottom: 2px; }
html body .v2-route-stop { margin-top: 16px; }
html body .v2-action-btn {
  display: block; width: 100%; min-height: 56px; padding: 12px 16px; margin: 10px 0 0 0;
  background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-control);
  color: var(--text); font-size: 1rem; font-weight: 600; text-align: left;
  text-transform: none; letter-spacing: normal;
}
/* destructive section: Cancel job kept two reveals away, visually separated */
html body .v2-destructive { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--hairline); }
html body .v2-destructive .btn-danger {
  flex: none; width: 100%; min-height: 56px; margin: 0; padding: 12px 16px;
  font-size: 1rem; border-radius: var(--r-control);
  text-transform: none; letter-spacing: normal;
}

/* ---- Issue #142: offer / missed-job / cancelled screens (v2 only) ----
   Full relayout of #job-offer-modal to the mockup: "New job" card with
   ETA chip, customer, Pickup/Dropoff route rail, "Estimated fare" with
   a 48px tabular amount, white countdown ring + "seconds left" +
   "Accept before the offer expires", sticky bottom Accept job (64px
   white primary) above Refuse job (secondary >=48px). The missed-job
   rewrite of #cooldown-modal and the static job-cancelled card become
   dark grey alert cards with amber/red 4px left rails (colour ONLY on
   these alert surfaces; all controls monochrome). Wording per
   wording.md; ids/handlers/15s timing/business flows unchanged (the
   byte reconstruction in tests/test_driver_v2_theme_141.py pins them). */

/* Offer screen: full-screen column - card on top, ring centred by the
   flexible middle wrapper, caption + sticky actions at the bottom.
   The backdrop is a SOLID --canvas fill. Stacking keeps the legacy
   z-indexes; blocking precedence unchanged. */
html body #job-offer-modal {
  background: var(--canvas);
  justify-content: flex-start;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}
html body #job-offer-modal .v2-offer-card {
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--overlay);
  border-radius: var(--r-card);
  text-align: left;
  box-shadow: none;
}
html body #job-offer-modal .v2-offer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
html body #job-offer-modal .v2-offer-title {
  font: 600 var(--t-title);
}
html body #job-offer-modal .v2-offer-eta {
  background: var(--raised);
  color: var(--text);
  border-radius: var(--r-pill);
  padding: 6px 10px;
  white-space: nowrap;
  font-weight: 600;
}
html body #job-offer-modal .v2-offer-eta-detail {
  color: var(--text-2);
}
html body #job-offer-modal .v2-offer-route {
  border-left: 2px solid var(--stroke);
  padding-left: var(--s4);
  margin: var(--s5) 0;
}
/* Issue #142 r3 (Pixel answer 3): each address stays ONE bold line
   that wraps - explicit wrap/no-clip behaviour so no ellipsis, nowrap
   or overflow clipping can ever hide address text. */
html body #job-offer-modal .v2-offer-route p {
  white-space: normal;
  overflow-wrap: break-word;
  text-overflow: clip;
  overflow: visible;
}
html body #job-offer-modal .v2-offer-fare {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--s3);
}
/* 48px tabular numerals: the fare amount and the countdown number
   (#142 spec size; the 72px --t-glance token is for the big meter and
   fare screens that later v3 slices build). */
html body #job-offer-modal .v2-num,
html body #job-offer-modal .timer {
  font-size: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text);
}
html body #job-offer-modal .v2-offer-ringwrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}
/* Issue #142 r3 (Pixel answer 5): the ring DEPLETES with the existing
   countdown - an SVG stroke pair replaces the static border. The page
   sets --v2-ring-progress (0..1) inside the EXISTING 1s tick (no new
   timers); the arc reads it as a dash offset, so the white stroke
   drains clockwise from 12 o'clock. 1s linear transition = smooth
   drain; prefers-reduced-motion steps it once per second instead. */
html body #job-offer-modal .v2-offer-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--s1);
  margin: var(--s5) 0;
}
html body #job-offer-modal .v2-offer-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
html body #job-offer-modal .v2-offer-ring-svg circle {
  fill: none;
  stroke-width: 7px;
}
html body #job-offer-modal .v2-offer-ring-track { stroke: var(--overlay); }
html body #job-offer-modal .v2-offer-ring-arc {
  stroke: var(--text);
  stroke-dasharray: 358.14px;
  stroke-dashoffset: calc(358.14px * (1 - var(--v2-ring-progress, 1)));
  transition: stroke-dashoffset 1s linear;
}
@media (prefers-reduced-motion: reduce) {
  html body #job-offer-modal .v2-offer-ring-arc { transition: none; }
}
html body #job-offer-modal .v2-offer-ring .timer { margin: 0; }
html body #job-offer-modal #offer-timer-label { color: var(--text-2); }
html body #job-offer-modal #offer-expiry-caption {
  color: var(--text-2);
  text-align: center;
  margin: 0 0 var(--s4);
}
html body #job-offer-modal .v2-offer-actions {
  width: 100%;
  max-width: 420px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
}
html body #job-offer-modal .v2-offer-actions button { margin: 0; width: 100%; }
/* Sticky primary: 64px white 600 18px; secondary: grey, >=48px. */
html body #job-offer-modal .v2-offer-accept {
  background: var(--text);
  color: var(--on-light);
  border: 1px solid var(--text);
  min-height: 64px;
  font-size: 18px;
  font-weight: 600;
  border-radius: var(--r-control);
}
html body #job-offer-modal .v2-offer-refuse {
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--stroke);
  min-height: var(--hit-min);
  font-weight: 600;
  border-radius: var(--r-control);
}

/* Missed-job / job-cancelled alert cards: dark grey card + 4px left
   rail - amber by default (missed-job rewrite), red via
   .v2-alert-danger (job cancelled). .alert-amber is added/removed by
   showMissedJobModal and drives the amber heading rule above. */
html body .v2-alert-card {
  background: var(--raised);
  border: 1px solid var(--overlay);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-control);
  padding: 24px 20px;
  max-width: 420px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
html body .v2-alert-card.v2-alert-danger { border-left-color: var(--danger); }
/* Alert actions: white primary 56px, ghost secondary 56px below it;
   never a coloured fill. */
html body .v2-alert-card .v2-alert-primary {
  background: var(--text);
  color: var(--on-light);
  border: 1px solid var(--text);
  min-height: var(--hit-driving);
  font-weight: 600;
  border-radius: var(--r-control);
  width: 100%;
}
/* Issue #142 r3 (Pixel answer 1): NO - Log Off is a GHOST secondary
   below the primary - grey outline, white text, transparent fill -
   and BOTH alert buttons are 56px tall (min-height --hit-driving)
   and full width; never a coloured fill. */
html body .v2-alert-card .v2-alert-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--stroke);
  min-height: var(--hit-driving);
  border-radius: var(--r-control);
  width: 100%;
  margin-top: var(--s3);
}

/* ==============================================================   Issue #222: v3 base component classes (the v3 "Focus" kit).
   CSS + markup classes ONLY - screens are rebuilt slice by slice
   (#223-#235), so nothing here moves or restyles any existing screen
   except the toast above. Spec: issue #222 + mockups 02/10/15/22.
   QA page: tests/fixtures/v3-kit.html (links this sheet; every
   component in default, pressed, disabled, busy and focus states).
   Colour rule: only tokens.css values (+ the two decorative chip
   borders below); scrim/shadows are rgba() black, never hex.
   ===================================================================== */

/* ---- Type scale (Geist; tabular figures for every number) ---- */
/* glance: fare, meter, countdown. 600, -0.055em, tabular; the currency
   sign sits at 0.5em in --text-2 (mockup 02/14). Screens tune the size
   76-104px; the class default is the --t-glance token. The size is
   clamped CONTAINER-RELATIVE (clamp(40px, 22cqw, 72px) of the nearest
   inline-size container - the kit pins one on .kit-sec, screens adopt
   the same): 22cqw of a 350px fresh screen is 77px, so the 72px token
   wins at 1x/3x, while at 200% zoom the clamp FLOORS the amount at
   40px CSS so the money never shrinks below the address under it
   (QA pr247 must-fix B: min() let the glance shrink to ~34px and
   invert the type hierarchy; an amount still fits the ~155px measure
   at 200%). Plain vw would be wrong twice: it counts the screen
   margin (19vw of 390, not of the 350 content) and under CSS zoom vw
   stays at the unzoomed viewport (QA pr241 item 4). Screens
   overriding the size re-cap with their own clamp(). Only the
   currency sign is small - the figures stay full size (mockups
   07/13/15: it reads £24.80, never £24·80). */
html body .v3-glance {
  font: 600 var(--t-glance);
  font-size: clamp(40px, 22cqw, 72px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
}
html body .v3-glance .v3-currency {
  font-size: 0.5em;
  letter-spacing: -0.03em;
  vertical-align: 0.62em;
  margin-right: 2px;
  color: var(--text-2);
}
/* display: the one address or name on screen. 600, -0.035em. The size
   is fluid against the same container (clamp(22px, 11.5cqw, 40px):
   11.5cqw of the 350px content is 40px, so 1x/3x keep the token;
   at 200% it bottoms out at 22px CSS, where "components" and
   "Passenger" still fit the 155px measure). Whole words wrap
   (break-word, which never collapses a flex item's min-content the
   way anywhere did); hyphenation is the last resort and only for
   12+ letter words (pr247 must-fix A; pages are lang-tagged). */
html body .v3-display {
  font: 600 var(--t-display);
  font-size: clamp(22px, 11.5cqw, 40px);
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 12 6 6;
}
/* title / sheet title: the same fluid clamp + wrap rules as the
   display (20px floor, 8cqw, 28px token cap) - "Extend" keeps fitting
   a sheet head at 200% instead of splitting mid-word (pr247 A). */
html body .v3-title {
  font: 600 var(--t-title);
  font-size: clamp(20px, 8cqw, 28px);
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 12 6 6;
}
html body .v3-head { font: 600 var(--t-head); }
html body .v3-body { font: 400 var(--t-body); }
html body .v3-label { font: 500 var(--t-label); }
/* caption: 13px/500, uppercase, +0.09em, --text-3. */
html body .v3-cap {
  font: 500 var(--t-cap);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
}
html body .v3-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
html body .v3-m2 { color: var(--text-2); }
html body .v3-m3 { color: var(--text-3); }

/* ---- Buttons ----
   primary: white fill, black label, 64px, radius 20, 600 18px.
   secondary: --raised, 1px --stroke border, 56px, 17px.
   quiet: transparent text button in --text-2, 48px.
   danger: --danger text on --surface (a danger ROW action).
   disabled: --raised with a --text-3 label (the universal button rule).
   pressed: --overlay (.v3-pressed pins it for QA/programmatic use).
   busy: keeps the label slot (e.g. "Finalising…"), pointer frozen. */
html body .v3-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  width: 100%;
  border: 0;
  border-radius: 20px;
  font: 600 18px/1 var(--font-ui);
  letter-spacing: -0.01em;
  background: transparent;
  color: var(--text);
  box-sizing: border-box;
}
html body .v3-btn--primary {
  background: var(--text);
  color: var(--on-light);
  min-height: var(--hit-primary);
}
html body .v3-btn--secondary {
  background: var(--raised);
  border: 1px solid var(--stroke);
  min-height: var(--hit-driving);
  font-size: 17px;
}
html body .v3-btn--quiet {
  background: transparent;
  color: var(--text-2);
  min-height: var(--hit-min);
  font-weight: 500;
  font-size: 16px;
}
html body .v3-btn--danger {
  background: var(--surface);
  color: var(--danger);
  min-height: var(--hit-driving);
  font-size: 17px;
}
/* Pressed is --overlay; the primary's black label flips to white so
   the pressed fill stays readable (white on --overlay = 15:1). */
html body .v3-btn:active:not(:disabled),
html body .v3-btn.v3-pressed:not(:disabled) {
  background: var(--overlay);
}
html body .v3-btn--primary:active:not(:disabled),
html body .v3-btn--primary.v3-pressed:not(:disabled) {
  color: var(--text);
}
/* Busy keeps the label slot; the optional .v3-spin ring may sit in it. */
html body .v3-btn[aria-busy="true"],
html body .v3-btn.v3-busy {
  pointer-events: none;
}
html body .v3-spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  border-top-color: var(--text);
  flex: none;
  animation: v3-spin 0.9s linear infinite;
}
@keyframes v3-spin { to { transform: rotate(360deg); } }

/* ---- Card / rows ----
   card: --surface, 1px --hairline, radius 22.
   rows: >=56px each, --hairline dividers, 16px inset, leading icon in
   --text-2, trailing chevron in --text-3. Rows are often <a>: the
   text inherits the card's white (color: inherit), never the UA
   link lavender, and never underlines. */
html body .v3-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
html body .v3-rows > * {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--hit-driving);
  padding: 0 var(--s4);
  border-top: 1px solid var(--hairline);
  color: inherit;
  text-decoration: none;
}
html body .v3-rows > *:first-child { border-top: 0; }
/* #223 r6: a row label WRAPS, and a word longer than the shrunk
   column breaks instead of overflowing the flex item and painting
   over the trailing count (at 200% zoom "Upcoming jobs" overflowed
   onto its "0"). The trailing count/badge is flex:none like the
   chevron, so it never gives way to the label either. */
html body .v3-rows .v3-grow { flex: 1; min-width: 0; overflow-wrap: break-word; }
html body .v3-rows .v3-icon { color: var(--text-2); flex: none; }
html body .v3-rows .v3-chev { color: var(--text-3); flex: none; }
html body .v3-rows > .v3-num,
html body .v3-rows > .v3-badge { flex: none; }
/* Danger row: --danger text (and icon) on --surface, at the very
   bottom of a sheet, never near the primary button. */
html body .v3-row--danger,
html body .v3-row--danger .v3-icon { color: var(--danger); }

/* ---- Tiles (Home 88px, job screens 76px; a row shares the width
   with a 10px gap; icon 26px over a 15px/500 label) ---- */
html body .v3-tiles { display: flex; gap: 10px; }
html body .v3-tile {
  flex: 1;
  box-sizing: border-box;
  height: 88px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font: 500 var(--t-label);
  color: var(--text);
  text-decoration: none;
}
html body .v3-tile .v3-icon { color: var(--text); }
html body .v3-tile--job { height: 76px; }

/* ---- Chips (32px visual, fully round, --raised, icon 16px).
   If it can be tapped, its hit area is >=48px (the --hit apron adds
   an invisible 8px ring around the 32px pill). The warn/danger
   variant borders are the ONLY non-token hexes in this sheet, and
   they are decorative (the icon + words carry the meaning). ---- */
html body .v3-chip {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  font: 500 14px/1 var(--font-ui);
  color: var(--text);
}
html body .v3-chip .v3-icon { color: var(--text-2); flex: none; }
/* Issue 1000: the stage label breathes while the customer tracks.
   Colour only - no layout shift. Pixel default, Boss may override. */
@keyframes v3-label-breathe {
  0%, 100% { color: var(--text); }
  50%       { color: var(--danger); }
}
html body.job-active .v3-stage-label.v3-tracking {
  animation: v3-label-breathe 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  html body.job-active .v3-stage-label.v3-tracking {
    animation: none;
    color: var(--text);
  }
}

/* Issue 878: tracking badge tones use theme tokens */
html body #job-tracking-badge {
  background: var(--overlay);
  color: var(--text);
}
html body .v3-chip--warn {
  background: var(--warn-bg);
  border-color: #5a4720;
  color: var(--warn);
}
html body .v3-chip--warn .v3-icon { color: var(--warn); }
html body .v3-chip--danger {
  background: var(--danger-bg);
  border-color: #5a2a2a;
  color: var(--danger);
}
html body .v3-chip--danger .v3-icon { color: var(--danger); }
html body .v3-chip--hit::after {
  content: "";
  position: absolute;
  inset: -8px;
}
/* #228 s3 fu (Pixel PR423 QA, 11 Nov 2026): the on-board passenger
   row's "Minor, 14+" chip is tappable but its markup carries no
   --hit class, so its >=48px hit area (32px pill + the same
   invisible 8px apron) is painted here, scoped to the chip, beside
   the touch rule it mirrors - the s3 section itself stays
   pseudo-free per its to-EOF freeze. */
html body .v3-paxrow-chip::after {
  content: "";
  position: absolute;
  inset: -8px;
}

/* ---- Pill (status pill, 48px, fully round) + connection dot ----
    #223 r6 sized the pill to its CONTENT (dot + word) after the r5
    stretch; #223 r8 pinned a FIXED inline size (7.5rem) so Online
    and On break got the same pill; #223 r12 (boss: "reduce the
    padding around the Online pill, not too much") goes back to the
    content-sized box, but with the --s3 (12px) inline padding the
    r6 auto box never had: the short Online/Offline labels no longer
    float in the fixed box's spare width, the pill only wraps its
    own dot + word, and flex:none keeps any flex parent from
    stretching it. Declared, not inherited: the v2 page's legacy
    "input, button { width: 100% }" block would otherwise stretch
    any button pill to the whole remaining row (the r5 pill measured
    206.8px of the 390px bar). The height stays var(--hit-min)
    (48px) so the tap target never shrinks, and the r6 narrow
    container query below still swaps in the dot-only shape at
    <=300px. */
html body .v3-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  box-sizing: border-box;
  inline-size: auto;
  flex: none;
  height: var(--hit-min);
  padding: 0 var(--s3);
  white-space: nowrap;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  font: 500 var(--t-label);
  color: var(--text);
  text-decoration: none;
}
html body .v3-pill .v3-icon { color: var(--text-2); }
html body .v3-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
  flex: none;
}
html body .v3-dot--warn {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(255, 200, 87, 0.15);
}
html body .v3-dot--off {
  background: transparent;
  border: 1.5px solid var(--text-3);
  box-shadow: none;
}

/* Icons never shrink (pr247 must-fix C): a .v3-icon is a fixed-size
   inline SVG, but as a flex item it could be squeezed to 0 height by
   a shorter fixed-height column (the wash frame collapsed both 34px
   icons to 34x0). Every scoped rule below keeps its own flex:none;
   this one makes it true for ANY flex parent (washes, tiles, rows). */
html body .v3-icon { flex: none; }

/* ---- Icon button + badge (min 20px, white with black 12px/700 text
    and a 3px black ring). The button box keeps the full --hit-min
    hit target; the VISIBLE circle paints from a ::before grid cell
    UNDER the glyph (box-sizing border-box, so the 1px hairline sits
    inside the declared size). #223 r10 (Pixel QA nit 1): the r8
    40px circle is scoped to the TOP-BAR Menu and ✕ buttons only -
    every other icon button (the sheet ✕, the later Call/Message)
    paints the mockups' 48px circle again with the SVG's own 22px
    glyph; on the two bars the r8 look stays: a 40px circle
    (calc(var(--hit-min) - var(--s2)), border-box) with an 18px
    glyph and the 4px transparent apron hit area around it. ---- */
html body .v3-iconbtn {
  position: relative;
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
  border-radius: 50%;
  background: transparent;
  border-color: transparent;
  display: grid;
  place-items: center;
  color: var(--text);
  padding: 0;
}
html body .v3-iconbtn::before {
  content: "";
  grid-area: 1 / 1;
  box-sizing: border-box;
  width: var(--hit-min);
  height: var(--hit-min);
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--hairline);
}
html body .v3-iconbtn .v3-icon { grid-area: 1 / 1; }
/* #223 r8 look kept on the top-bar round controls only (#223 r10). */
html body .v3-topbar .v3-iconbtn::before,
html body .v3-menu-bar .v3-iconbtn::before {
  width: calc(var(--hit-min) - var(--s2));
  height: calc(var(--hit-min) - var(--s2));
}
html body .v3-topbar .v3-iconbtn .v3-icon,
html body .v3-menu-bar .v3-iconbtn .v3-icon {
  width: 18px;
  height: 18px;
}
html body .v3-iconbtn--plain::before { background: transparent; border-color: transparent; }
html body .v3-iconbtn:active::before { background: var(--overlay); }
/* #223 r8: the round shell controls (the Menu button, the two ✕ close
   buttons, the status pills) NEVER paint the focus ring from a pointer
   or a programmatic focus: the open handlers MOVE focus to the ✕ for
   a11y (kept), and that move previously left a "bold white ring"
   behind a tap - plain :focus is fully suppressed here, so the ring
   shows ONLY on :focus-visible (the keyboard ring at the top of the
   sheet), which :not() below can never take away. */
html body .v3-iconbtn:focus:not(:focus-visible),
html body .v3-pill:focus:not(:focus-visible) {
  outline: none;
}
html body .v3-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--text);
  color: var(--on-light);
  font: 700 12px/20px var(--font-ui);
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-shadow: 0 0 0 3px var(--canvas);
}

/* ---- Segmented control (--surface track, 48px segments; the
   selected one is white with black 600 text). pr247 must-fix A: the
   track WRAPS instead of splitting labels - at 200% zoom three equal
   ~46px segments cannot hold "Cash"/"Card"/"Account" one per line, so
   the labels keep their natural width (max-content, nowrap) and the
   track becomes two rows ("Cash | Card" / "Account"); at 1x the three
   stay equal-width on one row. ---- */
html body .v3-seg {
  display: flex;
  flex-wrap: wrap;
  padding: var(--s1);
  gap: var(--s1);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}
html body .v3-seg > * {
  flex: 1 1 0;
  min-width: max-content;
  min-height: var(--hit-min);
  padding: 0 var(--s2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font: 500 16px/1.15 var(--font-ui);
  color: var(--text-2);
  background: transparent;
  border: 0;
  overflow-wrap: normal;
  white-space: nowrap;
  text-align: center;
}
html body .v3-seg > .v3-seg--on {
  background: var(--text);
  color: var(--on-light);
  font-weight: 600;
}

/* ---- Switch (52x32 visual inside a >=56px row) ---- */
html body .v3-switch {
  width: 52px;
  height: 32px;
  border-radius: 16px;
  background: var(--stroke);
  border: 0;
  position: relative;
  flex: none;
  padding: 0;
  transition: background var(--dur-tap) var(--ease-out);
}
html body .v3-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text-2);
  transition: left var(--dur-tap) var(--ease-out),
              background var(--dur-tap) var(--ease-out);
}
html body .v3-switch--on { background: var(--text); }
html body .v3-switch--on::after { left: 23px; background: var(--on-light); }
html body .v3-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--hit-driving);
}

/* ---- Field (56px, radius 16, --surface, --stroke border, 17px text;
   the label above it is 14px --text-2) ---- */
html body .v3-field {
  box-sizing: border-box;
  width: 100%;
  height: var(--hit-driving);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  font: 400 var(--t-body);
  color: var(--text);
}
html body .v3-field::placeholder { color: var(--text-3); }
html body .v3-lbl {
  font: 500 14px/1 var(--font-ui);
  color: var(--text-2);
  margin: 0 0 var(--s2) 2px;
}

/* ---- Sheet + scrim ----
   sheet: --raised, 28px top radius, 36x5 grab handle, header with the
   title (28px), optional sub line and a 48px close button; the body
   scrolls inside the sheet. It rises in 280ms with --ease-out
   (instant under prefers-reduced-motion: the duration tokens zero).
   scrim: black at 70%, always below the sheet, tap closes (WCAG 2.5.7;
   dragging is optional). The grab handle is the spec's decorative
   mid-grey, written rgb(90, 90, 90) so the sheet stays hex-token-pure. */
html body .v3-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  background: var(--raised);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  transition: transform var(--dur-sheet) var(--ease-out);
}
html body .v3-sheet--closed { transform: translateY(100%); }
html body .v3-sheet-grab {
  flex: none;
  height: 28px;
  display: grid;
  place-items: center;
}
html body .v3-sheet-grab::after {
  content: "";
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgb(90, 90, 90);
}
html body .v3-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 var(--s4) var(--s2) 20px;
}
/* Sheet title: same fluid clamp + wrap rules as .v3-title (pr247
   must-fix A - "Extend break" no longer splits inside "Extend"). */
html body .v3-sheet-title {
  margin: 0;
  font: 600 var(--t-title);
  font-size: clamp(20px, 8cqw, 28px);
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 12 6 6;
}
/* Sub line sits UNDER the title, left-aligned with it at the head's
   20px inset (mockup 10-job-sheet). */
html body .v3-sheet-sub {
  margin: 0;
  padding: 0 var(--s4) 0 20px;
  color: var(--text-2);
  font: 400 var(--t-body);
}
/* #223 r10 (Pixel QA must-fix): a sub line placed INSIDE a sheet head
   must not re-add the 20px inset - the head already carries it
   (padding: 0 var(--s4) var(--s2) 20px), so the #222 rule double-
   insetted the Status sheet's "Updated live" 20px right of "Status"
   (wrapping to "Updated / live" beside the ✕ at 200%). The 20px
   padding stays only for a sub line placed directly in .v3-sheet
   (the kit's sheets, where it aligns with the body's 16px inset). */
html body .v3-sheet-head .v3-sheet-sub { padding: 0; }
html body .v3-sheet-body {
  padding: 0 var(--s4);
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}
html body .v3-sheet-foot {
  flex: none;
  padding: var(--s3) var(--s4) max(16px, env(safe-area-inset-bottom));
}
html body .v3-scrim {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sheet) - 1);
  background: rgba(0, 0, 0, 0.7);
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-sheet) var(--ease-out);
}
html body .v3-scrim--on { opacity: 1; pointer-events: auto; }

/* ---- Alert wash (full-screen alerts, mockup 22): a radial gradient
   from the top, --danger-bg / --warn-bg / --raised fading to the
   canvas. Colour always comes with an icon and words. ---- */
html body .v3-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 60% at 50% 0%, var(--raised) 0%, var(--canvas) 60%);
}
html body .v3-wash--danger {
  background: radial-gradient(120% 60% at 50% 0%, var(--danger-bg) 0%, var(--canvas) 60%);
}
html body .v3-wash--warn {
  background: radial-gradient(120% 60% at 50% 0%, var(--warn-bg) 0%, var(--canvas) 60%);
}
/* The wash is the bottom layer: every sibling after it (icon,
   caption, display line - mockup 22) sits ABOVE the gradient, so
   the content can never paint under the wash. */
html body .v3-wash ~ * { position: relative; z-index: 1; }

/* Reduced motion: the spinner freezes (the label slot still shows the
   busy words); every transition above already reads the duration
   tokens, which the :root reduced-motion block zeroes. */
@media (prefers-reduced-motion: reduce) {
  html body .v3-spin { animation: none; }
}

/* ==============================================================   Issue #223 (driver v3 "Focus", slice 2 of 14): the app shell on the
   HIDDEN v2 page only — 64px top bar (Menu button with the pending
   badge, the anytime. wordmark, the status pill plus a dot-only
   variant class for the later job screens), the Status sheet (03) and
   the full-screen Menu (20) at --z-menu, plus the mic/install banners
   as one mono card row each. Presentation only: every control calls
   the same existing functions and all state is mirrored from the
   legacy elements, never fetched anew. The legacy #status-bar,
   #sub-header-bar and #driver-menu stay in the DOM and keep updating
   (existing JS reads them); the shell hides them visually — a 0x0
   fixed box, never display:none, so nothing the JS toggles breaks.
   No override bangs anywhere; colours are tokens only (scrim/shadow
   blacks are rgba()).
   ===================================================================== */

/* ---- The app root is the inline-size container the #222 fluid
   sizes resolve against (pr247 nit 1). The QA kit pins the same
   container-type on .kit-sec; without one on a real screen the cqw
   units fall back to small-viewport units and 200% zoom would resolve
   the clamps against the whole viewport instead of the screen column.
   The body is the shell's app root (the v2 page keeps the legacy
   fixed-position body layout); its width is viewport-fixed, so
   inline-size containment is layout-neutral, and the 200% zoom
   behaviour then matches the kit exactly. ---- */
html body { container-type: inline-size; }

/* ---- Top bar (mockups 02/03/20): 64px, 16px side padding. The
     safe-area top inset rides as a canvas-coloured border (not a
     padding-top: the #155 invariant keeps exactly one top-inset
     carrier, the legacy header strip's inline padding).
     #223 r6: the bar is a 3-column grid, not flex space-between
     (r5's 206.8px legacy-stretched pill pushed the wordmark 79px
     off centre). #223 r10 (owner): the wordmark moves LEFT, right
     next to the Menu button, as before r6 - auto auto 1fr makes
     the first two columns content-sized (Menu button, wordmark)
     and the 1fr third column carries the pill at its right end
     (justify-self, so the fixed-size pill does not stretch). ---- */
html body .v3-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--s3);
  box-sizing: border-box;
  min-height: calc(64px + env(safe-area-inset-top));
  padding: 0 var(--s4);
  border-top: env(safe-area-inset-top) solid var(--canvas);
  background: var(--canvas);
}
/* The legacy inline `input, button { margin-top: 10px }` still hits
   the Menu button and the pill inside both bars, but not the
   wordmark or stagebar (spans/divs); flex centring halves the 10px
   into a 5px downward shift. Zero the vertical margin on every bar
   item so the bars' align-items: center line alone governs. */
html body .v3-topbar > *,
html body .v3-menu-bar > * { margin-top: 0; }
html body .v3-topbar > :first-child,
html body .v3-menu-bar > :first-child { justify-self: start; }
html body .v3-topbar > .v3-pill,
html body .v3-menu-bar > .v3-pill { justify-self: end; }
html body .v3-topbar > .v3-pill,
html body .v3-menu-bar > .v3-pill { margin-left: auto; }
/* #226 r4 (Pixel design call): the status pill keeps ONE fixed
   min-width - 106px fits the longest state word, "On break" - so
   the pill never changes width between Online / Offline / On
   break (a state only ever repaints the dot class + the word,
   never the box); justify-self: end keeps the right edge fixed,
   so the box cannot breathe under the wordmark either. The same
   one rule covers both bars' pills identically for every state,
   and the r6 narrow query below re-pins the box to the dot-only
   48x48 shape at <=300px. */
html body .v3-topbar > .v3-pill,
html body .v3-menu-bar > .v3-pill { min-width: 106px; }
html body .v3-wordmark {
  height: var(--hit-min);
  display: inline-flex;
  align-items: center;
  font: 650 21px var(--font-ui);
  letter-spacing: -0.045em;
  color: var(--text);
}
html body .v3-wordmark b { color: var(--text-3); font-weight: 650; }
/* #223 r9 (owner decision): the wordmark reads AnyTime - the capital
   A and T sit in the trademark brand green (--brand, above), "ny" and
   "ime" stay white (the span's --text) and the full stop keeps its
   --text-3 treatment. Wordmark letters ONLY: no other element may
   use --brand. */
html body .v3-wordmark b.v3-wm-brand { color: var(--brand); font-weight: 650; }
/* On-job top bars (slice 7, #228) swap the wordmark for the step bar
   and the pill for a 48px dot-only status button; the variant ships
   now so the class is part of the kit. */
html body .v3-pill--dot {
  width: var(--hit-min);
  padding: 0;
  justify-content: center;
}

/* ---- Status sheet (03): the #222 sheet component plus the closed
   state leaving the tab order / a11y tree only when it has finished
   sliding out (visibility is discrete: flips at once when opening,
   after the slide when closing). ---- */
html body .v3-sheet--closed {
  visibility: hidden;
  transition: transform var(--dur-sheet) var(--ease-out),
              visibility 0s linear var(--dur-sheet);
}
/* Opened from the Menu's own pill, the sheet and its scrim stack
   above the Menu (--z-menu) while it is on screen. */
html body .v3-scrim.v3-over-menu { z-index: var(--z-menu); }
html body .v3-sheet.v3-over-menu { z-index: calc(var(--z-menu) + 1); }
/* v3 #228 s3 (the PR416 pixel nit, 11 Nov 2026): while the meter
   panel is open (v1's own body.meter-active from toggleMeter), the
   Status sheet and its scrim stack at 12001 - ONE over the meter
   panel's own 12000 - otherwise the sheet (--z-sheet 20) paints
   under the open panel. The v3-over-menu way: keyed on the class v1
   itself already toggles, nothing else in the stacking moves (the
   dock keeps 12000, the Menu keeps --z-menu, every other sheet keeps
   --z-sheet); the raised sheet closes back to --z-sheet the moment
   the meter does. */
html body.meter-active #v3-status-scrim { z-index: 12001; }
html body.meter-active .v3-sheet#v3-status-sheet { z-index: 12001; }
/* Sheet row value: dot + word (Auto/Jobs are words only). */
html body .v3-strowval {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  font: 500 var(--t-label);
  flex: none;
}
html body .v3-sheet-note {
  margin: 14px var(--s1) 0;
  color: var(--text-3);
  font: 500 var(--t-label);
}

/* ---- Full-screen Menu (20) at --z-menu: cross-fades with the
   duration tokens (instant under reduced motion); off-screen it is
   invisible, untouchable and out of the tab order. ---- */
html body .v3-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-screen) var(--ease-std),
              visibility 0s linear var(--dur-screen);
}
html body .v3-menu.v3-menu--on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--dur-screen) var(--ease-std);
}
/* Menu top bar: same 64px shape and #223 r6/r10 3-column grid as the
     page top bar (safe-area inset as the canvas border, same as
     .v3-topbar): ✕ first, wordmark right next to it, pill at the
     right end. */
html body .v3-menu-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s3);
  box-sizing: border-box;
  min-height: calc(64px + env(safe-area-inset-top));
  padding: 0 var(--s4);
  border-top: env(safe-area-inset-top) solid var(--canvas);
}
html body .v3-menu-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--s4) var(--s3);
}
/* Driver header: 52px initials circle, name (head), id + eligibility. */
html body .v3-menu-head {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-top: var(--s1);
}
html body .v3-menu-initials {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font: 600 18px var(--font-ui);
  color: var(--text);
}
html body .v3-menu-cap { margin: 18px var(--s1) var(--s2); }
/* Menu rows are buttons inside .v3-rows: transparent on the card,
   left-aligned, >=52px (the rows floor is --hit-driving = 56px). */
html body .v3-mrow {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  text-align: left;
}
/* The Pending completions badge sits inline in its row, not pinned to
   a corner like the Menu button badge. */
html body .v3-badge--row { position: static; box-shadow: none; }
/* Issue 1001: both Pending completions rows stay hidden while the queue
   is empty; the Menu button carries an amber count badge (the white
   badge is the available-jobs one). Number only, no bang. */
html body .v3-mrow[hidden] { display: none; }
html body .v3-menu-btn--pending #v3-menu-badge {
  background: var(--warn);
  color: var(--on-light);
  box-shadow: 0 0 0 3px var(--canvas);
}
/* Log off: full-width secondary button pinned to the bottom.
   #223 r6: width auto lets the flex-column stretch size it to the
   menu minus its own margins (the .v3-btn width:100% plus side
   margins pushed the right edge 16px past the viewport at every
   zoom), and the side insets now carry the safe-area padding too,
   because the fixed .v3-menu spans the whole viewport, outside the
   body's left/right env() padding. box-sizing:border-box keeps the
   declared height the box the border sits inside. */
html body .v3-menu-logoff {
  flex: none;
  width: auto;
  box-sizing: border-box;
  margin: var(--s2)
          calc(var(--s4) + env(safe-area-inset-right))
          calc(var(--s2) + env(safe-area-inset-bottom))
          calc(var(--s4) + env(safe-area-inset-left));
}

/* ---- #223 r6 (rendered QA): the two bars at 200% zoom. The body is
    the app root container (container-type: inline-size, above), so
    ONE container query covers both bars at every zoom level: below
    300px of container width a 48px hit button + the wordmark + a word
    pill no longer share the row (390px at 200% zoom is 195px, and
    48 + 79 + 93 + two 12px gaps + two 16px insets is 276px), so the
    bars go snug (4px insets and gaps) and the pill drops its WORD to
    the dot-only shape the .v3-pill--dot variant gives the later job
    screens. The word span keeps its id and stays the pill's LIVE
    accessible name (Online / Offline) - hidden with the sr-only clip,
    never display:none - and the wordmark clamps down (15px floor,
    6.7cqw against the same container) so every bar item still sits
    inside the viewport down to ~170px containers. No id, handler or
    script change: v3SyncStatus keeps writing the same word spans.
    #223 r11 (live-site report): the snug gaps move 4px -> 8px
    (--s2, Pixel's >=8px item spacing rule) - the r10 left-placed
    wordmark sat only 4px from the Menu button / the Menu ✕ at 200%
    zoom; the 4px insets stay and the dot-only pill keeps ~22px of
    clearance at 195px, so nothing clips. ---- */
@container (max-width: 300px) {
  html body .v3-topbar,
  html body .v3-menu-bar {
    gap: var(--s2);
    padding: 0 var(--s1);
  }
  html body .v3-topbar .v3-wordmark,
  html body .v3-menu-bar .v3-wordmark {
    font-size: clamp(15px, 6.7cqw, 21px);
  }
  html body .v3-topbar .v3-pill,
  html body .v3-menu-bar .v3-pill {
    position: relative;
    width: var(--hit-min);
    min-width: var(--hit-min);
    padding: 0;
    justify-content: center;
  }
  /* #223 r10 (Pixel QA nit 4): the pill ends flush at the bar's 4px
     right inset here, so the keyboard ring's 3px offset pushed its
     outer edge past the viewport at 200% zoom (x=197 on 195); the
     ring rides ON the pill edge instead, staying inside. */
  html body .v3-topbar .v3-pill:focus-visible,
  html body .v3-menu-bar .v3-pill:focus-visible {
    outline-offset: 0;
  }
  html body .v3-topbar .v3-pill .v3-pill-word,
  html body .v3-menu-bar .v3-pill .v3-pill-word {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---- #223 r7 (rendered QA): the Menu rows, the Menu driver header
    and the Status sheet rows at 200% zoom (195px effective). Under
    the r6 space flex row the label column measured only ~40px wide
    there, because the row icon + the trailing count + the chevron +
    three 14px gaps + two 16px insets eat ~149px of the 161px card,
    and the r6 overflow-wrap:break-word split the labels MID-WORD
    ("Upco|ming jobs", "Availabl|e jobs"). Below 260px of the app-root
    container the Menu/Status rows turn into a two-line grid instead:
    the decorative row icon HIDES (it is aria-hidden markup - the row
    button keeps its text accessible name), the label takes the whole
    first line (with the chevron spanning both lines at the right
    edge) and the trailing count/badge - the sheet row value - moves
    UNDER the label, so the two can never collide. The label itself
    wraps WHOLE WORDS only: overflow-wrap/word-break back to normal
    and hyphens manual, so the break-word fallback (kept above 260px,
    where every word fits its column) can never split a word again.
    Scoped to #v3-menu / #v3-status-sheet only - the #222 kit page
    shares .v3-sheet .v3-rows and keeps its r6 look. 1x (390px,
    above the query) is untouched, so the r6 1x shots stay valid.
    Tokens only; no id, handler or script change. ---- */
@container (max-width: 260px) {
  html body #v3-menu .v3-rows > *,
  html body #v3-status-sheet .v3-rows > * {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "label chev"
      "count chev";
    align-content: center;
    gap: var(--s1) var(--s2);
    padding: var(--s1) var(--s3);
  }
  html body #v3-menu .v3-rows .v3-icon,
  html body #v3-status-sheet .v3-rows .v3-icon { display: none; }
  html body #v3-menu .v3-rows .v3-grow,
  html body #v3-status-sheet .v3-rows .v3-grow {
    grid-area: label;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }
  html body #v3-menu .v3-rows > .v3-num,
  html body #v3-menu .v3-rows > .v3-badge,
  html body #v3-status-sheet .v3-rows .v3-strowval { grid-area: count; }
  html body #v3-menu .v3-rows .v3-bookjob-menu-badge {
    grid-area: count;
    justify-self: start;
    align-self: center;
    width: fit-content;
  }
  html body #v3-menu .v3-rows .v3-chev { grid-area: chev; }
}
/* Issue 1001: the empty-queue Pending completions row stays hidden even
   though the narrow Menu grid rule above puts display on every row. */
html body #v3-menu .v3-rows > #v3-menu-pending-row[hidden] { display: none; }

/* ---- Mic / install banners: one mono card row each, shown only by
   their existing JS triggers (the show/hide rules are untouched). ---- */
html body .v3-banner-row {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  margin: var(--s2) var(--s4) 0;
  color: var(--text);
}
html body .v3-banner-inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
}
html body .v3-banner-inner .v3-icon { color: var(--text-2); flex: none; }
html body .v3-banner-text {
  flex: 1;
  min-width: 0;
  color: var(--text-2);
  font: 400 15px/1.45 var(--font-ui);
}
html body .v3-banner-text strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 2px;
}
html body .v3-banner-howto {
  display: block;
  margin-top: var(--s1);
  color: var(--text-3);
  font: 500 13px/1.5 var(--font-ui);
}
html body .v3-banner-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--s4) var(--s3);
}
html body .v3-banner-btn {
  flex: none;
  min-height: var(--hit-min);
  padding: 0 var(--s4);
  background: var(--raised);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  color: var(--text);
  font: 600 15px/1 var(--font-ui);
  cursor: pointer;
}

/* ---- The shell replaces the legacy top chrome. Their ids stay in
   the DOM and keep updating (the WS dispatch/GPS/Auto code, the login
   code and the menu show/hide rules all still write them); the shell
   only makes them invisible: a 0x0 fixed box keeps every getElementById
   lookup and style.display toggle the existing code performs. ---- */
html body #status-bar,
html body #sub-header-bar,
html body #driver-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

/* ---- #223 r11 (live-site report on #223): the legacy "UPCOMING
   JOBS YOU OWN" bottom drawer - the swipe-up grip with the count,
   #owned-jobs-section inside #cyber-standby, a fixed sheet at
   z-index 20 like the Status sheet but later in the DOM - painted
   ON TOP of the v3 Status sheet's lower rows and over the scrim,
   and floated over the bottom of the full-screen Menu too. Pure
   CSS, keyed on the real open-state classes the shell's own
   open/close functions already toggle (every .v3-sheet drops
   .v3-sheet--closed while it is open; the Menu carries
   .v3-menu--on): while ANY v3 sheet or the Menu is open the drawer
   subtree is visibility:hidden - NOT display:none and with no
   override bang (the sheet's no-bang strategy), so the drawer's own
   inline-display logic, its job-count fetch and its swipe code are
   untouched, and it is back on Home the moment the sheet/Menu
   closes. A visibility:hidden subtree also stops hit-testing, so
   the sheet's rows and the scrim take the taps the grip used to
   steal. #225 r4: the two login recovery sheets are always
   .v3-sheet without --closed (their parent modal's display toggles
   them), so the :has() match would keep the drawer hidden on Home
   forever - they are excluded with :not(.v3-login-sheet) (Pixel
   must-fix 1; they never cover the Home drawer anyway, they sit
   above the login screen). ---- */
html body:has(.v3-sheet:not(.v3-sheet--closed):not(.v3-login-sheet)) #owned-jobs-section,
html body:has(.v3-menu--on) #owned-jobs-section {
  visibility: hidden;
}


/* ==============================================================   Issue #225 (driver v3 "Focus", slice 4 of 14): login, account
   recovery, lockout and already-logged-in screens — the HIDDEN v2
   page only. Login (mockup 01-login): 96px top padding, the AnyTime
   wordmark at 56px reusing the existing .v3-wordmark classes, the
   "Driver" sub line, labelled 56px fields, two quiet 48px forgot
   links, the in-browser "Install the app" row (same show rule as
   #install-pwa-banner) and the 64px Login primary in the dock.
   Errors inline under the field in white with a Lucide circle-alert
   icon — painted as a CSS mask on #login-error, so the existing
   innerText writes (v1's exact strings) never wipe it; the lock timer
   keeps living on the button label in the disabled style. The two
   recovery modals become v3 sheets (04/10 pattern): close with the x
   button, a scrim tap or Escape, focus returns to their link. The
   lockout and already-logged-in modals become the red full-screen
   alert (21/22 pattern) at --z-blocking: --danger-bg icon circle,
   red caption, title, body, v3-shaped buttons for BOTH the static
   conflict markup and the JS-injected lockout actions. The lockout
   keeps NO dismiss path. Presentation only — same ids, handlers,
   functions, inputs, strings, payloads and endpoints; colours are
   tokens only (scrim/shadow blacks are rgba()).
   ===================================================================== */

/* ---- Login (mockup 01-login) ---- */
html body #login-screen {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0 var(--edge);
}
html body .v3-login-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 96px;
  overflow-y: auto;
}
/* Owner decision on #223: the wordmark reads AnyTime - capital A and
   T in --brand, the rest white, full stop --text-3 (the classes come
   from the shell; only the 56px login size is new). */
html body .v3-login-wordmark {
  /* #225 r2 (render fix): "AnyTime." has no spaces, so it can never
     wrap — at 56px it is ~221px wide and overran the 155px column
     of the 200% page-zoom equivalent (195x422 CSS). min() keeps the
     full 56px from 295px viewports up (the 390px mockup unchanged)
     and scales the wordmark below that instead of overflowing. */
  font-size: min(56px, 19vw);
  letter-spacing: -0.055em;
}
html body .v3-login-driver { margin-top: var(--s3); }
html body .v3-login-fields {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
html body .v3-login-fieldrow + .v3-login-fieldrow { margin-top: var(--s4); }
html body #login-screen input.v3-login-field {
  width: 100%;
  height: var(--hit-driving);
  margin-top: 0;
}
/* Inline error under the field: white, circle-alert icon (mask, so
   the JS innerText writes never remove it). */
html body .v3-login-error {
  display: none;
  margin: var(--s2) 0 0 2px;
  color: var(--text);
  font: 500 var(--t-label);
}
html body .v3-login-error::before {
  content: "";
  display: inline-block;
  vertical-align: -3px;
  width: 18px;
  height: 18px;
  margin-right: var(--s2);
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Two quiet 48px forgot links under the password field. */
html body .v3-login-forgot {
  display: flex;
  justify-content: space-between;
  /* #225 r2 (render fix): at the 200% page-zoom equivalent the two
     quiet links filled the 155px row edge to edge (0px gap); the
     8px gap + wrap keeps targets 8px apart — they stack instead of
     touching when the row is too narrow. */
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s2);
}
html body .v3-login-forgot-link {
  width: auto;
  justify-content: flex-start;
  padding: 0 2px;
  text-decoration: none;
}
/* Lock timer: mirrors the button label ("Locked" / "Login
   Available"); JS keeps toggling this element's display. */
html body .v3-login-timer {
  margin-top: var(--s2);
  color: var(--text-2);
  font: 500 var(--t-label);
}
/* Install row: same show rule as #install-pwa-banner (the v3 boot
   script shows it only in a browser, honouring the session dismiss). */
html body .v3-login-install {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: auto 0 var(--s1);
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}
html body .v3-login-install-ic { color: var(--text-2); flex: none; display: inline-flex; }
html body .v3-login-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
html body .v3-login-install-sub { color: var(--text-3); }
/* The dock: the one primary button, 64px, bottom thumb zone. */
html body .v3-login-dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--s3) 0 max(16px, env(safe-area-inset-bottom));
}
html body #btn-login { margin-top: 0; }
/* #225 r4 (Pixel nit 1): while the lock timer runs, v1's JS pins an
   inline #555 background on the disabled button (2.2:1 contrast).
   The !important is the sheet's ONE sanctioned bang - it must beat
   that inline style (the JS is frozen); raised surface + --text-2
   measures about 8:1. */
html body #btn-login:disabled {
  background-color: var(--raised) !important;
  color: var(--text-2);
  border: 1px solid var(--stroke);
}
/* #225 r2 (render fix): the legacy beforeinstallprompt button (no id,
   appended to body by showInstallButton(), fixed at the bottom,
   z-index 15) cleared v1's centred login form — but the v3 login
   dock puts the 64px Login primary exactly there, so it overlapped
   the one primary button. While the login screen is up the legacy
   floating button is hidden (the login screen's install surface is
   the v3 "Install the app" row above; post-login behaviour is
   unchanged — the button only ever lands after #login-screen in the
   DOM, so the sibling selector cannot catch anything else). */
html body > #login-screen:not(.hidden) ~ button { display: none; }

/* ---- Recovery sheets (04/10 pattern) ----
   The modal container is the scrim (tap closes: the inline handler
   only fires when the tap target is the container itself); the
   #222/.v3-sheet child paints the sheet. Shown/hidden by the existing
   display toggles - no new classes are toggled by the page script. */
html body .v3-login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--z-sheet);
  display: none;
}
/* #225 r3 (render fix): the two recovery-sheet ✕ buttons are legacy
   conversions whose inline SVG carries no .v3-icon class, so it never
   joined the r8 ::before circle's grid cell (grid-area: 1 / 1) — grid
   auto-placement gave the glyph its own SECOND row and it painted
   ~30px under the circle, over the sheet description. Scoped to the
   login sheets only (the r8 top-bar/Menu 40px circle and the shell
   buttons are untouched): the ✕ paints the sheet-size 48px circle
   (the r10 sheet-✕ size; box-sizing: border-box so the 1px hairline
   sits inside the 48px) and the SVG glyph — its own 22px — is stacked
   INTO the circle's cell, so the button's place-items: center makes
   both concentric; the 48px button box keeps the >=48px hit area and,
   with the legacy button margin zeroed here, the ✕ sits on the
   sheet-head row's centre line, aligned with the title. Theme CSS
   only. */
html body .v3-login-sheet .v3-iconbtn {
  /* the legacy `input, button { margin-top: 10px }` rule also hit the
     converted ✕: align-items: center centred its 58px MARGIN box, so
     the button sat 5px under the title's centre line. margin: 0 puts
     the real 48px box back on the head row's centre line. */
  margin: 0;
}
html body .v3-login-sheet .v3-iconbtn::before {
  width: var(--hit-min);
  height: var(--hit-min);
  box-sizing: border-box;
}
html body .v3-login-sheet .v3-iconbtn > svg {
  grid-area: 1 / 1;
}
html body .v3-login-sheet-sub {
  padding: 0;
  margin: 0 0 var(--s3);
}
html body .v3-login-sheet-body { padding-top: var(--s2); }
html body .v3-login-sheet-foot {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
html body .v3-login-sheet-foot .v3-btn { margin-top: 0; }
html body .v3-login-sheet-msg {
  min-height: 1.2rem;
  margin: var(--s2) 0 0;
  color: var(--text-2);
  font: 400 15px/1.45 var(--font-ui);
}
/* #225 r4 (Pixel must-fix 2): at 200% zoom (max-height:560px
   viewports) the pinned 156px sheet foot covered the sheet's only
   field (field top 289, foot top 266). Short viewports let the whole
   sheet scroll instead - the field clears the foot - and the sheet
   body stops clipping (flex:none + overflow:visible); 1x is
   unchanged. */
@media (max-height: 560px) {
  html body .v3-login-sheet {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  html body .v3-login-sheet .v3-sheet-body {
    flex: none;
    overflow: visible;
  }
}

/* ---- Full-screen red alerts (21/22 pattern), --z-blocking ---- */
html body .v3-blocking {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-blocking);
  background: var(--canvas);
  display: none;
  color: var(--text);
  text-align: center;
}
html body .v3-blocking-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* #225 r4 (Pixel nit 3): safe-area aware like the login dock and
     the sheet foot - never less than --s5, but the notch/home-bar
     insets win when they are larger. */
  padding: max(var(--s5), env(safe-area-inset-top)) max(var(--s5), env(safe-area-inset-right)) max(var(--s5), env(safe-area-inset-bottom)) max(var(--s5), env(safe-area-inset-left));
  overflow-y: auto;
}
html body .v3-blocking-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: grid;
  place-items: center;
  flex: none;
  margin-bottom: var(--s5);
}
html body .v3-blocking-cap { color: var(--danger); margin-bottom: var(--s2); }
html body .v3-blocking-title {
  margin: 0;
  font: 600 var(--t-title);
  letter-spacing: -0.025em;
  color: var(--text);
}
html body .v3-blocking-reason {
  margin: var(--s3) 0 0;
  max-width: 340px;
  font: 400 var(--t-body);
  color: var(--text-2);
}
html body .v3-blocking-instruction {
  margin: var(--s2) 0 0;
  font: 400 var(--t-body);
  color: var(--text);
}
html body .v3-blocking-actions {
  width: 100%;
  max-width: 340px;
  margin-top: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
html body .v3-blocking-composer {
  width: 100%;
  max-width: 340px;
  margin-top: var(--s3);
}
/* v3 shapes for the alert buttons - both the static conflict markup
   and the JS-injected lockout actions (the injected markup keeps its
   legacy class names; these rules restyle them in place). */
html body #lockout-actions .btn-primary,
html body #conflict-modal .btn-primary {
  background: var(--text);
  color: var(--on-light);
  border: 0;
  border-radius: var(--r-control);
  min-height: var(--hit-primary);
  margin-top: 0;
  padding: 0 var(--s4);
  font: 600 18px/1 var(--font-ui);
  cursor: pointer;
}
html body #lockout-actions .btn-success,
html body #conflict-modal .btn-success,
html body #conflict-modal .btn-danger {
  background: var(--raised);
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: var(--r-control);
  min-height: var(--hit-driving);
  margin-top: 0;
  padding: 0 var(--s4);
  font: 600 17px/1 var(--font-ui);
  cursor: pointer;
}
html body .v3-block-btn { margin-top: 0; }
/* Emergency + lockout composer textareas: 56px+ driving fields. */
html body #lockout-msg,
html body #emergency-msg {
  box-sizing: border-box;
  min-height: var(--hit-driving);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--stroke);
  font: 400 var(--t-body);
}
/* #225 supersedes the #141 amber treatment of the two session
   screens: under the v3 semantics a session ended / lockout is RED
   (icon + words), and the wash replaces the left rail. */
html body #lockout-modal,
html body #conflict-modal { border-left: 0; }
html body #lockout-modal h2,
html body #lockout-title,
html body #conflict-modal h2 { color: var(--text); }


/* ==============================================================   Issue #226 (driver v3 "Focus", slice 5 of 14): Home (standby) and
   the three-tile dock on the HIDDEN v2 page only (mockup 02-home;
   the Flag down sheet per mockup 06 sits at the end of this block).
   Presentation only: every id, inline handler and function keeps its
   behaviour - #cyber-standby stays the wrapper the existing JS shows
   and hides around offers, #btn-break keeps v1's 2 s hold handlers
   and progress value, #btn-flagdown keeps v1's Hackney show rule and
   the Meter tile IS v1's meter toggle moved into the dock. The legacy
   ring and both SCANNING lines stay in the DOM and are hidden here
   (Boss wording change, 10 Nov 2026: no "Scanning"/"System online"
   text or spinner on any standby state). Colour rule: tokens only
   (shadow blacks are rgba(); the sheet stays bang-free).
   ===================================================================== */

/* ---- Home column: #dashboard loses the legacy .container padding
   so the standby column fills the viewport below the 64px top bar;
   the wrapper keeps v1's width/height and its display toggling. ---- */
html body #dashboard {
  padding: 0;
  justify-content: flex-start;
  align-items: stretch;
}
html body #cyber-standby {
  opacity: 1;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
/* Legacy standby chrome (ring + both text lines): CSS-only hide - the
   classes/ids stay for the inventory and the JS. */
html body #cyber-standby .cyber-ring,
html body #cyber-standby .cyber-text,
html body #cyber-standby .cyber-subtext {
  display: none;
}
/* Main area 84px down: the live eligibility caption (mirrored from
   #status-text) over the 44px display headline. Fluid against the
   body container (11.3cqw of the 390px phone is 44px; floors at 24px
   CSS at 200% zoom, the #222/pr247 clamp pattern). */
html body .v3-home-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 84px var(--edge) 0;
  box-sizing: border-box;
}
html body .v3-home-headline {
  margin: 14px 0 0;
  /* Pixel PR361 QA must-fix: the 24px floor wrapped the waiting dots
     onto their own line at the 200% zoom equivalent (195 CSS px);
     22px is the 11.3cqw value there, so the no-wrap unit below fits. */
  font-size: clamp(22px, 11.3cqw, 44px);
}

/* ---- Next job card: shown ONLY by v1's own rule - the .with-owned
   class renderOwnedJobs toggles on the wrapper (the drawer show
   rule); no new JS touches its display. Tapping it calls the
   drawer's own openOwnedDrawer() (v1's owned-jobs entry). ---- */
html body #cyber-standby:not(.with-owned) #v3-next-job { display: none; }
html body #cyber-standby.with-owned #v3-next-job { display: flex; }
html body .v3-next-job {
  align-items: center;
  gap: var(--s4);
  margin: 0 var(--edge) var(--s3);
  padding: 18px 16px 18px 20px;
  box-sizing: border-box;
  text-align: left;
}
html body .v3-next-job-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
html body #v3-next-job-head { margin: 9px 0 0; }
html body #v3-next-job-sub { margin: 5px 0 0; }
html body .v3-next-job-chev { color: var(--text-3); flex: none; }

/* ---- The owned-jobs drawer the card opens stays v1's fixed sheet
   (its inline display logic, count fetch and swipe code untouched),
   but the collapsed 62px grip peek no longer paints: the Next job card
   is the entry now (mockup 02 has no grip bar) and .open keeps the
   full-height sheet exactly as v1. ---- */
html body #cyber-standby #owned-jobs-section:not(.open) {
  transform: translateY(100%);
  visibility: hidden;
}
html body #owned-jobs-section {
  background: var(--raised);
}
html body #owned-drawer-grip .grip-handle { background: var(--text-2); }
/* Issue #226 slice 3 (Boss bug, part D): during the new-job pulse the
   renderOwnedJobs JS writes an inline #FFFFFF background onto the
   grip bar for 1.2 s - not a keyframes/class, and an inline style
   beats every plain stylesheet rule (this sheet keeps its bang-free
   strategy). The CSS-only fix makes the grip's own background
   unpaintable in EVERY state instead of trusting one state's hiding
   rule: the collapsed bar is off-screen and invisible (the
   :not(.open) rule above), and for the open sheet's header bar a
   negative-z-index ::before overlay - scoped inside a new
   isolation: isolate stacking context on the grip so it paints
   ABOVE the element's own background but below its content - carries
   var(--raised), masking the inline white with the sheet's own token
   surface (a subtle --raised pulse at most, never a white flash).
   No keyframe applied to the drawer sets any background at all
   (count-asserted in the #226 tests); tokens only. */
html body #owned-drawer-grip {
  position: relative;
  isolation: isolate;
}
html body #owned-drawer-grip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--raised);
}

/* ---- Dock: three 88px tiles, 10px gap (.v3-tiles from #222); Break
   re-skins v1's HOLD FOR BREAK element. While held, v1's own 50ms
   tick writes #break-hold-bar's width and the tile fills white from
   the left; the label and icon flip to black once covered
   (mix-blend-mode difference: white over the white fill reads
   black). Reduced motion: no width transition, the fill steps with
   v1's own tick. Releasing early drains back exactly as v1 did. ---- */
html body .v3-dock {
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: var(--s3) var(--s4) max(6px, env(safe-area-inset-bottom));
}
html body .v3-dock .v3-tile { min-height: 88px; }
html body .v3-tile--break {
  position: relative;
  z-index: 0;
  overflow: hidden;
}
html body .v3-tile--break .v3-tile-icon,
html body .v3-tile--break .v3-tile-label {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}
/* v1's #break-hold-progress/#break-hold-bar become the tile fill; the
   2 s hold JS keeps writing the same width percentage. */
html body #btn-break #break-hold-progress {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: inherit;
}
html body #btn-break #break-hold-bar {
  transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) {
  html body #btn-break #break-hold-bar { transition: none; }
}
/* #222 painted the legacy break button as the white primary; the tile
   is a surface again (the fill is the white part). */
html body #btn-break {
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

/* ---- Flag down sheet (mockup 06): #flagdown-modal keeps v1's
   display:none -> flex toggling (the sheet starts CLOSED - Pixel
   carry-forward rule), restyled as the dark backdrop + a bottom panel.
   Same openFlagDown/closeFlagDown/selectFlagDown handlers, grid
   builder and toasts; the legacy CANCEL becomes the x button (same
   closeFlagDown) and a backdrop tap calls it too
   (v3FlagDownScrimTap filters to the backdrop, so a destination card
   never cancels). The panel rises on the sheet duration token
   (instant under reduced motion). The per-destination prices in the
   mockup are EXAMPLE DATA with no live source, so the cards render
   the destinations from the same server data. ---- */
html body .v3-flagdown-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  animation: v3-flagdown-rise var(--dur-sheet) var(--ease-out);
}
@keyframes v3-flagdown-rise {
  from { transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
  html body .v3-flagdown-panel { animation: none; }
}
html body .v3-flagdown-cap {
  margin: var(--s2) var(--s1) var(--s3);
}

/* ---- Break sheet (mockup 04, Issue #226 slice 4): ONE sheet in two
   steps. #break-duration-modal and #break-location-modal keep v1's
   display toggling (both start display:none = CLOSED) and their
   byte-identical builders/handlers/fetch body; they are restyled into
   the same scrim + bottom-panel geometry so v1's modal-then-modal
   order reads as one sheet. Step captions, 56px options (the chosen
   one paints white via the v3Break glue), location rows with a check
   on the chosen one, and the 64px footer primary (#v3-break-start),
   which runs the chosen row's own kept handler. Tokens only; the
   sheet section stays bang-free. ---- */
html body .v3-break-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
  animation: v3-break-rise var(--dur-sheet) var(--ease-out);
}
@keyframes v3-break-rise {
  from { transform: translateY(100%); }
}
/* Step 2 is the SAME sheet: the panel does not rise again, only the
   body swaps (the one-sheet illusion across v1's modal-then-modal
   order). */
html body .v3-break-panel--loc { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html body .v3-break-panel { animation: none; }
}
html body .v3-break-step-cap {
  margin: var(--s2) var(--s1) var(--s3);
}
html body .v3-break-check {
  display: flex;
  flex: none;
  color: var(--text);
}

/* ---- On break (mockup 05, Issue #226 slice 5): v1's frozen
   _renderBreakCardHtml emits the v3 on-break markup - the "On break"
   caption, v1's countdown element (#break-countdown-display's id kept)
   restyled by its own builder strings to the 104px glance tabular
   type, the kept "Break ends at" line (byte-identical; the extend
   flow's frozen selector targets its inline colour), and the
   location in --text-3 - plus the dock: Extend break (the 56px
   secondary, plus icon, opening v1's extend options) over End break
   now (the 64px primary, v1's own end handler + toasts). The extend
   options (#break-extend-options) restyle into a fixed bottom sheet
   driven ONLY by v1's own display toggle (none/flex - starts
   CLOSED); the backdrop tap runs v1's Cancel via v3BreakExtScrimTap.
   Tokens only; the sheet section stays bang-free. ---- */
html body .v3-break-cap {
  margin-top: var(--s5);
}
html body .v3-break-dock {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s4);
}
html body .v3-break-dock .v3-btn {
  margin-top: 0;
}
html body .v3-break-ext-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  background: rgba(0, 0, 0, 0.7);
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
}
html body .v3-break-ext-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: 0 var(--s4) max(16px, env(safe-area-inset-bottom));
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}
html body .v3-break-ext-cap {
  margin: var(--s2) var(--s1) var(--s2);
}
html body .v3-break-ext-opt,
html body .v3-break-ext-cancel {
  min-height: var(--hit-driving);
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text);
  font: 500 17px/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
html body .v3-break-ext-panel button {
  margin-top: 0;
}
html body .v3-break-ext-cancel {
  color: var(--text-2);
}
html body .v3-break-ext-opt:disabled {
  opacity: 0.5;
}

/* ---- On break fix-up (#226 slice 5, mockup 05): while v1's break
   block is shown (v1's own inline display toggle reads "block"), the
   active-job card IS the screen - --canvas, no card box, no job
   chrome - and v1's own break markup becomes the centred composition:
   the caption over the 104px glance countdown, the kept "Break ends
   at" line (the extend flow's frozen selector targets its inline
   grey; the time itself is wrapped white by the builder) and the
   location, with the Extend/End dock pinned to the bottom over
   safe-area padding. The sticky "Job details & tools" header hides
   ONLY while the block is shown - it stays in the DOM, keyed on
   v1's inline display toggle (the slice-3 :has() mask pattern, no
   bang), so it is reachable again the moment the break ends. The
   frozen per-second inline colours (the tick's traffic lights) and
   the block's inline blue-grey card box are re-swapped to tokens
   before paint by the v3OnBreakPaint hook in the page: CSS alone
   cannot beat inline styles without !important, which is banned. ---- */
html body #dashboard:has(#break-active-block[style*="display: block"]) {
  padding: 0;
}
html body .job-card.v2-active-card:has(#break-active-block[style*="display: block"]) {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  border-radius: 0;
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v2-aj-header,
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v2-aj-chips,
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v2-sticky-bottom,
html body .v2-active-card:has(#break-active-block[style*="display: block"]) #job-details-scroll-area {
  display: none;
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) #break-active-block {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-cap {
  margin-top: 110px;
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: var(--s3) var(--s4) max(var(--s4), env(safe-area-inset-bottom));
}
/* Dock buttons: sentence case, mockup sizes - 56px secondary, 64px
   primary, px type so the 200% text zoom keeps each label on one
   line (uppercase 1.1rem from the legacy body.job-active button
   rule made "EXTEND BREAK" wrap). Bang-free: these scoped rules
   simply outrank it. */
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-dock .v3-btn {
  margin: 0;
  padding: 0 var(--s4);
  border-radius: 20px;
  text-transform: none;
  letter-spacing: normal;
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-dock .v3-btn--secondary {
  font: 600 17px/1 var(--font-ui);
  min-height: var(--hit-driving);
}
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-dock .v3-btn--primary {
  font: 600 18px/1 var(--font-ui);
  min-height: var(--hit-primary);
}
/* Same outranking for the extend sheet's own option rows (+15m /
   +30m / +1h / Cancel): sentence case at the declared px type. */
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-ext-opt,
html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-ext-cancel {
  margin: 0;
  padding: 0 var(--s4);
  border-radius: var(--r-control);
  text-transform: none;
  letter-spacing: normal;
  font: 500 17px/1 var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* ---- Issue #228 (driver v3, Pixel #228 overlap note): retire v1's
    floating install button from the screens. showInstallButton()
    appends it to body (no id, fixed, full-width, z-index 15), so on
    Home it covered the bottom drawer (the owned-jobs dock) and on
    a job it covered the stage button - a tap on Complete Job could
    land on Install. On-job keeps Pixel's tested rule; Home extends
    it through the login screen's own .hidden toggle (logged in =
    Home), so the pair hides the floating button on every screen
    the driver works. Both selectors can ONLY catch the appended
    button: it is the one button that ever lands as a body child
    after #login-screen (the login screen keeps its own #225 r2
    rule), and display:none also removes it from hit-testing, so
    nothing it used to cover - the drawer grip, the stage button -
    can be tapped through it. Install stays reachable as the Menu's
    56px #v3-menu-install-row (shown by the v3 glue only while the
    saved prompt exists and the display mode isn't standalone). No
    bang: the win is pure specificity, like every rule here. ---- */
html body.job-active > #login-screen ~ button,
html body > #login-screen.hidden ~ button { display: none; }
/* ---- Pixel QA fix-up (PR #294 / Issue #226, 10 Nov 2026,
   /workspace/pixel/qa/pr294-5bc9a8d-qa.md + fix.css): the four
   layout must-fixes, all rendered-proven by Pixel (1x unchanged by
   every rule; the 200% zoom equivalent is the <=300px media query,
   matching the r6 200%-container pattern). v1's frozen licence code
   writes inline styles the sheet cannot beat bang-free (the
   display:inline-block tile, the inline 2-column grid), so the
   tiles/cards are restacked and spanned from the sheet instead:
   1. Next job card: width:auto + align-self:stretch beats the
      legacy button{width:100%} + side margins that pushed the card
      20px past the right edge (chevron at 393 on a 390px screen).
   2. Flag down tile: v1's inline inline-block flattens the flex
      column, so the icon is restacked above a centred one-line
      label (block children, auto side margins).
   3. Dock at 200%: the Break tile's overflow:hidden dropped its
      min-width to 0 while the other tiles kept min-content width
      ("reak"), so every dock tile gets min-width:0, and the
      <=300px query tightens the dock gap/padding so all three
      labels fit inside their tiles.
   4. Flag down grid at 200%: the inline 1fr 1fr columns ran the
      second column off-screen, so each card spans the full row
      inside the <=300px query.
   5. On break at short heights (<=560px): the absolute dock
      covered the countdown, so the break block scrolls and the
      dock flows statically below it (End break scrollable).
   Tokens only, no !important, no id/handler/logic change. ---- */
html body .v3-next-job { width: auto; align-self: stretch; }
html body .v3-tile--flagdown { text-align: center; align-content: center; }
html body .v3-tile--flagdown .v3-tile-icon { display: block; margin: 0 auto var(--s2); }
html body .v3-tile--flagdown .v3-tile-label { display: block; }
html body .v3-dock .v3-tile { min-width: 0; }
@media (max-width: 300px) {
  html body .v3-dock { gap: 6px; padding-inline: var(--s3); }
  html body .v3-dock .v3-tile { padding-inline: 0; }
  html body #flagdown-grid > button { grid-column: 1 / -1; }
}
@media (max-height: 560px) {
  html body .v2-active-card:has(#break-active-block[style*="display: block"]) #break-active-block { overflow-y: auto; }
  html body .v2-active-card:has(#break-active-block[style*="display: block"]) .v3-break-dock { position: static; margin-inline: -12px; }
}
html body #break-active-block div[style*="0.8rem"]:not(:has(.v3-num)){-webkit-text-fill-color:var(--text)}
html body #break-countdown-display{-webkit-text-fill-color:currentColor}
/* ---- Pixel QA follow-up (PR #308 / Issues #226 + #228, 10 Nov
   2026, /workspace/pixel/qa/pr308-75efdd1-qa.md nits 2-3): two
   CSS-only fix-ups, rendered-proven by Pixel. No id, handler or
   logic change; tokens only, no !important, like every rule here.
    2. (#226) v1's frozen extend relabel (endLabel.textContent)
       drops the white .v3-num span, so the end time fell to the
       line's own inline grey. Rule 1 (the first of the two
       fill-colour rules just above this comment) sets
       -webkit-text-fill-color: var(--text) on v1's 0.8rem label
       only once the extend relabel has dropped .v3-num; rule 2
       pins the countdown's fill to its own colour so
       --warn/--danger always win.
   3. (#228) With the install row hidden (no prompt captured,
      standalone, or the prompt spent), the Menu's "App" caption and
      its card would sit empty; Pixel's tested rule hides both with
      the row - :has() + :only-child on the row's own inline display
      value (either serialisation) - and any other row the card
      gains breaks :only-child and unhides the group again. The
      rule sits inside an always-true media block (zero
      effect on matching or the cascade) because its :is() carries
      an internal comma and the sheet's selector-prefix guards
      split selector lists on every comma. ---- */
@media all {
html body .v3-menu-cap:has(+ .v3-rows > #v3-menu-install-row:only-child:is([style*="display:none"], [style*="display: none"])),
html body .v3-rows:has(> #v3-menu-install-row:only-child:is([style*="display:none"], [style*="display: none"])) { display: none; }
}

/* ---- Boss 18:17 GMT (#226 Home follow-up): the eligibility caption
   hides when it carries no warning - v3SyncHome sets the hidden
   attribute while the label reads "All jobs available" or the
   default "Waiting"; "Limited availability" and "No jobs available"
   still show - and the Home headline gains CSS-only waiting dots
   after "your next job" (no JS timer: the dots cycle blank, 1, 2, 3
   in 1.6 s via the v3dot keyframes; the fixed 1.1em inline-block
   width keeps the headline's box constant while they appear, and
   they sit static at 3 under reduced motion). ---- */
html body #v3-home-elig[hidden] { display: none; }
/* Pixel PR361 QA must-fix (pr361-3f44de6-qa.md): at the 200% zoom
   equivalent (195 CSS px, 155px of content) the reserved dots box
   (1.1em = 26.4px at the old 24px floor) pushed the dots onto their
   own line under "your next job" (139.1px + 26.4px > 155px). The
   words and the dots now share ONE no-wrap unit (html span
   .v3-nowrap), and the clamp floor drop above makes that unit fit
   inside the edge (151.7px at 22px); the dots keep their fixed 1.1em
   box and cycle untouched. */
html body .v3-nowrap { white-space: nowrap; }
html body .v3-dots { display:inline-block; width:1.1em; text-align:left; white-space:nowrap; }
html body .v3-dots span { opacity:0; animation:v3dot 1.6s steps(1,end) infinite; }
html body .v3-dots span:nth-child(1) { animation-name:v3dot1; }
html body .v3-dots span:nth-child(2) { animation-name:v3dot2; }
html body .v3-dots span:nth-child(3) { animation-name:v3dot3; }
@keyframes v3dot1 { 0%{opacity:0} 25%,100%{opacity:1} }
@keyframes v3dot2 { 0%,25%{opacity:0} 50%,100%{opacity:1} }
@keyframes v3dot3 { 0%,50%{opacity:0} 75%,100%{opacity:1} }
@media (prefers-reduced-motion: reduce) { html body .v3-dots span { animation:none; opacity:1; } }

/* ===== #230 addendum (Pixel, 10 Nov 2026): Meter sheet ===== */
/* Bug 1 (dock pushed up + grey band): restore .job-card's default hide
   that legacy body.meter-active .job-card{display:flex} overrides.
   JS inline display (flex while a job is live, none after reset) still
   wins, so a live job card is unaffected. */
html body.meter-active #active-job-card { display: none; }

/* Boss change (17:44 GMT): the nav bar (#v3-dock) stays FIXED at the
   bottom and never moves or changes when the meter toggles; it only
   changes on an active job or in menus, as now (#cyber-standby's own
   show/hide). One source of truth: --v3-nav-h IS the dock's real
   height - 88px tile + var(--s3) top pad + the 10px margin-top v1's
   frozen `input, button` rule puts on every tile + the max(6px,
   safe-area) bottom pad - and the dock's height is DERIVED from it
   (box-sizing: border-box, height: var(--v3-nav-h)), so the sheet's
   bottom: var(--v3-nav-h) and max-height: calc(50dvh - var(--v3-nav-h))
   line up with the rendered box exactly (the 230 render measured the
   old 106px var against a 116px dock: 10px of sheet tucked behind it
   and 10px of cap exceeded). */
html body {
  --v3-nav-h: calc(88px + var(--s3) + 10px + max(6px, env(safe-area-inset-bottom)));
}
html body #v3-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  height: var(--v3-nav-h);
  z-index: 12000; /* above the meter sheet, same v1 layer intent */
}
/* The page scroll area ends above the fixed nav: Home content clears
   the dock instead of hiding behind it. */
html body #cyber-standby { padding-bottom: var(--v3-nav-h); }

/* Sheet: v1's #meter-panel, restyled as a bottom sheet stacked
   DIRECTLY on top of the nav (Boss change 17:44 GMT: anchored at
   bottom: nav height, so the sheet's bottom edge equals the nav's
   top edge; capped at 50dvh INCLUDING the nav). Natural height,
   scrolling inside; the page never scrolls sideways. */
html body #meter-panel.meter-panel {
  order: 1;
  flex: 0 0 auto;
  min-height: 0;
  max-height: calc(50dvh - var(--v3-nav-h));
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  width: 100%;
  padding: 12px var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  background: var(--raised);
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  color: var(--text);
  font: 400 var(--t-body);
  font-family: var(--font-ui);
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  container-type: inline-size;
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--v3-nav-h);
  z-index: 12000; /* v1's: above the reconnecting overlay */
}
/* Caption row: "● RUNNING · RATE 1", leaves room for the 48px close. */
html body #meter-panel > .meter-info-row:has(#meter-rate) {
  order: 1; justify-content: flex-start; gap: 0; align-items: center;
  min-height: 48px; padding-right: 56px; box-sizing: border-box; flex-wrap: wrap; row-gap: 2px;
  font: 500 13px/1 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
}
html body #meter-status, html body #meter-rate { white-space: nowrap; }
html body #meter-status { order: 1; display: inline-flex; align-items: center; gap: 8px; }
html body #meter-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
html body #meter-rate { order: 2; color: var(--text-2); }
html body #meter-rate::before { content: "\00a0·\00a0"; }
/* Price: largest that fits £999.99 (3.44em wide with the half-size £).
   Bug 3: skewX(-10deg) pushed the box 2px past both edges (the
   horizontal scroll); transform:none is the real fix, the clips below
   are the guard. */
html body #meter-panel .meter-main-display {
  order: 2;
  transform: none;
  width: auto; margin: 4px 0 0; text-align: left; white-space: nowrap;
  font: 600 min(96px, 27cqi)/1 var(--font-num);
  font-variant-numeric: tabular-nums; letter-spacing: -0.04em;
  color: var(--text); text-shadow: none;
}
html body #meter-panel .meter-currency {
  font-size: 0.5em; letter-spacing: 0; vertical-align: 0.62em; margin-right: 0.04em; color: var(--text-2);
}
/* Sub line: "18.0 mph · 3.20 mi" */
html body #meter-panel > .meter-info-row:has(#meter-speed) {
  order: 3; justify-content: flex-start; gap: 0; margin-top: 8px;
  font: 400 15px/1.4 var(--font-num); font-variant-numeric: tabular-nums; color: var(--text-2);
}
html body #meter-dist::before { content: "\00a0·\00a0"; }
/* Controls: 2 x 56px secondary, sentence-case labels via CSS. */
html body #meter-panel .meter-controls { order: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; margin-top: 16px; }
html body #meter-panel .meter-btn {
  min-height: 56px; margin: 0; padding: 0 12px; border-radius: var(--r-control);
  background: var(--surface); color: var(--text); border: 1px solid var(--stroke);
  font: 600 17px/1.2 var(--font-ui); text-transform: lowercase;
}
html body #meter-panel .meter-btn::first-letter { text-transform: uppercase; }
html body #meter-panel .meter-btn:disabled { color: var(--text-3); border-color: var(--hairline); background: var(--surface); }
/* Taxi relay row (64px), then the unsupported note. */
html body #meter-panel .relay-row { order: 5; min-height: 64px; margin-top: 12px; padding: 4px 4px 4px 16px; border: 1px solid var(--hairline); border-radius: var(--r-card); background: var(--surface); font: 500 15px/1.3 var(--font-ui); color: var(--text); }
html body #meter-panel .relay-label { color: var(--text); }
html body #meter-panel .relay-btn { min-height: 48px; min-width: 48px; margin: 0; padding: 0 14px; border-radius: var(--r-control); background: var(--overlay); color: var(--text); border: 0; font: 600 15px/1 var(--font-ui); }
html body #meter-panel .relay-dot.disc { background: var(--text-3); box-shadow: none; }
html body #meter-panel .relay-dot.on { box-shadow: none; }
html body #meter-panel .relay-unsupported { order: 5; margin-top: 12px; padding: 0; text-align: left; font: 400 13px/1.4 var(--font-ui); color: var(--text-3); }
/* Close: new 48px button, top-right (markup addition M1). */
html body #meter-panel .v3-meter-close { position: absolute; top: 12px; right: var(--s4); width: 48px; height: 48px; margin: 0; padding: 0; border-radius: 50%; background: var(--overlay); color: var(--text); border: 0; display: grid; place-items: center; }
/* Page above the sheet (Boss change 17:44 GMT): the nav is fixed, so
   Home scrolls inside #dashboard; the working reserve is the FU3
   in-flow ::after spacer (the border-box padding-bottom here never
   extended the scroll range, so the meter-dock layer dropped it -
   PR376 nit 3, 11 Nov 2026). */
html body.meter-active #dashboard {
  flex: 1 1 auto; min-height: 0;
  overflow-x: clip; overflow-y: auto; overscroll-behavior: contain;
}
/* Boss change (18:29 GMT): with the meter open on Home, collapse the
   Next job card out of the way - a short height then opacity
   transition, static under prefers-reduced-motion - and restore it
   when the meter closes. CSS only on body.meter-active; the
   owned-jobs logic is untouched. While collapsed the card takes no
   space (max-height 0, no border/padding) and its drawer tap target
   is unreachable (visibility hidden + pointer-events none, and it
   can no longer take focus). */
html body #v3-next-job {
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
html body.meter-active #v3-next-job {
  max-height: 0;
  min-height: 0;
  margin: 0;
  padding-block: 0;
  border-width: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html body #v3-next-job { transition: none; }
}
/* Toggle: Meter tile inverts while the sheet is open (aria-pressed
   mirrors it via the J1 glue). */
html body .v3-tile--meter[aria-pressed="true"],
html body.meter-active .v3-tile--meter { background: var(--text); color: var(--canvas); border-color: var(--text); }
html body.meter-active .v3-tile--meter .v3-icon { color: var(--canvas); }
@media (max-width: 300px) {
  html body #meter-panel.meter-panel { padding-inline: var(--s3); }
  html body #meter-panel > .meter-info-row:has(#meter-speed) { margin-top: 4px; }
  html body #meter-panel .meter-controls { margin-top: 8px; gap: 8px; }
  html body #meter-panel .v3-meter-close { right: var(--s3); }
}
/* On-job at short heights (200%): let the job card take its natural
   height so #dashboard scrolls to the stage button instead of
   clipping it under the sheet. */
@media (max-height: 560px) {
  html body.meter-active.job-active #active-job-card { flex: 0 0 auto; min-height: auto; overflow: visible; }
}
/* Relay row: words take the slack, the 48px actions keep their size. */
html body #meter-panel .relay-row { flex-wrap: wrap; gap: 8px; }
html body #meter-panel .relay-left { flex: 1 1 auto; min-width: 0; gap: 10px; }
html body #meter-panel .relay-actions { flex: 0 0 auto; gap: 8px; margin-left: auto; }
html body #meter-panel .relay-btn { width: auto; flex: 0 0 auto; }

/* ===== Flag-down on-job screen (Pixel, 10 Nov 2026, Boss 18:24) =====
   Scope: body.v3-flagdown only (the class is set by the page's v3
   flag-down glue from job.source === "flag_down", the SECCY
   PR379-review key - never v1's name/notes test). Sits on top of
   the meter-sheet rules above. */

/* H1 Hide everything Boss listed. Pickup block stays. */
html body.v3-flagdown .v2-aj-header,          /* "Current job" + card burger */
html body.v3-flagdown .v2-aj-chips,           /* stage chip + Status dropdown */
html body.v3-flagdown #v2-status-panel,
html body.v3-flagdown .v2-cust-card,          /* "Flag Down" name, "To ...", Call, SMS */
html body.v3-flagdown #v2-sheet-open-btn,     /* Job details & tools */
html body.v3-flagdown #meter-panel .v3-meter-close,  /* sheet is pinned open */

/* H1b The note preview gets an inline display from showActiveJobUI,
   which beats a stylesheet display:none. Take it out of layout, paint
   and the a11y tree without a stylesheet bang. */
html body.v3-flagdown #v2-note-preview { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); visibility: hidden; }

/* H2 The card shows only the two addresses, top-aligned. Meter sheet (order 1)
   cannot cover it: the card scrolls inside #dashboard above the sheet. */
html body.v3-flagdown.meter-active #active-job-card { flex: 0 0 auto; min-height: auto; overflow: visible; padding-top: var(--s4); background: transparent; border: 0; box-shadow: none; }
html body.v3-flagdown #job-details-scroll-area { display: flex; flex-direction: column; gap: var(--s4); }
html body.v3-flagdown .v2-addr-block { margin: 0; }
html body.v3-flagdown .v2-addr-main { font: 600 26px/1.15 var(--font-ui); color: var(--text); overflow-wrap: anywhere; }
html body.v3-flagdown #v3-fd-dropoff .v2-addr-main { color: var(--text); }

/* B1 "Clear flag down" sits under the meter: a fixed bottom bar on the
   sheet surface. The body reserves its height so the sheet ends above it. */
html body.v3-flagdown { --fd-bar-h: calc(12px + 64px + max(16px, env(safe-area-inset-bottom))); padding-bottom: var(--fd-bar-h); box-sizing: border-box; }
html body.v3-flagdown #meter-panel.meter-panel { padding-bottom: 4px; max-height: min(50dvh, calc(100dvh - var(--fd-bar-h) - 160px)); }
html body.v3-flagdown .job-actions.v2-sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12001;
  margin: 0; padding: 12px var(--s4) max(16px, env(safe-area-inset-bottom));
  background: var(--raised); gap: 0;
}

/* B2 White button, black hold fill, label inverts to white over the fill.
   The overlay is v1's .hold-overlay (inline width 0-100%, inline bg 28% white).
   An inset shadow paints over that inline background (no stylesheet bang
   needed), making the overlay opaque --text; mix-blend-mode: difference then
   turns white button -> black (fill = --canvas) and black label -> white, per
   pixel, so a glyph cut by the fill edge is black on white on one side and
   white on black on the other: 21:1 both sides at every point of the 1.5 s
   hold. The 1.5s timing itself never changes. */
html body.v3-flagdown .v2-sticky-bottom #btn-job-action {
  background: var(--text); color: var(--on-light); border: 0;
  isolation: isolate; overflow: hidden;
  min-height: 64px; border-radius: var(--r-control);
  font: 700 18px/1.2 var(--font-ui); text-transform: none; letter-spacing: normal;
}
html body.v3-flagdown .v2-sticky-bottom #btn-job-action .hold-overlay {
  box-shadow: inset 0 0 0 100vmax var(--text);
  mix-blend-mode: difference;
}
/* Paused (finger drifted): keep the fill solid; signal it on the edge instead
   of v1's 45% amber overlay, which would blend to mid-grey text. */
html body.v3-flagdown .v2-sticky-bottom #btn-job-action.hold-paused .hold-overlay { opacity: 1; background: transparent; }
html body.v3-flagdown .v2-sticky-bottom #btn-job-action.hold-active { box-shadow: 0 0 0 3px var(--text-2); }
html body.v3-flagdown .v2-sticky-bottom #btn-job-action.hold-paused { box-shadow: 0 0 0 3px var(--warn); }
/* "2, 1" countdown: off the label, right end, same inversion. */
html body.v3-flagdown .v2-sticky-bottom #btn-job-action .hold-countdown {
  /* v1 sets left:50% + translate(-50%,-50%) inline; a margin moves it to the
      right end without a stylesheet bang: centre = 100% - 16px - half its width. */
  margin-left: calc(50% - var(--s4) - 0.3em);
  color: var(--text); text-shadow: none; mix-blend-mode: difference;
  font: 700 18px/1 var(--font-num); font-variant-numeric: tabular-nums;
}
html body.v3-flagdown .v2-sticky-bottom #btn-job-action:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

@media (max-width: 300px) {
  html body.v3-flagdown .v2-addr-main { font-size: 20px; }
  html body.v3-flagdown #job-details-scroll-area { gap: var(--s3); }
  /* label wraps inside a 32px gutter each side so the countdown never sits on it */
  html body.v3-flagdown .v2-sticky-bottom #btn-job-action { padding-inline: 32px; white-space: normal; text-wrap: balance; }
  html body.v3-flagdown .job-actions.v2-sticky-bottom { padding-inline: var(--s3); }
  html body.v3-flagdown .v2-sticky-bottom #btn-job-action .hold-countdown { margin-left: calc(50% - var(--s3) - 0.3em); }
}
/* ===== 230 FU2 (Pixel, 10 Nov 2026): the 200% sheet + dock pass ===== */
/* Two bugs the 230fu facts missed on the 195x422 CSS px (DPR2) shots:
   A. the capped 95px sheet clipped the price row exactly at the dock
      line and the Start/Stop controls + the relay note sat below the
      fold; the header must stay put while the sheet BODY scrolls, and
      short viewports need a tighter sheet so the WHOLE price row fits
      above the dock un-clipped.
   B. the dock painted no background of its own, so at 200% the page
      behind it (the install banner text) showed through between and
      around the tiles - the tiles themselves already fit (the 10px
      margin-top v1's frozen input/button rule puts on every tile +
      the 88px tile height + the 12px/6px pads are exactly the
      --v3-nav-h the dock box derives from), an opaque rect over the
      dock's whole box fixes the see-through. 1x (390x844) is
      untouched: the media rule never matches there and the sticky
      header/dock paint are invisible on the 1x layout. */

/* A1: the caption row (the "RUNNING · RATE 2" status + the close
   button) STICKS to the top of the sheet's scrollport, so the
   status/close header stays visible while the sheet body scrolls
   under it. The close is sticky TOO: an absolute box scrolls away
   with the content inside a scroll container (the 230fu close sat
   on an absolute top and slid off with the first swipe), so it joins
   the sticky header lane - in flow as the first flex item, but with
   margin-bottom -48px it contributes ZERO net flow, so the 1x
   layout (and the sheet's other rows) is byte-for-byte what the
   absolute box painted; align-self: flex-end keeps its right edge
   where absolute right: var(--s4) put it, and right: auto retires
   the absolute inset (a sticky right offset would fight the flow
   position). Its z-index clears the sticky rows' stacking contexts
   (the close is the first child in the DOM, before the caption). */
html body #meter-panel > .meter-info-row:has(#meter-rate) {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--raised);
}
html body #meter-panel .v3-meter-close {
  position: sticky;
  top: 0;
  right: auto;
  z-index: 2;
  flex: 0 0 auto;
  align-self: flex-end;
  margin-bottom: -48px;
}

/* B: opaque over the dock's whole rect - the same canvas the page
   paints behind it at 1x, so the 1x look is unchanged and nothing
   behind the dock shows through at 200%. The dock's height still
   derives from --v3-nav-h and the sheet still anchors on it. */
html body #v3-dock { background: var(--canvas); }

/* A2: short viewports (a TRUE 200% zoom is 195x422, and the sheet
   caps at 50dvh - 116px = 95px => 94px of client area): tighten the
   sheet so the whole price row fits above the dock with no clipping
   and scrolling to the bottom lands the Start/Stop buttons fully
   inside the sheet - less padding (6px pads), a smaller price clamp
   floor (30px), a tighter relay note, and the controls ordered LAST
   so the bottom of the scroll is the buttons. The sticky inset is
   -6px (minus the padding-top) on BOTH the caption and the close, so
   the whole header lane pins flush to the scrollport top with nothing
   peeking above it and the close keeps its full 48px box aligned
   with the lane: no shrunken hit target at all. */
@media (max-height: 520px) {
  html body #meter-panel.meter-panel {
    padding-block: 6px max(6px, env(safe-area-inset-bottom));
  }
  html body #meter-panel > .meter-info-row:has(#meter-rate) {
    position: sticky;
    top: -6px;
  }
  html body #meter-panel .v3-meter-close { top: -6px; }
  html body #meter-panel .meter-main-display {
    font-size: clamp(30px, 13.5cqi, 46px);
    margin-top: 2px;
  }
  html body #meter-panel > .meter-info-row:has(#meter-speed) { margin-top: 2px; }
  html body #meter-panel .relay-unsupported { order: 5; margin-top: 8px; font: 400 11px/1.3 var(--font-ui); }
  html body #meter-panel .meter-controls { order: 4; margin-top: 8px; }
}

/* ===== Flag-down fix layer (Pixel PR379 QA, 10 Nov 2026,
   pr379-7922888-qa.md): the three on-job must-fixes, CSS-only,
   tokens only, no bangs. Sits between the FU2 and FU3 layers so the
   frozen FU3/dock to-EOF slices stay byte-identical; the MF2 seat
   wins on specificity (one class more than the FU3 on-job pin), so
   the cascade is source-order independent. */
/* MF2: since the FU3 pin the sheet is position: fixed, so the body
   padding-bottom reserve (the flag-down layer's B1) reserves
   nothing. Seat the sheet on top of the Clear flag down bar and
   grow the scroll reserve by the bar height (the FU3 ::after cap
   grows by the same distance). */
html body.v3-flagdown.meter-active.job-active #meter-panel.meter-panel {
  bottom: var(--fd-bar-h);
  max-height: min(50dvh, calc(100dvh - var(--fd-bar-h) - 160px));
}
html body.v3-flagdown.meter-active.job-active #dashboard::after {
  block-size: calc(min(50dvh, 100dvh - var(--fd-bar-h) - 160px) + var(--fd-bar-h));
}

/* MF1 (belt to the JS guard) + MF3, the PR381 dock-sheets pattern:
   the :has() masks attach to html and sit inside ONE always-true
   @media all block (zero effect on matching or the cascade), exactly
   like the 228 install-row masks and the dock-sheets layer - the
   frozen selector-prefix guards split selector lists on every comma
   (the style-serialization OR below carries one) and demand the
   plain html body prefix, so neither guard may see these selectors.

   MF1: the bar (z 12001) must never sit over the completion window
   (z 9600). Visibility only: the hold keeps its state; the bar is
   back the instant the window closes.

   MF3: the Menu (--z-menu 30) sits under the meter sheet (12000) and
   the bar (12001) and, on a flag down, neither can be closed, so Log
   off, Tax & expenses and Install are unreachable. Hide both while
   the Menu is open (visibility only: the meter keeps running
   underneath); this also covers normal jobs. */
@media all {
html:has(#driver-completion-modal[style*="display: flex"]) body.v3-flagdown .job-actions.v2-sticky-bottom { visibility: hidden; }
html:has(#v3-menu.v3-menu--on) body.v3-flagdown .job-actions.v2-sticky-bottom,
html:has(#v3-menu.v3-menu--on) body #meter-panel.meter-panel {
  visibility: hidden;
  pointer-events: none;
}
}

/* ===== 230 FU3 (Pixel QA, 10 Nov 2026, pr368-89ffae5-qa.md): the
   two PR368 must-fixes. CSS-only, appended AFTER the frozen 230 and
   FU2 layers (the reconstruction byte chain and both containment
   asserts stay green); tokens only, no bangs, and nothing below
   matches with the meter closed - every rule is scoped to
   body.meter-active, so the meter-off Home layout is unchanged. The
   FU2 1x pass is untouched too: the Home/dock rules here are the SAME
   anchor and cap the 230 layer already paints (this layer only adds
   the on-job and scroll-range rules the 230fu shots could not see
   because they never opened the meter on a live job, and never
   scrolled the page behind the sheet). ---- */

/* Must-fix 1 (on-job dead band): #v3-dock lives INSIDE #cyber-standby,
   so on an active job the dock is hidden with the standby (a 0x0 box)
   while the sheet kept bottom: var(--v3-nav-h) and max-height:
   calc(50dvh - var(--v3-nav-h)) - a 116px empty canvas strip under
   the meter at 1x, and at 200% job-card text showed through the gap
   with the stage button scrolling INTO it, under the sheet. While the
   dock is hidden - exactly the body.job-active state
   showActiveJobUI() pairs with the standby's display:none - the
   sheet pins to the viewport bottom (the safe area) and takes the
   full 50dvh cap for itself, so there is no dead band and nothing
   can show beneath the sheet's bottom edge. */
html body.meter-active.job-active #meter-panel.meter-panel {
  bottom: env(safe-area-inset-bottom);
  max-height: calc(50dvh - env(safe-area-inset-bottom));
}

/* Must-fix 1b + 2 (the scroll range): the 230 layer reserved room
   for the sheet with #dashboard padding-bottom: calc(50dvh +
   var(--s8)), but #dashboard is a border-box flex item whose used
   height already fills the viewport, and a flex container's bottom
   padding is not part of its scroll range - the reserve was absorbed
   into the box and never extended scrollHeight. Measured: Home at
   200% scrolled exactly 1px (359/358) while the headline sat under
   the sheet, and on-job the stage button could only scroll as far as
   the viewport bottom - into the dead band under the sheet. An
   in-flow ::after block IS scrollable content, so the reserve moves
   onto the scrolling content itself. Its height is the sheet's cap:
   the sheet can never be taller than that, so everything that sits
   above the spacer - the Home headline, the Next job card once the
   meter closes, the on-job stage button - can always be scrolled
   fully clear above the sheet's top edge. flex: none stops the
   spacer giving its height back to flex shrinkage, and the meter-off
   page never sees it: the selector is scoped to body.meter-active. */
html body.meter-active #dashboard::after {
  content: "";
  display: block;
  flex: none;
  block-size: calc(50dvh - env(safe-area-inset-bottom));
}
/* On the dock-hidden on-job layout the sheet's cap is the full 50dvh
   minus the safe area it now sits on, and the reserve follows it. */
html body.meter-active.job-active #dashboard::after {
  block-size: calc(50dvh - env(safe-area-inset-bottom));
}
/* The reserve is flex: none, so the card it shares #dashboard with
   must stop shrinking or the spacer crushes it below its content
   (the 230 layer's padding-bottom already eats 50dvh + --s8 of the
   border-box content area, and the measured crush folded the card to
   32px with the stage button clipped away by the card's own
   overflow: hidden). The 230 layer already paints this exact
   no-shrink rule for short heights (the <=560px block, where the card
   takes its natural height and #dashboard scrolls to the button);
   FU3 lifts it to every height while the meter is open on a job, so
   the whole card scrolls in #dashboard and the stage button can rest
   on the sheet. The break block keeps its own layout: the rule bows
   out while #break-active-block is shown (the countdown/dock pair
   keeps sizing the card), keyed on v1's inline display exactly like
   the issue 228 slice's :has() masks. */
html body.meter-active.job-active
  #active-job-card:not(:has(#break-active-block[style*="display: block"])) {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}/* ===== Issue 229 s1 (driver v3 "Focus", the Job details sheet):
   the peek row's ONE sheet at a large detent (about 770 of 844px;
   the 230 FU2 max-height: 520px convention makes it full height at
   200% text zoom), the "Job {id}" head, the 48px Lucide close
   button, and sections 1-5 (Passenger, Route, Notes, Flight,
   Account) as cards in one scrolling column with 40px of bottom
   padding. Slice 2 owns Fare, Trip tools and "If something goes
   wrong"; Wait & Return is untouched. The legacy .v2-sheet rules
   lose to specificity here (html body #v2-job-sheet ...), never to
   a cascade bang; colours come from the v3 design tokens only -
   amber is the flight "Delayed" chip alone. This section sits
   BEFORE the dock layer: the dock-sheets freeze tests slice
   "header to EOF".
   ===== */

/* The shell: one fixed column - grip + head stay put, the body
   scrolls. About 770px of an 844px screen (100dvh minus the top
   bar's 74px); the same short-viewport convention the 230 FU2
   layer uses (max-height: 520px) gives it the full height at 200%
   text zoom, where the content needs every pixel it can get. */
html body .v2-sheet#v2-job-sheet,
html body .v2-sheet.v2-sheet-full#v2-job-sheet {
  height: calc(100dvh - 74px);
  max-height: calc(100dvh - 74px);
  padding: var(--s3) 0 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-height: 520px) {
  html body .v2-sheet#v2-job-sheet,
  html body .v2-sheet.v2-sheet-full#v2-job-sheet {
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
  }
}
/* The head: "Job {id}" at title size, the "{stage} · {time}" sub
   line in --text-3, and the 48px round close button on the right
   (the Expand button and the retired tab bar hide here - their
   ids, handlers and entry points stay in the DOM). */
html body #v2-job-sheet .v3-js-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 var(--s4) var(--s2) 20px;
}
html body #v2-job-sheet .v3-js-headtext { flex: 1 1 0; min-width: 0; }
html body #v2-job-sheet #v3-js-title {
  margin: 0;
  font: 600 var(--t-title);
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-sub {
  margin: var(--s1) 0 0 0;
  font: 500 var(--t-label);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
html body #v2-job-sheet #v2-sheet-close {
  flex: none;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: grid;
  place-items: center;
}
html body #v2-job-sheet #v2-sheet-expand,
html body #v2-job-sheet .v2-sheet-tabs { display: none; }
/* The one scrolling column: every panel lives in it (the retired
   tab bar only re-painted them), with the 40px of bottom padding
   the issue asks for above the safe area. */
html body #v2-job-sheet .v3-js-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--s4) calc(var(--s10) + env(safe-area-inset-bottom));
}
html body #v2-job-sheet .v2-tab-panel { display: block; }
/* Section caps and cards: the fixed order 1-5, hide-when-empty via
   the mirror's own .v3-off class (never a bang, never an empty
   header). */
html body #v2-job-sheet .v3-js-sec { margin: var(--s5) 0 0 0; }
html body #v2-job-sheet .v3-js-sec:first-child { margin-top: 0; }
html body #v2-job-sheet .v3-js-sec.v3-off { display: none; }
html body #v2-job-sheet .v3-js-cap { margin: 0 var(--s1) var(--s3) 0; }
/* 1. Passenger: the name at head size, the "Passenger · tracking
   you" sub in --text-3, and v1's own Call / Message buttons as 48px
   pill icon buttons (v1's own show/hide rules still write their
   inline display; the white unread badge rides the Message one). */
html body #v2-job-sheet .v3-js-paxcard {
  padding: var(--s4) var(--s4) var(--s4) 20px;
  display: flex;
  align-items: center;
  gap: var(--s3);
}
html body #v2-job-sheet .v3-js-main { flex: 1 1 0; min-width: 0; }
html body #v2-job-sheet .v3-js-paxcard #v2-detail-passenger {
  margin: 0;
  font: 600 var(--t-head);
  letter-spacing: -0.015em;
  color: var(--text);
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-paxsub {
  margin: var(--s1) 0 0 0;
  font: 500 var(--t-label);
  color: var(--text-3);
}
html body #v2-job-sheet .v3-js-contact { display: flex; gap: var(--s2); flex: none; }
html body #v2-job-sheet .v3-js-contactbtn {
  position: relative;
  width: auto;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 var(--s4);
  flex: none;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--text);
  font: 500 var(--t-label);
  align-items: center;
  justify-content: center;
  gap: 6px;
}
html body #v2-job-sheet .v3-js-contactbtn .v3-js-ic { color: var(--text); flex: none; }
html body #v2-job-sheet #driver-sms-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--text);
  color: var(--on-light);
  font: 700 12px/20px var(--font-num);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
/* 2. Route: the kit's own card-rows pattern (>=56px rows, hairline
   dividers, the leading icon in --text-2), with v1's own full
   pickup / drop-off strings and v1's own pin buttons as 48px pills
   inside each row. */
html body #v2-job-sheet .v3-js-routecard { overflow: hidden; }
html body #v2-job-sheet .v3-js-routecard .v2-route-stop { margin: 0; }
html body #v2-job-sheet .v3-js-stop .v2-line-val {
  margin: 0;
  font: 500 var(--t-label);
  color: var(--text);
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-subline {
  margin: var(--s1) 0 0 0;
  font: 500 var(--t-label);
  color: var(--text-3);
}
html body #v2-job-sheet .v3-js-subline:empty { display: none; }
html body #v2-job-sheet .v3-js-stop .v2-action-btn {
  flex: none;
  width: auto;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 var(--s3);
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--stroke);
  color: var(--text);
  font: 500 var(--t-label);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
/* 3. Notes: the full note in body type. */
html body #v2-job-sheet .v3-js-notecard { padding: var(--s4) 18px; }
html body #v2-job-sheet .v3-js-notecard .v2-line-val {
  margin: 0;
  font: 400 var(--t-body);
  color: var(--text);
  overflow-wrap: break-word;
}
/* 4. Flight: v1's own strip rows (its inline runtime colours stay
   v1's), the Delayed chip only via the mirror's .v3-on. */
html body #v2-job-sheet .v3-js-flightcard {
  padding: var(--s2) var(--s4) var(--s2) 20px;
}
html body #v2-job-sheet #flight-strip.v3-js-flstrip {
  align-items: center;
  gap: var(--s2);
  font: 500 var(--t-label);
  color: var(--text);
}
html body #v2-job-sheet .v3-js-flstrip .v3-js-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
html body #v2-job-sheet .v3-js-flstrip .v3-js-ic { color: var(--text-2); flex: none; }
html body #v2-job-sheet .v3-js-flchip { display: none; }
html body #v2-job-sheet .v3-js-flchip.v3-on { display: inline-flex; }
/* 5. Account: v1's own section on tokens; the booker call button
   grows from v1's 44px to the 48px floor. The stops rows v1's own
   renderAccountPortalSection builds keep their v1 inline styles. */
html body #v2-job-sheet #job-account-section {
  margin: var(--s5) 0 0 0;
  padding: var(--s4) var(--s4) var(--s3) 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
html body #v2-job-sheet .v3-js-paybadge {
  margin: var(--s3) 0 var(--s2) 0;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--raised);
  color: var(--text);
  font: 500 14px/24px var(--font-ui);
  letter-spacing: 0.02em;
}
html body #v2-job-sheet .v3-js-quote {
  margin: 0 0 var(--s3) 0;
  font: 400 var(--t-body);
  color: var(--text);
}
html body #v2-job-sheet .v3-js-booker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--hairline);
  width: 100%;
  box-sizing: border-box;
}
html body #v2-job-sheet .v3-js-bookername {
  color: var(--text);
  font: 600 var(--t-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-width: 0;
}
html body #v2-job-sheet .v3-js-bookercall {
  flex: none;
  width: 48px;
  height: 48px;
  min-width: 48px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--stroke);
  color: var(--text);
  align-items: center;
  justify-content: center;
}
html body #v2-job-sheet #job-account-stops-label { margin: var(--s3) 0 var(--s1) 0; }
html body #v2-job-sheet #job-account-stops {
  color: var(--text);
  font: 400 var(--t-body);
}
/* v3 Issue 229 s1 fu (rendered QA logs/229s1r-shots/facts.json, 11 Nov
   2026): the Passenger and Route rows never squeeze their text. The
   rows are flex (the .v3-rows pattern) and the pickup pin button kept
   v1's flex:none + white-space:nowrap pill (its "Send pickup pin to my
   phone" label alone measured 229px of a 131px row at 200% - the
   address wrapped one letter per line), the drop-off row's button kept
   v1's block width:100% (that row never had the pickup's stop class),
   and the Passenger Call / Message pills squeezed the name the same
   way. The fix is CSS only - v1's own button bytes are frozen (the 224
   pin-button and 143 drop-off-line locks): every row's text column
   gets flex:1 1 auto with min-width:0 and the PR403 text rule
   (overflow-wrap:break-word; hyphens:none; word-break:normal - whole
   words wrap, nothing splits mid-word); the pin buttons ride right as
   48px icon buttons (the label text stays in the DOM, visually hidden
   at font-size 0 - v1's own title keeps the words - and a same-origin
   data-URI send glyph paints the raised pill); Call / Message keep
   their Lucide glyphs in 48px chips with the label clipped; and below
   about 260px of viewport the rows WRAP - the buttons fold BELOW the
   text, never beside it. The legacy `button { width: 100% }` block
   and the .job-card rules lose to the #v2-job-sheet specificity
   here, never to a bang. The drop-off row keeps v1's own
   v2-route-stop class and is selected structurally as the routecard
   child (the same row treatment as the pickup row, never an id
   rename). */
html body #v2-job-sheet .v3-js-paxcard .v3-js-main,
html body #v2-job-sheet .v3-js-stop .v3-js-main,
html body #v2-job-sheet .v3-js-routecard > .v2-route-stop .v3-js-main {
  flex: 1 1 auto;
  min-width: 0;
}
html body #v2-job-sheet .v3-js-paxcard .v3-js-name,
html body #v2-job-sheet .v3-js-stop .v2-line-val,
html body #v2-job-sheet .v3-js-routecard > .v2-route-stop .v2-line-val {
  overflow-wrap: break-word;
  hyphens: none;
  word-break: normal;
}
/* v1's own pin buttons (both Route rows) are visually hidden but
   focusable; the addresses' :focus-visible rule below reveals the
   quiet label. */
html body #v2-job-sheet .v3-js-routecard .v2-action-btn {
  position: absolute;
  flex: none;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Call / Message: 48px icon chips - v1's own Lucide glyph rides the
   pill and the visible word clips away (v1's own titles keep it). */
html body #v2-job-sheet .v3-js-contactbtn {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
html body #v2-job-sheet .v3-js-contactbtn .contact-btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Below about 260px of viewport (the true 200% sheet at 195 CSS px):
   the rows WRAP - every button folds BELOW the text in its own
   line, so the text column keeps at least the width its words need
   and nothing ever wraps one letter per line. */
@media (max-width: 260px) {
  html body #v2-job-sheet .v3-js-paxcard,
  html body #v2-job-sheet .v3-js-routecard > .v3-js-stop,
  html body #v2-job-sheet .v3-js-routecard > .v2-route-stop {
    flex-wrap: wrap;
  }
  html body #v2-job-sheet .v3-js-routecard > .v3-js-stop,
  html body #v2-job-sheet .v3-js-routecard > .v2-route-stop {
    gap: var(--s3);
    row-gap: var(--s2);
    padding: var(--s2) var(--s3);
  }
  html body #v2-job-sheet .v3-js-paxcard .v3-js-main {
    flex-basis: 100%;
  }
  html body #v2-job-sheet .v3-js-routecard > .v3-js-stop .v3-js-main,
  html body #v2-job-sheet .v3-js-routecard > .v2-route-stop .v3-js-main {
    flex: 1 1 calc(100% - 36px);
  }
}
/* v3 Issue 229 s1 fu2 (rendered QA): v1's inline red unread badge and
   green per-passenger call buttons turn neutral on tokens here.
   An inline style beats even an id selector, so the ink rides a
   one-shot animation (normal author declarations, above inline)
   instead of a bang. The pickup span v1 appends inside #job-info
   is collapsed and clipped out of paint - v1 owns inline display.
   Route already carries the pickup time. */
@keyframes v3-js-sheet-badge-ink {
  from, to {
    background-color: var(--text);
    color: var(--on-light);
  }
}
@keyframes v3-js-sheet-ink {
  from, to { color: var(--text); }
}
@keyframes v3-js-sheet-btn-ink {
  from, to {
    background-color: var(--raised);
    color: var(--text);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
  }
}
html body #v2-job-sheet #driver-sms-unread-badge {
  animation: v3-js-sheet-badge-ink 1ms linear forwards;
}
html body #v2-job-sheet #v3-js-notes #job-info > span {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
html body #v2-job-sheet #job-account-stops * {
  animation: v3-js-sheet-ink 1ms linear forwards;
}
html body #v2-job-sheet #job-account-stops button {
  animation-name: v3-js-sheet-btn-ink;
}
/* ===== Issue 231 s1 (driver v3 "Focus", passenger chat, mockup 19):
   full-screen chat over the hidden v2 page. The v1 thread builder
   (_renderDriverSmsBubble) keeps its escaped innerHTML path; this
   layer only supplies classes, so message text stays text. The top
   bar carries the 48px back chevron (v1 close), the centred live
   name with "Passenger · job {id}" under it and the 48px Call
   button (v1 callPassenger). Incoming bubbles --raised with a
   hairline, outgoing white with black text, both at most 78% wide
   with 20px radii and 12px tabular times. The composer is a 56px
   pill and a 56px white circular send button. v1's > 10 mph gate
   keeps its threshold and swaps the thread for the pull-over lock.
   The modal is a .v3-sheet and ships .v3-sheet--closed so the Home
   drawer hides only while it is open. Tokens only, no red/amber.
   BEFORE the dock layer, never a cascade bang. */
html body #driver-sms-modal {
  inset: 0;
  height: 100dvh;
  max-height: none;
  z-index: 9500;
  overflow: hidden;
  background: var(--canvas);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html body #driver-sms-modal .v3-chat {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  border-top: env(safe-area-inset-top) solid var(--canvas);
}
html body #driver-sms-modal .v3-chat-bar {
  flex: none;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
}
html body #driver-sms-modal .v3-js-chat-back,
html body #driver-sms-modal .v3-js-chat-call {
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
}
html body #driver-sms-modal .v3-js-chat-call {
  background: var(--raised);
  border: 1px solid var(--hairline);
}
html body #driver-sms-modal .v3-chat-headtext {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
html body #driver-sms-modal .v3-chat-name {
  font: 500 var(--t-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body #driver-sms-modal .v3-chat-sub {
  margin-top: 3px;
  color: var(--text-3);
  font: 500 13px/1.25 var(--font-ui);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body #driver-sms-modal #driver-sms-recipient { display: none; }
html body #driver-sms-modal .v3-chat-banner {
  flex: none;
  margin: 0 0 var(--s2);
  padding: 0 var(--s6);
  text-align: center;
  color: var(--text-3);
  font: 400 13px/1.35 var(--font-ui);
}
html body #driver-sms-modal .v3-chat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
html body #driver-sms-modal .v3-chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s2) var(--s4) var(--s4);
  background: var(--canvas);
}
html body #driver-sms-modal .v3-chat-row { display: flex; width: 100%; }
html body #driver-sms-modal .v3-chat-row--out { justify-content: flex-end; }
html body #driver-sms-modal .v3-chat-row--in { justify-content: flex-start; }
html body #driver-sms-modal .v3-chat-bubble {
  max-width: 78%;
  box-sizing: border-box;
  padding: var(--s3) var(--s4);
  font: 400 17px/1.4 var(--font-ui);
  overflow-wrap: anywhere;
}
html body #driver-sms-modal .v3-chat-bubble--in {
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 20px 20px 20px 6px;
  color: var(--text);
}
html body #driver-sms-modal .v3-chat-bubble--out {
  background: var(--text);
  border-radius: 20px 20px 6px 20px;
  color: var(--on-light);
}
html body #driver-sms-modal .v3-chat-time {
  margin-top: var(--s1);
  font: 500 12px/1.2 var(--font-num);
  font-variant-numeric: tabular-nums;
}
html body #driver-sms-modal .v3-chat-bubble--in .v3-chat-time { color: var(--text-3); }
html body #driver-sms-modal .v3-chat-bubble--out .v3-chat-time {
  color: var(--on-light);
  opacity: 0.6;
}
html body #driver-sms-modal .v3-chat-day {
  margin: var(--s2) 0 var(--s1);
  text-align: center;
  color: var(--text-3);
  font: 500 12px/1.3 var(--font-ui);
}
html body #driver-sms-modal .v3-chat-empty {
  padding: var(--s8) 0;
  text-align: center;
  color: var(--text-3);
  font: 400 var(--t-label);
}
html body #driver-sms-modal .v3-js-chat-lock {
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s6);
  text-align: center;
  color: var(--text-2);
  background: var(--canvas);
}
html body #driver-sms-modal .v3-js-chat-locktext {
  margin: 0;
  font: 500 var(--t-body);
}
html body #driver-sms-modal .v3-chat-composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: var(--s2);
  padding: var(--s3) var(--s4) max(var(--s3), env(safe-area-inset-bottom));
  background: var(--canvas);
}
html body #driver-sms-modal #driver-sms-message {
  flex: 1;
  min-width: 0;
  height: var(--hit-driving);
  min-height: var(--hit-driving);
  max-height: 120px;
  margin: 0;
  padding: 15px var(--s5) 0;
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font: 400 var(--t-body);
}
html body #driver-sms-modal #driver-sms-message::placeholder {
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body #driver-sms-modal #driver-sms-send-btn {
  width: var(--hit-driving);
  height: var(--hit-driving);
  min-width: var(--hit-driving);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--on-light);
}
@media (max-width: 240px) {
  html body #driver-sms-modal .v3-chat-bar { padding-inline: var(--s3); gap: var(--s1); }
}
/* v3 Issue 229 s2: section 6 Fare. The estimated fare v1 already
   fills into #job-price, left-aligned money at 32px tabular figures,
   white on the dark card; the payment line keeps v1's own card-paid
   show rule. The section hides (v3-off, mirrored below) when v1 has
   no fare. W&R and parked rows stay out of this sheet. */
html body #v2-job-sheet .v3-js-farecard {
  padding: var(--s4) 18px var(--s4) 20px;
}
html body #v2-job-sheet .v3-js-farerow { display: block; }
html body #v2-job-sheet .v3-js-farerow + .v3-js-farerow {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline);
}
html body #v2-job-sheet .v3-js-farelabel {
  display: block;
  margin: 0 0 var(--s1) 0;
  font: 500 var(--t-label);
  color: var(--text-3);
}
html body #v2-job-sheet .v3-js-fareamount {
  margin: 0;
  font: 600 32px/1.1 var(--font-num);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: left;
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-farepaid {
  margin: 0;
  font: 400 var(--t-body);
  color: var(--text);
}
/* v3 Issue 229 s2b: section 7 Trip tools. v1's own Meter,
   Message dispatch and Pending completions controls, moved into a card
   as full-width 56px rows on the raised token with white text, a
   leading Lucide icon, a trailing chevron and 12px gaps - no colour.
   A row v1 hides stays hidden; the section hides (v3-off, mirrored
   below) when none of the three is visible. */
html body #v2-job-sheet .v3-js-toolscard {
  background: var(--raised);
  overflow: hidden;
}
html body #v2-job-sheet .v3-js-toolrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: var(--hit-driving);
  margin: 0;
  padding: 0 18px 0 20px;
  box-sizing: border-box;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--text);
  font: 500 var(--t-body);
  text-align: left;
}
/* Issue 1001: the empty-queue Pending completions row stays hidden even
   though the flex rule above puts display on every tool row. */
html body #v2-job-sheet #v3-js-tool-pending[hidden] { display: none; }
html body #v2-job-sheet .v3-js-toolrow:first-child { border-top: 0; }
html body #v2-job-sheet .v3-js-toolrow .v3-js-ic {
  display: inline-flex;
  flex: none;
  color: var(--text-2);
}
html body #v2-job-sheet .v3-js-toolrow .v3-js-toolname {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-toolrow .v3-js-toolchev {
  display: inline-flex;
  flex: none;
  color: var(--text-3);
}
/* At 200% (195px) the icon, chevron, gaps and 20/18px insets leave
   the label only ~57px, splitting "Message" and "Pending" mid-word.
   Narrow screens trim the gutters and insets and hand the freed width
   to the label; words still break at spaces only. */
@container (max-width: 260px) {
  html body #v2-job-sheet .v3-js-toolrow {
    gap: var(--s1);
    padding: 0 var(--s2);
  }
  html body #v2-job-sheet .v3-js-toolrow .v3-js-ic svg {
    width: 18px;
    height: 18px;
  }
  html body #v2-job-sheet .v3-js-toolrow .v3-js-toolchev svg {
    width: 16px;
    height: 16px;
  }
  html body #v2-job-sheet .v3-js-toolrow .v3-js-toolname {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
    hyphens: none;
    word-break: normal;
  }
}
html body #v2-job-sheet .v3-js-toolrow:active { background: var(--surface-3); }
/* v3 Issue 229 s2c: section 8 If something goes wrong. v1's own Mark
   no-show and Cancel job controls, moved into the last card as
   full-width 56px outlined rows: --danger ink and border on the raised
   card, never a filled red. The section and each row hide from v1's
   own inline display (a hidden control stays hidden; the section hides
   when both are hidden). This sits BEFORE the dock layer. */
html body #v2-job-sheet .v3-js-wrongcard {
  background: var(--raised);
  overflow: hidden;
}
html body #v2-job-sheet .v3-js-wrongcard .job-actions {
  display: block;
  margin: 0;
  padding: 0;
}
html body #v2-job-sheet .v3-js-wrongrow {
  width: 100%;
  min-height: var(--hit-driving);
  margin: 0 0 var(--s3) 0;
  padding: 14px 18px 14px 20px;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: var(--r-control);
  color: var(--danger);
  font: 500 var(--t-body);
  line-height: 26px;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}
html body #v2-job-sheet .v3-js-wrongrow:last-child { margin-bottom: 0; }
html body #v2-job-sheet .v3-js-wrongrow.v3-off { display: none; }
html body #v2-job-sheet .v3-js-wrongrow .v3-js-ic {
  display: inline-flex;
  flex: none;
  margin-right: var(--s3);
  vertical-align: middle;
  color: var(--danger);
}
html body #v2-job-sheet .v3-js-wrongrow .v3-js-wrongname {
  overflow-wrap: break-word;
  hyphens: none;
  word-break: normal;
}
html body #v2-job-sheet #mark-noshow-btn .v3-js-wrongcap {
  display: block; margin-left: calc(22px + var(--s3) + 0.32em);
  color: var(--text-3); font: 500 var(--t-cap);
  letter-spacing: normal; text-transform: none; white-space: normal;
}
html body #v2-job-sheet .v3-js-wrongrow:active { background: var(--danger-bg); }
@container (max-width: 260px) {
  html body #v2-job-sheet .v3-js-wrongrow {
    padding: 14px var(--s2);
    line-height: 26px;
  }
  html body #v2-job-sheet .v3-js-wrongrow .v3-js-ic {
    margin-right: var(--s1);
  }
  html body #v2-job-sheet #mark-noshow-btn .v3-js-wrongcap {
    margin-left: calc(18px + var(--s1) + 0.32em);
  }
  html body #v2-job-sheet .v3-js-wrongrow .v3-js-ic svg {
    width: 18px;
    height: 18px;
  }
}
/* v3 Issue #231 s3 dispatch chat */
/* v1's #chat-modal as the kit's bottom sheet. The id, the handlers,
   the SEND_MESSAGE request and v1's inline display toggles stay;
   openChat removes and closeChat re-adds v3-sheet--closed, so the
   268 open-sheet rule keeps hiding the Upcoming drawer and dock.
   Black, white and grey tokens only; no cascade bang. */
html body #chat-modal .v3-sheet-head { align-items: flex-start; }
html body #chat-modal .v3-sheet-title { padding-top: var(--s2); }
html body #chat-modal .v3-sheet-body { padding-bottom: var(--s2); }
html body #chat-modal .v3-chat-input {
  display: block;
  width: 100%;
  min-height: calc(3 * 1.45em + 2 * var(--s3));
  margin: 0;
  padding: var(--s3) var(--s4);
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  color: var(--text);
  font: 400 var(--t-body);
  font-family: var(--font-ui);
  resize: none;
}
html body #chat-modal .v3-chat-input::placeholder { color: var(--text-3); }
html body #chat-modal .v3-sheet-foot { padding-top: var(--s2); }
html body #chat-modal .v3-sheet-foot .v3-btn { margin: 0; }

/* v3 Issue #232 s1 completion */
/* The completion window on tokens: a full-screen app column with a
   64px top bar, one 84px glance amount, the fare / metered / fees
   rows, the Cash-Card segment, the receipt tiles and a 64px dock.
   Every v1 id, handler and display toggle stays; v1's inline display
   elements are hidden with clip-path, never by changing the display
   value its own JS writes. */
html body #driver-completion-modal.v3-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 9600;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-ui);
  box-sizing: border-box;
  overflow: hidden;
}
html body #driver-completion-modal .v3-complete-card {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  padding: max(4px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  border-radius: 0;
  text-align: left;
  container-type: inline-size;
}
html body #driver-completion-modal .v3-complete-top {
  flex: none;
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4);
}
html body #driver-completion-modal .v3-complete-back {
  width: var(--hit-min);
  height: var(--hit-min);
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
html body #driver-completion-modal .v3-complete-back:active { background: var(--overlay); }
html body #driver-completion-modal .v3-complete-heading {
  min-width: 0;
  text-align: center;
  font: 500 var(--t-label);
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-slot { width: var(--hit-min); height: var(--hit-min); }
html body #driver-completion-modal .v3-complete-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--s1) var(--edge) var(--s4);
}
html body #driver-completion-modal .v3-complete-old {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html body #driver-completion-modal .v3-complete-cap {
  margin: 14px 0 0;
  color: var(--text-3);
  font: 500 var(--t-cap);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-glance {
  margin: 16px 0 0;
  color: var(--text);
  font: 600 84px/0.95 var(--font-num);
  font-size: clamp(34px, 22vw, 84px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}
html body #driver-completion-modal .v3-complete-title {
  margin: 16px 0 0;
  color: var(--text);
  font: 600 34px/1.08 var(--font-ui);
  letter-spacing: -0.03em;
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-sub {
  margin: var(--s2) 0 0;
  color: var(--text-2);
  font: 400 var(--t-body);
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete--nothing .v3-complete-glance,
html body #driver-completion-modal .v3-complete--nothing #completion-charge-label { display: none; }
html body #driver-completion-modal .v3-complete-cardrows {
  margin-top: var(--s6);
  overflow: hidden;
  flex: none;
}
html body #driver-completion-modal .v3-complete-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--hit-driving);
  padding: 0 var(--s4);
  border-top: 1px solid var(--hairline);
  color: var(--text);
}
html body #driver-completion-modal .v3-complete-cardrows > .v3-complete-row:first-child { border-top: 0; }
html body #driver-completion-modal .v3-complete-waitrow {
  display: none;
  color: var(--text-2);
  font: 500 var(--t-label);
  font-variant-numeric: tabular-nums;
}
html body #driver-completion-modal .v3-complete-waitrow.v3-on { display: block; }
html body #driver-completion-modal .v3-complete-waitrow strong { font-weight: 600; color: var(--text); }
html body #driver-completion-modal .v3-complete-label {
  font: 500 var(--t-label);
  color: var(--text);
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-subline {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font: 500 var(--t-label);
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-subline strong { font-weight: 500; }
html body #driver-completion-modal .v3-complete-finalised {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding-block: 10px;
  border-top: 1px solid var(--hairline);
}
html body #driver-completion-modal .v3-complete-finalised-title { font: 600 var(--t-label); }
html body #driver-completion-modal .v3-complete-finalised-line {
  color: var(--text);
  font: 500 var(--t-body);
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-finalised-note-label {
  margin-top: var(--s2);
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body #driver-completion-modal .v3-complete-finalised-note {
  color: var(--text);
  font: 400 var(--t-body);
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-feesincl { font-variant-numeric: tabular-nums; }
html body #driver-completion-modal #completion-driver-fees::placeholder,
html body #driver-completion-modal #completion-fee-notes::placeholder {
  color: var(--text-3);
  opacity: 1;
}
html body #driver-completion-modal .v3-complete-farewrap {
  flex: none;
  width: 120px;
  max-width: 60%;
  height: var(--hit-min);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding: 0 10px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: 500 var(--t-body);
  font-variant-numeric: tabular-nums;
}
html body #driver-completion-modal .v3-complete-fare {
  width: 100%;
  min-width: 48px;
  height: var(--hit-min);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 500 var(--t-body);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
html body #driver-completion-modal .v3-complete-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: var(--hit-min);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
html body #driver-completion-modal .v3-complete-switch::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  bottom: 8px;
  border-radius: 16px;
  background: var(--stroke);
}
html body #driver-completion-modal .v3-complete-switch::after { top: 11px; }
html body #driver-completion-modal .v3-complete-switch.v3-switch--on { background: transparent; }
html body #driver-completion-modal .v3-complete-switch.v3-switch--on::before { background: var(--text); }
html body #driver-completion-modal .v3-complete-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
html body #driver-completion-modal .v3-complete-morebtn {
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
}
html body #driver-completion-modal .v3-complete-morebtn:active { background: var(--overlay); }
html body #driver-completion-modal .v3-complete-morebtn .v3-chev {
  flex: none;
  color: var(--text-3);
  transition: transform var(--dur-tap) var(--ease-out);
}
html body #driver-completion-modal .v3-complete-morebtn[aria-expanded="true"] .v3-chev { transform: rotate(90deg); }
html body #driver-completion-modal .v3-complete-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-sheet) var(--ease-out);
}
html body #driver-completion-modal .v3-complete-more--open { max-height: 720px; }
html body #driver-completion-modal .v3-complete-moreblock {
  margin-top: var(--s3);
  padding: var(--s3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body #driver-completion-modal .v3-complete-moretitle {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 600 var(--t-body);
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-lbl {
  display: block;
  margin: 0 0 6px;
  color: var(--text-2);
  font: 500 14px/1.2 var(--font-ui);
  overflow-wrap: normal;
  word-break: normal;
}
html body #driver-completion-modal .v3-complete-input,
html body #driver-completion-modal .v3-complete-select,
html body #driver-completion-modal .v3-complete-textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 var(--s3);
  padding: 0 var(--s3);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: var(--raised);
  color: var(--text);
  font: 400 var(--t-body);
}
html body #driver-completion-modal .v3-complete-input,
html body #driver-completion-modal .v3-complete-select { height: var(--hit-min); }
html body #driver-completion-modal .v3-complete-textarea {
  min-height: 72px;
  padding: 10px var(--s3);
  resize: vertical;
}
html body #driver-completion-modal .v3-complete-seg {
  display: block;
  margin-top: 14px;
  font-size: 0;
}
html body #driver-completion-modal .v3-complete-seg > button {
  display: inline-flex;
  width: calc(50% - 3px);
  min-width: 0;
  margin: 0;
  min-height: var(--hit-min);
  vertical-align: top;
}
html body #driver-completion-modal .v3-complete-seg > button:first-child { margin-right: var(--s1); }
html body #driver-completion-modal .v3-complete-receipcap { margin: 22px 4px 10px; }
html body #driver-completion-modal .v3-complete-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
html body #driver-completion-modal .v3-complete-tile {
  height: 72px;
  padding: 0 var(--s1);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--hairline);
  cursor: pointer;
  font-family: var(--font-ui);
}
html body #driver-completion-modal .v3-complete-tile:active { background: var(--overlay); }
html body #driver-completion-modal .v3-complete-tile--off {
  opacity: 0.4;
  cursor: not-allowed;
}
html body #driver-completion-modal .v3-review-req-btn {
  width: 100%;
  margin-top: 10px;
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-card);
  background: var(--text);
  border: 1px solid var(--text);
  color: var(--on-light);
  font: 600 var(--t-body);
  cursor: pointer;
}
html body #driver-completion-modal .v3-review-req-btn:active {
  background: var(--text-2);
}
html body #driver-completion-modal .v3-review-req-btn:disabled {
  background: var(--surface);
  border-color: var(--hairline);
  color: var(--text-3);
  cursor: not-allowed;
}
html body #driver-completion-modal .v3-review-req-status {
  margin: 8px 4px 0;
  min-height: 1em;
  color: var(--text-2);
  font: 400 var(--t-cap);
}
html body #driver-completion-modal .v3-complete-dock {
  flex: none;
  padding: var(--s3) var(--s4) 0;
}
html body #driver-completion-modal .v3-complete-submit {
  width: 100%;
  height: var(--hit-primary);
  border: 0;
  border-radius: 20px;
  background: var(--text);
  color: var(--on-light);
  font: 600 18px/1 var(--font-ui);
  letter-spacing: -0.01em;
  cursor: pointer;
}
html body #driver-completion-modal .v3-complete-submit:disabled { opacity: 0.7; cursor: wait; }
@container (max-width: 260px) {
  html body #driver-completion-modal .v3-complete-heading { font-size: 12px; }
  html body #driver-completion-modal .v3-complete-card.v3-complete--account .v3-complete-heading { font-size: 13px; }
  html body #driver-completion-modal .v3-complete-main { padding-inline: var(--s3); }
  html body #driver-completion-modal .v3-complete-top { padding-inline: var(--s3); }
  html body #driver-completion-modal .v3-complete-tiles { gap: var(--s2); }
  html body #driver-completion-modal .v3-complete-seg { padding-inline: var(--s1); }
  html body #driver-completion-modal .v3-complete-seg > button {
    width: calc(50% - 3px);
    padding-inline: var(--s1);
    gap: 6px;
    font-size: 15px;
  }
  html body #driver-completion-modal .v3-complete-farerow,
  html body #driver-completion-modal .v3-complete-feerow {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s1);
    padding-block: var(--s2);
  }
  html body #driver-completion-modal .v3-complete-farewrap {
    width: 100%;
    max-width: none;
    min-height: var(--hit-min);
  }
}
/* v3 Issue #232 s2 fees sheet */
/* The v1 fees, notes and piggybank fields move, by id, into a v3
   sheet opened from the completion row. The sheet ships closed and
   toggles v3-sheet--closed with the row, the 48px x, the scrim and
   the 64px Done. The row's sub line is set with textContent on close
   (None, or fees in pounds and a note count). */
html body #driver-completion-modal .v3-fees-sheet { z-index: calc(var(--z-sheet) + 1); }
html body #driver-completion-modal .v3-fees-sheet.v3-sheet--closed { visibility: hidden; }
html body #driver-completion-modal #v3-fees-scrim { z-index: var(--z-sheet); }
html body #driver-completion-modal .v3-fees-sheet .v3-sheet-body {
  padding: 0 var(--s4) var(--s2);
}
html body #driver-completion-modal .v3-fees-sheet .v3-complete-moreblock {
  margin: var(--s4) 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
html body #driver-completion-modal .v3-fees-sheet .v3-complete-moreblock:first-child { margin-top: var(--s2); }
html body #driver-completion-modal .v3-fees-sheet .v3-complete-moretitle { margin-bottom: var(--s3); }
html body #driver-completion-modal .v3-fees-sheet .v3-complete-textarea { margin-bottom: 0; }
html body #driver-completion-modal .v3-fees-sheet .v3-sheet-foot { padding-top: var(--s3); }
html body #driver-completion-modal .v3-fees-sheet .v3-sheet-foot .v3-btn {
  width: 100%;
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  margin: 0;
}
html body #driver-completion-modal .v3-complete-morebtn .v3-complete-subline {
  margin-top: 3px;
  color: var(--text-3);
}
html body #driver-completion-modal .v3-complete-morebtn .v3-complete-subline,
html body #driver-completion-modal .v3-fees-sheet .v3-sheet-title {
  overflow-wrap: normal;
  word-break: normal;
}

/* Issue #1033: inline Add fee row (account/portal only; opens the #232 fee sheet). */
html body #driver-completion-modal .v3-complete-addfeebtn {
  width: 100%;
  min-height: var(--hit-min);
  background: var(--surface);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
}
html body #driver-completion-modal .v3-complete-addfeebtn:active { background: var(--overlay); }
html body #driver-completion-modal .v3-complete-addfeebtn .v3-chev { flex: none; color: var(--text-3); }

/* v3 Issue #232 s3 card */
/* The card-method choice becomes a bottom v3 sheet with two 64px
   rows (Beta Card Capture / SumUp Terminal, Lucide card and
   chevron) and a 64px secondary Cancel. The sheet ships
   v3-sheet--closed; v1's own display:flex / display:none pair and
   the scrim tap still show/hide it and _show/close/choose toggle
   the class with those writes (Pixel #268). The SumUp waiting
   overlay keeps v1's display show/hide, polling, timeouts and
   success/failure toasts; only its panel is repainted as mockup
   17 - 96px card-icon circle, 56px glance amount, v1's tap string
   and the 64px secondary Cancel. */
html body #card-method-choice-modal {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body #card-method-choice-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body #card-method-choice-modal #v3-card-method-sheet {
  container-type: inline-size;
  max-height: calc(100% - 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
html body #card-method-choice-modal .v3-sheet-body {
  padding: 0 var(--s4);
  overflow: visible;
}
html body #card-method-choice-modal .v3-card-rows {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body #card-method-choice-modal .v3-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  padding: 0 var(--s4);
  border: 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  font: 500 var(--t-label);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
html body #card-method-choice-modal .v3-card-rows .v3-card-row:first-child { border-top: 0; }
html body #card-method-choice-modal .v3-card-row:active { background: var(--overlay); }
html body #card-method-choice-modal .v3-card-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}
html body #card-method-choice-modal .v3-card-sub {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font: 400 var(--t-cap);
  letter-spacing: 0;
  text-transform: none;
}
html body #card-method-choice-modal .v3-card-row > .v3-icon {
  flex: none;
  color: var(--text-2);
}
html body #card-method-choice-modal .v3-chev {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
html body #card-method-choice-modal .v3-sheet-title {
  overflow-wrap: normal;
  word-break: normal;
}
html body #card-method-choice-modal .v3-sheet-foot { padding-top: var(--s3); }
html body #card-method-choice-modal .v3-sheet-foot .v3-btn {
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  margin: 0;
}
@container (max-width: 260px) {
  html body #card-method-choice-modal .v3-card-sub { display: none; }
}
html body #sumup-waiting-overlay {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body #sumup-waiting-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.85;
}
html body #sumup-waiting-overlay .v3-sumup-sheet {
  container-type: inline-size;
  max-height: calc(100% - 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
html body #sumup-waiting-overlay .v3-sumup-body {
  padding: 0 var(--s4);
  overflow: visible;
  text-align: center;
}
html body #sumup-waiting-overlay .v3-sumup-icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 24px auto 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--raised);
  color: var(--text);
}
html body #sumup-waiting-overlay #sumup-waiting-amount {
  margin: 22px 0 0;
  color: var(--text);
  font: 600 56px/0.95 var(--font-num);
  font-size: clamp(32px, 14.36cqw, 56px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
html body #sumup-waiting-overlay #sumup-waiting-status {
  margin: 14px 0 0;
  color: var(--text-2);
  font: 400 var(--t-body);
  overflow-wrap: normal;
  word-break: normal;
}
html body #sumup-waiting-overlay #sumup-waiting-spinner {
  width: 30px;
  height: 30px;
  margin: 16px auto 0;
  border: 3px solid var(--stroke);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
html body #sumup-waiting-overlay .v3-sumup-close { margin-left: auto; }
html body #sumup-waiting-overlay .v3-sheet-title {
  overflow-wrap: normal;
  word-break: normal;
}
html body #sumup-waiting-overlay .v3-sheet-foot { padding-top: var(--s3); }
html body #sumup-waiting-overlay .v3-sheet-foot .v3-btn {
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  margin: 0;
}
@container (max-width: 260px) {
  html body #sumup-waiting-overlay .v3-sheet-grab,
  html body #sumup-waiting-overlay #sumup-waiting-spinner,
  html body #sumup-waiting-overlay .v3-sheet-sub { display: none; }
  html body #sumup-waiting-overlay .v3-sumup-icon { margin-top: 16px; }
  html body #sumup-waiting-overlay #sumup-waiting-amount { margin-top: 14px; }
  html body #sumup-waiting-overlay #sumup-waiting-status { margin-top: 10px; }
}
@media (max-width: 300px) {
  html body #sumup-waiting-overlay .v3-sumup-sheet {
    max-height: calc(100% - 8px);
  }
  html body #sumup-waiting-overlay .v3-sheet-grab { height: 16px; }
  html body #sumup-waiting-overlay .v3-sheet-head { padding-bottom: 4px; }
  html body #sumup-waiting-overlay .v3-sumup-body {
    overflow-y: auto;
    min-height: 0;
  }
  html body #sumup-waiting-overlay .v3-sumup-icon {
    width: 56px;
    height: 56px;
    margin-top: 4px;
  }
  html body #sumup-waiting-overlay .v3-sumup-icon .v3-icon {
    width: 24px;
    height: 24px;
  }
  html body #sumup-waiting-overlay #sumup-waiting-amount { margin-top: 6px; }
  html body #sumup-waiting-overlay #sumup-waiting-status { margin-top: 4px; }
  html body #sumup-waiting-overlay #sumup-waiting-spinner {
    display: block;
    width: 24px;
    height: 24px;
    margin: 6px auto 4px;
    border-width: 3px;
  }
  html body #sumup-waiting-overlay .v3-sheet-foot {
    padding-top: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}


/* v3 Issue #232 s6 pending */
/* Menu / badge / Job-sheet tool -> Pending completions becomes a v3
   bottom sheet over the unchanged pendingCompletions queue. v1's
   display:flex / display:none writes and its alert, retry toasts and
   empty toast stay; the sheet toggles v3-sheet--closed alongside
   them. One row per entry (job, time, state), 64px minimum, wrapping
   at spaces with no ellipsis; only the failed state uses colour.
   The list scrolls above the pinned Retry now button. */
html body #v3-pending-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 9998;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body #v3-pending-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body #v3-pending-modal #v3-pending-sheet {
  container-type: inline-size;
  width: 100%;
  max-height: calc(100% - 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
html body #v3-pending-modal .v3-sheet-head { align-items: flex-start; }
html body #v3-pending-modal .v3-sheet-head > div {
  flex: 1;
  min-width: 0;
}
html body #v3-pending-modal .v3-sheet-title {
  padding-top: var(--s2);
  overflow-wrap: normal;
  word-break: normal;
}
html body #v3-pending-modal .v3-sheet-sub {
  margin-top: 2px;
  color: var(--text-3);
}
html body #v3-pending-modal .v3-sheet-body { padding: 0 var(--s4); }
html body #v3-pending-modal .v3-pending-list {
  display: flex;
  flex-direction: column;
}
html body #v3-pending-modal .v3-pending-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--hit-primary);
  padding: var(--s3) 0;
  border-top: 1px solid var(--hairline);
  box-sizing: border-box;
}
html body #v3-pending-modal .v3-pending-row:first-child { border-top: 0; }
html body #v3-pending-modal .v3-pending-main {
  flex: 1;
  min-width: 0;
}
html body #v3-pending-modal .v3-pending-job {
  margin: 0;
  color: var(--text);
  font: 500 var(--t-label);
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: clip;
}
html body #v3-pending-modal .v3-pending-pickup {
  margin: 2px 0 0;
  color: var(--text-3);
  font: 400 var(--t-cap);
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
html body #v3-pending-modal .v3-pending-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
html body #v3-pending-modal .v3-pending-time {
  color: var(--text-3);
  font: 500 var(--t-cap);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
html body #v3-pending-modal .v3-pending-state {
  color: var(--text-2);
  font: 500 var(--t-cap);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: clip;
}
html body #v3-pending-modal .v3-pending-state--fail { color: var(--danger); }
html body #v3-pending-modal .v3-pending-empty {
  margin: 0;
  padding: var(--s8) 0;
  color: var(--text-2);
  font: 400 var(--t-body);
  text-align: center;
}
html body #v3-pending-modal .v3-sheet-foot {
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline);
}
html body #v3-pending-modal .v3-sheet-foot .v3-btn {
  width: 100%;
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  margin: 0;
}
@container (max-width: 260px) {
  html body #v3-pending-modal .v3-pending-row {
    flex-direction: column;
    gap: 2px;
  }
  html body #v3-pending-modal .v3-pending-meta { align-items: flex-start; }
  html body #v3-pending-modal .v3-pending-state { text-align: left; }
}
@media (max-width: 300px) {
  html body #v3-pending-modal #v3-pending-sheet.v3-pending-sheet {
    max-height: 85vh;
    max-height: 85dvh;
  }
  html body #v3-pending-modal .v3-sheet-grab { height: 16px; }
  html body #v3-pending-modal .v3-sheet-head {
    padding: 0 var(--s3) var(--s1) var(--s3);
  }
  html body #v3-pending-modal .v3-sheet-title {
    padding-top: 0;
    font-size: 22px;
    line-height: 1.15;
  }
  html body #v3-pending-modal .v3-sheet-sub {
    font-size: 14px;
    line-height: 1.3;
  }
  html body #v3-pending-modal .v3-sheet-body { padding: 0 var(--s3); }
  html body #v3-pending-modal .v3-pending-row {
    gap: var(--s2);
    padding: var(--s2) 0;
  }
  html body #v3-pending-modal .v3-sheet-foot {
    padding: 0 var(--s3) max(16px, env(safe-area-inset-bottom));
  }
}

/* v3 Issue #233 s1 jobs */
/* The Jobs screen is a full-screen .v3-sheet (so it hides the Home
   owned-jobs drawer and the dock through the existing open-sheet
   rules) and ships v3-sheet--closed. Upcoming is a mirror of v1's
   owned list: same _ownedJobs data, same hold protection and the same
   v1 onclick handlers. Tokens only, no cascade bang. */
html body .v3-jobs {
  inset: 0;
  max-height: none;
  border-radius: 0;
  border-top: 0;
  background: var(--canvas);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  overflow: hidden;
}
html body .v3-jobs-bar {
  flex: none;
  display: grid;
  grid-template-columns: var(--hit-min) 1fr var(--hit-min);
  align-items: center;
  gap: var(--s2);
  min-height: var(--hit-driving);
  padding: var(--s2) var(--s3);
}
html body .v3-jobs-head {
  margin: 0;
  text-align: center;
}
html body .v3-jobs-back { justify-self: start; }
html body .v3-jobs-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: var(--s2) var(--edge) var(--s6);
}
html body .v3-jobs-tabs {
  width: 100%;
  margin: 0 0 var(--s4);
}
html body .v3-jobs-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--hit-min);
  padding: 0 var(--s2);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 500 var(--t-label);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
}
html body .v3-jobs-tab[hidden] { display: none; }
html body .v3-jobs-tab.v3-seg--on {
  background: var(--text);
  color: var(--on-light);
  font-weight: 600;
}
html body .v3-jobs-tab-count { white-space: nowrap; }
html body .v3-jobs-card {
  margin: 0 0 var(--s3);
  padding: var(--s4) var(--s4) var(--s3);
  background: var(--surface);
}
html body .v3-jobs-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  min-width: 0;
}
html body .v3-jobs-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: none;
  width: 60px;
  white-space: normal;
  font: 600 var(--t-head);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
html body .v3-jobs-time > span {
  min-width: 0;
  white-space: nowrap;
}
html body .v3-jobs-ico {
  margin-top: 1px;
}
html body .v3-jobs-route {
  flex: 1 1 auto;
  min-width: 0;
}
html body .v3-jobs-pickup,
html body .v3-jobs-drop {
  display: flex;
  align-items: flex-start;
  gap: var(--s1);
  overflow-wrap: break-word;
  white-space: normal;
  text-overflow: clip;
}
html body .v3-jobs-pickup > span,
html body .v3-jobs-drop > span {
  min-width: 0;
}
html body .v3-jobs-pickup {
  color: var(--text);
  font: 500 var(--t-label);
}
html body .v3-jobs-drop {
  margin-top: var(--s1);
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body .v3-jobs-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  margin-top: var(--s4);
}
html body .v3-jobs-action {
  position: relative;
  isolation: isolate;
  height: var(--hit-driving);
  min-height: var(--hit-driving);
  border-radius: 20px;
  color: var(--text);
  font-size: 15px;
  overflow: hidden;
}
html body .v3-jobs-action-label {
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}
/* The Break tile's fill pattern: the overlay is opaque --text and blends
   by difference, so the white primary gets a dark fill and the dark
   secondary a light one, with the label inverting over the fill edge.
   --surface while holding keeps the white primary's fill visible. */
html body .v3-jobs-action .hold-overlay {
  z-index: 0;
  mix-blend-mode: difference;
  box-shadow: inset 0 0 0 100vmax var(--text);
}
html body .v3-jobs-action.hold-active {
  background: var(--surface);
  border-color: var(--text);
}
html body .v3-jobs-action.hold-paused .hold-overlay {
  opacity: 1;
  background: transparent;
}
html body .v3-jobs-action .hold-countdown,
html body .v3-jobs-action .hold-hint { z-index: 2; }
html body .v3-jobs-action .hold-countdown {
  mix-blend-mode: difference;
  text-shadow: none;
}
html body .v3-jobs-day {
  margin: var(--s5) var(--s1) var(--s2);
}
html body .v3-jobs-day:first-child { margin-top: 0; }
html body .v3-jobs-help {
  margin: var(--s5) var(--s1) 0;
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body .v3-jobs-empty {
  margin: var(--s6) var(--s1);
  color: var(--text-3);
  font: 500 var(--t-body);
  text-align: center;
}
@media (max-width: 300px) {
  html body .v3-jobs-scroll { padding-inline: var(--s3); }
  html body .v3-jobs-tabs {
    gap: 2px;
    padding: 3px;
  }
  html body .v3-jobs-tab {
    flex-direction: column;
    gap: 1px;
    padding: 0 2px;
    font-size: 11px;
  }
  html body .v3-jobs-tab-count { line-height: 1.1; }
  html body .v3-jobs-card { padding: var(--s3) var(--s3) var(--s2); }
  html body .v3-jobs-row { gap: var(--s2); }
  html body .v3-jobs-actions {
    grid-template-columns: 1fr;
    gap: var(--s2);
    margin-top: var(--s3);
  }
  html body .v3-jobs-action {
    height: var(--hit-min);
    min-height: var(--hit-min);
  }
}

/* v3 Issue #233 s2 my jobs */
/* Menu -> My jobs (#assigned-jobs-overlay) becomes a full v3 screen
   over the unchanged v1 endpoint and empty state. v1's display writes
   and every id/handler stay; the sheet ships v3-sheet--closed and the
   open/close pair toggles it alongside them. The card is the Upcoming
   pattern without actions: 60px tabular time head, pickup, "To ..."
   in --text-3, and date captions such as "Today". Opens silently.
   Tokens only, no bang. */
/* s1 now closes its own last @media (max-width: 300px) block before
   this section, so the full-height base below belongs to every
   viewport, not just the narrow one. */
html body #assigned-jobs-overlay {
  padding: 0;
  background: var(--canvas);
  z-index: 9500;
}
html body #assigned-jobs-overlay #v3-myjobs-sheet.v3-myjobs-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet);
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--canvas);
  padding-top: max(0px, env(safe-area-inset-top));
}
html body #v3-myjobs-sheet .v3-myjobs-bar {
  flex: none;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
}
html body #v3-myjobs-sheet .v3-myjobs-back {
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
}
html body #v3-myjobs-sheet .v3-myjobs-head {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font: 600 var(--t-title);
  font-size: clamp(20px, 8cqw, 28px);
  overflow-wrap: break-word;
  hyphens: auto;
  hyphenate-limit-chars: 12 6 6;
}
html body #v3-myjobs-sheet .v3-myjobs-slot {
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
}
html body #v3-myjobs-sheet .v3-myjobs-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--s4) max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
html body #v3-myjobs-sheet .v3-myjobs-day {
  margin: 22px 4px 0;
}
html body #v3-myjobs-sheet .v3-myjobs-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  margin-top: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
html body #v3-myjobs-sheet .v3-myjobs-time {
  flex: none;
  width: 60px;
  font: 600 var(--t-body);
  color: var(--text);
  overflow-wrap: break-word;
}
html body #v3-myjobs-sheet .v3-myjobs-main {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}
/* Issue 557: customer name line; clamps to one line. */
html body #v3-myjobs-sheet .v3-myjobs-name {
  font: 500 var(--t-label);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html body #v3-myjobs-sheet .v3-myjobs-pickup {
  font: 500 var(--t-body);
  color: var(--text);
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: break-word;
  hyphens: none;
  word-break: normal;
}
html body #v3-myjobs-sheet .v3-myjobs-drop {
  margin-top: 4px;
  font: 400 var(--t-body);
  color: var(--text-3);
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: break-word;
  hyphens: none;
  word-break: normal;
}
html body #v3-myjobs-sheet .v3-myjobs-note {
  margin: 40px 0 0;
  text-align: center;
  color: var(--text-3);
  font: 400 var(--t-body);
}
html body #v3-myjobs-sheet .v3-myjobs-note--err { color: var(--danger); }
@media (max-width: 300px) {
  html body #v3-myjobs-sheet .v3-myjobs-bar {
    gap: var(--s1);
    padding: 0 var(--s2);
  }
  html body #v3-myjobs-sheet .v3-myjobs-head {
    font-size: 22px;
    white-space: nowrap;
  }
  html body #v3-myjobs-sheet .v3-myjobs-slot {
    width: 40px;
    min-width: 40px;
  }
  html body #v3-myjobs-sheet .v3-myjobs-body {
    padding: 0 var(--s2) max(24px, env(safe-area-inset-bottom));
  }
  html body #v3-myjobs-sheet .v3-myjobs-main,
  html body #v3-myjobs-sheet .v3-myjobs-pickup,
  html body #v3-myjobs-sheet .v3-myjobs-drop {
    /* Issue 557: a word wider than the column breaks instead of overflowing */
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }
  html body #v3-myjobs-sheet .v3-myjobs-card {
    padding: 12px;
    gap: var(--s2);
  }
  html body #v3-myjobs-sheet .v3-myjobs-time { width: 48px; }
}

/* v3 Issue #233 s3 bidding */
/* #bidding-overlay is a full-screen sheet (it hides the Home drawer and
   the dock through the existing open-sheet rules) and #bidding-bid-modal
   is the bottom confirm sheet. Both ship v3-sheet--closed on their inner
   wrapper and the v1 display writes toggle it. v1's ids, handlers and
   data-job-id attributes are untouched, so the countdown/TICK paths keep
   reading style.display === "flex". */
html body #bidding-overlay {
  inset: 0;
  width: auto;
  height: auto;
  background: var(--canvas);
}
html body .v3-bid-sheet {
  position: absolute;
  inset: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  overflow: hidden;
}
html body .v3-bid-head {
  flex: none;
  padding-right: var(--s3);
}
html body .v3-bid-badge {
  display: inline-block;
  margin-left: var(--s1);
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--overlay);
  color: var(--text);
  font: 600 var(--t-cap);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
html body .v3-bid-list {
  padding: var(--s2) var(--edge) var(--s6);
  overscroll-behavior-y: contain;
}
html body .v3-bid-card {
  margin: 0 0 var(--s3);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
html body .v3-bid-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  min-width: 0;
}
html body .v3-bid-main {
  flex: 1 1 auto;
  min-width: 0;
}
html body .v3-bid-town {
  color: var(--text);
  font: 600 var(--t-body);
  overflow-wrap: break-word;
}
html body .v3-bid-time {
  margin-top: var(--s1);
  color: var(--text-2);
  font: 500 var(--t-label);
  font-variant-numeric: tabular-nums;
}
html body .v3-bid-price {
  flex: none;
  color: var(--text);
  font: 600 var(--t-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html body .v3-bid-est {
  color: var(--text-2);
  font-weight: 500;
}
html body .v3-bid-quoted {
  color: var(--text);
}
html body .v3-bid-tag {
  display: inline-block;
  margin-left: var(--s1);
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--overlay);
  color: var(--text);
  font: 600 var(--t-cap);
  vertical-align: middle;
  white-space: nowrap;
}
html body .v3-bid-tag--bid {
  border: 1px solid var(--stroke);
}
html body .v3-bid-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
  margin-top: var(--s3);
}
html body .v3-bid-countdown {
  color: var(--text-2);
  font: 500 var(--t-label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html body .v3-bid-count {
  color: var(--text-3);
  font: 500 var(--t-cap);
  white-space: nowrap;
}
html body .v3-bid-ic {
  width: 20px;
  height: 20px;
  flex: none;
  margin-right: var(--s1);
  vertical-align: -4px;
}
html body .v3-bid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  margin-top: var(--s4);
}
html body .v3-bid-action {
  height: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0 var(--s2);
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}
html body #bidding-bid-modal {
  padding: 0 var(--s3);
  box-sizing: border-box;
}
html body .v3-bid-confirm {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  box-sizing: border-box;
}
html body .v3-bid-confirm-body {
  padding: 0 var(--s4) var(--s2);
}
html body .v3-bid-mroute {
  color: var(--text);
  font: 600 var(--t-head);
  overflow-wrap: break-word;
}
html body .v3-bid-mmeta {
  margin-top: var(--s1);
  color: var(--text-2);
  font: 500 var(--t-body);
  font-variant-numeric: tabular-nums;
}
html body .v3-bid-mnote {
  margin-top: var(--s3);
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body .v3-bid-mcount {
  color: var(--text-2);
}
html body .v3-bid-confirm-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
@media (max-width: 300px) {
  html body .v3-bid-list {
    padding-inline: var(--s3);
  }
  html body .v3-bid-card {
    padding: var(--s3);
  }
  html body .v3-bid-head {
    padding-left: var(--s3);
    gap: var(--s1);
  }
  html body .v3-bid-head .v3-sheet-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: var(--s1);
    min-width: 0;
    font-size: 18px;
    line-height: 1.15;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  html body .v3-bid-badge { white-space: nowrap; }
  html body .v3-bid-row {
    flex-direction: column;
    gap: var(--s1);
  }
  html body .v3-bid-main,
  html body .v3-bid-price {
    flex: none;
    width: 100%;
  }
  html body .v3-bid-town {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  html body .v3-bid-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
  }
  html body .v3-bid-countdown {
    font-size: 13px;
  }
  html body .v3-bid-countdown[data-closes-at=""] {
    display: flex;
    align-items: flex-start;
    gap: var(--s1);
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    text-overflow: clip;
  }
  html body .v3-bid-countdown[data-closes-at=""] .v3-bid-ic {
    margin-top: 1px;
    margin-right: 0;
  }
  html body .v3-bid-actions,
  html body .v3-bid-confirm-foot {
    grid-template-columns: 1fr;
  }
  html body .v3-bid-confirm-foot .v3-btn--primary {
    min-height: var(--hit-min);
  }
  html body .v3-bid-confirm {
    max-height: 90dvh;
  }
  html body .v3-bid-confirm-body {
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
  }
  html body .v3-bid-mroute {
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  html body .v3-bid-confirm-foot {
    flex: none;
    background: var(--raised);
  }
}

/* v3 Issue #233 s4 drawer route */
/* Every v1 path that opened the owned-jobs drawer (the Home Next job
   card, window.openOwnedDrawer, the status reminder and the grip tap /
   swipe) now lands on the v3 Jobs screen Upcoming tab. The v1 drawer,
   its grip and every id/handler stay in the DOM for inventory but are
   kept out of sight; the v3 screen is the painted surface. Two ids
   deep beats the earlier #223 r11 sheet/Menu hide rule without a bang. */
html body #cyber-standby #owned-jobs-section {
  visibility: hidden;
  pointer-events: none;
}



/* v3 Issue #234 s1 tax */
/* Tax & expenses is a full-screen .v3-sheet, so it joins the existing
   open-sheet rules (the Home owned-jobs drawer and the dock hide while
   it is open). It ships v3-sheet--closed, and the v1 open / close pair
   toggles that class alongside its display writes. Only the page shell
   is restyled here; the inner cards and modals keep their v1 look.
   Tokens only, no cascade bang. */
/* #233 s4 hid the v1 drawer everywhere, including Home. Put it back
   on Home while no v3 sheet or Menu is open; the #268 open-sheet rule
   (and s4) still hide it while this or any other screen is open. s4
   also left pointer-events: none, so the restore must put taps back.
   The SumUp wait is a v1 inline display:flex overlay without a
   position of its own: while it is shown the drawer must drop back
   out (s4 hides it and leaves pointer-events: none) and the overlay
   is stacked fixed above the drawer's z-index 20 so Cancel wins. */
html body:not(:has(.v3-sheet:not(.v3-sheet--closed):not(.v3-login-sheet):not(.v3-sumup-sheet))):not(:has(#v3-menu.v3-menu--on)):not(:has(#sumup-waiting-overlay[style*="display: flex"])):not(:has(#sumup-waiting-overlay[style*="display:flex"])) #cyber-standby #owned-jobs-section {
  visibility: visible;
  pointer-events: auto;
}
html body #sumup-waiting-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
}
html body .v3-tax {
  inset: 0;
  max-height: none;
  border-radius: 0;
  border-top: 0;
  box-shadow: none;
  z-index: 5000;
  background: var(--canvas);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  overflow: hidden;
}
html body .v3-tax-wrap {
  width: 100%;
  max-width: 600px;
  height: 100%;
  margin: 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
html body .v3-tax-bar {
  flex: none;
  display: grid;
  grid-template-columns: var(--hit-min) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s2);
  min-height: var(--hit-driving);
  padding: var(--s2) var(--edge);
}
html body .v3-tax-head {
  margin: 0;
  min-width: 0;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}
html body .v3-tax-back { justify-self: start; }
html body .v3-tax-year {
  height: var(--hit-min);
  min-height: var(--hit-min);
  max-width: 7.5em;
  box-sizing: border-box;
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  padding: 0 var(--s3);
  cursor: pointer;
}
html body .v3-tax-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: 0 var(--edge) var(--s6);
}
html body .v3-tax-banner {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s4);
}
html body .v3-tax-banner h3 {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 600 var(--t-body);
}
html body .v3-tax-banner p {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.5;
}
html body .v3-tax-empty {
  margin: auto 0;
  padding: var(--s6) var(--s4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
html body .v3-tax-empty h3 {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 600 var(--t-title);
}
html body .v3-tax-empty p {
  margin: 0 0 var(--s5);
  max-width: 34ch;
  color: var(--text-2);
  font: 400 var(--t-body);
}
html body .v3-tax-primary {
  width: 100%;
  max-width: 280px;
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-light);
  font: 600 var(--t-body);
  cursor: pointer;
}
html body .v3-tax-primary:active { background: var(--text-2); }
@media (max-width: 300px) {
  /* Stack the bar: the 200% viewport leaves too little centre column
     for the title, which ran under the year pill. Back and year keep
     the whole first row (both stay 48px); the title gets row two. */
  html body .v3-tax-bar {
    grid-template-columns: var(--hit-min) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: var(--s1);
    padding-block: var(--s1);
    padding-inline: var(--s3);
  }
  html body .v3-tax-back {
    grid-column: 1;
    grid-row: 1;
  }
  html body .v3-tax-head {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 13px;
  }
  html body .v3-tax-year {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    appearance: none;
    padding-inline: var(--s2);
    text-align: center;
    font-size: 13px;
  }
  html body .v3-tax-body { padding-inline: var(--s3); }
  html body .v3-tax-empty {
    flex: none;
    margin: 0;
    padding: var(--s2) 0 var(--s6);
  }
  html body .v3-tax-empty h3 { font-size: 24px; }
  html body .v3-tax-empty p {
    margin-bottom: var(--s3);
    font-size: 15px;
  }
}

/* v3 Issue #234 s2 stash */
/* The two configured top cards: the stash target (one glance amount,
   one secondary action) and this year's recorded totals as rows.
   Tokens only; status and pace stay neutral, catch-up is text-2. */
html body .v3-tax-card {
  margin: 0 0 var(--s4);
  padding: var(--s4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body .v3-tax-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s2);
}
html body .v3-tax-card-cap {
  margin: 0;
  color: var(--text-2);
  font: 500 var(--t-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html body .v3-tax-chip {
  flex: none;
  padding: var(--s1) var(--s2);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: var(--overlay);
  color: var(--text-2);
  font: 500 var(--t-cap);
  letter-spacing: 0.08em;
}
html body .v3-tax-figures { color: var(--text-2); }
html body #acct-stash-figures { container-type: inline-size; }
html body .v3-tax-glance {
  color: var(--text);
  font: 600 clamp(44px, 20cqi, 76px)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
html body .v3-tax-glance-cap {
  margin: var(--s2) 0 var(--s3);
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-tax-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-tax-row-label {
  flex: none;
  min-width: 0;
  white-space: nowrap;
}
html body .v3-tax-row-value {
  flex: 0 1 auto;
  min-width: 0;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
html body .v3-tax-note { color: var(--text-2); }
html body .v3-tax-pace {
  margin: var(--s2) 0 0;
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-tax-pending,
html body .v3-tax-body-copy {
  margin: var(--s3) 0 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.5;
}
html body .v3-tax-catchup {
  margin-top: var(--s3);
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.5;
}
html body .v3-tax-secondary {
  width: 100%;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  margin-top: var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  cursor: pointer;
}
html body .v3-tax-secondary:active { background: var(--overlay); }
html body .v3-tax-foot {
  margin: var(--s3) 0 0;
  color: var(--text-3);
  font: 400 var(--t-cap);
  line-height: 1.45;
}
@media (max-width: 300px) {
  /* 195px cannot hold a 76px amount: scale the glance, stack each
     label over its value so no row runs past the card edge. */
  html body .v3-tax-card { padding: var(--s3); }
  html body .v3-tax-card-head {
    flex-wrap: wrap;
    row-gap: var(--s1);
  }
  html body .v3-tax-glance {
    font-size: 22px;
    letter-spacing: -1px;
  }
  html body .v3-tax-row { display: block; }
  html body .v3-tax-row-value {
    display: block;
    margin-top: var(--s1);
    text-align: left;
  }
}

/* v3 Issue #234 s3 actions */
/* The three configured actions: plain token secondaries tall enough for
   a moving car (56px, 48px floor), each with a Lucide glyph. The row is
   hidden inline until a profile exists; the v1 JS reveal keeps its
   display:flex. The labels never wrap, so the three stack at 390 and
   keep their full width at the 300px edge instead of clipping. */
html body [id="acct-actions"] {
  flex-direction: column;
  gap: var(--s2);
  margin: 0 0 var(--s4);
}
html body [id="acct-actions"] > button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  width: 100%;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  margin: 0;
  padding: 0 var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  white-space: nowrap;
  cursor: pointer;
}
html body [id="acct-actions"] .v3-icon { color: var(--text-2); }
html body [id="acct-actions"] > button:active { background: var(--overlay); }
@media (min-width: 480px) {
  html body [id="acct-actions"] { flex-direction: row; }
  html body [id="acct-actions"] > button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}
@media (max-width: 300px) {
  html body [id="acct-actions"] { flex-direction: column; }
  html body [id="acct-actions"] > button {
    flex: 1 1 auto;
    width: 100%;
    padding: 0 var(--s3);
  }
}

/* v3 Issue #234 s4 expense */
/* Add/Edit expense: a bottom sheet over a scrim tap. Deliberately not
   .v3-sheet: that class matches the Home drawer :has() rule even while
   this overlay is display:none, which would hide Upcoming jobs. New s4
   classes only, tokens only. The panel stops propagation so form taps
   never reach the scrim; the X and a scrim tap both call the unchanged
   acctCloseExpenseModal(). */
html body [id="acct-expense-modal"] {
  position: fixed;
  inset: 0;
  z-index: 5500;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body [id="acct-expense-modal"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body [id="acct-expense-modal"] .v3-exp-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body [id="acct-expense-modal"] .v3-sheet-grab { height: var(--s6); }
html body [id="acct-expense-modal"] .v3-exp-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s3);
}
html body [id="acct-expense-modal"] .v3-exp-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body [id="acct-expense-modal"] .v3-exp-close { margin-right: calc(var(--s2) * -1); }
html body [id="acct-expense-modal"] .v3-exp-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s1) 0 var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body [id="acct-expense-modal"] .v3-exp-field {
  display: flex;
  flex-direction: column;
}
html body [id="acct-expense-modal"] .v3-field { flex: none; }
html body [id="acct-expense-modal"] .v3-exp-receipt {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
  box-sizing: border-box;
  min-height: var(--hit-driving);
  padding: var(--s2) var(--s4);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body [id="acct-expense-modal"] .v3-exp-receipt-lbl {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}
html body [id="acct-expense-modal"] .v3-exp-receipt-lbl .v3-icon { color: var(--text-2); }
html body [id="acct-expense-modal"] .v3-exp-filebtn {
  flex: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--overlay);
  color: var(--text);
  font: 500 var(--t-label);
  cursor: pointer;
}
html body [id="acct-expense-modal"] .v3-exp-filebtn:active { background: var(--raised); }
html body [id="acct-expense-modal"] .v3-exp-docs { flex-direction: column; gap: var(--s2); }
html body [id="acct-expense-modal"] .v3-exp-foot {
  flex: none;
  display: flex;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body [id="acct-expense-modal"] .v3-exp-cancel,
html body [id="acct-expense-modal"] .v3-exp-save {
  flex: 1 1 0;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-expense-modal"] .v3-exp-cancel {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body [id="acct-expense-modal"] .v3-exp-save {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body [id="acct-expense-modal"] .v3-exp-cancel:active { background: var(--overlay); }
html body [id="acct-expense-modal"] .v3-exp-save:active {
  background: var(--overlay);
  color: var(--text);
}

/* v3 Issue #234 s5 other income */
/* Add other income: a bottom sheet over a scrim tap. Deliberately not
   .v3-sheet (that class matches the Home drawer :has() rule even while
   this overlay is display:none, which would hide Upcoming jobs). New
   s5 classes only, tokens only. The panel stops propagation so form
   taps never reach the scrim; the X and a scrim tap both call the
   unchanged acctCloseOtherModal(). */
html body [id="acct-other-modal"] {
  position: fixed;
  inset: 0;
  z-index: 5500;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body [id="acct-other-modal"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body [id="acct-other-modal"] .v3-oi-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body [id="acct-other-modal"] .v3-sheet-grab { height: var(--s6); }
html body [id="acct-other-modal"] .v3-oi-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s3);
}
html body [id="acct-other-modal"] .v3-oi-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body [id="acct-other-modal"] .v3-oi-close {
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  margin-right: calc(var(--s2) * -1);
}
html body [id="acct-other-modal"] .v3-oi-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s1) 0 var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body [id="acct-other-modal"] .v3-oi-field {
  display: flex;
  flex-direction: column;
}
html body [id="acct-other-modal"] .v3-field { flex: none; }
html body [id="acct-other-modal"] .v3-oi-foot {
  flex: none;
  display: flex;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body [id="acct-other-modal"] .v3-oi-cancel,
html body [id="acct-other-modal"] .v3-oi-save {
  flex: 1 1 0;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-other-modal"] .v3-oi-cancel {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body [id="acct-other-modal"] .v3-oi-save {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body [id="acct-other-modal"] .v3-oi-cancel:active { background: var(--overlay); }
html body [id="acct-other-modal"] .v3-oi-save:active {
  background: var(--overlay);
  color: var(--text);
}

/* v3 Issue #234 s6 set-aside */
/* Money set aside: a bottom sheet over a scrim tap. Deliberately not
   .v3-sheet (that class matches the Home drawer :has() rule even while
   this overlay is display:none, which would hide Upcoming jobs). New
   s6 classes only, tokens only. The panel stops propagation so form
   taps never reach the scrim; the X and a scrim tap both call the
   unchanged acctCloseSetAsideModal(). */
html body [id="acct-setaside-modal"] {
  position: fixed;
  inset: 0;
  z-index: 5500;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body [id="acct-setaside-modal"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body [id="acct-setaside-modal"] .v3-sa-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body [id="acct-setaside-modal"] .v3-sheet-grab { height: var(--s6); }
html body [id="acct-setaside-modal"] .v3-sa-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s2);
}
html body [id="acct-setaside-modal"] .v3-sa-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body [id="acct-setaside-modal"] .v3-sa-close {
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  margin-right: calc(var(--s2) * -1);
}
html body [id="acct-setaside-modal"] .v3-sa-lede {
  flex: none;
  margin: 0 0 var(--s3);
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body [id="acct-setaside-modal"] .v3-sa-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s1) 0 var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body [id="acct-setaside-modal"] .v3-sa-field {
  display: flex;
  flex-direction: column;
}
html body [id="acct-setaside-modal"] .v3-field { flex: none; }
html body [id="acct-setaside-modal"] .v3-sa-foot {
  flex: none;
  display: flex;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body [id="acct-setaside-modal"] .v3-sa-cancel,
html body [id="acct-setaside-modal"] .v3-sa-save {
  flex: 1 1 0;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-setaside-modal"] .v3-sa-cancel {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body [id="acct-setaside-modal"] .v3-sa-save {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body [id="acct-setaside-modal"] .v3-sa-cancel:active { background: var(--overlay); }
html body [id="acct-setaside-modal"] .v3-sa-save:active {
  background: var(--overlay);
  color: var(--text);
}

/* v3 Issue #1062 entry prompt */
/* Small bottom sheet after a manual entry with a suggested top-up. Grey
   text and a black primary button only; the prediction line is always
   shown. Taps on the panel never reach the dismiss scrim. */
html body .v3-ep-overlay {
  position: fixed;
  inset: 0;
  z-index: 5500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body .v3-ep-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body .v3-ep-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body .v3-ep-panel .v3-sheet-grab { height: var(--s6); }
html body .v3-ep-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s2);
}
html body .v3-ep-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body .v3-ep-close {
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  margin-right: calc(var(--s2) * -1);
}
html body .v3-ep-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--s1) 0 var(--s2);
}
html body .v3-ep-prediction {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-ep-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body .v3-ep-set,
html body .v3-ep-edit {
  flex: 1 1 40%;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body .v3-ep-edit {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body .v3-ep-set {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body .v3-ep-later {
  flex: 1 1 100%;
  box-sizing: border-box;
  height: var(--hit-min);
  padding: 0 var(--s3);
  border: 0;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--text-2);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body .v3-ep-edit:active,
html body .v3-ep-later:active { background: var(--overlay); }
html body .v3-ep-set:active {
  background: var(--overlay);
  color: var(--text);
}

/* v3 Issue #234 s7 tax profile */
/* Tax profile: the same bottom-sheet mechanics as s4-s6, keyed on this
   modal's id only. Deliberately not .v3-sheet (the Home drawer :has()
   rule would hide Upcoming jobs while the overlay is display:none).
   New s7 classes, tokens only. The panel stops propagation so form taps
   never reach the scrim; the X and a scrim tap both call the unchanged
   acctCloseProfileModal(). Checkbox rows are 56px hit targets. */
html body [id="acct-profile-modal"] {
  position: fixed;
  inset: 0;
  z-index: 5500;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body [id="acct-profile-modal"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body [id="acct-profile-modal"] .v3-tp-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body [id="acct-profile-modal"] .v3-sheet-grab { height: var(--s6); }
html body [id="acct-profile-modal"] .v3-tp-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s2);
}
html body [id="acct-profile-modal"] .v3-tp-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body [id="acct-profile-modal"] .v3-tp-close {
  flex: none;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  margin-right: calc(var(--s2) * -1);
}
html body [id="acct-profile-modal"] .v3-tp-lede {
  flex: none;
  margin: 0 0 var(--s3);
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body [id="acct-profile-modal"] .v3-tp-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s1) 0 var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body [id="acct-profile-modal"] .v3-tp-field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
html body [id="acct-profile-modal"] .v3-field { flex: none; }
html body [id="acct-profile-modal"] .v3-tp-req { color: var(--text); }
html body [id="acct-profile-modal"] .v3-tp-check {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: var(--hit-driving);
  padding: 0 var(--s3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text);
  font: 500 var(--t-label);
  cursor: pointer;
}
html body [id="acct-profile-modal"] .v3-tp-checkbox {
  flex: none;
  width: var(--s6);
  height: var(--s6);
  margin: 0;
  accent-color: var(--text);
  cursor: pointer;
}
html body [id="acct-profile-modal"] .v3-tp-paye {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
html body [id="acct-profile-modal"] .v3-tp-foot {
  flex: none;
  display: flex;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body [id="acct-profile-modal"] .v3-tp-cancel,
html body [id="acct-profile-modal"] .v3-tp-save {
  flex: 1 1 0;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-profile-modal"] .v3-tp-cancel {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body [id="acct-profile-modal"] .v3-tp-save {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body [id="acct-profile-modal"] .v3-tp-cancel:active { background: var(--overlay); }
html body [id="acct-profile-modal"] .v3-tp-save:active {
  background: var(--overlay);
  color: var(--text);
}
html body [id="acct-profile-modal"] .v3-tp-addcar,
html body [id="acct-profile-modal"] .v3-tp-removecar {
  flex: none;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-profile-modal"] .v3-tp-addcar:active,
html body [id="acct-profile-modal"] .v3-tp-removecar:active { background: var(--overlay); }

/* v3 Issue #234 s8 lists */
/* The three Tax & expenses record lists (expenses, other income,
   money set aside): the s2 card chrome plus new s8 classes. Month
   headers are 56px rows with a Lucide chevron turned down when open;
   record rows carry a tabular amount and 48px actions with an 8px
   gap. Tokens only; remove stays neutral (never --danger). */
html body .v3-acct-list-card { margin-bottom: var(--s4); }
html body .v3-acct-list-card .v3-tax-card-head { margin-bottom: var(--s3); }
html body .v3-acct-list-card .v3-tax-card-cap,
html body #v3-acct-stash-prediction-card .v3-tax-card-cap { color: var(--text); }
html body .v3-acct-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
html body .v3-acct-month {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
}
html body .v3-acct-month-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  width: 100%;
  min-height: var(--hit-driving);
  padding: 0 var(--s3);
  border: 0;
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  text-align: left;
  cursor: pointer;
}
html body .v3-acct-month-label { flex: 1; min-width: 0; }
html body .v3-acct-month-count {
  color: var(--text-3);
  font: 400 var(--t-cap);
}
html body .v3-acct-month-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: none;
}
html body .v3-acct-chev {
  color: var(--text-3);
  transition: transform var(--dur-tap) var(--ease-std);
}
html body .v3-acct-month-btn[aria-expanded="true"] .v3-acct-chev {
  transform: rotate(90deg);
}
html body .v3-acct-month-body { padding: 0 var(--s3) var(--s2); }
html body .v3-acct-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  row-gap: var(--s2);
  min-height: var(--hit-driving);
  padding: var(--s2) 0;
  border-top: 1px solid var(--hairline);
}
html body .v3-acct-month-body > .v3-acct-row:first-child { border-top: 0; }
html body .v3-acct-row-main {
  flex: 1 0 100%;
  min-width: 0;
  overflow-wrap: break-word;
}
html body .v3-acct-row-title {
  color: var(--text);
  font: 500 var(--t-label);
}
html body .v3-acct-amount {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
html body .v3-acct-row-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-top: 2px;
  color: var(--text-2);
  font: 400 var(--t-cap);
}
html body .v3-acct-docs { display: inline-flex; align-items: center; gap: 2px; }
html body .v3-acct-docs .v3-icon { color: var(--text-2); }
html body .v3-acct-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
  max-width: 100%;
  margin-left: auto;
  flex: 0 1 auto;
}
html body .v3-acct-iconbtn {
  display: inline-grid;
  place-items: center;
  width: var(--hit-min);
  height: var(--hit-min);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text-2);
  cursor: pointer;
  flex: none;
}
html body .v3-acct-iconbtn:active {
  background: var(--overlay);
  color: var(--text);
}
html body .v3-acct-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  cursor: pointer;
  flex: none;
}
html body .v3-acct-edit:active { background: var(--overlay); }
html body .v3-acct-empty {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-acct-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s2);
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font: 500 var(--t-label);
}
html body .v3-acct-foot strong { color: var(--text); font-weight: 600; }
/* True 200% / very narrow: stack the month amount under its label and the
   row actions under the row text so neither gets squeezed to zero. */
@media (max-width: 300px) {
  html body .v3-acct-month-btn {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 2px;
    padding: 0 var(--s2);
    font-size: 13px;
    line-height: 17px;
  }
  html body .v3-acct-month-label { flex: 1 0 100%; }
  html body .v3-acct-month-right .v3-acct-amount { font-size: 13px; }
  html body .v3-acct-month-right { margin-left: auto; }
  html body .v3-acct-row { flex-wrap: wrap; row-gap: var(--s3); }
  html body .v3-acct-row-main { flex: 1 0 100%; }
  html body .v3-acct-actions { margin-left: auto; }
}

/* v3 Issue #234 s9 statements */
/* Monthly turnover statements (no row actions) and the generated
   receipt document list inside the expense sheet. Statement rows are
   month, tabular pounds and a job count; document rows keep a download
   target and a neutral 48px Lucide remove with an 8px gap. Tokens
   only. */
html body .v3-tax-statements { margin-bottom: var(--s4); }
html body .v3-tax-statements .v3-tax-card-cap {
  margin-bottom: var(--s3);
  color: var(--text);
}
html body .v3-tax-stmt-list {
  display: flex;
  flex-direction: column;
}
html body .v3-tax-stmt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--hit-min);
  padding: var(--s2) 0;
  border-top: 1px solid var(--hairline);
}
html body .v3-tax-stmt-row:first-child { border-top: 0; }
html body .v3-tax-stmt-month {
  min-width: 0;
  color: var(--text);
  font: 500 var(--t-label);
  overflow-wrap: break-word;
}
html body .v3-tax-stmt-right {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s2);
  flex: none;
}
html body .v3-tax-stmt-amount {
  color: var(--text);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
html body .v3-tax-stmt-jobs {
  color: var(--text-3);
  font: 400 var(--t-cap);
}
html body .v3-tax-stmt-empty {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
}
html body .v3-exp-doc {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--hit-min);
  padding: var(--s2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--raised);
}
html body .v3-exp-doc-name {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: var(--hit-min);
  color: var(--text);
  font: 500 var(--t-label);
  overflow-wrap: break-word;
  text-decoration: none;
}
html body .v3-exp-doc-name:active { color: var(--text-2); }
html body .v3-exp-docs { padding-bottom: var(--s2); }
html body .v3-exp-doc-remove {
  display: inline-grid;
  place-items: center;
  width: var(--hit-min);
  height: var(--hit-min);
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  flex: none;
}
html body .v3-exp-doc-remove:active {
  background: var(--overlay);
  color: var(--text);
}
@media (max-width: 300px) {
  html body .v3-tax-stmt-row {
    flex-wrap: wrap;
    row-gap: var(--s1);
  }
  html body .v3-tax-stmt-month { flex: 1 0 100%; }
  html body .v3-tax-stmt-right { margin-left: auto; }
  html body .v3-exp-doc {
    flex-wrap: wrap;
    row-gap: var(--s2);
  }
  html body .v3-exp-doc-name { flex: 1 0 100%; }
  html body .v3-exp-doc-remove { margin-left: auto; }
}


/* v3 Issue #234 s10 export */
/* Year export controls on the statements card and the two export
   sheets. Every target is 48px+ with an 8px gap. The sheets are bottom
   sheets over a scrim but deliberately not .v3-sheet: that class still
   matches the Home drawer :has() rule while display:none. The v1
   display flex/none writes are unchanged, so there is no scrim-close.
   New s10 classes, tokens only. */
html body .v3-xp-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s3);
}
html body .v3-xp-btn {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--hit-min);
  padding: 0 var(--s4);
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body .v3-xp-primary {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body .v3-xp-secondary {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body .v3-xp-primary:active { background: var(--text-2); }
html body .v3-xp-secondary:active { background: var(--overlay); }
html body .v3-xp-note {
  margin: var(--s1) var(--s1) 0;
  color: var(--text-3);
  font: 400 var(--t-cap);
  line-height: 1.5;
}
html body [id="acct-zip-pw-modal"],
html body [id="acct-email-modal"] {
  position: fixed;
  inset: 0;
  z-index: 5600;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body [id="acct-zip-pw-modal"]::before,
html body [id="acct-email-modal"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body [id="acct-zip-pw-modal"] .v3-xp-panel,
html body [id="acct-email-modal"] .v3-xp-panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: calc(100% - var(--s6));
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  background: var(--raised);
  padding: 0 var(--s4) max(var(--s4), env(safe-area-inset-bottom));
  overflow: hidden;
}
html body [id="acct-zip-pw-modal"] .v3-sheet-grab,
html body [id="acct-email-modal"] .v3-sheet-grab { height: var(--s6); }
html body [id="acct-zip-pw-modal"] .v3-xp-head,
html body [id="acct-email-modal"] .v3-xp-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 0 0 var(--s3);
}
html body [id="acct-zip-pw-modal"] .v3-xp-title,
html body [id="acct-email-modal"] .v3-xp-title {
  margin: 0;
  min-width: 0;
  font: 600 var(--t-head);
}
html body [id="acct-zip-pw-modal"] .v3-xp-body,
html body [id="acct-email-modal"] .v3-xp-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s1) 0 var(--s2);
  overflow-y: auto;
  overscroll-behavior: contain;
}
html body .v3-xp-warn {
  margin: 0;
  padding: var(--s3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.5;
}
html body .v3-xp-warn strong { color: var(--text); }
html body .v3-xp-field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
html body .v3-xp-label {
  color: var(--text-2);
  font: 500 var(--t-label);
}
html body .v3-xp-input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text);
  font: 400 var(--t-body);
}
html body .v3-xp-err {
  margin: 0;
  color: var(--danger);
  font: 500 var(--t-cap);
}
html body .v3-xp-copy {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.5;
}
html body .v3-xp-steps {
  margin: 0;
  padding-left: var(--s5);
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.6;
}
html body .v3-xp-steps strong { color: var(--text); }
html body [id="acct-zip-pw-modal"] .v3-xp-foot,
html body [id="acct-email-modal"] .v3-xp-foot {
  flex: none;
  display: flex;
  gap: var(--s2);
  padding-top: var(--s4);
}
html body [id="acct-zip-pw-modal"] .v3-xp-cancel,
html body [id="acct-zip-pw-modal"] .v3-xp-primary,
html body [id="acct-email-modal"] .v3-xp-cancel,
html body [id="acct-email-modal"] .v3-xp-primary {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  height: var(--hit-driving);
  min-height: var(--hit-min);
  padding: 0 clamp(var(--s1), 4vw, var(--s3));
  border-radius: var(--r-control);
  font: 600 var(--t-label);
  cursor: pointer;
}
html body [id="acct-zip-pw-modal"] .v3-xp-cancel,
html body [id="acct-email-modal"] .v3-xp-cancel {
  border: 1px solid var(--stroke);
  background: var(--raised);
  color: var(--text);
}
html body [id="acct-zip-pw-modal"] .v3-xp-primary,
html body [id="acct-email-modal"] .v3-xp-primary {
  border: 0;
  background: var(--text);
  color: var(--on-light);
}
html body [id="acct-zip-pw-modal"] .v3-xp-cancel:active,
html body [id="acct-email-modal"] .v3-xp-cancel:active { background: var(--overlay); }
html body [id="acct-zip-pw-modal"] .v3-xp-primary:active,
html body [id="acct-email-modal"] .v3-xp-primary:active {
  background: var(--overlay);
  color: var(--text);
}
/* A 195px viewport cannot fit both labels side by side once the type
   stays at its real size: Download overflows the primary button and
   its last letter is clipped. Cut only the panel's side padding at
   that width, giving the row 16px more inner width, so each flexed
   button clears its label without shrinking the type or stacking the
   footer (which would eat the sheet body the warning and fields
   need). */
@media (max-width: 260px) {
  html body [id="acct-zip-pw-modal"] .v3-xp-panel,
  html body [id="acct-email-modal"] .v3-xp-panel {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
}

/* v3 Issue #235 s1 missed job */
/* Shared full-screen alert pattern (17/21): opaque canvas, the
   existing danger wash, 64px notch-aware top, left-aligned main,
   72px danger icon circle, red caption, display title, body, a
   details card and a bottom dock with the single 64px primary.
   New classes only; the overlay keeps the v1 flex/none writes. */
html body .v3-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--canvas);
  color: var(--text);
  overflow: hidden;
}
html body .v3-alert--danger { background: var(--canvas); }
html body .v3-alert-main {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: calc(64px + env(safe-area-inset-top)) var(--edge)
    calc(var(--s6) + env(safe-area-inset-bottom));
  overflow-y: auto;
}
html body .v3-alert-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: grid;
  place-items: center;
  flex: none;
  margin-bottom: var(--s5);
}
html body .v3-alert-cap {
  margin: 0 0 var(--s2);
  color: var(--danger);
  font: 500 var(--t-cap);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
html body .v3-alert-title {
  margin: 0;
  max-width: 100%;
  font: 600 var(--t-display);
  letter-spacing: -0.03em;
  color: var(--text);
  overflow-wrap: break-word;
}
html body .v3-alert-body {
  margin: var(--s3) 0 0;
  color: var(--text-2);
  font: 400 var(--t-body);
}
html body .v3-alert-card {
  box-sizing: border-box;
  width: 100%;
  margin-top: var(--s6);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body .v3-alert-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  min-width: 0;
  padding: var(--s4);
}
html body .v3-alert-row + .v3-alert-row {
  border-top: 1px solid var(--hairline);
}
html body .v3-alert-label {
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body .v3-alert-value {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 500 var(--t-label);
}
html body .v3-alert-dock {
  flex: none;
  width: 100%;
  margin-top: auto;
  padding-top: var(--s6);
}
html body .v3-alert-primary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--hit-primary);
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-control);
  background: var(--text);
  color: var(--on-light);
  font: 600 18px/1 var(--font-ui);
  letter-spacing: -0.02em;
  cursor: pointer;
}
html body .v3-alert-primary:active {
  background: var(--text-2);
}
/* A 195px viewport needs the 64px OK label inside the button: cut
   only the side padding, never the type. */
@media (max-width: 260px) {
  html body .v3-alert-main {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
  html body .v3-alert-primary {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
}

/* v3 Issue #235 s2 cancelled */
/* Job Cancelled (18, mockup 22) reuses the s1 full-screen alert: the
   existing danger wash, danger icon circle, red caption and display
   title, but no details card. The dock stacks the ghost 56px
   secondary above the 64px primary; the one-child s1 dock still
   works. */
html body .v3-alert-dock {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
html body .v3-alert-secondary {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--hit-driving);
  padding: 0 var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 17px/1.2 var(--font-ui);
  letter-spacing: -0.02em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
@media (max-width: 260px) {
  html body .v3-alert-secondary {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
}

/* v3 Issue #235 s3 time to set off */
html body .v3-alert--warn { background: var(--canvas); }
html body .v3-alert--warn .v3-alert-icon {
  background: var(--warn-bg);
  color: var(--warn);
}
html body .v3-alert--warn .v3-alert-cap { color: var(--warn); }
html body .v3-alert--warn #status-reminder-title { color: var(--text); }
html body .v3-depart-stats {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  width: 100%;
  margin-top: var(--s6);
}
html body .v3-depart-stat {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body .v3-depart-glance {
  color: var(--text);
  font: 600 48px/1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
html body .v3-depart-glance--warn { color: var(--warn); }
html body .v3-depart-label {
  color: var(--text-3);
  font: 500 var(--t-label);
}
@media (max-width: 260px) {
  html body .v3-depart-stats { gap: var(--s2); }
  html body .v3-depart-stat {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
}

/* v3 Issue #235 s4 status reminders */
/* Feature 22 / mockup 24: arrived / pob / complete reuse the shared
   neutral full-screen alert. The static shell carries stage1; stage 2
   swaps the neutral icon and caption for the red accent and the token
   pulse. The depart inject stays warn and has no stage class, so these
   scoped rules never reach it. */
html body #status-reminder-modal.stage1 #status-reminder-icon {
  background: var(--raised);
  color: var(--text);
}
html body #status-reminder-modal.stage1 .v3-alert-cap { color: var(--text); }
html body #status-reminder-modal.stage2 #status-reminder-icon {
  background: var(--danger-bg);
  color: var(--danger);
  animation: v3-srm-pulse 1.6s ease-in-out infinite;
}
html body #status-reminder-modal.stage2 .v3-alert-cap { color: var(--danger); }
@keyframes v3-srm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--danger-bg); }
  50% { box-shadow: 0 0 0 14px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  html body #status-reminder-modal.stage2 #status-reminder-icon {
    animation: none;
  }
}
@media (max-width: 260px) {
  html body #status-reminder-title { font-size: 36px; }
}

/* Issue 930 flight-line pulse keyframes: gentle breathing, 2.5s x4,
   then it settles back at 1. No pulse under reduced motion. */
@keyframes v3-flight-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* v3 Issue #235 s5 connection lost */
/* Feature 9 / mockup 25: the v1 overlay becomes the neutral shared
   full-screen alert. The wash is the neutral raised-to-canvas one,
   the wifi-off icon circle is raised, the caption is neutral and the
   message stays the first <p> so the existing reconnect JS keeps
   writing into it. The spinner line replaces the old big spinner and
   freezes under reduced motion. */
html body #reconnecting-overlay.v3-alert {
  background: var(--canvas);
  color: var(--text);
}
html body #reconnecting-overlay .v3-alert-icon {
  background: var(--raised);
  color: var(--text);
}
html body #reconnecting-overlay .v3-alert-cap { color: var(--text); }
html body #reconnecting-overlay .v3-alert-title { color: var(--text); }
html body #reconnecting-overlay .v3-alert-body { color: var(--text-2); }
html body #reconnecting-overlay .v3-alert-spin {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s6);
  color: var(--text-3);
  font: 500 var(--t-label);
}
html body #reconnecting-overlay .v3-alert-spin-ring {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  flex: none;
  border: 2px solid var(--stroke);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  html body #reconnecting-overlay .v3-alert-spin-ring { animation: none; }
}
/* Only at the true-200% 195px viewport: 40px splits "Connection"
   mid-word. Keep it whole with a slightly smaller display size. */
@media (max-width: 260px) {
  html body #reconnecting-overlay .v3-alert-title { font-size: 34px; }
}
/* The fixed #v3-dock layers over this overlay and covered the Reload
   button. The scroll area reserves the dock's full height plus the
   bottom safe area, so the button sits above the dock at 1x and a
   full 200% scroll brings it clear too. The dock itself stays up. */
html body #reconnecting-overlay .v3-alert-main {
  padding-bottom: calc(var(--v3-nav-h) + var(--s6) + env(safe-area-inset-bottom));
}

/* v3 Issue #235 s6 system closed */
/* Feature 8 / pattern 25: the v1 system-closed overlay becomes the
   same neutral shared full-screen alert as s5. No warn rail and no
   warn title: the wash is neutral, the 72px icon circle is raised
   and the moon (closed) or plug-zap (offline) shows from the icon's
   data-state. The caption says "Dispatch closed" or "Offline", the
   first <p> stays the body and the first <button> stays the primary
   the status check writes into. */
html body #system-closed-overlay.v3-alert {
  background: var(--canvas);
  color: var(--text);
}
html body #system-closed-overlay .v3-alert-icon {
  background: var(--raised);
  color: var(--text);
}
html body #system-closed-overlay .v3-alert-icon svg { display: none; }
html body #system-closed-overlay .v3-alert-icon[data-state="closed"] .v3-icon-closed,
html body #system-closed-overlay .v3-alert-icon[data-state="offline"] .v3-icon-offline {
  display: block;
}
html body #system-closed-overlay .v3-alert-cap { color: var(--text); }
html body #system-closed-overlay .v3-alert-title { color: var(--text); }
html body #system-closed-overlay .v3-alert-body { color: var(--text-2); }
/* Only at the true-200% 195px viewport: 40px would split the title. */
@media (max-width: 260px) {
  html body #system-closed-overlay .v3-alert-title { font-size: 34px; }
}
/* The fixed #v3-dock layers over this overlay and would cover the
   Try again primary. The scroll area reserves the dock's full height
   plus the bottom safe area, so the button sits above the dock at 1x
   and a full 200% scroll brings it clear too. The dock stays up. */
html body #system-closed-overlay .v3-alert-main {
  padding-bottom: calc(var(--v3-nav-h) + var(--s6) + env(safe-area-inset-bottom));
}

/* v3 Issue #231 s2 calling */
/* The two full-screen call layers sit above the fixed dock (12000), so
   every Mute / End / Decline / Answer circle stays tappable at 1x and
   at true 200%. 12001 is the smallest layer above the dock. The wash
   is the opaque canvas token, not a translucent black: the Home
   standby copy can no longer bleed through. */
html body #calling-modal,
html body #incoming-callback-modal {
  padding: env(safe-area-inset-top) var(--edge) env(safe-area-inset-bottom);
  background: var(--canvas);
  z-index: 12001;
}
html body #calling-modal .v3-call,
html body #incoming-callback-modal .v3-call {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 390px;
  text-align: center;
}
html body #calling-modal .v3-call-avatar,
html body #incoming-callback-modal .v3-call-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--text);
  font: 600 36px/1 var(--font-ui);
  letter-spacing: -0.02em;
}
html body #calling-modal .v3-call-name,
html body #incoming-callback-modal .v3-call-name {
  margin-top: var(--s6);
  color: var(--text);
  font: 600 28px/1.15 var(--font-ui);
  letter-spacing: -0.6px;
}
html body #calling-modal .v3-call-status {
  margin-top: var(--s2);
  color: var(--text-2);
  font: 500 17px/1.4 var(--font-ui);
}
html body #calling-modal .v3-call-sub,
html body #incoming-callback-modal .v3-call-sub {
  margin-top: var(--s1);
  color: var(--text-3);
  font: 500 14px/1.45 var(--font-ui);
}
html body #incoming-callback-modal .v3-call-cap {
  margin-bottom: var(--s6);
  color: var(--text-3);
  font: 500 13px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html body #calling-modal .v3-call-actions,
html body #incoming-callback-modal .v3-call-actions {
  display: flex;
  justify-content: center;
  gap: var(--s8);
  margin-top: var(--s8);
}
html body #calling-modal .v3-call-action,
html body #incoming-callback-modal .v3-call-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  min-width: 72px;
}
html body #calling-modal .v3-call-btn,
html body #incoming-callback-modal .v3-call-btn {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: var(--raised);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
html body #calling-modal .v3-call-btn:active,
html body #incoming-callback-modal .v3-call-btn:active {
  background: var(--overlay);
}
html body #calling-modal .v3-call-btn--end,
html body #incoming-callback-modal .v3-call-btn--decline {
  width: 72px;
  height: 72px;
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-light);
}
html body #incoming-callback-modal .v3-call-btn--answer {
  width: 72px;
  height: 72px;
  background: var(--text);
  border-color: var(--text);
  color: var(--on-light);
}
html body #calling-modal .v3-call-btn--end:active,
html body #incoming-callback-modal .v3-call-btn--decline:active {
  background: var(--danger);
}
html body #incoming-callback-modal .v3-call-btn--answer:active {
  background: var(--text);
}
html body #calling-modal .v3-call-label,
html body #incoming-callback-modal .v3-call-label {
  color: var(--text);
  font: 500 15px/1.3 var(--font-ui);
}
html body #calling-modal .v3-call-icon-off,
html body #incoming-callback-modal .v3-call-icon-off {
  display: none;
}
html body #calling-modal .v3-call-btn.is-muted .v3-call-icon-on,
html body #incoming-callback-modal .v3-call-btn.is-muted .v3-call-icon-on {
  display: none;
}
html body #calling-modal .v3-call-btn.is-muted .v3-call-icon-off,
html body #incoming-callback-modal .v3-call-btn.is-muted .v3-call-icon-off {
  display: block;
}
html body #calling-modal .v3-call-fallback {
  max-width: 320px;
  margin-top: var(--s5);
  color: var(--text-2);
  font: 500 13px/1.45 var(--font-ui);
}
html body #calling-modal .v3-call-secondary-actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s3);
}
html body #calling-modal .v3-call-secondary {
  min-height: var(--hit-min);
  padding: 0 var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 15px/1.2 var(--font-ui);
  cursor: pointer;
}
html body #calling-modal .v3-call-secondary:active {
  background: var(--overlay);
}
/* True 200% (195px): the avatar shrinks to 72px, the name wraps by any
   character and stays centred, the gaps tighten and the side edge
   drops to 8px. The 72px circles still fit two-up, so every call
   action stays on screen and at least 56px. */
@media (max-width: 260px) {
  html body #calling-modal,
  html body #incoming-callback-modal {
    padding-left: var(--s2);
    padding-right: var(--s2);
  }
  html body #calling-modal .v3-call,
  html body #incoming-callback-modal .v3-call {
    max-width: 100%;
  }
  html body #calling-modal .v3-call-avatar,
  html body #incoming-callback-modal .v3-call-avatar {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }
  html body #calling-modal .v3-call-name,
  html body #incoming-callback-modal .v3-call-name {
    width: 100%;
    max-width: 100%;
    margin-top: var(--s3);
    font-size: 20px;
    letter-spacing: -0.3px;
    overflow-wrap: anywhere;
  }
  html body #calling-modal .v3-call-status,
  html body #calling-modal .v3-call-sub,
  html body #incoming-callback-modal .v3-call-sub {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  html body #calling-modal .v3-call-status {
    margin-top: var(--s1);
    font-size: 15px;
  }
  html body #calling-modal .v3-call-sub,
  html body #incoming-callback-modal .v3-call-sub {
    margin-top: var(--s1);
    font-size: 13px;
  }
  html body #incoming-callback-modal .v3-call-cap {
    margin-bottom: var(--s2);
    font-size: 12px;
  }
  html body #calling-modal .v3-call-actions,
  html body #incoming-callback-modal .v3-call-actions {
    gap: 24px;
    margin-top: var(--s3);
  }
  html body #calling-modal .v3-call-fallback {
    margin-top: var(--s3);
    font-size: 12px;
  }
  html body #calling-modal .v3-call-secondary-actions {
    margin-top: var(--s2);
  }
}

/* v3 Issue #232 s4 receipts */
/* The three v1 receipt modals (passenger picker, SMS, Email) and the
   new Print / save-email confirm sheets are v3 bottom sheets. V1's
   ids, display writes and handlers stay; each sheet ships
   v3-sheet--closed and the glue toggles it beside those writes.
   Rows are 64px, the sheet x is 48px, foot buttons are 64px, and the
   palette is black / white / grey. */
html body #receipt-passenger-modal,
html body #receipt-sms-modal,
html body #receipt-email-modal,
html body #v3-receipt-email-save-modal,
html body #v3-receipt-print-modal {
  /* Issue 908: above the completion modal (9600), below the 12000 layers */
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  color: var(--text);
  font-family: var(--font-ui);
}
html body #receipt-passenger-modal::before,
html body #receipt-sms-modal::before,
html body #receipt-email-modal::before,
html body #v3-receipt-email-save-modal::before,
html body #v3-receipt-print-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--canvas);
  opacity: 0.7;
}
html body .v3-receipt-sheet {
  container-type: inline-size;
  max-height: calc(100% - 24px);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
html body .v3-receipt-sheet .v3-sheet-title {
  overflow-wrap: normal;
  word-break: normal;
}
html body .v3-receipt-sheet .v3-sheet-head .v3-iconbtn {
  width: var(--hit-min);
  height: var(--hit-min);
}
html body .v3-receipt-sheet .v3-sheet-body {
  padding: 0 var(--s4);
}
html body .v3-receipt-sub,
html body .v3-receipt-line {
  margin: 0 0 var(--s4);
  color: var(--text-2);
  font: 400 var(--t-body);
}
html body .v3-receipt-line { margin-bottom: var(--s2); }
html body #receipt-sms-masked {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html body .v3-receipt-input {
  box-sizing: border-box;
  width: 100%;
  height: var(--hit-driving);
  margin: 0 0 var(--s4);
  padding: 0 var(--s4);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  font: 400 var(--t-body);
}
html body .v3-receipt-input::placeholder { color: var(--text-3); }
html body .v3-receipt-list {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(46vh, 336px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
}
html body .v3-receipt-row {
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  padding: 0 var(--s4);
  border: 0;
  border-top: 1px solid var(--hairline);
  background: transparent;
  color: var(--text);
  font: 500 var(--t-label);
  text-align: left;
  cursor: pointer;
}
html body .v3-receipt-list .v3-receipt-row:first-child { border-top: 0; }
html body .v3-receipt-row:active { background: var(--overlay); }
html body .v3-receipt-rowtext {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
html body .v3-receipt-rowlabel,
html body .v3-receipt-rowsub {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body .v3-receipt-rowsub {
  color: var(--text-3);
  font: 400 var(--t-cap);
  letter-spacing: 0;
  text-transform: none;
}
html body .v3-receipt-row > .v3-icon { flex: none; color: var(--text-2); }
html body .v3-receipt-row .v3-chev {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--text-3);
}
html body .v3-receipt-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
html body .v3-receipt-foot .v3-btn,
html body .v3-receipt-sheet .v3-sheet-foot .v3-btn {
  height: var(--hit-primary);
  min-height: var(--hit-primary);
  margin: 0;
}
html body .v3-receipt-wide { width: 100%; }
html body .v3-receipt-saveq {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 600 var(--t-head);
  overflow-wrap: anywhere;
}
html body .v3-receipt-saveaddr {
  margin: 0 0 var(--s4);
  color: var(--text-2);
  font: 400 var(--t-body);
  overflow-wrap: anywhere;
}
@container (max-width: 260px) {
  html body .v3-receipt-rowsub { display: none; }
}

@media (max-width: 300px) {
  html body .v3-receipt-sheet { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  html body .v3-receipt-sheet .v3-sheet-grab { height: 16px; }
  html body .v3-receipt-sheet .v3-sheet-head {
    padding-right: var(--s2);
    padding-bottom: 2px;
  }
  html body .v3-receipt-sheet .v3-sheet-title {
    min-width: 0;
    font-size: 17px;
    line-height: 1.2;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  html body .v3-receipt-sheet .v3-sheet-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  html body .v3-receipt-sheet .v3-receipt-line {
    margin-bottom: var(--s1);
    font-size: 15px;
    line-height: 1.35;
  }
  html body .v3-receipt-sheet .v3-receipt-sub {
    margin-bottom: var(--s2);
    font-size: 15px;
    line-height: 1.35;
  }
  html body .v3-receipt-sheet .v3-receipt-input {
    flex: none;
    margin-top: auto;
    margin-bottom: 0;
  }
  html body .v3-receipt-sheet .v3-receipt-list {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
  html body .v3-receipt-sheet .v3-receipt-row .v3-chev { display: none; }
  html body .v3-receipt-sheet .v3-receipt-rowtext .v3-receipt-rowlabel,
  html body .v3-receipt-sheet .v3-receipt-rowtext .v3-receipt-rowsub {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  html body .v3-receipt-sheet .v3-sheet-foot { padding-top: var(--s2); }
}

/* v3 Issue #232 s5 keypad */
/* The ad-hoc card keypad is a full-screen v3 sheet, not a bottom
   sheet: the black canvas, the 48px x top-left, a glance amount, the
   3x4 keypad, the live status line, the white 64px send primary and
   the receipt row that stays disabled until the payment is recorded.
   V1 ids, handlers, requests, limits, polling and strings stay; the
   sheet ships v3-sheet--closed and v3NumpadSheet toggles it beside
   v1's own display writes. Keys clamp to 48px at 200%, the amount
   clamps to one line, and the status wraps only at spaces. Colour is
   used only for the warning and error status. */
html body #numpad-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  box-sizing: border-box;
  max-height: none;
  height: 100%;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-ui);
  container-type: inline-size;
  overflow: hidden;
}
html body .v3-keypad-bar {
  flex: none;
  display: grid;
  grid-template-columns: var(--hit-min) 1fr var(--hit-min);
  align-items: center;
  gap: var(--s2);
  box-sizing: border-box;
  min-height: calc(var(--hit-min) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--s4) 0;
}
html body .v3-keypad-back {
  width: var(--hit-min);
  height: var(--hit-min);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}
html body .v3-keypad-back:active { background: var(--overlay); }
html body .v3-keypad-title {
  min-width: 0;
  text-align: center;
  color: var(--text-2);
  font: 500 var(--t-label);
  white-space: nowrap;
}
html body .v3-keypad-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  box-sizing: border-box;
  padding: 2px var(--s4) 0;
}
html body .v3-keypad-amount {
  flex: none;
  text-align: center;
  color: var(--text);
  font: 600 clamp(26px, 19.5cqw, 76px)/0.95 var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
html body .v3-keypad-keys {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2px, 2cqw, 8px);
}
html body #numpad-keys button {
  box-sizing: border-box;
  min-height: clamp(48px, 16.4cqw, 64px);
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 600 clamp(18px, 6.1cqw, 24px)/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  touch-action: manipulation;
}
html body #numpad-keys button:active { background: var(--overlay); }
html body #numpad-keys button[onclick*="numpadPress('C')"] {
  color: var(--text-2);
  font-family: var(--font-ui);
}
html body .v3-keypad-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1.5cqw, 10px);
  box-sizing: border-box;
  padding: 0 var(--s4) max(6px, env(safe-area-inset-bottom));
}
html body #numpad-status {
  margin: 0;
  text-align: center;
  color: var(--text-2);
  font: 400 clamp(12.5px, 3.4cqw, 15px)/1.2 var(--font-ui);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
html body #numpad-status .v3-icon {
  vertical-align: -2px;
  margin-right: 4px;
}
html body #numpad-status.v3-keypad-warn { color: var(--danger); }
html body #numpad-status.v3-keypad-error { color: var(--danger); }
html body #numpad-send-btn {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--hit-primary);
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-control);
  background: var(--text);
  color: var(--on-light);
  font: 600 clamp(15px, 4.6cqw, 18px)/1.2 var(--font-ui);
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
}
html body #numpad-send-btn:disabled {
  background: var(--overlay);
  color: var(--text-2);
  cursor: default;
}
html body #numpad-receipt-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(4px, 2cqw, 8px);
}
html body #numpad-receipt-section button {
  box-sizing: border-box;
  min-height: clamp(36px, 12.3cqw, 48px);
  padding: 0 var(--s1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--text-2);
  font: 500 clamp(12.5px, 3.4cqw, 15px)/1 var(--font-ui);
  cursor: pointer;
}
html body #numpad-receipt-section button:disabled {
  background: var(--surface);
  color: var(--text-3);
  cursor: not-allowed;
}
@container (max-width: 260px) {
  html body .v3-keypad-title { display: none; }
  html body .v3-keypad-amount { font-size: 26px; }
}
@media (max-width: 300px) {
  html body #numpad-card-overlay {
    flex-direction: column;
    gap: 2px;
    padding: 0;
  }
  html body .v3-keypad-bar {
    min-height: 40px;
    padding: 0 var(--s2);
    gap: var(--s1);
    grid-template-columns: 40px 1fr 40px;
  }
  html body .v3-keypad-back { width: 40px; height: 40px; }
  html body .v3-keypad-main,
  html body .v3-keypad-foot { display: contents; }
  html body .v3-keypad-amount {
    padding: 0 var(--s2);
    font-size: clamp(40px, 22cqw, 44px);
    line-height: 0.9;
  }
  html body .v3-keypad-keys {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    gap: 2px;
    padding: 0 var(--s2);
    grid-template-columns: repeat(3, minmax(48px, 1fr));
    grid-auto-rows: 44px;
    align-content: center;
  }
  html body #numpad-keys button {
    min-height: 44px;
    font-size: 18px;
  }
  html body #numpad-status {
    padding: 0 var(--s2);
    font-size: 12.5px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html body #numpad-send-btn {
    width: auto;
    margin: 0 var(--s2);
    min-height: 52px;
  }
  html body #numpad-receipt-section {
    gap: 2px;
    padding: 0 var(--s2) max(2px, env(safe-area-inset-bottom));
  }
  html body #numpad-receipt-section button { min-height: 30px; }
}



/* v3 Issue #671 s1 card dock */
/* v1's JS writes the panel's display inline, so hide it with the #232
   s1 clip pattern that CSS can always win: it stays in the DOM. */
html body #completion-terminal-panel { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
html body #driver-completion-modal .v3-charge-amount { white-space: nowrap; }
html body #driver-completion-modal .v3-complete-dock { display: flex; flex-direction: column; gap: var(--s3); }
html body #driver-completion-modal #v3-complete-charge-btn { min-height: var(--hit-primary); height: auto; white-space: normal; }
html body #driver-completion-modal #completion-submit-btn.v3-btn--secondary { background: var(--raised); color: var(--text); border: 1px solid var(--stroke); height: auto; min-height: var(--hit-driving); font-size: 17px; }
html body #terminal-panel-status { color: var(--text-2); font: 400 var(--t-body); margin: 0; }
html body #terminal-panel-status.v3-keypad-error { color: var(--danger); }

/* #671 S7/S8 failed + timed-out waiting sheet: red on the icon and
   caption only; spinner and Cancel go, the foot stacks retry over cash. */
html body #sumup-waiting-overlay .v3-sumup-sheet[data-v3-state="failed"] .v3-sumup-icon { color: var(--danger); }
html body #sumup-waiting-overlay .v3-sumup-sheet[data-v3-state="failed"] #sumup-waiting-status { color: var(--danger); }
html body #sumup-waiting-overlay .v3-sumup-sheet[data-v3-state="failed"] #sumup-waiting-spinner { display: none; }
html body #sumup-waiting-overlay .v3-sumup-sheet[data-v3-state="failed"] .v3-sheet-foot { display: flex; flex-direction: column; gap: var(--s3); }
html body #sumup-waiting-overlay .v3-sumup-sheet[data-v3-state="failed"] .v3-sheet-foot .v3-btn { width: 100%; }
html body #sumup-waiting-overlay #v3-sumup-retry { min-height: var(--hit-primary); }
html body #sumup-waiting-overlay #v3-sumup-cash { min-height: var(--hit-driving); }

/* v3 Issue #667 payment sheet layer */
/* The card-method sheet and the SumUp waiting sheet sit above the
   completion window (9600) and the ad-hoc keypad (9997), matching
   v1's own stacking. The reconnecting (11000) and system-closed
   (10000) overlays stay above both. */
html body #card-method-choice-modal { position: fixed; inset: 0; z-index: 9998; }
html body #sumup-waiting-overlay { z-index: 9999; }

/* v3 Issue #235 banner 200% clamp */
@media (max-width: 300px) {
  html body #install-pwa-banner .v3-banner-howto { display: none; }
  html body #install-pwa-banner .v3-banner-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  html body #install-pwa-banner .v3-banner-text strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}

/* ===== dock sheets (Pixel QA, 10 Nov 2026, pr375-ee63910-qa.md):
   the fixed nav covered every modal sheet. The 230 addendum pinned
   the dock at z-index 12000 (above the meter sheet) but the older
   bottom sheets were never restacked: Flag down (8000), the break
   duration and break location sheets (8001 and 8002), the dynamic
   break extend options, the Status sheet (z-sheet) and the
   full-screen Menu (z-menu) all sit BELOW it, so the dock painted
    over their bottoms and ate the taps - the break Start button was
    fully covered, the 45-min-and-up durations and the last location
    and Flag down rows could not be scrolled clear, and the Menu's
    pinned Log off footer was unreachable. Boss allows the nav to go
    away in menus, so the dock HIDES while ANY modal sheet or the
    Menu is open and comes back the moment it closes. Pure CSS keyed
    on the real open states the page's own open/close functions
    already toggle - no JS. 11 Nov 2026 (Pixel's meter-dock spec,
    Boss 23:37 GMT) SUPERSEDES the 381-era meter exclusion ("with
    the meter open the dock stays visible"): the meter's real open
    state - body.meter-active, the exact class v1's own toggleMeter()
    toggles - is the rule's FIRST line, so while the meter sheet is
    open the dock hides exactly like every sheet here and the sheet
    close brings it back with the same rect. The dock z-index is
    still NOT lowered (the meter stack depends on it):
   - every .v3-sheet while it is NOT .v3-sheet--closed (the v3
     shell's open/close pair toggles that class), minus the two
     .v3-login-sheet recovery sheets whose parent modal
     display-toggles them (the same exclusion the r11 owned-jobs
     drawer rule uses; they sit above the login screen, where the
     standby - and with it the dock - is already hidden);
   - the Menu while #v3-menu carries .v3-menu--on;
   - the Flag down, break duration and break location modals and
     the dynamic break extend options while their v1 inline style
     says display:flex (both the spaced and the no-space
     serialization).
   The rule attaches :has() to html (the modals' only other
   ancestor) and sits inside an always-true @media all block for
   the same reason as the issue 228 install-row masks: the sheet's
   selector-prefix guards split selector lists on every comma, and
   the r11 drawer pin counts the theme's body-keyed :has()
   selectors - neither guard sees through a media block, and
   @media all has zero effect on matching or the cascade.
   visibility:hidden (NOT display:none - the same no-bang strategy
   as the r11 drawer rule: the dock keeps its box, so the meter
   sheet's bottom: var(--v3-nav-h) anchor, the standby's padding
   and --v3-nav-h itself all stay lined up) plus pointer-events
   none, so the sheet's rows, Start and Log off take the taps and
    the pixels the dock used to steal, and the dock is back the
    instant the sheet closes. */
/* ===== dock sheets r2 (Pixel QA, 11 Nov 2026, pr381-a7e24e8-qa.md):
   the 381 review left five more open windows under the still-up
   dock - the SAME rule gains five states, the SAME declarations
   (the r2 delta is additive only, the six 381-era lines are
   untouched):
   - the owned-jobs drawer while #owned-jobs-section carries .open
     (its own setDrawer glue toggles that class; the collapsed
     drawer is off-screen and invisible - the 226 slice-3 rule -
     so only the expanded sheet hides the dock). z-index 20 on Home:
     the dock covered ACCEPT / RELEASE of the last card at 390 and
     at 195;
   - the dispatch chat #chat-modal while its v1 inline style says
     display:flex (z 2000: SEND / CANCEL sit under the dock at
     195);
   - three QA nits, same inline display:flex mask: the card-method
     choice (#card-method-choice-modal, z 9998 - the dock paints
     over the bottom of its backdrop if Home is still showing),
     the completion window (#driver-completion-modal, z 9600 -
     clear on the real on-job path where the standby and with it
     the dock is already gone; forced on Home at 195 its FINALIZE
     sat under the dock) and the recovery sheet's parent modal
     (#driver-forgot-password-modal - a .v3-login-sheet sits above
     login where the dock is never up; only the forced-on-Home
     path overlapped).
    Issue 227 fu (rendered QA, 11 Nov 2026): the job offer takeover
    joins the SAME rule's list as its LAST line while v1's own
    inline style says display:flex (both serializations, the r2
    pattern) - the offer is a full-screen takeover so the dock sits
    under it anyway; the same visibility + pointer-events
    declarations hide it until the offer closes. */
@media all {
html:has(body.meter-active) body #v3-dock,
html:has(.v3-sheet:not(.v3-sheet--closed):not(.v3-login-sheet)) body #v3-dock,
html:has(#sumup-waiting-overlay[style*="display: flex"], #sumup-waiting-overlay[style*="display:flex"]) body #v3-dock,
html:has(#v3-menu.v3-menu--on) body #v3-dock,
html:has(#flagdown-modal[style*="display: flex"], #flagdown-modal[style*="display:flex"]) body #v3-dock,
html:has(#status-reminder-overlay[style*="display: flex"], #status-reminder-overlay[style*="display:flex"]) body #v3-dock,
html:has(#break-duration-modal[style*="display: flex"], #break-duration-modal[style*="display:flex"]) body #v3-dock,
html:has(#break-location-modal[style*="display: flex"], #break-location-modal[style*="display:flex"]) body #v3-dock,
html:has(#break-extend-options[style*="display: flex"], #break-extend-options[style*="display:flex"]) body #v3-dock,
html:has(#owned-jobs-section.open) body #v3-dock,
html:has(#chat-modal[style*="display: flex"], #chat-modal[style*="display:flex"]) body #v3-dock,
html:has(#card-method-choice-modal[style*="display: flex"], #card-method-choice-modal[style*="display:flex"]) body #v3-dock,
html:has(#driver-completion-modal[style*="display: flex"], #driver-completion-modal[style*="display:flex"]) body #v3-dock,
html:has(#driver-forgot-password-modal[style*="display: flex"], #driver-forgot-password-modal[style*="display:flex"]) body #v3-dock,
html:has(#job-offer-modal[style*="display: flex"], #job-offer-modal[style*="display:flex"]) body #v3-dock {
  visibility: hidden;
  pointer-events: none;
}
}



/* ===== dock sheets r2 flex columns (Pixel QA, 11 Nov 2026,
   pr381-a7e24e8-qa.md, must-fix 3): the #break-location-grid and
   #flagdown-grid carried v1's inline max-height:60vh, which
   overflows the 88vh panel's room after the header and the 64px
   Start footer on short viewports - at 195 CSS px the location
   grid's 253px box ran 79px under the body window, so the last row
   (Wotton under Edge) stayed under Start after a full scroll, and
   the Flag down last card was clipped by the viewport. The 60vh cap
   is REMOVED from the two inline styles (the r2 byte pairs; the
   theme is bang-free so CSS alone cannot beat an inline style) and
   the panels' own flex column does the capping instead: the sheet
   body becomes a flex column and the grid becomes its flex:1 1 auto
   child with min-height:0 and overflow:auto, so the grid box never
   runs past the body - the footer (Start) always sits below the
   list and a full scroll brings the last row fully above it. The
   break duration sheet's grid keeps its 60vh cap (its options fit;
   nothing below it). Tokens only, bang-free; the dock stacking and
   the nav box are untouched. */
html body .v3-break-panel,
html body .v3-flagdown-panel {
  display: flex;
  flex-direction: column;
}
html body .v3-break-panel .v3-sheet-body,
html body .v3-flagdown-panel .v3-sheet-body {
  display: flex;
  flex-direction: column;
}
html body #break-location-grid,
html body #flagdown-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}


/* ===== meter dock (Pixel, 11 Nov 2026, Boss 23:37 GMT): the meter
   sheet joins the dock sheets - this supersedes the rule that the
   meter sits above the nav. While the meter is open the dock hides
   through the dock-sheets rule's new first line above (the meter's
   real open state is body.meter-active, the exact class v1's own
   toggleMeter() toggles on open and drops on close, so the sheet's
   X exit brings the dock back with the same rect). The sheet itself
   pins to the viewport bottom everywhere - the same
   env(safe-area-inset-bottom) anchor and 50dvh cap the on-job pin
   already paints - so the nav-height offset is gone from the
   meter's bottom edge on Home too. The flag-down sheet keeps its
   386 seat on the Clear flag down bar (bottom: var(--fd-bar-h);
   the seat selector carries two classes more than this pin, so it
   still wins the cascade), and the 386 Menu/completion hides for
   the sheet and the bar stay untouched, as does the flag-down
   X-stays-hidden rule (Clear flag down is the exit there). The PR376
   QA nits fold in: #dashboard gains a scroll-padding the height of
   the open sheet (plus the bar on a flag down), so a scroll to the
   stage button lands it above the sheet with no JS, and the dead
   230 border-box padding-bottom is dropped (the FU3 in-flow spacer
   is the working reserve; its Home height shrinks to the same sheet
   height this layer paints, so Home and a job match). CSS only, no
   JS; the dock keeps its own stacking and its box, and the standby's
   padding is unchanged. */
html body.meter-active #meter-panel.meter-panel {
  bottom: env(safe-area-inset-bottom);
  max-height: calc(50dvh - env(safe-area-inset-bottom));
}
html body.meter-active #dashboard {
  scroll-padding-bottom: calc(50dvh - env(safe-area-inset-bottom));
}
html body.v3-flagdown.meter-active.job-active #dashboard {
  scroll-padding-bottom: calc(min(50dvh, 100dvh - var(--fd-bar-h) - 160px) + var(--fd-bar-h));
}


/* ===== Issue 227 (driver v3 "Focus", slice 6 of 14): the job offer
   screen per mockups 07-offer / 08-offer-ending =====
   The offer becomes the full-screen takeover: the takeover layer of
   the v3 map, realised by the frozen legacy stacking value (99999,
   the 142 opaque full-screen fix) so every shell layer (the Menu,
   the sheets) stays under it and the real blocking overlays keep
   their exact 142 precedence - no stacking change anywhere here.
   The markup keeps every v1 id and handler (the byte pairs live in
   tests/test_driver_v3_227_offer.py); the 142 title, the "seconds
   left" label and the expiry caption stay in the DOM, theme-hidden
   (the label collapses to a zero-height line because v1's frozen
   tick writes its inline display, and the v3 glue carries the
   aria-hidden). The ring is 84px with radius 34: a 6px --hairline
   track and a white round-cap arc that empties over v1's 15s, driven
   ONLY by the --v2-ring-progress custom property v1's own frozen 1s
   countdown tick sets (no new timers; the 142 sweep transition
   stays, so reduced motion steps once per second). At <=5s the arc
   and the number turn --warn and the warn chip appears (the
   v3SyncOffer glue reading the same seconds v1 writes) - no
   flashing or pulsing anywhere here: no keyframes, no animation, no
   transition in this section. Tokens only; bang-free; every selector
   html-body prefixed. */

/* Issue 227 fu (rendered QA, logs/227-shots 07-offer / 08-offer-
   ending at 195x422 CSS px, 200%): the Accept/Refuse block painted
   over the trip details - the takeover column scrolled as a whole
   and the card's overflow let the pickup/dropoff text show through
   the gap between and around the buttons, while "Willesborough"
   ran past the 195px width. The fix-up, CSS only: the takeover
   column never scrolls any more (overflow hidden); the details
   card above the actions becomes the scrolling region (overflow-y
   auto on the flex:1 min-height:0 child), and the action block
   becomes an opaque full-width footer pinned at the bottom of the
   takeover (the sheet's own --canvas fill, padding incl.
   max(16px, env(safe-area-inset-bottom))) - so no detail text can
   ever paint under or between the buttons, at 1x and 200%, and
   Accept 72px / Refuse 56px stay fully on screen without
   scrolling. The dock joins the one dock-hide rule while the
   offer is open (same pattern as meter/chat/completion). */
html body #job-offer-modal {
  justify-content: flex-start;
  align-items: stretch;
  padding: 18px var(--edge) 0;
  box-sizing: border-box;
  overflow: hidden;
}
html body .v3-offer-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  width: 100%;
}
html body #job-offer-modal .v2-offer-ringwrap {
  flex: none;
  width: auto;
  min-height: 0;
  display: block;
}
html body #job-offer-modal .v2-offer-ring {
  width: 84px;
  height: 84px;
  margin: 0;
  gap: 0;
}
html body #job-offer-modal .v2-offer-ring-svg circle { stroke-width: 6px; }
html body #job-offer-modal .v2-offer-ring-track { stroke: var(--hairline); }
/* Issue 227 fu3 (Pixel QA of PR 395): the dash values are UNITLESS
   user units - 213.63 == 2 * pi * 34, the radius-34 circumference -
   so the 15s arc stays true at any painted size (the 84px ring and
   the 56px compact one inside the <=300px block below); visually
   identical to the px form at the 84px size. */
html body #job-offer-modal .v2-offer-ring-arc {
  stroke-dasharray: 213.63;
  stroke-dashoffset: calc(213.63 * (1 - var(--v2-ring-progress, 1)));
  stroke-linecap: round;
}
/* the seconds inside: 600 30px, tabular (v1's own "Waiting..."
   shrink at 0 stays v1's inline font-size). */
html body #job-offer-modal .v2-offer-ring .timer {
  font: 600 30px/1 var(--font-num);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
/* the legacy "seconds left" caption: v1's frozen tick writes its
   inline display, so the hide collapses the line to zero height
   (the v3 glue also carries its aria-hidden; the ring's own
   aria-label is the wording that reaches assistive tech). */
html body #job-offer-modal #offer-timer-label {
  height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  margin: 0;
}
html body #job-offer-modal .v2-offer-title { display: none; }
html body #job-offer-modal #offer-expiry-caption { display: none; }
/* the card IS the screen: no box, one flex column - fare top, route
   anchored low, divider + customer at the bottom.
   Issue 227 fu: the card is also the takeover's scrolling details
   region (the flex:1 min-height:0 child of the now never-scrolling
   column above the opaque footer), so every detail line - including
   the ones below the fold at 200% - scrolls clear of the buttons
   instead of painting under them. */
html body #job-offer-modal .v2-offer-card {
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  text-align: left;
}
html body #job-offer-modal .v2-offer-fare {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 18px 0 0;
}
html body #job-offer-modal .v2-offer-fare strong { order: -1; }
html body #job-offer-modal .v2-num {
  font-size: clamp(48px, 24.6cqw, 96px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.055em;
  color: var(--text);
}
html body #job-offer-modal #offer-price::first-letter {
  font-size: 0.5em;
  letter-spacing: -0.03em;
  vertical-align: 0.62em;
  margin-right: 2px;
  color: var(--text-2);
}
html body #job-offer-modal .v2-offer-fare small {
  margin: 14px 0 0;
  font: 500 var(--t-label);
}
/* the warn chip: the 222 chip component, hidden until the glue
   unhides it at <=5s; NO animation (no flashing or pulsing). */
html body #v3-offer-warn-chip { order: 2; margin: 12px 0 0; }
html body #v3-offer-warn-chip[hidden] { display: none; }
/* route block, anchored low: each stop is a two-column grid - the
   14px dot/square cell beside the caption + address column (the dot
   and square are real elements: this appended layer adds no
   pseudo-elements), and the dotted connector between the stops
   rides the dots' column centre.
   Issue 227 fu: the anchor is the route's own flex growth now, NOT
   an auto top margin - Chrome keeps auto margins at their share of
   the box in a scroll container, stranding the first lines above
   the scroll origin where no scroll can ever reach them (the 200%
   dropoff top stayed cut off at a full scroll). flex-grow only
   distributes POSITIVE free space, so the long 200% content stays
   top-aligned and fully scrollable while a short 1x screen still
   gets the stretched connector holding the dropoff low. */
html body #job-offer-modal .v2-offer-route {
  order: 3;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  margin: 0 0 8px;
  border-left: 0;
}
html body #job-offer-modal .v3-offer-stop {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: 14px;
}
html body #job-offer-modal .v3-offer-dot {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text);
  background: var(--canvas);
}
html body #job-offer-modal .v3-offer-stop--dropoff .v3-offer-dot {
  border-radius: 3px;
  background: var(--text);
}
html body #job-offer-modal .v3-offer-stop > :not(.v3-offer-dot) {
  grid-column: 2;
}
html body #job-offer-modal .v3-offer-stop small {
  display: block;
  font: 500 var(--t-cap);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
html body #job-offer-modal .v3-offer-conn {
  flex: 1 1 auto;
  min-height: 26px;
  width: 0;
  margin-left: 6px;
  border-left: 2px dotted var(--stroke);
}
html body #job-offer-modal .v2-offer-route strong {
  font: 600 24px/1.2 var(--font-ui);
  letter-spacing: -0.015em;
}
/* the ETA line (shown only while v1 supplies an ETA, as today): the
   chip re-skins from its 142 pill to the grey label line, the
   detail line renders under it in --text-3. */
html body #job-offer-modal .v2-offer-eta {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: var(--text-2);
  font: 500 var(--t-label);
  white-space: nowrap;
}
html body #job-offer-modal .v2-offer-eta-detail {
  color: var(--text-3);
  font: 400 var(--t-label);
  margin: 4px 0 0;
}
html body .v3-offer-sep {
  order: 4;
  height: 1px;
  margin: 22px 0 16px;
  background: var(--hairline);
}
html body .v3-offer-crow {
  order: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-bottom: var(--s3);
}
html body .v3-offer-crow .v3-icon { color: var(--text-2); flex: none; }
html body #offer-customer {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  font: 500 var(--t-label);
  color: var(--text-2);
}
/* the dock: Accept job 72px (20px label) over Refuse at the checked
   --hit-driving 56px, the 142 var(--s3) 12px gap >= 10px apart.
   Issue 227 fu: the block is the takeover's opaque full-width
   footer, pinned at the bottom of the column (flex none, so the
   scrolling card above shrinks first and both buttons stay fully
   visible without scrolling); the padding replaces the 142 sticky
   bottom reserve with the safe-area floor max(16px, ...) and the
   --canvas fill is the sheet's own opaque surface, so the gap
   between and around the buttons never shows the details under
   them. */
html body #job-offer-modal .v2-offer-actions {
  width: 100%;
  max-width: none;
  gap: var(--s3);
  flex: none;
  background: var(--canvas);
  padding: var(--s3) 0 max(16px, env(safe-area-inset-bottom));
}
html body #job-offer-modal .v2-offer-accept {
  min-height: 72px;
  font-size: 20px;
  border-radius: 20px;
}
html body #job-offer-modal .v2-offer-refuse {
  min-height: var(--hit-driving);
}
/* The approved addition (NEW 2): the <=5s amber offer-ending state.
   The glue (v3SyncOffer) toggles .v3-offer-ending on the ring
   element and re-swaps the number's inline colour to the token;
   --warn appears nowhere else in this slice. */
html body #job-offer-modal .v3-offer-ending .v2-offer-ring-arc { stroke: var(--warn); }
/* Pixel QA (Issue 227 comment, main cb5fdb3, offer-200pct.png): at
   200% the drop-off word "Willesborough" broke mid-word - whole
   words wrap first, hyphenation only as the last resort, with
   lang="en-GB" on <html> so hyphens works.
   Issue 227 fu (rendered QA, 195px): break-word still left the one
   long word wider than the 195px screen, and the passenger name
   had no wrap rule at all - both addresses and the customer name
   gained this wrap rule so nothing on the offer overflows the width.
   Issue 227 fu3 (Pixel QA of PR 395, nit (b)): overflow-wrap:anywhere
   broke "International" as "Internatio/nal" and "Willesborough" as
   "Willesbor/ough" - the wrap is break-word + hyphens:auto again
   (word-break normal; lang=en-GB already on <html>), and the address
   size drops to 16px inside the <=300px block below so every word
   fits the short viewport's column whole, with no last-resort
   mid-word break left. */
html body #offer-pickup,
html body #offer-dropoff,
html body #offer-customer {
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* ===== flag-down 72px bar at <=300px (Pixel QA, 11 Nov 2026, the
   PR386 bar follow-up, Issue 230 family): at true 200% (195x422
   CSS px, DPR 2) the "Clear flag down" label wraps to two lines and
   the button measures 71px, but --fd-bar-h reserved a 64px button -
   the bar under-reserved by 7px and the sheet (seated at
   bottom: var(--fd-bar-h) by the 386 MF2 fix) overlapped it. One
   media block pins BOTH to 72px so the reservation and the button
   always agree and the sheet bottom clears the bar top. Chained
   after main's latest theme link (the Issue 227 job-offer layer),
   CSS-only, tokens only, no bangs; 1x (390x844) never matches the
   query. */
@media (max-width:300px){ html body.v3-flagdown{--fd-bar-h:calc(12px + 72px + max(16px, env(safe-area-inset-bottom)));} html body.v3-flagdown .v2-sticky-bottom #btn-job-action{min-height:72px;} }

/* ===== Issue 227 fu3 (Pixel QA of PR 395, nits (a) and (b), 11 Nov
   2026): the compact offer at the short viewport. CSS only, chained
   after the 227 fu layer above; 1x is unchanged - every rule below
   sits inside @media (max-width: 300px) (the 200% zoom's 195px
   viewport), and the two all-sizes corrections (the wrap rule above,
   the unitless ring dash above) are edited in place.
   (a) The takeover itself never scrolls (the fu column above): at
   the short viewport the chrome compacts so the details card grows
   (152 -> 190px) and the pickup address is visible at rest, with the
   ending chip up too - the redundant caption and the "Estimated
   fare" label hide (the ring already counts down), the ring paints
   at 56px, the seconds at 20px, the fare at 40px and the addresses
   at 16px/1.25, and Accept 72 / Refuse 56 stay pinned whole on
   screen (the opaque footer, the scrolling card and the dock-hide
   line above are untouched).
   (b) Whole words wrap, nothing splits mid-word: the wrap rule above
   is corrected in place to break-word + hyphens:auto, and at 16px
   every word of the QA addresses ("Ashford International Station",
   "14 Willesborough Road, Ashford") fits its line whole in the
   ~127px column - the fu anywhere-wrap broke "Internatio/nal" and
   "Willesbor/ough". */
@media (max-width: 300px) {
  html body #job-offer-modal { padding-top: 8px; }
  html body #v3-offer-cap { display: none; }
  html body .v3-offer-top { justify-content: flex-end; }
  html body #job-offer-modal .v2-offer-ring {
    width: 56px;
    height: 56px;
  }
  html body #job-offer-modal .v2-offer-ring .timer { font-size: 20px; }
  html body #job-offer-modal .v2-offer-fare { margin-top: 6px; }
  html body #job-offer-modal .v2-offer-fare small { display: none; }
  html body #job-offer-modal .v2-num { font-size: 40px; }
  html body #v3-offer-warn-chip { margin-top: 6px; }
  html body .v3-offer-sep { margin: 10px 0 8px; }
  html body #job-offer-modal .v2-offer-route strong {
    font-size: 16px;
    line-height: 1.25;
  }
}

/* Issue 1259 fu2 (Pixel HOLD): at the true 200% width (195px) the
   reverted compact sizes overflow the card. Keep the card itself
   fixed (name, reward and the dock stay put) and scroll ONLY the
   route/stops area inside it; the ring may shrink, the 20px
   countdown stays. The dock's top gap comes from the crow row's own
   padding so Accept can never clip the reward. */
@media (max-width: 299px) {
  html body #job-offer-modal .v2-offer-card { overflow: hidden; }
  html body #job-offer-modal .v2-offer-route {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 40vh;
    overflow-y: auto;
  }
  html body #job-offer-modal .v2-offer-actions { padding-top: 0; }
  html body #job-offer-modal .v2-offer-ring { width: 40px; height: 40px; }
  html body #job-offer-modal .v2-offer-ring .timer { font-size: 20px; }
}

/* =====================================================   Issue 228 (driver v3 "Focus", slice 7 of 14): the on-job top
   bar, the legacy menu-button hide, the stage button floor and
   the Issue 223 QA touch-target fixes. Theme-only for this slice:
   the
   page adds the #v3-stagebar markup and the ONE additive
   v3SyncStageBar mirror (guarded call at the end of
   showActiveJobUI, chained after the 389 reveal call); every id,
   handler and function keeps its behaviour, and the legacy
   "Current job" menu button is HIDDEN here, never deleted (its id
   and openDriverMenu handler stay on the page). Tokens only; no
   bang; no stacking and no before/after pseudo-elements (the
   dock/FU2/FU3 to-EOF freeze keeps its meaning).
   ============================================================ */

/* 1. On-job top bar (only while a job is active, i.e. the
   body.job-active class v1's showActiveJobUI already toggles):
   the Menu keeps its badge and handler on the left, the centred
   4-segment step bar (4px gaps; white for stages reached,
   --hairline otherwise) replaces the wordmark with the stage
   label under it, and the Issue 223 status pill collapses to the
   dot-only status button - the SAME #v3-status-pill keeps its
   v3OpenStatusSheet handler, and its word span only leaves the
   paint (visually hidden, it stays the accessible name; the
   <=300px r6 precedent). */
html body .v3-stagebar { display: none; }
html body.job-active .v3-topbar .v3-wordmark { display: none; }
html body.job-active .v3-topbar .v3-stagebar {
  display: block;
  flex: 1;
  justify-self: stretch;
  min-width: 0;
  padding: 0 var(--s2);
}
html body .v3-steps { display: flex; gap: 4px; }
html body .v3-steps i {
  flex: 1 1 0;
  height: 4px;
  border-radius: 2px;
  background: var(--hairline);
}
html body .v3-steps i.v3-step-on { background: var(--text); }
html body .v3-stage-label {
  margin: 9px 0 0 0;
  text-align: center;
  color: var(--text);
}
html body.job-active .v3-topbar > .v3-pill {
  display: grid;
  place-items: center;
  gap: 0;
  width: var(--hit-min);
  min-width: 0;
  padding: 0;
}
html body.job-active .v3-topbar > .v3-pill > * { grid-area: 1 / 1; }
html body.job-active .v3-topbar .v3-pill-word {
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 2. ONE Menu: the legacy "Current job" hamburger (#v2-menu-btn,
   which opens the old driver menu) hides on the on-job screen -
   CSS only, the id and its openDriverMenu handler stay on the
   page (the top-bar Menu above is the one Menu per mockups
   09/12/13). */
html body .v2-active-card .v2-aj-header .v2-hamburger { display: none; }

/* 3. Status pill in the stage views: >=48px in EVERY state (the
   legacy body.meter-active .job-card button compact rule ties the
   theme's html-body rule and wins on order, so the pill dropped to
   35px in the meter state; this meter-scoped rule outranks it by
   one class), and never off screen: the chips row wraps instead of
   pushing the pill past the viewport (200%: x=217 of 195 in
   Arrived), the pill itself can shrink to its row. */
html body .v2-active-card .v2-aj-chips { flex-wrap: wrap; }
html body .v2-active-card .v2-status-pill { max-width: 100%; }
html body.meter-active .v2-active-card .v2-status-pill {
  min-height: 48px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

/* 4. The stage button: primary white, full width, >=64px, the
   seat in the dock on every stage (the sticky bottom is
   the card's last row; the base rule already sizes it - the id
   outranks the legacy meter compact, so it holds in every state).
   The v1-class btn-success repaint keeps the primary white on the
   At Pickup / POB stages, and the label reads sentence case
   WITHOUT touching v1's JS strings: text-transform lowercase
   plus ::first-letter uppercase (a first-letter pseudo is not a
   before/after pseudo; the freeze keeps its meaning). */
html body .v2-active-card .v2-sticky-bottom #btn-job-action {
  min-height: 64px;
  width: 100%;
  background: var(--text);
  color: var(--on-light);
  border: 1px solid var(--stroke);
  text-transform: lowercase;
  letter-spacing: normal;
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action::first-letter {
  text-transform: uppercase;
}

/* Issue 725 The v1 hold fill (inline 28% white wash) is white on white on this
   white primary. Lift the B2 flag-down inversion onto #btn-job-action on
   every stage: the inset --text shadow paints over the inline background
   (no stylesheet bang needed), and mix-blend-mode: difference turns the
   fill black (--canvas) and the black label white, per pixel, so a glyph
   cut by the fill edge stays 21:1 on both sides. hold-active/hold-paused
   only exist while the finger is down; the overlay width resets to 0 and
   the classes are removed on release, so nothing sticks. */
html body .v2-active-card .v2-sticky-bottom #btn-job-action {
  isolation: isolate;
  overflow: hidden;
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action .hold-overlay {
  box-shadow: inset 0 0 0 100vmax var(--text);
  mix-blend-mode: difference;
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action.hold-paused .hold-overlay {
  opacity: 1;
  background: transparent;
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action.hold-active {
  box-shadow: 0 0 0 3px var(--text-2);
  color: var(--on-light);
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action.hold-paused {
  box-shadow: 0 0 0 3px var(--warn);
  color: var(--on-light);
}
html body .v2-active-card .v2-sticky-bottom #btn-job-action .hold-countdown {
  margin-left: calc(50% - var(--s4) - 0.3em);
  color: var(--text);
  text-shadow: none;
  mix-blend-mode: difference;
  font: 700 18px/1 var(--font-num);
  font-variant-numeric: tabular-nums;
}

/* 5. The note preview and the "Job details & tools" rows: >=48px
   in every state, including meter-active (the same legacy compact
   tie that shrank the status pill shrank these two rows to 35px;
   the meter-scoped rules outrank it by one class each). */
html body.meter-active .v2-active-card .v2-note-btn {
  min-height: 48px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
html body.meter-active .v2-active-card .v2-secondary-btn {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

/* 6. Issue 228 s1 fix-up (review of the 228s1 render,
   11 Nov 2026): ONE Status, the empty stage chip and the 200%
   top bar. All CSS-only,
   same freezes as the rules above (tokens only, no bang, no
   stacking; :empty is the only pseudo).
   The on-job "Status" dropdown pill (#v2-status-pill, which opens
   #v2-status-panel) is HIDDEN, never deleted - the #v2-menu-btn
   way: its id and v2ToggleStatusPanel handler stay on the page. The
   top-bar dot's sheet reaches every option that panel mirrored
   (Dispatch / GPS / Auto / the eligibility label - v3SyncStatus
   mirrors the same legacy #dispatch-txt / #gps-ind / #auto-ind /
   #status-text signals), so there is ONE Status control.
   The stage chip mirrors #status-text's innerText, which reads ""
   while the v3 theme keeps the legacy bar at visibility:hidden, so
   on the v3 on-job screen the chip is an empty grey pill under
   "Current job"; :empty hides it ONLY while it has no text at all,
   so v1 filling it still shows. */
html body.job-active .v2-active-card .v2-status-pill { display: none; }
html body .v2-active-card .v2-stage-chip:empty { display: none; }

/* 7. The 200% top bar (195px container): the stage label wrapped
   to three lines ("Waiting / for / passenger") and pushed the step
   segments into the bar's very top edge. Inside the <=300px query
   the label drops to 13px/1.2 - at this width every stage label
   wraps at most twice, no ellipsis and no word breaking - and the
   step bar's own top padding tops out past the safe-area inset, so
   the segments sit fully inside the bar. The 48px Menu and status
   button are untouched (the 223 r6 container query below 300px
   already pins them). */
@media (max-width: 300px) {
  html body.job-active .v3-topbar .v3-stagebar {
    padding: max(8px, env(safe-area-inset-top)) 0 0 0;
  }
  html body .v3-stage-label {
    font-size: 13px;
    line-height: 1.2;
  }
  /* Issue 725: 32px gutter so a wrapping label never sits on the countdown. */
  html body .v2-active-card .v2-sticky-bottom #btn-job-action {
    padding-inline: 32px;
    white-space: normal;
    text-wrap: balance;
  }
  html body .v2-active-card .v2-sticky-bottom #btn-job-action .hold-countdown {
    margin-left: calc(50% - var(--s3) - 0.3em);
  }
}


/* ===== Issue 228 s2 (driver v3 "Focus", the on-job content area);
   Pixel, 11 Nov 2026 - mockups 09-en-route / 12-arrived. Scope:
   Assigned, En Route and At Pickup ONLY - the v3SyncJobContent
   mirror paints body.v3-prepob plus .v3-on on #v3-job-content from
   v1's own body.job-active class and the live status (never its own
   logic: POB keeps the meter slice, flag-down and W&R keep slice 4;
   a flag_down source never gets the class). Tokens only, no bang,
   and - the dock/FU2/FU3 to-EOF freeze - no placed or stacked
   boxes and no before/after pseudo-elements anywhere in this
   section;
   v1 writes an inline display on the card-paid card and the note
   row, which beats every stylesheet display, so while v3-prepob is
   on they collapse to a zero-size invisible box instead. ===== */

/* 1. The wrapper: hidden by default, a growing flex column while
   the mirror paints .v3-on (flex-grow, never shrink: at 1x the
   scroll area scrolls the content; the s2 fu rules below make the
   wrapper itself the scroller at 200%). */
html body .v3-job-content { display: none; }
html body .v3-job-content.v3-on {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 0 auto;
  min-width: 0;
}

/* 2. Caption + display + sub line. The display is the design kit's
   40px .v3-display (clamp(22px, 11.5cqw, 40px): the address wraps
   whole words at 200%, never truncated); the sub line carries the
   postcode (En Route) or the address under the customer name (At
   Pickup) in body --text-2. :empty hides a line the mirror has
   nothing for (no postcode / no address). */
html body .v3-job-cap { margin: 28px 0 0 0; }
html body .v3-job-display { margin: 12px 0 0 0; }
html body .v3-job-display:empty { display: none; }
html body .v3-job-sub {
  margin: 6px 0 0 0;
  overflow-wrap: break-word;
}
html body .v3-job-sub:empty { display: none; }
html body .v3-job-reward {
  display: block;
  margin: 6px 0 0 0;
}

/* 3. Chips: the kit's 32px pill, shown ONLY while the mirror paints
   .v3-on from v1's own badge show/hide state (the tracking badge's
   poll, showActiveJobUI's card_paid line) - never this sheet's own
   logic. The row wraps at 200% so nothing overflows the screen. */
html body .v3-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 18px 0 0 0;
}
html body .v3-job-chip { display: none; }
html body .v3-job-chip.v3-on { display: inline-flex; }

/* 4. The tile row: Call + Message only (no Navigate - Boss,
   10 Nov 2026), the kit's 76px job tiles sharing the width with the
   Issue's 8px gap. The base .job-card button rule (12px padding,
   uppercase, 10px top margin) is reset here; the tiles are
   one-cell grids so the unread badge sits in the tile's top-right
   corner with no placed-box property (the to-EOF freeze), the
   icon + label stack centred in the same cell. The selector carries
   body.job-active (s2 fu, 11 Nov 2026): the legacy inline
   body.job-active .job-card button ties the old (0,2,2) selector
   and wins on order (the page's style block rides after this
   sheet), which left the tiles content-wide and uppercase; one
   class up, this rule wins and the tiles share the row equally
   (flex-basis 0, min-width 0 so the label can wrap, never clip). */
html body .v3-job-tiles {
  display: none;
  gap: var(--s2);
  margin: 24px 0 24px 0;
}
html body .v3-job-tiles.v3-on { display: flex; }
html body.job-active .v3-job-tiles .v3-tile {
  margin: 0;
  padding: 0;
  flex: 1 1 0;
  min-width: 0;
  text-transform: none;
  letter-spacing: normal;
  border-radius: var(--r-card);
  font: 500 var(--t-label);
}
html body .v3-tile--call,
html body .v3-tile--sms { display: grid; }
html body .v3-tile-face {
  grid-area: 1 / 1;
  place-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}
html body .v3-tile-badge { display: none; }
html body .v3-tile-badge.v3-on {
  display: inline-flex;
  grid-area: 1 / 1;
  place-self: start end;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 8px 8px 0 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-light);
  font: 700 12px/20px var(--font-ui);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
html body .v3-job-tiles .v3-tile:focus-visible,
html body .v3-peek:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

/* 5. The peek row: the job card pinned above the dock - the whole
   card is the button (v1's own v2OpenJobSheet() entry point),
   >=56px, "{customer} · to {drop-off}" over a one-line note preview
   (notes may ellipsize; addresses never - the title wraps instead),
   with the 40px chevron-up disc on the right. margin-top: auto
   pins it above the dock while the content is short; the tiles
   row's bottom margin keeps the 24px gap when the column fills. */
html body.job-active .v3-job-content .v3-peek {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--hit-driving);
  margin: auto 0 0 0;
  padding: 14px 14px 14px 20px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--text);
  text-align: left;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}
html body .v3-peek-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
html body .v3-peek-title {
  max-width: 100%;
  overflow-wrap: break-word;
}
html body .v3-peek-note { display: none; }
html body .v3-peek-note.v3-on {
  display: block;
  max-width: 100%;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .v3-peek-chev {
  flex: none;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  color: var(--text);
}

/* 6. The legacy rows the mockups retire on these stages: the
   "Current job" header, the chip row, the pickup block, the
   customer card (with v1's Call/SMS row and tracking badge), the
   card-paid card, the note row and the "Job details & tools"
   button all stay in the DOM with their ids and handlers - only
   their paint is hidden here (the #v2-menu-btn way). The
   card-paid card and note row carry v1's inline display, so they
   collapse zero-size instead. */
html body.v3-prepob .v2-active-card .v2-aj-header,
html body.v3-prepob .v2-active-card .v2-aj-chips,
html body.v3-prepob .v2-active-card #job-pickup-line,
html body.v3-prepob .v2-active-card .v2-cust-card,
html body.v3-prepob .v2-active-card #v2-sheet-open-btn {
  display: none;
}
html body.v3-prepob .v2-active-card #card-paid-indicator,
html body.v3-prepob .v2-active-card #v2-note-preview {
  max-height: 0;
  max-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
}

/* 7. 200% (195px CSS width): the same column with tighter spacing;
   the display and the customer name wrap (the kit's clamp bottoms
   at 22px there, break-word, never truncated), and the wrapper
   itself becomes the scroller IN THE ROWS' DOM ORDER (s2 fu2, 11
   Nov 2026: the fu review's column-reverse + order trick anchored
   the scroll at the bottom, so at rest the display sat scrolled
   out of view and the painted order broke from the DOM/focus order
   - WCAG 1.3.2/2.4.3). The scroll starts at the top: the caption
   and the display (the street or the customer) are fully in view
   at rest. The peek row is NOT pinned at this width - it rides in
   normal flow as the scrolling column's last item (margin-top 0,
   never shrunk), reachable by scrolling; the scrollport ends above
   the dock, so scrolled to the end the peek sits whole and visible
   above the dock with nothing under it, and it keeps the base
   rule's >=56px floor and v2OpenJobSheet tap. Its layout compacts
   the tile-badge way - a one-cell grid, no placed box (the to-EOF
   freeze): the text fills the card's content width (the card minus
   its ~32px side padding), the chevron disc turns decorative and
   small (24px, a 16px icon) in the top-right corner, the title
   clamps to three lines and the note keeps the one-line ellipsis
   (the only clamp in the slice - the full drop-off and note live
   in the Job sheet).
   s2 fu (Pixel PR423 QA, 11 Nov 2026): with both chips showing the
   chip row wraps to two 32px lines and the tile row's top sat ~15px
   above the dock - only partly tappable at rest. The chip row and
   the tile row tighten to the Issue's 8px margins (the chips keep
   8px padding), pulling the tile row's top edge up to ~293px - the
   closest reachable without shrinking the 76px/48px tiles (the
   remaining ~12px of the tiles' 48px hit zone still sits under the
   dock at rest; a scroll reaches the rest). The scroller also
   carries a bottom padding >= the dock (88px vs the ~82px dock) so
   the postcode/sub line never sits under it, and the peek text
   keeps 32px clear of the top-right chevron (24px chev + the
   Issue's 8px gap) so the wrapped title never crowds it. */
@media (max-width: 300px) {
  html body .v3-job-cap { margin-top: var(--s4); }
  html body .v3-job-display { margin-top: var(--s3); }
  html body .v3-job-sub { margin-top: var(--s1); }
  html body .v3-job-chips { margin-top: var(--s2); }
  html body .v3-job-chips .v3-job-chip.v3-on { padding: 0 8px; }
  html body .v3-job-tiles { margin-top: var(--s2); margin-bottom: var(--s2); }
  html body.job-active .v3-job-content .v3-peek-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  html body .v3-job-content.v3-on {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 88px;
  }
  html body .v3-job-content.v3-on .v3-job-tiles { flex-shrink: 0; }
  html body.job-active .v3-job-content .v3-peek {
    display: grid;
    margin-top: 0;
    flex-shrink: 0;
  }
  html body .v3-job-content .v3-peek-text { grid-area: 1 / 1; padding-right: 32px; }
  html body .v3-job-content .v3-peek-chev {
    grid-area: 1 / 1;
    place-self: start end;
    width: 24px;
    height: 24px;
  }
  html body .v3-job-content .v3-peek-chev .v3-icon {
    width: 16px;
    height: 16px;
  }
}

/* ===== Issue 228 s3 (driver v3 "Focus", the on-board content);
   Pixel, 11 Nov 2026 - mockups 13-on-board / 26-gps-lost. Scope:
   POB ONLY - the v3SyncPob mirror paints body.v3-pob plus .v3-on on
   #v3-pob-content from v1's own body.job-active class and the POB
   status (never its own logic: flag-down and W&R keep slice 4, the
   break screen keeps issue 226). Tokens only, no bang, no hex and no raw
   colour functions, and - the dock/FU2/FU3 to-EOF freeze - no placed or
   stacked boxes and no before/after pseudo-elements anywhere in this
   section; the PR416 Status-sheet-over-meter stacking nit lives up
   with the shell's own .v3-over-menu stacking rules, earlier in this
   sheet, where every stacking rule already lives.
   v1 writes an inline display on the card-paid card and the note
   row, which beats every stylesheet display, so while v3-pob is on
   they collapse to a zero-size invisible box instead (the s2
   prepob precedent). ===== */

/* 1. The wrapper: hidden by default, a growing flex column while the
   mirror paints .v3-on (the s2 wrapper pattern: at 1x the scroll area
   scrolls the content; the fu rules below make the wrapper itself the
   scroller at 200%). */
html body .v3-pob-content { display: none; }
html body .v3-pob-content.v3-on {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 0 auto;
  min-width: 0;
}

/* 2. Caption + display + sub line: the s2 rules mirrored - the kit
   40px display wraps whole words at 200% (never truncated), the sub
   line carries the drop-off tail in body --text-2, :empty hides a
   line the mirror has nothing for. */
html body .v3-pob-cap { margin: 28px 0 0 0; }
html body .v3-pob-display { margin: 12px 0 0 0; }
html body .v3-pob-display:empty { display: none; }
html body .v3-pob-sub {
  margin: 6px 0 0 0;
  overflow-wrap: break-word;
}
html body .v3-pob-sub:empty { display: none; }

/* 3. The meter card: ONE tappable card (tap anywhere, >=56px) that
   opens v1's own meter sheet entry (toggleMeter). The caption mirrors
   v1's live meter state + rate ("Meter running · Rate 1", the dot in
   the kit's white); the fare is the 84px glance in £ (v1's displayed
   fare re-typed, never recomputed); the trip line carries tabular
   figures. The raised selectors (one class over the page's legacy
   body.job-active / body.meter-active .job-card button rules) keep
   the card's own padding, radius and sentence case. GPS weak
   (mockup 26): the ok caption drops out for the amber satellite
   caption and the speed reads "— mph".
   s3 fu (Pixel PR423 QA, 11 Nov 2026): at 200% the wrapped caption
   ran into the chevron - the caption now TAKES the row minus the
   chevron (flex 1 1 auto; its text span min-width 0, so it wraps by
   word inside it) and the chevron stays top-right (the row's
   align-items: flex-start). */
html body.job-active .v3-pob-content .v3-metercard {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--hit-driving);
  margin: 28px 0 0 0;
  padding: 20px 20px 18px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--text);
  text-align: left;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}
html body .v3-metercard-cap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
html body .v3-metercard-chev { color: var(--text-3); flex: none; }
html body .v3-metercap {
  display: none;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
html body .v3-metercap.v3-on { display: inline-flex; }
html body .v3-metercap #v3-meter-cap-text,
html body .v3-metercap #v3-meter-weak-text {
  overflow-wrap: break-word;
  min-width: 0;
}
html body .v3-metercap-weak.v3-on { color: var(--warn); }
html body .v3-metercap-weak .v3-icon { color: var(--warn); flex: none; }
html body .v3-metercard-glance {
  margin: 20px 0 0 0;
  font-size: clamp(40px, 24cqw, 84px);
}
html body .v3-metercard-trip {
  margin: 16px 0 0 0;
  color: var(--text-2);
}
html body .v3-metercard:focus-visible,
html body .v3-paxrow-chip:focus-visible,
html body .v3-pob-peek:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}
/* Issue 934 s2: while the meter drawer is open (v1's body.meter-active)
   the on-board card would be a second meter, so it hides; every
   toggleMeter path (Close, menu, sheet row, Home tile) drops the class
   and the card returns with the same live figures. The id clears the
   job-active display: block rule above. */
html body.meter-active #v3-meter-card { display: none; }

/* 4. The passenger row: the name (wraps, never truncated) with the
   warn "Minor, 14+" chip - the kit's 32px warn pill (amber on
   --warn-bg, the shield-alert icon carrying the meaning), shown ONLY
   while the mirror paints .v3-on from v1's own
   #unaccompanied-minor-badge show state, and tapping it runs v1's
   own showUnaccompaniedMinorDetails(). The chevron is decorative.
   s3 fu (Pixel PR423 QA, 11 Nov 2026): the chip rule said nothing
   about width, min-height, font-size or margins, so the page's
   legacy button{width:100%} and body.job-active .job-card button
   {min-height:50px;font-size:1.1rem} rules still won on those
   declarations - the chip painted full-width 312x50 and the name
   collapsed to a letter a line. The selector now carries the row
   (one class up) and the rule resets every legacy declaration:
   width auto, the kit's 32px pill (min-height 0 beats the 50px),
   14px text and margin 0 (the legacy margin-top:auto had parked
   the chip at the row's bottom edge). The >=48px hit area is the
   32px pill plus the kit's 8px apron - the chip's hit-area rule
   lives up with the kit's own touch rules, earlier in this sheet
   where every touch rule already lives; this section stays
   pseudo-free. */
html body.job-active .v3-pob-content .v3-paxrow {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: var(--hit-driving);
  margin: 10px 0 0 0;
  padding: 14px 16px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--text);
}
html body .v3-paxrow-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
html body .v3-paxrow-name {
  min-width: 0;
  overflow-wrap: break-word;
}
html body .v3-paxrow-reward {
  display: block;
  margin: 4px 0 0 0;
}
html body .v3-paxrow-chev { color: var(--text-3); flex: none; }
html body .v3-paxrow-chip { display: none; }
html body.job-active .v3-pob-content .v3-paxrow .v3-paxrow-chip.v3-on {
  display: inline-flex;
  flex: none;
  width: auto;
  box-sizing: border-box;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0 12px;
  font: 500 14px/1 var(--font-ui);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

/* 5. The peek row: the s2 pattern - the whole card is the button
   (v1's own v2OpenJobSheet() entry point), >=56px, "Job details" over
   the static "Message · pins · dispatch · cancel" line (Call/SMS
   live in the Job sheet after POB, as today), with the 40px
   chevron-up disc on the right. margin-top: auto pins it above the
   dock while the content is short. */
html body.job-active .v3-pob-content .v3-pob-peek {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--hit-driving);
  margin: auto 0 0 0;
  padding: 14px 14px 14px 20px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--text);
  text-align: left;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}
html body .v3-pob-peek-note {
  display: block;
  max-width: 100%;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .v3-pob-peek-title {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* 6. The legacy rows the mockups retire on POB (the s2 prepob list):
   the "Current job" header, the chip row, the pickup block, the
   customer card (with v1's Call/SMS row, tracking badge and minor
   badge), the card-paid card, the note row and the "Job details &
   tools" button all stay in the DOM with their ids and handlers -
   only their paint is hidden here. The s2 Call/Message tiles stay
   hidden on POB too (after POB they live in the Job sheet, as
   today). */
html body.v3-pob .v2-active-card .v2-aj-header,
html body.v3-pob .v2-active-card .v2-aj-chips,
html body.v3-pob .v2-active-card #job-pickup-line,
html body.v3-pob .v2-active-card .v2-cust-card,
html body.v3-pob .v2-active-card #v2-sheet-open-btn,
html body.v3-pob .v3-job-tiles {
  display: none;
}
html body.v3-pob .v2-active-card #card-paid-indicator,
html body.v3-pob .v2-active-card #v2-note-preview {
  max-height: 0;
  max-width: 0;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  visibility: hidden;
}

/* 7. 200% (195px CSS width): the s2 fu2 rules mirrored - the wrapper
   itself scrolls IN THE ROWS' DOM ORDER from the top (no
   column-reverse, no order property anywhere), the peek row rides in
   normal flow as the scrolling column's last item (margin-top 0,
   never shrunk), the 84px glance re-caps down to its 40px floor so
   the money never overflows the ~155px measure, and nothing places
   or stacks a box (the to-EOF freeze).
   s3 fu (Pixel PR423 QA, 11 Nov 2026): the passenger row wraps - the
   name first, the chip under it (its 8px padding keeps the wrapped
   pill inside the ~127px measure) and the decorative chevron is
   retired at this width so the row stays two lines; the scroller
   carries a bottom padding >= the dock (88px vs the ~82px dock) so
   the sub line never sits under it; and the peek text keeps
   32px clear of the top-right chevron (24px chev + the Issue's 8px
   gap) so the title never crowds it. */
@media (max-width: 300px) {
  html body .v3-pob-cap { margin-top: var(--s4); }
  html body .v3-pob-display { margin-top: var(--s3); }
  html body .v3-pob-sub { margin-top: var(--s1); }
  html body.job-active .v3-pob-content .v3-metercard {
    margin-top: var(--s4);
    padding: 14px 14px 12px 14px;
  }
  html body .v3-metercard-glance { margin-top: var(--s3); }
  html body .v3-metercard-trip { margin-top: var(--s3); }
  html body.job-active .v3-pob-content .v3-paxrow {
    margin-top: var(--s2);
    padding: 10px 12px 10px 14px;
    flex-wrap: wrap;
  }
  html body.job-active .v3-pob-content .v3-paxrow .v3-paxrow-chip.v3-on {
    padding: 0 8px;
  }
  html body .v3-pob-content .v3-paxrow-chev { display: none; }
  html body .v3-pob-content.v3-on {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 88px;
  }
  html body .v3-pob-content.v3-on .v3-metercard { flex-shrink: 0; }
  html body .v3-pob-content.v3-on .v3-paxrow { flex-shrink: 0; }
  html body.job-active .v3-pob-content .v3-pob-peek {
    display: grid;
    margin-top: 0;
    flex-shrink: 0;
  }
  html body .v3-pob-content .v3-peek-text { grid-area: 1 / 1; padding-right: 32px; }
  html body .v3-pob-content .v3-peek-chev {
    grid-area: 1 / 1;
    place-self: start end;
    width: 24px;
    height: 24px;
  }
  html body .v3-pob-content .v3-peek-chev .v3-icon {
    width: 16px;
    height: 16px;
  }
}

/* Issue 1259 fu3 (Pixel HOLD): at the true 200% width the peek title
   spends its lines on the address and pushes the reward under the
   scrollport edge. Clamp the title to one line (ellipsis; the full
   address stays in the Job sheet) and tighten the peek padding so the
   reward under it clears the scroller's bottom edge. On POB the
   passenger name and its reward move above the meter card via order,
   so they stay in view and the meter card scrolls under them. */
@media (max-width: 299px) {
  html body.job-active .v3-job-content .v3-peek-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  html body.job-active .v3-job-content .v3-peek {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  /* Issue 1259 fu4: keep the Drop-off block first at 200%; the
     passenger card sits directly above the meter card. */
  html body.job-active .v3-pob-content #v3-pob-pinhold { order: 0; }
  html body.job-active .v3-pob-content #v3-pax-row { order: 1; }
  html body.job-active .v3-pob-content #v3-meter-card { order: 2; }
  html body.job-active .v3-pob-content .v3-pob-peek { order: 3; }
  /* Issue 1259 fu7: the route flexes into the leftover space with a
     two line floor and scrolls itself; the stage column behind it
     scrolls too, padded by the dock height so content clears the fixed
     dock. The fade only paints while the route overflows (the
     ResizeObserver toggles v3-pob-route-scrolls). */
  html body.job-active .v3-pob-content #v3-pob-pinhold {
    flex: 0 0 auto;
    padding-block: 2px;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-snap-type: y proximity;
  }
  html body.job-active .v3-pob-content #v3-pob-pinhold > * {
    scroll-snap-align: start;
  }
  html body.job-active .v3-pob-content #v3-pob-pinhold.v3-pob-route-scrolls {
    -webkit-mask-image: linear-gradient(to bottom, var(--text) calc(100% - 24px), transparent);
    mask-image: linear-gradient(to bottom, var(--text) calc(100% - 24px), transparent);
  }
  html body.job-active .v3-pob-content .v3-pob-cap { overflow: visible; }
  html body .v3-pob-content.v3-on {
    overscroll-behavior: contain;
    padding-bottom: var(--v3-nav-h);
  }
}

/* Issue 1259 fu10 (Pixel must-fix): only short screens get the shrinking
   route; at 280x844 the long drop-off address must show in full rather
   than scrolling. True 200% (195x422) keeps the shrink and the floor. */
@media (max-width: 299px) and (max-height: 560px) {
  html body.job-active .v3-pob-content #v3-pob-pinhold {
    flex: 0 1 auto;
    min-height: calc(2 * 22.425px * 1.08 + 24px);
    min-height: calc(2lh + 24px);
  }
}

/* v3 gap: minor chip before POB and in the Job sheet (Pixel, 13 Nov 2026) */
html body .v3-job-chips #v3-chip-minor-pre.v3-on,
html body #v3-js-pax #v3-js-minor.v3-on {
  display: inline-flex; flex: none; width: auto; box-sizing: border-box;
  height: 32px; min-height: 0; margin: 0; padding: 0 12px;
  font: 500 14px/1 var(--font-ui); text-transform: none; letter-spacing: normal;
  position: relative; cursor: pointer;
}
html body #v3-js-pax #v3-js-minor { display: none; }
html body #v3-js-pax #v3-js-minor.v3-on { margin-top: var(--s2); align-self: flex-start; }
html body #v3-chip-minor-pre::after,
html body #v3-js-minor::after { content: ""; position: absolute; inset: -8px; }
html body #v3-chip-minor-pre:focus-visible,
html body #v3-js-minor:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

/* v3 #672: hold an address to send its pin */
html body [data-v3-pin] {
  min-height: var(--hit-driving);
  position: relative;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
html body #v3-job-pinhold,
html body #v3-pob-pinhold {
  border-radius: var(--r-control);
}
html body [data-v3-pin] .hold-overlay {
  box-shadow: inset 0 0 0 100vmax var(--surface-3);
  z-index: 0;
  border-radius: inherit;
}
html body [data-v3-pin] > :not(.hold-overlay) {
  position: relative;
  z-index: 1;
}
html body [data-v3-pin][aria-disabled="true"] {
  color: var(--text-3);
}
html body [data-v3-pin][aria-disabled="true"] * {
  color: var(--text-3);
}
@media (prefers-reduced-motion: reduce) {
  html body [data-v3-pin] .hold-overlay {
    transition: none;
  }
}
/* v3 #229: the muted hold-to-send hint under the Route rows. Caption
   size in --text-3, sentence case, wraps instead of clipping. */
html body #v2-job-sheet .v3-js-route-hint {
  display: block;
  margin: var(--s2) var(--s1) 0 0;
  font: 500 var(--t-cap);
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-3);
  white-space: normal;
  overflow-wrap: break-word;
}
html body #v2-job-sheet .v3-js-routecard #pin-pickup:focus-visible,
html body #v2-job-sheet .v3-js-routecard #pin-dropoff:focus-visible {
  position: static;
  flex: 1 1 100%;
  width: auto;
  max-width: 100%;
  height: auto;
  min-width: 0;
  min-height: var(--hit-min);
  padding: 0 var(--s3);
  clip-path: none;
  overflow: visible;
  white-space: normal;
  background: transparent;
  border: 0;
  color: var(--text-2);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* v3 #673: save email switch */
html body #v3-receipt-email-save-row {
  min-height: var(--hit-driving);
}
html body #v3-receipt-email-save-row .v3-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
html body #v3-receipt-email-save-row .v3-switch:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* v3 #668: completion rows honour [hidden] */
html body #driver-completion-modal .v3-complete-row[hidden] { display: none; }

/* ===== Issue 1035: Roof Light control and its opt-in setting ===== */
/* #1035: the Roof Light meter control is only the action buttons (opt-in
   via Settings). The 48px floor comes from --hit-min; buttons stack when
   narrow. */
html body #meter-panel .relay-row { flex: 0 0 auto; padding: 4px; }
html body #meter-panel .relay-left[hidden] { display: none; }
html body #meter-panel .relay-actions { flex: 1 1 auto; min-width: 0; margin-left: 0; flex-wrap: wrap; }
html body #meter-panel .relay-actions .relay-btn { flex: 1 1 140px; min-height: var(--hit-min); }
@media (max-width: 300px) {
  html body #meter-panel .relay-actions .relay-btn {
    flex: 1 1 100%; width: 100%; min-width: 0;
    padding-inline: 8px; font-size: 14px;
  }
}
/* #1035: the Settings switch row in the Menu never takes the narrow grid. */
html body #v3-menu .v3-rows > #v3-roof-light-setting-row { display: flex; }

/* Issue 865: no tap highlight, text selection or long-press callout on v3 controls */
html body button,
html body .v3-btn,
html body .v3-tile,
html body .v3-pill,
html body .v3-iconbtn,
html body .v3-mrow,
html body .v3-card,
html body .v3-jobs-card,
html body .v3-label,
html body .v3-topbar,
html body .v3-dock,
html body .v3-job,
html body .v3-jobs,
html body .v3-jobs-panel,
html body .v3-jobs-list,
html body .v3-jobs-row,
html body .v3-jobs-slot,
html body .v3-jobs-head,
html body .v3-jobs-bar,
html body .v3-jobs-actions,
html body .v3-jobs-tab,
html body .v3-jobs-action,
html body .v3-jobs-back,
html body .v3-jobs-help,
html body .v3-jobs-day,
html body .v3-job-display,
html body .v3-job-sub,
html body .v3-job-cap,
html body .v3-job-content,
html body .v3-job-chip,
html body .v3-job-chips,
html body .v3-job-tiles,
html body .v3-menu,
html body .v3-menu-bar,
html body .v3-menu-head,
html body .v3-menu-initials,
html body .v3-menu-cap,
html body .v3-menu-scroll,
html body .v3-menu-logoff,
html body .v3-stagebar,
html body .v3-stage-label,
html body .v3-strowval,
html body #btn-job-action,
html body #btn-break,
html body [data-hold-protected],
html body [data-v3-pin] {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Issue 865: press-and-hold targets also suppress the native callout */
html body #btn-job-action,
html body [data-hold-protected],
html body .v3-jobs-action,
html body [data-v3-pin],
html body #btn-break {
  -webkit-touch-callout: none;
}

/* Issue 1032: static app shell text is not selectable and no Android
   search/callout box appears; editable fields opt back in below. */
html body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Issue 865: fields keep text selection, copy and paste */
html body input,
html body textarea,
html body select,
html body [contenteditable],
html body [contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

/* ---- Book job sheet (1101 s1, admin only). Full-height v3 sheet,
   segmented v3-switch choice, account paste form and recap cards.
   Flags and the capacity warning borrow the urgent amber treatment;
   everything else stays grey, white and black. ---- */
html body .v3-bookjob-sheet { height: 88vh; }
html body .v3-bookjob-body { padding-bottom: var(--s4); }
 html body .v3-bookjob-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s2) 0 var(--s4);
  max-width: 100%;
}
 html body .v3-bookjob-choice {
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 140px;
  height: 44px;
  padding: 0 var(--s4);
  border-radius: 22px;
  font: 600 var(--t-label);
  line-height: 1.2;
  white-space: normal;
  color: var(--text-2);
}
html body .v3-bookjob-choice::after { display: none; }
html body .v3-bookjob-choice.v3-switch--on { color: var(--on-light); }
html body .v3-bookjob-panel[hidden] { display: none; }
html body .v3-bookjob-coming {
  margin: var(--s2) var(--s1);
  color: var(--text-2);
  font: 400 var(--t-body);
}
html body .v3-bookjob-customer-search { margin-bottom: var(--s3); }
html body .v3-bookjob-customer-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s3);
}
 html body .v3-bookjob-customer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: var(--hit-min);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r6);
  background: var(--surface);
  color: var(--text);
  font: 400 var(--t-body);
  text-align: left;
  white-space: normal;
  cursor: pointer;
  overflow-wrap: anywhere;
}
html body .v3-bookjob-customer.v3-switch--on {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
}
html body .v3-bookjob-customer-name {
  color: var(--text);
  font: 600 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-customer-meta,
html body .v3-bookjob-customer-count {
  color: var(--text-2);
  font: 400 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-customer-selected[hidden] { display: none; }
html body .v3-bookjob-customer-selected-name {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 600 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-change { width: 100%; margin: 0 0 var(--s3); }
html body .v3-bookjob-trips {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
 html body .v3-bookjob-trip {
  display: flex;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--stroke);
  border-radius: var(--r6);
  background: var(--surface);
}
 html body .v3-bookjob-trip-route { flex: 1 1 auto; min-width: 0; }
html body .v3-bookjob-trip-line {
  color: var(--text-2);
  font: 400 var(--t-body);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-trip-count {
  flex: none;
  color: var(--text-3);
  font: 500 var(--t-label);
}
/* ---- Book job customer form (1101 c2): prefilled pickup and drop-off,
   ASAP or scheduled, passengers, fixed price and notes. ---- */
html body .v3-bookjob-form { margin-top: var(--s4); }
html body .v3-bookjob-form[hidden] { display: none; }
html body .v3-bookjob-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--s3);
}
html body .v3-bookjob-contact-name {
  margin: 0;
  color: var(--text);
  font: 600 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-contact-phone {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-field { margin-bottom: var(--s3); }
html body .v3-bookjob-when-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s2) 0 var(--s3);
}
html body .v3-bookjob-when {
  width: auto;
  flex: 1 1 120px;
  height: 44px;
  padding: 0 var(--s4);
  border-radius: 22px;
  font: 600 var(--t-label);
  color: var(--text-2);
}
html body .v3-bookjob-when::after { display: none; }
html body .v3-bookjob-when.v3-switch--on { color: var(--on-light); }
html body .v3-bookjob-when-fields { margin-bottom: var(--s3); }
html body .v3-bookjob-when-fields[hidden] { display: none; }
html body .v3-bookjob-date,
html body .v3-bookjob-time { margin-bottom: var(--s3); }
html body .v3-bookjob-pax { margin-bottom: var(--s3); }
html body .v3-bookjob-price { margin-bottom: var(--s3); }
html body .v3-bookjob-notes {
  height: auto;
  min-height: 88px;
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  resize: vertical;
  font: 400 var(--t-body);
}
html body .v3-bookjob-book { margin-bottom: var(--s2); }
html body .v3-bookjob-account { margin-bottom: var(--s3); }
html body .v3-bookjob-drafts {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: var(--s2) 0 var(--s2);
  padding: 0 8px;
  border: 0;
  cursor: pointer;
  overflow-wrap: anywhere;
}
html body .v3-bookjob-drafts[hidden] { display: none; }
html body .v3-bookjob-menu-badge[hidden] { display: none; }
html body .v3-bookjob-account-error {
  margin: 0 0 var(--s3);
  color: var(--warn);
  font: 500 var(--t-label);
}
html body .v3-bookjob-text {
  height: auto;
  min-height: 132px;
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s3);
  resize: vertical;
  font: 400 var(--t-body);
  line-height: 1.4;
}
html body .v3-bookjob-read { width: 100%; margin: 0 0 var(--s4); }
html body .v3-bookjob-recap { display: flex; flex-direction: column; gap: var(--s3); }
 html body .v3-bookjob-card {
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r6);
  padding: var(--s3) var(--s4);
  container-type: inline-size;
  container-name: bookjob-card;
}
 html body .v3-bookjob-recap-row {
  display: flex;
  gap: var(--s3);
  min-width: 0;
  padding: 5px 0;
  font: 400 var(--t-body);
}
 html body .v3-bookjob-recap-label {
  flex: none;
  width: 92px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-recap-value {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-price-tag {
  display: inline-block;
  margin-left: var(--s2);
  padding: 2px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text-3);
  font: 600 12px/1.4 var(--font-ui);
  white-space: normal;
}
@container bookjob-card (max-width: 260px) {
  html body .v3-bookjob-recap-row {
    flex-direction: column;
    gap: 0;
  }
  html body .v3-bookjob-recap-label { width: auto; }
}
html body .v3-bookjob-flight-status {
  margin-top: var(--s2);
  color: var(--text-3);
  font: 500 var(--t-label);
}
 html body .v3-bookjob-flags {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  gap: var(--s2);
  margin-top: var(--s3);
}
 html body .v3-bookjob-flag {
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font: 600 13px/1.4 var(--font-ui);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-capacity {
  margin: var(--s2) 0 0;
  color: var(--warn);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  max-width: 100%;
  margin-top: var(--s3);
}
 html body .v3-bookjob-actions .v3-btn {
  flex: 1 1 90px;
  min-width: 0;
  width: auto;
  height: auto;
  min-height: var(--hit-min);
  padding: 6px var(--s3);
  font-size: 15px;
  white-space: normal;
}
 html body .v3-bookjob-accept-all {
  display: block;
  width: 100%;
  height: auto;
  min-height: var(--hit-min);
  margin: 0 0 var(--s4);
}
html body .v3-bookjob-accept-all-hint {
  margin: calc(-1 * var(--s3)) 0 var(--s4);
  color: var(--text-2);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-confirm {
  flex: 1 1 100%;
  margin: 0;
  color: var(--text);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-reason {
  margin: var(--s2) 0 0;
  color: var(--text-2);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-amend {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  max-width: 100%;
  min-width: 0;
}
 html body .v3-bookjob-amend-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  min-width: 0;
}
 html body .v3-bookjob-amend-label {
  color: var(--text-3);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-amend-input {
  height: auto;
  min-height: var(--hit-min);
  max-width: 100%;
  min-width: 0;
}
 html body .v3-bookjob-amend-actions { margin-top: var(--s2); }
 html body .v3-bookjob-card-error {
  margin: var(--s2) 0 0;
  color: var(--warn);
  font: 500 var(--t-label);
  overflow-wrap: anywhere;
}
 html body .v3-bookjob-booked {
  margin: 0;
  color: var(--text);
  font: 600 var(--t-label);
  overflow-wrap: anywhere;
}
html body .v3-bookjob-flight-status--warn { color: var(--warn); }
html body .v3-bookjob-error {
  margin: 0;
  color: var(--warn);
  font: 500 var(--t-body);
}
html body .v3-bookjob-empty {
  margin: 0;
  color: var(--text-2);
  font: 400 var(--t-body);
}/* Issue 930: flight line under the town + postcode line (after the
   pinhold, never inside it): leading Lucide plane + "BA 117 · On time
   · now 14:20". Same font size and --text-2 as the town line
   (inherited via v3-body v3-m2), and no status colour at all:
   Delayed looks like the rest of the line.
   One line with ellipsis at 390px, wrapping at 200%. */
html body .v3-job-flight {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
html body .v3-job-flight[hidden] { display: none; }
html body .v3-job-flight .v3-job-flight-ic {
  width: 20px;
  height: 20px;
  color: var(--text-2);
  flex: none;
}
html body .v3-job-flight .v3-job-flight-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html body .v3-job-flight .v3-job-flight-timewrap[hidden] { display: none; }
/* Issue 930: visually hidden "Flight update: ..." text. */
html body .v3-job-flight .v3-job-flight-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Issue 930: a gentle breathing pulse on the whole line, 2.5s x4,
   then it settles back at 1. No pulse under reduced motion. */
html body .v3-job-flight.is-updating {
  animation: v3-flight-pulse 2.5s ease-in-out 4;
}
@media (prefers-reduced-motion: reduce) {
  html body .v3-job-flight.is-updating {
    animation: none;
    opacity: 1;
  }
}
@media (max-width: 300px) {
  html body .v3-job-flight {
    align-items: flex-start;
  }
  html body .v3-job-flight .v3-job-flight-text {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: break-word;
  }
}

/* Issue 933 s1: fold My jobs into Upcoming. Merged rows keep the v3
   card skeleton and add the My jobs customer name plus a status chip;
   only in-window owned Scheduled rows keep the hold actions. Tokens
   only, no bang. At 200% text zoom the chip wraps under the route and
   never clips. */
html body .v3-jobs-name {
  font: 500 var(--t-label);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html body .v3-jobs-card {
  position: relative;
}
html body .v3-jobs-chip {
  position: absolute;
  top: var(--s4);
  right: var(--s4);
  flex: none;
  max-width: calc(100% - (var(--s4) * 2));
  white-space: nowrap;
  align-self: flex-start;
}
html body .v3-jobs-route > :first-child {
  padding-right: 108px;
}
html body .v3-jobs-card:has(.v3-jobs-chip) .v3-jobs-name {
  margin-bottom: var(--s6);
}
html body .v3-jobs-time--tbc {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.06em;
  white-space: normal;
  overflow-wrap: break-word;
}
@media (max-width: 300px) {
  html body .v3-jobs-row { flex-wrap: wrap; }
  html body .v3-jobs-route { flex: 1 1 100%; }
  html body .v3-jobs-chip {
    position: static;
    order: -1;
    flex: 0 0 100%;
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    margin-left: 0;
  }
  html body .v3-jobs-route > :first-child {
    padding-right: 0;
  }
  html body .v3-jobs-card:has(.v3-jobs-chip) .v3-jobs-name {
    margin-bottom: 0;
  }
}

/* ===== Issue 933 s2: unseen available job. White tokens only: an
   8px --text dot with a 2px --canvas ring on the burger glyph's top
   right (inside the 48px target, clear of the outer pending badge at
   its corner), and the Available jobs row carries a 2px --text inset
   ring, the same dot before the chevron and an --overlay wash. No
   pulse, no count, label colour and weight untouched. ===== */
html body .v3-availdot {
  display: block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--canvas);
}
html body .v3-menu-btn--unseen .v3-availdot {
  position: absolute;
  top: calc(50% - 13px);
  right: calc(50% - 13px);
}
html body .v3-mrow--avail {
  position: relative;
  box-shadow: inset 0 0 0 2px var(--text);
  background: var(--overlay);
}
html body .v3-mrow--avail .v3-availdot { align-self: center; }

/* Narrow collapsed menu (see the 223 r7 container query): the row
   is a label/count grid with the chevron at the right. Keep the dot
   on the count line when the count is shown, else on the label line,
   flush to the end of that column and centred on it - never an extra
   implicit grid row under the count. 1x (above the query) keeps the
   flex position just left of the chevron. */
@container (max-width: 260px) {
  html body .v3-mrow--avail > .v3-num,
  html body .v3-mrow--avail .v3-availdot {
    grid-area: count;
    justify-self: end;
    align-self: center;
  }
  html body .v3-mrow--avail > .v3-num { justify-self: start; }
  html body .v3-mrow--avail:has(> .v3-num[style*="display:none"]) .v3-availdot,
  html body .v3-mrow--avail:has(> .v3-num[style*="display: none"]) .v3-availdot {
    grid-area: label;
  }
}

/* Issue 934 s1: quoted jobs show the fixed quote in the meter slot.
   Display only: no dot, chevron or speed/distance. Tokens only, no bang. */
html body .v3-metercard--quoted .v3-metercard-dot,
html body .v3-metercard--quoted .v3-metercard-chev,
html body .v3-metercard--quoted .v3-metercard-trip {
  display: none;
}
html body .v3-metercard--quoted .v3-metercap {
  color: var(--text-2);
}

html body .v3-stash-add {
  margin-left: var(--s2);
  padding: var(--s1) var(--s2);
  border: 1px solid var(--stroke);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--text);
  font: 500 var(--t-label);
  cursor: pointer;
}
html body .v3-stash-add:active { background: var(--overlay); }

/* Issue 1062: Tax Stash monthly menu dot. Decorative only: a light
   --text dot with a --canvas ring on the burger's lower-right and before
   the Tax & expenses chevron. No colour: colour means an urgent alert. */
html body .v3-stashdot {
  display: block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 2px var(--canvas);
}
html body .v3-menu-btn--stash .v3-stashdot {
  position: absolute;
  bottom: calc(50% - 13px);
  right: calc(50% - 13px);
}
html body .v3-mrow--stash .v3-stashdot { align-self: center; }
html body .v3-stashdot-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html body .v3-stash-month { margin-top: var(--s3); }
html body .v3-stash-month-cap {
  margin: 0 0 var(--s1);
  color: var(--text);
  font: 500 var(--t-label);
}
html body .v3-stash-month-line {
  margin: var(--s2) 0 0;
  color: var(--text);
  font: 400 var(--t-label);
  font-variant-numeric: tabular-nums;
}
html body .v3-stash-month-catchup {
  margin: var(--s1) 0 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.45;
}

/* Issue 1062: manual Tax Stash withdrawal. Secondary button on the stash
   card plus warning and display-only recap lines in the reused sheet. */
html body .v3-stash-withdraw {
  display: none;
  width: 100%;
  margin-top: var(--s3);
}
html body .v3-sa-warning {
  margin: 0 0 var(--s3);
  color: var(--text);
  font: 400 var(--t-label);
  line-height: 1.45;
}
html body .v3-sa-recap {
  flex: none;
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--stroke);
}
html body .v3-sa-recap-line {
  margin: var(--s1) 0 0;
  color: var(--text);
  font: 400 var(--t-label);
  font-variant-numeric: tabular-nums;
}
html body .v3-sa-recap-note {
  margin: var(--s1) 0 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.45;
}

/* Issue 1062: drift nudge on the stash card. Grey copy plus the existing
   secondary button; the wrapping block carries the hidden attribute. */
html body .v3-stash-drift { margin-top: var(--s3); }
html body .v3-stash-drift-line {
  margin: 0 0 var(--s2);
  color: var(--text);
  font: 400 var(--t-label);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
html body .v3-stash-drift-btn { width: 100%; }

/* Issue 1062: payments-on-account block on the stash card. Grey copy;
   the shortfall line borrows the alert danger wash and rail. */
html body .v3-stash-poa {
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline);
}
html body .v3-stash-poa-cap {
  margin: 0 0 var(--s2);
  color: var(--text-2);
  font: 500 var(--t-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html body .v3-stash-poa-rows { color: var(--text-2); }
html body .v3-stash-poa-line {
  margin: var(--s2) 0 0;
  color: var(--text-2);
  font: 400 var(--t-label);
  line-height: 1.45;
}
html body .v3-stash-poa-shortfall {
  margin: var(--s2) 0 0;
  padding: var(--s2) var(--s3);
  border-left: 4px solid var(--danger);
  border-radius: var(--r-control);
  background: var(--danger-bg);
  color: var(--danger);
  font: 500 var(--t-label);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
html body .v3-stash-poa-hint {
  margin: var(--s2) 0 0;
  color: var(--text-3);
  font: 400 var(--t-cap);
  line-height: 1.45;
}

/* Issue #230 gap: visible "Meter" title heading the caption row. */
html body #meter-panel #v3-meter-title {
  order: 0;
  flex: 0 0 auto;
  margin-right: 8px;
  color: var(--text-2);
}

/* Issue 230 fu (Pixel): drop the rate dot when the caption wraps at true 200% */
@media (max-width: 275px) {
  html body #meter-panel > .meter-info-row:has(#v3-meter-title) #meter-rate::before { content: none; }
}

/* v3 Issue #1310: the background-warning overlay is a full-screen
   layer. It follows the calling-overlay precedent and sits ONE above
   the fixed #v3-dock (12000) at 12001, so the dock can never cover a
   button. The wash is the opaque canvas token, not translucent black:
   the waiting copy, top bar and dock cannot show through. Content
   scrolls INSIDE the overlay (never the page); top and bottom safe
   padding keeps the first and last glyphs clear, and the auto margins
   keep the copy centred whenever it does fit. The buttons keep a 48px
   target at every width down to true 200%. */
html body #meter-bg-warning {
  z-index: 12001 !important;
  background: var(--canvas) !important;
  justify-content: flex-start !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: max(var(--s5), env(safe-area-inset-top)) var(--edge)
           max(var(--s5), env(safe-area-inset-bottom)) !important;
}
html body #meter-bg-warning > h2 { margin-top: auto !important; }
html body #meter-bg-warning > p:last-child { margin-bottom: auto !important; }
html body #meter-bg-warning #mbw-add,
html body #meter-bg-warning #mbw-dismiss {
  min-height: 48px;
  line-height: 1.2;
}
