:root{
  --ink:#0B0B0C; --paper:#FFFFFF; --muted:#6B6E73; --line:#E4E5E7; --soft:#F4F4F5;
  --ok:#1F7A45; --warn:#A15C00; --bad:#B42318; --radius:12px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;width:100%;max-width:100%}
body{font-family:var(--font);color:var(--ink);background:var(--soft);-webkit-font-smoothing:antialiased;font-size:15px;line-height:1.45}
a{color:inherit}
.hidden{display:none!important}
/* a class that sets display would otherwise beat the UA [hidden] rule */
[hidden]{display:none!important}

/* header */
.topbar{position:sticky;top:0;z-index:1000;background:var(--ink);color:var(--paper);display:flex;align-items:center;gap:12px;padding:10px 16px;min-height:56px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--paper);min-width:0}
.brand svg{height:30px;width:auto;color:var(--paper)}
/* The monogram leads the header. Set a touch shorter than the wordmark beside it: the
   diamond is taller than it is wide and matching their heights makes it loom, which is
   the one way a mark this simple can look wrong. */
.brandmark{display:flex;align-items:center;flex:none}
.brandmark svg{height:26px}
.brand .name{font-size:11px;letter-spacing:.28em;font-weight:600;line-height:1.2;min-width:0;overflow:hidden}
.brand .name small{display:block;font-size:8.5px;letter-spacing:.35em;font-weight:500;opacity:.75}
/* Temporary text wordmark, until there is a licensed Berline DC logo. */
.brand.wordmark{gap:8px;align-items:baseline}
.brand.wordmark b{font-size:14px;font-weight:700;letter-spacing:.14em}
.brand.wordmark span{font-size:14px;font-weight:400;letter-spacing:.30em}
.topbar .spacer{flex:1}
.topbar .who{font-size:13px;opacity:.85;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.linkbtn{background:none;border:1px solid rgba(255,255,255,.35);color:var(--paper);border-radius:999px;padding:6px 12px;font:inherit;font-size:12px;cursor:pointer}

/* layout */
.wrap,main#app{display:block;width:100%;max-width:1100px;margin-inline:auto;padding:16px}
main#app>*{min-width:0}
.grid{display:grid;gap:16px}
@media(min-width:900px){.grid.two{grid-template-columns:420px 1fr}}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.card h2{margin:0 0 12px;font-size:16px;letter-spacing:.04em}
.card h3{margin:0 0 8px;font-size:14px}
.muted{color:var(--muted)}
.small{font-size:12.5px}
.row{display:flex;gap:10px;align-items:center}
.row.wrap{flex-wrap:wrap}
.between{justify-content:space-between}

/* forms */
label{display:block;font-size:12px;font-weight:600;letter-spacing:.04em;margin:12px 0 5px;text-transform:uppercase;color:#333}
input,select,textarea{width:100%;min-width:0;padding:11px 12px;border:1px solid #CFD1D4;border-radius:10px;font:inherit;font-size:16px;background:var(--paper);color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--ink);outline-offset:-1px;border-color:var(--ink)}
textarea{min-height:70px;resize:vertical}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.seg{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--ink);border-radius:10px;overflow:hidden}
.seg button{border:0;background:var(--paper);padding:10px;font:inherit;font-weight:600;cursor:pointer;min-width:0}
.seg button.on{background:var(--ink);color:var(--paper)}
/* The Sign in / Create account toggle, on all three apps. 10px of padding round 15px
   type comes to 41.8px, which is under the 44px floor - measured at 390, where both
   labels fit on one line. At 320 "Create account" wraps to two lines and the button was
   tall enough by accident, which is not something to rely on.
   Scoped to .auth on purpose: .seg is also the dispatch desk's date-range control, where
   a 44px row costs a visible line of the diary. */
.auth .seg button{min-height:44px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--ink);background:var(--ink);color:var(--paper);border-radius:10px;padding:12px 16px;font:inherit;font-weight:600;cursor:pointer;text-decoration:none;letter-spacing:.02em}
.btn.block{width:100%}
.btn.ghost{background:var(--paper);color:var(--ink)}
.btn.danger{background:var(--paper);color:var(--bad);border-color:var(--bad)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.sm{padding:7px 11px;font-size:13px;border-radius:8px}
.error{color:var(--bad);font-size:13px;margin-top:8px;min-height:1em}

/* address autocomplete */
.ac{position:relative}
.ac-list{position:absolute;left:0;right:0;top:100%;z-index:2000;background:var(--paper);border:1px solid var(--line);border-radius:10px;margin-top:4px;box-shadow:0 8px 24px rgba(0,0,0,.12);max-height:260px;overflow:auto}
.ac-list div{padding:10px 12px;font-size:13px;cursor:pointer;border-bottom:1px solid var(--soft)}
.ac-list div:hover,.ac-list div.active{background:var(--soft)}

/* map */
.map{height:340px;border-radius:var(--radius);border:1px solid var(--line);overflow:hidden;background:#ddd}
.map.tall{height:calc(100vh - 140px);min-height:420px}
.car-pin{background:var(--ink);color:var(--paper);border:2px solid var(--paper);border-radius:999px;width:34px!important;height:34px!important;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.35)}
.dot-pin{border-radius:999px;border:3px solid var(--paper);box-shadow:0 1px 5px rgba(0,0,0,.4)}
/* The label on a dashed, estimated route line. Leaflet's own tooltip chrome (the white
   box and the little arrow) would read as a place marker, so it is all stripped off and
   what is left is a plain grey caption lying on the line. */
.route-est{background:var(--paper);color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 9px;font-size:11px;font-weight:600;letter-spacing:.02em;box-shadow:0 1px 4px rgba(0,0,0,.18);white-space:nowrap}
.route-est::before{display:none}


/* quote */
.quote{border:1px solid var(--ink);border-radius:10px;padding:14px;margin-top:14px}
.quote .total{font-size:28px;font-weight:700}
.quote table{width:100%;font-size:13px;border-collapse:collapse;margin-top:8px}
.quote td{padding:3px 0}.quote td:last-child{text-align:right}

/* trips */
.trip{border:1px solid var(--line);border-radius:10px;padding:12px;margin-bottom:10px;background:var(--paper);cursor:pointer}
.trip:hover{border-color:#999}
.trip.sel{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.trip .when{font-weight:700}
.addr{font-size:13px;margin:4px 0 0}
.addr b{display:inline-block;width:18px}
.badge{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:3px 8px;border-radius:999px;border:1px solid var(--ink)}
.badge.requested,.badge.pending_payment{background:var(--paper)}
.badge.assigned,.badge.en_route,.badge.arrived,.badge.on_trip{background:var(--ink);color:var(--paper)}
.badge.completed{border-color:var(--ok);color:var(--ok)}
.badge.canceled,.badge.no_show{border-color:var(--bad);color:var(--bad)}

/* steps */
.steps{display:flex;gap:4px;margin:10px 0}
.steps span{flex:1;height:4px;border-radius:4px;background:var(--line)}
.steps span.on{background:var(--ink)}

/* tables */
table.list{width:100%;border-collapse:collapse;font-size:13px}
table.list th{text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--line);padding:8px 6px}
table.list td{border-bottom:1px solid var(--soft);padding:9px 6px;vertical-align:top;overflow-wrap:anywhere}
.tabs{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}
.tabs button{border:1px solid var(--line);background:var(--paper);border-radius:999px;padding:7px 14px;font:inherit;font-size:13px;cursor:pointer}
.tabs button.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.stat{font-size:26px;font-weight:700}

/* toast */
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:var(--paper);padding:12px 18px;border-radius:10px;font-size:14px;z-index:5000;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90vw}
#toast.show{opacity:1}

/* auth */
.auth{width:100%;max-width:420px;min-width:0;margin:40px auto;box-sizing:border-box}
.auth .card{min-width:0}
.hero{background:var(--ink);color:var(--paper);padding:48px 20px;text-align:center}
.hero svg{height:90px;color:var(--paper)}
.hero h1{letter-spacing:.3em;font-weight:500;font-size:20px;margin:18px 0 4px}
.hero p{letter-spacing:.35em;font-size:11px;opacity:.75;margin:0}
.tiles{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));margin-top:20px}
.tile{text-decoration:none;display:block}
.tile .card{height:100%}
.tile .card:hover{border-color:var(--ink)}

/* driver big buttons */
.bigaction{font-size:18px;padding:18px}
.toggle{display:flex;align-items:center;gap:10px;font-weight:700}
.switch{width:56px;height:30px;border-radius:999px;background:#C9CBCE;position:relative;border:0;cursor:pointer;transition:background .2s}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:999px;background:#fff;transition:left .2s}
.switch.on{background:var(--ink)}.switch.on::after{left:29px}
.kv{display:grid;grid-template-columns:minmax(0,110px) minmax(0,1fr);gap:4px 10px;font-size:13.5px}
.kv div:nth-child(odd){color:var(--muted)}

/* narrow screens: nothing may exceed its column */
img,svg,video,canvas{max-width:100%}

/* legal footer */
.legalfoot{max-width:1100px;margin:28px auto 0;padding:14px 16px 26px;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;font-size:12.5px;color:var(--muted)}
.legalfoot a{color:var(--muted);text-decoration:underline;text-underline-offset:2px}
.legalfoot a:hover{color:var(--ink)}
.legalfoot span{margin-left:auto}

/* terms agreement */
/* Star rating. Shared: the rider rates the chauffeur and the chauffeur rates the
   rider, on two pages that do not load each other's stylesheet. */
/* align-items must not stretch: a stretched item takes its height from the row, which
   overrides the aspect ratio and collapses the button to the height of nothing. */
.stars { display: flex; gap: 6px; margin-top: 14px; align-items: flex-start; }
.stars button {
  flex: 1; max-width: 58px; aspect-ratio: 1; padding: 6px; background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; color: var(--muted);
}
.stars button.on { color: var(--ink); border-color: var(--ink); }
.stars svg { width: 100%; height: 100%; display: block; }
.agree{display:flex;gap:10px;align-items:flex-start;margin:14px 0 0;font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--ink);cursor:pointer}
.agree input{width:18px;height:18px;min-width:18px;margin:1px 0 0;flex:none;accent-color:var(--ink)}
.agree a{color:var(--ink)}

/* vehicle class substitution, dispatch only */
.subst{display:inline-block;margin-top:3px;font-size:11px;font-weight:700;letter-spacing:.03em;border:1px solid var(--warn);color:var(--warn);border-radius:999px;padding:2px 8px}

/* ---- notifications ---- */
.bellbtn {
  position: relative; background: none; border: 0; padding: 6px; cursor: pointer;
  color: inherit; line-height: 0; border-radius: 8px;
}
.bellbtn svg { width: 22px; height: 22px; display: block; }
.belldot {
  position: absolute; top: 0; right: 0; background: var(--bad); color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.5;
  padding: 0 5px; min-width: 16px; text-align: center;
}
.notelist { display: flex; flex-direction: column; }
.note {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border-bottom: 1px solid var(--soft);
}
.note.new { background: var(--soft); }
.note b { font-size: 14px; }
.note span { font-size: 13px; color: var(--muted); }
.note time { font-size: 11px; color: var(--muted); }

/* The iPhone install sheet. Shown once, after a booking, and never again once dismissed. */
.installer {
  position: fixed; inset: 0; z-index: 1000; background: rgba(11,11,12,.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.installer .ibox {
  background: var(--paper); color: var(--ink); border-radius: 16px; padding: 20px;
  width: 100%; max-width: 420px; box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.installer h2 { font-size: 18px; margin: 0 0 8px; }
.installer p { font-size: 14px; margin: 0 0 10px; }
.installer ol { margin: 0 0 12px; padding-left: 20px; font-size: 14px; }
.installer li { margin: 4px 0; }
@media (min-width: 560px) { .installer { align-items: center; } }

/* The install banner, from js/install.js. Shown after a booking or on a second visit,
   never on arrival, and never again once dismissed.
   Inset from the edges rather than stretched to them: devtools/audit.html measures a
   fixed element as part of the document width, and anything reaching past the viewport is
   reported as horizontal overflow. The 44px floor on the buttons is the same harness's
   tap-target rule. */
.installbar {
  position: fixed; left: 12px; right: 12px; z-index: 900;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 460px; margin-inline: auto; box-sizing: border-box;
  background: var(--ink); color: var(--paper); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 10px 34px rgba(0,0,0,.35);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
}
.installbar-text { flex: 1 1 180px; min-width: 0; margin: 0; font-size: 13.5px; }
.installbar-actions { display: flex; gap: 8px; margin-left: auto; }
.installbar .btn { min-height: 44px; padding: 10px 14px; font-size: 13px; }
/* Reversed out of the dark bar: the page's .btn is ink on paper, which would disappear. */
.installbar .installbar-go { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.installbar .installbar-no { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.4); }

/* ---- loading skeletons ----
   A grey block that is obviously a placeholder, rather than a spinner that says nothing
   about what is coming. Motion is dropped for anyone who asked for less of it. */
.skel { background: var(--soft); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: skelsweep 1.3s infinite;
}
.skel.line { height: 13px; margin: 8px 0; }
.skel.line.w60 { width: 60%; }
.skel.line.w40 { width: 40%; }
.skel.block { height: 72px; margin: 10px 0; }
@keyframes skelsweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .skel::after { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* A visible focus ring everywhere, which several of the custom controls were missing. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.dshell :focus-visible { outline-color: #F4F4F5; }

/* For screen readers only: labels that the layout says with position instead of words. */
.sronly {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The Stripe Payment Element sits in here. The element itself is themed from JS (see
   PAY_APPEARANCE in rider/index.js) because it renders inside a cross-origin iframe and
   cannot read this stylesheet; these rules are only the frame around it. */
.payel{margin-top:16px;min-height:44px}
.payel.loading{opacity:.5}

/* The chauffeur's location note.
 *
 * Location stops when the screen locks on iOS and nothing can change that from a web
 * page, so the chauffeur is told. Styled as information rather than an error, because it
 * is the normal state of affairs and an alarm that is always on is not read.
 * See docs/IPHONE-GPS.md. */
.gpsnote{
  margin:0;
  padding:10px 16px;
  background:#f4f4f5;
  border-bottom:1px solid #dcdcde;
  color:#303034;
  font-size:13px;
  line-height:1.45;
}
.gpsnote.warn{
  background:#0b0b0c;
  color:#fff;
  border-bottom-color:#0b0b0c;
}

/* ---------------------------------------------------------------- the sign-in card
 *
 * Added 13 November 2026 for the audit items a tester raised: a logo that was not there
 * (M5), labels that named no field (M6), a password nobody could see while typing it
 * (M9), the eight-character rule shown only after it had been broken (M10), and the
 * consent a person has to be able to read before agreeing to it (H9, H11).
 *
 * The brand sits above the heading at a fixed height. `currentColor` keeps it in the
 * card's ink rather than importing a second black. */
.authbrand{display:block;width:132px;margin:0 0 14px;color:var(--ink)}
.authbrand svg{display:block;width:100%;height:auto}

/* The hint under a field. Not `.small .muted` alone, because the margin matters: it has
 * to read as belonging to the input above it rather than to the label below. */
.hint{margin:6px 0 0;line-height:1.45}

/* Show/hide. The button sits inside the field's border so it cannot be mistaken for the
 * submit, and 44px keeps it a tap target on a telephone. */
.pwrow{display:flex;align-items:stretch;gap:8px}
.pwrow input{flex:1}
.pwtoggle{flex:0 0 auto;min-width:64px;min-height:44px;padding:0 12px;border:1px solid #CFD1D4;
  border-radius:10px;background:var(--paper);color:var(--ink);font:inherit;font-size:13px;
  font-weight:600;cursor:pointer}
.pwtoggle:hover{border-color:var(--ink)}
.pwtoggle[aria-pressed="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}

/* A checkbox and its sentence. The bare `label` rule above is uppercase, bold and
 * letter-spaced - right for a field name, unreadable for three lines of consent - so this
 * modifier puts it back to prose. The checkbox gets its own 20px because the default is
 * 13px, which is below any reasonable tap target. */
.check{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;font-size:13px;
  font-weight:400;letter-spacing:0;text-transform:none;color:var(--ink);line-height:1.5}
.check input[type=checkbox]{width:20px;height:20px;min-width:20px;margin:1px 0 0;flex:0 0 auto;
  accent-color:var(--ink)}
.check a{color:var(--ink)}

/* A button that has to read as a link, inside a white card. `.linkbtn` is the topbar's,
 * and the topbar is black. */
.textlink{background:none;border:0;padding:0;font:inherit;font-size:12.5px;color:var(--ink);
  text-decoration:underline;cursor:pointer}

/* The one green sentence in the app: "the link is on its way". NOT called `.ok` -
 * that name is already a modifier on .obtag in admin and .dnote in drive, where the
 * colour comes from the base class at the same specificity, so which rule won would
 * depend on the order of two <link> tags. */
.okmsg{color:#1B7F3B}
