/* Atkinson Hyperlegible Next (SIL OFL 1.1, fonts/OFL.txt): made by the Braille Institute for low-vision
   readers; 0/O, 1/l/I and 5/S are drawn to be told apart at a glance. Self-hosted, so the app still
   makes no outside requests and the font works offline. Glyphs it lacks (→ ≤ ⚠) fall back to the system font. */
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/atkinson-next-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/atkinson-next-600.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/atkinson-next-700.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/atkinson-next-800.woff2') format('woff2'); }
/* Atkinson Hyperlegible Mono (SIL OFL 1.1, fonts/OFL-mono.txt): the instrument-readout face for clocks and
   figures — every digit the same width, so a clock or a countdown never shifts as it ticks. */
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/atkinson-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/atkinson-mono-700.woff2') format('woff2'); }
html {
  /* Spacing scale (Item 0): aliases of values already in use; changing one moves every surface that uses it. */
  --s-2: 2px; --s-4: 4px; --s-6: 6px; --s-8: 8px; --s-10: 10px; --s-12: 12px; --s-14: 14px;
  --s-16: 16px; --s-18: 18px; --s-20: 20px;
  /* Radius scale (Item 0): same rule. */
  --r-3: 3px; --r-8: 8px; --r-10: 10px; --r-12: 12px; --r-14: 14px; --r-16: 16px; --r-18: 18px;
  --r-22: 22px; --r-pill: 999px;
}
:root {
  /* Day is the stored default; the boot script in index.html paints the first frame in the theme
     the app is about to choose (patch 16, P1a). Every pair below is verified by web/test/contrast.mjs against
     WCAG AA — change a colour and the suite fails instead of drifting silently. */
  /* The cab look (2026-10-12): a carbon instrument cluster at night. Materials on the frame (machined
     edges, backlit keys, a dial with a printed scale), flat high-contrast type on every number. */
  /* CLOCK 14 NIGHT (Opus UI pass, 2026-11-25): the palette comes from Lorico's logo, not from a
     carbon dashboard. Navy field and panels (the logo's rounded square), bezel light-blue accent (the
     clock ring and the truck), cool white ink (the wordmark), royal blue for the solid key (the clock
     face), and ONE orange — the second hand — reserved for "now". --bg stays #06112e: it is the
     browser-chrome / splash colour pinned by smoke (patch 16) and c3 M14a; the visible ground is
     --ground-hi/--ground-lo below, and the header paints --chrome. */
  --bg: #06112e; --panel: #0b1a3c; --panel2: #11244d; --line: #1f3768; --tick: #34508a;
  --text: #eef5fd; --muted: #a3b6d4; --good: #3ee08f; --warn: #ffbd4a; --bad: #ff6b6b;
  --accent: #5ccbea; --accent-solid: #1857c8; --on-accent: #fff; --chip-ink: #000; --link: #8fdcf4;
  --sb: #b09cff; --hand: #ff7a1f; --chrome: #06112e; --ring: #5ccbea;
  --tint-warn: rgba(255,189,74,.15); --tint-bad: rgba(255,107,107,.15); --tint-accent: rgba(92,203,234,.11);
  /* materials: lit top edge, surface gradient, drop shadow, key faces, the recessed log screen, glow.
     A1 (night-mode research): brighter navy #0d2a64 stays on headers/cards/raised panels (--raised-hi)
     only — full-screen ground uses the base deep-navy token #06112e -> #050e26. */
  --edge-hi: rgba(160,215,255,.08); --surface-hi: #102352; --raised-hi: #0d2a64; --drop: rgba(0,4,20,.55);
  --key-hi: #142a58; --key-lo: #0c1c41; --key-base: #020818; --screen: #06122f;
  --glow: rgba(92,203,234,.5); --dial-track: #142a57;
  --ground: radial-gradient(120% 55% at 50% 0%, #06112e 0%, #06112e 55%, #050e26 100%);
  color-scheme: dark;
}
/* Day theme: for reading in sunlight. Chosen by the driver, or by the phone's light setting
   until he chooses. */
:root[data-theme="day"] {
  /* CLOCK 14 DAY: the logo in sunlight — cool blue-white paper, navy ink (the logo field becomes the
     type colour), royal blue for the accent. --bg stays #e4e9ee (pinned, see night note). */
  --bg: #e4e9ee; --panel: #f8fbff; --panel2: #e3ebf6; --line: #bfcde0; --tick: #8fa3c2;
  --text: #071331; --muted: #3c4d6e; --good: #0f7a40; --warn: #8a5200; --bad: #b32020;
  --accent: #0b56c0; --accent-solid: #0b56c0; --on-accent: #fff; --chip-ink: #fff; --link: #0a479f;
  --sb: #5b3fc4; --hand: #d4570a; --chrome: #eef3fa; --ring: #0b56c0;
  --tint-warn: rgba(138,82,0,.16); --tint-bad: rgba(179,32,32,.12); --tint-accent: rgba(11,86,192,.09);
  --edge-hi: rgba(255,255,255,.9); --surface-hi: #ffffff; --raised-hi: #ffffff; --drop: rgba(10,30,70,.14);
  --key-hi: #ffffff; --key-lo: #e7eef8; --key-base: #aebbd0; --screen: #f1f5fb;
  --glow: rgba(11,86,192,0); --dial-track: #d9e2ef;
  --ground: linear-gradient(180deg, #edf2f9 0%, #dbe4f0 100%);
  color-scheme: light;
}
/* Wind-down theme (A3): manual-only warm, dimmer night appearance for end of shift — amber-warm
   tint, strictly lower luminance than night, zero pure #000/#FFF surfaces, WCAG AA/AAA verified. */
:root[data-theme="winddown"] {
  --bg: #0e0a07; --panel: #16100b; --panel2: #221810; --line: #3a2a1d; --tick: #5e4632;
  --text: #e4ceb4; --muted: #b39b80; --good: #66c78c; --warn: #efb44d; --bad: #ee7b6e;
  --accent: #e59f52; --accent-solid: #8f4e14; --on-accent: #f5eadc; --chip-ink: #120c07; --link: #f2be7e;
  --sb: #baa3ea; --hand: #f27c2c; --chrome: #0e0a07; --ring: #e59f52;
  --tint-warn: rgba(239,180,77,.14); --tint-bad: rgba(238,123,110,.15); --tint-accent: rgba(229,159,82,.12);
  --edge-hi: rgba(240,196,145,.08); --surface-hi: #1c140d; --raised-hi: #231910; --drop: rgba(8,5,3,.58);
  --key-hi: #241a11; --key-lo: #17110b; --key-base: #090604; --screen: #0b0805;
  --glow: rgba(229,159,82,.32); --dial-track: #281d14;
  --ground: radial-gradient(120% 55% at 50% 0%, #0e0a07 0%, #0c0906 55%, #0a0705 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 "Atkinson Hyperlegible Next", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
/* Patch 19 (phone layout stability, field report 2026-11-10): the SHELL is the one scroller.
   The page itself used to scroll (.app was min-height: 100dvh and grew with its content), and
   a phone browser hides and shows its own chrome on a page scroll — which resizes the visible
   viewport, so the sticky header and the fixed dock / tab bar rode up and down with it. Now
   the document never scrolls: html and body are pinned to the viewport and .app is exactly one
   viewport tall — 100dvh, the height actually visible, with 100vh as the fallback for a
   runtime without dynamic units — and scrolls its own content. With no page scroll the
   browser chrome stays where it is, so that height does not change under the driver's thumb,
   and the header (sticky inside the shell), the dock (sticky inside main) and the tab bar
   (fixed) keep the slots they always had. Sideways the shell is closed: nothing can pan it. */
html, body { height: 100%; overflow: hidden; }
.app { height: 100vh; height: 100dvh; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; background: var(--ground); }
.mono, .meter-value, .why-time, .entry-len, .daytotals b, .tstep-value, .drive-clock, .clock { font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
main { flex: 1; padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-12); }
/* The panel strip (2026-11-18, The Daily Number's mechanism copied at Lorico's word): the
   four panels sit side by side in <main class="pages"> and the strip itself scroll-snaps
   sideways; each page is its own vertical scroller and keeps its scroll position. This
   replaces the touch-classifying swipe pager — on the Plan panel, four full-width
   buttons, nearly every real touch started inside a control the old guard yielded to,
   so a swipe paged exactly once and never again. Native scrolling needs no guard:
   a drag scrolls, a tap lands, and the browser decides which it was. Each page carries
   the padding and column layout <main> used to give the one panel it held. */
main.pages { position: relative; z-index: 0; flex-direction: row; padding: 0; gap: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: none; }
main.pages::-webkit-scrollbar { display: none; }
/* Feel round 2 (2026-11-19): a page's overscroll is closed VERTICALLY only. It used to be
   `overscroll-behavior: none` on both axes (as The Daily Number writes it), and every page is
   itself a scroll container (overflow-y auto): a horizontal swipe that starts on panel
   content latches the page first, the page cannot scroll sideways, and overscroll-behavior-x
   none then forbids handing the gesture up to the strip — so content swipes never paged
   (reproduced with real touch drags in Chrome: test/dom/diag-swipe-touch.mjs). With x left
   at auto the sideways scroll chains to the strip; the strip's own overscroll-behavior: none
   still stops it there, so nothing past the strip (shell, document, the browser's back
   gesture) ever sees it. Vertical stays none: no pull-to-refresh, no chaining to the shell. */
.page { position: relative; flex: 0 0 100%; width: 100%; min-width: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-x: auto; overscroll-behavior-y: none; scroll-snap-align: start; scroll-snap-stop: always; scrollbar-width: none; padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-12); scroll-padding-top: 12px; }
.page::-webkit-scrollbar { display: none; }
/* D1 (audit): the page is a fixed-height column flexbox and every child is content to scroll,
   never to squeeze. A flex item with overflow:hidden (the demo hero, for its DEMO watermark)
   gets min-height:0 and was crushed to a 30px sliver on the first-run screen. */
.page > * { flex-shrink: 0; }
.page.has-dock { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
/* The dock's sticky offset, inside a page: the base .dock rule's bottom offset was
   measured against the old shell scroller, whose scrollport ran the full viewport
   behind the tab bar. A page's scrollport ends at the shell's bottom too, but the
   page's own has-dock padding (exactly the tab bar's height) already holds the dock's
   stuck place that far above the page's end — with the old offset kept, the two
   clearances stack and the dock floats one tab-bar height too high (measured:
   bottom 793 against the bar's 854 at 412x915). Offset 0 inside a page: the padding
   does the whole job, and the dock's stuck place and its end-of-page place coincide,
   as the has-dock note below the base rule requires. */
.page .dock { bottom: 0; }
/* Inside a page the header is a sibling, not an overlay: the Split Lab's pinned strip
   sticks to the page's own top, not a header's height below it. */
.page .split-now-after { top: 0; }
/* The timeline track is tap-to-place: a horizontal drag that starts on it must not page
   the strip (the old pager's data-noswipe guard did this job). Vertical scrolls that
   start on the track still scroll the page. */
.taxis-track { touch-action: pan-y; }
h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h3 { margin: 12px 0 6px; font-size: 14px; color: var(--muted); }
p { margin: 8px 0; }
.small { font-size: 13px; } .muted { color: var(--muted); } .ok { color: var(--good); }

/* Opaque: a see-through bottom edge drew the header's text over the content scrolling under it. */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 var(--edge-hi); padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s-8); }
/* The status capsule: an LED in the status colour (--led, set inline) on a dark key face. Colour is never
   the only cue: the status is spelled out beside it. */
.pill { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 var(--s-16) 0 var(--s-14); border-radius: var(--r-pill); font-weight: 800; font-size: 15px; letter-spacing: .02em; color: var(--text); background: linear-gradient(180deg, var(--key-hi), var(--key-lo)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 2px var(--drop); }
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--led, var(--muted)); box-shadow: 0 0 10px 1px var(--led, transparent); flex: none; }
:root[data-theme="day"] .pill::before { box-shadow: 0 0 4px var(--led, transparent); }
.clocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-8); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-12); padding: var(--s-10) var(--s-12); }
.stat-label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat.good .stat-value { color: var(--good); } .stat.warn .stat-value { color: var(--warn); } .stat.bad .stat-value { color: var(--bad); }

.card { background: linear-gradient(180deg, var(--surface-hi), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-18); padding: var(--s-14); box-shadow: inset 0 1px 0 var(--edge-hi), 0 8px 20px var(--drop); }
.card.good { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.card.warn { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.card.bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.card .clocks { margin-top: 8px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: 1fr 1fr 1fr; background: linear-gradient(180deg, var(--panel), var(--bg)); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { position: relative; background: none; border: 0; border-radius: 0; padding: 8px 4px 10px; min-height: 60px; color: var(--muted); font-weight: 700; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; box-shadow: none; }
.tabs button.on { color: var(--text); font-weight: 800; }
.tabs button.on::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; border-radius: 0 0 var(--r-3) var(--r-3); background: var(--accent); box-shadow: 0 0 10px var(--glow); }

/* Big-touch floor (patch #6, Lorico's ELD-phone report): 48px is the smallest target in the app —
   Google's minimum, above Apple's 44 — and primary controls, steppers and number fields sit at 56.
   Drivers' fingers are bigger and the phones are smaller; the hit area grows, the glyphs stay calm. */
button { background: linear-gradient(180deg, var(--key-hi), var(--key-lo)); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-weight: 600; min-height: 48px; box-shadow: inset 0 1px 0 var(--edge-hi); transition: transform 120ms ease-out, filter 120ms ease-out; }
button:disabled { opacity: .4; }
button.primary { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 0 var(--key-base), 0 0 16px var(--glow); }
button.danger { background: transparent; border-color: var(--bad); color: var(--bad); margin-top: 8px; }
button.x { background: transparent; border: 0; color: var(--muted); font-size: 20px; padding: 0 var(--s-6); }
.row { display: flex; gap: var(--s-8); margin-top: 10px; flex-wrap: wrap; } .row > * { flex: 1; }
label { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
label input, label select { display: block; width: 100%; margin-top: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); min-height: 48px; }
label.check { display: flex; align-items: center; gap: 12px; color: var(--text); min-height: 48px; font-size: 15px; } label.check input { width: 22px; height: 22px; margin: 0; flex: none; }
.filebtn { position: relative; text-align: center; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-10); padding: var(--s-12) var(--s-14); font-weight: 600; color: var(--text); margin: 0; min-height: 48px; }
.filebtn input { position: absolute; inset: 0; opacity: 0; }

.status-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
/* Selection is a ring, not opacity: dimming the whole chip dropped these to 2.23:1 (consumer-review). */
/* Backlit switch keys: a dark key face, an LED strip in the status colour (--led, set inline). The lit key
   is the current status: its strip glows, its edge takes the colour and it carries a check mark, so the
   selection never rests on colour alone. */
.status-buttons button, .big-status button { position: relative; color: var(--text); background: linear-gradient(180deg, var(--key-hi), var(--key-lo)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--edge-hi), 0 3px 0 var(--key-base), 0 6px 12px var(--drop); font-weight: 800; }
.status-buttons button::before, .big-status button::before { content: ""; position: absolute; left: 24%; right: 24%; top: 8px; height: 4px; border-radius: 2px; background: var(--led, var(--muted)); opacity: .38; }
.status-buttons button.on, .big-status button.on { border: 2px solid var(--led, var(--text)); outline: none; box-shadow: inset 0 1px 0 var(--edge-hi), 0 3px 0 var(--key-base), 0 0 18px color-mix(in srgb, var(--led, transparent) 35%, transparent); }
.status-buttons button.on::before, .big-status button.on::before { opacity: 1; box-shadow: 0 0 10px 1px var(--led, transparent); }
.status-buttons button { padding: var(--s-14) var(--s-4) var(--s-6); min-height: 66px; font-size: 15px; border-radius: var(--r-14); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); }

.toggle { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-10); padding: 3px; margin-top: 8px; }
.toggle button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px 6px; font-size: 14px; min-height: 48px; }
.toggle button.on { background: var(--panel2); color: var(--text); }
/* Day theme (quick patch, field report 2026-11-11): panel2 on the track measured 1.03:1 in day mode —
   the chosen side of every toggle was invisible in sunlight. In day the chosen key is the lit white
   key face with a lifted edge and a tick-grey ring; the night key above is untouched. */
:root[data-theme="day"] .toggle button.on { background: var(--surface-hi); box-shadow: 0 1px 3px var(--drop), inset 0 0 0 1px var(--tick); font-weight: 700; }

.slider { margin-top: 12px; }
.slider-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--text); }
.slider-head b { font-variant-numeric: tabular-nums; }
.slider input[type=range] { width: 100%; accent-color: var(--accent); height: 48px; }
/* Slider + steppers + exact numeric entry, so a phone user never has to drag to a precise value. */
.slider-row { display: grid; grid-template-columns: 1fr auto 5.5em auto; gap: var(--s-8); align-items: center; margin-top: 8px; }
.slider-row input[type=range] { margin: 0; }
/* A4 (audit): a minutes slider has no raw-minutes box; its exact entry is the h + m row below it. */
.slider-row.nobox { grid-template-columns: 1fr auto auto; }
.slider-exact { padding-top: 4px; }
.dur-boxes input.num { width: 72px; }
.slider-row .mini { padding: 8px 12px; min-height: 56px; }
input.num { width: 100%; text-align: right; padding: 8px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; min-height: 56px; }

.grid { width: 100%; height: auto; display: block; background: var(--screen); border-radius: var(--r-10); box-shadow: inset 0 2px 8px var(--drop); }
.grid-label { fill: var(--muted); font-size: 14px; font-weight: 700; }
.grid-line { stroke: var(--line); stroke-width: 1; }
.grid-tick { stroke: var(--line); stroke-width: .5; } .grid-tick.major { stroke: var(--tick); stroke-width: 1; }

.seglist, .viol, .forecast, .checks, .itin { list-style: none; margin: 0; padding: 0; }
.seglist li, .itin li { display: grid; grid-template-columns: 12px 1fr auto auto auto; gap: var(--s-8); align-items: center; padding: var(--s-8) 0; border-top: 1px solid var(--line); font-size: 14px; }
.seglist li.editing { grid-template-columns: 1fr; }
.segedit { display: flex; flex-direction: column; gap: var(--s-10); width: 100%; }
.row.undo { align-items: center; }
.row.undo > * { flex: 0 0 auto; }
.row.undo span { flex: 1 1 auto; }
/* D2/D3 (audit): the status tap's undo chip, now the dock's top row (and the driving view's). */
.status-undo { margin: 0 0 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-weight: 700; flex-wrap: nowrap; }
.status-undo button.mini { min-height: 44px; min-width: 72px; }
.drive-undo { margin: 0; color: var(--text); }
/* D19 (audit): "End my day" asks Off Duty or Sleeper before it closes. */
.endday-ask { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.endday-ask .endday-q { margin: 0; }
.endday-ask .row { margin-top: 4px; }
.endday-ask .row > button { min-height: 56px; font-size: 18px; }
.endday-ask > button.link { align-self: center; min-height: 44px; }
.itin li { grid-template-columns: 12px 1fr auto; }
.itin { counter-reset: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
/* D11 (audit): rows the ELD quick start built — a hollow, dotted dot and a small tag. */
.dot.eld-dot { background: transparent !important; border: 2px dotted currentColor; box-sizing: border-box; }
.eld-tag { display: inline-block; margin-top: 2px; padding: 1px 8px; border: 1px dashed var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
/* SVG presentation attributes cannot hold var(), so the grid gets status classes instead of a stroke. */
.s-OFF { stroke: var(--muted); } .s-SB { stroke: var(--sb); } .s-D { stroke: var(--good); } .s-ON { stroke: var(--warn); }
/* at night the log lines glow faintly, like an ELD screen; never in daylight */
:root:not([data-theme="day"]) .s-D { filter: drop-shadow(0 0 3px rgba(62,224,143,.55)); }
:root:not([data-theme="day"]) .s-ON { filter: drop-shadow(0 0 3px rgba(255,181,71,.5)); }
.top-right { display: flex; align-items: center; gap: var(--s-8); }
.theme-btn { padding: 6px 12px; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; }
.gear-btn { padding: 6px; min-width: 48px; justify-content: center; }
.gear-btn.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.viol li { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); margin-top: 6px; background: var(--tint-bad); border-left: 3px solid var(--bad); font-size: 14px; }
.viol li.nominal { background: var(--tint-warn); border-left-color: var(--warn); }
.checks li { padding: var(--s-6) 0; font-size: 15px; } .checks li > svg { vertical-align: -3px; margin-right: var(--s-6); color: var(--bad); stroke-width: 2.5; } .checks li.ok > svg { color: var(--good); }
.forecast li { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s-6); padding: var(--s-8) 0; border-top: 1px solid var(--line); font-size: 14px; }
.warnbox { background: var(--tint-warn); border-left: 4px solid var(--warn); padding: 8px 10px; border-radius: 10px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: var(--s-8) var(--s-6); border-top: 1px solid var(--line); text-align: left; } th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border: 0; }
tr.today td { background: var(--tint-accent); }
input.hrs { width: 70px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--text); min-height: 56px; }
.cutoffs td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

button.ghost { background: transparent; border-style: dashed; color: var(--muted); width: 100%; }
button.on-outline { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
button.mini { padding: var(--s-8) var(--s-12); font-size: 14px; border-radius: var(--r-10); }
.dayedit { display: flex; gap: var(--s-6); align-items: flex-end; flex-wrap: wrap; }
.dayedit label { margin: 0; font-size: 13px; } .dayedit input.hrs { width: 58px; margin-top: 2px; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-8); margin-bottom: 10px; }
.plancard { text-align: left; padding: var(--s-10) var(--s-12); border-radius: var(--r-12); background: var(--bg); border: 1px solid var(--line); }
.plancard.on { border-color: var(--accent); background: var(--tint-accent); }
.plancard.bad .stat-value { color: var(--bad); }
.plancard .stat-value { font-size: 20px; }

/* Startup disclaimer. A driver who believes a planning scratchpad is their legal log is the exact
   failure this product must not have, so the notice is unavoidable rather than buried in a tab. */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: var(--s-16); }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-16); padding: var(--s-18); max-width: 460px; max-height: 85dvh; overflow: auto; }
.modal h2 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 18px; margin-bottom: 6px; }
.modal button { width: 100%; margin-top: 10px; }
/* Driving alert banner (alerts.ts): the warnbox and violation-row colors, which the contrast test covers, made larger. */
.alertbox { padding: var(--s-10) var(--s-12); border-radius: var(--r-10); font-size: 16px; margin: 6px 0; background: var(--tint-warn); border-left: 4px solid var(--warn); }
.alertbox.bad { background: var(--tint-bad); border-left-color: var(--bad); }

/* ---------------------------------------------------------------- redesign, 2026-10-10 */
.compact { margin-top: 6px; font-size: 15px; }
.screen-title { margin: 4px 2px 0; font-size: 24px; }
button.link { background: transparent; border: 0; padding: 0 var(--s-4); color: var(--link); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: var(--s-6); }
.icon-btn { width: 48px; height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--muted); }
button.wide { width: 100%; min-height: 56px; font-size: 18px; font-weight: 800; border-radius: 16px; }
button.back { align-self: flex-start; background: transparent; border: 0; padding: 0 var(--s-8) 0 0; color: var(--link); font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: var(--s-2); }

/* The main card on Now: one number, big enough to read at arm's length in a mount. */
.hero { position: relative; background: radial-gradient(90% 80% at 50% 38%, var(--surface-hi) 0%, var(--panel) 70%); border: 1px solid var(--line); border-radius: 26px; padding: var(--s-16) var(--s-18) var(--s-12); box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--line), 0 16px 32px var(--drop); }
.hero.warn { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.hero.bad { border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); }
.hero-label { font-size: 16px; font-weight: 600; color: var(--muted); }
.hero-value { font-size: 64px; line-height: 1.05; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; margin-top: 4px; }
.hero-value.good { color: var(--good); } .hero-value.warn { color: var(--warn); }
.hero-stop { font-size: 22px; font-weight: 800; margin-top: 6px; }
.hero-lead { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--bad); }
.hero-text { font-size: 15px; margin: 8px 0 0; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); min-height: 48px; margin-top: 4px; font-size: 15px; }
.hero-actions { display: inline-flex; align-items: center; gap: var(--s-4); }
/* "limited by …" reads as a recessed plate under the dial */
.limit-plate { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-12); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); box-shadow: inset 0 2px 4px var(--drop); color: var(--text); font-weight: 700; font-size: 14px; }

.meters { display: flex; flex-direction: column; gap: var(--s-10); padding: var(--s-2) var(--s-4); }
.meters { background: linear-gradient(180deg, var(--surface-hi), var(--panel)); border: 1px solid var(--line); border-radius: var(--r-18); padding: var(--s-10) var(--s-14); box-shadow: inset 0 1px 0 var(--edge-hi); }
.meter { display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: var(--s-10); font-size: 15px; }
.meter-label { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
/* a segmented gauge: the gaps are drawn over the fill, so it reads as LED segments */
.meter-bar { position: relative; height: 10px; border-radius: var(--r-3); background: var(--panel2); overflow: hidden; box-shadow: inset 0 1px 3px var(--drop); }
.meter-bar span { display: block; height: 10px; background: var(--muted); }
.meter-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 10px, var(--panel) 10px 12px); }
.meter.on .meter-label { color: var(--text); }
.meter.on .meter-bar span { background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.meter-value { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }

button.rowbtn { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; text-align: left; background: var(--panel); border-radius: var(--r-16); font-size: 15px; }

/* The status buttons stay at the bottom of Now, within thumb reach, whatever the page scroll. */
/* The dock must rest in ONE place. It is sticky inside <main>, so at the end of the page it sits at its own
   spot in the page, which <main>'s bottom padding put 23px higher than its sticky spot: scrolling up from
   the end dropped it 23px onto the tab bar, the opener flush against it (Lorico, 2026-10-10). On Now, main's
   bottom padding is therefore exactly the sticky offset, and the dock carries its own 12px gap. */
.dock { position: sticky; bottom: calc(61px + env(safe-area-inset-bottom)); z-index: 4; background: var(--bg); margin: 0 -12px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
main.has-dock { padding-bottom: calc(61px + env(safe-area-inset-bottom)); }
/* Must look tappable: this element also carries `link`, which zeroes the border and background, so this
   rule has to re-state them explicitly (same specificity, so only the properties it sets win). A driver
   could not tell it was a button (Lorico, 2026-10-10, on the live preview).
   Height stays 44px (border-box, so the border is inside) — making it taller only crowded the dock.
   margin-top clears the active status button's ring: outline-offset 2px + 3px outline reaches 5px past
   its box, and the dock has no bottom padding, so a smaller gap draws that ring across this border. */
button.dock-more { width: 100%; justify-content: center; min-height: 44px; color: var(--text); font-weight: 700; font-size: 15px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-top: 10px; }

.plan-item { width: 100%; min-height: 84px; display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: var(--s-12); text-align: left; background: var(--panel); border-radius: var(--r-18); padding: var(--s-12) var(--s-14); }
.plan-icon { width: 52px; height: 52px; border-radius: var(--r-14); background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.plan-text { display: flex; flex-direction: column; gap: var(--s-2); font-size: 17px; }

/* Split Lab (patch #14): the now-vs-after answer rides at the top of the screen while the
   driver drags the break sliders, so the consequence never scrolls away from the control.
   The offset clears the sticky app header on a planning screen (status row, compact drive
   line and disclaimer, plus the header's own padding); the strip's own colours are the
   card's — existing tokens only, no new palette. */
.split-now-after { position: sticky; top: var(--top-h, calc(114px + env(safe-area-inset-top))); z-index: 3; background: linear-gradient(180deg, var(--surface-hi), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: inset 0 1px 0 var(--edge-hi), 0 8px 20px var(--drop); font-size: 15px; font-weight: 600; }
.split-now-after b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Slide-up panels (Sheet in app.tsx). */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
button.sheet-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(0,0,0,.55); padding: 0; min-height: 0; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow: auto; background: linear-gradient(180deg, var(--surface-hi), var(--panel) 30%); border-top: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--edge-hi), 0 -20px 40px var(--drop); border-radius: 24px 24px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-12); max-width: 640px; margin: 0 auto; }
.sheet-handle { width: 44px; height: 5px; border-radius: var(--r-3); background: var(--line); align-self: center; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); }
.sheet-head h2 { margin: 0; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 21px; }
.sheet h3 { margin: 4px 0 0; color: var(--text); font-size: 16px; }
.sheet-lead { margin: 0; font-size: 16px; }
.big-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-10); }
.big-status button { min-height: 96px; border-radius: var(--r-18); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: var(--s-20) var(--s-16) var(--s-14); font-size: 19px; }
.big-status button::before { left: 16px; right: auto; width: 56px; }
.why { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.why li { border: 1px solid var(--line); border-radius: var(--r-14); padding: var(--s-10) var(--s-12); background: var(--panel2); box-shadow: inset 0 1px 0 var(--edge-hi); }
.why li.on { border: 2px solid var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--glow) 40%, transparent); }
.why-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); font-size: 16px; }
.why-time { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.why-time small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.why-tag { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--on-accent); background: var(--accent-solid); border-radius: var(--r-8); padding: 3px var(--s-10); letter-spacing: .04em; }
.why-cite { font-size: 12px; color: var(--muted); margin-top: 3px; letter-spacing: .03em; }

/* Driving view: a glance, not a read. Night keeps the dark ground and frames the screen instead of
   flooding the cab with light; day floods amber at an hour left and red at zero. */
main.drive { min-height: 100dvh; padding: calc(10px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 0; }
main.drive.warn { box-shadow: inset 0 0 0 8px var(--warn); }
main.drive.bad { position: relative; }
:root[data-theme="day"] main.drive.warn { background: var(--warn); color: var(--chip-ink); box-shadow: none; }
:root[data-theme="day"] main.drive.bad { background: var(--bad); color: var(--chip-ink); box-shadow: none; }
.drive-clock { font-size: 17px; font-weight: 600; }
button.drive-details { background: transparent; color: inherit; border: 2px solid currentColor; border-radius: var(--r-12); font-weight: 800; }
.drive-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 var(--s-8); }
.drive-label { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.drive-num { font-size: clamp(44px, 15vw, 60px); line-height: 1; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--text); }
.drive-num.short { font-size: clamp(64px, 22vw, 88px); }
main.drive.warn .drive-num { color: var(--warn); text-shadow: none; } main.drive.bad .drive-num { color: var(--bad); text-shadow: none; }
main.drive.calm { background: radial-gradient(85% 45% at 50% 36%, var(--surface-hi) 0%, var(--bg) 70%); }
:root[data-theme="day"] main.drive.warn .drive-num, :root[data-theme="day"] main.drive.bad .drive-num { color: var(--chip-ink); }
.drive-head { font-size: 28px; font-weight: 800; line-height: 1.15; margin-top: 8px; text-align: center; }
.drive-why { font-size: 18px; margin-top: 8px; text-align: center; }
.drive-foot { display: flex; flex-direction: column; gap: var(--s-10); }
.drive-note { text-align: center; font-size: 14px; }
button.drive-stop { min-height: 88px; border-radius: var(--r-22); font-size: 24px; font-weight: 800; color: var(--text); box-shadow: inset 0 1px 0 var(--edge-hi), 0 4px 0 var(--key-base), 0 10px 22px var(--drop); }
:root[data-theme="day"] main.drive.warn button.drive-stop, :root[data-theme="day"] main.drive.bad button.drive-stop { background: var(--chip-ink); color: var(--text); box-shadow: none; }

/* Log, one day at a time (redesign 3/5). Rows are whole-width buttons: no small Edit and × targets. */
.daynav { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; }
.daynav-title { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 18px; }
.daytotals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin-top: 10px; padding-top: var(--s-8); border-top: 1px solid var(--line); text-align: center; }
.daytotals div { display: flex; flex-direction: column; } .daytotals b { font-variant-numeric: tabular-nums; }
button.entry, .entry { width: 100%; min-height: 60px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 18px; align-items: center; gap: var(--s-10); text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: var(--s-8) var(--s-2); font-size: 16px; }
.entry > span:nth-child(2) { display: flex; flex-direction: column; }
.entry.live { grid-template-columns: 12px minmax(0, 1fr) auto 18px; }
.entry-len { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
/* P2 (audit): an unlogged hole in the day, said where it is — muted, dashed, not a button. */
.gap-row { width: 100%; min-height: 60px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 18px; align-items: center; gap: var(--s-10); border-top: 1px dashed var(--line); padding: var(--s-8) var(--s-2); font-size: 16px; color: var(--muted); }
.gap-row > span:nth-child(2) { display: flex; flex-direction: column; }
.gap-row b { color: var(--muted); }
.dot.gap-dot { background: transparent; border: 2px dashed var(--muted); box-sizing: border-box; }
button.addbtn { width: 100%; min-height: 56px; border: 2px dashed var(--tick); background: transparent; border-radius: var(--r-16); font-size: 17px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8); }
.toggle.big button { min-height: 52px; font-size: 15px; font-weight: 700; }
.tstep-label { font-size: 15px; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.tstep-row { display: grid; grid-template-columns: 52px 52px 1fr 52px 52px; gap: var(--s-6); align-items: center; }
.tstep-row button { min-height: 56px; padding: 0; font-size: 16px; font-weight: 800; }
.tstep-value { min-height: 52px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: var(--r-12); font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
input.tstep-pick { margin-top: 6px; width: 100%; min-height: 44px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-10); color: var(--muted); font-size: 14px; padding: 0 var(--s-10); }
.lenrow { display: flex; justify-content: space-between; background: var(--bg); border-radius: var(--r-12); padding: var(--s-12) var(--s-14); font-size: 16px; }
button.danger.wide { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8); margin-top: 0; }

/* Can I take this load? */
.flow-head { display: flex; flex-direction: column; gap: var(--s-12); }
.flow-dots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-6); }
.flow-dots span { height: 5px; border-radius: var(--r-3); background: var(--panel2); } .flow-dots span.on { background: var(--accent); }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-8); }
.steps4 button { min-height: 60px; font-size: 19px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.chips button { min-height: 56px; border-radius: 999px; padding: 0 18px; font-size: 17px; font-weight: 800; background: var(--panel); }
.chips button.on { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
button.flow-next { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8); }
.flow-body .trip-field:last-child { padding-bottom: 0; }
.flow-body .trip-field > :is(p, h3, label) { margin: 0; }
.load-distance { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-8); }
.load-distance > * { margin: 0; }
.load-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.verdict-big .sign { margin: 0; max-width: 100%; white-space: normal; line-height: 1.25; }
.verdict-sub { font-size: 14px; }
.verdict-big + .verdict-sub, .load-verdict > .muted + .verdict-sub { font-size: 18px; font-weight: 800; line-height: 1.3; }
.answers { list-style: none; margin: 0; padding: 0; }
.answers li { display: grid; grid-template: "label change" auto "value change" auto / minmax(0, 1fr) auto; column-gap: var(--s-8); padding: var(--s-6) 0; border-top: 1px solid var(--line); font-size: 14px; }
.answers li:first-child { border-top: 0; padding-top: 0; }
.answers li:last-child { padding-bottom: 0; }
.answers li > span { grid-area: label; align-self: end; color: var(--muted); font-size: 13px; }
.answers li > b { grid-area: value; }
.answers li > button { grid-area: change; }


/* ---------------------------------------------------------------- the cab look, 2026-10-12 */
/* The dial (Dial in app.tsx): a fuel-gauge arc of what is left of the limit that binds, a printed scale
   outside the arc, the number in the middle. SVG presentation attributes cannot hold var(), so colour
   comes from these classes. */
.dial { position: relative; width: 100%; aspect-ratio: 1 / 0.9; margin: 0 auto; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-track { fill: none; stroke: var(--dial-track); stroke-linecap: round; }
.dial-ticks line { stroke: var(--tick); stroke-linecap: round; }
.dial-fill { fill: none; stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 3px var(--glow)); }
.dial-cap { fill: #f4fbff; filter: drop-shadow(0 0 6px var(--glow)); }
:root[data-theme="day"] .dial-cap { fill: #fff; stroke: var(--accent); stroke-width: 3px; }
.dial.warn .dial-fill { stroke: var(--warn); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--warn) 60%, transparent)); }
.dial.bad .dial-fill { stroke: var(--bad); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--bad) 60%, transparent)); }
:root[data-theme="day"] .dial-fill { filter: none; }
.dial-scale { fill: var(--muted); font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 12px; }
.dial-center { container-type: inline-size; position: absolute; left: 50%; top: 55.5%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-align: center; width: 76%; }
.hero .dial { max-width: 300px; }
.hero .hero-label { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero .hero-value { font-size: 42px; font-size: clamp(42px, 23cqi, 56px); letter-spacing: 0; white-space: nowrap; }
.hero .hero-value.good { color: var(--text); }
.hero .hero-stop { margin-top: 4px; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; }
.hero-stop-date { font-size: 15px; font-weight: 700; letter-spacing: .05em; }
.hero-stop-time { font-size: 28px; font-weight: 800; letter-spacing: .02em; }
.drive-body .dial { max-width: 320px; }
/* In daylight the driving view floods amber/red: the dial draws in the ink colour on top of it. */
:root[data-theme="day"] main.drive.warn .dial-fill, :root[data-theme="day"] main.drive.bad .dial-fill { stroke: var(--chip-ink); }
:root[data-theme="day"] main.drive.warn .dial-track, :root[data-theme="day"] main.drive.bad .dial-track { stroke: rgba(255,255,255,.28); }
:root[data-theme="day"] main.drive.warn .dial-ticks line, :root[data-theme="day"] main.drive.bad .dial-ticks line,
:root[data-theme="day"] main.drive.warn .dial-scale, :root[data-theme="day"] main.drive.bad .dial-scale { stroke: rgba(255,255,255,.6); fill: var(--chip-ink); }
:root[data-theme="day"] main.drive.warn .drive-label, :root[data-theme="day"] main.drive.bad .drive-label { color: var(--chip-ink); }
/* See-through controls (links, icon buttons, list rows, toggles) carry no key face: the base button's lit edge
   drew a ghost box behind "Why?". */
button.link, .icon-btn, button.back, button.x, button.ghost, button.entry, button.sheet-backdrop, .toggle button, button.drive-details, button.rowbtn.flat { box-shadow: none; }
.toggle button:not(.on) { background: transparent; }
.meter-value { font-size: 14px; }
.pill, .drive-clock, .top-right .clock { white-space: nowrap; }
/* Patch 19: the header row was wider than the screen whenever the status capsule ran long
   (3px over at 360 for "On Duty · 20m", 129px over at 412 for personal conveyance ten hours
   in), and that overhang is what let a sideways drag shift the whole page. The clock and the
   theme switch keep their size; the capsule takes the room that is left and wraps onto a
   second line inside its own 42px face rather than widening the row. */
.top-row > .pill { min-width: 0; white-space: normal; line-height: 1.25; }
.top-row > .top-right { flex: none; }
:root[data-theme="day"] main.drive.warn .dial-cap, :root[data-theme="day"] main.drive.bad .dial-cap { fill: var(--chip-ink); stroke: none; }

/* Break buttons (driver report 2026-10-13): Settings rows and the add panel's rule hint. */
.brk-row { display: flex; flex-direction: column; gap: var(--s-8); padding: var(--s-12) 0; border-top: 1px solid var(--line); }
.brk-row:first-of-type { border-top: 0; }
.brk-len { display: grid; grid-template-columns: 64px 1fr 64px; gap: var(--s-8); align-items: center; }
.brk-len button { min-height: 56px; font-weight: 800; font-size: 16px; }
button.wide-btn { width: 100%; margin-top: 8px; font-weight: 800; }
.brk-hint { margin: 10px 0 0; padding: var(--s-10) var(--s-12) var(--s-10) 28px; border-radius: var(--r-12); background: var(--tint-accent); font-size: 14px; display: flex; flex-direction: column; gap: var(--s-6); }
.sub-hint { list-style: none; padding: var(--s-10) var(--s-12); margin: 0; }
/* The Log's editor, one question per screen (redesign, 2026-10-13). */
.sheet-head h2 { flex: 1; }
.ed-steps { display: flex; flex-direction: column; gap: var(--s-4); }
.ed-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-6); }
.ed-bar span { height: 5px; border-radius: var(--r-3); background: var(--line); }
.ed-bar span.on { background: var(--accent-solid); }
.ed-count { font-size: 14px; color: var(--muted); text-align: right; }
/* A panel taller than the screen scrolls; its rows must not be squeezed to fit instead. */
.sheet > * { flex-shrink: 0; }
.sheet .ed-q { margin: 2px 0 0; font-size: 26px; line-height: 1.15; color: var(--text); outline: none; }
.ed-lab { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 4px 2px 0; }
.ed-foot { text-align: center; margin: 0; }
button.opt, button.act { width: 100%; min-height: 64px; display: grid; grid-template-columns: 8px 1fr 20px; align-items: center; gap: var(--s-14); padding: var(--s-10) var(--s-14) var(--s-10) var(--s-12); text-align: left; border-radius: var(--r-16); }
button.act { grid-template-columns: 24px 1fr 20px; color: var(--text); }
button.act > svg:first-child { color: var(--link); }
button.act.del, button.act.del > svg:first-child { color: var(--bad); border-color: var(--bad); }
.opt .led { width: 8px; height: 38px; border-radius: 4px; }
.opt b, .act b { display: block; font-size: 18px; font-weight: 800; }
.opt .sub, .act .sub { display: block; font-size: 14px; color: var(--muted); font-weight: 400; margin-top: 1px; }
button.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.ed-brk { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--s-8); }
.ed-brk button { min-height: 60px; padding: var(--s-8) var(--s-12); border-radius: var(--r-14); text-align: left; }
.ed-brk b { display: block; font-size: 16px; font-weight: 800; }
.ed-brk span { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.ed-ctx { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: var(--s-10); min-height: 48px; padding: 0 var(--s-6) 0 var(--s-12); border-radius: var(--r-12); background: var(--bg); border: 1px solid var(--line); }
.ed-ctx .dot { width: 10px; height: 10px; border-radius: 50%; }
.ed-ctx-t { font-size: 15px; font-weight: 700; }
.ed-ctx button.link { min-height: 48px; }
.ed-day { display: flex; align-items: center; gap: var(--s-10); font-size: 15px; color: var(--muted); font-weight: 700; }
.ed-day input { flex: 1; min-height: 48px; }
.ed-day input.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
/* D7 (audit): "Another day" reads "Fri Nov 20" — the app's words — over a transparent date input. */
.ed-day-pick { position: relative; flex: 1; display: flex; align-items: center; min-height: var(--ctl, 56px); padding: 0 14px; background: var(--screen); border: 1px solid var(--line); border-radius: var(--r-12); box-shadow: var(--t-well-in), var(--t-lip); color: var(--text); font-weight: 700; cursor: pointer; }
.ed-day-pick.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ed-day-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-day .ed-day-pick .ed-day-input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; background: none; box-shadow: none; }
.ed-clock { padding: var(--s-12); border-radius: var(--r-18); background: var(--screen); border: 1px solid var(--line); box-shadow: inset 0 2px 8px var(--drop); text-align: center; }
.ed-clock output { display: block; font-size: 64px; font-weight: 700; line-height: 1; color: var(--text); }
.ed-clock span { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.ed-keys { display: grid; gap: var(--s-8); }
.ed-keys.two { grid-template-columns: 1fr 1fr; }
.ed-keys.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ed-keys button { min-height: 56px; padding: 0; font-size: 18px; font-weight: 800; }
.ed-from, .ed-ends, .ed-when { margin: 0; font-size: 16px; }
.ed-ends { text-align: center; }
.ed-len { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.ed-len button { min-height: 58px; font-size: 18px; font-weight: 800; }
.ed-len button.on { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.ed-len button.all { grid-column: 1 / -1; }
.ed-fine { display: grid; grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr; gap: var(--s-6); align-items: center; }
.ed-fine button { min-height: 52px; padding: 0; font-size: 16px; font-weight: 800; }
.ed-fine output { min-height: 52px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: var(--r-12); font-size: 17px; font-weight: 800; white-space: nowrap; }
.ed-sum { border: 1px solid var(--line); border-radius: var(--r-16); background: var(--panel); }
.ed-sum > div { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: var(--s-8); min-height: 52px; padding: var(--s-2) var(--s-6) var(--s-2) var(--s-12); border-top: 1px solid var(--line); }
.ed-sum > div:first-child { border-top: 0; }
.ed-sum > div > span:first-child { color: var(--muted); font-size: 14px; }
.ed-sum button.link { min-height: 48px; }
.grid-mark { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 2; }
p.warnbox { margin: 0; font-size: 15px; line-height: 1.35; }
.ed-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
.ed-days button { padding: 0 4px; font-size: 16px; min-height: 48px; }
/* The step's main button stays in reach at the foot of the panel while the rest scrolls. */
.sheet button.ed-go { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -10px 18px var(--panel), 0 2px 0 var(--key-base); }

/* Declutter patch (2026-11-05; consolidated into TopBar expander 2026-11-20): the one-line
   disclaimer rides the header on every screen, and a fresh clock — nothing logged, numbers
   assumed — is stamped as the demo it is. */
.disclaimer-line { padding-top: var(--s-6); text-align: left; }
.demo-word { color: var(--bad); letter-spacing: .05em; }
.app.is-demo .hero { overflow: hidden; }
.app.is-demo .hero::after { content: "DEMO"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 800; letter-spacing: .1em; transform: rotate(-14deg); color: rgba(255,255,255,.06); pointer-events: none; }
:root[data-theme="day"] .app.is-demo .hero::after { color: rgba(11,17,23,.05); }

/* ELD clocks quick start (patch 8): the demo banner's way in, and the four clocks as
   hours + minutes boxes on the 56px number-field floor patch 6 set. */
.qs-cta { display: flex; align-items: center; gap: var(--s-12); margin-top: 10px; flex-wrap: wrap; }
.qs-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); padding: var(--s-8) 0; }
.qs-label { flex: 1; font-weight: 600; }
.qs-inputs { display: inline-flex; align-items: center; gap: var(--s-6); font-weight: 600; }
.qs-inputs input.num { width: 78px; }

/* ---- patch 16 "Night & Glance" ---- */
/* P4: trust-role text — the lines a plan's honesty hangs on read at full size in the text
   colour; "muted and small" is reserved for what is genuinely secondary. */
.trust { font-size: 15px; font-weight: 600; color: var(--text); }
small.trust { font-size: 15px; }
/* P13: a press answers under the finger — a 1px settle and a dim, instant on the way down,
   eased on the way back; nothing at all for a driver who asked the phone for less motion. */
button:active { transform: translateY(1px); filter: brightness(.9); transition-duration: 0ms; }
@media (prefers-reduced-motion: reduce) { button:active { transform: none; filter: none; } }
/* P3: anchored scrolling clears the measured header too (the sticky offsets read the same
   variable inline). */
html { scroll-padding-top: var(--top-h, calc(114px + env(safe-area-inset-top))); }
/* Patch 19: the shell is the scroller now, so the same padding rides on it. */
.app { scroll-padding-top: var(--top-h, calc(114px + env(safe-area-inset-top))); }
/* P2: the notices as one-line chips on Now — a 48px summary row at trust size, the warning
   shape in front of it, the full wording one tap down. */
details.notice { background: var(--tint-warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-left: 4px solid var(--warn); border-radius: var(--r-14); padding: 0 var(--s-14); margin-bottom: 10px; }
details.notice > summary { min-height: 48px; display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; }
details.notice > summary::-webkit-details-marker { display: none; }
details.notice > summary::before { content: "⚠ "; color: var(--warn); font-size: 16px; font-weight: 800; margin-right: 2px; }
.notice-body { padding: var(--s-2) 0 var(--s-12); font-size: 15px; line-height: 1.45; }
.notice-body .warnbox { margin-top: 4px; }
/* P5: warnings carry a shape, not just a colour (decision D3-A — the palette is unchanged). */
.warnbox::before { content: "⚠ "; color: var(--warn); font-size: 16px; font-weight: 800; }
.alertbox::before { content: "⚠ "; color: var(--warn); font-size: 16px; font-weight: 800; }
.alertbox.bad::before { color: var(--bad); }
.hero.warn .hero-label::before { content: "⚠ "; color: var(--warn); }
/* M11: the hero ring's substance says what the number stands on — dotted while any part of
   the answer is estimated, a hollow outline on the demo clock. */
.dial.basis-estimate .dial-fill { stroke-linecap: butt; stroke-dasharray: 12 9; }
.hero-basis { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-top: 2px; }
.dial.basis-demo .dial-fill { stroke-width: 2.5; filter: none; }
.dial.basis-demo .dial-cap { display: none; }
/* P8: out of time, the driving view wears a hazard frame — black/yellow chevrons in the
   warning colours of the road — instead of a red flood at night or a plain red frame. The
   day flood itself is unchanged underneath (its pin stands); the frame sits around it. */
main.drive { position: relative; }
main.drive.bad::after { content: ""; position: absolute; inset: 0; pointer-events: none; border: 8px solid transparent; border-image: repeating-linear-gradient(45deg, var(--bad) 0 10px, var(--chip-ink) 10px 20px) 8; }

/* Capstone C1: the time axis (Timeline card, Why sheet, lever sheets), the lever chips
   and the one-time Timeline chip. Existing tokens only — no new colour pair is created,
   so the contrast gate's pairs and the nightlight budget are untouched. Lane bars are
   8px tall, under the light budget's large-surface threshold (audit §2.1). */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-12); flex-wrap: wrap; margin-bottom: var(--s-8); }
.hero .tl-head .hero-stop { align-items: flex-end; text-align: right; }
.taxis { display: flex; flex-direction: column; margin-top: var(--s-6); }
.taxis-row { display: grid; grid-template-columns: 96px 1fr 64px; align-items: center; min-height: 28px; gap: var(--s-8); }
button.taxis-row { width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 48px; }
.taxis-head { min-height: 20px; }
.taxis-label { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; }
.taxis-label .tl-short { display: none; }
@media (max-width: 340px) {
  .taxis-row { grid-template-columns: 64px 1fr 64px; }
  .taxis-label .tl-full { display: none; }
  .taxis-label .tl-short { display: inline; }
}
.taxis-value { font-size: 16px; font-weight: 700; text-align: right; white-space: nowrap; }
/* Patch L1 item 6 (field report 2026-11-11: hour markers and the STOP time stamped over the top of
   Now's timeline). A long value ("62h 00m left", "Wed 12:35") set the value column's max-content
   width and crushed the track between label and value to ~70-130px, so the hour labels packed into
   one blob. A value may now wrap at its spaces inside a capped width: the column stays sized to its
   widest value (patch 19 B4), but no value can be wider than a two-line "62h 00m / left". */
.taxis-row:not(.taxis-head) > .taxis-value { white-space: normal; max-width: 4.75em; justify-self: end; line-height: 1.15; }
/* Patch 19: the value column was a fixed 64px and its text does not wrap, so a value with a
   day in it ("Wed 00:55", 90px) or a duration ("51h 40m left", 120px) ran out of the card —
   25px past a 412px screen, the second source of the sideways drag. The rows now share ONE
   set of columns (subgrid), with the value column as wide as the widest value on the axis, so
   every lane still starts and ends on the same x and nothing overhangs. A runtime without
   subgrid keeps the fixed columns above; the shell's closed sides contain the overhang there. */
@supports (grid-template-columns: subgrid) {
  .taxis { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(64px, max-content); column-gap: var(--s-8); }
  .taxis > .taxis-row { grid-column: 1 / -1; grid-template-columns: subgrid; }
  @media (max-width: 340px) { .taxis { grid-template-columns: 64px minmax(0, 1fr) minmax(64px, max-content); } }
}
.taxis-track { position: relative; height: 28px; display: block; }
.taxis-track-head { height: 20px; }
/* Item 6: the STOP tag sits on its own line ABOVE the hour labels. Both used to share one 20px
   line, so a stop time near a gridline was printed on top of the hour markers. */
.taxis-track-head.has-tag { height: 36px; }
.taxis-track-head.has-tag .taxis-hour { top: 19px; line-height: 16px; }
.taxis-tint { position: absolute; top: 0; bottom: 0; left: 0; background: var(--tint-accent); border-radius: var(--r-3); }
.taxis-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); opacity: .6; }
.taxis-hour { position: absolute; top: 2px; transform: translateX(2px); font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.taxis-tag { position: absolute; top: -2px; transform: translateX(-50%); font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--text); white-space: nowrap; z-index: 3; }
.taxis-tag.ghost { color: var(--muted); font-weight: 600; }
.taxis-bar { position: absolute; top: 10px; height: 8px; left: 0; background: var(--accent); border-radius: var(--r-3); }
.taxis-bar.faded { opacity: .4; border-radius: 0 var(--r-3) var(--r-3) 0; }
.taxis-track.has-ghost .taxis-bar { top: 16px; }
.taxis-bar.ghost { background: transparent; border: 1.5px solid var(--muted); top: 3px; }
.taxis-bar.basis-estimate { background: transparent; border: 1.5px dashed var(--accent); }
.taxis-bar.basis-demo { background: transparent; border: 1.5px solid var(--accent); }
.taxis-bar.outline { background: transparent; border: 1.5px solid var(--accent); }
.taxis-cap { position: absolute; top: 8px; width: 3px; height: 12px; background: var(--text); transform: translateX(-1.5px); }
.taxis-track.has-ghost .taxis-cap { top: 14px; }
.taxis-arrow { position: absolute; right: 4px; top: 6px; color: var(--muted); font-weight: 700; line-height: 1; }
.taxis-wall { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--text); transform: translateX(-1.5px); z-index: 2; }
.taxis-wall.ghost { width: 2px; background: var(--muted); }
.taxis-hazard { position: absolute; left: 0; top: 2px; bottom: 2px; width: 8px; background: repeating-linear-gradient(45deg, var(--bad) 0 6px, var(--chip-ink) 6px 12px); border-radius: var(--r-3); z-index: 1; }
.taxis-bracket { position: absolute; left: 0; top: 15px; font-size: 12px; color: var(--muted); font-weight: 700; }
.lever { display: flex; align-items: center; gap: var(--s-10); width: 100%; min-height: 56px; padding: var(--s-8) var(--s-12); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-12); color: var(--text); font-size: 16px; text-align: left; cursor: pointer; }
.lever-text { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.lever-text b { font-weight: 600; font-size: 16px; }
.lever-sub { font-size: 14px; color: var(--muted); }
.newcard { display: flex; align-items: center; justify-content: space-between; gap: var(--s-10); min-height: 48px; padding: var(--s-6) var(--s-12); background: var(--tint-accent); border: 1px solid var(--line); border-radius: var(--r-12); font-size: 15px; }
.newcard-btns { display: inline-flex; gap: var(--s-6); flex-shrink: 0; }
/* ===== Capstone C2 — future scrubber (M16, audit §2.3). Existing tokens only (contrast 44/44 unchanged). */
.hero.preview { border: 2px dashed var(--accent); }
.pv-band { display: flex; align-items: center; min-height: 48px; margin: calc(-1 * var(--s-6)) 0 var(--s-6); padding: 0 var(--s-12); background: var(--tint-accent); border-radius: var(--r-12); font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pv-frame { margin: var(--s-8) 0 0; font-size: 15px; font-weight: 600; color: var(--text); }
.pv-over { color: var(--text); }
.pv-steps { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: var(--s-6); margin-top: var(--s-10); }
button.pv-step { min-height: 56px; padding: var(--s-8); font-size: 15px; font-weight: 700; }
/* Everything else on Now while a preview is up: inert (the attribute) and at 40%. The wrapper
   makes no box (display: contents keeps the dock's sticky slot), so the dimming rides its children. */
.now-rest { display: contents; }
.now-rest.pv-dim > * { opacity: .4; }
/* The dock is sticky over scrolled content: it keeps its opaque floor, and its controls take the 40%. */
.now-rest.pv-dim > .dock { opacity: 1; }
.now-rest.pv-dim > .dock > * { opacity: .4; }
/* The snap back to now: a 200ms slide, instant under reduced motion. */
.pv-snapmark { display: none; }
.pv-snapmark + .hero { animation: pv-slide 200ms var(--ease-state, ease-out); }
@keyframes pv-slide { from { transform: translateX(-12px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pv-snapmark + .hero { animation: none; } }

/* ===== Capstone C2 — the one-bar Split Lab (P7, audit §2.5). */
.split-now-after[data-tone="bad"] { border-left: 4px solid var(--bad); }
.sna-x { color: var(--bad); }
.taxis-plan { margin-top: var(--s-8); font-weight: 600; }
.plan-band { display: flex; justify-content: space-between; gap: var(--s-8); font-size: 13px; font-variant-numeric: tabular-nums; }
.plan-key { color: var(--text); font-weight: 800; white-space: nowrap; }
.plan-key.ghost { color: var(--muted); font-weight: 600; }
.plan-bar { position: relative; height: 56px; margin-top: var(--s-4); }
button.pblock { position: absolute; top: 0; height: 56px; min-height: 56px; padding: 0 var(--s-4); background: var(--panel2); border: 1px solid var(--line); border-top: 4px solid var(--led, var(--muted)); border-radius: var(--r-8); box-shadow: none; color: var(--text); font-size: 13px; font-weight: 700; overflow: visible; }
button.pblock .pblock-in { display: inline-flex; align-items: center; gap: var(--s-4); white-space: nowrap; overflow: hidden; max-width: 100%; }
button.pblock .pblock-t { overflow: hidden; text-overflow: ellipsis; }
/* A mid-width block drops its icon and stacks its words ("B1 OFF" over "3h"); the status word carries the status. */
button.pblock.compact .pblock-in { flex-direction: column; gap: 0; line-height: 1.15; }
/* A short block keeps an invisible 48px hit area; its label moves under the bar on a leader line. */
button.pblock.short::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 48px; transform: translateX(-50%); }
button.pblock.zero { border-left-width: 0; border-right-width: 0; padding: 0; }
.plan-hatch { position: absolute; bottom: calc(var(--row, 0) * 12px); height: 10px; background: repeating-linear-gradient(45deg, var(--bad) 0 6px, var(--chip-ink) 6px 12px); border-radius: 0 0 var(--r-3) var(--r-3); pointer-events: none; z-index: 2; }
.plan-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--text); transform: translateX(-1.5px); pointer-events: none; z-index: 3; }
.plan-mark.ghost { width: 0; background: none; border-left: 2px dashed var(--muted); transform: translateX(-1px); }
.plan-leads { position: relative; height: 20px; margin-top: var(--s-2); }
/* D15 (audit): a short block's 48px hit box (its ::before) was painted over by the next block, so
   the on-duty block took taps on its 12px only — short blocks now sit above their neighbours.
   And a block's label sits above the 14-hour markers (the dashed "14 ends now" line ran
   straight through "Drive 3h 30m"): the label carries the block's own fill behind it. */
button.pblock.short { z-index: 5; }
button.pblock .pblock-in { position: relative; z-index: 4; background: var(--panel2); border-radius: var(--r-3, 3px); padding: 0 2px; }
.plan-lead { position: absolute; top: 0; font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; border-top: 1px solid var(--muted); padding-top: 2px; }
.plan-bracket { margin-top: var(--s-4); border: 1px solid var(--muted); border-top: 0; border-radius: 0 0 var(--r-8) var(--r-8); height: 10px; position: relative; }
.plan-bracket span { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); padding: 0 var(--s-6); background: var(--panel); font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.plan-bracket.no { border-style: dashed; }
.plan-bracket { margin-bottom: var(--s-8); }
details.fine { margin-top: var(--s-8); }
details.fine > summary { min-height: 48px; display: flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; }
.checks li button.fix { display: block; margin: var(--s-6) 0 0 var(--s-18); }
.pb-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); margin-top: var(--s-10); }
button.pb-step { min-height: 56px; padding: var(--s-8) var(--s-4); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pb-exact { margin-top: var(--s-10); }
.pb-result { margin: var(--s-10) 0 0; }
button.wide.fix { margin-top: var(--s-8); }

/* ===================== Capstone C3 "Dock & dispatch" (append-only; existing tokens only) ===================== */
/* Shared time-picker key and the load answer's appointment and dispatch. */
button.wide.pick-time { margin-top: var(--s-10); }
button.wide.pick-time.on { border: 2px solid var(--accent); }
.appt-big { font-size: 18px; font-weight: 800; line-height: 1.3; }
.appt-big svg { vertical-align: -4px; }
.verdict.appt.good .appt-big svg { color: var(--good); }
.verdict.appt.bad .appt-big svg { color: var(--bad); }
.row.dispatch { justify-content: flex-start; margin: 0; }
.row.dispatch > * { flex: 0 0 auto; min-height: 48px; }
/* D10-A + M8: Hours coming back, the week strip */
.hours-back { font-size: 17px; line-height: 1.4; margin: 0 0 var(--s-12); }
.weekstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--s-4); align-items: end; }
button.wk-day { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-4); min-height: 132px; padding: var(--s-4) 0; background: transparent; box-shadow: none; border-radius: var(--r-8); min-width: 0; }
.wk-col { position: relative; display: flex; align-items: flex-end; height: 96px; border-bottom: 1px solid var(--line); }
.wk-bar { position: relative; display: block; width: 100%; min-height: 2px; background: var(--muted); border-radius: var(--r-3) var(--r-3) 0 0; overflow: hidden; }
button.wk-day.today .wk-bar { background: var(--accent); }
.wk-hatch { position: absolute; left: 0; right: 0; top: 0; display: block; background: repeating-linear-gradient(45deg, var(--accent) 0 4px, var(--panel) 4px 8px); }
.wk-label { display: block; font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
button.wk-day.today .wk-label { color: var(--text); }
.wk-key { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; border-radius: var(--r-3); background: repeating-linear-gradient(45deg, var(--accent) 0 4px, var(--panel) 4px 8px); }
button.rowbtn.moved { min-height: 48px; margin-bottom: var(--s-12); font-weight: 700; }
/* M5: the welcome-back check — an open strip chip under the answer, never a modal */
.welcome { background: var(--tint-warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-left: 4px solid var(--warn); border-radius: var(--r-14); padding: var(--s-10) var(--s-14); margin-bottom: 10px; font-size: 15px; }
.welcome p { margin: 0; }
.welcome .row > button.mini { min-height: 48px; }
/* Patch L1 item 5: the Timeline / Dial switch on the Now card itself (the More → Planning setting's twin). */
.card-switch { display: flex; align-items: center; gap: var(--s-10); margin-top: var(--s-10); padding-top: var(--s-8); border-top: 1px solid var(--line); }
.card-switch-l { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.card-switch .toggle { flex: 1; margin-top: 0; }
/* Patch L1 items 2 + 3: the shared clock picker. The big clock is a key now — tap it to type the time. */
.ed-clock-tap { display: block; width: 100%; background: none; border: 0; box-shadow: none; padding: 0; min-height: 56px; color: inherit; cursor: text; }
.ed-clock-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-10); }
/* Feel round (2026-11-19), the log EDIT flow: the big clock is the clock picker itself. The
   phone's time input lies over the whole clock face, transparent, so a tap anywhere on the big
   time lands on the input and opens the phone's picker; the visible digits are the output
   under it. 16px keeps a phone from zooming the page on focus. */
.ed-clock-pick { position: relative; display: block; min-height: 56px; cursor: pointer; border-radius: var(--r-10); }
.ed-clock-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.ed-clock-pick .ed-clock-input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; font-size: 16px; cursor: pointer; background: none; box-shadow: none; }
.ed-type { display: flex; gap: var(--s-8); align-items: stretch; }
.ed-type input { flex: 1; min-width: 0; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: .08em; }
.ed-type .ed-type-ok { min-height: 56px; min-width: 88px; font-weight: 800; }
.ed-ends-tap { min-height: 48px; padding: 0 var(--s-8); font: inherit; font-weight: 800; text-decoration: underline dotted; text-underline-offset: 4px; }
/* Item 4: the absorb warning lists exactly what the change trims; its main button is the confirmation. */
.absorb-list { margin: var(--s-6) 0; padding-left: 1.2em; }
.absorb-list li { margin: 2px 0; }
button.trip-dep { display: block; width: 100%; margin-top: 4px; text-align: left; font-weight: 700; }

/* ===================================================================================
   TACTILE PASS (polish, 2026-11-11) — the whole app as a modern truck dashboard.
   Direction: Lorico, 2026-11-11 — physical, chunky, grippy controls; depth and pressed
   states on buttons, toggles and sliders; instrumentation character; and good-looking in
   its own right, in both themes.

   This block is APPEND-ONLY and self-contained: no rule above it was edited, the palette
   in the two :root blocks is untouched (the contrast gate and the night-light budget read
   it there), and deleting everything from this banner to the end of the file restores the
   L2 look exactly. Presentation only.

   The grammar, used the same way on every screen:
     KEY      a raised push-button — lit top edge, a face, a solid skirt under it. A press
              sinks it onto the skirt. A key that is latched ON stays down, with its lamp lit.
     ROCKER   a segmented choice — a recessed well, the chosen side a raised key with a lamp.
     SLIDER   a groove with a knurled grip riding in it.
     READOUT  anything that only shows a value — recessed, like a gauge window.
   One control scale, and nothing tappable got smaller than it was:
     48  the floor — inline links, icon buttons, the keys inside a rocker
     56  the standard key, stepper and field
     64  rows (title + detail + chevron) and the commit key of a screen
   =================================================================================== */
html {
  --ctl-floor: 48px; --ctl: 56px; --ctl-lg: 64px;
  --t-well: var(--bg);
  --t-well-in: inset 0 2px 5px rgba(0,0,0,.72), inset 0 0 0 1px rgba(0,0,0,.4);
  --t-lip: 0 1px 0 rgba(255,255,255,.05);
  --t-bevel: rgba(0,0,0,.42);
  --t-cast: rgba(0,0,0,.5);
  --t-press: inset 0 2px 6px rgba(0,0,0,.65);
  --t-ridge-hi: rgba(255,255,255,.14); --t-ridge-lo: rgba(0,0,0,.55);
  --t-accent-lo: color-mix(in srgb, var(--accent-solid) 82%, #000);
  --t-accent-skirt: color-mix(in srgb, var(--accent-solid) 48%, #000);
  --t-key: linear-gradient(180deg, var(--key-hi), var(--key-lo));
  --t-key-top: rgba(255,255,255,.09);
  --t-key-shadow: inset 0 1px 0 var(--t-key-top), inset 0 -1px 0 var(--t-bevel), 0 3px 0 var(--key-base), 0 5px 9px var(--t-cast);
  --t-key-down: var(--t-press), 0 1px 0 var(--key-base);
  --t-grip: linear-gradient(180deg, #6b7885, #4a5560); --t-grip-edge: #2a333d;
}
html[data-theme="day"] {
  --t-well: #d3dae1;
  --t-well-in: inset 0 2px 4px rgba(30,45,60,.24), inset 0 0 0 1px rgba(30,45,60,.07);
  --t-lip: 0 1px 0 rgba(255,255,255,.95);
  --t-bevel: rgba(30,45,60,.10);
  --t-cast: rgba(30,45,60,.18);
  --t-press: inset 0 2px 5px rgba(30,45,60,.30);
  --t-ridge-hi: rgba(255,255,255,.95); --t-ridge-lo: rgba(30,45,60,.34);
  --t-grip: linear-gradient(180deg, #ffffff, #e5e9ed); --t-grip-edge: #9aa6b2;
  --t-key-top: var(--edge-hi);
}

/* ---------- KEY: every button that has a face ---------- */
button { min-height: var(--ctl); border-radius: var(--r-12); font-weight: 700; box-shadow: var(--t-key-shadow); transition: transform 90ms ease-out, box-shadow 90ms ease-out, filter 120ms ease-out; }
/* The controls with no face keep none, and keep the floor they had. */
button.link, button.back, button.x, button.drive-details { min-height: var(--ctl-floor); }
.icon-btn { min-height: var(--ctl-floor); }
button.link, .icon-btn, button.back, button.x, button.ghost, button.entry, button.sheet-backdrop, .toggle button, button.drive-details, button.rowbtn.flat, button.taxis-row, button.addbtn, .tabs button, button.wk-day, button.pblock, .ed-clock-tap, button.vh { box-shadow: none; }
button.vh { padding: 0; border: 0; min-height: 0; }
/* A press sinks the key onto its skirt. (Faceless controls keep patch 16's 1px settle.) */
button:where(:not(.link, .icon-btn, .back, .x, .ghost, .entry, .sheet-backdrop, .taxis-row, .addbtn, .wk-day, .pblock, .ed-clock-tap, .drive-details, .vh)):active { transform: translateY(2px); filter: none; box-shadow: var(--t-key-down); transition-duration: 0ms; }
button:where(:not(.link, .icon-btn, .back, .x, .ghost, .entry, .sheet-backdrop, .taxis-row, .addbtn, .wk-day, .pblock, .ed-clock-tap, .drive-details, .vh)):disabled { box-shadow: inset 0 1px 0 var(--edge-hi), 0 1px 0 var(--key-base); }
@media (prefers-reduced-motion: reduce) { button:where(:not(.link)):active { transform: none; } }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* key faces that were flat panels become the one key face */
button.rowbtn, .plan-item, .chips button, .lever, button.dock-more, button.danger, button.act.del { background: var(--t-key); }
button.dock-more { box-shadow: var(--t-key-shadow); }
button.dock-more:active { box-shadow: var(--t-key-down); }

/* the commit key: the accent face, lit from above, on its own dark-accent skirt */
button.primary, .chips button.on, .ed-len button.on { background: linear-gradient(180deg, var(--accent-solid), var(--t-accent-lo)); border-color: var(--t-accent-lo); color: var(--on-accent); }
button.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,0,0,.22), 0 3px 0 var(--t-accent-skirt), 0 6px 12px var(--t-cast), 0 0 16px var(--glow); }
button.primary:active { box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 1px 0 var(--t-accent-skirt); }
button.primary:disabled { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 0 var(--t-accent-skirt); }
.sheet button.ed-go { box-shadow: 0 -10px 18px var(--panel), inset 0 1px 0 rgba(255,255,255,.28), 0 3px 0 var(--t-accent-skirt); }
.sheet button.ed-go:active { box-shadow: 0 -10px 18px var(--panel), inset 0 2px 6px rgba(0,0,0,.4), 0 1px 0 var(--t-accent-skirt); }
/* A1 (audit): when the main button CONFIRMS a warning (it changes other entries), it must not
   sit on the warning it confirms — it drops out of the sticky slot and follows the text, so the
   driver scrolls past the explanation to reach it. */
.sheet button.ed-go.ed-absorb { position: static; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 3px 0 var(--t-accent-skirt); }
.sheet button.ed-go.ed-absorb:active { box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 1px 0 var(--t-accent-skirt); }
/* a preset that is chosen is a key latched down, lamp on */
.chips button.on, .ed-len button.on { transform: translateY(2px); box-shadow: inset 0 2px 6px rgba(0,0,0,.38), 0 1px 0 var(--t-accent-skirt), 0 0 14px var(--glow); }
/* destructive keys: the red legend and edge on a key face, a red-shaded skirt */
button.danger, button.act.del { box-shadow: inset 0 1px 0 var(--edge-hi), 0 3px 0 color-mix(in srgb, var(--bad) 45%, var(--key-base)), 0 5px 9px var(--t-cast); }
button.danger:active, button.act.del:active { box-shadow: var(--t-press), 0 1px 0 color-mix(in srgb, var(--bad) 45%, var(--key-base)); }
/* outlined-on keys (PC / yard move, resolved timeline, a typed time): latched, accent ring kept */
button.on-outline { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--accent), var(--t-press), 0 1px 0 var(--key-base); }
button.opt[aria-pressed="true"] { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--accent), var(--t-press), 0 1px 0 var(--key-base); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--key-lo)), color-mix(in srgb, var(--accent) 6%, var(--key-lo))); }
button.wide.pick-time.on { transform: translateY(2px); box-shadow: var(--t-press), 0 1px 0 var(--key-base); }

/* ---------- the control scale ---------- */
/* 56: standard keys, steppers, fields */
.ed-days button { font-size: 14px; padding: 0 2px; }
.ed-days button, .row.dispatch > *, button.rowbtn.moved, .welcome .row > button.mini { min-height: var(--ctl); }
/* P5 (audit): the day chips size to their words — "Yesterday" overflowed a quarter-width chip at
   360px and ran into "Wed 18". */
.chips.ed-days { display: flex; flex-wrap: nowrap; }
.chips.ed-days button { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding: 0 6px; font-size: 16px; }
@media (max-width: 380px) { .chips.ed-days button { font-size: 14px; } }
.ed-fine button, .ed-fine output, .tstep-value { min-height: var(--ctl); }
.toggle.big button { min-height: 58px; }
.filebtn { min-height: var(--ctl); border-radius: var(--r-12); background: var(--t-key); box-shadow: var(--t-key-shadow); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
button.mini { border-radius: var(--r-12); font-size: 15px; }
.slider-row { gap: var(--s-6); }
.slider-row .mini { padding-left: var(--s-10); padding-right: var(--s-10); }
/* stepper legends: one size, one weight, wherever a value is nudged */
.ed-keys button, .ed-fine button, .tstep-row button, .brk-len button, button.pb-step, .steps4 button, .slider-row .mini { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
button.pv-step { font-size: 16px; }
/* 64: rows and the commit key */
button.wide, button.rowbtn, .lever, .ed-len button, .steps4 button { min-height: var(--ctl-lg); }
button.wide, button.rowbtn, button.opt, button.act, .lever { border-radius: var(--r-16); }
.ed-len button { font-size: 17px; }
.plan-text b { font-size: 18px; }
.lever-text b { font-size: 18px; font-weight: 800; }
button.rowbtn { font-size: 16px; }
.chips button { font-size: 17px; }
/* the icon tile on a plan row is a small recessed window */
.plan-icon { background: var(--screen); box-shadow: var(--t-well-in), var(--t-lip); }

/* ---------- status keys: the lit one is latched down ---------- */
.status-buttons button.on, .big-status button.on { transform: translateY(2px); background: linear-gradient(180deg, color-mix(in srgb, var(--led, var(--muted)) 20%, var(--key-lo)), color-mix(in srgb, var(--led, var(--muted)) 9%, var(--key-lo))); box-shadow: inset 0 3px 7px var(--t-cast), 0 1px 0 var(--key-base), 0 0 18px color-mix(in srgb, var(--led, transparent) 35%, transparent); }
.status-buttons button::before, .big-status button::before { height: 5px; border-radius: 3px; }
button.drive-stop:active { box-shadow: var(--t-press), 0 1px 0 var(--key-base); transform: translateY(3px); }

/* ---------- ROCKER: the segmented toggle ---------- */
/* Night keeps its exact colours (the L2 pin reads them): the depth is all shadow. In day the
   well is a shade deeper than the page, so the chosen white key can never wash out again. */
.toggle { background: var(--t-well); border-radius: var(--r-12); box-shadow: var(--t-well-in), var(--t-lip); }
.toggle button { position: relative; min-height: 50px; border-radius: 9px; padding: 8px 4px 12px; font-size: 15px; font-weight: 700; }
.toggle button.on { background-image: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0)); box-shadow: inset 0 1px 0 var(--edge-hi), 0 2px 0 var(--key-base), 0 3px 6px var(--t-cast); }
:root[data-theme="day"] .toggle button.on { background-image: none; box-shadow: inset 0 0 0 1px var(--tick), 0 2px 0 var(--key-base), 0 3px 6px var(--t-cast); }
/* the lamp on the chosen side: selection is carried by position, weight, edge AND a lit bar */
.toggle button.on::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.toggle button:not(.on):active { box-shadow: var(--t-press); }

/* ---------- switches: a checkbox is a dash slide switch ---------- */
label.check { gap: var(--s-14); min-height: var(--ctl); }
label.check input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 56px; height: 48px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: var(--r-12); background: none; box-shadow: none; cursor: pointer; }
label.check input::before { content: ""; box-sizing: border-box; position: absolute; left: 0; right: 0; top: 8px; height: 32px; border-radius: var(--r-pill); border: 1px solid var(--line); background: radial-gradient(circle at 41px 50%, transparent 3px, var(--muted) 3.5px, var(--muted) 5px, transparent 5.5px), var(--t-well); box-shadow: var(--t-well-in), var(--t-lip); }
label.check input::after { content: ""; box-sizing: border-box; position: absolute; top: 11px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--t-grip); border: 1px solid var(--t-grip-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 3px var(--t-cast); transition: transform var(--dur-micro, 140ms) var(--ease-state, ease-out); }
label.check input:checked::before { border-color: var(--t-accent-lo); background: linear-gradient(var(--on-accent), var(--on-accent)) 14px 50% / 2px 10px no-repeat, var(--accent-solid); }
label.check input:checked::after { transform: translateX(24px); }
label.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { label.check input::after { transition: none; } }

/* ---------- SLIDER: a groove and a knurled grip ---------- */
.slider input[type=range], input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 56px; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--accent) 0, var(--accent) var(--fill, 0%), var(--t-well) var(--fill, 0%)); box-shadow: var(--t-well-in), var(--t-lip); }
input[type=range]::-moz-range-track { height: 14px; border-radius: 7px; background: var(--t-well); box-shadow: var(--t-well-in), var(--t-lip); }
input[type=range]::-moz-range-progress { height: 14px; border-radius: 7px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 36px; height: 44px; margin-top: -15px; border-radius: 10px; border: 1px solid var(--t-grip-edge); background: linear-gradient(90deg, transparent 11px, var(--t-ridge-lo) 11px, var(--t-ridge-lo) 12px, var(--t-ridge-hi) 12px, var(--t-ridge-hi) 13px, transparent 13px, transparent 16px, var(--t-ridge-lo) 16px, var(--t-ridge-lo) 17px, var(--t-ridge-hi) 17px, var(--t-ridge-hi) 18px, transparent 18px, transparent 21px, var(--t-ridge-lo) 21px, var(--t-ridge-lo) 22px, var(--t-ridge-hi) 22px, var(--t-ridge-hi) 23px, transparent 23px) center / 100% 20px no-repeat, var(--t-grip); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 var(--key-base), 0 5px 9px var(--t-cast); }
input[type=range]::-moz-range-thumb { width: 36px; height: 44px; border-radius: 10px; border: 1px solid var(--t-grip-edge); background: var(--t-grip); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 var(--key-base), 0 5px 9px var(--t-cast); }
input[type=range]:active::-webkit-slider-thumb { box-shadow: var(--t-press), 0 1px 0 var(--key-base); }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-8); }

/* ---------- READOUT: fields and value windows are recessed ---------- */
label input, label select, input.num, input.hrs, input.tstep-pick, .ed-day input, .ed-type input { background: var(--screen); border: 1px solid var(--line); border-radius: var(--r-12); box-shadow: var(--t-well-in), var(--t-lip); min-height: var(--ctl); }
label input:focus-visible, label select:focus-visible, input.num:focus-visible, input.hrs:focus-visible, input.tstep-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tstep-value, .ed-fine output, .lenrow, .ed-ctx, .stat { background: var(--screen); border: 1px solid var(--line); box-shadow: var(--t-well-in), var(--t-lip); }
.tstep-value, .ed-fine output { font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; }
.limit-plate, .ed-clock, .grid { box-shadow: var(--t-well-in), var(--t-lip); }
.meter-bar { height: 12px; border-radius: 4px; box-shadow: var(--t-well-in), var(--t-lip); }
.meter-bar span { height: 12px; }
.flow-dots span, .ed-bar span { height: 6px; background: var(--t-well); box-shadow: var(--t-well-in); }
.flow-dots span.on, .ed-bar span.on { background: var(--accent); box-shadow: 0 0 8px var(--glow); }

/* ---------- panels, header, dock, tab bar, sheets ---------- */
.card, .meters, .split-now-after { box-shadow: inset 0 1px 0 var(--edge-hi), inset 0 -1px 0 var(--t-bevel), 0 8px 20px var(--drop); }
.top { box-shadow: 0 1px 0 var(--edge-hi), 0 8px 14px -10px var(--t-cast); }
.dock { box-shadow: inset 0 1px 0 var(--edge-hi), 0 -8px 14px -10px var(--t-cast); }
.tabs { box-shadow: inset 0 1px 0 var(--edge-hi), 0 -8px 16px -8px var(--t-cast); }
.tabs button + button { box-shadow: -1px 0 0 var(--line), inset 1px 0 0 var(--edge-hi); }
.tabs button.on { background: linear-gradient(180deg, var(--tint-accent), transparent 70%); }
.tabs button:active { box-shadow: var(--t-press); transform: none; }
.tabs button.on::before { height: 4px; left: 22%; right: 22%; }
/* the sheet's handle is a recessed finger slot */
.sheet-handle { width: 52px; height: 6px; border-radius: 3px; background: var(--t-well); box-shadow: var(--t-well-in), var(--t-lip); }
.modal { box-shadow: inset 0 1px 0 var(--edge-hi), 0 24px 48px var(--t-cast); background: linear-gradient(180deg, var(--surface-hi), var(--panel)); }

/* ---------- Now: the Timeline | Dial switch, compact, in the panel's own top corner ---------- */
/* Field note (Lorico): the switch took a whole line. It is now the size of the header's
   Day | Night control and sits in the top-right corner of the Now panel, sharing the band the
   panel's label already had. Its two keys keep the 48px floor. A browser without :has() keeps
   the L2 full-line layout — nothing is lost, only not compacted. */
@supports selector(:has(*)) {
  .hero:has(> .card-switch) > .card-switch { position: absolute; top: 12px; right: 12px; z-index: 2; margin: 0; padding: 0; border: 0; gap: 0; }
  .hero:has(> .card-switch) .card-switch-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero:has(> .card-switch) .card-switch .toggle { flex: none; }
  .hero:has(> .card-switch) .card-switch .toggle button { flex: none; min-height: var(--ctl-floor); min-width: 56px; padding: 0 var(--s-12) 4px; font-size: 13px; letter-spacing: .02em; }
  .hero:has(> .card-switch) > .hero-label:first-child,
  .hero:has(> .card-switch) > .hero-lead:first-child,
  .hero:has(> .card-switch) > .tl-head:first-child .hero-label { display: flex; align-items: center; min-height: 50px; padding-right: 158px; }
  .hero:has(> .card-switch) > .pv-band:first-child { margin-right: 158px; }
  .hero:has(> .card-switch) > .dial:first-child { margin-top: 28px; }
}

/* ===================================================================================
   REIMAGINE (2026-11-12) — "Road signs by day, dash lights by night".
   Direction: Lorico, 2026-11-12 (voice) — reimagine the design, free rein, grounded in
   owner-operator trucking: more intuitive, more tactile, more pleasant; for a tired driver
   in a cab at 2 a.m. — gloves, glare, vibration, one hand, a glance.

   A driver already reads two visual languages without thinking: highway signs (shape and
   colour, built to be read at speed in glare) and the dash (lit legends on black, built to
   spare night vision). This layer borrows both instead of inventing a third:
     SIGN     every answer card opens with a small road sign — green rectangle (hours
              left), yellow diamond (under an hour / break due), red octagon (out of
              hours), blue rest-area square (resting). Solid sign colours by day; a dark
              plate with a lit legend by night.
     CLOCKS   the four clocks (11 · 14 · break · 70) as a cluster of gauge windows.
     ROCKERS  the four duty statuses as icon keys; the one you are in is fully lit.
   Append-only like the tactile pass above it: nothing above this banner was edited except
   the two palette values named in package-reimagine (night --text / --muted), which the
   contrast gate reads and verifies in place. Presentation only.
   =================================================================================== */
html {
  /* FHWA-family sign colours; each ink pair is ≥ 4.5:1 (checked by test/dom/reimagine-signs) */
  --sign-go: #006b3f; --sign-go-ink: #ffffff;
  --sign-warn: #ffc20e; --sign-warn-ink: #14110a;
  --sign-stop: #b3202a; --sign-stop-ink: #ffffff;
  --sign-rest: #0b4a9e; --sign-rest-ink: #ffffff;
  /* night: the plate goes dark and the legend is the lamp */
  --lamp-go: var(--good); --lamp-warn: var(--warn); --lamp-stop: var(--bad); --lamp-rest: var(--accent);
}

/* ---------- SIGN ---------- */
.sign { --sg: var(--sign-go); --sg-ink: var(--sign-go-ink); --lamp: var(--lamp-go);
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 4px 0 10px; padding: 0 14px 0 6px;
  border-radius: 9px; font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; line-height: 1;
  background: color-mix(in srgb, var(--sg) 24%, #05070a); color: var(--lamp);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lamp) 55%, transparent), 0 0 14px color-mix(in srgb, var(--lamp) 16%, transparent); }
.sign-warn { --sg: var(--sign-warn); --sg-ink: var(--sign-warn-ink); --lamp: var(--lamp-warn); }
.sign-stop { --sg: var(--sign-stop); --sg-ink: var(--sign-stop-ink); --lamp: var(--lamp-stop); }
.sign-rest { --sg: var(--sign-rest); --sg-ink: var(--sign-rest-ink); --lamp: var(--lamp-rest); }
.sign-shape { flex: none; }
.sign-face { fill: var(--lamp); stroke: none; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--lamp) 55%, transparent)); }
.sign-mark { fill: none; stroke: #05070a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* day: the reflective sign — solid colour, the inset keyline every highway sign carries */
:root[data-theme="day"] .sign { background: var(--sg); color: var(--sg-ink);
  box-shadow: inset 0 0 0 2px var(--sg), inset 0 0 0 3.5px color-mix(in srgb, var(--sg-ink) 88%, transparent), 0 2px 0 color-mix(in srgb, var(--sg) 60%, #000), 0 4px 8px var(--t-cast); }
:root[data-theme="day"] .sign-face { fill: var(--sg-ink); filter: none; }
:root[data-theme="day"] .sign-mark { stroke: var(--sg); }
:root[data-theme="day"] .sign { padding-left: 9px; }

/* the hero frame wears the state too (the border the tactile pass left neutral) */
@supports selector(:has(*)) {
  .hero:has(> .sign-go) { border-color: color-mix(in srgb, var(--lamp-go) 34%, var(--line)); }
  .hero:has(> .sign-warn) { border-color: color-mix(in srgb, var(--lamp-warn) 70%, var(--line)); }
  .hero:has(> .sign-stop) { border-color: color-mix(in srgb, var(--lamp-stop) 75%, var(--line)); }
  .hero:has(> .sign-rest) { border-color: color-mix(in srgb, var(--lamp-rest) 45%, var(--line)); }
  :root[data-theme="day"] .hero:has(> .sign-go) { border-color: color-mix(in srgb, var(--sign-go) 55%, var(--line)); }
  :root[data-theme="day"] .hero:has(> .sign-warn) { border-color: color-mix(in srgb, var(--sign-warn) 80%, #7a5a00); border-width: 2px; }
  :root[data-theme="day"] .hero:has(> .sign-stop) { border-color: var(--sign-stop); border-width: 2px; }
  :root[data-theme="day"] .hero:has(> .sign-rest) { border-color: color-mix(in srgb, var(--sign-rest) 60%, var(--line)); }
  /* the sign owns the top band now; the label under it no longer has to dodge the switch */
  .hero:has(> .sign) > .hero-label, .hero:has(> .sign) > .hero-lead, .hero:has(> .sign) > .tl-head .hero-label { display: block; min-height: 0; padding-right: 0; }
  .hero:has(> .sign) > .dial { margin-top: 0; }
  /* narrow phones: the switch tightens so the sign always fits beside it */
  @media (max-width: 389px) {
    .hero:has(> .card-switch) .card-switch .toggle button { padding: 0 var(--s-8) 4px; font-size: 12px; }
  }
}

/* ---------- the answer: bigger, and the stop time gets its own readout ---------- */
.hero .tl-head { align-items: flex-end; margin-bottom: var(--s-10); }
.hero .tl-main .hero-value { font-size: clamp(56px, 17vw, 72px); line-height: 1; letter-spacing: -1px; margin-top: 2px; }
.hero .tl-head .hero-stop { background: var(--screen); border: 1px solid var(--line); border-radius: var(--r-12); box-shadow: var(--t-well-in), var(--t-lip); padding: 6px 12px 7px; align-items: flex-end; margin-top: 0; }
.hero .tl-head .hero-stop-date { font-size: 12px; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.hero .tl-head .hero-stop-time { font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 32px; line-height: 1.05; }

/* ---------- CLOCKS: the four limits as a gauge cluster ---------- */
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10); padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.meter { container-type: inline-size; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 92px; padding: 10px 12px 12px; border-radius: var(--r-14); background: var(--screen); border: 1px solid var(--line); box-shadow: var(--t-well-in), var(--t-lip); font-size: 15px; }
.meter-label { font-size: 12px; letter-spacing: .08em; }
.meter-value { order: 2; text-align: left; font-size: 20px; font-size: min(22px, 12cqi); font-weight: 700; line-height: 1.1; white-space: nowrap; }
.meter-bar { order: 3; margin-top: auto; }
.meter.on { border-color: var(--accent); box-shadow: var(--t-well-in), 0 0 0 1px var(--accent), 0 0 14px var(--glow); }
.meter.on .meter-label::after { content: "sets your stop time"; display: block; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; color: var(--link); margin-top: 1px; }
.meter:not(.on) .meter-label::after { content: "\00a0"; display: block; font-size: 12px; margin-top: 1px; }
.meter:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- ROCKERS: the status dock ---------- */
.status-buttons { gap: 8px; }
.status-buttons button { min-height: 78px; padding: 12px 2px 8px; gap: 3px; font-size: 14px; letter-spacing: .01em; }
.status-buttons button .dock-ico { display: block; line-height: 0; color: var(--led, var(--muted)); }
.status-buttons button::before { top: 6px; left: 30%; right: 30%; }
/* the status you are in: the whole key is lit in its colour, ink on top (ink pairs are gated) */
.status-buttons button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--led) 92%, #fff), var(--led)); color: var(--chip-ink); border-color: var(--led); box-shadow: inset 0 3px 6px rgba(0,0,0,.28), 0 1px 0 var(--key-base), 0 0 20px color-mix(in srgb, var(--led) 40%, transparent); }
.status-buttons button.on .dock-ico { color: var(--chip-ink); }
.status-buttons button.on::before { background: var(--chip-ink); opacity: .55; box-shadow: none; }
/* not by colour alone: the lit key also carries a check, as a badge in its corner */
.status-buttons button.on > svg { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; stroke-width: 3; color: var(--chip-ink); }

/* ---------- tab bar: bigger pictures, a lamp over the one you are on ---------- */
.tabs button svg { width: 26px; height: 26px; }
.tabs button { font-size: 12px; letter-spacing: .08em; padding: 5px 4px 6px; gap: 2px; line-height: 1.2; }  /* the bar keeps its 60px slot: the dock above is pinned to it */
.tabs button.on { color: var(--text); }
.tabs button.on svg { color: var(--accent); }

/* equal-width tab cells keep min-width: 0 so nothing overflows the bar */
.tabs button { min-width: 0; }

/* ---------- driving view ---------- */
.drive-body > .sign { transform: scale(1.2); margin: 0 0 14px; }
button.drive-stop { min-height: 112px; font-size: 28px; letter-spacing: .01em; }
:root[data-theme="day"] main.drive.warn .sign, :root[data-theme="day"] main.drive.bad .sign { box-shadow: inset 0 0 0 2px var(--sg), inset 0 0 0 3.5px color-mix(in srgb, var(--sg-ink) 88%, transparent), 0 0 0 2px var(--chip-ink); }

/* the timeline's value column: a day and a time or cycle duration on ONE line ("Fri 00:11", "70h 00m left"), never stacked */
.taxis-row { grid-template-columns: 88px 1fr minmax(88px, auto); }
.taxis-row:not(.taxis-head) > .taxis-value { max-width: none; white-space: nowrap; font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 14px; }
.taxis-label { font-size: 13px; font-weight: 700; }
.taxis-row { min-height: 32px; }
@supports (grid-template-columns: subgrid) {
  .taxis { grid-template-columns: 88px minmax(0, 1fr) minmax(88px, max-content); column-gap: var(--s-6); }
}
@media (max-width: 359px) {
  .taxis-row { grid-template-columns: 64px 1fr 64px; }
  .taxis-row:not(.taxis-head) > .taxis-value { white-space: normal; max-width: 4.75em; }
  @supports (grid-template-columns: subgrid) { .taxis { grid-template-columns: 64px minmax(0, 1fr) minmax(64px, max-content); } }
}
/* the door to the less common statuses: quieter than the four rockers above it */
button.dock-more { min-height: 46px; margin-top: 8px; font-size: 14px; }

/* ---------- the sentence labels in an answer card: sentence case, read once, not decoded ----------
   (the tracked small-caps label is kept for the two-word "You can drive" inside the dial) */
.hero > .hero-label, .hero > .tl-head .hero-label { font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); line-height: 1.3; }
.hero > .tl-head .hero-label { color: var(--muted); font-size: 17px; }
/* the sign already says it: the one-line "Out of driving hours/time" label under a stop sign is a repeat */
.hero > .sign-stop + .hero-label { display: none; }
.hero > .hero-value { font-size: clamp(52px, 16vw, 68px); line-height: 1.02; margin-top: 2px; }
.hero > .hero-stop { text-transform: none; align-items: flex-start; font-size: 19px; font-weight: 700; margin-top: 6px; }
.hero > .hero-stop-date { font-size: 16px; color: var(--muted); }
.hero > .hero-lead { font-size: 20px; line-height: 1.2; margin-bottom: 8px; }

/* the status panel's four big keys light the same way the dock's do */
.big-status button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--led) 92%, #fff), var(--led)); color: var(--chip-ink); border-color: var(--led); box-shadow: inset 0 3px 6px rgba(0,0,0,.28), 0 1px 0 var(--key-base), 0 0 20px color-mix(in srgb, var(--led) 40%, transparent); }
.big-status button.on::before { background: var(--chip-ink); opacity: .55; box-shadow: none; }

/* ---------- More: explanations fold behind one row; the settings are the content ---------- */
details.help { margin: 2px 0 6px; }
details.help > summary { display: flex; align-items: center; gap: 8px; min-height: var(--ctl-floor); padding: 0 4px; color: var(--link); font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; border-radius: var(--r-10); }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary::after { content: "+"; margin-left: auto; font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 20px; font-weight: 700; color: var(--muted); padding-right: 6px; }
details.help[open] > summary::after { content: "–"; }
details.help > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.help > p { margin: 0 4px 8px; padding: 10px 12px; border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }

/* ---------- the log graph: drawn like the paper log — one stair-step line, an hour ruler (M · 6 · N · 6) ---------- */
.grid-step { stroke: var(--text); stroke-width: 2; stroke-linecap: round; opacity: .85; }
.grid-hour { fill: var(--muted); font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 12px; font-weight: 700; }
.grid-label { font-size: 13px; font-weight: 800; }
/* narrow phones: the longest sign words ("UNDER 1 HOUR", "OUT OF HOURS") keep clear of the switch */
@media (max-width: 389px) { .hero > .sign { letter-spacing: .03em; gap: 6px; padding-right: 10px; } }
/* the stop time is always in the same place: one full-width readout under the big number */
.hero .tl-head { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: var(--s-8); }
.hero .tl-head .hero-stop { flex-direction: row; justify-content: space-between; align-items: center; gap: var(--s-12); padding: 6px 14px; }
.hero .tl-head .hero-stop-date { font-size: 13px; }
/* ===== Gemini round (2026-11-19) — the live-site bug breakdown.
   D: the Log's live row had a 2-column grid (12px 1fr) for its four children, so the duration and
      chevron wrapped to a second line under the dot. It now shares the entry row's four columns
      (above); the title column is minmax(0, 1fr) and the duration never wraps.
   F: the meter's segment pattern tiled a fixed 12px period, so whatever width the bar had left a
      cut-off sliver of a segment at the right end (7px of 10 at 412px, 5px at 360px). The tile now
      rounds (background-repeat: round): a whole number of segments always fills the bar, each with
      a 1px gutter at both ends so neighbours meet as one 2px gap. The axis cap/walls are clamped
      inside the track in app.tsx; the run-past arrow now sits inside the track's right end.
   C: each strip page is a scroller whose bottom runs under the fixed tab bar (and, on Now, the
      sticky status dock), with no scroll padding — so anything scrolled into view (focus moving to
      a button, the app's own scrollIntoView) was parked behind the bars. The bottom padding that
      lets content scroll CLEAR at the end was already there; the snapport now matches it. */
.meter-bar::after { background: linear-gradient(90deg, var(--panel) 0 1px, transparent 1px calc(100% - 1px), var(--panel) calc(100% - 1px)) 0 0 / 12px 100% round; }
.page { scroll-padding-bottom: calc(61px + 12px + env(safe-area-inset-bottom)); }
.page.has-dock { scroll-padding-bottom: calc(61px + var(--dock-h, 160px) + 12px + env(safe-area-inset-bottom)); }
.flow-dots span.opt:not(.on) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }

/* Field report 2026-12-03: keep the header status pill strictly one line and clipped with ellipsis at all widths so enlarged Android font scaling can never collide with the clock. */
.top-row > .pill { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 38px; max-width: 100%; }
.top-row > .pill::before { display: inline-block; vertical-align: middle; margin: -2px 8px 0 0; }

/* ---------- A11 (audit): narrow phones (≤ 380px) give more of the screen to the answer ---------- */
@media (max-width: 380px) {
  /* the status capsule stays one line: the "· 20m" is what gives way, never the status */
  .top-row > .pill { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 40px; }
  .top-row > .pill::before { display: inline-block; vertical-align: middle; margin: -2px 9px 0 0; }
  .top-right { gap: var(--s-6); }
  /* "STOP BY FRI 20", not "STOP BY FRI NOV 20" */
  .hero-stop .sd-mon { display: none; }
  /* the dock is one row: the four statuses and a compact "…" key for PC / yard move / earlier */
  .dock { display: flex; flex-wrap: wrap; align-items: stretch; column-gap: 6px; }
  .dock > .status-undo { flex: 1 1 100%; }
  .dock > .status-buttons { flex: 1 1 0; min-width: 0; gap: 6px; }
  .dock > button.dock-more { flex: 0 0 44px; width: 44px; margin: 0; padding: 0; min-height: 0; font-size: 0; line-height: 0; }
  .dock > button.dock-more::before { content: "\22EF"; font-size: 26px; line-height: 1; }
}
/* A11: on a short screen the Split Lab's plan strip scrolls with the page instead of pinning
   ~215px of it to the top. */
@media (max-height: 760px) {
  .page .split-now-after { position: relative; } /* relative, not static: it stays the containing block of its screen-reader line */
}

/* ===================================================================================
   TASTE ROUND (2026-11-20) — C5, C6, A6, A7, A10 presentation polish.
   Existing tokens only; no palette changes.
   =================================================================================== */
/* C6 consolidated (Lorico, 2026-11-20): single header disclaimer line with Details expander — never intercepts the first tap. */
.top { flex-shrink: 0; }
details.disclaimer-line > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); min-height: 28px; cursor: pointer; list-style: none; }
details.disclaimer-line > summary::-webkit-details-marker { display: none; }
details.disclaimer-line > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-8); }
.disclaimer-text { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.disclaimer-more { font-size: 13px; font-weight: 700; color: var(--link); flex-shrink: 0; }
.disclaimer-body { margin-top: var(--s-8); padding: var(--s-8) var(--s-12) var(--s-10); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-12); font-size: 14px; color: var(--text); max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); overflow-y: auto; }
.disclaimer-body > p:first-child { margin-top: 0; }
.disclaimer-tz { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--line); }
/* C5: prevent mobile text-selection callout during the build-line long-press. */
.build-line { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: default; }
/* A6: optional bar segment inside Log-add's .ed-bar when shared by Load check. */
.ed-bar span.opt:not(.on) { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
/* A7: trip planner fields using load-check presets + steppers instead of sliders. */
.trip-field { display: flex; flex-direction: column; gap: var(--s-8); padding: var(--s-10) 0; border-top: 1px solid var(--line); }
.trip-field:first-of-type { border-top: 0; padding-top: 0; }
.trip-field-head, .trip-sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); font-size: 15px; font-weight: 700; color: var(--text); }
.trip-sub-head { margin-top: var(--s-6); font-size: 14px; color: var(--muted); }
.trip-sub-head b { color: var(--text); }
/* A10: quick-start read-out list (scroll target after import or voice entry). */
.qs-result { scroll-margin-top: 12px; }

/* ===================================================================================
   LOGPIN ROUND (2026-11-20) — Pinned Log daynav/graph + scrolling list + pinned addbtn.
   Presentation/layout only; existing tokens only.
   =================================================================================== */
.page.page-log {
  overflow-y: hidden;
  padding: 0 0 calc(61px + env(safe-area-inset-bottom));
  gap: 0;
}
.page.page-log > .log-pin {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12) var(--s-10);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.page.page-log > .log-pin > .daynav { touch-action: pan-y; }
.page.page-log > .log-pin > .log-graph-card { padding: var(--s-10) var(--s-12); touch-action: pan-y; }
.page.page-log > .log-pin .daytotals { margin-top: var(--s-8); padding-top: var(--s-6); }
.page.page-log > .log-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: auto;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
  padding: var(--s-10) var(--s-12) var(--s-16);
  scroll-padding-top: var(--s-10);
  scroll-padding-bottom: var(--s-16);
  position: relative;
  z-index: 1;
}
.page.page-log > .log-scroll::-webkit-scrollbar { display: none; }
.page.page-log > .log-scroll > * { flex-shrink: 0; }
.page.page-log > .log-foot {
  flex: 0 0 auto;
  padding: var(--s-8) var(--s-12);
  background: var(--bg);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
@media (max-width: 380px) {
  .page.page-log > .log-foot button.addbtn { font-size: 15px; padding: 8px 10px; }
}
@media (max-height: 700px) {
  .page.page-log > .log-pin { gap: var(--s-4); padding: var(--s-4) var(--s-12) var(--s-6); }
  .page.page-log > .log-pin > .log-graph-card { padding: var(--s-8) var(--s-10); }
  .page.page-log > .log-pin .daytotals { margin-top: var(--s-4); padding-top: var(--s-4); font-size: 14px; line-height: 1.2; }
  .page.page-log > .log-pin .daytotals .small { font-size: 12px; line-height: 1.2; }
  .page.page-log > .log-scroll { padding: var(--s-6) var(--s-12) var(--s-14); gap: var(--s-10); }
  .page.page-log > .log-scroll > .card { padding: var(--s-10) var(--s-12); }
  .page.page-log > .log-scroll > .card > h2 { margin-bottom: var(--s-6); }
  .page.page-log > .log-scroll > .card > .row { margin-top: var(--s-6); }
  .page.page-log > .log-foot { padding: var(--s-6) var(--s-12); }
}

/* ===================================================================================
   LOGPIN FOLLOW-ON (2026-11-20) — Log summary (PDF) controls on More → Data + @media print.
   Offline-only print stylesheet; on-screen app untouched except the Data card control row.
   =================================================================================== */
.pdf-export-row {
  display: flex;
  align-items: flex-end;
  gap: var(--s-8);
  margin-top: var(--s-10);
}
.pdf-export-row > label.pdf-days {
  flex: 0 0 88px;
  min-width: 0;
  margin-top: 0;
}
.pdf-export-row > label.pdf-days > input.num {
  text-align: center;
  font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;
  font-weight: 700;
}
.pdf-export-row > button.pdf-btn {
  flex: 1 1 auto;
  min-width: 0;
}
.pdf-export-row + .warnbox {
  margin-top: var(--s-8);
}

/* The printable log summary is hidden on screen so normal layout and scroll geometry are untouched. */
.print-report {
  display: none;
}

/* ===================================================================================
   WEEKLY RECAP VS. 34-HOUR RESET & HOME-TIME PLANNER (Plan tab tool #5)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.wrecap-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.wrecap-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.wrecap-subline { margin: 0; font-size: 14px; color: var(--text); }
.wrecap-tip { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; padding-top: var(--s-6); border-top: 1px solid var(--line); }

.wrecap-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.wrecap-colcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-14); padding: var(--s-12); display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.wrecap-colcard.win { border-color: var(--accent); background: var(--tint-accent); }
.wrecap-colcard.warn { border-color: color-mix(in srgb, var(--warn) 65%, var(--line)); }
.wrecap-colcard.bad { border-color: color-mix(in srgb, var(--bad) 65%, var(--line)); }
.wrecap-colcard .stat-value { font-size: 22px; }

.wrecap-chips { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-6); }
.wrecap-chips button { flex: 1 1 auto; min-width: 68px; min-height: 48px; padding: var(--s-8) var(--s-10); font-size: 14px; font-weight: 700; }
.wrecap-chips button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }

.wrecap-fieldrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); margin-top: var(--s-8); }
.wrecap-fieldrow label { margin-top: 0; }
.wrecap-fieldrow input, .wrecap-fieldrow select { min-height: 56px; }

.wrecap-past-pills { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-8); }
.wrecap-past-pill { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-10); padding: 4px 8px; font-size: 13px; display: inline-flex; gap: 6px; align-items: baseline; }
.wrecap-past-pill.empty { border-style: dashed; color: var(--muted); }
.wrecap-past-pill.today { border-color: var(--accent); }

.wrecap-custom-list { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.wrecap-custom-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; padding-top: var(--s-8); border-top: 1px solid var(--line); }
.wrecap-custom-day { font-weight: 700; font-size: 14px; min-width: 72px; }
.wrecap-custom-inputs { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wrecap-custom-inputs input.num { width: 58px; min-height: 56px; padding: 6px 8px; text-align: center; }
.wrecap-custom-inputs button.mini { min-height: 48px; padding: 6px 10px; font-size: 13px; }

.wrecap-days { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-10); }
.wrecap-day { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-14); padding: var(--s-10) var(--s-12); display: flex; flex-direction: column; gap: var(--s-8); }
.wrecap-day.wall { border-color: color-mix(in srgb, var(--warn) 70%, var(--line)); background: var(--tint-warn); }
.wrecap-day.wall-bad { border-color: color-mix(in srgb, var(--bad) 70%, var(--line)); background: var(--tint-bad); }
.wrecap-day-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.wrecap-day-title { font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.wrecap-drop { font-size: 13px; font-weight: 700; color: var(--good); }
.wrecap-drop.zero { color: var(--muted); font-weight: 600; }

.wrecap-badge { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.wrecap-badge.wall { background: var(--warn); color: var(--chip-ink); }
.wrecap-badge.wall-bad { background: var(--bad); color: var(--chip-ink); }
.wrecap-badge.reset { background: var(--accent-solid); color: var(--on-accent); }
.wrecap-badge.home { background: var(--good); color: var(--chip-ink); }

.wrecap-ab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.wrecap-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-10); padding: var(--s-8) var(--s-10); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wrecap-side-head { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.wrecap-side-val { font-size: 17px; font-weight: 800; }
.wrecap-side-val.good { color: var(--good); }
.wrecap-side-val.warn { color: var(--warn); }
.wrecap-side-val.bad { color: var(--bad); }
.wrecap-side-meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
.wrecap-split-note { font-size: 12px; color: var(--muted); }

/* ===================================================================================
   WORK-BACKWARDS APPOINTMENT & DEPARTURE PLANNER ("When to roll & PTA", Plan tool #6)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.rollout-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.rollout-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.rollout-subline { margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }

.rollout-steps { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-10); }
.rollout-step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-14); padding: var(--s-10) var(--s-12); display: flex; flex-direction: column; gap: var(--s-6); }
.rollout-step.highlight { border-color: var(--accent); background: var(--tint-accent); }
.rollout-step-head { display: flex; align-items: center; gap: var(--s-8); flex-wrap: wrap; }
.rollout-step-num { width: 26px; height: 26px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 13px; font-weight: 800; color: var(--text); flex-shrink: 0; }
.rollout-step.highlight .rollout-step-num { background: var(--accent-solid); border-color: var(--accent-solid); color: var(--on-accent); }
.rollout-step-title { font-size: 15px; font-weight: 800; color: var(--text); }
.rollout-time-main { font-size: 19px; font-weight: 800; color: var(--text); line-height: 1.25; }
.rollout-dual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); margin-top: 2px; }
.rollout-dual-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-10); padding: var(--s-8) var(--s-10); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rollout-dual-lbl { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rollout-dual-val { font-size: 15px; font-weight: 800; color: var(--text); }
.rollout-badge { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.rollout-badge.good { background: var(--good); color: var(--chip-ink); }
.rollout-badge.warn { background: var(--warn); color: var(--chip-ink); }
.rollout-badge.accent { background: var(--accent-solid); color: var(--on-accent); }

.rollout-pta-box { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-8); }
.rollout-pta-text { margin: 0; padding: var(--s-10) var(--s-12); background: var(--screen); border: 1px solid var(--line); border-radius: var(--r-10); font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace; font-size: 13px; line-height: 1.45; color: var(--text); white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.rollout-pta-actions { display: flex; gap: var(--s-8); flex-wrap: wrap; }
.rollout-pta-actions button { flex: 1 1 140px; min-height: 56px; font-size: 15px; font-weight: 800; }

.rollout-recovery { display: flex; flex-direction: column; gap: var(--s-8); }
.rollout-recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.rollout-recovery-item { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-10); padding: var(--s-8) var(--s-10); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rollout-recovery-item b { font-size: 15px; color: var(--text); }

.rollout-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-6); }
.rollout-seg button { min-height: 48px; padding: var(--s-8) var(--s-10); font-size: 14px; font-weight: 700; min-width: 0; }
.rollout-seg button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }

.rollout-chips { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-6); }
.rollout-chips button { flex: 1 1 auto; min-width: 58px; min-height: 48px; padding: var(--s-8) var(--s-8); font-size: 14px; font-weight: 700; }
.rollout-chips button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }

.rollout-fieldgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); margin-top: var(--s-8); }
.rollout-fieldgrid label, .rollout-fieldrow label { margin-top: 0; min-width: 0; }
.rollout-fieldgrid input, .rollout-fieldgrid select, .rollout-fieldrow input, .rollout-fieldrow select { min-height: 56px; width: 100%; min-width: 0; }
.rollout-fieldrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); margin-top: var(--s-8); }
.rollout-section { margin-top: var(--s-12); padding-top: var(--s-12); border-top: 1px solid var(--line); }
.rollout-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

@media (max-width: 360px) {
  .rollout-dual, .rollout-recovery-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===================================================================================
   SPLIT-SLEEPER RESCUE SIMULATOR ("Split-sleeper rescue", Plan tool #7)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.rescue-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.rescue-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.rescue-subline { margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }
.rescue-clocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: 2px; }
.rescue-clock-pill { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-10); padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rescue-clock-pill span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rescue-clock-pill b { font-size: 15px; color: var(--text); }

.rescue-stack { display: flex; flex-direction: column; gap: var(--s-10); margin-top: var(--s-10); }
.rescue-card { border-width: 1.5px; }
.rescue-card.is-rec { border-color: var(--good); }
.rescue-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; }
.rescue-card-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rescue-card-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.25; }
.rescue-card-order { font-size: 12px; font-weight: 700; color: var(--muted); }
.rescue-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rescue-badge { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.rescue-badge.good { background: var(--good); color: var(--chip-ink); }
.rescue-badge.warn { background: var(--warn); color: var(--chip-ink); }
.rescue-badge.bad { background: var(--bad); color: var(--chip-ink); }
.rescue-badge.accent { background: var(--accent-solid); color: var(--on-accent); }
.rescue-verdict-line { margin: var(--s-8) 0 0; font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.38; }

.rescue-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); margin-top: var(--s-8); }
.rescue-time-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-10); padding: var(--s-8) var(--s-10); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rescue-time-lbl { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rescue-time-val { font-size: 16px; font-weight: 800; color: var(--text); }
.rescue-time-sub { font-size: 12px; color: var(--muted); }

.rescue-steps { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rescue-step { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-8); padding: 6px 10px; border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 13px; }
.rescue-step.is-sb { border-left: 4px solid var(--sb); }
.rescue-step-lbl { color: var(--text); font-weight: 600; min-width: 0; }
.rescue-step-win { color: var(--muted); font-size: 12px; white-space: nowrap; }

.rescue-sb-box { margin-top: var(--s-8); padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--tint-warn); border: 1px solid var(--warn); border-left: 4px solid var(--sb); display: flex; flex-direction: column; gap: 3px; }
.rescue-sb-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.rescue-sb-block { font-size: 14px; font-weight: 800; color: var(--text); }
.rescue-sb-callout { font-size: 13px; font-weight: 800; color: var(--text); }

.rescue-trap { margin-top: var(--s-8); padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rescue-trap.warn { background: var(--tint-warn); border-color: var(--warn); }
.rescue-trap.bad { background: var(--tint-bad); border-color: var(--bad); }
.rescue-trap-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.rescue-trap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.rescue-trap-metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-10); padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rescue-trap-metric span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.rescue-trap-metric b { font-size: 16px; color: var(--text); }
.rescue-trap-note { margin: 0; font-size: 13px; color: var(--text); line-height: 1.35; }

@media (max-width: 360px) {
  .rescue-times, .rescue-trap-grid { grid-template-columns: minmax(0, 1fr); }
  .rescue-clocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===================================================================================
   STACK MY STOPS & LOADS (Plan tool #8)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.stack-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.stack-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.stack-subline { margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }
.stack-dispatch-box { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-8); }
.stack-rescues { display: flex; flex-direction: column; gap: var(--s-10); margin-top: var(--s-10); }
.stack-step-break { border-color: var(--bad); background: var(--tint-bad); }
.stack-rests { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.stack-rest-pill { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-6); padding: 6px 10px; border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.stack-rest-pill.is-sb { border-left: 4px solid var(--sb); }

.stack-editor { display: flex; flex-direction: column; gap: var(--s-12); }
.stack-dep-row { display: flex; flex-direction: column; gap: var(--s-8); }
.stack-dep-extra { display: flex; align-items: center; gap: var(--s-8); flex-wrap: wrap; }
.stack-dep-extra .stack-status-seg { flex: 1 1 200px; }

.stack-stop-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-14); padding: var(--s-12); display: flex; flex-direction: column; gap: var(--s-10); }
.stack-stop-head { display: flex; align-items: center; gap: var(--s-8); }
.stack-label-input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 8px 12px; font-size: 15px; font-weight: 800; color: var(--text); background: var(--screen); border: 1px solid var(--line); border-radius: var(--r-12); }
.stack-remove-btn, .stack-clear-btn { min-height: 48px; padding: 0 var(--s-12); flex-shrink: 0; }
.stack-sub { display: flex; flex-direction: column; gap: var(--s-6); padding-top: var(--s-8); border-top: 1px solid var(--line); }
.stack-sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.stack-dur-row { margin-top: 2px; }
.stack-status-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: 2px; }
.stack-status-seg button { min-height: 48px; padding: var(--s-6) var(--s-8); font-size: 13px; font-weight: 700; min-width: 0; }
.stack-status-seg button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }
.stack-appt-row { display: flex; align-items: stretch; gap: var(--s-8); }
.stack-appt-row > .rowbtn { flex: 1 1 auto; min-width: 0; }
.stack-tz-wrap { display: flex; flex-direction: column; gap: var(--s-6); margin-top: 2px; }
.stack-tz-wrap select { min-height: 56px; width: 100%; }
.stack-add-bar { display: flex; flex-direction: column; gap: var(--s-8); }

/* ===================================================================================
   DO I MAKE IT BACK OR MOTEL? — Meet-and-Turn & Relay Wait Cutoff Timer (Plan tool #9)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.motel-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.motel-cutoff-block { display: flex; flex-direction: column; gap: 2px; padding: var(--s-8) var(--s-12); border-radius: var(--r-12); background: var(--screen); border: 1px solid var(--line); }
.motel-cutoff-block.is-bad { border-color: var(--bad); background: var(--tint-bad); }
.motel-cutoff-block.is-warn { border-color: var(--warn); background: var(--tint-warn); }
.motel-cutoff-lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.motel-cutoff-time { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.motel-cutoff-block.is-bad .motel-cutoff-time { color: var(--bad); }
.motel-cutoff-meta { font-size: 14px; font-weight: 700; color: var(--text); }
.motel-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.motel-subline { margin: 0; font-size: 14px; color: var(--text); line-height: 1.4; }
.motel-rule-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text); align-self: flex-start; max-width: 100%; overflow-wrap: break-word; }
.motel-break-box { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 14px; line-height: 1.38; color: var(--text); }
.motel-break-box.is-covered { border-left-color: var(--good); }
.motel-break-box.is-short { border-left-color: var(--warn); }
.motel-inputs { display: flex; flex-direction: column; gap: var(--s-12); }
.motel-section { display: flex; flex-direction: column; gap: var(--s-6); padding-top: var(--s-10); border-top: 1px solid var(--line); }
.motel-section:first-child { padding-top: 0; border-top: 0; }
.motel-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.motel-dur-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; margin-top: 4px; }
.motel-bigday-warn { margin-top: var(--s-6); padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--tint-warn); border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line)); border-left: 4px solid var(--warn); font-size: 13px; line-height: 1.4; color: var(--text); }
.motel-foot { margin: var(--s-10) 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.motel-pill-bad { border-color: var(--bad) !important; background: var(--tint-bad) !important; }
.motel-pill-bad b { color: var(--bad); }

/* ===================================================================================
   CAN I LEGALLY USE IT? — 3 AM HOS Exception Sanity Check (Plan tool #10)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.legal-advisory { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--warn); font-size: 13px; line-height: 1.4; color: var(--text); margin: 0 0 var(--s-10); }
.legal-list { display: flex; flex-direction: column; gap: var(--s-8); }
.legal-home-btn { width: 100%; min-height: var(--ctl-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--s-10); padding: var(--s-10) var(--s-12); border-radius: var(--r-12); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-align: left; cursor: pointer; }
.legal-home-btn.is-myth { border-left: 4px solid var(--bad); }
.legal-home-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.legal-home-title { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.25; }
.legal-home-cite { font-size: 12px; font-weight: 700; color: var(--muted); }
.legal-home-prompt { font-size: 13px; color: var(--muted); line-height: 1.35; }
.legal-q-card { display: flex; flex-direction: column; gap: var(--s-10); }
.legal-q-step { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.legal-q-text { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--text); }
.legal-q-detail { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.legal-yn-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.legal-yn-btn { min-height: var(--ctl-lg); font-size: 17px; font-weight: 800; }
.legal-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.legal-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.legal-explain { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.legal-carrier-warn { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--tint-warn); border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line)); border-left: 4px solid var(--warn); font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text); }
.legal-reminder { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text); }
.legal-guidance { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px dashed var(--line); font-size: 13px; line-height: 1.42; color: var(--text); }
.legal-preview { display: flex; flex-direction: column; gap: var(--s-8); padding: var(--s-10); border-radius: var(--r-12); background: var(--screen); border: 1px solid var(--line); }
.legal-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.legal-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.legal-preview-col { display: flex; flex-direction: column; gap: 3px; padding: var(--s-8); border-radius: var(--r-10); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.legal-preview-col.is-after { border-color: var(--good); }
.legal-preview-lbl { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.legal-preview-time { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.legal-preview-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.legal-preview-rows { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 1px solid var(--line); font-size: 13px; }
.legal-preview-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.legal-trail { display: flex; flex-direction: column; gap: 4px; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legal-trail-row { display: flex; justify-content: space-between; gap: var(--s-8); }
.legal-actions { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-top: var(--s-4); }

/* ===================================================================================
   FLIP MY CLOCK — Shift-Start & Schedule-Flip Bridge Planner (Plan tool #11)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.flip-standing { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 13px; line-height: 1.4; color: var(--text); margin: 0 0 var(--s-10); }
.flip-controls { display: flex; flex-direction: column; gap: var(--s-12); }
.flip-field { display: flex; flex-direction: column; gap: var(--s-6); }
.flip-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.flip-shutdown-row { display: flex; align-items: stretch; gap: var(--s-8); }
.flip-shutdown-row > .rowbtn { flex: 1 1 auto; min-width: 0; }
.flip-presets { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.flip-presets button { min-height: 48px; padding: 0 var(--s-12); font-size: 14px; font-weight: 700; }
.flip-presets button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }
.flip-cards { display: flex; flex-direction: column; gap: var(--s-10); margin-top: var(--s-10); }
.flip-card { display: flex; flex-direction: column; gap: var(--s-8); }
.flip-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-8); flex-wrap: wrap; }
.flip-card-title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.25; color: var(--text); }
.flip-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--screen); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.flip-tag.is-good { border-color: var(--good); color: var(--good); }
.flip-tag.is-warn { border-color: var(--warn); color: var(--warn); }
.flip-hero { display: flex; flex-direction: column; gap: 2px; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); }
.flip-hero-lbl { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.flip-hero-time { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.flip-hero-sub { font-size: 13px; color: var(--text); line-height: 1.38; }
.flip-note { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.flip-assumption { margin: 0; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--warn); border-left: 4px solid var(--warn); font-size: 13px; line-height: 1.38; color: var(--text); }
.flip-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.flip-metric { display: flex; flex-direction: column; gap: 2px; padding: var(--s-8); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); min-width: 0; }
.flip-metric-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.flip-metric-val { font-size: 17px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.flip-segs { display: flex; flex-direction: column; gap: 6px; }
.flip-seg { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-6); padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--line); font-size: 13px; color: var(--text); }
.flip-seg.is-sb { border-left-color: var(--sb); }
.flip-seg.is-d { border-left-color: var(--good); }
.flip-seg.is-off { border-left-color: var(--accent); }
.flip-compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.flip-compare-col { display: flex; flex-direction: column; gap: 4px; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); min-width: 0; }
.flip-compare-col.is-after { border-color: var(--good); }
.flip-compare-lbl { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.flip-compare-time { font-size: 20px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.flip-compare-cycle { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.flip-compare-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
@media (max-width: 360px) {
  .flip-metrics, .flip-compare { grid-template-columns: minmax(0, 1fr); }
}

/* ===================================================================================
   MILES LEFT IN MY 70 — Weekly Miles & Governed-Truck Cycle Pace Check (Plan tool #12)
   Uses only existing palette tokens so both day and night themes keep WCAG AA contrast.
   =================================================================================== */
.miles-standing { padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 13px; line-height: 1.4; color: var(--text); margin: 0 0 var(--s-10); }
.miles-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.miles-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.miles-tank { display: flex; flex-direction: column; gap: 4px; padding: var(--s-10) var(--s-12); border-radius: var(--r-12); background: var(--screen); border: 1px solid var(--line); }
.miles-tank-lbl { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.miles-tank-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; }
.miles-hero-hours { font-size: 32px; font-weight: 800; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.miles-hero-miles { font-size: 20px; font-weight: 800; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.miles-tank-sub { font-size: 13px; color: var(--muted); line-height: 1.38; }
.miles-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.miles-metric { display: flex; flex-direction: column; gap: 2px; padding: var(--s-8); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); min-width: 0; }
.miles-metric-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.miles-metric-val { font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.miles-trim { margin: 0; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--tint-warn); border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line)); border-left: 4px solid var(--warn); font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text); }
.miles-cap-note { margin: 0; padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); border-left: 4px solid var(--accent); font-size: 13px; line-height: 1.38; color: var(--text); }
.miles-inputs { display: flex; flex-direction: column; gap: var(--s-12); }
.miles-section { display: flex; flex-direction: column; gap: var(--s-6); padding-top: var(--s-10); border-top: 1px solid var(--line); }
.miles-section:first-child { padding-top: 0; border-top: 0; }
.miles-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-8); flex-wrap: wrap; }
.miles-dow-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.miles-dow-row button { min-height: 44px; padding: 0 2px; font-size: 13px; font-weight: 700; min-width: 0; }
.miles-dow-row button.on { border: 2px solid var(--accent); background: var(--tint-accent); color: var(--text); }
.miles-days { display: flex; flex-direction: column; gap: 6px; }
.miles-day-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-6); padding: var(--s-8) var(--s-10); border-radius: var(--r-10); background: var(--screen); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.miles-day-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.miles-day-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.miles-day-sub { font-size: 12px; color: var(--muted); }
@media (max-width: 360px) {
  .miles-metrics { grid-template-columns: minmax(0, 1fr); }
  .miles-dow-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===================================================================================
   MY WEEK — Master Week Synthesizer (Plan capstone tool)
   Overarching capstone hero entry above the Plan list + verdict-first cab UI.
   =================================================================================== */
button.plan-capstone {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  text-align: left;
  padding: var(--s-16);
  border-radius: var(--r-22);
  border: 2px solid var(--accent);
  border-left: 6px solid var(--accent);
  background: linear-gradient(160deg, var(--tint-accent) 0%, transparent 55%), linear-gradient(180deg, var(--surface-hi), var(--panel));
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 8px 22px var(--drop);
  color: var(--text);
}
.plan-capstone.tone-good { border-color: var(--good); border-left-color: var(--good); }
.plan-capstone.tone-warn { border-color: var(--warn); border-left-color: var(--warn); }
.plan-capstone.tone-bad  { border-color: var(--bad);  border-left-color: var(--bad); }
.plan-capstone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  width: 100%;
}
.plan-capstone-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--link);
}
.plan-capstone-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--screen);
  color: var(--text);
  white-space: nowrap;
}
.plan-capstone-pill.tone-good { border-color: var(--good); color: var(--good); }
.plan-capstone-pill.tone-warn { border-color: var(--warn); color: var(--warn); }
.plan-capstone-pill.tone-bad  { border-color: var(--bad);  color: var(--bad); }
.plan-capstone-main {
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: var(--s-12);
  width: 100%;
}
.plan-capstone-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-14);
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-capstone-title {
  display: block;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}
.plan-capstone-sub {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}
.plan-section-head {
  margin: var(--s-6) 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* My Week room internals */
.mw-clocks-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-8) var(--s-12);
  border-radius: var(--r-12);
  background: var(--screen);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.mw-clocks-bar b { color: var(--text); font-variant-numeric: tabular-nums; }
.mw-verdict { display: flex; flex-direction: column; gap: var(--s-8); }
.mw-headline { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--text); }
.mw-subline { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.mw-note {
  margin: 0;
  padding: var(--s-8) var(--s-10);
  border-radius: var(--r-10);
  background: var(--tint-warn);
  border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line));
  border-left: 4px solid var(--warn);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.mw-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-10) var(--s-12);
  border-radius: var(--r-12);
  background: var(--tint-accent);
  border: 1px solid var(--accent);
  font-size: 13px;
  color: var(--text);
}
.mw-conflicts { display: flex; flex-direction: column; gap: var(--s-10); }
.mw-conflict {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: var(--s-12);
  border-radius: var(--r-14);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
}
.mw-conflict.sev-bad { border-left-color: var(--bad); background: linear-gradient(var(--tint-bad), var(--tint-bad)), var(--panel); }
.mw-conflict.sev-info { border-left-color: var(--accent); }
.mw-conflict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-8);
}
.mw-conflict-title { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.25; }
.mw-conflict-price {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}
.mw-conflict-body { margin: 0; font-size: 13px; line-height: 1.42; color: var(--text); }
.mw-conflict-trade { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.mw-conflict-trade b { color: var(--text); }
.mw-strat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); }
.mw-strat-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: var(--s-10) var(--s-12);
  border-radius: var(--r-14);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
  min-height: 64px;
}
.mw-strat-btn.on { border: 2px solid var(--accent); background: var(--tint-accent); }
.mw-strat-btn b { font-size: 14px; color: var(--text); }
.mw-strat-btn span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.mw-strip { display: flex; flex-direction: column; gap: var(--s-10); }
.mw-load-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-12);
  border-radius: var(--r-16);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--good);
}
.mw-load-card.tone-warn { border-left-color: var(--warn); }
.mw-load-card.tone-bad  { border-left-color: var(--bad); }
.mw-load-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  min-height: 40px;
}
.mw-load-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--good);
  white-space: nowrap;
}
.mw-load-badge.tone-warn { color: var(--warn); border-color: var(--warn); }
.mw-load-badge.tone-bad  { color: var(--bad);  border-color: var(--bad); }
.mw-load-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6);
  padding: var(--s-8);
  border-radius: var(--r-10);
  background: var(--screen);
  border: 1px solid var(--line);
  font-size: 13px;
}
.mw-load-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mw-load-cell span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mw-load-cell b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.mw-load-cell small { font-size: 12px; color: var(--muted); }
.mw-load-edit {
  display: flex;
  flex-direction: column;
  gap: var(--s-10);
  padding-top: var(--s-10);
  border-top: 1px solid var(--line);
}
.mw-field-row { display: flex; flex-direction: column; gap: 5px; }
.mw-field-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; }
.mw-drill-row { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.mw-drill-row button { flex: 1 1 140px; min-height: 44px; font-size: 13px; font-weight: 700; }
.mw-open-night {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12);
  border-radius: var(--r-12);
  background: var(--screen);
  border: 1px dashed var(--line);
  font-size: 13px;
}
.mw-stale-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-10) var(--s-12);
  border-radius: var(--r-12);
  background: var(--tint-warn);
  border: 1px solid var(--warn);
  font-size: 13px;
}
.mw-dispatch-pre {
  margin: 0;
  padding: var(--s-10);
  border-radius: var(--r-10);
  background: var(--screen);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  color: var(--text);
}
@media (max-width: 360px) {
  .mw-strat-row { grid-template-columns: minmax(0, 1fr); }
  .mw-load-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===================================================================================
   SPLIT DECISION MOTION SYSTEM
   One coherent, refresh-rate-independent motion system across the entire app.
   - Curves cap peak velocity <= 1.71x with gentle onset (v0 <= 0.64) and >= 6% travel
     in the final quarter, eliminating the 120Hz "pop + second settle" split while
     feeling identical at 60Hz, 90/120Hz, and battery saver.
   - Every entering overlay starts parked (off-screen or transparent) in its base
     state so pre-animation paints never leak a static twin.
   - Compositor-friendly properties only (transform, opacity) on all spatial motion;
     color-only transitions on Day/Night theme toggle.
   - Complete prefers-reduced-motion: reduce neutralization across every surface.
   =================================================================================== */
:root {
  --dur-press: 90ms;
  --dur-micro: 140ms;
  --dur-exit: 200ms;
  --dur-room: 240ms;
  --dur-theme: 280ms;
  --dur-sheet: 320ms;
  --ease-enter: cubic-bezier(0.22, 0.14, 0.45, 1);
  --ease-exit: ease-out;
  --ease-state: cubic-bezier(0.25, 0.10, 0.45, 1);
}

@property --bg { syntax: '<color>'; inherits: true; initial-value: #06112e; }
@property --ground-hi { syntax: '<color>'; inherits: true; initial-value: #06112e; }
@property --ground-lo { syntax: '<color>'; inherits: true; initial-value: #050e26; }
@property --panel { syntax: '<color>'; inherits: true; initial-value: #0b1a3c; }
@property --panel2 { syntax: '<color>'; inherits: true; initial-value: #11244d; }
@property --surface-hi { syntax: '<color>'; inherits: true; initial-value: #102352; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #1f3768; }
@property --tick { syntax: '<color>'; inherits: true; initial-value: #34508a; }
@property --text { syntax: '<color>'; inherits: true; initial-value: #eef5fd; }
@property --muted { syntax: '<color>'; inherits: true; initial-value: #a3b6d4; }
@property --key-hi { syntax: '<color>'; inherits: true; initial-value: #142a58; }
@property --key-lo { syntax: '<color>'; inherits: true; initial-value: #0c1c41; }
@property --key-base { syntax: '<color>'; inherits: true; initial-value: #020818; }
@property --screen { syntax: '<color>'; inherits: true; initial-value: #06122f; }
@property --t-well { syntax: '<color>'; inherits: true; initial-value: #06112e; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #5ccbea; }
@property --accent-solid { syntax: '<color>'; inherits: true; initial-value: #1857c8; }
@property --link { syntax: '<color>'; inherits: true; initial-value: #8fdcf4; }
@property --good { syntax: '<color>'; inherits: true; initial-value: #3ee08f; }
@property --warn { syntax: '<color>'; inherits: true; initial-value: #ffbd4a; }
@property --bad { syntax: '<color>'; inherits: true; initial-value: #ff6b6b; }
@property --sb { syntax: '<color>'; inherits: true; initial-value: #b09cff; }
@property --tint-warn { syntax: '<color>'; inherits: true; initial-value: rgba(255,181,71,.15); }
@property --tint-bad { syntax: '<color>'; inherits: true; initial-value: rgba(255,100,100,.15); }
@property --tint-accent { syntax: '<color>'; inherits: true; initial-value: rgba(124,200,255,.10); }
@property --edge-hi { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,.06); }
@property --drop { syntax: '<color>'; inherits: true; initial-value: rgba(0,0,0,.5); }
@property --dial-track { syntax: '<color>'; inherits: true; initial-value: #142a57; }

html {
  --ground-hi: #06112e;
  --ground-lo: #050e26;
  transition: --bg 280ms ease, --ground-hi 280ms ease, --ground-lo 280ms ease, --panel 280ms ease, --panel2 280ms ease, --surface-hi 280ms ease, --line 280ms ease, --tick 280ms ease, --text 280ms ease, --muted 280ms ease, --key-hi 280ms ease, --key-lo 280ms ease, --key-base 280ms ease, --screen 280ms ease, --t-well 280ms ease, --accent 280ms ease, --accent-solid 280ms ease, --link 280ms ease, --good 280ms ease, --warn 280ms ease, --bad 280ms ease, --sb 280ms ease, --tint-warn 280ms ease, --tint-bad 280ms ease, --tint-accent 280ms ease, --edge-hi 280ms ease, --drop 280ms ease, --dial-track 280ms ease, background-color 280ms ease, color 280ms ease;
}
html[data-theme="day"] {
  --ground-hi: #edf2f9;
  --ground-lo: #dbe4f0;
}
html[data-theme="winddown"] {
  --ground-hi: #0e0a07;
  --ground-lo: #0a0705;
}
.app {
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--ground-hi) 0%, var(--ground-lo) 100%);
}
body, .app, .card, .hero, .dock, .stat, .modal, .sheet, .pill, .toggle, .warnbox, .alertbox, .plan-icon, .limit-plate, .ed-clock, .grid, .filebtn, input, select {
  transition: background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
button {
  transition: transform var(--dur-press) var(--ease-exit), box-shadow var(--dur-press) var(--ease-exit), filter var(--dur-micro) var(--ease-exit), background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
button.entry {
  transition: transform var(--dur-press) var(--ease-exit), box-shadow var(--dur-press) var(--ease-exit), filter var(--dur-micro) var(--ease-exit), opacity var(--dur-exit) var(--ease-state), background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
button.entry.is-morph-source {
  opacity: 0.45;
}
.tabs button {
  transition: color var(--dur-micro) var(--ease-state), transform var(--dur-press) var(--ease-exit);
}
.tabs button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26%;
  right: 26%;
  height: 3px;
  border-radius: 0 0 var(--r-3) var(--r-3);
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity var(--dur-micro) var(--ease-state), transform var(--dur-micro) var(--ease-state);
}
.tabs button.on::before {
  opacity: 1;
  transform: scaleX(1);
}

/* ---------- 1. FULL-SCREEN ROOMS (Settings + all 8 Plan tools) ---------- */
/* Pure opacity cross-fade (no transform on the scroll container so sticky headers stay valid). */
.app > header.top,
.app > main.pages,
.app > nav.tabs {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-room) var(--ease-enter), visibility 0s linear 0s, background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
.app.in-room > header.top,
.app.in-room > main.pages,
.app.in-room > nav.tabs {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-exit) var(--ease-exit), visibility 0s linear var(--dur-exit), background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
.page.room {
  position: fixed;
  inset: 0;
  z-index: 20;
  flex: none;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--ground-hi) 0%, var(--ground-lo) 100%);
  overscroll-behavior: none;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
  scroll-padding-top: calc(12px + env(safe-area-inset-top));
  scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-exit) var(--ease-exit), visibility 0s linear var(--dur-exit), background-color 280ms ease, color 280ms ease;
}
.page.room.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--dur-room) var(--ease-enter), visibility 0s linear 0s, background-color 280ms ease, color 280ms ease;
}
.page.plan-room.room-swap > * {
  animation: state-dissolve var(--dur-exit) var(--ease-state) both;
}
.flow-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.flow-body.step-dissolve {
  animation: state-dissolve var(--dur-exit) var(--ease-state) both;
}
.page.settings-room {
  padding: 0 12px calc(24px + env(safe-area-inset-bottom));
  scroll-padding-top: calc(64px + env(safe-area-inset-top));
}
.page.plan-room .split-now-after {
  top: env(safe-area-inset-top);
}
.settings-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -12px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--edge-hi), 0 8px 14px -10px var(--t-cast);
  display: flex;
  align-items: center;
  gap: var(--s-8);
  transition: background-color 280ms ease, color 280ms ease, border-color 280ms ease;
}
button.back.settings-back {
  min-height: var(--ctl-floor);
  min-width: var(--ctl-floor);
  padding: 0 var(--s-12) 0 0;
  align-self: center;
}
.settings-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

/* ---------- NOW "COMES BACK" STRIP TEXT REFLOW (Lorico, 2026-11-22) ---------- */
.lever {
  gap: var(--s-8);
  padding: var(--s-8) var(--s-10) var(--s-8) var(--s-12);
}
.lever > svg {
  flex-shrink: 0;
}
.lever-text {
  min-width: 0;
  overflow-wrap: break-word;
}
.lever-text b {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.lever-sub {
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: break-word;
}
@media (max-width: 380px) {
  .lever-text b {
    font-size: 13.5px;
  }
}

/* ---------- 2. BOTTOM SHEETS (all 14 sheet kinds) ---------- */
/* Parked below the viewport in the base state so pre-animation paints never leak a static twin.
   Entrance: 320ms cubic-bezier(0.22, 0.14, 0.45, 1) — bounded velocity, no 120Hz double-motion.
   Exit: 200ms ease-out — Lorico's approved slide-down exit feel, preserved verbatim. */
.sheet-wrap {
  overflow: hidden;
}
.sheet-wrap.is-closing {
  pointer-events: none;
}
.sheet-wrap > button.sheet-backdrop {
  opacity: 0;
  animation: sheet-backdrop-in var(--dur-sheet) var(--ease-enter) both;
}
.sheet-wrap.is-closing > button.sheet-backdrop {
  animation: sheet-backdrop-out var(--dur-exit) var(--ease-exit) both;
}
.sheet {
  transform: translateY(100%);
  animation: sheet-slide-up var(--dur-sheet) var(--ease-enter) both;
  will-change: transform;
}
.sheet.is-closing {
  animation: sheet-slide-down var(--dur-exit) var(--ease-exit) both;
}
.sheet.slide-up .sheet-head h2,
.sheet.morph-origin .sheet-head h2 {
  min-width: 0;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.sheet[data-step-swap="1"] > :not(.sheet-handle):not(.sheet-head) {
  animation: state-dissolve var(--dur-micro) var(--ease-state) both;
}
@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes sheet-slide-down {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}
@keyframes sheet-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ---------- 3. LOG-ENTRY ORIGIN MORPH (EditorSheet from/into tapped Log row) ---------- */
/* FLIP geometry (--morph-dx, --morph-dy, --morph-sx, --morph-sy) is computed synchronously in
   useLayoutEffect before frame 0. Parked at the row's origin rect in the base state (zero flash).
   Falls back cleanly via .morph-fallback to sheet-slide-down when the row is off-screen or deleted. */
.sheet.morph-origin {
  opacity: 0;
  transform-origin: 50% 50%;
  transform: translate3d(var(--morph-dx, 0px), var(--morph-dy, 32px), 0) scale(var(--morph-sx, 0.92), var(--morph-sy, 0.42));
  animation: sheet-morph-in var(--dur-sheet) var(--ease-enter) both;
  will-change: transform, opacity;
}
.sheet.morph-origin.is-closing {
  animation: sheet-morph-out var(--dur-exit) var(--ease-exit) both;
}
.sheet.morph-origin.is-closing.morph-fallback {
  opacity: 1;
  animation: sheet-slide-down var(--dur-exit) var(--ease-exit) both;
}
@keyframes sheet-morph-in {
  0% {
    opacity: 0;
    transform: translate3d(var(--morph-dx, 0px), var(--morph-dy, 32px), 0) scale(var(--morph-sx, 0.92), var(--morph-sy, 0.42));
  }
  28% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1, 1);
  }
}
@keyframes sheet-morph-out {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1, 1);
  }
  72% { opacity: 0.92; }
  100% {
    opacity: 0;
    transform: translate3d(var(--morph-dx, 0px), var(--morph-dy, 32px), 0) scale(var(--morph-sx, 0.92), var(--morph-sy, 0.42));
  }
}

/* ---------- 4. CENTERED MODAL DIALOGS (DisclaimerDialog, SpeakAskDialog) ---------- */
.backdrop {
  opacity: 0;
  animation: modal-backdrop-in var(--dur-room) var(--ease-enter) both;
}
.backdrop.is-closing {
  pointer-events: none;
  animation: modal-backdrop-out var(--dur-exit) var(--ease-exit) both;
}
.backdrop > .modal {
  opacity: 0;
  transform: translate3d(0, 8px, 0) scale(0.96);
  animation: modal-enter var(--dur-room) var(--ease-enter) both;
  will-change: transform, opacity;
}
.backdrop.is-closing > .modal {
  animation: modal-exit var(--dur-exit) var(--ease-exit) both;
}
@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes modal-enter {
  from { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes modal-exit {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(0, 6px, 0) scale(0.97); }
}

/* ---------- 5. IN-PLACE STATE SWAPS & MICRO-TRANSITIONS ---------- */
/* Now hero Timeline <-> Dial dissolve (switch stays solid under the thumb). Pure opacity only. */
.hero.now-card-dissolve > :not(.card-switch) {
  animation: now-card-dissolve var(--dur-exit) var(--ease-state) both;
}
@keyframes now-card-dissolve {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes state-dissolve {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes state-reveal {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
/* Now open-day <-> End of Day chooser <-> closed-day swap */
.day-swap-in {
  animation: state-reveal var(--dur-exit) var(--ease-state) both;
}
/* Log day navigation & Entries <-> What the clocks count swap */
.log-swap-in {
  animation: state-dissolve var(--dur-exit) var(--ease-state) both;
}
/* Log RODS grid horizontal day-slide (slidepatch, 2026-11-28) — transforms only, zero layout shift at rest. */
.log-grid-stage {
  position: relative;
}
.log-grid-stage.is-sliding {
  overflow: hidden;
  border-radius: var(--r-10);
}
.log-grid-pane {
  display: block;
}
.log-grid-pane.log-grid-outgoing {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.log-grid-pane.log-grid-enter-left {
  animation: log-grid-enter-left 280ms ease-out both;
  will-change: transform;
}
.log-grid-pane.log-grid-exit-left {
  animation: log-grid-exit-left 280ms ease-out both;
  will-change: transform;
}
.log-grid-pane.log-grid-enter-right {
  animation: log-grid-enter-right 280ms ease-out both;
  will-change: transform;
}
.log-grid-pane.log-grid-exit-right {
  animation: log-grid-exit-right 280ms ease-out both;
  will-change: transform;
}
@keyframes log-grid-enter-left {
  from { transform: translate3d(100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes log-grid-exit-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}
@keyframes log-grid-enter-right {
  from { transform: translate3d(-100%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes log-grid-exit-right {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(100%, 0, 0); }
}
/* DrivingView arrival */
main.drive.drive-enter {
  animation: state-dissolve var(--dur-exit) var(--ease-state) both;
}

/* ---------- UNIVERSAL REDUCED-MOTION OVERRIDE ---------- */
@media (prefers-reduced-motion: reduce) {
  html,
  body, .app, .card, .hero, .dock, .stat, .modal, .sheet, .pill, .toggle, .warnbox, .alertbox, .plan-icon, .limit-plate, .ed-clock, .grid, .filebtn, input, select,
  button, button.entry, .tabs button, .tabs button::before,
  .app > header.top, .app > main.pages, .app > nav.tabs,
  .app.in-room > header.top, .app.in-room > main.pages, .app.in-room > nav.tabs,
  .page.room, .page.room.is-active, .settings-head {
    transition: none;
  }
  .sheet,
  .sheet.is-closing,
  .sheet-wrap > button.sheet-backdrop,
  .sheet-wrap.is-closing > button.sheet-backdrop,
  .sheet.slide-up,
  .sheet.slide-up.is-closing,
  .sheet-wrap.slide-up > button.sheet-backdrop,
  .sheet-wrap.slide-up.is-closing > button.sheet-backdrop,
  .sheet.morph-origin,
  .sheet.morph-origin.is-closing,
  .sheet.morph-origin.is-closing.morph-fallback,
  .sheet-wrap.morph-origin > button.sheet-backdrop,
  .sheet-wrap.morph-origin.is-closing > button.sheet-backdrop,
  .backdrop,
  .backdrop.is-closing,
  .backdrop > .modal,
  .backdrop.is-closing > .modal,
  .hero.now-card-dissolve > :not(.card-switch),
  .page.plan-room.room-swap > *,
  .flow-body.step-dissolve,
  .sheet[data-step-swap="1"] > :not(.sheet-handle):not(.sheet-head),
  .day-swap-in,
  .log-swap-in,
  .log-grid-pane.log-grid-enter-left,
  .log-grid-pane.log-grid-exit-left,
  .log-grid-pane.log-grid-enter-right,
  .log-grid-pane.log-grid-exit-right,
  main.drive.drive-enter {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .log-grid-pane.log-grid-outgoing {
    display: none;
  }
  button.entry.is-morph-source {
    opacity: 1;
  }
}

@page {
  size: letter portrait;
  margin: 0.45in 0.5in;
}

@media print {
  html, body {
    height: auto !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #0b1117 !important;
  }
  .app.has-print-report {
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    background: #ffffff !important;
  }
  .app.has-print-report > :not(.print-report) {
    display: none !important;
  }
  .app.has-print-report > .print-report {
    display: block !important;
    /* Crisp daylight ink palette on paper regardless of whether the driver is in Night mode. */
    --bg: #ffffff;
    --panel: #ffffff;
    --panel2: #f1f4f7;
    --screen: #f6f8fa;
    --line: #c3cbd3;
    --tick: #7f8c99;
    --text: #0b1117;
    --muted: #45525f;
    --good: #0f7a40;
    --warn: #8a5200;
    --bad: #b32020;
    --sb: #5b3fc4;
    --accent: #0b56c0;
    --tint-warn: #fef6e7;
    color: var(--text);
    background: #ffffff;
    font: 9.5pt/1.38 "Atkinson Hyperlegible Next", -apple-system, system-ui, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-report .pr-head {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid #0b1117;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-report .pr-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .print-report .pr-app {
    font-size: 8.5pt;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0b56c0;
  }
  .print-report .pr-app-sub {
    font-weight: 600;
    color: #45525f;
    text-transform: none;
    letter-spacing: 0;
  }
  .print-report .pr-title {
    margin: 2px 0 0;
    font-size: 17pt;
    font-weight: 800;
    line-height: 1.1;
    color: #0b1117;
  }
  .print-report .pr-count-badge {
    padding: 4px 10px;
    border: 1.5px solid #0b56c0;
    border-radius: 999px;
    background: #eef5fc;
    color: #0b56c0;
    font-family: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;
    font-size: 9pt;
    font-weight: 700;
    white-space: nowrap;
  }
  .print-report .pr-disclaimer {
    margin: 8px 0 10px;
    padding: 7px 10px;
    background: #fef6e7;
    border: 1px solid #d9b066;
    border-left: 4px solid #8a5200;
    border-radius: 6px;
    font-size: 8.5pt;
    font-weight: 700;
    color: #0b1117;
  }
  .print-report .pr-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    margin: 0;
  }
  .print-report .pr-meta dt {
    font-size: 7.5pt;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #45525f;
  }
  .print-report .pr-meta dd {
    margin: 1px 0 0;
    font-size: 9pt;
    font-weight: 600;
    color: #0b1117;
  }
  .print-report .pr-range-totals {
    margin-top: 10px;
    padding: 7px 10px;
    background: #f6f8fa;
    border: 1px solid #c3cbd3;
    border-radius: 8px;
  }
  .print-report .pr-range-label {
    font-size: 7.5pt;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #45525f;
    margin-bottom: 5px;
  }
  .print-report .pr-range-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .print-report .pr-tot {
    display: flex;
    flex-direction: column;
    padding-left: 7px;
    border-left: 3px solid #c3cbd3;
  }
  .print-report .pr-tot span { font-size: 8pt; color: #45525f; }
  .print-report .pr-tot b { font-size: 10pt; color: #0b1117; }
  .print-report .pr-tot-D { border-left-color: #0f7a40; }
  .print-report .pr-tot-ON { border-left-color: #8a5200; }
  .print-report .pr-tot-OFF { border-left-color: #45525f; }
  .print-report .pr-tot-SB { border-left-color: #5b3fc4; }

  .print-report .pr-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .print-report .pr-day {
    border: 1px solid #c3cbd3;
    border-radius: 10px;
    padding: 9px 11px;
    background: #ffffff;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-report .pr-day-noduty {
    background: #fafbfc;
  }
  .print-report .pr-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
  }
  .print-report .pr-day-title {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .print-report .pr-day-head h2 {
    margin: 0;
    font-size: 10.5pt;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: #0b1117;
  }
  .print-report .pr-noduty-tag {
    padding: 1px 7px;
    border: 1px solid #c3cbd3;
    border-radius: 999px;
    background: #f1f4f7;
    color: #45525f;
    font-size: 7.5pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .print-report .pr-day-sub {
    font-size: 8pt;
    color: #45525f;
    text-align: right;
  }

  .print-report .pr-day-graph .grid {
    background: #f6f8fa;
    border: 1px solid #d5dce3;
    border-radius: 6px;
    box-shadow: none;
    max-height: 116px;
  }
  .print-report .s-D, .print-report .s-ON {
    filter: none !important;
  }
  .print-report .grid-step {
    stroke: #0b1117;
    opacity: .8;
  }

  .print-report .pr-day-totals {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #d5dce3;
    gap: 6px;
  }
  .print-report .pr-day-totals > div {
    padding: 2px 6px;
    border-left: 3px solid #c3cbd3;
    text-align: left;
  }
  .print-report .pr-day-totals > div.pr-tot-D { border-left-color: #0f7a40; }
  .print-report .pr-day-totals > div.pr-tot-ON { border-left-color: #8a5200; }
  .print-report .pr-day-totals > div.pr-tot-OFF { border-left-color: #45525f; }
  .print-report .pr-day-totals > div.pr-tot-SB { border-left-color: #5b3fc4; }
  .print-report .pr-day-totals .small { font-size: 8pt; color: #45525f; }
  .print-report .pr-day-totals b { font-size: 9.5pt; color: #0b1117; }

  .print-report .pr-entries {
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid #e1e6ec;
  }
  .print-report .pr-noduty-msg {
    margin: 2px 0 0;
    font-size: 8.5pt;
    font-style: italic;
    color: #45525f;
  }
  .print-report .pr-entry-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .print-report .pr-entry {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 58px;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    border-top: 1px solid #edf1f5;
    font-size: 8.5pt;
  }
  .print-report .pr-entry:first-child {
    border-top: 0;
    padding-top: 1px;
  }
  .print-report .pr-entry .dot {
    width: 8px;
    height: 8px;
  }
  .print-report .pr-entry-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: #0b1117;
  }
  .print-report .pr-live-tag {
    padding: 0 5px;
    border: 1px solid #0b56c0;
    border-radius: 999px;
    color: #0b56c0;
    font-size: 7pt;
    font-weight: 700;
    text-transform: uppercase;
  }
  .print-report .pr-entry .eld-tag {
    margin-top: 0;
    padding: 0 5px;
    font-size: 7.5pt;
  }
  .print-report .pr-entry-time {
    color: #45525f;
    font-size: 8.2pt;
    white-space: nowrap;
  }
  .print-report .pr-entry-len {
    text-align: right;
    font-weight: 700;
    color: #0b1117;
    white-space: nowrap;
  }

  .print-report .pr-foot {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid #9aa6b2;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .print-report .pr-foot-disclaimer {
    margin: 0;
    font-size: 7.5pt;
    font-weight: 700;
    color: #45525f;
  }
  .print-report .pr-foot-meta {
    margin: 2px 0 0;
    font-size: 7pt;
    color: #5c6a78;
  }
}

/* ===================================================================================
   CLOCK 14 DESIGN LANGUAGE (Opus UI pass, 2026-11-25) — derived from Lorico's logo.
   Read AUDIT.md §0 for the cue system. In one breath:
     FIELD   navy, lit from the top (the logo's rounded square): --ground-hi → --ground-lo,
             --chrome for the header / dock / tab bar, --panel / --screen for surfaces and wells.
     BEZEL   light blue (--ring / --accent, the clock ring and the truck): every INDICATOR —
             tool icons, the selected state, focus, the "you are here" lamp — is a ring.
     FACE    royal blue (--accent-solid, the clock face): the one solid commit key per screen.
     HAND    orange (--hand, the second hand): means NOW and nothing else — the dial's moving
             tip, the timeline's present edge, the live clock. Never a status, never a warning.
     TICKS   the hour marks: section labels are led by a short tick; scales stay ticked.
     SHAPES  containers are rounded squares (the logo tile); indicators are circles (the dial).
     TYPE    Atkinson Hyperlegible for words, its Mono for every clock; titles heavy and
             tight like the CLOCK 14 wordmark; uppercase only for small tracked labels.
   This block only re-skins: no element changes size class below the 48/56/64 control scale.
   =================================================================================== */

/* ---- FIELD: the chrome is navy, not black ---- */
.top { background: var(--chrome); border-bottom-color: var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--ring) 55%, transparent) 50%, transparent 100%); }
.dock { background: var(--chrome); }
.tabs { background: linear-gradient(180deg, color-mix(in srgb, var(--chrome) 70%, var(--panel)), var(--chrome)); }
html { --t-well: var(--screen); }
html[data-theme="day"] { --t-well: #d5deeb; --t-grip: linear-gradient(180deg, #ffffff, #e7eef8); --t-grip-edge: #8fa3c2; }
html { --t-grip: linear-gradient(180deg, #7d93b8, #536a92); --t-grip-edge: #22365f; }
label input, label select { background: var(--screen); }
.sheet-backdrop, button.sheet-backdrop { background: rgba(2,8,26,.62); }

/* ---- the header: one line, the live clock is the HAND ---- */
.top .pill { font-size: 14px; min-height: 40px; padding: 0 var(--s-12); }
.top .clock { color: var(--text); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.top .clock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hand); box-shadow: 0 0 6px color-mix(in srgb, var(--hand) 70%, transparent); flex: none; }
/* the theme key keeps its words for screen readers and wide screens; on a phone the sun/moon says it */
.theme-word { margin-left: 2px; }
@media (max-width: 439px) { .theme-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.top-right { gap: var(--s-6); }

/* ---- TICKS: section labels are led by an hour mark ---- */
.card > h2:first-child, .plan-section-head, .mw-section-head { display: flex; align-items: center; gap: 8px; }
.card > h2:first-child::before, .plan-section-head::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--ring); flex: none; box-shadow: 0 0 6px var(--glow); }
h1.screen-title { font-size: 27px; font-weight: 800; letter-spacing: -.01em; line-height: 1.12; margin: 6px 2px 2px; }

/* ---- HAND: orange means now ---- */
.dial-cap { fill: var(--hand); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--hand) 75%, transparent)); }
:root[data-theme="day"] .dial-cap { fill: var(--hand); stroke: #fff; stroke-width: 3px; }
.dial-fill { stroke: var(--ring); }
.taxis-track { position: relative; }
.taxis-row:not(.taxis-head) .taxis-track::before { content: ""; position: absolute; left: 0; top: -2px; bottom: -2px; width: 2px; border-radius: 1px; background: var(--hand); opacity: .9; pointer-events: none; z-index: 3; }

/* ---- BEZEL: indicators are rings ---- */
.plan-icon, .plan-capstone-icon {
  border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--surface-hi), var(--screen) 75%);
  border: 2px solid var(--ring); color: var(--ring);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 14%, transparent), 0 0 12px -2px var(--glow);
}
:root[data-theme="day"] .plan-icon, :root[data-theme="day"] .plan-capstone-icon { box-shadow: inset 0 0 0 2px rgba(11,86,192,.10); }
.tabs button.on svg { color: var(--ring); filter: drop-shadow(0 0 6px var(--glow)); }
.tabs button.on::before { background: var(--ring); }
button:focus-visible, .plan-item:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---- FACE: the commit key is the royal clock face with a lit bezel edge ---- */
button.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-solid) 88%, #fff), var(--accent-solid)); border-color: color-mix(in srgb, var(--ring) 55%, var(--accent-solid)); }

/* ---- PLAN: the capstone is the clock, the twelve tools are a rack of dials ---- */
button.plan-capstone {
  border: 2px solid var(--ring); border-left-width: 2px; border-radius: var(--r-22);
  background:
    radial-gradient(140% 90% at 100% 0%, color-mix(in srgb, var(--accent-solid) 30%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-hi), var(--panel));
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 0 0 4px color-mix(in srgb, var(--ring) 10%, transparent), 0 10px 26px var(--drop);
}
.plan-capstone.tone-good, .plan-capstone.tone-warn, .plan-capstone.tone-bad { border-left-width: 2px; }
.plan-capstone-kicker { color: var(--ring); }
.plan-capstone-main { grid-template-columns: 56px 1fr 24px; }
.plan-capstone-icon { width: 56px; height: 56px; }
.plan-capstone-title { font-size: 23px; letter-spacing: -.01em; }
.plan-rack { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10); }
.plan-rack > .plan-item {
  min-height: 148px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s-10);
  padding: var(--s-14) var(--s-12) var(--s-12); border-radius: var(--r-18);
  background: linear-gradient(180deg, var(--surface-hi), var(--panel)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 6px 14px var(--drop);
}
.plan-rack > .plan-item:active { border-color: var(--ring); }
.plan-rack > .plan-item > svg:last-child { display: none; }  /* the whole tile is the door; the chevron was for a row */
.plan-rack .plan-icon { width: 46px; height: 46px; }
.plan-rack .plan-icon svg { width: 22px; height: 22px; }
.plan-rack .plan-text { gap: var(--s-4); font-size: 16px; min-width: 0; }
.plan-rack .plan-text b { font-size: 16px; line-height: 1.2; font-weight: 800; }
.plan-rack .plan-text .small { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.plan-section-head { margin: var(--s-12) 2px 0; color: var(--muted); }

/* ---- rows that stayed rows (Now's ELD check, Recap's shortcuts): the ring language too ---- */
.plan-item > svg:last-child { color: var(--ring); }

/* ---- the back key on every room reads as a way home, in the bezel colour ---- */
button.back { color: var(--link); }

/* ---- cards: the logo tile's corner, a lit top edge in the bezel colour ---- */
.card, .hero { border-color: color-mix(in srgb, var(--ring) 14%, var(--line)); }
.hero { background: radial-gradient(90% 70% at 50% 30%, color-mix(in srgb, var(--accent-solid) 22%, var(--surface-hi)) 0%, var(--panel) 72%); }
:root[data-theme="day"] .hero { background: radial-gradient(90% 70% at 50% 30%, #ffffff 0%, var(--panel) 72%); }

/* ===================================================================================
   NAVY1 OVERHAUL (2026-11-26) — Night-mode research fixes (A1–A4) + driver-first UI
   overhaul (B1–B7). Built exclusively on the existing design-token system (Day, Night,
   Wind-down) with zero parallel palette.
   =================================================================================== */

/* ---- A1: brighter navy #0d2a64 (--raised-hi) on headers/cards/raised panels ONLY ---- */
.top { background: linear-gradient(180deg, color-mix(in srgb, var(--raised-hi) 46%, var(--chrome)) 0%, var(--chrome) 100%); }
.settings-head { background: linear-gradient(180deg, color-mix(in srgb, var(--raised-hi) 42%, var(--chrome)) 0%, var(--chrome) 100%); }
.hero {
  background:
    radial-gradient(110% 60% at 50% 0%, color-mix(in srgb, var(--raised-hi) 52%, transparent) 0%, transparent 65%),
    linear-gradient(180deg, var(--surface-hi), var(--panel));
}
:root[data-theme="day"] .hero { background: radial-gradient(90% 70% at 50% 30%, #ffffff 0%, var(--panel) 72%); }
button.plan-capstone {
  background:
    radial-gradient(130% 85% at 95% 0%, color-mix(in srgb, var(--raised-hi) 68%, transparent) 0%, transparent 62%),
    linear-gradient(180deg, var(--surface-hi), var(--panel));
}
:root[data-theme="day"] button.plan-capstone {
  background:
    radial-gradient(140% 90% at 100% 0%, color-mix(in srgb, var(--accent-solid) 14%, transparent) 0%, transparent 60%),
    linear-gradient(180deg, var(--surface-hi), var(--panel));
}

/* ---- A3: Wind-down tactile & surface refinements (zero pure #000/#FFF) ---- */
html[data-theme="winddown"] {
  --t-well: var(--screen);
  --t-grip: linear-gradient(180deg, #8b725b, #5e4b3a);
  --t-grip-edge: #382a1e;
  --t-well-in: inset 0 2px 5px rgba(8,5,3,.78), inset 0 0 0 1px rgba(8,5,3,.45);
  --t-lip: 0 1px 0 rgba(240,196,145,.07);
  --t-bevel: rgba(8,5,3,.5);
  --t-cast: rgba(8,5,3,.55);
  --t-press: inset 0 2px 6px rgba(8,5,3,.72);
  --t-accent-lo: color-mix(in srgb, var(--accent-solid) 82%, #120c07);
  --t-accent-skirt: color-mix(in srgb, var(--accent-solid) 48%, #120c07);
}
:root[data-theme="winddown"] .s-D { filter: drop-shadow(0 0 2px rgba(102,199,140,.35)); }
:root[data-theme="winddown"] .s-ON { filter: drop-shadow(0 0 2px rgba(239,180,77,.35)); }
:root[data-theme="winddown"] .sheet-backdrop,
:root[data-theme="winddown"] button.sheet-backdrop { background: rgba(10,7,5,.70); }
:root[data-theme="winddown"] .backdrop { background: rgba(10,7,5,.72); }
:root[data-theme="winddown"] button.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-solid) 90%, #f5eadc), var(--accent-solid));
  border-color: color-mix(in srgb, var(--ring) 50%, var(--accent-solid));
  box-shadow: inset 0 1px 0 rgba(245,234,220,.20), inset 0 -1px 0 rgba(18,12,7,.28), 0 3px 0 var(--t-accent-skirt), 0 5px 10px var(--t-cast);
}
:root[data-theme="winddown"] .sign {
  background: color-mix(in srgb, var(--sg) 22%, #120c07);
}
:root[data-theme="winddown"] .sign-mark { stroke: #120c07; }
:root[data-theme="winddown"] .status-buttons button.on,
:root[data-theme="winddown"] .big-status button.on {
  background: linear-gradient(180deg, color-mix(in srgb, var(--led) 92%, #f5eadc), var(--led));
  box-shadow: inset 0 3px 6px rgba(18,12,7,.30), 0 1px 0 var(--key-base), 0 0 14px color-mix(in srgb, var(--led) 28%, transparent);
}
:root[data-theme="winddown"] .app.is-demo .hero::after { color: rgba(228,206,180,.05); }

/* ---- A4: HOS status never by color alone (glyphs & concise badges) ---- */
.viol-ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin: 4px 0; }
.viol-ok > svg { flex: none; stroke-width: 2.5; }
.viol-glyph { display: inline-block; font-weight: 800; margin-right: 6px; color: var(--bad); }
.viol-glyph.nominal { color: var(--warn); }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.stat-tone-tag {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  background: var(--panel); border: 1px solid var(--line);
}
.stat-tone-tag.bad { color: var(--bad); border-color: var(--bad); background: var(--tint-bad); }
.stat-tone-tag.warn { color: var(--warn); border-color: var(--warn); background: var(--tint-warn); }
.stat-tone-tag.good { color: var(--good); border-color: var(--good); }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.card-head-row > h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head-row > h2::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--ring); flex: none; box-shadow: 0 0 6px var(--glow); }
.card-status-badge {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  background: var(--screen); border: 1px solid var(--line); color: var(--text);
}
.card-status-badge.good { border-color: var(--good); color: var(--good); }
.card-status-badge.warn { border-color: var(--warn); color: var(--warn); background: var(--tint-warn); }
.card-status-badge.bad { border-color: var(--bad); color: var(--bad); background: var(--tint-bad); }
.entry-title-row { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.live-badge {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  background: var(--tint-accent); border: 1px solid var(--ring); color: var(--link);
}
.taxis-row.is-binding .taxis-label { color: var(--text); font-weight: 800; }
.taxis-row.is-binding .taxis-value { color: var(--link); }
.taxis-bind { color: var(--hand); margin-right: 4px; font-size: 12px; vertical-align: 0; }
.mw-conflict-glyph { font-weight: 800; margin-right: 2px; }
.mw-conflict-glyph.sev-bad { color: var(--bad); }
.mw-conflict-glyph.sev-warn { color: var(--warn); }
.mw-conflict-glyph.sev-info { color: var(--link); }

/* ---- B1: Plan hub grouped 2-column racks with balanced orphan tiles ---- */
.plan-section-head { margin: var(--s-14) 2px var(--s-2); font-size: 12px; font-weight: 800; letter-spacing: .10em; color: var(--muted); }
.plan-rack { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10); }
.plan-rack > .plan-item { min-height: 136px; padding: var(--s-12); gap: var(--s-8); }
.plan-rack > .plan-item:last-child:nth-child(odd) {
  grid-column: 1 / -1; min-height: 82px; flex-direction: row; align-items: center; gap: var(--s-12); padding: var(--s-12) var(--s-14);
}
.plan-rack > .plan-item:last-child:nth-child(odd) .plan-text { flex: 1; }
.plan-rack > .plan-item:last-child:nth-child(odd) > svg:last-child { display: block; flex: none; color: var(--ring); }
.plan-rack .plan-text .small { -webkit-line-clamp: 2; line-clamp: 2; }

/* ---- B2: Unified tool header subtitle ---- */
.tool-sub { margin: -6px 2px 4px; line-height: 1.38; }

/* ---- B3: Now cohesive Shift actions card + hero & dock polish ---- */
.shift-actions-card { padding: var(--s-14); }
.shift-actions-list { display: flex; flex-direction: column; gap: var(--s-10); }
.shift-actions-list > .plan-item { background: var(--t-key); border-radius: var(--r-16); }
.shift-actions-list > .rowbtn { background: var(--t-key); }
.hero-foot { padding-top: var(--s-8); border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); margin-top: var(--s-8); }
.dock { position: sticky; }
.dock::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--ring) 42%, transparent) 50%, transparent 100%);
}
.meter { transition: border-color 180ms ease, box-shadow 180ms ease; }

/* ---- B4: Log status-keyed day totals & chrome framing ---- */
.page.page-log > .log-pin,
.page.page-log > .log-foot { background: var(--chrome); }
.daytotals > div {
  position: relative; padding: 8px 4px 2px; border-radius: var(--r-8);
}
.daytotals > div::before {
  content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 3px;
  border-radius: 2px; background: var(--led, var(--muted)); opacity: .85;
}

/* ---- B5: Legal 3 AM quick-jump strip ---- */
.legal-quick {
  display: flex; flex-wrap: wrap; gap: var(--s-6); margin: 0 0 var(--s-10);
}
.legal-quick button.mini {
  flex: 1 1 auto; min-height: 48px; padding: var(--s-8) var(--s-10);
  font-size: 13px; font-weight: 800; border-radius: var(--r-pill);
}

/* ===================================================================================
   NOPIN / STARTUP: 2.5s LAUNCH INTRO & SETTINGS DRIVER NAME CHROME
   Sequence: pure black -> quick fade-in -> muted playsinline teaser video -> quick
   fade-out to deep navy (#06112e -> #050e26, matching the navy .app ground) -> Now.
   Graceful splash-art fallback on error/blocked autoplay.
   =================================================================================== */
.launch-intro {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.launch-intro-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
}
.launch-intro-video {
  object-fit: contain;
  background: #000000;
  transition: opacity 220ms ease-out;
}
@media (max-aspect-ratio: 3/4) {
  .launch-intro-video {
    object-fit: cover;
  }
}
.launch-intro-fallback {
  background-color: #020614;
  background-image: url('./splash-1080x1920.webp');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (max-aspect-ratio: 1/2) {
  .launch-intro-fallback {
    background-image: url('./splash-1179x2556.webp');
  }
}
.launch-intro.is-playing .launch-intro-video,
.launch-intro.is-fallback .launch-intro-fallback {
  opacity: 1;
}
.launch-intro.is-black-out {
  background-color: #06112e;
  background-image: linear-gradient(180deg, #06112e 0%, #050e26 100%);
}
.launch-intro.is-black-out .launch-intro-splash {
  visibility: hidden;
}
.launch-intro.is-black-out .launch-intro-video,
.launch-intro.is-black-out .launch-intro-fallback {
  opacity: 0;
  transition: opacity 220ms ease-in;
}
@media (prefers-reduced-motion: reduce) {
  .launch-intro-video,
  .launch-intro-fallback {
    transition: none;
  }
}

/* ---- Settings header pill & editable Driver name card ---- */
.driver-avatar {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .02em;
  color: var(--text);
  background: radial-gradient(circle at 50% 38%, var(--surface-hi), var(--screen) 78%);
  border: 2px solid var(--ring);
  box-shadow: 0 0 10px -2px var(--glow);
}
.driver-avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 12px;
  border-width: 1.5px;
}
.settings-driver-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-pill);
  background: var(--screen);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  max-width: 150px;
}
.settings-driver-text {
  overflow: hidden;
  white-space: nowrap;
}
.driver-card-id {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  margin-bottom: var(--s-12);
}
.driver-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.driver-card-meta b {
  font-size: 18px;
  font-weight: 800;
}
.driver-name-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

/* ===================================================================================
   Receptionfix additions: ELD refresh & staleness, Log scratchpad,
   Email bug report, Settings backup nudge, iOS install warning, Inline clock override.
   =================================================================================== */
.eld-shot-cta {
  margin: 6px 0 8px;
}
.eld-help-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.eld-guide-picker,
.eld-guide-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eld-guide-search {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
}
.eld-guide-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.eld-guide-row {
  min-height: 52px;
}
.eld-guide-row.is-generic {
  border-color: color-mix(in srgb, var(--ring) 45%, var(--line));
}
.eld-guide-chev {
  font-size: 20px;
  color: var(--muted);
  line-height: 1;
}
.eld-guide-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.eld-guide-back {
  min-height: 44px;
  padding: 4px 0;
  font-weight: 700;
}
.eld-guide-title {
  margin: 0;
  font-size: 1.15rem;
}
.eld-guide-screen-note {
  padding: 10px 12px;
  border-radius: var(--r-12);
  background: var(--tint-accent);
  border: 1px solid color-mix(in srgb, var(--ring) 45%, var(--line));
}
.eld-guide-steps {
  margin: 4px 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
}
.eld-guide-day {
  margin: 2px 0;
}
.log-scratchpad-note {
  margin: 0 0 6px;
  text-align: center;
}
.log-compare-cta {
  margin: 0;
}
.drift-day-banner {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: var(--r-8);
  background: var(--tint-accent);
  border: 1px solid color-mix(in srgb, var(--ring) 40%, var(--line));
  font-size: 14px;
}
.totals-compare-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}
.totals-compare-row {
  padding: 10px 12px;
  border-radius: var(--r-8);
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bug-email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 6px;
}
.backup-nudge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: var(--r-12);
  background: var(--tint-accent);
  border: 1px solid color-mix(in srgb, var(--ring) 45%, var(--line));
}
.backup-nudge-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ios-install-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
}
.clock-override-bar {
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: var(--r-12);
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clock-override-bar.is-custom {
  border-color: color-mix(in srgb, var(--ring) 60%, var(--line));
  background: var(--tint-accent);
}
.clock-override-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.clock-override-acts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.clock-override-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ===================================================================================
   LANDSCAPE BATCH (2026-11-29)
   1) Portrait-neutral base containers (.now-col-main, .now-col-side, .settings-grid,
      .drive-stage, .log-pin-head) — ZERO portrait layout change.
   2) Optional tractor mileage prompts (.odo-prompt, .odo-notice, .odo-cal-row).
   3) First-run walkthrough overlay (.walkthrough-card), Sample Shift bar (.sample-shift-bar),
      and Simplified First Screen (.first-run-questions).
   4) Full Landscape Rework (@media (orientation: landscape) and (min-width: 600px)):
      wide 24-hour Log graph centerpiece + 2-column Now cockpit + multi-column Plan deck +
      2-column Settings bento + 2-column Driving cab glance cluster + compact chrome.
   All colors use existing Day / Night / Wind-down tokens only.
   =================================================================================== */

/* ---- Portrait-neutral structural wrappers (100% unchanged portrait geometry) ---- */
.now-col-main,
.settings-grid,
.drive-stage {
  display: contents;
}
.now-col-main > *,
.now-col-side > *,
.hero {
  flex-shrink: 0;
}
.now-col-side {
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}

/* ---- Wide 24-hour RODS grid styling (landscape centerpiece) ---- */
.grid-wide .grid-label { font-size: 13px; }
.grid-wide .grid-hour { font-size: 12px; fill: var(--muted); }
.grid-wide .grid-hour.major { font-weight: 800; fill: var(--text); }
.grid-tick.half { stroke: var(--line); stroke-width: .5; opacity: .45; }

/* ---- Optional tractor mileage prompt (non-blocking, single-tap skippable) ---- */
.odo-prompt {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding: var(--s-10) var(--s-12);
  border-radius: var(--r-14);
  background: linear-gradient(180deg, var(--surface-hi), var(--panel));
  border: 1px solid color-mix(in srgb, var(--ring) 45%, var(--line));
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 6px 14px var(--drop);
}
.odo-prompt.is-drive {
  padding: var(--s-8) var(--s-10);
  gap: var(--s-6);
}
.odo-prompt-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.odo-prompt-head b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.odo-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--s-6);
  align-items: center;
}
.odo-prompt-row input.odo-input {
  min-height: 48px;
  text-align: left;
  font-size: 16px;
}
.odo-prompt-row button.mini {
  min-height: 48px;
  padding: 0 var(--s-14);
}
.odo-err {
  margin: 0;
}
.odo-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12);
  border-radius: var(--r-12);
  background: var(--tint-accent);
  border: 1px solid color-mix(in srgb, var(--ring) 45%, var(--line));
  color: var(--text);
}
.odo-notice button.mini {
  min-height: 40px;
  flex: none;
}
.odo-cal-row {
  align-items: center;
  margin-top: 6px;
}
.odo-cal-row > span { flex: 1 1 180px; }
.odo-cal-row > button { flex: 0 0 auto; min-height: 44px; }
main.drive[data-has-odo-prompt="1"] .dial {
  max-width: min(70vw, 240px);
}

/* ---- Sample shift pill & Simplified first screen ---- */
.sample-shift-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12);
  border-radius: var(--r-12);
  background: var(--tint-accent);
  border: 1px solid color-mix(in srgb, var(--ring) 55%, var(--line));
}
.sample-shift-bar > span.small { flex: 1 1 140px; }
.sample-shift-bar > button.mini { min-height: 40px; flex: none; }
.sample-shift-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.first-run-questions {
  display: flex;
  flex-direction: column;
  gap: var(--s-10);
}
.first-run-q-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.first-run-q-list > .plan-item {
  background: var(--panel2);
  min-height: 72px;
}
.first-run-more-btn {
  margin-top: var(--s-4);
  font-size: 16px;
}

/* ---- First-run in-app walkthrough overlay (on the real app screens, 1-tap skippable) ---- */
.walkthrough-card {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--dock-h, 138px) + 68px + env(safe-area-inset-bottom));
  z-index: 35;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--s-14) var(--s-16);
  border-radius: var(--r-18);
  background: linear-gradient(180deg, var(--surface-hi), var(--panel));
  border: 2px solid var(--ring);
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 0 0 3px color-mix(in srgb, var(--ring) 14%, transparent), 0 16px 34px var(--drop);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}
.walkthrough-card.walkthrough-tab-log {
  bottom: calc(68px + env(safe-area-inset-bottom));
}
.walkthrough-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
}
.walkthrough-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ring);
}
button.walkthrough-skip {
  min-height: 44px;
  padding: 0 var(--s-8);
  font-size: 15px;
}
.walkthrough-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
.walkthrough-dots span {
  height: 4px;
  border-radius: var(--r-3);
  background: var(--panel2);
}
.walkthrough-dots span.on {
  background: var(--ring);
}
.walkthrough-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.walkthrough-body {
  margin: 0;
  line-height: 1.4;
  color: var(--text);
}
.walkthrough-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s-8);
  margin-top: var(--s-2);
}
.walkthrough-actions button.mini {
  min-height: 48px;
  padding: 0 var(--s-16);
  font-weight: 800;
}

/* ===================================================================================
   LANDSCAPE REWORK (@media (orientation: landscape) and (min-width: 600px))
   Portrait (<600px or orientation: portrait) is completely unaffected.
   =================================================================================== */
@media (orientation: landscape) and (min-width: 600px) {
  /* ---- Compact horizontal chrome: reclaim vertical height for cab ergonomics ---- */
  .top {
    padding: calc(4px + env(safe-area-inset-top)) 16px 5px;
  }
  .top .pill {
    min-height: 36px;
    padding: 0 var(--s-12);
    font-size: 14px;
  }
  .theme-btn,
  .gear-btn {
    min-height: 40px;
    padding: 4px 10px;
  }
  .tabs {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabs button {
    min-height: 46px;
    padding: 4px 10px;
    flex-direction: row;
    gap: 8px;
    font-size: 13px;
  }
  .page {
    padding: 10px 16px calc(56px + env(safe-area-inset-bottom));
    gap: var(--s-10);
  }
  .page.has-dock {
    padding-bottom: calc(47px + env(safe-area-inset-bottom));
  }

  /* ---- 1. LOG TAB: wide 24-hour RODS graph centerpiece + 2-column lower deck ---- */
  .page.page-log {
    padding: 0 0 calc(47px + env(safe-area-inset-bottom));
  }
  .page.page-log > .log-pin {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 8px 16px 10px;
    column-gap: var(--s-12);
    row-gap: var(--s-6);
  }
  .page.page-log > .log-pin > .daynav {
    grid-column: 1;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .page.page-log > .log-pin > .daynav .icon-btn {
    width: 44px;
    height: 44px;
  }
  .page.page-log > .log-pin > .daynav .daynav-title {
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: var(--s-10);
    flex-wrap: wrap;
    font-size: 17px;
  }
  .page.page-log > .log-pin > .log-scratchpad-note {
    grid-column: 2;
    margin: 0;
    text-align: right;
    white-space: nowrap;
  }
  .page.page-log > .log-pin > .log-graph-card {
    grid-column: 1 / -1;
    padding: var(--s-10) var(--s-14);
  }
  .page.page-log > .log-pin .daytotals {
    margin-top: var(--s-6);
    padding-top: var(--s-6);
    gap: var(--s-10);
  }
  .page.page-log > .log-pin .daytotals > div {
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: var(--s-8);
    padding: 6px 8px 2px;
  }
  .page.page-log > .log-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: var(--s-12);
    padding: var(--s-10) 16px var(--s-14);
  }
  .page.page-log > .log-scroll > .warnbox,
  .page.page-log > .log-scroll > .notice-line {
    grid-column: 1 / -1;
  }
  .page.page-log > .log-scroll > .card:first-of-type {
    grid-column: 1;
    grid-row: span 3;
  }
  .page.page-log > .log-scroll > .log-compare-cta,
  .page.page-log > .log-scroll > .card:not(:first-of-type) {
    grid-column: 2;
  }
  .page.page-log > .log-foot {
    padding: 6px 16px;
  }
  .page.page-log > .log-foot button.addbtn {
    min-height: 48px;
    font-size: 16px;
  }

  /* ---- 2. NOW TAB: 2-column cab cockpit + sleek single-row horizontal status dock ---- */
  .page.page-now {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    align-content: start;
    column-gap: var(--s-14);
    row-gap: var(--s-10);
  }
  .page.page-now > .warnbox,
  .page.page-now > .card.warn,
  .page.page-now > button.wide {
    grid-column: 1 / -1;
  }
  .page.page-now .now-col-main {
    display: flex;
    flex-direction: column;
    gap: var(--s-10);
    grid-column: 1;
    min-width: 0;
  }
  .page.page-now .now-col-side {
    display: flex;
    flex-direction: column;
    gap: var(--s-10);
    grid-column: 2;
    min-width: 0;
  }
  .page.page-now .hero {
    padding: var(--s-12) var(--s-14) var(--s-10);
    border-radius: var(--r-22);
  }
  .page.page-now .hero-value {
    font-size: 52px;
  }
  .page.page-now .hero-stop {
    font-size: 19px;
  }
  .page.page-now .dial {
    max-width: 220px;
  }
  .page.page-now .dock {
    grid-column: 1 / -1;
    margin: 0 -16px;
    padding: 6px 16px 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--s-10);
    row-gap: var(--s-6);
  }
  .page.page-now .dock > .status-undo {
    grid-column: 1 / -1;
    margin: 0;
  }
  .page.page-now .dock > .status-buttons {
    gap: var(--s-8);
  }
  .page.page-now .dock > .status-buttons button {
    min-height: 52px;
    flex-direction: row;
    gap: var(--s-8);
    padding: var(--s-8) var(--s-10);
    font-size: 14px;
  }
  .page.page-now .dock > .status-buttons button::before {
    top: 4px;
  }
  .page.page-now .dock > button.dock-more {
    margin-top: 0;
    width: auto;
    min-height: 52px;
    white-space: nowrap;
    padding: 0 var(--s-14);
  }

  /* ---- 3. DRIVING VIEW: 2-column cab glance cluster (fits cleanly in one landscape screen) ---- */
  main.drive {
    padding: calc(8px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));
    gap: var(--s-8);
  }
  main.drive .drive-stage {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: var(--s-16);
    min-height: 0;
  }
  main.drive .drive-body {
    padding: 0;
  }
  main.drive .dial {
    max-width: min(36vw, 220px);
  }
  main.drive .drive-num {
    font-size: clamp(36px, 6vw, 52px);
  }
  main.drive .drive-num.short {
    font-size: clamp(46px, 8vw, 68px);
  }
  main.drive .drive-head {
    font-size: 22px;
    margin-top: 4px;
  }
  main.drive .drive-why {
    font-size: 15px;
    margin-top: 4px;
  }
  main.drive .drive-foot {
    justify-content: center;
    gap: var(--s-8);
  }
  main.drive button.drive-stop {
    min-height: 76px;
    font-size: 22px;
  }

  /* ---- 4. PLAN TAB: landscape deck rules live at end of PLAN CLEAN block below ---- */

  /* ---- 5. MORE / SETTINGS ROOM: 2-column bento grid across full width ---- */
  .page.settings-room {
    padding: 0 16px calc(20px + env(safe-area-inset-bottom));
  }
  .page.settings-room .settings-head {
    margin: 0 -16px;
    padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
  }
  .page.settings-room .settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-12);
    align-items: start;
  }
  .page.settings-room .settings-grid > * {
    min-width: 0;
  }

  /* ---- 6. PLAN TOOL ROOMS & SHEETS in landscape ---- */
  .page.plan-room {
    padding: calc(10px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  }
  .sheet {
    max-width: min(740px, calc(100% - 32px));
    max-height: 92dvh;
    padding: 8px 18px calc(14px + env(safe-area-inset-bottom));
    gap: var(--s-8);
  }
  .big-status {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .big-status button {
    min-height: 76px;
    padding: var(--s-14) var(--s-12) var(--s-10);
    font-size: 16px;
  }

  /* ---- 7. Walkthrough card in landscape: compact right-side card leaving graph & clocks clear ---- */
  .walkthrough-card {
    left: auto;
    right: 16px;
    bottom: calc(54px + env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 32px));
    margin: 0;
    padding: var(--s-12) var(--s-14);
  }
  .walkthrough-card.walkthrough-tab-log {
    bottom: calc(54px + env(safe-area-inset-bottom));
  }
}

/* Short-height landscape phones (e.g. 844x390, 915x412, 740x360):
   Let the Log page scroll smoothly as one cohesive deck so the wide 24-hour graph
   dominates on open AND entries + ELD compare remain spacious and easy to scroll. */
@media (orientation: landscape) and (min-width: 600px) and (max-height: 540px) {
  .page.page-log {
    overflow-y: auto;
  }
  .page.page-log > .log-scroll {
    flex: 0 0 auto;
    overflow-y: visible;
    min-height: auto;
  }
  .page.page-now .dock {
    position: relative;
    bottom: auto;
  }
}

/* Wide tablets / desktop landscape (>= 980px): 2-column Now */
@media (orientation: landscape) and (min-width: 980px) {
  .page.page-now {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

/* Price build: draft results are inaccessible until the driver completes a full run. */
.price-result[hidden], .plan-capstone [hidden], .mw-load-badge[hidden] { display: none !important; }
[data-price-locked="1"]::after { content: "Locked · $9.99 once"; font-size: .8rem; font-weight: 700; }
.plan-item[data-price-locked="1"]::after { grid-column: 2 / -1; }

.plain-rules-entry { gap: var(--s-12); }
.plain-rules-entry > .plan-text { flex: 1; }
.plain-rules-entry > svg { flex: none; color: var(--accent); }
.plain-rules-note { margin: 0 2px; }
.plain-rules-search {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-12);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.plain-rules-list { display: grid; gap: var(--s-8); }
.plain-rules-list > h2 { margin: 4px 2px; }
.plain-rule { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-12); }
.plain-rule > summary { min-height: 48px; padding: 12px 14px; font-weight: 700; cursor: pointer; }
.plain-rule > summary::marker { color: var(--accent); }
.plain-rule > summary:focus-visible, .plain-rules-search:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.plain-rule-body { border-top: 1px solid var(--line); padding: 14px; max-width: 72ch; }
.plain-rule-body h3 { margin: 14px 0 4px; font-size: 1rem; }
.plain-rule-body h3:first-child { margin-top: 0; }
.plain-rule-body p { margin: 0 0 6px; line-height: 1.45; }
/* Price build: compact trial line on the Plan hub (full card lives in Settings, and on the hub once locked). */
.price-status-line { margin: 0 2px; line-height: 1.38; }

/* ===================================================================================
   PLAN CLEAN — Calm, driver-job grouped Plan panel.
   One flagship hero (My Week) with the exclusive glowing bezel medallion, followed by
   four unified instrument cards (Loads & trips, Splits & clock fixes, Cycle & recaps,
   Rules & exceptions) with full-width one-thumb rows, unclipped plain-language
   subtitles, inset hairline dividers, and a composed lock badge when trial ends.
   Scoped strictly to .page-plan so Now, Log, and Recap .plan-item rows stay untouched.
   =================================================================================== */
.page-plan .plan-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.page-plan .plan-head > h1.screen-title {
  margin: 4px 2px 0;
}
.page-plan .price-status-line {
  margin: 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}
.page-plan .price-status-line b {
  color: var(--text);
  font-weight: 700;
}
.page-plan button.plan-capstone {
  padding: var(--s-16);
  gap: var(--s-10);
  border-color: color-mix(in srgb, var(--ring) 78%, var(--line));
}
.page-plan button.plan-capstone.tone-good { border-color: var(--good); }
.page-plan button.plan-capstone.tone-warn { border-color: var(--warn); }
.page-plan button.plan-capstone.tone-bad  { border-color: var(--bad); }
.page-plan .plan-capstone-main {
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  gap: var(--s-12);
}
.page-plan .plan-capstone-icon {
  width: 52px;
  height: 52px;
}
.page-plan .plan-capstone-copy {
  min-width: 0;
}
.page-plan .plan-capstone-title {
  font-size: 21px;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.page-plan .plan-capstone-sub {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.35;
}
.page-plan .plan-capstone-main > svg:last-child {
  color: var(--ring);
  justify-self: end;
}
.page-plan button.plan-capstone[data-price-locked="1"]::after {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.page-plan .plan-groups {
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  margin-top: var(--s-4);
}
.page-plan .plan-group {
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  min-width: 0;
}
.page-plan .plan-section-head {
  margin: 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-plan .plan-rack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--r-18);
  background: linear-gradient(180deg, var(--surface-hi), var(--panel));
  border: 1px solid color-mix(in srgb, var(--ring) 14%, var(--line));
  box-shadow: inset 0 1px 0 var(--edge-hi), 0 6px 16px var(--drop);
  overflow: hidden;
}
.page-plan .plan-rack > .plan-item,
.page-plan .plan-rack > .plain-rules-entry,
.page-plan .plan-rack > .plan-item:last-child:nth-child(odd) {
  position: relative;
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  column-gap: var(--s-12);
  row-gap: 0;
  padding: var(--s-12) var(--s-14);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-column: auto;
  flex-direction: unset;
}
.page-plan .plan-rack > :not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 68px;
  right: 14px;
  height: 1px;
  background: color-mix(in srgb, var(--line) 74%, transparent);
  pointer-events: none;
}
.page-plan .plan-rack > .plan-item:active,
.page-plan .plan-rack > .plain-rules-entry:active {
  background: color-mix(in srgb, var(--tint-accent) 85%, transparent);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.page-plan .plan-rack > .plan-item:focus-visible,
.page-plan .plan-rack > .plain-rules-entry:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: -3px;
  border-radius: var(--r-10);
}

.page-plan .plan-rack .plan-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-12);
  background: var(--screen);
  border: 1px solid color-mix(in srgb, var(--ring) 24%, var(--line));
  color: var(--accent);
  box-shadow: inset 0 1px 0 var(--edge-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
:root[data-theme="day"] .page-plan .plan-rack .plan-icon {
  border-color: color-mix(in srgb, var(--accent) 20%, var(--line));
  box-shadow: none;
}
.page-plan .plan-rack .plan-icon svg {
  width: 20px;
  height: 20px;
}

.page-plan .plan-rack .plan-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 16px;
}
.page-plan .plan-rack .plan-text b {
  font-size: 16px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--text);
}
.page-plan .plan-rack .plan-text .small {
  font-size: 13px;
  line-height: 1.32;
  color: var(--muted);
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.page-plan .plan-rack > .plan-item > svg:last-child,
.page-plan .plan-rack > .plain-rules-entry > svg:last-child,
.page-plan .plan-rack > .plan-item:last-child:nth-child(odd) > svg:last-child {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--tick);
  justify-self: end;
}
.page-plan .plan-rack > .plan-item:active > svg:last-child,
.page-plan .plan-rack > .plain-rules-entry:active > svg:last-child,
.page-plan .plan-rack > .plan-item:focus-visible > svg:last-child,
.page-plan .plan-rack > .plain-rules-entry:focus-visible > svg:last-child {
  color: var(--ring);
}

.page-plan .plan-rack > .plan-item[data-price-locked="1"] > .plan-icon,
.page-plan .plan-rack > .plan-item[data-price-locked="1"] > svg:last-child {
  grid-row: 1 / span 2;
}
.page-plan .plan-rack > .plan-item[data-price-locked="1"]::after {
  grid-column: 2 / 3;
  grid-row: 2;
  justify-self: start;
  margin-top: 6px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--screen);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

/* Landscape deck for Plan Clean: 2 balanced columns of grouped cards */
@media (orientation: landscape) and (min-width: 600px) {
  .page.page-plan .plan-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-14) var(--s-16);
    align-items: start;
  }
  .page.page-plan button.plan-capstone {
    padding: var(--s-14) var(--s-16);
    gap: var(--s-6);
  }
  .page.page-plan .plan-capstone-icon {
    width: 48px;
    height: 48px;
  }
  .page.page-plan .plan-capstone-main {
    grid-template-columns: 48px minmax(0, 1fr) 20px;
  }
}
@media (orientation: landscape) and (min-width: 980px) {
  .page.page-plan .plan-groups {
    gap: var(--s-16) var(--s-20);
  }
}

/* Terms of Use inside Settings -> About */
.terms-of-use { display: flex; flex-direction: column; gap: var(--s-8); }
.terms-of-use h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.terms-of-use h4 { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--text); }
.terms-of-use p { margin: 0; line-height: 1.45; }
.terms-of-use ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.terms-of-use li { line-height: 1.4; }
