/* ─────────────────────────────────────────────────────────────────────
   The driver tablet (phase 1, option A "next action"). Owner branch dtab-driver.

   Designed for HALF of the Armor Pad 4 Ultra's landscape screen, beside
   Waze in split screen (about 661 x 728 CSS px), and checked at full screen
   (1333 x 800) and on a 390 phone. Day and night: night puts design-tokens'
   .dark class on <html> (and data-theme="night"), so the surfaces and text
   follow the shared dark tokens; the few tablet roles below are aliases.

   Rules (tests/test_dtab_driver_ui.py parses this file):
     - colours only as tokens: no colour literal outside a :root block;
     - every tap target at least 56 px high (the main action 64 px);
     - every input's text at least 16 px (the tablet's keyboard zooms below);
     - numbers in tabular figures; no hover-only controls; motion <= 200 ms.
   ───────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/static/fonts/inter-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces and text: the shared tokens (dark ones under .dark). */
  --t-bg: var(--color-bg);
  --t-surface: var(--color-surface);
  --t-surface-alt: var(--color-surface-alt);
  --t-text: var(--color-text);
  --t-muted: var(--color-text-muted);
  --t-border: var(--color-border);
  --t-border-strong: var(--color-border-strong);
  /* The navy strip and the one gold thing that matters now. */
  --t-hero: var(--color-brand-900);
  --t-hero-text: var(--color-text-invert);
  --t-hero-muted: color-mix(in srgb, var(--color-text-invert) 76%, transparent);
  --t-hero-line: color-mix(in srgb, var(--color-text-invert) 22%, transparent);
  --t-hero-eyebrow: var(--color-accent-warm);
  --t-gold: var(--color-accent);
  --t-gold-text: var(--color-accent-text);
  --t-on-gold: var(--color-brand-900);
  --t-btn: var(--color-brand-900);
  --t-btn-text: var(--color-text-invert);
  --t-accent: var(--color-accent-text);
  /* Status (functional only, never editorial). */
  --t-ok: var(--color-success);
  --t-ok-bg: var(--color-success-bg);
  --t-warn: var(--color-warning);
  --t-warn-bg: var(--color-warning-bg);
  --t-bad: var(--color-danger);
  --t-bad-bg: var(--color-danger-bg);
  --t-scrim: var(--color-overlay);
  --t-shadow: var(--shadow-sm);
  --t-focus: var(--shadow-focus);
  color-scheme: light;
}

:root[data-theme="night"] {
  --t-hero: var(--color-brand-900);
  --t-btn: var(--color-accent-warm);
  --t-btn-text: var(--color-brand-900);
  --t-accent: var(--color-accent-warm);
  --t-gold-text: var(--color-accent-warm);
  --t-ok-bg: color-mix(in srgb, var(--color-success) 18%, transparent);
  --t-warn-bg: color-mix(in srgb, var(--color-warning) 20%, transparent);
  --t-bad-bg: color-mix(in srgb, var(--color-danger) 20%, transparent);
  --t-scrim: color-mix(in srgb, var(--color-bg) 82%, transparent);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body.dt {
  background: var(--t-bg);
  color: var(--t-text);
  font-family: 'Inter', var(--font-sans);
  font-size: 18px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* Element-only (0,0,1) so every .dt-btn-* colour wins over them. */
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.ic { width: 1em; height: 1em; flex: none; }
.dt-tnum, .dt-clock, .dt-big, .dt-row-time, .dt-input, .dt-count b { font-variant-numeric: tabular-nums; }
.only-night { display: none !important; }
:root[data-theme="night"] .only-night { display: inline-block !important; }
:root[data-theme="night"] .only-day { display: none !important; }
:focus-visible { outline: 3px solid var(--t-gold); outline-offset: 2px; }

/* ── Header: brand · who · status · Dispatch · moon. Wraps to two lines at
      half width rather than scrolling sideways. ───────────────────────── */
.dt-head {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 8px;
  padding: 8px 12px 8px 16px;
  background: var(--t-surface);
  border-bottom: 1px solid var(--t-border);
}
.dt-brand { display: flex; flex-direction: column; line-height: 1; flex: none; }
.dt-word { font-weight: 800; letter-spacing: .24em; font-size: 17px; }
.dt-sub {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--t-accent);
  font-weight: 800; margin-top: 5px; padding-top: 4px; border-top: 2px solid var(--t-gold);
  align-self: flex-start;
}
.dt-who {
  display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1 1 0;
  padding-left: 12px; border-left: 1px solid var(--t-border);
}
.dt-who b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-who span { font-size: 15px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-time { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.dt-clock { font-size: 22px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.dt-head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.dt-head-tools .dt-btn { padding: 0 14px; font-size: 17px; }
.dt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--t-ok); flex: none; display: inline-block; }
.dt-dot.is-off { background: var(--t-warn); }
/* No signal (or taps still to send): a bar across the header's foot. */
.dt-offbar {
  flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  margin: 0 -12px -8px -16px; padding: 8px 16px; background: var(--t-warn-bg); border-top: 1px solid var(--t-warn);
  font-size: 16px; font-weight: 700;
}
.dt-offbar span { font-weight: 500; color: var(--t-muted); }
.dt-sq {
  width: 56px; height: 56px; min-height: 56px; border-radius: 14px; border: 1px solid var(--t-border-strong);
  background: var(--t-surface); display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer; padding: 0; flex: none;
}
@media (min-width: 1000px) {
  .dt-head { padding: 10px 20px; column-gap: 16px; }
  .dt-who b { font-size: 19px; }
  .dt-clock { font-size: 24px; }
  .dt-offbar { margin: 0 -20px -10px; padding: 8px 20px; }
}
/* A phone: brand and name on the first line, clock and buttons on the second. */
@media (max-width: 560px) {
  .dt-who { flex: 1 1 calc(100% - 140px); }
  .dt-head-tools { margin-left: auto; }
}
/* The real tablet's half beside Waze is 583 px (Ulefone, 2026-10-08), not the
   661 designed for: the wordmark gives its room to the driver's name and
   shift, which were cut to "Test · C…" / "On shift sin…". Portrait (706 px)
   keeps it: everything fit there. */
@media (min-width: 561px) and (max-width: 680px) {
  .dt-head:has(.dt-who) > .dt-brand { display: none; }
  .dt-head:has(.dt-who) > .dt-who { padding-left: 0; border-left: 0; }
}
/* Words that only fit full screen ("Open" in "Open Waze beside"). */
@media (max-width: 680px) { .dt-half-hide { display: none; } }

/* ── Buttons: big, verbs, one primary per screen ─────────────────────── */
.dt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 20px; border-radius: 14px; border: 2px solid transparent;
  font-size: 19px; font-weight: 700; line-height: 1.1; text-align: center; text-decoration: none;
  cursor: pointer; white-space: normal; text-wrap: balance; min-width: 0;
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
.dt-btn .ic { font-size: 24px; }
.dt-btn:active { transform: translateY(1px); }
.dt-btn-xl { min-height: 64px; font-size: 22px; border-radius: 16px; }
.dt-btn-xl .ic { font-size: 26px; }
.dt-btn-block { width: 100%; }
.dt-btn-primary { background: var(--t-btn); color: var(--t-btn-text); }
.dt-btn-gold { background: var(--t-gold); color: var(--t-on-gold); }
.dt-btn-ghost { background: var(--t-surface); color: var(--t-text); border-color: var(--t-border-strong); }
.dt-btn-quiet { background: transparent; color: var(--t-text); border-color: var(--t-border); }
.dt-btn-onhero { background: transparent; color: var(--t-hero-text); border-color: var(--t-hero-line); }
.dt-btn-bad { background: var(--t-surface); color: var(--t-bad); border-color: var(--t-bad); }
.dt-btn[disabled], .dt-btn.is-off { opacity: .42; cursor: not-allowed; }
.dt-btn small { font-size: 15px; font-weight: 600; opacity: .85; }
.dt-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.dt-row3 { display: flex; flex-wrap: wrap; gap: 10px; }
.dt-row3 > .dt-btn { flex: 1 1 auto; }

/* ── Layout ───────────────────────────────────────────────────────────── */
.dt-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.dt-narrow { max-width: 640px; margin: 0 auto; width: 100%; }
.dt-main > .dt-narrow { max-width: 760px; }
.dt-has-bar .dt-main { padding-bottom: 104px; }
.dt-cols { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1000px) {
  .dt-main.dt-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; gap: 20px; padding: 20px; }
}

/* ── Switch driver: the bar on Today and the notices (owner 2026-10-06).
      The next driver taking over the car ends the last one's shift and signs
      in. Today: under the trip lists, beside End shift (owner 2026-10-08:
      never above the line-up card). The notices: on top. ─────────────── */
.dt-shiftbar {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 8px 8px 8px 16px; border-radius: 18px;
  background: var(--t-surface); border: 1px solid var(--t-border); box-shadow: var(--t-shadow);
}
.dt-shiftbar-w { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dt-shiftbar-w b { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.dt-shiftbar-w span { font-size: 15px; color: var(--t-muted); }
.dt-shiftbar .dt-btn { flex: none; }
@media (min-width: 1000px) {
  .dt-two > .dt-col-a { grid-column: 1; }
  .dt-two > .dt-col-b { grid-column: 2; }
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.dt-card {
  background: var(--t-surface); border: 1px solid var(--t-border); border-radius: 18px;
  padding: 16px 18px; box-shadow: var(--t-shadow); min-width: 0;
}
.dt-card-h {
  font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-muted);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.dt-eyebrow { font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--t-gold-text); }
.dt-h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 10px; }
.dt-h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.dt-lede { font-size: 18px; color: var(--t-muted); margin-bottom: 12px; }
.dt-fine { font-size: 15px; color: var(--t-muted); padding: 0 4px; }
.dt-pre { white-space: pre-line; overflow-wrap: anywhere; }

/* The navy next-action card. */
.dt-hero {
  background: var(--t-hero); color: var(--t-hero-text); border-radius: 20px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.dt-hero .dt-eyebrow { color: var(--t-hero-eyebrow); }
.dt-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.dt-big small { font-size: 20px; font-weight: 600; color: var(--t-hero-muted); letter-spacing: 0; }
.dt-hero-sub { font-size: 19px; color: var(--t-hero-muted); }
.dt-hero-sub b { color: var(--t-hero-text); }
.dt-hero .dt-chips { margin-top: 6px; }
.dt-hero .dt-chip { background: color-mix(in srgb, var(--t-hero-text) 10%, transparent); border-color: var(--t-hero-line); color: var(--t-hero-text); }
@media (min-width: 1000px) { .dt-big { font-size: 40px; } }

/* ── The ticket (owner 2026-10-31: option A "Ticket", from the "Skyward"
      flight-app reel). A trip as a boarding pass: the navy top says where from
      and where to, a dotted line with the car on it between them; a
      perforation; then the few facts a driver checks at a glance, label over
      value. A countdown chip says when to leave. ──────────────────────── */
.dt-tk { padding: 0; gap: 0; border-radius: 22px; box-shadow: var(--shadow-md); }
.dt-tk-top { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dt-tk-top > .dt-big { margin-top: -2px; }
.dt-tk-eb { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; min-height: 36px; }
.dt-tk-eb .dt-eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-tk-eb .dt-btn { flex: none; }
/* The perforation: a dashed line with a notch cut from each edge. */
.dt-tk-perf { position: relative; height: 0; margin: 0 22px; border-top: 2px dashed var(--t-hero-line); }
.dt-tk-perf::before, .dt-tk-perf::after {
  content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--t-bg);
}
.dt-tk-perf::before { left: -35px; }
.dt-tk-perf::after { right: -35px; }
.dt-tk-bot { padding: 14px 20px 16px; }

/* The countdown chip: "Leave in 8 min", "Pickup in 25 min", "Stop 1 of 2". */
.dt-cd {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--t-hero-eyebrow) 22%, transparent); color: var(--t-hero-text);
  font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none;
}
.dt-cd::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--t-hero-eyebrow); flex: none; }
.dt-cd.is-now { background: color-mix(in srgb, var(--t-warn) 34%, transparent); }
.dt-cd.is-now::before { background: var(--t-warn); }
/* On a white card (the collect line under the buttons). */
.dt-cd.on-card { background: color-mix(in srgb, var(--t-gold) 12%, var(--t-surface)); color: var(--t-text); border: 1px solid var(--t-gold); white-space: normal; }
.dt-cd.on-card::before { background: var(--t-gold); }

/* The route: a dot, a dotted line with the car, a dot. On the ticket or a card. */
.dt-rt { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; min-width: 0; }
.dt-rt-pt, .dt-rt-mid { display: contents; }
.dt-rt-dot {
  width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; justify-self: center; margin-top: 6px;
}
.dt-rt-pt.is-to .dt-rt-dot { background: currentColor; }
.dt-rt-pt.is-now .dt-rt-dot { border-color: var(--t-gold); background: var(--t-gold); }
.dt-rt-pt.is-done .dt-rt-dot { background: currentColor; opacity: .6; }
.dt-rt-w { display: flex; flex-direction: column; min-width: 0; }
.dt-rt-w b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.dt-rt-w span { font-size: 16px; color: var(--t-muted); overflow-wrap: anywhere; }
.dt-rt-w .dt-said { color: var(--t-ok); font-weight: 700; }
.dt-rt-pt.is-done .dt-rt-w b { opacity: .62; font-weight: 700; }
.dt-rt-pt.is-now .dt-rt-w b { font-size: 28px; letter-spacing: -.015em; }
.dt-rt-line { justify-self: center; width: 0; min-height: 40px; border-left: 3px dotted var(--t-border-strong); position: relative; }
.dt-rt-car {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--t-surface); color: var(--t-text);
}
.dt-rt-note { align-self: center; font-size: 15px; font-weight: 700; color: var(--t-muted); padding: 2px 0; }
.dt-tk .dt-rt-w span, .dt-tk .dt-rt-note { color: var(--t-hero-muted); }
.dt-tk .dt-rt-line { border-left-color: var(--t-hero-muted); }
.dt-tk .dt-rt-car { background: var(--t-hero); color: var(--t-hero-text); }
.dt-tk .dt-chips { margin-top: 2px; }
/* Chip tones that read on the navy (the light ones are for white cards). */
.dt-tk .dt-chip.t-gold { color: var(--t-hero-eyebrow); border-color: var(--t-hero-eyebrow); }
.dt-tk .dt-chip.t-amber { background: color-mix(in srgb, var(--t-warn) 30%, transparent); border-color: var(--t-warn); color: var(--t-hero-text); }
.dt-tk .dt-chip.t-red { background: color-mix(in srgb, var(--t-bad) 34%, transparent); border-color: var(--t-bad); color: var(--t-hero-text); }
.dt-tk .dt-chip.t-ok { background: color-mix(in srgb, var(--t-ok) 30%, transparent); border-color: var(--t-ok); color: var(--t-hero-text); }
.dt-tk .dt-rt-w .dt-said { color: var(--t-hero-eyebrow); }

/* Label-over-value boxes (the reel's GATE / DATE / FLIGHT / SEAT). */
.dt-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.dt-cells.n1 { grid-template-columns: minmax(0, 1fr); }
.dt-cells.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dt-cells.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dt-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dt-cell i { font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-muted); }
.dt-cell b { font-size: 21px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dt-tk .dt-cell i { color: var(--t-hero-muted); }
@media (max-width: 420px) { .dt-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tabs with counts (the lists beside the ticket: one at a time). */
.dt-tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  border-radius: 16px; background: var(--t-surface-alt); border: 1px solid var(--t-border);
}
.dt-tab {
  min-height: 56px; border-radius: 12px; border: 0; background: transparent; color: var(--t-text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; min-width: 0;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.dt-tab b { font-size: 18px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-tab span { font-size: 14px; font-weight: 600; color: var(--t-muted); white-space: nowrap; font-variant-numeric: tabular-nums;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* A new or changed trip on this tab: an amber dot by its name (the tab may not be the one shown). */
.dt-tab.has-flag b::after {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: var(--t-warn);
  vertical-align: middle;
}
.dt-tab.is-on { background: var(--t-btn); color: var(--t-btn-text); box-shadow: var(--shadow-sm); }
.dt-tab.is-on span { color: color-mix(in srgb, var(--t-btn-text) 78%, transparent); }

/* Mini tickets: each trip in a list is its own small card; a line-up trip's
   fare sits on a stub behind a dashed line. */
.dt-rows.dt-mt { gap: 10px; }
.dt-rows.dt-mt > li + li { border-top: 0; }
.dt-mt > li:not(.dt-empty) {
  background: var(--t-surface); border: 1px solid var(--t-border); border-radius: 16px; box-shadow: var(--t-shadow); min-width: 0;
  overflow: hidden;
}
.dt-mt .dt-rowlink { min-height: 72px; padding: 8px 14px; }
.dt-mt .dt-row-time { min-width: 80px; }
.dt-row-stub {
  flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px; margin-left: 4px; padding: 6px 10px; border-left: 2px dashed var(--t-border-strong);
}
.dt-mt .dt-row-stub { margin: -8px -14px -8px 4px; }
.dt-row-stub b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dt-row-stub span { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t-muted); }

/* The Driving screen (the buttons are away while the car moves): the next
   place in big type, read in one glance (Google's car screens: 32 dp main
   text; the tablet's dp is its CSS px). */
.dt-driving .dt-hero .dt-big { font-size: 48px; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
.dt-driving .dt-hero .dt-hero-sub { font-size: 24px; }
@media (min-width: 1000px) { .dt-driving .dt-hero .dt-big { font-size: 56px; } }

/* Label / value rows (pickup, rider, drop-off, collect). */
.dt-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 0; }
.dt-kv dt {
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-muted);
  padding: 12px 0; border-top: 1px solid var(--t-border);
}
.dt-kv dd { font-size: 19px; font-weight: 600; padding: 10px 0; border-top: 1px solid var(--t-border); min-width: 0; overflow-wrap: anywhere; }
.dt-kv dt:first-of-type, .dt-kv dd:first-of-type { border-top: 0; }
.dt-kv dd span { display: block; font-size: 16px; font-weight: 500; color: var(--t-muted); margin-top: 2px; }
.dt-kv dd .dt-said { color: var(--t-ok); font-weight: 700; }
.dt-kv dd.is-now { color: var(--t-text); }
.dt-kv dt.is-now { color: var(--t-gold-text); }

/* Chips. */
.dt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dt-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  background: var(--t-surface-alt); border: 1px solid var(--t-border); font-size: 15px; font-weight: 700; white-space: nowrap;
}
.dt-chip.t-gold { border-color: var(--t-gold); color: var(--t-gold-text); }
.dt-chip.t-amber { border-color: var(--t-warn); background: var(--t-warn-bg); }
.dt-chip.t-red { border-color: var(--t-bad); background: var(--t-bad-bg); color: var(--t-bad); }
.dt-chip.t-ok { border-color: var(--t-ok); background: var(--t-ok-bg); color: var(--t-ok); }

/* Notes: amber "look at this", red "don't", green "done". */
.dt-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  background: var(--t-warn-bg); border: 1px solid var(--t-warn); font-size: 17px; font-weight: 600;
}
.dt-note .ic { font-size: 22px; color: var(--t-warn); margin-top: 1px; }
.dt-note > span { flex: 1 1 auto; min-width: 0; }
.dt-note .dt-btn { flex: none; }
.dt-note-bad { background: var(--t-bad-bg); border-color: var(--t-bad); }
.dt-note-bad .ic { color: var(--t-bad); }
.dt-note-ok { background: var(--t-ok-bg); border-color: var(--t-ok); }
.dt-note-ok .ic { color: var(--t-ok); }
.dt-note-plain { background: var(--t-surface-alt); border-color: var(--t-border); }
.dt-note-plain .ic { color: var(--t-muted); }

/* ── Trip rows (rest of today, tomorrow) ─────────────────────────────── */
.dt-rows { display: flex; flex-direction: column; }
.dt-rows > li + li { border-top: 1px solid var(--t-border); }
.dt-rowlink {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 2px; width: 100%;
  background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none;
}
.dt-row-time { font-size: 19px; font-weight: 800; min-width: 92px; flex: none; }
.dt-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dt-row-main b { font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-row-main span { font-size: 15px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-row-end { flex: none; display: flex; align-items: center; gap: 6px; }
.dt-row-end .ic { font-size: 22px; color: var(--t-muted); }
.dt-rowlink.is-done { opacity: .62; }
.dt-rowlink.is-done .dt-row-end .ic { color: var(--t-ok); }
.dt-empty { color: var(--t-muted); padding: 14px 2px; font-size: 17px; }

/* ── Forms (setup, sign-in) ──────────────────────────────────────────── */
.dt-form { display: flex; flex-direction: column; gap: 12px; }
.dt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dt-label { display: block; font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 6px; }
.dt-input {
  width: 100%; min-height: 64px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--t-border-strong);
  background: var(--t-surface); color: var(--t-text); font-size: 26px; font-weight: 700; letter-spacing: .06em;
}
.dt-input:focus { outline: none; border-color: var(--t-gold); box-shadow: var(--t-focus); }
.dt-input-code { font-size: 32px; letter-spacing: .24em; text-align: center; }
.dt-textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--t-border-strong);
  background: var(--t-surface); color: var(--t-text); font-size: 18px; line-height: 1.35; resize: vertical;
}
.dt-textarea:focus { outline: none; border-color: var(--t-gold); box-shadow: var(--t-focus); }
.dt-msg { min-height: 24px; font-size: 17px; font-weight: 600; color: var(--t-muted); }
.dt-msg.is-bad { color: var(--t-bad); }
.dt-msg.is-ok { color: var(--t-ok); }
.dt-form-card { padding: 20px; }
.dt-step { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 480px) { .dt-fields { grid-template-columns: 1fr; } }

/* ── Notices ─────────────────────────────────────────────────────────── */
.dt-notice-body { font-size: 19px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; margin: 6px 0 16px; }
.dt-notice-count { color: var(--t-muted); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 15px; }

/* ── Complete: the extras tiles ──────────────────────────────────────── */
.dt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 1000px) { .dt-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .dt-tiles { grid-template-columns: 1fr; } }
.dt-tile {
  display: flex; flex-direction: column; gap: 8px; min-height: 112px; padding: 12px 14px; border-radius: 16px;
  background: var(--t-surface); border: 2px solid var(--t-border-strong); text-align: left; min-width: 0;
}
.dt-tile.is-on { border-color: var(--t-gold); background: color-mix(in srgb, var(--t-gold) 8%, var(--t-surface)); }
.dt-tile.is-toggle { cursor: pointer; }      /* a yes/no tile toggles wherever it is pressed */
.dt-tile-top { display: flex; align-items: flex-start; gap: 10px; min-height: 56px; width: 100%;
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.dt-tile-top .ic { font-size: 24px; color: var(--t-muted); margin-top: 2px; }
.dt-tile.is-on .dt-tile-top .ic { color: var(--t-gold-text); }
.dt-tile-top b { display: block; font-size: 19px; }
.dt-tile-top span { display: block; font-size: 15px; color: var(--t-muted); margin-top: 2px; }
.dt-count { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dt-count b { font-size: 26px; min-width: 32px; text-align: center; }
.dt-count .dt-sq { width: 56px; height: 56px; }
.dt-tile-state { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--t-muted); }
.dt-tile.is-on .dt-tile-state { color: var(--t-gold-text); }
.dt-tile-state .ic { font-size: 18px; }
/* Complete: the money and the button stay on screen while the tiles scroll. */
.dt-foot {
  position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px;
  margin: 0 -16px -16px; padding: 12px 16px 16px; background: var(--t-bg); border-top: 1px solid var(--t-border);
}
.dt-collect {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; border-radius: 16px;
  background: var(--t-surface-alt); border: 1px solid var(--t-border);
}
.dt-collect b { font-size: 24px; font-weight: 800; }
.dt-collect span { font-size: 16px; color: var(--t-muted); }

/* ── The undo bar ────────────────────────────────────────────────────── */
.dt-undo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--t-hero); color: var(--t-hero-text); box-shadow: var(--shadow-lg);
}
.dt-undo-words { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 700; }
.dt-undo-words span { display: block; font-size: 15px; font-weight: 500; color: var(--t-hero-muted); }
.dt-undo .dt-btn { flex: none; min-width: 140px; }

/* ── Full-screen layers: reminder, driving, ended, confirm ───────────── */
.dt-layer {
  position: fixed; inset: 0; z-index: var(--z-modal); display: flex; flex-direction: column; justify-content: center;
  gap: 16px; padding: 24px 20px; background: var(--t-hero); color: var(--t-hero-text); overflow-y: auto;
}
.dt-layer .dt-eyebrow { color: var(--t-hero-eyebrow); }
.dt-layer .dt-big { font-size: 38px; }
.dt-layer > * { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
.dt-layer-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.dt-lock { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; padding: 14px 16px;
  border-radius: 16px; background: var(--t-surface-alt); border: 1px dashed var(--t-border-strong); }
.dt-lock .ic { font-size: 24px; }
.dt-dialog { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--t-scrim); display: flex;
  align-items: center; justify-content: center; padding: 16px; }
.dt-dialog .dt-card { max-width: 520px; width: 100%; display: flex; flex-direction: column; gap: 14px; }

.dt-flash { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: var(--z-toast); box-shadow: var(--shadow-lg); }
.dt-flash.above-bar { bottom: 100px; }
.dt-on-hero { color: var(--t-hero-muted); }
.dt-undo-words b { display: block; }

/* ── Small screens (a phone, 390) ─────────────────────────────────────── */
@media (max-width: 520px) {
  .dt-main { padding: 12px; }
  .dt-row-main b, .dt-row-main span { white-space: normal; }
  .dt-wide-only { display: none; }
  .dt-btn { padding: 0 14px; font-size: 18px; }
  .dt-btn-xl { font-size: 19px; }
  .dt-foot { margin: 0 -12px -12px; padding: 10px 12px 12px; }
  .dt-big { font-size: 28px; }
  .dt-who span { font-size: 14px; }
  .dt-row-time { min-width: 80px; font-size: 17px; }
  .dt-clock { font-size: 20px; }
}
@media (max-width: 380px) {
  .dt-row2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dt-btn { transition: none; }
}
