:root { --brand-base: #9A6700; --brand: var(--brand-base); --brand-ink: #ffffff; --brand-on-dark: #FFB302; }
/* Shared by the client's website and the app: fonts, the neutral palette and
   type scale from the Pull Count design, and one brand color from
   client.config.mjs (build.mjs writes --brand and --brand-ink in front of
   this file). The dark palette is at the end of this file. */

@font-face { font-family: 'Switzer'; src: url('/assets/fonts/switzer-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('/assets/fonts/switzer-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('/assets/fonts/switzer-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('/assets/fonts/switzer-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fafaf8;
  --paper-2: #f1f1ee;
  --surface: #ffffff;
  --ink: #111114;
  --text-2: #4a4a52;
  --text-3: #6b6b74;
  --line: rgba(17, 17, 20, .08);
  --line-hi: rgba(17, 17, 20, .16);
  --night: #0b0d14;
  --on-night: #f2f3f7;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --bad: #b3311d;
  --star: #f5a524;

  /* The client's own tints (brand.soft, brand.deep in client.config.mjs), filled by the dashboard Worker. */
  --brand-soft: #FFF6DB;
  --brand-line: color-mix(in srgb, var(--brand) 30%, transparent);
  --brand-deep: #8A5A00;

  --f-sans: 'Switzer', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(17, 17, 20, .06), 0 8px 24px rgba(17, 17, 20, .06);
}

/* The Pull Count app. Light and dark (the end of this file), Switzer, short copy, one clear action per
   screen (DESIGN.md). The client's color is --brand. Mobile first: a tab bar
   on a phone, a side nav from 900px. Nothing under 13px. */

:root {
  --lift: 0 1px 2px rgba(17, 17, 20, .06), 0 8px 24px -8px rgba(17, 17, 20, .18);
  --float: 0 2px 6px rgba(17, 17, 20, .06), 0 24px 60px -20px rgba(17, 17, 20, .28);
  --violet: #6b4cf0;
  /* Status tints and their text: one name each, so a pill, a note and a timeline dot always match. */
  --ok-soft: #e4f3ea;
  --warn-soft: #fcf0d9;
  --warn-ink: #85550c;
  --bad-soft: #fbe7e3;
  --violet-soft: #ece8fd;
  --violet-ink: #5536d6;
  --hover: #fcfcfa;
  --mute: #c2c2c8;
  /* iOS system blue, only for the pictures of iPhone buttons in the install steps. */
  --ios-blue: #0a7aff;
  /* The map's three colors, each readable with its pin text. */
  --c-red: #c0392b;
  --c-amber: #f0a62c;
  --c-green: #1f8a4c;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* A colour used two ways has two names, so the dark palette can answer each: a fill with its own text on it
     (--brand, --ink-fill, --ok-fill ...), and text, an icon or a ring on the page (--brand-fg, --ink, --ok ...). */
  --brand-fg: var(--brand);
  --brand-tint: color-mix(in srgb, var(--brand) 14%, white);
  --brand-muted: color-mix(in srgb, var(--brand) 42%, white);
  --ink-fill: var(--ink);
  --on-ink: #fff;
  --ok-fill: var(--ok);
  --bad-fill: var(--bad);
  --warn-fill: var(--warn);
  --violet-fill: var(--violet);
  /* Page colours that had no name. */
  --paper-3: #e9e9e5;
  --bar: #efefeb;
  --seg-on: var(--surface);
  --switch-off: #d6d6da;
  --grab: #b9b9c0;
  --scrim: rgba(11, 13, 20, .42);
  --map-bg: #e8ebe5;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--brand-fg); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot svg { border-radius: 14px; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.94); opacity: .8; } }
.noscript { padding: 32px 20px; text-align: center; color: var(--text-2); }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-3); font-size: 14px; }
.center { text-align: center; justify-content: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px;
  font-weight: 600; font-size: 16px; letter-spacing: -.01em; line-height: 1.15;
  cursor: pointer; text-align: center;
  transition: transform .12s, background-color .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn .i { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(17, 17, 20, .12), 0 8px 18px -8px var(--brand-line); }
.btn-primary:active { background: color-mix(in srgb, var(--brand) 88%, black); }
@media (hover: hover) { .btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); } }
.btn-secondary { background: var(--paper-2); color: var(--ink); }
.btn-secondary:active { background: var(--paper-3); }
@media (hover: hover) { .btn-secondary:hover { background: var(--paper-3); } }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:active { background: var(--paper-2); }
@media (hover: hover) { .btn-quiet:hover { background: var(--paper-2); } }
.btn-danger { background: var(--bad-fill); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-big { min-height: 56px; font-size: 17px; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-small .i { width: 18px; height: 18px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px; border: 0; background: none; color: var(--brand-fg); font-weight: 600; font-size: 15px; cursor: pointer; }
.link-btn .i { width: 18px; height: 18px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.icon-btn .i { width: 20px; height: 20px; }

/* ---------- Shell: top bar and tabs on a phone ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(52px + var(--safe-t)); padding: var(--safe-t) 16px 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.co { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.co > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-mark {
  width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center;
  border-radius: calc(var(--s) * .3); background: var(--brand); color: var(--brand-ink);
  font-weight: 700; font-size: max(13px, calc(var(--s) * .4)); letter-spacing: -.02em;
}
.co-logo { border-radius: 8px; object-fit: contain; flex: none; }
.demo-pill { flex: none; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-fg); font-size: 13px; font-weight: 600; }
.side { display: none; }
#main { max-width: 720px; margin: 0 auto; padding: 4px 16px calc(100px + var(--safe-b)); outline: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  position: relative; flex: 1; min-width: 0; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 2px 6px; color: var(--text-3); font-size: 13px; font-weight: 500;
}
.tabbar a .i { width: 24px; height: 24px; }
.tabbar a[aria-current] { color: var(--brand-fg); }
.tabbar a[aria-current] .i { stroke-width: 2.2; }
.badge {
  position: absolute; top: 4px; left: calc(50% + 5px);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--bad-fill); color: #fff; font-style: normal; font-size: 13px; font-weight: 600; line-height: 20px; text-align: center;
}

/* ---------- Shell: side nav on a computer ---------- */

@media (min-width: 900px) {
  .topbar, .tabbar { display: none; }
  .shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
  .side {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; padding: 20px 14px;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .side-co { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
  .side-co strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
  .side-co > div > span { font-size: 13px; color: var(--text-3); }
  .side-items { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
  .side-items a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 15px; }
  .side-items a:hover { background: var(--paper); }
  .side-items a[aria-current] { background: var(--brand-soft); color: var(--brand-fg); }
  .side-label { margin: 18px 12px 6px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .side-label:first-child { margin-top: 0; }
  .side-items .badge { position: static; margin-left: auto; }
  .side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
  .side-foot svg { border-radius: 5px; }
  .side-foot .demo-pill { margin-left: auto; }
  #main { margin: 0; max-width: 880px; padding: 28px 40px 64px; }
}

/* ---------- Page heads ---------- */

.page-head { padding: 14px 0 18px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 6px -6px; padding: 6px; color: var(--brand-fg); font-size: 15px; font-weight: 500; }
.back .i { width: 20px; height: 20px; }
.page-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-titles { min-width: 0; }
.page-head h1 { font-size: 32px; line-height: 1.06; font-weight: 600; letter-spacing: -.04em; overflow-wrap: anywhere; }
.sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-3); font-size: 15px; }
.ref { font-family: var(--f-mono); font-size: 13px; color: var(--text-3); }
@media (min-width: 900px) { .page-head h1 { font-size: 40px; } }

/* ---------- Cards, lists, rows ---------- */

.card { margin-bottom: 14px; padding: 18px; background: var(--surface); border-radius: 22px; box-shadow: var(--lift); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2, .card-title { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.card-title { margin-bottom: 10px; }
.section-title { display: flex; gap: 8px; align-items: baseline; margin: 24px 4px 8px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.list { list-style: none; margin: 0 0 14px; padding: 0; background: var(--surface); border-radius: 22px; box-shadow: var(--lift); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line); }
.list-card { padding: 0; overflow: hidden; }
.list-card > .card-title { padding: 16px 16px 4px; margin: 0; }
.list-card > .row + .row, .list-card > .card-title + .row { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 12px 16px;
  border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
a.row:active, button.row:active { background: var(--hover); }
@media (hover: hover) { a.row:hover, button.row:hover { background: var(--hover); } }
.row-lead { flex: none; display: grid; place-items: center; color: var(--brand-fg); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 14px; }
.row-right { flex: none; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.row-chev { width: 18px; height: 18px; color: var(--mute); }
.row.danger .row-title, .row.danger .row-lead { color: var(--bad); }
.row.add .row-title { color: var(--brand-fg); }
.pad-row { padding: 16px; }
.empty { margin-bottom: 14px; padding: 28px 18px; text-align: center; color: var(--text-2); background: var(--surface); border-radius: 22px; box-shadow: var(--lift); }
.empty .muted { margin-top: 4px; }
.fine { display: flex; align-items: flex-start; gap: 8px; margin: 14px 4px; color: var(--text-3); font-size: 14px; line-height: 1.45; }
.fine .i { width: 18px; height: 18px; margin-top: 1px; }
.fine a { color: var(--brand-fg); font-weight: 500; }
.stack-actions { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.sticky-cta { margin-top: 22px; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--paper-2); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.brand { background: var(--brand-soft); color: var(--brand-fg); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.amber { background: var(--warn-soft); color: var(--warn-ink); }
.pill.red { background: var(--bad-soft); color: var(--bad); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.dot { display: inline-block; width: 12px; height: 12px; flex: none; border-radius: 50%; }
.dot.red { background: var(--c-red); }
.dot.amber { background: var(--c-amber); }
.dot.green { background: var(--c-green); }
.avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); color: var(--text-2); font-size: 15px; font-weight: 600; }
.avatar.pro { background: var(--brand-soft); color: var(--brand-fg); }

/* ---------- Today and routes ---------- */

.counts { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.count { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; background: var(--surface); border-radius: 999px; box-shadow: var(--lift); color: var(--text-2); font-size: 14px; }
.count i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.count.k-pickup i { background: var(--ink-fill); }
.count.k-swap i { background: var(--violet-fill); }
.count b { color: var(--ink); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.truck-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 0 2px; }
.truck-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.stops { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stop { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.stop.next { box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.stop-n { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-size: 16px; font-weight: 700; }
.stop-n .i { width: 20px; height: 20px; stroke-width: 2.6; }
.k-pickup .stop-n { background: var(--ink-fill); color: var(--on-ink); }
.k-swap .stop-n { background: var(--violet-fill); color: #fff; }
.stop.done .stop-n { background: var(--ok-fill); color: #fff; }
.stop.done .stop-main { opacity: .6; }
.stop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stop-kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 13px; }
.stop-kind b { color: var(--brand-fg); font-weight: 600; }
.k-pickup .stop-kind b { color: var(--ink); }
.k-swap .stop-kind b { color: var(--violet-ink); }
.stop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.stop-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.next-tag { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font-size: 13px; font-weight: 600; }
.done-tag { flex: none; color: var(--ok); font-size: 13px; font-weight: 600; }
.note-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: var(--bad-soft); color: var(--bad); font-size: 15px; font-weight: 500; }
.note-row > span { flex: 1; }
.note-row .row-chev { color: var(--bad); }
.route-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.route-stats > div { display: flex; flex-direction: column; }
.route-stats strong { font-size: 30px; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.route-stats span { color: var(--text-3); font-size: 13px; }
.card.route-stats { padding: 16px 18px; }
.route-card .route-stats { margin-bottom: 16px; }
.day-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 4px 16px 8px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day {
  position: relative; flex: none; width: 62px; min-height: 76px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: var(--surface); border-radius: 18px; box-shadow: var(--lift);
  color: var(--text-3); font-size: 13px; cursor: pointer;
}
.day strong { color: var(--ink); font-size: 21px; font-weight: 600; line-height: 1.15; }
.day strong .i { width: 22px; height: 22px; color: var(--brand-fg); }
.day em { color: var(--bad); font-size: 13px; font-style: normal; font-weight: 500; }
.day.shut:not(.on) strong { color: var(--text-3); }
.day.on { background: var(--brand); color: rgba(255, 255, 255, .85); }
.day.on strong, .day.on em, .day.on strong .i { color: #fff; }
.day-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.seg { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.seg a { flex: 1; padding: 9px 8px; border-radius: 999px; color: var(--text-2); font-size: 15px; font-weight: 500; text-align: center; white-space: nowrap; }
.seg a.on { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 17, 20, .12); }
.seg b { margin-left: 3px; color: var(--text-3); font-weight: 600; }
.search { display: flex; align-items: center; gap: 10px; height: 50px; margin-bottom: 12px; padding: 0 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--lift); color: var(--text-3); }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.search input { flex: 1; height: 100%; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font-size: 16px; }
@media (min-width: 900px) { .day-strip { margin: 0 0 14px; padding: 4px 0 8px; } }

/* ---------- Map ---------- */

.map-wrap { margin-bottom: 14px; }
.map { position: relative; z-index: 0; overflow: hidden; background: var(--map-bg); border-radius: 22px; box-shadow: var(--lift); }
.map-big { height: 56vh; min-height: 320px; max-height: 620px; }
.map-route { height: 260px; margin-bottom: 14px; }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--text-3); font-size: 15px; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; padding: 12px 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--lift); color: var(--text-2); font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { color: var(--ink); font-weight: 600; }
.leaflet-container { font-family: var(--f-sans); }
.leaflet-control-attribution { font-size: 13px; }
.pin { display: grid; place-items: center; }
.pin span {
  display: block; height: 28px; padding: 0 9px; border: 2px solid #fff; border-radius: 999px;
  background: var(--c-green); color: #fff; box-shadow: 0 2px 8px rgba(17, 17, 20, .3);
  font: 600 13px/24px var(--f-sans); white-space: nowrap;
}
.pin::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pin-red span { background: var(--c-red); }
.pin-amber span { background: var(--c-amber); color: #111114; }
.pin-yard span { background: var(--ink-fill); color: var(--on-ink); }
.pin-num span {
  display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid #fff; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(17, 17, 20, .3); font: 700 14px var(--f-sans);
}
.pin-num.k-pickup span { background: var(--ink-fill); color: var(--on-ink); }
.pin-num.k-swap span { background: var(--violet-fill); }
.pin-num.done span { background: var(--ok-fill); }

/* ---------- A booking ---------- */

.stop-info .addr { font-size: 23px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.addr-guess { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 2px; color: var(--warn-ink); font-size: 14px; line-height: 1.45; }
.addr-guess .i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.addr-guess .link-btn { display: inline; min-width: 0; min-height: 0; padding: 0; font-size: inherit; text-decoration: underline; }
.stop-info .addr span { display: block; margin-top: 2px; color: var(--text-2); font-size: 16px; font-weight: 400; letter-spacing: 0; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 0; border-radius: 16px; background: var(--brand-soft); color: var(--brand-fg); font-size: 14px; font-weight: 600; cursor: pointer; }
.quick-btn:active { background: var(--brand-tint); }
@media (hover: hover) { .quick-btn:hover { background: var(--brand-tint); } }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.card > .facts:first-child > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { flex: none; color: var(--text-3); font-size: 15px; }
.facts dd { min-width: 0; text-align: right; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.due { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.due.red { background: var(--bad-soft); color: var(--bad); }
.due.amber { background: var(--warn-soft); color: var(--warn-ink); }
.due.green { background: var(--ok-soft); color: var(--ok); }
.action-bar { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin: 0 0 14px; }
.action-bar > :only-child { grid-column: 1 / -1; }
.action-bar .btn { min-height: 56px; padding: 0 14px; }
.notes { color: var(--text-2); font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.big-num { margin: 2px 0 4px; font-size: 30px; font-weight: 600; letter-spacing: -.035em; }
.card .btn-block { margin-top: 14px; }

/* ---------- Forms ---------- */

.form .btn + .btn { margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; border: 0; padding: 0; }
.field > span:first-child { color: var(--text-2); font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line-hi); border-radius: 12px; outline: none;
  background: var(--surface); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.4; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b6b74' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-fg); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input[readonly] { background: var(--paper-2); color: var(--text-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-err { margin: 2px 0 14px; color: var(--bad); font-size: 15px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border: 1.5px solid transparent; border-radius: 999px; background: var(--paper-2); font-size: 15px; font-weight: 500; cursor: pointer; }
.chip input:checked + span { border-color: var(--brand-fg); background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--brand-fg); outline-offset: 2px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 78px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; height: 38px; padding: 0 12px; transform: translateY(-50%); border: 0; border-radius: 999px; background: none; color: var(--brand-fg); font-size: 14px; font-weight: 600; cursor: pointer; }
.money-wrap { position: relative; display: block; }
.money-wrap::before { content: '$'; position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--text-3); }
.money-wrap input { padding-left: 28px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 999px; background: var(--switch-off); cursor: pointer; transition: background-color .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch:checked { background: var(--ok-fill); }
.switch:checked::after { transform: translateX(20px); }
.switch-row { cursor: pointer; }
/* a switch's words are read, not skimmed: they wrap on a narrow phone and are never cut */
.switch-row .row-title, .switch-row .row-sub { overflow: visible; text-overflow: clip; white-space: normal; }
.switch-row .row-sub { line-height: 1.35; }

/* ---------- Sheets ---------- */

#sheet { position: fixed; inset: 0; z-index: 80; }
.sheet-back { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s; }
#sheet.open .sheet-back { opacity: 1; }
/* A sheet is three bands: the top (handle, title, X) which is also the place to pull it down by, the body
   which scrolls, and the buttons which never scroll off the screen. */
.sheet {
  position: absolute; left: 0; right: 0; bottom: var(--skb, 0px); display: flex; flex-direction: column; max-height: min(92dvh, calc(var(--svh, 100dvh) - 10px)); overflow: hidden;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--float);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
#sheet.open .sheet { transform: none; }
/* Typing in a sheet on a phone: the keyboard lies over the bottom of the page without shrinking it, so the sheet is
   lifted by the keyboard's height (--skb) and kept no taller than the screen left above it (--svh). ui.js sheetKeyboard
   sets both while a box in the sheet is being typed in, and takes them away when the keyboard goes. */
#sheet.kb .sheet-foot { padding-bottom: 12px; }
.sheet-top { flex: none; padding: 8px 12px 0 20px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sheet-grab { width: 44px; height: 5px; margin: 0 auto 4px; border-radius: 3px; background: var(--grab); }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet h2 { flex: 1; min-width: 0; margin: 10px 0 12px; font-size: 23px; font-weight: 600; letter-spacing: -.025em; outline: none; }
.sheet-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-top: 2px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); cursor: pointer; }
.sheet-x:active { background: var(--paper-3); }
@media (hover: hover) { .sheet-x:hover { background: var(--paper-3); } }
.sheet-x .i { width: 20px; height: 20px; stroke-width: 2.2; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 20px 4px; }
.sheet-foot { flex: none; padding: 12px 20px calc(16px + var(--safe-b)); }
.sheet-foot .form-err { margin: 0 0 10px; }
.sheet-lede { margin-bottom: 14px; color: var(--text-2); }
.sheet .chips + .field, .sheet .chips + .muted { margin-top: 14px; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions .btn { flex: 1 1 0; min-width: 0; min-height: 52px; }
.sheet-actions .btn[data-close]:not(:only-child) { flex: 0 0 auto; min-width: 108px; }
.sheet-actions.stack { flex-direction: column-reverse; }
.sheet-actions.stack .btn, .sheet-actions.stack .btn[data-close]:not(:only-child) { flex: none; width: 100%; }
.preview { margin-top: 16px; padding: 12px 15px; border-radius: 20px 20px 6px 20px; background: var(--brand); color: var(--brand-ink); font-size: 15px; line-height: 1.42; }
@media (min-width: 700px) {
  .sheet { top: 50%; right: auto; bottom: auto; left: 50%; width: 460px; border-radius: 26px; opacity: 0; transform: translate(-50%, -46%); transition: transform .2s, opacity .2s; }
  #sheet.open .sheet { opacity: 1; transform: translate(-50%, -50%); }
  .sheet-grab { display: none; }
  .sheet-top { padding-top: 14px; cursor: default; touch-action: auto; }
}

/* ---------- Toasts and the new-booking banner ---------- */

#toasts { position: fixed; z-index: 95; left: 12px; right: 12px; bottom: calc(78px + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; }
.toast { max-width: 440px; padding: 12px 16px; border-radius: 16px; background: var(--night); color: var(--on-night); box-shadow: var(--float); font-size: 15px; font-weight: 500; line-height: 1.38; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast.demo { background: var(--brand-deep); }
.toast.bad { background: var(--bad-fill); }
html.ob-on #toasts { bottom: calc(20px + var(--safe-b)); }
#banners { position: fixed; z-index: 85; top: calc(8px + var(--safe-t)); left: 8px; right: 8px; display: flex; justify-content: center; pointer-events: none; }
.banner {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 97%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--float);
  text-align: left; cursor: pointer; pointer-events: auto;
  transform: translateY(-150%); transition: transform .38s cubic-bezier(.2, .9, .25, 1.12);
}
.banner.in { transform: none; }
.banner .tally { flex: none; border-radius: 9px; }
.banner-text { min-width: 0; display: flex; flex-direction: column; }
.banner-app { color: var(--text-3); font-size: 13px; }
.banner strong { font-size: 16px; font-weight: 600; }
.banner-text > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
@media (min-width: 900px) {
  #toasts { left: 264px; bottom: 24px; }
  #banners { left: auto; right: 20px; top: 20px; width: 400px; }
}

/* ---------- Messages ---------- */

.thread-row.unread .row-title { font-weight: 700; }
.thread-row.unread .row-sub { color: var(--ink); }
.time { color: var(--text-3); font-size: 13px; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.bubbles { list-style: none; margin: 0; padding: 4px 0 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; display: flex; flex-direction: column; gap: 3px; }
.bubble p { padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.38; overflow-wrap: anywhere; }
.bubble span { padding: 0 8px; color: var(--text-3); font-size: 13px; }
.bubble.them { align-self: flex-start; }
.bubble.them p { background: var(--surface); box-shadow: var(--lift); border-bottom-left-radius: 6px; }
.bubble.us { align-self: flex-end; align-items: flex-end; }
.bubble.us p { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 6px; }
.bubble-empty { padding: 20px; color: var(--text-3); text-align: center; }
.composer { position: sticky; bottom: calc(58px + var(--safe-b)); z-index: 5; margin: 0 -16px; padding: 14px 16px 6px; background: linear-gradient(to top, var(--paper) 78%, transparent); }
.omw-btn { margin-bottom: 10px; background: var(--surface); box-shadow: var(--lift); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; background: var(--surface); border-radius: 26px; box-shadow: var(--lift); }
.composer-row:focus-within { box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.composer textarea { flex: 1; min-width: 0; max-height: 140px; padding: 9px 0; border: 0; outline: none; background: none; font-size: 16px; line-height: 1.4; resize: none; }
.send-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
.send-btn .i { width: 19px; height: 19px; }
.composer .fine { justify-content: center; margin: 8px 4px 0; font-size: 13px; }
.thread { display: flex; flex-direction: column; min-height: calc(100dvh - 160px - var(--safe-t) - var(--safe-b)); }
.thread .composer { margin-top: auto; }
/* --vvtop (app.js pinBars): 0 normally; on an iPhone whose viewport stayed stuck after the keyboard closed,
   how far the screen has panned down the page, so the bars stay on the screen instead of riding up it. */
@media (max-width: 899px) {
  .tabbar, .topbar, #toasts, #sheet { transform: translate3d(0, var(--vvtop, 0px), 0); }
}
/* Typing on a phone: the keyboard covers the bottom of the page without shrinking it (iOS), so the
   box is pinned to the screen and lifted by the keyboard's height (--kb, from visualViewport in
   app.js), and the tab bar steps aside. */
@media (max-width: 899px) {
  html.typing .tabbar { display: none; }
  html.typing .thread .composer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0;
    padding: 10px 16px calc(8px + var(--safe-b));
    transform: translate3d(0, calc(-1 * var(--kb, 0px)), 0); will-change: transform;
  }
  html.typing.kb-up .thread .composer { padding-bottom: 8px; }
  html.typing .thread .composer .fine { display: none; }
  html.typing .thread .bubbles { padding-bottom: 120px; }
}
@media (min-width: 900px) {
  .composer { bottom: 0; padding: 14px 0 12px; }
  .thread { min-height: calc(100vh - 92px); }
  .thread .composer { margin: auto 0 0; }
}

/* ---------- Invoices and contracts ---------- */

.amount { font-size: 15px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.stats .bad { color: var(--bad); }
.stats span { color: var(--text-3); font-size: 13px; line-height: 1.3; }
.lines { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 15px; }
.lines td, .lines th { padding: 10px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.lines td:last-child, .lines th:last-child { padding-left: 12px; text-align: right; white-space: nowrap; }
.lines tfoot th { font-size: 17px; font-weight: 600; }
.inline-link { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; color: var(--brand-fg); font-size: 15px; font-weight: 600; }
.inline-link .i { width: 16px; height: 16px; }
.filled { margin-bottom: 16px; padding: 14px 16px; border-radius: 16px; background: var(--brand-soft); }
.filled .kicker { color: var(--brand-fg); margin-bottom: 6px; }
.filled .kicker .i { width: 16px; height: 16px; }
.filled p { font-size: 15px; }
.line-row { display: flex; gap: 8px; }
.line-row .grow { flex: 1; min-width: 0; }
.line-row .field { margin-bottom: 8px; }
.money-in { width: 112px; flex: none; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 14px; padding: 14px 0 0; border-top: 1px solid var(--line); }
.total-line strong { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.terms { list-style: none; margin: 0; padding: 0; }
.terms li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.terms li:first-child { border-top: 0; padding-top: 0; }
.terms b { font-weight: 600; text-align: right; }
.terms li.terms-note { flex-direction: column; gap: 4px; }
.terms li.terms-note b { font-weight: 500; text-align: left; overflow-wrap: anywhere; }
.ct-remove { display: flex; margin: 0 auto 8px; color: var(--bad); }
.ct-has { margin-top: 10px; }
.form.ct { max-width: 100%; }
.signature { display: block; width: 100%; max-width: 360px; height: auto; margin: 4px 0 10px; border-radius: 12px; background: var(--paper); fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pad { position: relative; }
.pad canvas { display: block; width: 100%; aspect-ratio: 3 / 1; border: 1.5px dashed var(--line-hi); border-radius: 14px; background: var(--paper); cursor: crosshair; touch-action: none; }
.pad-clear { position: absolute; top: 2px; right: 10px; }
.field .rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.field .rate span { font-size: 15px; font-weight: 500; }
.field .rate input { width: 130px; flex: none; }

/* ---------- Setup ---------- */

.bin-no { min-width: 60px; padding: 4px 8px; border-radius: 8px; background: var(--paper-2); color: var(--ink); font-family: var(--f-mono); font-size: 14px; font-weight: 500; text-align: center; }
.limits p { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 15px; }
.limits p + p { margin-top: 10px; }
.limits .i { width: 20px; height: 20px; color: var(--text-3); }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.price-size { grid-column: 1 / -1; margin-bottom: 8px; font-size: 17px; font-weight: 600; }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.wd { position: relative; }
.wd input { position: absolute; opacity: 0; pointer-events: none; }
.wd span { display: grid; place-items: center; height: 50px; border-radius: 12px; background: var(--paper-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.wd input:checked + span { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }
.wd input:focus-visible + span { outline: 2px solid var(--brand-fg); outline-offset: 2px; }

/* ---------- Onboarding ---------- */

.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(24px + var(--safe-t)) 20px calc(20px + var(--safe-b)); }
.ob-inner { width: 100%; max-width: 440px; margin: auto; display: flex; flex-direction: column; }
.ob h1 { font-size: 38px; line-height: 1.03; font-weight: 600; letter-spacing: -.05em; outline: none; }
.ob-mark { margin-bottom: 26px; }
.ob-mark .tally { border-radius: 18px; box-shadow: 0 14px 32px -12px color-mix(in srgb, var(--brand) 45%, transparent); }
.ob-co { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--text-2); font-size: 17px; font-weight: 500; }
.ob-q { margin: 44px 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.ob-choices { display: flex; flex-direction: column; gap: 12px; }
.ob-choice { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 18px; border: 1.5px solid transparent; border-radius: 24px; background: var(--surface); box-shadow: var(--lift); transition: border-color .15s, transform .12s; }
.ob-choice:active { border-color: var(--brand-line); }
@media (hover: hover) { .ob-choice:hover { border-color: var(--brand-line); } }
.ob-choice:active { transform: scale(.99); }
.ob-ic { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 17px; background: var(--brand-soft); color: var(--brand-fg); }
.ob-ic .i { width: 27px; height: 27px; }
.ob-txt { flex: 1; display: flex; flex-direction: column; }
.ob-txt strong { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.ob-txt small { color: var(--text-3); font-size: 15px; }
.ob-foot { margin-top: 28px; color: var(--text-3); font-size: 14px; text-align: center; }
.ob .back { align-self: flex-start; }
.ob-form h1 { margin: 14px 0 10px; font-size: 31px; }
.ob-lede { margin-bottom: 8px; color: var(--text-2); font-size: 17px; }
.ob-form .field:first-of-type { margin-top: 20px; }
.demo-note { display: flex; align-items: center; gap: 6px; margin: -4px 0 16px; color: var(--brand-fg); font-size: 14px; font-weight: 500; }
.demo-note .i { width: 18px; height: 18px; }
.home-icon { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px auto 22px; }
.home-icon .tally { border-radius: 16px; box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--brand) 45%, transparent); }
.home-icon span { color: var(--text-2); font-size: 13px; font-weight: 500; }
.ob-install h1 { text-align: center; font-size: 32px; }
.ob-install .ob-lede { margin: 10px 0 20px; text-align: center; }
.ob-steps { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ob-step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.ob-n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; }
.ob-step-txt { flex: 1; font-size: 16px; line-height: 1.35; }
.ob-step-txt b { font-weight: 600; }
.ob-pic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--paper-2); color: var(--ios-blue); }
.ob-pic .i { width: 24px; height: 24px; }
.ios-add { color: var(--ios-blue); font-size: 15px; font-weight: 600; }
.ob-host { margin: 0 0 18px; text-align: center; }
.host { margin-top: 8px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--lift); font-family: var(--f-mono); font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.ob-done { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 24px; color: var(--ok); font-weight: 600; }
.ob-install-now { margin: 4px 0 14px; text-align: center; }
.ob-install-now .muted { margin-top: 10px; }
.ob-install .btn-secondary { margin-bottom: 12px; }

/* ---------- Walkthrough ---------- */

html.tour-on, html.tour-on body { overflow: hidden; }
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-block { position: absolute; inset: 0; touch-action: none; }
.tour-hole {
  position: fixed; top: 50%; left: 50%; width: 0; height: 0;
  border-radius: 20px; outline: 2px solid rgba(255, 255, 255, .92); outline-offset: 0;
  box-shadow: 0 0 0 200vmax rgba(11, 13, 20, .64); pointer-events: none;
  transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease, opacity .2s;
}
.tour-card { position: fixed; top: 50%; left: 16px; padding: 18px 18px 10px; background: var(--surface); border-radius: 24px; box-shadow: var(--float); transition: top .3s ease, left .3s ease; }
.tour-count { margin-bottom: 4px; color: var(--brand-fg); font-family: var(--f-mono); font-size: 13px; font-weight: 500; }
.tour-card h2 { margin-bottom: 6px; font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
#tour-body { color: var(--text-2); font-size: 16px; line-height: 1.45; }
.tour-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tour-actions .btn { min-height: 46px; }
.tour-actions .btn-primary { min-width: 124px; }
.tour-skip { display: block; margin: 6px auto 0; padding: 8px 10px; border: 0; background: none; color: var(--text-3); font-size: 14px; font-weight: 500; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Trip fees ---------- */

/* Drop-off date and Days sit side by side. A date input has a minimum width of
   its own on phones, and a plain 1fr column won't shrink below it, so the date
   box ran under the Days box. minmax(0, 1fr) lets the columns shrink, and the
   date input is told it may. */
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two > * { min-width: 0; }
.field input[type='date'] { display: block; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; text-align: left; }
.field input[type='date']::-webkit-date-and-time-value { min-width: 0; text-align: left; }
.field input[type='date']::-webkit-datetime-edit { padding: 0; }
@media (max-width: 400px) { .two { gap: 10px; } .field input[type='date'] { padding-inline: 12px; font-size: 16px; } }

/* The price lines on a new booking, and the answer when it is too far. */
.quote { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); font-size: 15px; }
.quote-r { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.quote-r b { flex: none; color: var(--ink); font-weight: 600; }
.quote-free b { color: var(--ok); }
.quote-t { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line-hi); color: var(--ink); font-size: 17px; font-weight: 600; }
.quote-out { gap: 4px; background: color-mix(in srgb, var(--bad) 8%, var(--surface)); color: var(--text-2); line-height: 1.4; }
.quote-out b { color: var(--bad); font-weight: 600; }

/* The trip fee settings: the rule in plain words, then a worked example. */
.trip-rule { margin: 0 0 8px; color: var(--ink); font-size: 15px; line-height: 1.45; }
.trip-eg { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-fg); font-size: 15px; font-weight: 600; line-height: 1.4; }

/* ---------- Invoices and phone fixes ---------- */

/* The big button that starts an invoice (a small one in the page head was
   easy to miss). Full width on a phone, its own size on a computer. */
.cta { margin: 0 0 16px; }
@media (min-width: 900px) { .cta { display: inline-flex; width: auto; padding: 0 28px; } }
.form-sub { margin: 18px 0 10px; color: var(--text-2); font-size: 15px; font-weight: 600; }
.note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; line-height: 1.4; }
.note .i { width: 18px; height: 18px; margin-top: 1px; }
/* One line of an invoice: the words on top, the price and a remove button
   under them, so nothing is squeezed at 360px. */
.line-row { flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 10px; border-radius: 16px; background: var(--paper); }
.line-row .field { margin-bottom: 0; }
.line-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line-foot .money-in { width: 150px; flex: none; }
.quick-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font-size: 15px; font-weight: 600; cursor: pointer; }
.chip-btn .i { width: 18px; height: 18px; }
.due-note { margin: -6px 0 14px; }
/* Total and the save button stay in reach above the tab bar while the form
   scrolls, and the error shows right beside the button that caused it. */
.bill-bar { position: sticky; bottom: calc(66px + var(--safe-b)); z-index: 5; margin: 6px -8px -8px; padding: 12px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 97%, transparent); box-shadow: 0 -6px 24px -10px rgba(17, 17, 20, .25), var(--lift); }
.bill-bar .form-err { margin: 0 0 10px; }
.bill-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bill-total { display: flex; flex-direction: column; line-height: 1.1; }
.bill-total span { color: var(--text-3); font-size: 13px; }
.bill-total strong { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.bill-total strong.bad { color: var(--bad); }
.bill-row .btn { flex: 1 1 auto; max-width: 240px; padding: 0 16px; }
.preview.msg { white-space: pre-line; border-radius: 18px; overflow-wrap: anywhere; }
@media (min-width: 900px) { .bill-bar { bottom: 12px; } }
.inner-list { list-style: none; margin: 0; padding: 0; }
.inner-list > li { border-top: 1px solid var(--line); }
.pad-row .muted { margin-bottom: 2px; }
.pad-row .btn-block { margin-top: 10px; }
/* A toast over an open sheet would sit on its buttons: show it at the top. */
body:has(#sheet.open) #toasts { top: calc(12px + var(--safe-t)); bottom: auto; }
.filled p { overflow-wrap: anywhere; }
/* "On my way" wrapped onto two lines at 360px: the small button takes what it
   needs and the main one the rest. */
.action-bar { grid-template-columns: auto 1fr; }
.action-bar .btn { white-space: nowrap; }
.action-bar > :only-child { grid-column: 1 / -1; }
/* The driver's main buttons sat below the fold, half under the tab bar. On a
   phone they stay in reach above it; on a computer they flow with the page. */
.action-bar { position: sticky; bottom: calc(66px + var(--safe-b)); z-index: 5; margin: 0 -16px 14px; padding: 10px 16px; background: linear-gradient(to top, var(--paper) 70%, transparent); }
@media (min-width: 900px) { .action-bar { position: static; margin: 0 0 14px; padding: 0; background: none; } }

/* ---------- Maps and routes ---------- */

/* Leaflet's buttons are 30px; a thumb needs more. */
.leaflet-container .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
.leaflet-container .leaflet-bar .leaflet-control-zoom-in, .leaflet-container .leaflet-bar .leaflet-control-zoom-out { font-size: 22px; }
.pc-fit a { display: grid; place-items: center; color: var(--ink); }
.pc-fit .i { width: 20px; height: 20px; }

/* A bin pin is its number in a pill. When the map is zoomed out far enough
   that full-size pills would overlap, map.js (sizePins) puts a smaller size on
   the whole map, so every pin still looks alike and shows its number. The
   pill sits on the bottom of its box so the tip stays attached. */
.pins-s .pin, .pins-xs .pin { place-items: end center; }
.pins-s .pin span { height: 22px; padding: 0 7px; font-size: 12px; line-height: 18px; }
.pins-xs .pin span { height: 18px; padding: 0 5px; border-width: 1.5px; font-size: 11px; line-height: 15px; }
.pins-xs .pin::after { border-width: 4px; bottom: -4px; }
/* Only the pill itself takes a tap (not the marker's box, which would sit over a neighbour's pill), with a little
   room round it for a thumb. */
.leaflet-marker-icon.pin { pointer-events: none; }
/* the pill is drawn over its tail, so the tail's edge never shades the pill */
.pin span { position: relative; z-index: 1; pointer-events: auto; cursor: pointer; }
/* the tail is the pill's own colour, edged in white like the pill: it is plain which spot a pill points at */
.pin { --pin: var(--c-green); }
.pin-red { --pin: var(--c-red); }
.pin-amber { --pin: var(--c-amber); }
.pin-yard { --pin: var(--ink); }
.pin::after { border-top-color: var(--pin); filter: drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 0 .6px #fff) drop-shadow(0 1px 2px rgba(17, 17, 20, .35)); }
.pin span::before { content: ''; position: absolute; inset: -8px -6px; border-radius: 999px; }
/* A pill with no room above its point (map.js sizePins) sits beside or below it: --px / --py is the pill's middle
   from the point, and the tail is a wedge whose sharp end is ON the point, --tl long, turned --ta toward the pill. */
.pin.pin-put span { position: absolute; left: 50%; top: 37px; translate: calc(-50% + var(--px, 0px)) calc(-50% + var(--py, 0px)); }
.pin.pin-put::after {
  left: 50%; top: 37px; bottom: auto; transform: none; translate: -50% 0; rotate: var(--ta, 0deg); transform-origin: 50% 0;
  border-style: solid; border-color: transparent transparent var(--pin); border-width: 0 5px var(--tl, 8px);
}
.pins-xs .pin.pin-put::after { border-width: 0 4px var(--tl, 8px); }
/* Bins on one address: one pin that lists them, a number to a line, in the colour of the most urgent. */
.pin.pin-stack span { display: flex; flex-direction: column; height: auto; padding: 1px 0; border-radius: 12px; }
/* each number sits over the pill's tap area, so a tap on a number is a tap on that bin */
.pin.pin-stack span i { position: relative; display: block; padding: 0 9px; font-style: normal; line-height: 21px; text-align: center; }
.pin.pin-stack span i + i { border-top: 1px solid color-mix(in srgb, currentColor 38%, transparent); }
.pins-s .pin.pin-stack span i { padding: 0 7px; line-height: 17px; }
.pins-xs .pin.pin-stack span { border-radius: 9px; }
.pins-xs .pin.pin-stack span i { padding: 0 5px; line-height: 14px; }
/* Several bins as one pin (map.js sizePins). A stack: the bins on one address, listed in one pin (above).
   A dot: a bin with no room for its pill at this zoom, in its colour. A group: dots that touch, a round pin with
   how many. A dot and a group sit ON the bin's point, so they have no tip. */
.pin.pin-dot::after, .pin.pin-group::after { display: none; }
.pin.pin-dot span, .pin.pin-group span { position: absolute; left: 50%; top: 37px; translate: -50% -50%; border-width: 2px; }
.pin.pin-dot span { width: 16px; height: 16px; padding: 0; font-size: 0; line-height: 0; overflow: visible; }
.pin.pin-dot span::before { inset: -11px; border-radius: 50%; }
.pin.pin-put:focus-visible, .pin.pin-dot:focus-visible, .pin.pin-group:focus-visible { outline: none; }
.pin.pin-put:focus-visible span, .pin.pin-dot:focus-visible span, .pin.pin-group:focus-visible span { outline: 2px solid var(--brand-fg); outline-offset: 2px; }
.pin.pin-group span { height: 24px; min-width: 24px; padding: 0 5px; font-size: 12px; line-height: 20px; text-align: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .75), 0 2px 8px rgba(17, 17, 20, .3); }
.pc-also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 10px; color: var(--text-2); font-size: 14px; }
.pc-also-btn { min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pc-also-btn.on { background: var(--ink-fill); color: var(--on-ink); cursor: default; }
.pin.sel span, .pin-num.sel span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 45%, transparent), 0 2px 8px rgba(17, 17, 20, .3); }
/* The numbered stops are 32px; the tap area is a finger wide. */
.pin-num::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.pin-num span { position: relative; }

/* The card under a tapped pin. On a phone it floats above the tab bar; on a
   computer it sits in the corner of the map. */
.map-wrap { position: relative; }
.pin-card {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(66px + var(--safe-b));
  max-width: 520px; margin: 0 auto; padding: 14px 16px 16px;
  background: var(--surface); border-radius: 22px; box-shadow: var(--float);
}
.pin-card[hidden] { display: none; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 6px; }
.pc-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pc-x { width: 40px; height: 40px; flex: none; display: grid; place-items: center; margin: -8px -8px -8px 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.pc-x:active { background: var(--paper-2); }
@media (hover: hover) { .pc-x:hover { background: var(--paper-2); } }
.pc-x .i { width: 20px; height: 20px; }
.pc-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.pc-addr { margin-top: 2px; color: var(--text-2); font-size: 15px; }
.pc-facts { margin-top: 2px; color: var(--text-3); font-size: 14px; }
.pc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pc-actions > :only-child { grid-column: 1 / -1; }
.pc-actions:has(> :nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
.pc-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 8px 6px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-fg); font-size: 14px; font-weight: 600; }
.pc-act:active { background: var(--brand-tint); }
@media (hover: hover) { .pc-act:hover { background: var(--brand-tint); } }
.pc-act.primary { background: var(--brand); color: var(--brand-ink); }
.pc-act.primary:active { background: color-mix(in srgb, var(--brand) 88%, black); }
@media (hover: hover) { .pc-act.primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); } }
.pc-act .i { width: 20px; height: 20px; }
.pill.violet { background: var(--violet-soft); color: var(--violet-ink); }
@media (min-width: 900px) {
  .pin-card { position: absolute; left: 12px; right: auto; bottom: 12px; width: 380px; margin: 0; }
}

/* The drive under a route's numbers, and the card that says who has the route. */
.drive { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--text-2); font-size: 14px; }
.drive .i { width: 18px; height: 18px; flex: none; color: var(--brand-fg); }
.route-card .drive { margin: 0; }
.map-route { height: 280px; }
.driver-card { padding: 14px 16px; }
.driver-line { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; }
.driver-line .i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--ok); }
.driver-line b { font-weight: 600; }
.driver-card.warn { background: var(--warn-soft); box-shadow: none; }
.driver-card.warn .driver-line .i { color: var(--warn-ink); }
.driver-card.warn .btn { margin: 10px 0 0 30px; }

/* The customer page's map: a picture of where they are, not a map to push
   around. The whole thing is one link, so a thumb scrolling past never drags it. */
.mini-map-wrap { position: relative; margin: 14px 0 0; }
.mini-map { height: 160px; border-radius: 16px; box-shadow: none; }
.mini-tap { position: absolute; z-index: 5; inset: 0 0 22px; display: flex; align-items: flex-end; padding: 8px; border-radius: 16px 16px 0 0; }
.mini-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: var(--lift); color: var(--brand-fg); font-size: 14px; font-weight: 600; }
.mini-chip .i { width: 18px; height: 18px; }

/* The search above the Map. The list opens directly under the field and
   floats over the legend and map; 16px type so iOS doesn't zoom on focus. */
.mapfind { position: relative; z-index: 2; margin-bottom: 10px; }
.mapfind .search { margin-bottom: 0; }
.mapfind .search input { font-size: 16px; }
.mf-clear { width: 36px; height: 36px; flex: none; display: grid; place-items: center; margin-right: -8px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); cursor: pointer; }
.mf-clear[hidden] { display: none; }
.mf-clear:active { background: var(--paper-2); }
@media (hover: hover) { .mf-clear:hover { background: var(--paper-2); } }
.mf-clear .i { width: 18px; height: 18px; }
.mf-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(340px, 45vh); overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border-radius: 18px; box-shadow: var(--float); overscroll-behavior: contain; }
.mf-list[hidden] { display: none; }
.mf-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mf-list button:active, .mf-list li.on button { background: var(--brand-soft); }
@media (hover: hover) { .mf-list button:hover { background: var(--brand-soft); } }
.mf-t { min-width: 0; display: grid; }
.mf-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.mf-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.mf-none { padding: 12px 10px; color: var(--text-3); font-size: 15px; }

/* ---------- Today ---------- */

/* The hello: the date, a name, and one plain line on the day. */
.hello { padding: 14px 0 16px; }
.hello-date { color: var(--text-3); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hello h1 { margin-top: 2px; font-size: 32px; line-height: 1.06; font-weight: 600; letter-spacing: -.04em; overflow-wrap: anywhere; }
.hello-sum { margin-top: 6px; color: var(--text-2); font-size: 16px; line-height: 1.45; }
@media (min-width: 900px) { .hello h1 { font-size: 40px; } }

/* Owner only: the two things an owner starts the day by doing. */
.quick-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.quick-acts .btn { padding: 0 10px; font-size: 16px; }

.maps-link { min-height: 44px; margin: -6px 0 4px; }
.maps-link small { color: var(--text-3); font-size: 13px; font-weight: 500; }

.note-row + .note-row { margin-top: 8px; }
.note-info { background: var(--brand-soft); color: var(--brand-fg); }
.note-info .row-chev { color: var(--brand-fg); }

/* Later this week: the next few days, one line each. */
.later { margin-top: 26px; }
.later h2 { margin: 0 2px 10px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.later-list { margin-bottom: 0; }
.later-row { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 16px; }
.later-row:active { background: var(--hover); }
@media (hover: hover) { .later-row:hover { background: var(--hover); } }
.later-day { flex: none; width: 40px; display: flex; flex-direction: column; align-items: center; color: var(--text-3); font-size: 13px; font-weight: 600; line-height: 1.1; text-transform: uppercase; }
.later-day b { color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.later-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.later-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.later-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.later-kind { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font-size: 13px; font-weight: 600; }
.later-row.k-pickup .later-kind { background: var(--paper-2); color: var(--ink); }
.later-row.k-swap .later-kind { background: var(--violet-soft); color: var(--violet-ink); }
.later-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.hello + .fine { margin-top: -6px; }

/* The top and bottom bars a shade darker than the page, so they read as frame. */
.topbar { background: color-mix(in srgb, var(--bar) 90%, transparent); }
.tabbar { background: color-mix(in srgb, var(--bar) 94%, transparent); }
@media (min-width: 900px) { .quick-acts { max-width: 480px; } }

/* ---------- Booking and invoice forms ---------- */

/* The customer picker (Take a booking, New invoice): a search over everyone on
   file, eight at a time, then the chosen person as one compact card. */
.picker { margin-bottom: 4px; }
.form-sub.first { margin-top: 0; }
.pick-search { margin-bottom: 10px; box-shadow: none; background: var(--paper-2); }
.pick-search:focus-within { box-shadow: 0 0 0 2px var(--brand-fg); }
.pick-list { margin: 0 0 8px; border-radius: 16px; box-shadow: none; border: 1px solid var(--line-hi); }
.pick-list .row { min-height: 60px; padding: 10px 14px; }
.pick-list .row.add { background: var(--brand-soft); }
.pick-more { margin: 0 2px 10px; color: var(--text-3); font-size: 14px; }
.pick-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--brand-soft); }
.pick-who { flex: 1; min-width: 0; }
.pick-who p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.pick-name { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.pick-card .link-btn { flex: none; min-height: 44px; padding: 0 4px; }
.pick-new { padding: 14px 14px 2px; border-radius: 16px; background: var(--paper-2); }
.pick-new .field input, .pick-new .field select { background: var(--surface); }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pick-title { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.pick-note { margin: 0 0 12px; }
.pick-hint { margin: -6px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: 14px; line-height: 1.4; }
.pick-after { margin: 4px 2px 0; }

/* Take a booking: one card per part of the call. */
.bk .card { margin-bottom: 12px; }
.bk-note { margin: -4px 0 12px; line-height: 1.4; }
.bk-note.bad, .bk-when.bad { color: var(--bad); }
.bk-when { margin: 2px 0 0; color: var(--text-2); font-size: 15px; font-weight: 500; line-height: 1.4; }
.trip-line { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); color: var(--text-2); font-size: 15px; line-height: 1.4; }
.trip-line .i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.trip-line b { color: var(--ink); font-weight: 600; }
.trip-free { background: var(--ok-soft); color: var(--ok); }
.trip-fee { background: var(--warn-soft); color: var(--warn-ink); }
.trip-fee b { color: var(--warn-ink); }
p.trip-line.muted { display: block; }
.bk .quote { margin-bottom: 14px; }
.quote-bad b { color: var(--bad); }

/* Days: a number between a minus and a plus, big enough for a thumb. */
.stepper { display: flex; align-items: center; gap: 10px; }
.step-btn { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 999px; background: var(--paper-2); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.step-btn:active { transform: scale(.94); }
.step-btn .i { width: 22px; height: 22px; }
.step-val { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.step-val b { color: var(--text-2); font-size: 16px; font-weight: 500; }
.step-val input { width: 76px; min-height: 52px; padding: 0 8px; border: 1px solid var(--line-hi); border-radius: 12px; outline: none; background: var(--surface); text-align: center; font-size: 20px; font-weight: 600; -moz-appearance: textfield; }
.step-val input::-webkit-outer-spin-button, .step-val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-val input:focus { border-color: var(--brand-fg); box-shadow: 0 0 0 3px var(--brand-soft); }

/* How they pay: three whole-row choices, the way the Dashboard shows them. */
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line-hi); border-radius: 16px; background: var(--surface); cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-dot { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 2px solid var(--mute); border-radius: 50%; }
.opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-main b { font-size: 16px; font-weight: 600; }
.opt-main small { color: var(--text-3); font-size: 14px; line-height: 1.35; }
.opt:has(input:checked) { border-color: var(--brand-fg); background: var(--brand-soft); }
.opt:has(input:checked) .opt-dot { border-color: var(--brand-fg); background: radial-gradient(circle, var(--brand-fg) 0 5px, transparent 6px); }
.opt:has(input:focus-visible) { outline: 2px solid var(--brand-fg); outline-offset: 2px; }

/* A real checkbox drawn as a big box, for the terms and the trip fee. */
.check-row { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { flex: none; width: 26px; height: 26px; display: grid; place-items: center; margin-top: 0; border: 2px solid var(--mute); border-radius: 8px; background: var(--surface); color: transparent; }
.check-box .i { width: 16px; height: 16px; stroke-width: 3; }
.check-row:has(input:checked) .check-box { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.check-row:has(input:focus-visible) .check-box { outline: 2px solid var(--brand-fg); outline-offset: 2px; }
.check-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.check-main b { font-size: 16px; font-weight: 600; line-height: 1.3; }
.check-main small { color: var(--text-2); font-size: 14px; line-height: 1.4; }
[data-waive] { margin-top: 2px; font-size: 15px; font-weight: 500; align-items: center; }
.terms-row .check-box { margin-top: 1px; }
.ex-check { margin: -4px 0 14px; align-items: center; }
.ex-check .check-main small { margin-top: 1px; }
.field.is-off { opacity: .45; }
.field.is-off input { pointer-events: none; }

/* Missing pieces, right above the button that needs them. */
.bill-missing { margin: 0 0 8px; color: var(--bad); font-size: 14px; font-weight: 500; line-height: 1.35; }
.bill-missing:empty { display: none; }

/* On a booking: what was agreed, under the money. */
.pay-fact { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.terms-told { display: flex; align-items: flex-start; gap: 6px; color: var(--ok); font-weight: 500; }
.terms-told .i { flex: none; width: 17px; height: 17px; margin-top: 1px; }

/* ---------- Requests and timeline ---------- */
/* What customers ask for from their bin page: the card on Today and on a
   booking, and the small centered rows between texts in a thread. */
.req-card { margin: 0 0 24px; padding: 18px; background: var(--surface); border-radius: 22px; box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.req-card .card-head { margin-bottom: 6px; }
.req-card .card-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.req-list, .req-done { list-style: none; margin: 0; padding: 0; }
.req { padding: 14px 0; }
.req + .req { border-top: 1px solid var(--line); }
.req:last-child { padding-bottom: 2px; }
.req-top { display: flex; align-items: center; gap: 12px; }
.req-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand-fg); }
.req-ic .i { width: 22px; height: 22px; }
.req-main { display: flex; flex-direction: column; min-width: 0; }
.req-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.req-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 14px; }
.req-ask { margin-top: 10px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.req-pay { margin-top: 2px; color: var(--text-3); font-size: 14px; }
.req-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.req-open { margin-left: auto; padding: 8px 4px; color: var(--brand-fg); font-size: 15px; font-weight: 600; }
.req-done { margin-top: 6px; }
.req-done li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.req-card .req-list + .req-done { margin-top: 10px; }
.req-state { flex: none; margin-top: 1px; padding: 2px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600; }
.req-state.declined { background: var(--bad-soft); color: var(--bad); }
.req-what { min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.req-what b { color: var(--ink); font-weight: 600; }
.req-what em { display: block; color: var(--text-3); font-style: normal; }

.bubbles .tl-event { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 4px; color: var(--text-3); font-size: 13px; line-height: 1.35; text-align: center; }
.tl-event::before, .tl-event::after { content: ''; flex: 1 1 12px; min-width: 12px; height: 1px; background: var(--line-hi); }
.tl-ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); color: var(--text-2); }
.tl-ic .i { width: 13px; height: 13px; }
.tl-text { flex: 0 1 auto; max-width: 80%; overflow-wrap: anywhere; }
.tl-text time { color: var(--text-3); }
.tl-event.k-request .tl-ic { background: var(--brand-soft); color: var(--brand-fg); }
.tl-event.k-request .tl-text { color: var(--ink); font-weight: 500; }
.tl-event.k-approved .tl-ic { background: var(--ok-soft); color: var(--ok); }
.tl-event.k-declined .tl-ic { background: var(--bad-soft); color: var(--bad); }

/* ---------- More > Results (js/results.js) ---------- */
.rs-range { margin: 0 0 16px; }
.rs-wait { padding: 24px 4px; }
.rs-money { padding: 22px; }
.rs-kicker { color: var(--text-2); font-size: 14px; font-weight: 600; }
.rs-big { margin: 4px 0 6px; font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (min-width: 900px) { .rs-grid { grid-template-columns: repeat(4, 1fr); } }
.rs-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--lift); min-width: 0; }
.rs-stat b { font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rs-stat span { font-size: 15px; font-weight: 600; }
.rs-stat small { color: var(--text-3); font-size: 13px; }
.rs-stat.brand b { color: var(--brand-fg); }
.rs-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.rs-bar { flex: 1 1 0; min-width: 3px; height: max(3px, var(--h)); border-radius: 4px 4px 1px 1px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.rs-bar.booked { background: var(--brand); }
.rs-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.rs-key { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--text-3); font-size: 13px; }
.rs-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); }
.rs-list { padding: 4px 18px; }
.rs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.rs-row:last-child { border-bottom: 0; }
.rs-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.rs-row b { font-weight: 600; overflow-wrap: anywhere; }
.rs-row small { color: var(--text-3); font-size: 13px; }
.rs-n { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-list > .muted { margin: 12px 0; }
.rs-foot { padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.rs-bars.few { gap: 8px; height: 150px; }
.rs-col { flex: 1 1 0; max-width: 64px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.rs-col .rs-bar { width: 100%; flex: 0 0 auto; height: calc(max(3px, var(--h)) * .72); }
.rs-col small { color: var(--text-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rs-col em { color: var(--text-3); font-size: 12px; font-style: normal; white-space: nowrap; }

/* ---------- Owner tools: invoice reminders, notices, tax and bin switch, the unpaid list, texts and lists ---------- */

.row-note { font-size: 13px; }
.row-note.bad { color: var(--bad); }
.dd-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.facts > div:has(> .dd-act) { align-items: center; padding-top: 0; padding-bottom: 0; }
.dd-act .link-btn, .rowline .link-btn { flex: none; min-height: 44px; padding: 0 4px; }
.rowlines { list-style: none; margin: 12px 0 0; padding: 0; }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; line-height: 1.4; }
.rowline .bad { color: var(--bad); font-weight: 500; }
.sw-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; margin-bottom: 12px; cursor: pointer; }
.sw-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-text b { font-size: 15px; font-weight: 600; }
.sw-text small { color: var(--text-3); font-size: 13px; line-height: 1.3; }
.bill-tax { color: var(--text-3); font-size: 13px; }
.bill-tax:empty { display: none; }

.unpaid { margin-bottom: 16px; }
.unpaid-head .row-title, .unpaid-head .amount { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.unpaid > .row + .row { border-top: 1px solid var(--line); }
/* An invoice in a list: the amount over its status, so the name and the due date get the width. */
.inv-row .row-right { flex-direction: column; align-items: flex-end; gap: 4px; }
.inv-row .row-note { white-space: normal; }
/* Results: the four ranges stay on one line on a phone. */
.rs-range { flex-wrap: nowrap; gap: 6px; }
.rs-range .chip { flex: 1 1 auto; }
.rs-range .chip span { justify-content: center; width: 100%; padding-inline: 8px; font-size: 14px; white-space: nowrap; }
.row.is-late .row-sub, .amount.bad { color: var(--bad); }

.words-label { margin: 0 0 8px; color: var(--text-3); font-size: 13px; }
.words { margin-top: 0; }
.list-edit { gap: 8px; min-height: 52px; padding-top: 4px; padding-bottom: 4px; border-top: 1px solid var(--line); cursor: default; }
.list-card > .list-edit:first-child { border-top: 0; }
.list-edit .icon-btn[disabled] { opacity: .3; cursor: default; }
.flip { transform: rotate(180deg); }
.list-add { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.list-add .field { flex: 1; min-width: 0; margin-bottom: 0; }
.list-add .btn { flex: none; min-height: 48px; }

/* ---- picker ---- */
.pick-new.flat { padding: 0; border-radius: 0; background: none; }
.pick-sugg-box:empty { display: none; }
.pick-sugg { margin: -6px 0 12px; border-radius: 0; background: none; box-shadow: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pick-sugg .row { min-height: 56px; padding: 8px 4px; }
.pick-browse { min-height: 44px; margin: 0 0 4px; padding: 0 2px; }

/* ---- today work surface ---- */

/* The dark neutral button: every stop's main button except the Next one, so one action stands out. */
.btn-dark { background: var(--ink-fill); color: var(--on-ink); }
.btn-dark:active { background: color-mix(in srgb, var(--ink-fill) 86%, var(--surface)); }
@media (hover: hover) { .btn-dark:hover { background: color-mix(in srgb, var(--ink-fill) 86%, var(--surface)); } }

/* "2 things need you" in the hello: a link inside the sentence, with a finger-sized tap area. */
.hello-link { display: inline; margin: -12px -4px; padding: 12px 4px; border: 0; background: none; color: var(--brand-fg); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }

/* A stop is a work card: the line on what it is, who and where, what to do with the truck, the main button,
   then On my way, Directions and Call. Nothing hides behind a tap. */
.wstops { gap: 12px; }
.wstop { overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.wstop.next { box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.wstop-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.wstop-head .stop-n { width: 34px; height: 34px; border-radius: 10px; }
.wstop-head:active { background: var(--hover); }
@media (hover: hover) { .wstop-head:hover { background: var(--hover); } }
.wstop-kind { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; color: var(--text-3); font-size: 13px; line-height: 1.35; }
.wk-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.wstop-kind b { color: var(--brand-fg); font-weight: 600; }
.k-pickup .wstop-kind b { color: var(--ink); }
.k-swap .wstop-kind b { color: var(--violet-ink); }
.wstop .next-tag { flex: none; padding: 2px 8px; }
.wstop-head .stop-name { line-height: 1.3; }
.wstop-head .stop-addr { display: flex; min-width: 0; line-height: 1.35; }
.wstop-head .sa-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wstop-head .sa-p { flex: none; white-space: pre; }
.wstop-how { margin: 0 12px 8px; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.35; }
.wstop-acts { display: grid; gap: 8px; padding: 0 12px 12px; }
.wstop-main { min-height: 48px; font-size: 16px; }
.wstop-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wstop-row .btn { min-height: 44px; padding: 0 4px; gap: 4px; font-size: 14px; white-space: nowrap; }
.wstop-row .btn .i { width: 18px; height: 18px; }
@media (max-width: 399px) { .wstop-row .btn { gap: 2px; font-size: 13px; } .wstop-row .btn .i { width: 16px; height: 16px; } }
@media (max-width: 349px) { .wstop-row .btn .i, .need-two .btn .i { display: none; } }

/* A stop that is done: one line, with Undo while it can be undone. */
.wstop.wdone { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 8px 8px 12px; }
.wdone .stop-n { width: 32px; height: 32px; border-radius: 10px; background: var(--ok-fill); color: #fff; }
.wdone-main { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 44px; color: var(--text-2); font-size: 15px; line-height: 1.3; white-space: nowrap; }
.wdone-main b { flex: none; }
.wdone-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
.wdone-main b { color: var(--ok); font-weight: 600; }
.wdone-undo { flex: none; min-height: 44px; padding: 0 12px; gap: 4px; }

/* Needs you: what the owner has to deal with, after the trucks. */
.needs { margin-top: 32px; scroll-margin-top: 68px; outline: none; }
.needs-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; }
.needs-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.need { position: relative; margin-bottom: 12px; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.need::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--bad-fill); }
.need-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; }
.need-head:active { background: var(--hover); }
@media (hover: hover) { .need-head:hover { background: var(--hover); } }
.need-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.need-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.need-sub { color: var(--text-2); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.need-acts { display: grid; gap: 8px; padding: 0 16px 16px 20px; }
.need-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.need-two .btn { min-height: 48px; padding: 0 8px; font-size: 15px; white-space: nowrap; }
.need-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 12px; padding: 0 16px; border-radius: 16px; background: var(--paper-2); color: var(--text-2); font-size: 15px; font-weight: 500; }
.need-texts { margin-bottom: 12px; }
.needs .req-card { margin: 0 0 12px; }
.unpaid-quiet { margin: 24px 0 0; }
.unpaid-row .row-title { white-space: normal; color: var(--text-2); font-size: 15px; font-weight: 500; }
.later { margin-top: 32px; }

/* A computer: two cards across, so the buttons are not a screen wide. */
@media (min-width: 900px) {
  .wstops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .wstop:not(.wdone) { display: flex; flex-direction: column; }
  .wstop-acts { margin-top: auto; }
  .needs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .need { display: flex; flex-direction: column; }
  .need-acts { margin-top: auto; }
  .needs > .needs-head, .needs > .req-card, .needs > .need-texts, .needs > .need-more { grid-column: 1 / -1; }
  .needs > .need { margin-bottom: 0; }
  .needs > .needs-head { margin-bottom: 0; }
}

/* Move a day: the next seven days to tap, the closed ones marked, then any other day. */
.mv-days { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mv-day span { flex-direction: column; justify-content: center; gap: 0; min-width: 60px; min-height: 60px; padding: 0 8px; border-radius: 16px; font-size: 13px; line-height: 1.2; }
.mv-day b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.mv-day em { color: var(--bad); font-size: 13px; font-style: normal; font-weight: 600; }
.mv-day.shut span { border: 1.5px dashed var(--line-hi); background: none; color: var(--text-3); }
.mv-day.shut input:checked + span { border-color: var(--brand-fg); background: var(--brand-soft); color: var(--brand-fg); }
.mv-note { min-height: 20px; margin: -6px 0 12px; color: var(--text-2); font-size: 14px; }
.mv-note.bad { color: var(--bad); font-weight: 500; }
.mv-note:empty { min-height: 0; margin: 0; }

/* Toasts with Undo and a second action: the words on top, the buttons under them. */
.toast-msg { flex: 1 1 0; min-width: 0; }
.toast.has-two { flex-wrap: wrap; row-gap: 4px; }
.toast .toast-undo { display: inline-flex; align-items: center; min-height: 44px; margin-top: -12px; margin-bottom: -12px; }
.toast.has-two .toast-msg { flex-basis: 100%; }
.toast.has-two .toast-undo { margin: 0 auto 0 -10px; }
.toast.has-two .toast-act { margin: 0 -6px 0 0; }

/* The pin card: the main button on top, four small buttons under it. */
.pc-main { min-height: 48px; margin-top: 12px; }
button.pc-act { border: 0; font-family: inherit; cursor: pointer; }
.pc-actions.under-main { margin-top: 8px; }
.pc-actions:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pc-actions:has(> :nth-child(4)) .pc-act { padding: 8px 2px; font-size: 13px; }

/* ---- bookings + calendar ---- */

/* Bookings: the month at a glance, one slim strip, no card per figure. */
/* the middle figure is money: its column is never narrower than the number, which never breaks in two */
.bk-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(max-content, 1.3fr) minmax(0, 1fr); gap: 8px; margin: 0 0 12px; padding: 12px; background: var(--surface); border-radius: 16px; box-shadow: var(--lift); }
.bk-strip:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-strip > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bk-strip > div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.bk-strip b { font-size: clamp(18px, 5.6vw, 22px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-strip span { color: var(--text-3); font-size: 13px; line-height: 1.3; }
.bk-switch { margin-bottom: 12px; }
.bk-switch a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; }
.bk-switch .i { width: 18px; height: 18px; }

/* One chip row: Coming up, Out now, Late (red), Done. It wraps on a narrow phone, never scrolls sideways. */
.bk-filters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.bk-filters.is-off { opacity: .5; }
.bk-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border: 1.5px solid transparent; border-radius: 999px; background: var(--paper-2); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.bk-chip b { color: var(--text-3); font-weight: 600; }
.bk-chip.on { border-color: var(--brand-fg); background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; }
.bk-chip.on b { color: inherit; }
.bk-chip.bad { color: var(--bad); }
.bk-chip.bad b { color: inherit; }
.bk-chip.bad.on { border-color: var(--bad); background: var(--bad-soft); }

/* A booking row: name, the dates under it, the money at the right. Hairlines come from .list. */
.bk-row { min-height: 64px; padding: 12px 16px; }
.bk-row .row-sub { color: var(--text-2); }
/* Under the name: what happens next as a coloured word (drop-off, pickup, swap: Today's three colours), then its day. */
.bk-sub { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 3px; }
.bk-kind { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.bk-kind.k-pickup { background: var(--paper-2); color: var(--ink); }
.bk-kind.k-swap { background: var(--violet-soft); color: var(--violet-ink); }
.bk-kind.k-done { background: var(--ok-soft); color: var(--ok); }
.bk-when { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A 360px phone is a few pixels short of one line; a 320px one puts the day under the word, never cuts it. */
@media (max-width: 380px) { .bk-sub { gap: 6px; } .bk-kind { padding: 1px 6px; } }
/* a long day ("Mon, Nov 16 · 30 yd") beside the tag doesn't fit a 360px phone: it goes under the tag instead of being cut */
@media (max-width: 380px) { .bk-sub { flex-wrap: wrap; row-gap: 2px; } .bk-when { white-space: normal; } }
.bk-late { display: block; margin-top: 4px; }
.bk-money { flex-direction: column; align-items: flex-end; gap: 2px; }
.bk-money b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bk-money small { color: var(--text-3); font-size: 13px; font-weight: 600; }
.bk-money small.ok { color: var(--ok); }
.bk-money small.warn { color: var(--warn-ink); }

/* The month grid. Seven columns, Sunday first. */
.cal-head { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; }
.cal-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.cal-today { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--brand-fg); font-size: 15px; font-weight: 600; }
.cal-nav { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--paper-2); color: var(--ink); }
.cal-nav .i { width: 20px; height: 20px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow { padding: 4px 0; color: var(--text-3); font-size: 13px; font-weight: 600; text-align: center; }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 68px; padding: 6px 2px 4px; border: 0; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--lift); }
.cal-day:active { background: var(--hover); }
@media (hover: hover) { .cal-day:hover { background: var(--hover); } }
.cal-day:focus-visible { outline: 2px solid var(--brand-fg); outline-offset: 1px; }
.cal-n { font-size: 15px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cal-shut { color: var(--text-3); font-size: 13px; font-style: normal; font-weight: 600; line-height: 1.2; }
.cal-ct { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.cal-ct i { min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.cal-ct .k-pickup { background: var(--ink-fill); color: var(--on-ink); }
.cal-ct .k-swap { background: var(--violet-fill); color: #fff; }
.cal-day.is-today { box-shadow: 0 0 0 2px var(--brand-fg), var(--lift); }
.cal-day.is-today .cal-n { color: var(--brand-fg); }
.cal-day.is-past { background: var(--paper-2); box-shadow: none; }
.cal-day.is-past > * { opacity: .6; }
.cal-day.is-shut { background: repeating-linear-gradient(135deg, var(--paper-2) 0 6px, var(--surface) 6px 12px); box-shadow: inset 0 0 0 1px var(--line-hi); }
.cal-day.is-shut.is-today { box-shadow: 0 0 0 2px var(--brand-fg); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 4px 0; color: var(--text-2); font-size: 13px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.cal-legend .k-pickup i { background: var(--ink-fill); }
.cal-legend .k-swap i { background: var(--violet-fill); }

/* The day sheet: its jobs as rows, a Move button on each, then the two actions. */
.cal-list { list-style: none; margin: 0 0 12px; padding: 0; }
.cal-row { display: flex; align-items: center; gap: 8px; min-height: 56px; border-top: 1px solid var(--line); }
.cal-row:first-child { border-top: 0; }
.cal-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.cal-pill { flex: none; min-width: 72px; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-fg); font-size: 13px; font-weight: 600; text-align: center; }
.cal-row.k-pickup .cal-pill { background: var(--paper-2); color: var(--ink); }
.cal-row.k-swap .cal-pill { background: var(--violet-soft); color: var(--violet-ink); }
.cal-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.cal-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.cal-row .btn-small { flex: none; min-height: 44px; }
.cal-done { flex: none; padding: 0 12px; color: var(--text-3); font-size: 14px; font-weight: 600; }
.cal-note { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); color: var(--ink); font-size: 14px; line-height: 1.4; }
.cal-none { margin: 12px 0; }
.cal-none a { color: var(--brand-fg); font-weight: 600; }
.later-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 8px; }
.later-head h2 { margin: 0; }
.later-head .link-btn { min-height: 44px; }

/* Take a booking: the missing list is quiet until Book it is tapped once, then red. Book it can look muted and still answers a tap. */
.bill-missing { color: var(--text-3); }
.bill-missing.hot { color: var(--bad); }
.btn.is-muted { opacity: .5; box-shadow: none; }

/* Needs you: money to bill. */
.need.is-bill::before { background: var(--warn-fill); }

/* Results: the four ranges wrap on a narrow phone instead of scrolling sideways. */
@media (max-width: 359px) { .rs-range { flex-wrap: wrap; } .rs-range .chip { flex: 1 1 40%; } }

@media (min-width: 900px) {
  .bk-strip, .cal, .bk-switch, .bk-filters { max-width: 720px; }
  .cal-day { min-height: 84px; }
}

/* ---- what you can tap ----
   One rule for the whole app: a thing you can tap has an outline or a strong fill; a thing you can only read has
   neither. Before this a grey rounded box could be a button, a choice, a label or a note, and nobody could tell
   which. Buttons and choices are now white with a dark outline; notes and counts are plain. */
:root { --line-btn: rgba(17, 17, 20, .26); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.btn-secondary:active { background: var(--paper-2); }
@media (hover: hover) { .btn-secondary:hover { background: var(--paper-2); } }
.btn-quiet { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.chip span { border-color: var(--line-btn); background: var(--surface); }
.wstop-row .btn { font-size: 15px; }
@media (max-width: 399px) { .wstop-row .btn { font-size: 14px; } }
/* The day's counts are a line to read, not three buttons. */
.counts { gap: 4px 16px; }
.count { padding: 0; border-radius: 0; background: none; box-shadow: none; font-size: 15px; }

/* ---- today: unpaid invoices ---- */
.unpaid .link-btn .i { width: 16px; height: 16px; }
.unpaid-line { gap: 12px; }
.unpaid-line .later-addr { white-space: normal; line-height: 1.35; }
.unpaid-amt { flex: none; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }

/* ---- a finger fits ----
   Nothing you tap is under 44px: the back link was 34, small buttons 38, map pins 30. Inline links keep their
   line but get a taller hit area (padding on an inline box does not move the text). */
.btn-small { min-height: 44px; }
.back { min-height: 44px; margin-bottom: 2px; padding: 6px 10px 6px 6px; font-size: 16px; font-weight: 600; }
.link-btn { min-width: 44px; min-height: 44px; }
.req-open { min-height: 44px; }
.seg a { padding: 12px 8px; color: var(--ink); }
/* a taller hit area on a link inside a sentence, without moving the words (padding shifts it in a flex line) */
.inline-link, main p a:not(.btn), main .fine a:not(.btn), main .muted a:not(.btn) { position: relative; }
.inline-link::after, main p a:not(.btn)::after, main .fine a:not(.btn)::after, main .muted a:not(.btn)::after { content: ''; position: absolute; inset: -12px -4px; }
/* ::before, because a pin's ::after is its little tail (a bin pin's own tap area is on its pill: see .pin span) */
.leaflet-marker-icon.pin-num::before { content: ''; position: absolute; inset: -8px -6px; }
/* The booking form's pinned bar is solid: the page under it no longer shows through the total or the button. */
.bill-bar { background: var(--surface); }
.btn.is-muted { opacity: 1; background: var(--brand-muted); }

/* ---- invoices and messages ---- */
/* New invoice: one-tap chips above the lines. They wrap on a narrow phone and stay 44px tall. */
.quick-add { margin: 4px 0 14px; }
.quick-add .chip-btn { flex: 0 1 auto; min-height: 44px; max-width: 100%; padding: 8px 14px; line-height: 1.2; text-align: left; }
.quick-add .chip-btn[hidden] { display: none; }
.quick-add .chip-minus, .quick-add .chip-plain { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.bill-missing { margin: 0 0 10px; font-size: 14px; line-height: 1.35; }
.bill-missing[hidden] { display: none; }
.bill-row .btn { white-space: nowrap; }
.bill-row .btn .i { flex: none; }
.copy-link { min-height: 44px; margin-top: 4px; }
/* Messages: quick replies in one row that scrolls inside itself, never the page. */
.quick-replies { display: flex; gap: 8px; max-width: 100%; margin: 0 0 10px; padding: 2px 2px 4px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }
.qr-btn { flex: none; min-height: 44px; padding: 0 16px; font-size: 15px; white-space: nowrap; }
/* One main action in the send sheet: Copy and Share are links under the text. */
.send-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; }

/* ---- faster sheets ---- */
/* Dropped off, Picked up and Move a day: switches with the words shown, the bill, 14 days to tap. */
.fs-sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; margin: 6px 0 0; cursor: pointer; }
.fs-sw[hidden], .fs-text[hidden], .fs-bill[hidden], .fs-nophone[hidden], .fs-warn[hidden], .fs-anyway[hidden] { display: none; }
.fs-sw-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fs-sw-main b { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.fs-sw-main small { color: var(--text-2); font-size: 14px; line-height: 1.35; }
.fs-text { margin: 4px 0 14px; white-space: pre-line; overflow-wrap: anywhere; border-radius: 18px; }
.fs-nophone { margin: 10px 0 14px; }
.fs-warn { margin: -4px 0 12px; color: var(--bad); font-size: 15px; font-weight: 600; line-height: 1.35; }
.fs-h { margin: 14px 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.fs-bill { margin: 6px 0 10px; padding: 4px 14px 12px; border-radius: 16px; background: var(--paper-2); }
.fs-lines { margin: 0; padding: 0; list-style: none; }
.fs-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; line-height: 1.35; }
.fs-lines li span { min-width: 0; overflow-wrap: anywhere; }
.fs-lines li b { flex: none; font-weight: 600; }
.fs-due { margin: 6px 0 0; padding-top: 8px; border-top: 1.5px solid var(--line-btn); font-size: 16px; font-weight: 600; }
.fs-due.owe b { color: var(--bad); font-size: 20px; }
.mv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.mv-tap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 64px; padding: 6px 4px; border: 1.5px solid var(--line-btn); border-radius: 16px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.2; cursor: pointer; }
.mv-tap b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.mv-tap em { color: var(--bad); font-size: 12px; font-style: normal; font-weight: 600; }
.mv-tap em.now { color: var(--brand-fg); }
/* a later pickup's added cost on the day itself (Move pickup) */
.mv-tap em.cost { color: var(--warn-ink); }
.mv-cover { margin: -4px 0 12px; font-size: 14px; }
.mv-tap.shut { border-style: dashed; color: var(--text-3); }
.mv-tap.is-now { border-color: var(--brand-fg); background: var(--brand-soft); }
.mv-tap:active { background: var(--brand-soft); }
.mv-tap:focus-visible { outline: 2px solid var(--brand-fg); outline-offset: 2px; }
.fs-anyway { margin: 0 0 12px; color: var(--bad); }
.fs-slow { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid var(--line-btn); }
.fs-slow .btn { margin-bottom: 10px; }
.fs-slow .muted { margin: -4px 0 10px; }

/* ---- the calendar's day sheet ---- */
.cal-sum { margin: 0 0 4px; color: var(--text-2); font-size: 15px; font-weight: 500; }
.cal-row { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 12px; }
.cal-row-main { min-height: 56px; }
.cal-row-main .row-chev { flex: none; }
.cal-row { padding: 6px 0 4px; }
.cal-row .stop-n { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.cal-row.is-done .stop-n { background: var(--paper-2); color: var(--text-3); }
.cal-kind b { display: inline; color: var(--brand-fg); font-size: inherit; font-weight: 600; }
.cal-row.k-pickup .cal-kind b { color: var(--ink); }
.cal-row.k-swap .cal-kind b { color: var(--violet-ink); }
.cal-row-acts { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 0; margin-top: -6px; padding-left: 44px; }
.cal-row-acts .link-btn { min-height: 40px; padding: 0 2px; font-size: 14px; }
.cal-row-acts .link-btn .i { width: 16px; height: 16px; }
.cal-truck { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: 8px; }
.cal-truck h3 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.cal-truck h3 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-truck h3 .i { flex: none; width: 18px; height: 18px; color: var(--text-3); }
.cal-truck h3 small { color: var(--text-2); font-size: 14px; font-weight: 500; }
.cal-truck .link-btn { flex: none; min-height: 44px; padding: 0 2px; font-size: 14px; white-space: nowrap; }
.cal-truck .link-btn .i { width: 16px; height: 16px; stroke-width: 2.8; }
.cal-list + .cal-truck { margin-top: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.cal-truck + .cal-list { margin-bottom: 8px; }
.cal-close { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.cal-close h3 { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.cal-close .btn { margin-top: 4px; }
.cal-close .muted { margin: 10px 0 12px; }

/* ---- today: one card open at a time ----
   A closed card is a row to read: what, who, where. Tapping it opens it (what to do, the buttons, a way into the
   booking) and closes the one that was open. The chevron says which way it goes. */
.acc-head { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.acc-chev { flex: none; width: 20px; height: 20px; margin-left: 2px; color: var(--text-3); transition: transform .18s; }
.acc.open > .acc-head .acc-chev { transform: rotate(180deg); }
.wstop-head.acc-head { padding: 12px 12px 12px 12px; }
.wstop.open > .wstop-head.acc-head { padding-bottom: 8px; }
.need-head.acc-head { padding: 14px 14px 14px 20px; }
.need.open > .need-head.acc-head { padding-bottom: 10px; }
.wstop.acc:not(.open), .need.acc:not(.open) { box-shadow: 0 1px 2px rgba(17, 17, 20, .05), 0 0 0 1px var(--line); }
.wstop.acc.next:not(.open) { box-shadow: 0 0 0 2px var(--brand-fg); }
.wstops { gap: 8px; }
.need { margin-bottom: 8px; }
.acc-body > .wstop-acts { padding-bottom: 4px; }
.acc-body > .need-acts { padding-bottom: 4px; }
/* The way into the booking or the invoice: a full-width row at the foot of an open card. */
.acc-go { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; margin: 4px 12px 8px; border-radius: 12px; color: var(--brand-fg); font-size: 15px; font-weight: 600; }
.acc-go:active { background: var(--brand-soft); }
@media (hover: hover) { .acc-go:hover { background: var(--brand-soft); } }
.acc-go .i { width: 18px; height: 18px; }
@media (min-width: 900px) { .wstop.acc:not(.open) { align-self: start; } }

/* ---- bins already out ---- */
.ex-added { margin-bottom: 12px; padding-bottom: 4px; }
.ex-added .card-title { margin-bottom: 4px; }
.ex-added .row { min-height: 56px; }
.ex-free { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -2px 0 12px; }
.ex-free:empty { display: none; }
.ex-free-lead, .ex-free-note { flex: 1 1 100%; margin: 0; line-height: 1.35; }
.ex-free .chip-btn { min-height: 44px; min-width: 44px; justify-content: center; font-variant-numeric: tabular-nums; }
.ex-free .chip-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.ex-missing { overflow-wrap: anywhere; }
.ex-fleet-add { margin: 0 0 14px; min-height: 48px; }
.form .ex-check { min-height: 44px; }
.form.bk, .ex-added { max-width: 100%; }
.form.bk input[type="date"] { max-width: 100%; min-width: 0; }

/* ---- round 2 of the screen review ---- */
/* A truck's heading on Today is the way into its route. */
a.truck-head { color: inherit; min-height: 48px; }
a.truck-head h2 { display: block; }
a.truck-head .muted { display: block; }
a.truck-head .row-chev { flex: none; }
/* Requests are Needs you cards; theirs has the brand's edge, not the late red. */
.need.is-ask::before { background: var(--brand); }
.need-note { margin: 0 0 4px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.need-reqs { display: contents; }
.start-card { margin: 0 0 24px; padding: 18px; }
.start-card .muted { margin: 4px 0 14px; font-size: 15px; line-height: 1.45; }
.driver-map { margin-top: 24px; }
.map-add { margin: 4px 2px 8px; }
/* The same outline on every choice and small control that was still a plain grey shape. */
.bk-chip:not(.on), .stepper button { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.bk-chip:not(.on) { color: var(--ink); }
.wd input:not(:checked) + span { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
/* The three quick replies fit a phone's width without a cut-off word. */
.qr-btn { padding: 0 12px; gap: 6px; font-size: 14px; }
.qr-btn .i { width: 16px; height: 16px; }

/* ---- take a booking: the day in one tap ---- */
.job-kind { margin: 0 0 16px; }
.day-picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.day-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 56px; padding: 4px 2px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-btn); color: var(--ink); font: inherit; cursor: pointer; }
.day-pick span { color: var(--text-2); font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.day-pick b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.day-pick.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand-fg); color: var(--brand-fg); }
.day-pick.on span { color: var(--brand-fg); }
.day-other { display: flex; align-items: center; gap: 12px; }
.day-other > span { flex: none; color: var(--text-2); font-size: 14px; }
.day-other input { flex: 1; min-width: 0; }
@media (max-width: 359px) { .day-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* A row whose job is one action names it in the brand colour. */
.row-do { color: var(--brand-fg); font-size: 15px; font-weight: 600; }

/* ---- the booking page ----
   Under the job card: five closed rows, one line each, one open at a time (the same acc action Today uses). */
.bk-cust { flex-basis: 100%; display: flex; align-items: center; min-height: 44px; color: var(--brand-fg); font-size: 15px; font-weight: 500; }
.bk-map { display: flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 6px; color: var(--brand-fg); font-size: 15px; font-weight: 600; }
.bk-map .i { width: 18px; height: 18px; }
.bk-secs { margin-top: 4px; }
.bk-sec { margin-bottom: 8px; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.bk-sec:not(.open) { box-shadow: 0 1px 2px rgba(17, 17, 20, .05), 0 0 0 1px var(--line); }
.bk-head { min-height: 60px; padding: 10px 14px 10px 18px; }
.bk-head:active { background: var(--hover); }
@media (hover: hover) { .bk-head:hover { background: var(--hover); } }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bk-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.bk-sub { display: flex; min-width: 0; color: var(--text-3); font-size: 14px; line-height: 1.35; }
.bk-clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-tail { flex: none; white-space: pre; }
.bk-sub.ok .bk-clip { color: var(--ok); }
.bk-sub.warn .bk-clip { color: var(--warn-ink); }
.bk-sub.bad .bk-clip { color: var(--bad); }
.bk-sec .acc-body { padding-bottom: 4px; }
.bk-pad { margin: 0; padding: 4px 18px 8px; font-size: 14px; line-height: 1.45; }
.bk-pad.notes { font-size: 15px; padding-bottom: 12px; }
.bk-btns { display: grid; gap: 8px; padding: 6px 14px 12px; }
.bk-btns .btn-block { margin-top: 0; min-height: 48px; }
.bk-btns .muted { margin: 0 4px; font-size: 14px; }
.bk-sec .acc-body > .row { border-top: 1px solid var(--line); }
.bk-lines { list-style: none; margin: 0; padding: 0 18px; }
.bk-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; line-height: 1.35; }
.bk-lines li span { min-width: 0; overflow-wrap: anywhere; }
.bk-lines li b { flex: none; font-weight: 600; }
.bk-due { display: flex; justify-content: space-between; gap: 12px; margin: 6px 18px 4px; padding-top: 10px; border-top: 1.5px solid var(--line-btn); font-size: 16px; font-weight: 600; }
.bk-due.owe b { color: var(--bad); font-size: 20px; }
.bk-invs { margin-top: 4px; }
.bk-bubbles { padding: 4px 16px 8px; }
.bk-events { list-style: none; margin: 0; padding: 4px 18px 12px; }
.bk-events li { padding: 8px 0 8px 16px; position: relative; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.bk-events li:first-child { border-top: 0; }
.bk-events li::before { content: ''; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
/* ---- sales, texts, calendar ---- */
.sl-range { margin: 0 0 16px; gap: 6px; }
.sl-range .chip span { padding: 0 13px; font-size: 14px; }
.sl-figs { padding: 6px 18px; }
.sl-fig { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sl-fig:last-child { border-bottom: 0; }
.sl-fig-main { display: flex; flex-direction: column; min-width: 0; }
.sl-fig-main b { font-size: 15px; font-weight: 600; }
.sl-fig-main small { color: var(--text-3); font-size: 13px; line-height: 1.35; }
.sl-fig strong { flex: none; font-size: 26px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sl-none { display: flex; flex-direction: column; gap: 4px; padding: 20px; }
.sl-none span { color: var(--text-3); font-size: 14px; }
.sl-list { padding: 4px 18px; }
.sl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sl-row:last-child { border-bottom: 0; }
.sl-name { display: flex; flex-direction: column; min-width: 0; }
.sl-name b { font-weight: 600; overflow-wrap: anywhere; }
.sl-name small { color: var(--text-3); font-size: 13px; }
.sl-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-bar { grid-column: 1 / -1; display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.sl-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); }
.sl-best { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
.cal-card .btn-block { margin-top: 4px; }
.cal-lede { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
.cal-count { margin: 10px 0 0; text-align: center; }
.cal-live-note { margin: 4px; }
/* The two ways in, one under the other; the one this device most likely uses is the brand button. */
.cal-ways { display: grid; gap: 10px; }
.cal-ways .btn { margin-top: 0; min-height: 52px; }
.cal-copy { display: flex; margin: 6px auto 0; }
.cal-steps { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 22px; color: var(--ink); line-height: 1.4; }
.cal-phone { display: flex; justify-content: center; margin: 10px auto 0; }
/* The key under the month: the same badge the days carry, with what it counts. */
.cal-legend .cal-key i { width: auto; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 13px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.route-cap { margin: 10px 0 0; color: var(--text-2); font-size: 14px; font-weight: 500; }
.route-cap.full { color: var(--warn-ink); font-weight: 600; }
.sl-download { margin-top: 16px; }
.sl-download-note { margin: 8px 4px 0; text-align: center; font-size: 14px; }
.maps-note { margin-top: 12px; }
/* Trucks: moving a stop, a driver's "Other trucks today", the truck on a new booking. */
/* The truck line: the last line of a stop's card. Which truck on the left, the move button on the right. */
.stop-truck { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.st-on { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding-left: 2px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.st-on .i { flex: none; width: 18px; height: 18px; }
.st-on span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-truck .stop-move { flex: 0 1 auto; min-width: 0; max-width: 64%; }
.stop-truck .stop-move span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A computer: two cards across as two columns of their own, so an open card never stretches the row beside it. */
.wcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-bottom: 14px; }
.wcols > .wstops { display: flex; flex-direction: column; gap: 16px; margin: 0; }
/* in a column of its own a card is as wide as the column (the older grid rule kept a closed card from stretching down) */
.wcols > .wstops > .wstop, .need-cols > div > .need { align-self: stretch; }
.need-cols { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.need-cols > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.need-cols .need { margin-bottom: 0; }
/* Routes: the stop and its truck line are one card */
.stops li.has-truck { background: var(--surface); border-radius: 20px; box-shadow: var(--lift); }
.stops li.has-truck > .stop { background: none; box-shadow: none; }
.stops li.has-truck > .stop-truck { margin: 0 14px; }
/* Settings > Reminders to you: what tonight's notification will say */
.notif-none { margin: 0; line-height: 1.45; }
.remind-when { margin: 14px 2px 6px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.remind-when:first-child { margin-top: 0; }
.remind-bubble { padding: 12px 14px; border-radius: 16px; background: var(--paper-2); }
.remind-bubble b { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
.remind-bubble + .muted { margin-top: 12px; }
.remind-bubble p { margin: 6px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.maps-why { margin: -2px 2px 10px; color: var(--text-3); font-size: 13px; line-height: 1.35; }
/* New invoice: the cards and the total bar sit like Take a booking's */
.form.inv { max-width: 100%; }
.inv-owe > .form-sub:first-child { margin-top: 0; }
.bk-note.warn { color: var(--warn-ink); font-weight: 500; }
.others-sub { margin: -4px 2px 10px; }
.others .later-row .btn { flex: none; min-height: 44px; }
/* The card on file */
.bill-bar .bill-card { margin: 0 0 10px; }
.card-note { background: var(--brand-soft); color: var(--brand-deep, var(--brand)); }
.app-version { margin-top: -6px; color: var(--text-3); font-size: 13px; }
.off-more { align-items: center; min-height: 44px; margin: -4px 0 12px; }
.truck-off { color: var(--warn-ink); font-weight: 600; }

/* ---- runs a day ---- */
.cal-full { color: var(--bad); font-size: 13px; font-style: normal; font-weight: 700; line-height: 1.2; }
.cal-day.is-full { background: var(--bad-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 35%, transparent); }
.cal-day.is-full.is-today { box-shadow: 0 0 0 2px var(--brand-fg); }
.cal-legend .k-full i { background: var(--bad-fill); }
.cal-sum.is-full { color: var(--bad); font-weight: 600; }
.day-pick .day-full { color: var(--bad); font-size: 12px; font-style: normal; font-weight: 700; line-height: 1.1; }
.day-pick.on .day-full { color: var(--bad); }
.mv-tap.is-full { background: var(--bad-soft); }
.mv-tap em.full { color: var(--bad); }
.bk-full { margin: 4px 0 0; color: var(--bad); font-size: 15px; font-weight: 500; line-height: 1.4; }
.bk-full[hidden] { display: none; }
.rules-small { font-size: 14px; }
/* Bins and trucks: both ways to add a bin sit at the top, side by side. */
/* Each as wide as its words need, then they share what is left: two equal halves cut the longer one off at 360px. */
.fleet-adds { display: flex; gap: 8px; margin: 0 0 20px; }
.fleet-adds .btn { flex: 1 1 auto; min-width: 0; padding: 0 10px; font-size: 15px; white-space: nowrap; }
.fleet-adds .ex-fleet-add { margin: 0; }
@media (max-width: 359px) { .fleet-adds { flex-direction: column; } }

/* ---- round 4 ---- */
/* Days off: the stretch the two dates make, said back in words; amber when jobs are already booked in it. */
.sheet .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.off-span { margin: -4px 0 14px; line-height: 1.45; }
.off-span.warn { padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); }
/* On my way: the text itself is the sheet. */
.omw-field textarea { min-height: 112px; font-size: 16px; line-height: 1.45; }
/* Invoices: the search and the way to older paid ones. */
.inv-search { margin: 0 0 12px; }
.inv-older { margin: 12px 0 0; }
/* New customer / Saved customer: the app's own two-way switch, with buttons in place of links. */
.seg button { flex: 1; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: center; white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--seg-on); box-shadow: 0 1px 3px rgba(17, 17, 20, .12); font-weight: 600; cursor: default; }
.pick-seg { margin: 0 0 14px; }
/* Bookings: a row opens in place. */
.list > li > .bk-item { display: block; }
.bk-row.acc-head { padding-right: 12px; }
.bk-item.open > .bk-row.acc-head { background: var(--hover); }
.bk-more { padding: 2px 16px 4px; background: var(--hover); }
.bk-fact { margin: 0 0 4px; color: var(--text-2); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
/* Its buttons are as wide as their words need ("Move drop-off" is longer than "Call"), then share what is left:
   three equal columns cut the long one off. */
.bk-acts { display: flex; margin: 10px 0 2px; }
.bk-acts .btn { flex: 1 1 auto; min-width: 0; padding: 0 8px; }
.bk-more .acc-go { margin: 4px 0 6px; }
/* Take a booking: the line that says the town was read out of the street box. */
.street-note { margin: -6px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep, var(--brand)); font-weight: 500; }

/* ---- addresses as they are typed ---- */
.addr-sugg { margin: -6px 0 14px; overflow: hidden; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1.5px var(--line-btn), var(--lift); }
.addr-sugg[hidden] { display: none; }
.addr-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.addr-row:first-child { border-top: 0; }
.addr-row:active { background: var(--brand-soft); }
@media (hover: hover) { .addr-row:hover { background: var(--brand-soft); } }
.addr-ic { flex: none; width: 18px; height: 18px; color: var(--text-3); }
.addr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.addr-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.addr-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 14px; }
.addr-row small { flex: none; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 13px; }
.addr-wait { margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
.addr-wait:first-child { border-top: 0; }
/* Bins and trucks: the way to take a bin off the list, under the number box. */
.bin-remove { margin-top: 4px; color: var(--bad); }
/* A bin's sheet: where the bin is, as one row that opens its booking. */
.bin-where { margin: 0 0 16px; padding: 12px 14px; border: 1.5px solid var(--line-btn, var(--line-hi)); border-radius: 16px; background: var(--surface); gap: 10px; }
.bin-where .row-do { flex: none; }
.bin-yard { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.bin-yard .i { width: 18px; height: 18px; color: var(--ok); }
@media (max-width: 380px) { .bin-where .row-do { display: none; } }

/* ---------- Dark ----------
   The same names, answered for a dark page. theme.js (the first thing index.html loads) puts data-theme="dark"
   or "light" on <html> before anything is drawn: what the phone is set to, or this phone's own pick under
   Settings > Appearance. On a dark page a raised thing is lighter, not shadowed: the page, a card on it, then a
   field or a button on the card. The client's colour is lifted so it reads on dark: --brand stays a fill that
   carries white text, --brand-fg is the same hue light enough to be text. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d0e12;
  --paper-2: #24262d;
  --paper-3: #2e3038;
  --surface: #17181d;
  --ink: #f4f4f6;
  --text-2: #c6c7cf;
  --text-3: #9c9da8;
  --line: rgba(255, 255, 255, .09);
  --line-hi: rgba(255, 255, 255, .2);
  --line-btn: rgba(255, 255, 255, .3);
  --night: #2f323b;
  --on-night: #f4f4f6;
  --hover: #1d1f25;
  --mute: #5e606b;
  --bar: #121318;
  --seg-on: #3d404a;
  --switch-off: #3d404a;
  --grab: #4c4f5a;
  --scrim: rgba(0, 0, 0, .62);
  --map-bg: #1b1d22;

  --ok: #4cc38a;
  --warn: #e5ad48;
  --bad: #f57f6b;
  --violet: #a594ff;
  --ok-soft: #153223;
  --warn-soft: #3a2d12;
  --warn-ink: #f2c675;
  --bad-soft: #43201a;
  --violet-soft: #2b2654;
  --violet-ink: #bdb0ff;
  --ok-fill: #1f8a4c;
  --warn-fill: #b7791f;
  --bad-fill: #c5402b;
  --violet-fill: #6b4cf0;
  --ink-fill: #ececf0;
  --on-ink: #111114;

  --brand: color-mix(in oklab, var(--brand-base) 86%, white);
  --brand-fg: color-mix(in oklab, var(--brand-base) 46%, white);
  --brand-soft: color-mix(in oklab, var(--brand-fg) 16%, var(--surface));
  --brand-deep: var(--brand-fg);
  --brand-tint: color-mix(in oklab, var(--brand-fg) 24%, var(--surface));
  --brand-muted: color-mix(in oklab, var(--brand) 50%, var(--surface));

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --lift: 0 0 0 1px rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .6);
  --float: 0 0 0 1px rgba(255, 255, 255, .09), 0 2px 6px rgba(0, 0, 0, .45), 0 24px 60px -20px rgba(0, 0, 0, .85);
}
/* Where the browser can read a colour's lightness: every client's colour lands in the same band, whatever it
   started as (a deep red is lifted, a bright orange is held), instead of one fixed share of white for all. */
@supports (color: oklch(from red clamp(.5, l, .6) c h)) {
  :root[data-theme="dark"] {
    --brand: oklch(from var(--brand-base) clamp(.5, l, .6) c h);
    --brand-fg: oklch(from var(--brand-base) clamp(.78, l, .86) min(c, .13) h);
  }
}
/* The map: the same street tiles, turned dark. Pins keep their white edge, so they still stand off the map. */
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.5); }
:root[data-theme="dark"] .leaflet-container { background: var(--map-bg); }
:root[data-theme="dark"] .leaflet-bar { border-color: var(--line-hi); }
:root[data-theme="dark"] .leaflet-bar a, :root[data-theme="dark"] .leaflet-bar a:hover { background: var(--surface); color: var(--ink); border-bottom-color: var(--line); }
:root[data-theme="dark"] .leaflet-bar a.leaflet-disabled { background: var(--paper-2); color: var(--mute); }
:root[data-theme="dark"] .leaflet-container .leaflet-control-attribution { background: rgba(13, 14, 18, .72); color: var(--text-3); }
:root[data-theme="dark"] .leaflet-container .leaflet-control-attribution a { color: var(--text-2); }
/* The count beside a picked segment sits on a lighter chip here, so it takes the stronger grey. */
:root[data-theme="dark"] .seg a.on b { color: var(--text-2); }
/* Changing the look by hand: nothing slides, the whole page changes at once. */
:root.theme-snap *, :root.theme-snap *::before, :root.theme-snap *::after { transition: none !important; }

/* ---------- A truck's day in the owner's own order (js/reorder.js, day.js) ---------- */
/* The handle on a stop: six dots at its right edge. touch-action none, so a finger on it drags the stop and does
   not scroll the page. */
.has-grip { position: relative; }
.stop-grip { position: absolute; top: 0; right: 0; width: 44px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0 20px 20px 0; background: none; color: var(--text-3); cursor: grab; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.stop-grip .i { width: 22px; height: 22px; stroke-width: 2.8; pointer-events: none; }
.stop-grip:active, .stop-grip:focus-visible { color: var(--ink); }
@media (hover: hover) { .stop-grip:hover { color: var(--ink); } }
.stop-grip:focus-visible { outline: 2px solid var(--brand-fg); outline-offset: -4px; }
.wstop.has-grip > .wstop-head.acc-head { padding-right: 46px; }
.wstop.has-grip.open > .stop-grip { height: 84px; }
.stops > li.has-grip > .stop { padding-right: 50px; }
.stops > li.has-grip.has-truck > .stop-grip { height: 86px; }
/* While one is lifted: the copy under the finger, and the gap it will land in. */
.sort-ghost { list-style: none; }
.sort-ghost > li { border-radius: 20px; box-shadow: 0 16px 36px rgba(17, 17, 20, .3), 0 0 0 2px var(--brand-fg) !important; background: var(--surface); }
.sort-ghost .stop-grip { color: var(--ink); }
.sort-gap { background: none !important; box-shadow: none !important; outline: 2px dashed var(--line); outline-offset: -2px; border-radius: 20px; }
.sort-gap > * { visibility: hidden; }
html.sorting, html.sorting * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
html.sorting .wstop-head:hover, html.sorting .wstop-head:active { background: none; }
/* Under the stops: what order they are in. */
.order-note { align-items: center; flex-wrap: wrap; column-gap: 8px; row-gap: 0; margin: -4px 4px 0; }
/* a truck's next day with stops, under its stops on Today: one tap to that route */
.truck-next { min-height: 44px; margin: 2px 4px 0; padding: 0 2px; font-size: 14px; }
.order-note .i, .order-hint .i { stroke-width: 2.8; }
.order-note .link-btn { min-height: 44px; margin-left: auto; padding: 0 2px; font-size: 14px; }
.wcols + .order-note { margin-top: -8px; }

/* ---------- Settings > Driving: the usual order of a truck's day (setup.js dayOrderCard) ---------- */
.kind-order { list-style: none; margin: 0; padding: 4px 12px 12px; display: grid; gap: 8px; }
.kind-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 52px 8px 12px; border-radius: 16px; background: var(--paper-2); }
.kind-row .stop-n { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; background: var(--ink-fill); color: var(--on-ink); }
.kind-name { font-size: 16px; font-weight: 600; }
.kind-row .stop-grip { border-radius: 0 16px 16px 0; }
.sort-ghost.kind-order { padding: 0; }
.sort-ghost > li.kind-row { border-radius: 16px; background: var(--paper-2); }
.kind-row.sort-gap { border-radius: 16px; }
/* The Payment sheet: what the price comes to, under the box. */
.pay-note { margin: -4px 0 14px; font-size: 14px; line-height: 1.4; }
/* Job photos (photos.js): the ask after a drop-off or pickup, a booking's Photos row, More > Job photos. */
.ph-i { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -12px -6px -12px -4px; vertical-align: middle; border: 0; border-radius: 50%; background: none; color: var(--brand-fg); cursor: pointer; }
.ph-i .i { width: 22px; height: 22px; }
.ph-i[aria-expanded="true"] { background: var(--brand-soft); }
.ph-lede { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.ph-tag { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); font-weight: 600; }
.ph-tag .i { width: 18px; height: 18px; color: var(--text-3); }
.ph-count { color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.ph-why { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); font-size: 15px; line-height: 1.45; }
.ph-why ul { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 18px; }
.ph-why .ph-demo { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.ph-lib { position: relative; overflow: hidden; margin: -6px 0 2px; }
.ph-lib input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.ph-prev-tag { margin: 10px 0 12px; }
.ph-hint { margin: -6px 0 6px; }
.ph-what { margin: 10px 2px 0; font-weight: 600; }
.ph-full { display: block; width: 100%; max-height: 56vh; object-fit: contain; border-radius: 14px; background: var(--paper-2); }
.ph-meta { margin: 10px 2px 4px; }
.ph-tile { display: block; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ph-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.ph-cap { display: block; padding: 6px 2px 0; }
.ph-cap b, .ph-cap small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-cap b { font-size: 14px; font-weight: 600; }
.ph-cap small { color: var(--text-3); font-size: 13px; }
.ph-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 14px 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; margin-bottom: 14px; }
@media (min-width: 900px) { .ph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ph-big { margin: 4px 0 12px; font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ph-big span { color: var(--text-3); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.ph-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 420px; margin-bottom: 12px; }
.ph-slot { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border: 1.5px dashed var(--line-hi); border-radius: 12px; color: var(--text-3); }
.ph-slot.on { border: 0; }
.ph-slot img { width: 100%; height: 100%; object-fit: cover; }
/* The weight after a pickup (booking.js weightSheet): the button under a done stop, on a to-bill card, the hint in the Picked up sheet. */
.wstop.wdone { flex-wrap: wrap; }
.wdone-weigh { flex: 1 1 100%; display: flex; gap: 8px; margin: 0 0 4px; }
.wdone-weigh .btn { flex: 3 1 0; min-width: 0; min-height: 44px; padding: 0 8px; white-space: nowrap; }
.wdone-weigh .wdone-within { flex: 2 1 0; }
.action-bar.weigh-bar { grid-template-columns: 3fr 2fr; }
.action-bar.weigh-bar .btn { padding: 0 8px; white-space: nowrap; }
.ph-remove { display: flex; min-height: 44px; margin: 2px 0 0 -2px; color: var(--bad); font-size: 15px; }
.need-alt { justify-content: center; width: 100%; min-height: 44px; margin-top: 2px; font-size: 14px; }
.fs-later { margin: -6px 0 12px; font-size: 14px; line-height: 1.4; }
.wdone-tons { flex: 1 1 100%; margin: -8px 0 4px 40px; color: var(--text-3); font-size: 14px; }
.fs-link { display: inline-block; padding: 6px 0; color: var(--brand-fg); font-weight: 600; text-decoration: underline; }
.bk-weigh { margin: 8px 0 4px; min-height: 48px; }
