/* Mooremiles Driver: Mooremiles Couriers brand (racing green, signal yellow, cream, ink; Zilla Slab and Source Sans 3).
   Screen versions of green and yellow, as on the website. Layout, sizes and radii follow the design handoff. */

@font-face {
  font-family: "Zilla Slab";
  src: url("fonts/zilla-slab-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --green: #1E3B2C;          /* racing green (screen version): headers, backgrounds */
  --green-2: #2E5240;        /* a step lighter, for pills and buttons on green */
  --on-green-muted: #CDD8CE; /* secondary text on green */
  --ink: #1B1A17;            /* text on light backgrounds */
  --bg: #F7F3EB;             /* cream */
  --surface: #FFFFFF;
  --text-2: #3E3B34;
  --muted: #4D4A43;
  --border: #C9BFA6;
  --input-border: #8C8573;
  --divider: #E6DFCD;
  --chip: #EFE9DA;
  --track: #E1DAC8;
  --accent: #F0B323;         /* signal yellow (screen version): buttons, highlights */
  --info: #1E3B2C;
  --info-bg: #E4EDE6;
  --success: #1E3B2C;
  --success-bg: #E3EDE5;
  --success-text: #1E3B2C;
  --online: #5FD38D;
  --danger: #B42318;
  --danger-bg: #FBE9E6;
  --danger-text: #8A1F15;
  --danger-border: #E3A39B;
  --note-bg: #FFF3CF;
  --note-title: #6B4A00;
  --note-text: #3A2A00;
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.1);
  --font-head: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; overflow: hidden; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
  /* Top half matches the header, bottom half the tab bar / footer, so nothing odd shows if the browser leaves a gap */
  background: linear-gradient(var(--green) 50%, var(--surface) 50%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.35;
  overscroll-behavior: none;
}
button, input { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--info); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex-shrink: 0; }

#app {
  /* Pinned to all four edges of the screen, so it reaches under the home indicator on iPhone */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;      /* the real, visible page area: iPhone clips anything drawn past it */
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.screen { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.hdr, .tabs, .foot, .status-strip { flex-shrink: 0; }

/* ---------- Header ---------- */
.hdr {
  background: var(--green);
  color: #fff;
  padding: calc(var(--safe-top) + 22px) 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hdr--detail { padding: calc(var(--safe-top) + 16px) 16px 20px; }
.hdr__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hdr__date { font-size: 13px; color: var(--on-green-muted); letter-spacing: 0.02em; }
.hdr h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.hdr--detail h1 { font-size: 26px; }
.hdr__sub { font-size: 14px; color: var(--on-green-muted); }
.hdr__titles { display: flex; flex-direction: column; gap: 4px; }

.shift {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; margin: -6px -6px -6px 0; padding: 0 14px;
  background: var(--green-2); color: #fff; border: none; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.shift__dot { width: 8px; height: 8px; border-radius: 4px; background: var(--online); }
.shift--off .shift__dot { background: #8C8573; }

.round-btn {
  width: 44px; height: 44px; border-radius: 22px; border: none;
  background: var(--green-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

.status-strip {
  background: var(--note-bg); color: var(--note-text);
  font-size: 13px; font-weight: 600; padding: 8px 16px; text-align: center;
}
.status-strip--live { background: var(--success-bg); color: var(--success-text); }
.status-strip--busy { background: var(--info-bg); color: var(--info); }

/* ---------- Main ---------- */
.main {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  overscroll-behavior: contain;
}
.main > * { flex-shrink: 0; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat {
  background: var(--surface); border-radius: 14px; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.stat b { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 600; color: var(--muted); }

.section { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.section__title { font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }

.card {
  background: var(--surface); border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow);
}
.card-btn { text-align: left; border: none; width: 100%; color: var(--ink); }

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.card__route { display: flex; align-items: center; gap: 10px; width: 100%; }
.card__route > span:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.route-title { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.meta { font-size: 13px; color: var(--muted); }
.next { font-size: 13px; color: var(--text-2); }

.chip { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: var(--chip); color: var(--text-2); white-space: nowrap; }
.chip--info { background: var(--info-bg); color: var(--info); }
.chip--new { background: var(--accent); color: var(--ink); }
.chip--done { display: inline-flex; align-items: center; gap: 5px; background: var(--success-bg); color: var(--success-text); }
.chip--sync { background: var(--note-bg); color: var(--note-title); }
.tag { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--chip); color: var(--text-2); }
.tag--required { background: var(--danger-bg); color: var(--danger-text); }

.progress { display: flex; gap: 4px; width: 100%; }
.progress i { flex: 1; height: 6px; border-radius: 3px; background: var(--track); }
.progress i.is-done { background: var(--success); }
.progress i.is-current { background: var(--accent); }

.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); }
.empty b { font-size: 17px; font-weight: 700; color: var(--ink); }
.empty--card { background: var(--surface); border-radius: 16px; padding: 24px 16px; font-size: 14px; }

.hist__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hist__row b { font-size: 18px; font-weight: 700; }
.hist__row b:last-child { font-weight: 800; }
.hist__proof { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--text-2); }
.hist__proof .meta { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  min-height: 48px; border-radius: 12px; border: 2px solid var(--border);
  background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; padding: 0 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
}
.btn--primary { background: var(--accent); border-color: var(--accent); font-weight: 800; }
.btn--big { min-height: 58px; border-radius: 14px; font-size: 18px; }
.btn--sheet { min-height: 56px; border-radius: 14px; font-size: 17px; }
.btn:disabled { background: var(--divider); border-color: var(--divider); color: var(--muted); font-weight: 700; }
.btn--danger { color: var(--danger-text); border-color: var(--danger-border); }

/* ---------- Tab bar ---------- */
.tabs {
  background: var(--surface); border-top: 1px solid var(--divider);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: max(6px, var(--safe-bottom));
}
.tab {
  background: none; border: none; border-top: 3px solid transparent;
  min-height: 56px; padding: 10px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 12px; font-weight: 500; position: relative;
}
.tab[aria-current="page"] { color: var(--ink); font-weight: 800; border-top-color: var(--accent); }
.tab__label { display: block; line-height: 1.2; }
.tab__badge {
  position: absolute; top: 6px; left: 58%; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Job detail ---------- */
.panel { background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.panel--progress { padding-bottom: 6px; gap: 0; }
.panel h2 { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }
.panel--progress h2 { margin-bottom: 14px; }
.step { display: flex; gap: 12px; }
.step__rail { display: flex; flex-direction: column; align-items: center; width: 28px; }
.step__dot {
  width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--border); background: #fff; color: var(--muted);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step--done .step__dot { background: var(--success); border-color: var(--success); color: #fff; }
.step--current .step__dot { border-color: var(--info); background: var(--info-bg); color: var(--info); font-weight: 800; }
.step__line { width: 2px; flex: 1; min-height: 14px; background: var(--track); }
.step--done .step__line { background: var(--success); }
.step__body { flex: 1; display: flex; justify-content: space-between; gap: 8px; padding: 4px 0 16px; }
.step__label { font-size: 15px; font-weight: 500; color: var(--muted); display: block; }
.step--done .step__label { color: var(--ink); }
.step--current .step__label { color: var(--ink); font-weight: 800; }
.step__sub { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.step__time { font-size: 13px; font-weight: 600; color: var(--text-2); }

.stop { display: flex; align-items: center; gap: 12px; }
.stop__text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stop__addr { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.stop__actions { display: flex; gap: 8px; flex-shrink: 0; }
.circle-btn {
  width: 48px; height: 48px; border-radius: 24px; border: 2px solid var(--border); background: #fff; color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.panel--note { background: var(--note-bg); gap: 4px; box-shadow: none; }
.panel--note h2 { color: var(--note-title); }
.panel--note p { font-size: 14px; color: var(--note-text); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }

.foot {
  background: var(--surface); border-top: 1px solid var(--divider);
  padding: 12px 16px max(14px, var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px;
}
.foot__hint { text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Sheets ---------- */
.scrim {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(20, 40, 29, 0.6);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.sheet {
  width: 100%; max-width: 560px; max-height: calc(100% - var(--safe-top) - 12px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 20px 0; display: flex; flex-direction: column; gap: 16px;
  animation: sheet-up 0.22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet__grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--border); flex-shrink: 0; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet__head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sheet h2 { font-size: 22px; font-weight: 800; }
.sheet__lead { font-size: 14px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.close-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 22px; border: none; background: var(--chip); display: flex; align-items: center; justify-content: center; }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photos--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo {
  position: relative; aspect-ratio: 1; border-radius: 12px; background: #E1DAC8 center / cover no-repeat;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.photos--4 .photo { border-radius: 10px; }
.photo__label {
  margin: 0 0 4px 4px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(20, 40, 29, 0.7);
  padding: 2px 6px; border-radius: 6px;
}
.photo__remove {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 16px; border: none;
  background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center;
}
.photo--doc { background-color: #E8E2D2; }
.add-photo {
  aspect-ratio: 1; border-radius: 12px; border: 2px dashed #8C8573; background: #FBF8F1; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700;
}
.photos--4 .add-photo { border-radius: 10px; }

.group { display: flex; flex-direction: column; gap: 10px; }
.group__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group__head h3, .group__head label { font-size: 15px; font-weight: 700; }
.group__hint { font-size: 13px; color: var(--muted); margin-top: -4px; }

.input {
  height: 52px; border-radius: 12px; border: 2px solid var(--input-border); padding: 0 14px; font-size: 16px;
  color: var(--ink); background: #fff; width: 100%;
}
.input:focus { outline: none; border-color: var(--info); }

.sig-open {
  height: 130px; border-radius: 12px; border: 2px dashed #8C8573; background: #FBF8F1; color: var(--text-2);
  font-size: 15px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; text-align: center;
}
.sig-done {
  position: relative; height: 130px; border-radius: 12px; border: 2px solid var(--border); background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.sig-done img { max-width: 80%; max-height: 80%; }
.sig-done small { position: absolute; left: 12px; bottom: 8px; font-size: 11px; color: var(--muted); }
.sig-done button {
  position: absolute; top: 6px; right: 6px; min-height: 44px; padding: 0 14px; border-radius: 8px; border: none;
  background: var(--chip); font-size: 13px; font-weight: 700;
}
.missing { text-align: center; font-size: 13px; color: var(--danger-text); }

/* ---------- Signature overlay ---------- */
.sig {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--green); overflow: hidden;
}
.sig__page {
  position: absolute; background: #fff; color: var(--ink);
  padding: 14px max(24px, env(safe-area-inset-right)) 16px max(24px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 12px;
  left: 0; top: 0; width: 100%; height: 100%;
}
/* Portrait phone that couldn't be locked to landscape (iPhone): turn the page a quarter turn */
.sig--rotated .sig__page {
  left: 100vw; top: 0; width: 100vh; height: 100vw; width: 100dvh; height: 100dvw;
  transform-origin: 0 0; transform: rotate(90deg);
  padding: 14px 24px max(16px, var(--safe-bottom)) 24px;
}
.sig__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sig__head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sig__head b { font-size: 22px; font-weight: 800; }
.sig__head span { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.sig__pad { flex: 1; min-height: 0; position: relative; border: 2px solid var(--border); border-radius: 14px; background: #FBF8F1; overflow: hidden; touch-action: none; }
.sig__pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sig__line { position: absolute; left: 40px; right: 40px; bottom: 48px; height: 2px; background: #8C8573; pointer-events: none; }
.sig__x { position: absolute; left: 40px; bottom: 54px; font-size: 22px; font-weight: 700; color: var(--muted); pointer-events: none; }
.sig__name { position: absolute; left: 40px; bottom: 20px; font-size: 13px; font-weight: 600; color: var(--muted); pointer-events: none; }
.sig__hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8C8573; font-size: 18px; font-weight: 600; pointer-events: none; }
.sig__actions { display: flex; justify-content: flex-end; gap: 12px; }
.sig__actions .btn { min-height: 52px; padding: 0 26px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 16px; right: 16px; bottom: calc(100px + var(--safe-bottom)); z-index: 60; pointer-events: none; display: flex; justify-content: center; }
.toast {
  max-width: 520px; width: 100%; background: var(--green); color: #fff; border-radius: 12px; padding: 14px 16px;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(20, 40, 29, 0.25); animation: toast-in 0.18s ease-out;
}
.toast svg { color: var(--online); }
.toast--warn svg { color: var(--accent); }
.add-photo:focus-within { outline: 3px solid var(--info); outline-offset: 2px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Login ---------- */
.login { height: 100%; display: flex; flex-direction: column; background: var(--green); color: #fff; overflow-y: auto; }
.login__head { padding: calc(var(--safe-top) + 56px) 28px 36px; display: flex; flex-direction: column; gap: 22px; }
.login__logo { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.login__head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; }
.login__head p { font-size: 16px; color: var(--on-green-muted); line-height: 1.4; margin-top: 8px; }
.login__body {
  flex: 1; background: #fff; color: var(--ink); border-radius: 28px 28px 0 0;
  padding: 32px 24px max(28px, var(--safe-bottom)); display: flex; flex-direction: column; gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__row { display: flex; align-items: center; justify-content: space-between; }
.field label { font-size: 15px; font-weight: 700; }
.field .link { font-size: 14px; font-weight: 600; background: none; border: none; color: var(--info); min-height: 44px; padding: 0; text-decoration: underline; }
.input--login { height: 54px; }
.pw { position: relative; display: flex; }
.pw .input { padding-right: 64px; }
.pw button { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border-radius: 10px; border: none; background: transparent; color: var(--text-2); display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-2); min-height: 44px; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.login__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.login__foot { margin-top: auto; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.5; }
.login__foot a { font-weight: 700; }
.form-error { background: var(--danger-bg); color: var(--danger-text); border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.form-note { background: var(--note-bg); color: var(--note-text); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }

/* ---------- "You" and setup sheets ---------- */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); min-height: 64px; }
.row:first-child { border-top: none; }
.row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row__text b { font-size: 15px; font-weight: 700; }
.row__text span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; border-radius: 16px; border: none; background: var(--border); padding: 0; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.switch[aria-checked="true"] { background: var(--success); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch-wrap { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: flex-end; }
.btn--small { min-height: 44px; font-size: 14px; padding: 0 16px; }

.support { font-size: 12px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.loading { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--green); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--green-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sheet, .toast, .spinner { animation-duration: 0.01s; animation-iteration-count: 1; }
}

/* ---------- My Jobs: segments, job cards ---------- */
.hdr--jobs { padding-bottom: 0; gap: 12px; }
.segs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -20px; }
.seg {
  background: none; border: none; border-bottom: 3px solid transparent; color: var(--on-green-muted);
  min-height: 48px; padding: 8px 4px 6px; font-size: 14px; font-weight: 700;
}
.seg[aria-selected="true"] { color: #fff; border-bottom-color: var(--accent); }

.jobcard { gap: 10px; }
.jobcard__title { font-size: 19px; font-weight: 800; line-height: 1.2; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.jobcard__chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.jobcard .card__top { align-items: flex-start; }
.jobcard__link { font-size: 13px; font-weight: 600; color: var(--info); margin-top: -6px; }
.jobstrip { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: var(--chip); border-radius: 10px; padding: 10px 12px; }
.jobstrip__type { display: flex; flex-direction: column; min-width: 0; }
.jobstrip__type b { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--info); }
.jobstrip__type span { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.jobstrip__id { flex-shrink: 0; background: var(--success); color: #fff; font-size: 13px; font-weight: 800; padding: 6px 10px; border-radius: 8px; }
.jobcard__price { font-size: 20px; font-weight: 800; color: var(--success); }
.jobcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding-top: 10px; border-top: 1px solid var(--divider); font-size: 14px; font-weight: 700; }
.jobcard__meta span { display: inline-flex; align-items: center; gap: 8px; }
.jobcard__meta span:last-child { color: var(--text-2); }
.route { display: flex; gap: 12px; width: 100%; }
.route__rail { display: flex; flex-direction: column; align-items: center; padding-top: 5px; width: 12px; }
.route__a { width: 8px; height: 8px; border-radius: 5px; border: 2px solid var(--ink); }
.route__rail b { width: 2px; flex: 1; background: var(--border); margin: 3px 0; }
.route__b { width: 10px; height: 10px; background: var(--green); border-radius: 2px; }
.route__stops { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.route__stop { display: flex; flex-direction: column; gap: 1px; }
.route__lbl { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.route__addr { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.jobcard .hist__proof { width: 100%; }
.jobcard__details { display: flex; align-items: center; gap: 10px; width: 100%; padding-top: 10px; border-top: 1px solid var(--divider); color: var(--info); font-weight: 700; }
.jobcard__details span { flex: 1; }
.jobcard__details svg:first-child { color: var(--info); }

.facts { margin: 0; display: flex; flex-direction: column; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--divider); }
.facts div:first-child { border-top: none; padding-top: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.sig__consent { margin: 0; font-size: 14px; font-weight: 600; color: var(--danger-text); line-height: 1.35; }

/* Swipe between My Jobs segments */
.main { touch-action: pan-y; }
.main.slide-left { animation: slide-in-left 0.22s ease-out; }
.main.slide-right { animation: slide-in-right 0.22s ease-out; }
@keyframes slide-in-left { from { transform: translateX(36px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes slide-in-right { from { transform: translateX(-36px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .main.slide-left, .main.slide-right { animation: none; } }

/* ---------- Brand: headings in Zilla Slab, current step in yellow, logo ---------- */
.hdr h1, .sheet h2, .login__head h1, .stat b, .jobcard__title, .jobcard__price, .hist__row b, .empty b, .route-title { font-family: var(--font-head); font-weight: 700; }
.hdr h1, .login__head h1 { letter-spacing: 0; }
.step--current .step__dot { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.progress i.is-current { background: var(--accent); }
.login__logo-img { display: block; width: 210px; height: auto; margin: 0 0 4px -6px; }
.btn--primary, .tab[aria-current="page"] { color: var(--ink); }
a { color: var(--green); }
.hdr :focus-visible, .login :focus-visible, .seg:focus-visible { outline-color: var(--accent); }

/* Safari drops the bottom padding of a scrolling flex column, which cut off the last row of a sheet:
   a spacer item at the end keeps the room under the content. */
.sheet::after { content: ""; flex: 0 0 max(28px, var(--safe-bottom)); }

/* ---------- Holding page for anything that isn't a phone or tablet ---------- */
.holding { position: fixed; inset: 0; background: var(--green); color: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; overflow-y: auto; z-index: 100; }
.holding[hidden] { display: none; }
.holding__box { max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.holding__box img { width: 220px; height: auto; }
.holding h1 { font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1.15; }
.holding p { font-size: 18px; line-height: 1.5; color: var(--on-green-muted); }
.holding strong { color: var(--bg); }
