/* Yarder office, November 2026 layout (the approved boards in the design canvas "Yarder: the office, made calm").
   On top of app.css, for the office only (the drivers' app, the console and the trade portal keep app.css alone).
   The rules of colour:
   - yellow is the one main action on a screen (and the lorry plates); nothing else is yellow;
   - red is something going wrong (a job not done, a permit missing, a skip over hire); it is never decoration;
   - amber is a date coming up (an inspection, a licence check);
   - grey is the office's ordinary work (bookings to confirm, messages, charges to review);
   - green is done.
   Cards are white on a warm light grey, with a hairline border and no shadow. */
:root {
  --y-bg: #f4f4f1;
  --y-card: #ffffff;
  --y-sunk: #f7f7f4;
  --y-line: #e7e7e3;
  --y-line-soft: #efefec;
  --y-control: #d9d9d4;
  --y-text: #1c1d1f;
  --y-text-2: #44474c;
  --y-muted: #5f6368;
  --y-faint: #6b6f75;
  --y-yellow: #f5c400;
  --y-yellow-hover: #ffd21a;
  --y-bad: #b42318;
  --y-bad-bg: #fdecec;
  --y-soon: #8a5a00;
  --y-soon-bg: #fff4db;
  --y-todo: #44474c;
  --y-todo-bg: #f1f1ee;
  --y-ok: #1e7a3e;
  --y-ok-bg: #e6f4ea;
  --y-side: #232426;
  --y-side-active: #3a3b3e;
  --y-side-text: #e4e5e7;
  --y-side-muted: #b8babd;
  --y-side-count: #4a4b4f;
  /* app.css's names, so every screen takes the same look */
  --bg: var(--y-bg);
  --panel: var(--y-card);
  --panel-2: var(--y-sunk);
  --line: var(--y-line);
  --line-2: var(--y-control);
  --text: var(--y-text);
  --ink: var(--y-text);
  --muted: var(--y-muted);
  --red: var(--y-bad);
  --red-bg: var(--y-bad-bg);
  --amber: var(--y-soon);
  --amber-bg: var(--y-soon-bg);
  --green: var(--y-ok);
  --green-bg: var(--y-ok-bg);
  --side-bg: var(--y-side);
  --side-bg-2: #2d2e31;
  --side-text: var(--y-side-muted);
  --shadow: none;
  --radius: 16px;
  --radius-sm: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --y-bg: #141516;
    --y-card: #1d1f21;
    --y-sunk: #232528;
    --y-line: #2c2f33;
    --y-line-soft: #26292c;
    --y-control: #3a3d42;
    --y-text: #eceef0;
    --y-text-2: #c4c7cc;
    --y-muted: #9aa0a6;
    --y-faint: #8d9399;
    --y-bad: #f87171;
    --y-bad-bg: #3a1717;
    --y-soon: #fbbf24;
    --y-soon-bg: #3a2e10;
    --y-todo: #c4c7cc;
    --y-todo-bg: #2a2c2f;
    --y-ok: #4ade80;
    --y-ok-bg: #12301f;
    --y-side: #111213;
    --y-side-active: #2a2b2e;
    --y-side-count: #3a3b3e;
  }
}
body { background: var(--y-bg); color: var(--y-text); }

/* ---- buttons: one look everywhere ---- */
.btn { border-radius: 10px; border-color: var(--y-control); background: var(--y-card); color: var(--y-text); font-weight: 600; padding: 9px 16px; box-shadow: none; }
.btn:hover:not(:disabled) { border-color: var(--y-text); color: var(--y-text); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.primary, .btn.primary:hover:not(:disabled) { background: var(--y-yellow); border-color: var(--y-yellow); color: #1c1d1f; box-shadow: none; }
.btn.primary:hover:not(:disabled) { background: var(--y-yellow-hover); border-color: var(--y-yellow-hover); }
.btn.ghost { color: var(--y-text); }
.btn.ghost:hover:not(:disabled) { background: var(--y-todo-bg); border-color: transparent; }
button.link, a.link { color: var(--y-text); text-decoration: underline; text-decoration-color: var(--y-control); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--y-text); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--y-text); box-shadow: 0 0 0 3px rgba(28, 29, 31, 0.08); }

/* ---- the shell ---- */
.app { grid-template-columns: 248px minmax(0, 1fr); }
.app-icon { display: block; flex: none; border-radius: 8px; }
.sidebar { background: var(--y-side); color: var(--y-side-text); padding: 20px 12px 14px; gap: 2px; overflow-y: auto; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; min-width: 0; }
.sb-brand-text { display: grid; gap: 6px; line-height: 1.25; min-width: 0; }
/* The full logo in the menu; folded to its icons (below), the menu shows the app's icon instead. */
.sb-brand-icon { display: none; }
.sb-brand-text strong { color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.sb-brand-text span { color: var(--y-side-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav { display: grid; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--y-side-text); font-size: 15px; font-weight: 500; text-decoration: none; position: relative; }
.side-item::before { display: none; }
.side-item .icon { color: var(--y-side-muted); }
.side-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-item.active { background: var(--y-side-active); color: #fff; font-weight: 600; }
.side-item.active .icon { color: var(--y-yellow); }
.side-item span:first-of-type { flex: 1; min-width: 0; }
.side-nav-more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--y-side-active); }
.side-nav-more .side-item { padding: 9px 12px; font-size: 14px; color: var(--y-side-muted); }
.side-nav-more .side-item.active { color: #fff; }
.side-nav-lower { margin-top: auto; padding-top: 12px; border-top: 0; }
.nav-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--y-side-count); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nav-count.hot { background: var(--y-yellow); color: #1c1d1f; font-weight: 700; }
.nav-count.red { background: #d92d20; color: #fff; }
.side-foot { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--y-side-active); display: grid; gap: 8px; position: relative; }
.side-badge { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: var(--y-side-muted); text-decoration: none; }
.side-badge.warn { background: rgba(245, 196, 0, 0.12); color: #f5d25a; }
.side-badge.demo { background: rgba(245, 196, 0, 0.1); color: #f5d25a; border: 1px solid rgba(245, 196, 0, 0.22); }
.me { background: transparent; color: var(--y-side-text); padding: 6px 8px; border-radius: 10px; }
.me:hover { background: rgba(255, 255, 255, 0.06); }
.me-text strong { color: #fff; font-size: 14px; font-weight: 500; }
.me-text small { color: var(--y-side-muted); font-size: 12px; }
.side-foot .menu { bottom: 52px; }

.mobile-top { display: none; }
.bottom-nav { display: none; }

/* Narrow desktops: the menu folds to its icons. */
@media (max-width: 1200px) and (min-width: 761px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 16px 10px 12px; align-items: stretch; }
  .sb-brand { justify-content: center; padding: 4px 0 14px; }
  .sb-brand-text, .side-item span, .me-text, .side-badge { display: none; }
  .sb-brand-icon { display: block; }
  .side-item { justify-content: center; padding: 11px 0; }
  .side-item .nav-count { display: grid; position: absolute; top: 3px; right: 6px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .me { justify-content: center; }
  .me > .icon { display: none; }
  .side-foot .menu { left: 8px; right: auto; min-width: 210px; }
  /* The icons-only sidebar: the guide button is its (i), with its words as the tip. */
  .side-guide { justify-content: center; padding: 10px 0; }
  .side-guide span { display: none; }
}

/* Phones: the yellow bar on top, four tabs and More at the bottom. */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .sidebar { display: none; }
  .mobile-top { display: flex; align-items: center; gap: 10px; min-height: 56px; background: var(--y-yellow); color: #1c1d1f; padding: env(safe-area-inset-top) 6px 0 16px; }
  .mobile-top .app-icon { width: 30px; height: 30px; }
  .mt-firm { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mt-search { width: 44px; height: 44px; flex: none; border: 0; background: transparent; color: #1c1d1f; display: grid; place-items: center; border-radius: 12px; cursor: pointer; }
  .mt-search:active { background: rgba(0, 0, 0, 0.08); }
  .mobile-top .pill { flex: none; }
  .mobile-top .tally { flex: none; margin: 0; }
  .mobile-top .tally.compact .tally-btn { background: rgba(28, 29, 31, 0.08); border-color: transparent; color: #1c1d1f; min-height: 36px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--y-card); border-top: 1px solid var(--y-line); padding: 0 0 env(safe-area-inset-bottom); }
  .bottom-item, .bottom-nav button.bottom-item { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--y-muted); font-size: 12px; font-weight: 500; text-decoration: none; position: relative; border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit; }
  .bottom-item .icon { width: 22px; height: 22px; }
  .bottom-item.active { color: var(--y-text); font-weight: 700; }
  .bottom-item.active .icon { color: var(--y-text); background: none; padding: 0; stroke-width: 2.2; }
  .bottom-item .nav-count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; background: var(--y-text); }
  .bottom-item .nav-count.hot { background: var(--y-yellow); }
  .bottom-item .nav-count.red { background: #d92d20; }
  .app.in-thread .mobile-top, .app.in-thread .bottom-nav { display: none; }
  .sheet-item.active { background: var(--y-todo-bg); color: var(--y-text); }
  .sheet-item .nav-count { margin-left: auto; background: var(--y-text); }
}

/* ---- pages ---- */
.page { padding: 32px 40px 48px; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.page-head h1, .y-head h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p.muted, .y-sub { margin: 4px 0 0; font-size: 15px; color: var(--y-muted); }
@media (max-width: 760px) {
  .page { padding: 20px 16px 32px; gap: 16px; }
  .page-head h1, .y-head h1 { font-size: 28px; }
}

/* ---- shared building blocks ---- */
.card { box-shadow: none; border-color: var(--y-line); }
.y-card { background: var(--y-card); border: 1px solid var(--y-line); border-radius: 16px; overflow: hidden; }
.y-card > h2, .y-card-head { margin: 0; padding: 18px 20px 14px; font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.y-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.y-card-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.y-card-head span { font-size: 14px; color: var(--y-muted); }
.y-pad { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.y-pad > h2 { margin: 0; padding: 0; font-size: 17px; font-weight: 600; }
.y-pad > p { margin: 0; font-size: 15px; color: var(--y-text-2); }
.y-pad > p strong { color: var(--y-text); }

/* A row: an icon tile, what it is, the one thing to do. The whole row is the link. */
.y-row { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--y-line-soft); }
.y-row:hover { background: var(--y-sunk); }
.y-row-body { flex: 1; min-width: 0; }
.y-row-title { font-size: 16px; font-weight: 600; color: var(--y-text); }
.y-row-text { font-size: 14px; color: var(--y-muted); margin-top: 2px; }
.y-row .chev { display: none; color: var(--y-faint); }
.y-tile { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--y-todo-bg); color: var(--y-todo); }
.y-tile.bad { background: var(--y-bad-bg); color: var(--y-bad); }
.y-tile.soon { background: var(--y-soon-bg); color: var(--y-soon); }
.y-tile.ok { background: var(--y-ok-bg); color: var(--y-ok); }
.y-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--y-text); background: var(--y-card);
  border: 1px solid var(--y-control); border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.y-btn:hover:not(:disabled) { border-color: var(--y-text); }
.y-btn:disabled { opacity: 0.55; cursor: default; }
.y-btn.primary { background: var(--y-yellow); border-color: var(--y-yellow); color: #1c1d1f; }
.y-btn.primary:hover:not(:disabled) { background: var(--y-yellow-hover); border-color: var(--y-yellow-hover); }
.y-row .y-btn::after { content: ''; position: absolute; inset: 0; }
.y-more { font-size: 14px; font-weight: 600; color: var(--y-text); text-decoration: none; }
.y-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.y-plate { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #1c1d1f; background: var(--y-yellow); border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.y-progress { height: 8px; border-radius: 999px; background: var(--y-line-soft); overflow: hidden; }
.y-progress > i { display: block; height: 100%; background: var(--y-text); border-radius: 999px; }
.y-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--y-todo-bg); color: var(--y-todo); }
.y-chip.bad { background: var(--y-bad-bg); color: var(--y-bad); }
.y-chip.soon { background: var(--y-soon-bg); color: var(--y-soon); }
.y-chip.ok { background: var(--y-ok-bg); color: var(--y-ok); }
.y-bad-text { color: var(--y-bad); }
@media (max-width: 760px) {
  .y-row { gap: 12px; padding: 14px; }
  .y-row .y-btn { position: static; border: 0; padding: 0; width: 0; margin-left: -12px; overflow: hidden; color: transparent; background: none; }
  .y-row .chev { display: block; }
  .y-row-title { font-size: 15px; }
  /* Two lines, not one: the end of a line is often the point ("already late", "skip goes out Wed"). */
  .y-row-text { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .y-tile { width: 36px; height: 36px; border-radius: 10px; }
  .y-card > h2, .y-card-head { padding: 16px 16px 12px; font-size: 16px; }
  .y-pad { padding: 16px; }
  .y-pad > h2 { font-size: 16px; }
  .y-pad .y-btn.primary { font-size: 16px; font-weight: 700; padding: 13px; border-radius: 12px; }
}

/* ---- Today ---- */
.td-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.td-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.td-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.td-side { flex: 1 1 300px; max-width: 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.td-clear { display: flex; align-items: center; gap: 16px; padding: 18px 20px 20px; border-top: 1px solid var(--y-line-soft); }
.td-clear p { margin: 2px 0 0; font-size: 14px; color: var(--y-muted); }
.td-lorries { display: flex; flex-direction: column; }
.td-lorry { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--y-line-soft); font-size: 15px; }
.td-lorry > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-lorry > span:last-child { font-size: 14px; color: var(--y-muted); white-space: nowrap; }
.td-lorry.off > span:last-child { color: var(--y-bad); }
.td-skeleton { padding: 18px 20px; }
.td-road-head { padding: 0; }
.td-plan { align-self: flex-start; }
@media (max-width: 760px) {
  .td-grid, .td-main, .td-side { gap: 16px; }
  .td-side { max-width: none; flex-basis: 100%; }
  .td-plan { align-self: stretch; }
  .td-head .y-search { display: none; }
}

/* ---- search ---- */
.y-search { position: relative; flex: 0 1 380px; min-width: 240px; }
.y-search-box { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--y-card); border: 1px solid #e2e2de; border-radius: 12px; color: var(--y-muted); margin: 0; font-size: 15px; font-weight: 400; }
.y-search-box:focus-within { border-color: var(--y-text); }
.y-search-box input { border: 0; outline: none; box-shadow: none !important; flex: 1; min-width: 0; padding: 0; margin: 0; background: transparent; font: inherit; font-size: 15px; color: var(--y-text); height: 100%; }
.y-search-box kbd { font: inherit; font-size: 12px; color: var(--y-faint); border: 1px solid var(--y-line); border-radius: 6px; padding: 1px 6px; }
.y-search-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: min(70vh, 560px); overflow-y: auto; background: var(--y-card); border: 1px solid var(--y-line); border-radius: 14px; box-shadow: 0 18px 48px rgba(28, 29, 31, 0.16); padding: 6px; }
.y-search-group + .y-search-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--y-line-soft); }
.y-search-group h3 { margin: 0; padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--y-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.y-search-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--y-text); text-decoration: none; }
.y-search-item.on, .y-search-item:hover { background: var(--y-todo-bg); }
.y-search-item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.y-search-item strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.y-search-item small { font-size: 13px; color: var(--y-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.y-search-item .icon { color: var(--y-muted); }
.y-search-none { padding: 14px 12px; font-size: 14px; color: var(--y-muted); }
.y-search-sheet { position: fixed; inset: 0; z-index: 60; background: var(--y-bg); display: flex; flex-direction: column; }
.y-search-sheet-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px 12px; background: var(--y-yellow); }
.y-search-sheet-top .y-search-box { flex: 1; border-color: transparent; }
.y-search-sheet-top button { flex: none; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: #1c1d1f; padding: 10px 8px; cursor: pointer; }
.y-search-sheet-list { flex: 1; overflow-y: auto; padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); }
.y-search-sheet-list .y-search-item { padding: 12px 10px; }
.y-search-hint { padding: 24px 12px; color: var(--y-muted); font-size: 14px; text-align: center; }
.y-search-sheet-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@media (min-width: 761px) {
  .y-search-sheet { background: rgba(28, 29, 31, 0.38); align-items: center; padding: 12vh 16px 16px; }
  .y-search-sheet-panel { flex: 0 1 auto; width: min(640px, 100%); max-height: 70vh; background: var(--y-card); border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); overflow: hidden; }
  .y-search-sheet-top { background: var(--y-card); border-bottom: 1px solid var(--y-line); padding: 10px; }
  .y-search-sheet-top .y-search-box { border-color: transparent; }
  .y-search-sheet-top button { color: var(--y-muted); }
}

/* ---- Settings: the sections in groups beside the page ---- */
.st-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 32px; align-items: start; }
.st-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
.st-side-start { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--y-card); border: 1px solid var(--y-line); color: var(--y-text); font-size: 15px; font-weight: 600; text-decoration: none; }
.st-side-start span { font-size: 13px; font-weight: 600; color: var(--y-soon); background: var(--y-soon-bg); border-radius: 999px; padding: 2px 8px; }
.st-side-start.done span { color: var(--y-ok); background: var(--y-ok-bg); }
.st-side-start.active { border-color: var(--y-text); }
/* Each group of Settings is a card, its name a heading above a line, so a group and its pages never run together. */
.st-side-group { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--y-card); border: 1px solid var(--y-line); border-radius: 12px; }
.st-side-group > span { padding: 6px 10px 8px; margin: 0 0 4px; border-bottom: 1px solid var(--y-line); font-size: 11.5px; font-weight: 700; color: var(--y-muted); text-transform: uppercase; letter-spacing: 0.07em; }
.st-side-item { display: block; padding: 8px 10px; border-radius: 8px; font-size: 15px; color: var(--y-text); text-decoration: none; }
.st-side-item:hover { background: var(--y-todo-bg); color: var(--y-text); }
.st-side-item.active { background: var(--y-todo-bg); color: var(--y-text); font-weight: 600; box-shadow: inset 3px 0 0 var(--y-text); }
.st-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.st-lead { margin: -6px 0 0; font-size: 15px; }
.st-body > h2.st-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
@media (max-width: 1100px) and (min-width: 761px) {
  .st-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
}

/* ---- Getting started ---- */
.gs { display: grid; gap: 16px; }
.gs-intro h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.gs-intro p { margin: 6px 0 0; font-size: 15px; color: var(--y-muted); max-width: 640px; }
.gs-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; background: #232426; color: #fff; border-radius: 16px; padding: 22px 24px; }
.gs-next > div { flex: 1 1 320px; min-width: 0; }
.gs-next small { display: block; font-size: 12px; font-weight: 700; color: var(--y-yellow); text-transform: uppercase; letter-spacing: 0.06em; }
.gs-next h3 { margin: 6px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.gs-next p { margin: 6px 0 0; font-size: 15px; color: #c9cbce; }
.gs-next .y-btn.primary { font-size: 15px; padding: 12px 18px; }
/* What is filled in but does not add up (src/righto/setup-check.mjs): red, as it makes Yarder go wrong. */
.gs-fix { display: grid; gap: 10px; background: var(--y-bad-bg); border: 1px solid color-mix(in srgb, var(--y-bad) 25%, transparent); border-radius: 16px; padding: 18px 20px; }
.gs-fix h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; color: var(--y-bad); }
.gs-fix > p { margin: 0; }
.gs-fix-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--y-card); border-radius: 12px; padding: 12px 14px; }
.gs-fix-item .gs-item-body { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; }
.gs-fix-item strong { font-size: 15px; }
.gs-fix-item small { color: var(--y-muted); font-size: 13.5px; line-height: 1.45; }
.gs-helper { display: grid; gap: 12px; margin: 0 0 18px; }
.gs-helper-head { display: flex; gap: 10px; align-items: flex-start; }
.gs-helper-head .icon { flex: none; margin-top: 2px; color: var(--y-muted); }
.gs-helper-head strong { display: block; font-size: 15px; }
.gs-helper-head small { display: block; margin-top: 2px; color: var(--y-muted); font-size: 13.5px; }
.gs-helper-talk { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.gs-turn { padding: 10px 12px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.gs-turn p, .gs-turn ol, .gs-turn ul { margin: 0; }
.gs-turn > * + * { margin-top: 6px; }
.gs-turn ol, .gs-turn ul { padding-left: 20px; }
.gs-turn.owner { justify-self: end; max-width: 85%; background: var(--y-text); color: var(--y-card); }
.gs-turn.helper { justify-self: start; background: var(--panel-2); border: 1px solid var(--line); }
.gs-turn .btn { margin-top: 8px; }
.gs-done { display: flex; align-items: center; gap: 14px; background: var(--y-ok-bg); color: var(--y-ok); border-radius: 16px; padding: 18px 20px; font-size: 15px; font-weight: 600; }
.gs-stage { background: var(--y-card); border: 1px solid var(--y-line); border-radius: 16px; overflow: hidden; }
.gs-stage > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; }
.gs-stage > summary::-webkit-details-marker { display: none; }
.gs-stage > summary h3 { margin: 0; font-size: 17px; font-weight: 600; }
.gs-stage > summary > span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--y-muted); }
.gs-stage > summary .icon { transition: transform 0.15s; }
.gs-stage[open] > summary .icon { transform: rotate(180deg); }
.gs-stage.complete > summary > span { color: var(--y-ok); font-weight: 600; }
.gs-item { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--y-line-soft); }
.gs-mark { width: 24px; height: 24px; flex: none; border-radius: 999px; display: grid; place-items: center; border: 2px solid var(--y-control); color: transparent; }
.gs-item.done .gs-mark { border-color: var(--y-ok); background: var(--y-ok); color: #fff; }
.gs-item-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gs-item-body strong { font-size: 15px; font-weight: 600; }
.gs-item.done .gs-item-body strong { color: var(--y-text-2); font-weight: 500; }
.gs-item-body small { font-size: 13px; color: var(--y-muted); }
.gs-item-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.gs-item-actions input[type='date'] { width: auto; }
.gs-tools { display: grid; gap: 16px; margin-top: 8px; }
.gs-tools > h2 { margin: 8px 0 0; font-size: 20px; font-weight: 700; }
.gs-tools > p { margin: -10px 0 0; color: var(--y-muted); font-size: 14px; }
@media (max-width: 760px) {
  .gs-next { padding: 18px; }
  .gs-item { padding: 12px 16px; align-items: flex-start; }
  .gs-item-actions { flex-direction: column; align-items: flex-end; }
  .gs-stage > summary { padding: 14px 16px; }
}

/* ---- Bookings: the list, and the booking beside it ---- */
.bk2-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.y-seg { display: inline-flex; gap: 4px; background: #e9e9e5; border-radius: 12px; padding: 4px; max-width: 100%; }
.y-seg button { font: inherit; font-size: 14px; border: 0; border-radius: 9px; padding: 8px 14px; background: transparent; color: var(--y-text-2); cursor: pointer; white-space: nowrap; }
.y-seg button:hover { color: var(--y-text); }
.y-seg button.on { background: var(--y-card); color: var(--y-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.y-seg button b { font-weight: 600; }
.bk2-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.bk2-list { flex: 999 1 520px; min-width: 0; }
.bk2-panel { flex: 1 1 360px; max-width: 440px; min-width: 0; position: sticky; top: 0; padding: 22px; display: flex; flex-direction: column; gap: 18px; overflow: visible; }
.bk2-empty { padding: 8px; }
.bk2-row { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--y-line-soft); cursor: pointer; outline-offset: -2px; }
.bk2-row:first-child { border-top: 0; }
.bk2-row:hover { background: var(--y-sunk); }
.bk2-row.on { background: #fffbeb; box-shadow: inset 4px 0 0 var(--y-text); }
.bk2-date { width: 64px; flex: none; display: flex; flex-direction: column; line-height: 1.3; }
.bk2-date span { font-size: 13px; color: var(--y-muted); }
.bk2-date strong { font-size: 16px; }
.bk2-what { flex: 1; min-width: 0; }
.bk2-what > div:first-child { font-size: 16px; font-weight: 600; }
.bk2-what > div:last-child { font-size: 14px; color: var(--y-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk2-row .y-chip { flex: none; }
.bk2-price { font-size: 17px; font-weight: 700; min-width: 64px; text-align: right; flex: none; }
.bk2-act { width: 96px; flex: none; display: flex; justify-content: flex-end; }
.bk2-act .y-btn { min-width: 88px; justify-content: center; }
.y-btn.dark { border-color: var(--y-text); }
.y-btn.danger { color: var(--y-bad); }
.bk2-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bk2-panel-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.bk2-panel-head p { margin: 4px 0 0; font-size: 14px; color: var(--y-muted); }
.bk2-panel-head > strong { font-size: 22px; white-space: nowrap; }
.bk2-check { background: #fff8e6; border: 1px solid #f3e1b3; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.bk2-check.bk2-check-bad { background: #fff5f4; border-color: #f6cfcb; }
.bk2-check > strong { font-size: 15px; color: var(--y-text); }
.bk2-check li { color: var(--y-text); }
.bk2-check ol { margin: 0; padding: 0; list-style: none; counter-reset: check; display: grid; gap: 10px; }
.bk2-check li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; }
.bk2-check li::before { counter-increment: check; content: counter(check); flex: none; width: 10px; color: var(--y-soon); font-weight: 600; }
.bk2-check li.ck-bad::before { color: var(--y-bad); }
.bk2-note { font-size: 14px; background: var(--y-todo-bg); border-radius: 12px; padding: 12px 14px; }
.bk2-facts { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.bk2-fact { display: flex; gap: 12px; align-items: flex-start; }
.bk2-fact > .icon { color: var(--y-muted); margin-top: 2px; }
.bk2-fact small { display: block; color: var(--y-muted); font-size: 14px; margin-top: 1px; }
.bk2-fact a { color: inherit; }
.bk2-price-detail { border-top: 1px solid var(--y-line-soft); padding-top: 14px; font-size: 14px; color: var(--y-text-2); }
.bk2-price-detail summary { cursor: pointer; font-weight: 600; color: var(--y-text); }
.bk2-lines { margin: 10px 0 0; display: grid; gap: 6px; }
.bk2-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.bk2-actions { display: flex; flex-direction: column; gap: 10px; }
.bk2-actions > .y-btn { width: 100%; padding: 11px; border-radius: 12px; font-size: 15px; }
.bk2-actions > .y-btn.primary { font-size: 16px; font-weight: 700; padding: 14px; }
.bk2-actions-row { display: flex; gap: 10px; }
.bk2-actions-row .y-btn { flex: 1; padding: 11px; border-radius: 12px; font-size: 15px; }
.bk2-copy { align-self: center; font: inherit; font-size: 14px; color: var(--y-text-2); background: none; border: 0; padding: 4px; text-decoration: underline; text-decoration-color: var(--y-control); text-underline-offset: 3px; cursor: pointer; }
.bk2-hold { margin: 0; font-size: 13px; color: var(--y-faint); text-align: center; }
.bk2-panel .bk-visits, .bk2-sheet .bk-visits { margin: 0; }
.bk2-cards { display: grid; gap: 14px; }
.bk2-pcard { background: var(--y-card); border: 1px solid var(--y-line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.bk2-pline { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--y-muted); }
.bk2-ptitle { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 18px; }
.bk2-psub { font-size: 14px; color: var(--y-text-2); }
.bk2-pactions { display: flex; gap: 10px; margin-top: 6px; }
.bk2-pbtn { flex: 1; font-size: 16px; font-weight: 700; padding: 12px; border-radius: 12px; }
.bk2-more { position: relative; }
.bk2-dots { width: 48px; height: 100%; padding: 0; border-radius: 12px; }
.bk2-menu { right: 0; bottom: calc(100% + 6px); min-width: 230px; }
.bk2-sheet { position: fixed; inset: 0; z-index: 50; background: var(--y-bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bk2-sheet-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: var(--y-card); border-bottom: 1px solid var(--y-line); }
.bk2-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px; border: 0; background: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--y-text); cursor: pointer; }
.bk2-sheet-body { padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; background: var(--y-card); min-height: calc(100% - 57px); }
@media (max-width: 1100px) and (min-width: 761px) {
  .bk2-row { gap: 14px; padding: 14px 16px; }
  .bk2-act { width: auto; }
}
@media (max-width: 760px) {
  .bk2-head .y-seg { width: 100%; }
  .bk2-head .y-seg button { flex: 1; padding: 9px 2px; font-size: 13px; }
  .bk2-head .y-seg button b { display: none; }
}
@media (prefers-color-scheme: dark) {
  .y-seg { background: #2a2c2f; }
  .bk2-row.on { background: #2a2618; box-shadow: inset 4px 0 0 var(--y-yellow); }
  .bk2-check { background: #2c2512; border-color: #4a3c14; }
  .bk2-check.bk2-check-bad { background: #2f1716; border-color: #5a2421; }
  .y-search-box { border-color: var(--y-line); }
  .gs-next { background: #0d0e0f; }
}

/* ---- Day plan: the lorries side by side, To plan on the left ---- */
.dy-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dy-head-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dy-head-main h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.dy-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dy-datewrap { margin-top: 0; }
.dy-step, .dy-datebtn { border: 1px solid var(--y-control); background: var(--y-card); border-radius: 12px; }
.dy-date-text strong { font-weight: 700; }
.dy-next { border: 0; background: none; padding: 6px 2px; font: inherit; font-size: 15px; font-weight: 600; color: var(--y-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--y-control); }
.dy-next.bad { color: var(--y-bad); text-decoration-color: currentColor; }
.dy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dy-sent { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--y-muted); }
.dy-sent.ok { color: var(--y-ok); }
.dy-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; font-size: 15px; color: var(--y-text-2); }
.dy-summary strong { color: var(--y-text); }
.dy-costs summary { cursor: pointer; }
.dy-costs > span, .dy-costs > a { display: block; margin-top: 4px; font-size: 14px; color: var(--y-muted); }
.dy-offline { font-size: 14px; color: var(--y-muted); }
.dy-note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--y-soon-bg); color: var(--y-soon); font-weight: 500; }
.dy-note.bad { background: var(--y-bad-bg); color: var(--y-bad); }
.dy-board { grid-auto-columns: minmax(250px, 1fr); gap: 16px; padding-bottom: 12px; }
.dy-col { background: var(--y-card); border: 1px solid var(--y-line); border-radius: 16px; padding: 0; gap: 0; min-height: 160px; overflow: hidden; align-content: start; }
.dy-side { background: transparent; border: 1px dashed var(--y-control); padding: 14px; gap: 10px; overflow: visible; }
.dy-col-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--y-line-soft); gap: 4px; }
.dy-side .dy-col-head { padding: 0; border: 0; }
.dy-col-head h2 { font-size: 16px; font-weight: 600; }
.dy-lorry { flex-wrap: nowrap; gap: 6px; }
.dy-lorry .y-plate { flex: none; }
.dy-driver { flex: 1; width: auto; min-width: 0; border: 0; border-radius: 8px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 4px center;
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--y-text); padding: 4px 24px 4px 4px; cursor: pointer; }
.dy-driver:hover { background-color: var(--y-todo-bg); }
.dy-offbtn { flex: none; width: 34px; height: 34px; color: var(--y-muted); }
.dy-sum { margin: 0; font-size: 13px; color: var(--y-muted); }
.dy-sum2 { margin: 0; display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--y-faint); }
.dy-cost-why { display: inline-grid; cursor: help; color: var(--y-faint); }
.dy-check { display: inline; padding: 0; border-radius: 0; background: none !important; font-size: 13px; font-weight: 500; }
.dy-check.ok { color: var(--y-ok); }
.dy-check.warn { color: var(--y-soon); }
.dy-check.bad { color: var(--y-bad); font-weight: 600; }
.dy-check.none { color: var(--y-muted); }
.dy-down, .dy-away { font-weight: 500; }
.dy-list { gap: 0; }
.dy-side .dy-list { gap: 8px; }
.dy-card { display: flex; flex-direction: column; gap: 3px; border: 0; border-top: 1px solid var(--y-line-soft); border-left: 0; border-radius: 0; background: var(--y-card); padding: 12px 16px; box-shadow: none; outline-offset: -2px; }
.dy-run .dy-list > .dy-card:first-child, .dy-run .dy-list > .dy-donefold:first-child { border-top: 0; }
.dy-side .dy-card { border: 1px solid var(--y-line); border-radius: 12px; }
.dy-card:hover { background: var(--y-sunk); border-color: var(--y-line); }
.dy-card.k-delivery, .dy-card.k-collection, .dy-card.k-exchange, .dy-card.k-wait, .dy-card.k-due { border-left-color: transparent; }
.dy-card.done { opacity: 0.62; }
.dy-card.done .dy-title { text-decoration: none; }
.dy-card.failed { background: var(--y-card); }
.dy-card-top { gap: 10px; }
.dy-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--y-muted); min-width: 0; }
.dy-title { font-size: 15px; font-weight: 600; color: var(--y-text); }
.dy-where { font-size: 14px; color: var(--y-text-2); }
.dy-where a { color: inherit; }
.dy-eta { font-size: 15px; font-weight: 700; color: var(--y-text); }
.dy-eta.ok { color: var(--y-ok); font-size: 13px; font-weight: 600; }
.dy-tags { margin-top: 4px; }
.dy-tag { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.dy-leg { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 16px; border-top: 1px solid var(--y-line-soft); font-size: 13px; color: var(--y-muted); }
.dy-leg time { font-weight: 500; font-variant-numeric: tabular-nums; }
.dy-leg.tip { color: var(--y-muted); }
.dy-leg.closed { color: var(--y-bad); font-weight: 600; }
.dy-donefold { width: 100%; display: flex; align-items: center; gap: 6px; padding: 11px 16px; border: 0; border-top: 1px solid var(--y-line-soft); background: var(--y-sunk); font: inherit; font-size: 14px; color: var(--y-text-2); text-align: left; cursor: pointer; }
.dy-donefold .icon { color: var(--y-ok); }
.dy-donefold.open .icon { color: var(--y-muted); }
.dy-hint { margin: 14px 16px; border-color: var(--y-control); }
.dy-sub { margin: 6px 0 0; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--y-muted); }
.dy-sub.bad { color: var(--y-bad); }
.dy-group { display: grid; gap: 8px; }
.dy-tell { font-size: 13px; font-weight: 500; color: var(--y-text-2); }
.dy-nd { padding: 12px 14px; gap: 10px; }
.dy-nd-main { display: grid; gap: 3px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.dy-why { font-size: 13px; color: var(--y-muted); }
.dy-why.bad { color: var(--y-bad); }
.dy-nd-actions { position: relative; display: flex; }
.dy-menu { left: 0; top: calc(100% + 4px); min-width: 240px; }
.dy-due-actions { display: flex; gap: 8px; margin-top: 8px; }
.y-btn.quiet { border-color: transparent; color: var(--y-text-2); }
.y-btn.quiet:hover:not(:disabled) { background: var(--y-todo-bg); border-color: transparent; }
.dy-put { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--y-line-soft); gap: 6px; }
.dy-put > span { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--y-muted); }
.dy-put .y-btn { padding: 8px 12px; }
.dy-drop { height: 3px; margin: 2px 16px; border-radius: 3px; background: var(--y-yellow); }
.dy-run.over { border-color: var(--y-text); box-shadow: none; }
.dy-phone-hint { margin: 0; text-align: center; font-size: 13px; color: var(--y-faint); }
@media (max-width: 760px) {
  .dy-head-main h1 { font-size: 28px; }
  .dy-head { align-items: stretch; }
  .dy-actions { justify-content: space-between; }
  .dy-tabs { position: sticky; top: -20px; z-index: 4; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 10px 16px; background: var(--y-bg); }
  .dy-tab { flex: none; padding: 8px 12px; border: 1px solid var(--y-control); border-radius: 999px; background: var(--y-card); color: var(--y-text); font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
  .dy-tab.on { background: var(--y-text); border-color: var(--y-text); color: var(--y-card); font-weight: 600; }
  .dy-tab.bad:not(.on) { color: var(--y-bad); font-weight: 600; }
  .dy-phone > .dy-side { background: transparent; border-style: dashed; }
  .dy-sendbar { position: sticky; bottom: -32px; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 4px -16px -32px; padding: 12px 16px; background: var(--y-card); border-top: 1px solid var(--y-line); box-shadow: none; }
  .dy-sendbar > span { flex: 1; font-size: 14px; font-weight: 500; }
  .dy-sendbar .y-btn.primary { font-size: 15px; font-weight: 700; padding: 11px 20px; border-radius: 12px; }
}
@media (prefers-color-scheme: dark) {
  .dy-tab.on { color: #1c1d1f; }
}

/* ---- Money ---- */
.mn-tabs { align-self: start; }
.mn-tabs b { font-weight: 600; }
.mn-head-actions { gap: 10px 16px; }
.mn-month { display: inline-flex; align-items: center; gap: 8px; background: none; box-shadow: none; padding: 0; }
.mn-month strong { min-width: 140px; text-align: center; font-size: 17px; font-weight: 700; }
.mn-month .dy-step:disabled { opacity: 0.4; cursor: default; }
.mn-basis { flex: 1 1 260px; }
.mn-head-actions .mn-pack { margin-left: auto; }
.mn-kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.mn-kpi { padding: 18px 20px; gap: 4px; background: var(--y-card); }
.mn-kpi strong { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mn-kpi-label { font-size: 14px; font-weight: 500; color: var(--y-muted); }
.mn-kpi.good, .mn-kpi.late { background: var(--y-card); color: var(--y-text); border-color: var(--y-line); }
.mn-kpi.good strong { color: var(--y-text); }
.mn-kpi.good .muted, .mn-kpi.good .mn-kpi-label { color: var(--y-muted); }
.mn-running { background: none; border: 0; padding: 0 2px; color: var(--y-text-2); }
.mn-insights { display: block; }
.mn-insight { align-items: flex-start; }
.mn-insight:hover { background: none; }
.mn-insight-jobs { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 13px; }
.mn-table { padding: 0; overflow: hidden; }
.mn-row { padding: 12px 20px; border-top: 1px solid var(--y-line-soft); font-size: 14px; }
.mn-row:hover { background: var(--y-sunk); }
.mn-row-head { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--y-muted); padding-top: 14px; padding-bottom: 10px; }
.mn-row-head:hover { background: none; }
.mn-row .n { font-variant-numeric: tabular-nums; }
.mn-margin { font-weight: 600; color: var(--y-text); }
.mn-margin.bad { color: var(--y-bad); }
.mn-thumb { display: none; }
.mn-job strong { font-weight: 600; }
.mn-doc { font-size: 12px; font-weight: 500; background: none; color: var(--y-muted); padding: 0; }
.mn-doc + .mn-doc::before { content: '· '; color: var(--y-faint); }
.mn-doc.warn { font-weight: 600; color: var(--y-soon); background: none; }
.mn-doc.bad { font-weight: 600; color: var(--y-bad); background: none; }
.mn-doc.ok { background: none; color: var(--y-muted); }
.mn-est { background: var(--y-soon-bg); color: var(--y-soon); font-weight: 600; }
@media (max-width: 760px) {
  .mn-tabs { width: 100%; }
  .mn-tabs button { flex: 1; padding: 9px 4px; font-size: 13px; }
  .mn-tabs b { display: none; }
  .mn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mn-kpi { padding: 14px 16px; }
  .mn-kpi strong { font-size: 22px; }
  .mn-row { padding: 12px 14px; }
  .mn-month strong { min-width: 0; flex: 1; }
  .mn-pack { width: 100%; }
}

/* Tabs inside a page (Customers, Paperwork, Marketing, Results): the segmented control under the title. */
.page-seg, .cu-seg { justify-self: start; }
.y-seg a { display: inline-flex; align-items: center; font-size: 14px; border-radius: 9px; padding: 8px 14px; color: var(--y-text-2); text-decoration: none; white-space: nowrap; }
.y-seg a:hover { color: var(--y-text); }
.y-seg a.on { background: var(--y-card); color: var(--y-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.cu-search { flex: 0 1 420px; }
.empty-icon { background: var(--y-todo-bg); color: var(--y-todo); }
@media (max-width: 760px) {
  .page-seg, .cu-seg { justify-self: stretch; }
  .page-seg button, .page-seg a, .cu-seg a { flex: 1; justify-content: center; padding: 9px 4px; font-size: 13px; }
}
/* An action on a row of a list (Applied, Paid, Charge): dark outline. Yellow stays the page's one main action. */
.btn.dark { border-color: var(--y-text); }
/* A long kind line ("Delivery · PM · road, permit ✓") wraps rather than pushing the time out of the card. */
.dy-card-top { align-items: flex-start; }
.dy-kind { flex: 1 1 auto; flex-wrap: wrap; white-space: normal; line-height: 1.35; }
.dy-eta { flex: none; }
.dy-col { min-width: 0; }

/* ---- Messages ---- */
.list-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.inbox-tabs { gap: 2px; }
.inbox-tabs .tab.active { background: var(--y-text); color: var(--y-card); }
.inbox-tabs .tab.active .tab-count { background: var(--y-yellow); color: #1c1d1f; }
.conv.active { background: #fffbeb; box-shadow: inset 3px 0 0 var(--y-text); }
.conv-waiting { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 1px; font-size: 12px; font-weight: 600; color: var(--y-text); }
.conv-waiting.office .icon { color: var(--y-soon); }
@media (prefers-color-scheme: dark) { .conv.active { background: #2a2618; } }
.list-head .pill { background: var(--y-todo-bg); color: var(--y-todo); font-weight: 600; }
/* A chosen chip (the briefing shown on Results, filters): dark, as the chosen tab is. Yellow stays for the main action. */
.chip.on { background: var(--y-text); color: var(--y-card); }
/* Phones: buttons a thumb can hit (Apple's 44 points), not only the WCAG minimum. */
@media (max-width: 760px) {
  .y-btn:not(.bk2-dots), .btn:not(.small):not(.icon-btn) { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
}
/* Narrow computers and tablets: the icon menu, a little less padding, so a list and its panel still sit side by side. */
@media (max-width: 1200px) and (min-width: 761px) {
  .page { padding: 28px 24px 40px; }
  .bk2-list { flex-basis: 460px; }
  .bk2-panel { flex-basis: 340px; }
  .side-foot .tally-btn { justify-content: center; padding: 10px 0; }
  .side-foot .tally-btn span, .side-foot .tally-btn strong { display: none; }
}
.toast-act { margin-left: 8px; border: 0; background: none; color: var(--y-yellow); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 2px; }
/* Day plan: the job's number in its run, its "⋯" menu, what to check (amber) beside what cannot be done (red). */
.dy-n { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 -2px 0 0; border-radius: 6px; background: var(--y-todo-bg); color: var(--y-text); font-size: 11px; font-weight: 700; }
.dy-menu-wrap { position: relative; flex: none; margin: -4px -8px -4px 0; }
.dy-dots { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--y-muted); cursor: pointer; }
.dy-dots:hover, .dy-dots[aria-expanded='true'] { background: var(--y-todo-bg); color: var(--y-text); }
.dy-menu.right { left: auto; right: 0; top: calc(100% + 4px); z-index: 30; }
.dy-eta.check { color: var(--y-soon); }
.dy-check-text { color: var(--y-soon); font-weight: 600; }
.dy-problems { margin: 0; font-size: 13px; font-weight: 600; }
.dy-tag.soft { background: var(--y-todo-bg); color: var(--y-text-2); border-color: transparent; }
.dy-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d92d20; vertical-align: 1px; }
.dy-col { overflow: visible; }
.dy-run { overflow: visible; }
@media (max-width: 760px) {
  .dy-dots { width: 40px; height: 40px; }
  .dy-menu-wrap { margin: -10px -12px -8px 0; }
}
.dy-run .dy-list > :last-child { border-radius: 0 0 15px 15px; }
/* Who answers a conversation: Yarder's AI, or one of the office. */
.ai-bar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--y-sunk); border-bottom: 1px solid var(--y-line); font-size: 14px; color: var(--y-text-2); }
.ai-bar > .icon { color: var(--y-soon); flex: none; }
.ai-bar.mine > .icon { color: var(--y-ok); }
.ai-bar > span { flex: 1; min-width: 0; }
.ai-bar .y-btn { padding: 6px 12px; font-size: 13px; }
.ac-max { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ac-max .st-field { max-width: 220px; }
/* Bookings Yarder confirmed itself, until the office has looked them over. */
.bk2-yarder { display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 12px; border-left: 3px solid var(--y-yellow); }
.bk2-yarder-head { display: flex; gap: 10px; align-items: flex-start; }
.bk2-yarder-head .icon { flex: none; margin-top: 2px; color: var(--y-soon); }
.bk2-yarder-head span { display: grid; gap: 2px; }
.bk2-yarder-head small { color: var(--y-text-2); font-size: 13px; }
.bk2-yarder ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk2-yarder li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--y-sunk); }
.bk2-yarder-open { display: grid; gap: 2px; text-align: left; flex: 1; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: var(--y-text); cursor: pointer; }
.bk2-yarder-open span { color: var(--y-text-2); font-size: 13px; }
.bk2-yarder .y-btn, .bk2-yarder-note .y-btn { padding: 6px 12px; font-size: 13px; flex: none; }
.bk2-yarder-note { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--y-soon-bg); color: var(--y-text); font-size: 14px; }
.bk2-yarder-note .icon { flex: none; color: var(--y-soon); }
.bk2-yarder-note span { flex: 1; min-width: 0; }
.bk2-why { margin: 0 0 12px; font-size: 13.5px; color: var(--y-text-2); }
/* The soft start: Yarder's suggested reply, above the reply box. */
.sg { display: grid; gap: 8px; margin: 0 12px 8px; padding: 12px 14px; border: 1px solid var(--y-line); border-left: 3px solid var(--y-yellow); border-radius: 12px; background: var(--y-card); }
.sg header { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--y-text-2); }
.sg header .icon { color: var(--y-soon); }
.sg-text { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.45; color: var(--y-text); }
.sg-edit { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; line-height: 1.45; padding: 8px 10px; border: 1px solid var(--y-control); border-radius: 10px; background: var(--y-bg); color: var(--y-text); resize: vertical; }
.sg-why { margin: 0; font-size: 13.5px; color: var(--y-soon); }
.sg-booking { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--y-text-2); }
.sg-booking .icon { flex: none; margin-top: 2px; color: var(--y-ok); }
.sg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-actions .y-btn { padding: 7px 14px; font-size: 13.5px; }
.mn-ask { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--y-soon-bg); color: var(--y-soon); font-size: 14px; font-weight: 600; }
.mn-ask .icon { flex: none; margin-top: 2px; }
@media (max-width: 760px) {
  .ai-bar { flex-wrap: wrap; padding: 8px 12px; }
  .ai-bar > span { flex-basis: calc(100% - 30px); }
}
.mn-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.mn-filters .chip { cursor: pointer; border: 1px solid var(--y-control); background: var(--y-card); color: var(--y-text); font-size: 13px; padding: 6px 12px; }
.mn-filters .chip b { font-weight: 600; color: var(--y-muted); margin-left: 2px; }
.mn-filters .chip.on { background: var(--y-text); border-color: var(--y-text); color: var(--y-card); }
.mn-filters .chip.on b { color: inherit; }

/* ---- app-wide, from the research (app-wide.md) ---- */
.toast-x { margin-left: 6px; border: 0; background: none; color: inherit; opacity: 0.8; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.toast-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
/* A focus ring that shows on white, on the warm grey, on yellow and on the dark menu. */
:focus-visible { outline: 3px solid var(--y-text); outline-offset: 2px; }
.sidebar :focus-visible, .toast :focus-visible, .gs-next :focus-visible { outline-color: var(--y-yellow); }
.y-btn.primary:focus-visible, .btn.primary:focus-visible { outline-color: var(--y-text); }
/* Phones: 16px in fields so iOS does not zoom in; what has focus is never under the bottom bars. */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; }
  .page { scroll-padding-bottom: 120px; }
}
/* Movement only for those who want it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* A field's own error, GOV.UK style: the message above the field, a red bar beside it. */
.st-field-error { color: var(--y-bad); font-size: 14px; font-weight: 600; }
.st-field.bad { border-left: 4px solid var(--y-bad); padding-left: 12px; }
.st-field.bad input, .st-field.bad select, .st-field.bad textarea { border-color: var(--y-bad); border-width: 2px; }
.st-savebar { background: #232426; border-radius: 14px; }
/* Cards never wider than their lorry's column; the "⋯" stays inside the card. */
.dy-list { grid-template-columns: minmax(0, 1fr); }
.dy-list > * { min-width: 0; }
.dy-card { min-width: 0; overflow-wrap: anywhere; }
.dy-menu-wrap { margin: -4px -6px -4px 0; }
.dy-col { grid-template-columns: minmax(0, 1fr); }
.inbox-tabs .tab.active .tab-count { background: var(--y-card); color: var(--y-text); }
/* A new message slides in without starting invisible (a background tab may not run the animation). */
@keyframes bubble-in { from { transform: translateY(4px); } to { transform: none; } }
.bubble { animation-name: bubble-in; }
/* Day plan: choosing several jobs; each lorry's sent state and its own Send. */
.dy-pick { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #1c1d1f; }
.dy-card.picked { background: #fffbeb; box-shadow: inset 3px 0 0 var(--y-text); }
.dy-choose { margin-left: auto; font-size: 14px; }
.dy-pickbar { position: sticky; bottom: -32px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin: 4px -40px -48px; padding: 14px 40px calc(14px + env(safe-area-inset-bottom)); background: #232426; color: #fff; }
.dy-pickbar strong { font-size: 16px; }
.dy-pickbar-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dy-pickbar .y-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.dy-pickbar .y-btn:hover:not(:disabled) { border-color: #fff; }
.dy-pickbar .y-btn:disabled { opacity: 0.4; }
.dy-sentline { margin: 2px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--y-muted); }
.dy-sent-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--y-ok); }
.dy-sendone { margin-left: auto; padding: 5px 12px; font-size: 13px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .dy-card.picked { background: #2a2618; } }
@media (max-width: 1200px) and (min-width: 761px) { .dy-pickbar { margin: 4px -24px -40px; padding-left: 24px; padding-right: 24px; } }
@media (max-width: 760px) {
  .dy-pickbar { margin: 4px -16px -32px; padding: 12px 16px; }
  .dy-pickbar-acts .y-btn { flex: 1 1 auto; }
}
.mn-on-target { color: var(--y-ok); font-weight: 600; }
.mn-target-link { justify-self: start; margin-top: 4px; font-size: 13px; }
.mn-target { display: grid; gap: 8px; margin-top: 8px; }
.mn-target .st-field { margin: 0; }
.mn-target-row { display: flex; align-items: center; gap: 6px; }
.mn-target-row input { width: 80px; }
.mn-target-acts { display: flex; gap: 8px; }
/* Customers: money and counts right-aligned; who owes in red only for the late part. */
.contacts-table th.num, .contacts-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.contacts-table .cell-stack { display: grid; line-height: 1.3; min-width: 0; }
.contacts-table .cell-stack small { font-size: 12px; }
.contacts-table td.c-owes small { display: block; font-weight: 600; }
/* A field the server refused (markFieldError): the message above it, a red bar beside it. */
[data-error] { position: relative; border-left: 4px solid var(--y-bad); padding-left: 12px !important; }
[data-error]::before { content: attr(data-error); display: block; margin-bottom: 4px; color: var(--y-bad); font-size: 14px; font-weight: 600; white-space: normal; }
[data-error-input] { border-color: var(--y-bad) !important; border-width: 2px !important; }

/* ---- New booking (src/public/new-booking.js): the call in order on the left, the booking to read out on the right ---- */
.nb-new { text-decoration: none; gap: 6px; }
.bk2-title, .nb-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; width: 100%; }
.td-tools { display: flex; align-items: center; gap: 10px; }
.cc-book { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 2px 0; font-size: 13px; font-weight: 600; color: var(--y-text); text-decoration: none; border: 1px solid var(--y-line); border-radius: 999px; padding: 5px 11px; }
.cc-book:hover { border-color: var(--y-text); }
.nb-head { display: grid; gap: 6px; }
.nb-back { display: inline-flex; align-items: center; gap: 2px; justify-self: start; min-height: 32px; font-size: 14px; font-weight: 600; color: var(--y-text-2); text-decoration: none; }
.nb-back:hover { color: var(--y-text); }
.nb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.nb-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.nb-sec { padding: 20px 22px 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; overflow: visible; min-width: 0; }
.y-card.nb-sec > h2, .y-card.nb-sum > h2 { margin: 0; padding: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.nb-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--y-todo-bg); color: var(--y-text-2); font-size: 13px; font-weight: 700; }
.nb-sec .st-field > span:first-child { font-size: 14px; font-weight: 600; color: var(--y-text-2); }
.nb-sec .st-field small { color: var(--y-muted); font-weight: 400; }
.nb-sec input:not([type='checkbox']):not([type='radio']), .nb-sec select, .nb-sec textarea { font-size: 15px; min-height: 42px; }
.nb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nb-row-pc { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); align-items: end; }
.nb-pc { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--y-ok); min-height: 20px; }
.nb-pc.bad { color: var(--y-bad); font-weight: 600; }
.nb-came { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; font-weight: 600; color: var(--y-text-2); }
.nb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.nb-opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nb-opts.sizes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.nb-opt { position: relative; display: grid; gap: 3px; align-content: start; padding: 12px 14px; border: 1px solid var(--y-line); border-radius: 12px; background: var(--y-card); cursor: pointer; font-weight: 400; color: var(--y-text); }
.nb-opt:hover { border-color: var(--y-text-2); }
.nb-opt input { position: absolute; opacity: 0; pointer-events: none; }
.nb-opt strong { font-size: 15px; font-weight: 600; }
.nb-opt small { font-size: 13px; color: var(--y-muted); line-height: 1.35; }
.nb-opt .nb-price { font-size: 14px; font-weight: 600; color: var(--y-text-2); }
.nb-opt.on { border: 2px solid var(--y-text); padding: 11px 13px; background: var(--y-sunk); }
.nb-opt.off { opacity: 0.5; cursor: default; }
.nb-opt:has(input:focus-visible) { outline: 3px solid var(--y-text); outline-offset: 2px; }
.nb-hire { max-width: 420px; }
.nb-extras { gap: 8px; }
.nb-extra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--y-line-soft); font-size: 15px; font-weight: 400; color: var(--y-text); }
.nb-extra small { color: var(--y-muted); font-size: 13px; }
.nb-step-qty { display: inline-flex; align-items: center; gap: 8px; }
.nb-step-qty .y-btn { width: 36px; height: 36px; padding: 0; font-size: 18px; border-radius: 10px; }
.nb-step-qty b { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.nb-refused { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--y-text-2); }
.nb-refused > span { margin-right: 4px; }
.nb-refused .y-btn, .nb-chips .y-btn { font-size: 13px; font-weight: 500; padding: 6px 11px; border-radius: 999px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nb-chips .y-btn.on { background: var(--y-text); border-color: var(--y-text); color: var(--y-card); }
.nb-refused .y-btn.on.bad { background: var(--y-bad-bg); border-color: var(--y-bad); color: var(--y-bad); }
.nb-q { display: grid; gap: 6px; font-size: 14px; color: var(--y-text-2); }
.nb-more { display: grid; gap: 12px; }
.nb-more > summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--y-text-2); min-height: 28px; }
.nb-more > summary small { font-weight: 400; color: var(--y-muted); }
.nb-more[open] > summary { margin-bottom: 10px; }
.nb-tick { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; color: var(--y-text); cursor: pointer; }
.nb-tick input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--y-text); }
.nb-tick > span { display: grid; gap: 2px; flex: 1 1 0; min-width: 0; } /* beside its box, also when an error line sits above */
.nb-tick[data-error] { flex-wrap: wrap; row-gap: 6px; }
.nb-tick[data-error]::before { flex-basis: 100%; margin-bottom: 0; }
.nb-tick.off { cursor: default; color: var(--y-muted); }
.nb-tick small { font-size: 13px; font-weight: 400; color: var(--y-muted); line-height: 1.4; }
.nb-known { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--y-sunk); border: 1px solid var(--y-line-soft); }
.nb-known.late { border-color: var(--y-bad); }
.nb-known > p { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--y-text-2); line-height: 1.4; }
.nb-known > p strong { color: var(--y-text); margin-right: 4px; }
.nb-waiting { display: grid; gap: 6px; }
.nb-waiting p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--y-soon); font-weight: 600; }
.nb-waiting p svg { flex: none; margin-top: 1px; }
.nb-waiting a { color: var(--y-text); }
.nb-places { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--y-muted); }
.nb-places .y-btn { font-size: 13px; font-weight: 500; padding: 6px 10px; }
.nb-cal { gap: 8px; }
.nb-day { list-style: none; margin: -4px 0 0; padding: 0; display: grid; gap: 6px; }
.nb-day li, .nb-warn li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.nb-day li svg, .nb-warn li svg { flex: none; margin-top: 1px; }
.nb-day .bad, .nb-warn .bad { color: var(--y-bad); font-weight: 600; }
.nb-day .soon, .nb-warn .soon { color: var(--y-soon); font-weight: 600; }
.nb-day .info { color: var(--y-text-2); }
.nb-side { position: sticky; top: 16px; min-width: 0; }
.nb-sum { padding: 18px 20px 20px; display: grid; gap: 14px; }
.nb-facts { margin: 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 10px; font-size: 14px; }
.nb-facts dt { color: var(--y-muted); }
.nb-facts dd { margin: 0; display: grid; gap: 1px; color: var(--y-text); font-weight: 500; overflow-wrap: anywhere; }
.nb-facts dd small { color: var(--y-muted); font-weight: 400; font-size: 13px; }
.nb-lines { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--y-line); font-size: 14px; }
.nb-lines > div { display: flex; justify-content: space-between; gap: 12px; }
.nb-lines b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-lines .nb-total { padding-top: 8px; border-top: 1px solid var(--y-line-soft); font-size: 17px; font-weight: 700; }
.nb-lines .nb-total b { font-weight: 700; }
.nb-lines .nb-total small { font-size: 12px; font-weight: 400; color: var(--y-muted); }
.nb-warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nb-book { width: 100%; font-size: 16px; font-weight: 700; padding: 13px; border-radius: 12px; }
.nb-small { margin: -4px 0 0; font-size: 13px; color: var(--y-muted); line-height: 1.4; }
.nb-note.bad { color: var(--y-bad); font-weight: 600; margin: 0; }
.nb-bar { display: none; }
@media (max-width: 1100px) {
  .nb-grid { grid-template-columns: minmax(0, 1fr); }
  .nb-side { position: static; }
}
@media (max-width: 760px) {
  .nb-sec { padding: 16px; }
  .nb-row, .nb-row-pc, .nb-opts.two { grid-template-columns: minmax(0, 1fr); }
  .nb-pc { margin: -6px 0 0; }
  .nb-sec input:not([type='checkbox']):not([type='radio']), .nb-sec select, .nb-sec textarea { font-size: 16px; min-height: 44px; }
  .nb-opts.sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-step-qty .y-btn { width: 44px; height: 44px; }
  .nb-refused .y-btn, .nb-chips .y-btn, .nb-places .y-btn { min-height: 44px; }
  .nb-came .y-seg { width: 100%; }
  .nb-came .y-seg button { flex: 1; padding: 10px 4px; white-space: normal; line-height: 1.25; min-width: 0; }
  .nb-sum .nb-book, .nb-sum .nb-small { display: none; }
  .nb-bar { position: sticky; bottom: -32px; z-index: 5; display: flex; align-items: center; gap: 12px; margin: 4px -16px -32px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--y-card); border-top: 1px solid var(--y-line); }
  .nb-bar > span { flex: 1; font-size: 14px; color: var(--y-text-2); }
  .nb-bar > span b { color: var(--y-text); font-size: 17px; margin-right: 4px; }
  .nb-bar .y-btn.primary { font-size: 16px; font-weight: 700; padding: 12px 24px; border-radius: 12px; min-height: 48px; }
  .td-tools { width: 100%; }
  .td-tools .nb-new { width: 100%; min-height: 44px; }
  .bk2-title .nb-new { min-height: 40px; }
}
@media (prefers-color-scheme: dark) {
  .nb-opt.on { background: #24262a; }
  .nb-known { background: #1d1f22; }
}

/* ---- Not switched on yet (a firm still setting up), and Getting started's "Switch on" step ---- */
.not-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 24px 0; padding: 12px 16px; background: var(--y-card); border: 1px solid var(--y-line); border-radius: 12px; font-size: 14px; color: var(--y-text-2); }
.not-live > span { flex: 1 1 320px; min-width: 0; }
.not-live strong { color: var(--y-text); }
.not-live > .icon { flex: none; color: var(--y-muted); }
@media (max-width: 760px) { .not-live { margin: 10px 12px 0; } }
.gs-switch { display: grid; gap: 10px; padding: 20px; border-radius: 16px; scroll-margin-top: 16px; }
.gs-switch h3 { margin: 0; font-size: 17px; font-weight: 600; }
.gs-switch h4 { margin: 10px 0 0; font-size: 15px; font-weight: 600; }
.gs-switch p { margin: 0; max-width: 720px; }
.gs-switch-ok { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--y-text-2); }
.gs-switch-ok > .icon { flex: none; color: var(--y-ok); margin-top: 1px; }
.gs-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gs-plan { display: grid; gap: 2px; padding: 14px; border: 1.5px solid var(--y-line); border-radius: 12px; cursor: pointer; position: relative; }
.gs-plan input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; margin: 0; }
.gs-plan.on { border-color: var(--y-text); }
.gs-plan strong { font-size: 16px; }
.gs-plan-price { font-size: 15px; font-weight: 600; }
.gs-plan small { color: var(--y-muted); font-size: 13px; line-height: 1.4; margin-top: 4px; }
.gs-how { display: grid; gap: 6px; }
.gs-switch-go { margin-top: 8px; }
.gs-switch button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* What was asked, as label and value side by side (the console's .facts). */
.gs-switch .facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.gs-switch .facts dt { color: var(--y-muted); }
.gs-switch .facts dd { margin: 0; }
/* The day you switch, chosen in the step itself (the same save as the checklist's). */
.gs-switch-day { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-switch-day input[type='date'] { width: auto; }
/* Your plan: why an invoice was cancelled, under its status. */
.invoices-table small.block { display: block; margin-top: 4px; max-width: 340px; line-height: 1.4; }
@media (max-width: 760px) { .gs-plans { grid-template-columns: 1fr; } }
/* Done for you (src/public/done-for-you.js): moving in, the website set up */
.dfy { display: grid; gap: 8px; padding: 18px 20px; border-radius: 16px; scroll-margin-top: 16px; }
.dfy p { margin: 0; max-width: 720px; }
.dfy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.dfy-head h4 { margin: 0; font-size: 16px; font-weight: 600; }
.dfy .btn { justify-self: start; }
.dfy .row { flex-wrap: wrap; }
.dfy-asked { display: flex; align-items: flex-start; gap: 8px; color: var(--y-text-2); }
.dfy-asked > .icon { flex: none; margin-top: 1px; }
.gs-stage > .dfy-compact { margin: 0 20px 14px; border: 1px solid var(--y-line-soft); box-shadow: none; }
.dfy-list { display: grid; gap: 12px; }
@media (max-width: 760px) { .gs-stage > .dfy-compact { margin: 0 16px 12px; } }
/* Day plan with many lorries: To plan on the left with its own scroll, in lists that fold, the jobs not on a lorry in
   groups; a strip of every lorry above the board; jobs in two lines with the kind as a coloured badge. */
.dy-work { display: grid; grid-template-columns: 284px minmax(0, 1fr); gap: 16px; align-items: start; }
.dy-work > .dy-side { position: sticky; top: -20px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.dy-work > .dy-board { grid-auto-columns: minmax(236px, 1fr); gap: 12px; }
@media (max-width: 1100px) { .dy-work { grid-template-columns: 264px minmax(0, 1fr); } }
/* A tablet held upright: To plan above the lorries, its jobs side by side. */
@media (max-width: 900px) and (min-width: 761px) {
  .dy-work { grid-template-columns: minmax(0, 1fr); }
  .dy-work > .dy-side { position: static; max-height: none; overflow: visible; }
  .dy-work .dy-side .dy-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
.dy-col-head { grid-template-columns: minmax(0, 1fr); }
.dy-work .dy-run .dy-col-head { padding: 12px 12px 10px; }
.dy-lorry > .dy-driver { min-width: 0; width: 100%; }
.dy-work .dy-driver { font-size: 14px; }
.dy-work .dy-run .dy-offbtn { width: 30px; }
.dy-side { gap: 12px; }
.dy-side .dy-col-head h2 { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dy-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--y-todo-bg); color: var(--y-text-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.dy-side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dy-kindsel { flex: 0 1 auto; width: auto; min-width: 0; max-width: 60%; height: 32px; margin: 0; padding: 0 26px 0 10px; border: 1px solid var(--y-control); border-radius: 8px; background-color: var(--y-card); font: inherit; font-size: 13px; color: var(--y-text); }
.dy-search { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid var(--y-control); border-radius: 10px; background: var(--y-card); color: var(--y-muted); }
.dy-search:focus-within { border-color: var(--y-text); }
.dy-search input { flex: 1; min-width: 0; height: 38px; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--y-text); box-shadow: none; }
.dy-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.dy-kinds button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; border: 1px solid var(--y-control); border-radius: 999px; background: var(--y-card); font: inherit; font-size: 13px; color: var(--y-text-2); cursor: pointer; white-space: nowrap; }
.dy-kinds button:first-child { padding-left: 10px; }
.dy-kinds button:hover { border-color: var(--y-text); }
.dy-kinds button.on { background: var(--y-text); border-color: var(--y-text); color: var(--y-card); }
.dy-kinds button.on .dy-count { background: rgba(255, 255, 255, 0.2); color: inherit; }
.dy-kinds .dy-n { min-width: 18px; height: 18px; border-radius: 6px; }
.dy-sec { display: grid; gap: 8px; }
.dy-sec + .dy-sec { padding-top: 10px; border-top: 1px solid var(--y-line); }
.dy-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 30px; }
.dy-sec-btn { display: inline-flex; align-items: center; gap: 6px; flex: 1 0 auto; white-space: nowrap; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--y-text); text-align: left; cursor: pointer; }
.dy-sec-btn .icon { flex: none; color: var(--y-muted); }
.dy-sec-head.bad .dy-sec-btn { color: var(--y-bad); }
.dy-sec-head.bad .dy-count { background: var(--y-bad-bg); color: var(--y-bad); }
.dy-sec-act { flex: none; font-size: 13px; }
.dy-groupby { flex: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--y-todo-bg); }
.dy-groupby button { padding: 4px 9px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px; color: var(--y-text-2); cursor: pointer; white-space: nowrap; }
.dy-groupby button.on { background: var(--y-card); color: var(--y-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.dy-grp { display: grid; gap: 6px; }
.dy-grp + .dy-grp { margin-top: 4px; }
.dy-grp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--y-text-2); }
.dy-grp-head .dy-count { min-width: 18px; height: 18px; font-size: 11.5px; }
.dy-near { flex-basis: 100%; font-size: 12.5px; font-weight: 500; color: var(--y-ok); }
.dy-near.none { color: var(--y-muted); }
.dy-near .link { font: inherit; font-weight: 600; color: inherit; text-decoration-color: currentColor; }
.dy-nomatch { margin: 0; }
/* The kind of job as a badge: yellow delivery, dark collection, blue exchange, amber wait and load; its number in a run. */
.dy-n { min-width: 22px; height: 22px; margin: 0; padding: 0 5px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.dy-n.k-delivery { background: var(--y-yellow); color: #1c1d1f; }
.dy-n.k-collection { background: var(--y-text); color: var(--y-card); }
.dy-n.k-exchange { background: #2563eb; color: #fff; }
.dy-n.k-wait { background: var(--y-soon-bg); color: var(--y-soon); }
.dy-card { gap: 2px; padding: 10px 12px; }
.dy-side .dy-card { padding: 9px 8px 9px 10px; }
.dy-card .dy-card-top { align-items: flex-start; gap: 6px; }
.dy-card .dy-title { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 22px; }
.dy-card .dy-eta { line-height: 22px; }
.dy-card .dy-eta.small { font-size: 12.5px; font-weight: 600; color: var(--y-muted); }
.dy-card .dy-eta.small.bad { color: var(--y-bad); }
.dy-card .dy-where { padding-left: 28px; font-size: 13px; line-height: 1.4; color: var(--y-muted); }
.dy-card .dy-where b { margin: 0; font-weight: 600; color: var(--y-text); }
.dy-card .dy-where .icon { vertical-align: -1px; }
.dy-card .dy-tags, .dy-card .dy-put, .dy-due-actions, .dy-nd-foot { margin-left: 28px; }
.dy-card .dy-pick { margin: 2px 4px 0 2px; }
.dy-card.dim { opacity: 0.3; }
.dy-card.done.dim { opacity: 0.2; }
.y-btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.dy-due-actions { margin-top: 6px; gap: 6px; }
.dy-nd { gap: 6px; }
.dy-nd-main { display: grid; gap: 2px; }
.dy-nd-main .dy-card-top { display: flex; }
.dy-was { flex: none; font-size: 12.5px; line-height: 22px; color: var(--y-muted); }
.dy-nd-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dy-nd-foot .dy-why { min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dy-nd-actions { flex: none; }
.dy-tell { margin: 0; }
.dy-put .dy-menu-wrap { margin: 0; }
.dy-menu { max-height: min(60vh, 460px); overflow-y: auto; }
.dy-menu.up { top: auto; bottom: calc(100% + 6px); }
.dy-menu .dy-menu-back { color: var(--y-muted); font-weight: 600; }
.dy-pickput .dy-menu { left: 0; right: auto; min-width: 280px; }
.dy-pickput { margin: 0; }
/* The strip of lorries: a click shows a lorry's run, a job dropped on one goes at the end of it. */
.dy-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.dy-chip { display: grid; gap: 1px; min-width: 96px; padding: 6px 10px; border: 1px solid var(--y-line); border-radius: 10px; background: var(--y-card); font: inherit; text-align: left; color: var(--y-text); cursor: pointer; }
.dy-chip:hover { border-color: var(--y-control); }
.dy-chip.over { border-color: var(--y-text); box-shadow: 0 0 0 3px var(--y-yellow); }
.dy-chip.down { background: var(--y-sunk); }
.dy-chip-top { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.dy-chip-top b { font-weight: 700; }
.dy-chip-top span:not(.dy-dot) { color: var(--y-text-2); }
.dy-chip-top em { font-style: normal; color: var(--y-soon); }
.dy-chip-top .dy-dot { margin-left: auto; }
.dy-chip-sub { font-size: 12px; color: var(--y-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dy-chip.down .dy-chip-sub { color: var(--y-bad); }
.dy-dot.warn { background: var(--y-soon); }
.dy-run.flash { animation: dy-flash 1.3s ease-out; }
@keyframes dy-flash { from { box-shadow: 0 0 0 4px var(--y-yellow); } to { box-shadow: 0 0 0 4px transparent; } }
@media (max-width: 760px) {
  .dy-search input { height: 42px; font-size: 16px; }
  .dy-put .y-btn { min-height: 40px; }
}
/* The save bar on every settings page: Discard and Save; when the page is being left, it asks there. */
.st-savebar { flex-wrap: wrap; }
.st-savebar .row { flex-wrap: wrap; gap: 8px; }
.st-savebar.asking { box-shadow: 0 0 0 3px var(--y-yellow), 0 14px 40px rgba(17, 19, 21, 0.25); }
/* Bookings: "Cancel this booking" under a confirmed booking's actions; the refund it offers. */
.bk2-copy.danger-text { color: var(--y-bad); text-decoration-color: currentColor; }
.field-row.check { display: flex; align-items: flex-start; gap: 10px; }
.field-row.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--y-text); }
.field-row.check small { display: block; margin-top: 2px; }

/* Extra minutes (settings.js ExtraMinutes): the firm's own choice, under the minutes meter. */
.extra-minutes { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.extra-minutes .extra-form { display: grid; gap: 8px; margin-top: 4px; }
.extra-minutes .extra-form input[type=number] { max-width: 140px; }
.plan-minutes .minutes-fair { margin: 12px 0 0; line-height: 1.45; }
.blocked-list { list-style: none; margin: 8px 0 0; padding: 0; }
.blocked-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.block-number { margin-top: 4px; }

/* A short explanation behind a small (i) (lib.js Tip): shown on hover or keyboard focus. */
.y-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 3px;
  border: 1px solid var(--y-line-2, #cfd0cc); border-radius: 50%; color: var(--y-muted); font-size: 10px; font-weight: 700; font-style: normal; line-height: 1;
  vertical-align: 1px; cursor: help; }
.y-tip::before { content: 'i'; }
.y-tip:hover, .y-tip:focus { color: var(--y-text); border-color: var(--y-text); outline: none; }
.y-tip:hover::after, .y-tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 280px; padding: 8px 10px; border-radius: 8px; background: #1d1f21; color: #fff; font-size: 12.5px; font-weight: 500;
  line-height: 1.45; text-align: left; white-space: normal; z-index: 60; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
/* A row of figures on a computer: every tile in one row, the same width, however many there are. */
@media (min-width: 1100px) {
  .mn-kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}
.ov-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--y-text); text-decoration: none; }
.ov-more:hover { text-decoration: underline; }
/* The action on a row of a list (Today, Money's notes): one width for them all on a computer, so they line up. */
@media (min-width: 761px) {
  .y-row > .y-btn, .y-row > a.y-btn { min-width: 136px; justify-content: center; flex: none; }
}
@media (max-width: 760px) {
  /* On a phone the tip opens on a tap, as a box above the bottom bar, whatever side of the screen its (i) is on. */
  .y-tip:hover::after, .y-tip:focus::after { position: fixed; left: 16px; right: 16px; bottom: 88px; top: auto; transform: none; width: auto; max-width: none; }
  /* Two tiles a row: an odd one out takes the whole row. */
  .mn-kpis > .mn-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---- One layout for every page (the owner, 26 November 2026) ------------------------------------------------------
   Every page starts at the same left edge as Today: Settings, kept to a width in the middle, left a wide gap on its left. */
.settings, .page.narrow { margin-left: 0; margin-right: 0; }
/* Settings uses the width of the screen (the owner: a wide empty strip on its right): its menu, then the page up to a
   comfortable reading width for forms. */
.settings { max-width: 1480px; }

/* ---- The guides (tour.js): the page dimmed, one thing lit up, a short note beside it -------------------------------- */
.tour-veil { position: fixed; inset: 0; z-index: 1000; }
.tour-veil.dim { background: rgba(17, 19, 21, 0.55); }
.tour-hole { position: fixed; z-index: 1001; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(17, 19, 21, 0.55);
  outline: 2px solid var(--y-yellow); outline-offset: 0; transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease; }
.tour-pop { position: fixed; z-index: 1002; display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; background: var(--y-card); color: var(--y-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24); }
.tour-count { font-size: 12px; font-weight: 600; color: var(--y-muted); }
.tour-pop h3 { margin: 0; font-size: 17px; font-weight: 700; }
.tour-pop p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--y-text-2); }
.tour-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tour-acts > span { display: flex; gap: 8px; }
.tour-acts .y-btn { min-width: 76px; justify-content: center; }
.tour-skip { font-size: 13px; color: var(--y-muted); }
.tour-dots { display: flex; gap: 5px; margin-top: 4px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--y-line); }
.tour-dots i.on { background: var(--y-text); }
.tour-pop.center { padding: 22px 24px; }
.tour-pop.center h3 { font-size: 21px; }
/* A task: the page stays usable; the light pulses on what to press, and the note says it is their turn. */
.tour-hole.task { box-shadow: 0 0 0 9999px rgba(17, 19, 21, 0.28); animation: tour-pulse 1.6s ease-in-out infinite; }
@keyframes tour-pulse { 0%, 100% { outline-color: var(--y-yellow); } 50% { outline-color: rgba(245, 196, 0, 0.35); } }
.tour-pop.task { border: 2px solid var(--y-yellow); }
.tour-turn { color: var(--y-soon); }
.tour-did { color: var(--y-ok); }
/* "Guide to this page", at the foot of the sidebar. */
.side-guide { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; background: transparent; color: var(--y-side-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.side-guide:hover { background: var(--y-side-active); }

/* ---- One look for the same thing on every page (the owner, 26 November 2026) -----------------------------------------
   The office has two generations of buttons and chips (.btn/.chip from app.css, .y-btn/.y-chip): they now match. */
.btn { font-size: 14px; padding: 10px 16px; }
.btn.small, .y-btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
/* A chip you press is a filter: white with an edge, dark when it is on; one that only says something is tinted. */
button.chip { cursor: pointer; border: 1px solid var(--y-control); background: var(--y-card); color: var(--y-text); font-size: 13px; padding: 6px 12px; }
button.chip:hover:not(:disabled) { border-color: var(--y-text); }
button.chip:disabled { opacity: 0.5; cursor: default; }
button.chip b { font-weight: 600; color: var(--y-muted); margin-left: 2px; }
button.chip.warn-chip { background: var(--y-soon-bg); border-color: transparent; color: var(--y-soon); }
button.chip.on, button.chip.on:hover:not(:disabled) { background: var(--y-text); border-color: var(--y-text); color: var(--y-card); }
button.chip.on b { color: inherit; }
span.chip { font-size: 13px; padding: 4px 10px; }
.chip.warn-chip { background: var(--y-soon-bg); color: var(--y-soon); }
.chip.red-chip, .chip.bad-chip { background: var(--y-bad-bg); color: var(--y-bad); }
.chip.ok-chip, .chip.green { background: var(--y-ok-bg); color: var(--y-ok); }
/* The heading of a card or of a group on a page: one size everywhere. */
.y-card-head h2, .st-card > h2, .pw-group > h2, .mn-insights > h2, .y-card > h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
/* Messages: its tabs look like every other page's tabs (a grey bar, the open one white). */
.inbox-tabs { display: flex; gap: 2px; background: #e9e9e5; border-radius: 10px; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.inbox-tabs .tab { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; font-size: 13px; padding: 6px 7px; border-radius: 8px; color: var(--y-text-2); }
.inbox-tabs .tab.active, .inbox-tabs .tab.active:hover { background: var(--y-card); color: var(--y-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.inbox-tabs .tab.active .tab-count { background: var(--y-text); color: var(--y-card); }
@media (prefers-color-scheme: dark) {
  .inbox-tabs { background: #2a2c2f; }
}

/* ---- The Download menu of a list (export-menu.js): a spreadsheet or CSV, at the right of the page's tab row ----
   Bookings, Customers, Money and Paperwork, Road permits put it there; Paperwork, Loads at the right of its period
   chips. The menu keeps the look of app.css's .ld-dl, which it took over from Loads. */
.xm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; width: 100%; min-width: 0; }
.xm-bar > .y-seg { min-width: 0; }
.xm { margin-left: auto; flex: none; }
.xm > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.xm[open] > summary { border-color: var(--y-text); }
.xm-menu { gap: 0; }
.xm-group + .xm-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--y-line-soft); }
.xm-head { display: block; padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--y-muted); }
@media (max-width: 760px) {
  .xm-bar > .y-seg { flex: 1 1 100%; }
  .xm-menu a { min-height: 44px; align-items: center; }
}

/* Settings: fewer words. A (i) tip inside a row whose spans are laid out as grids stays in its line; a WhatsApp
   template's name and words fold under a summary (notify-setup.js). */
.nt-head .y-tip { display: inline-flex; }
.nt-tpl-more > summary { width: max-content; max-width: 100%; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--y-muted); }
.nt-tpl-more > summary:hover { color: var(--y-text); }
.nt-tpl-body { display: grid; gap: 8px; margin-top: 8px; }
/* Settings: the reminder days under Getting paid (setup.js) keep their boxes in one line, however their labels wrap. */
@supports (grid-template-rows: subgrid) {
  .st-chase-days > .st-field { grid-row: span 3; grid-template-rows: subgrid; row-gap: 5px; }
}

/* Results reads from the top down: the day, the week, then the questions (the owner: two columns side by side drew the
   eye both ways). */
.wk-ask { display: grid; gap: 10px; }
.wk-ask > h2 { margin: 0; font-size: 17px; font-weight: 650; }

/* Settings' menu scrolls on its own (the owner: it only moved with the whole page). It stays in view, as tall as the
   window, and scrolling it does not move the page behind it. */
@media (min-width: 761px) {
  .st-side { top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 8px; }
}

/* ---- Practising on a pretend booking (src/public/practice.js, src/righto/practice.mjs) -------------------------------
   A practice booking is marked by a dashed outline, not a colour: it is none of the things the colours say. Its label on
   the booking's row, card and panel and on its job on the day plan; the note on its panel; the offers on an empty office
   (Today, Bookings) and Getting started's card. While a lesson's task is on, what the task opens (Edit booking, Extend
   hire, a job's menu) sits above the lesson's shade, under its note. */
.y-chip.pr-chip, .dy-tag.pr-tag { background: transparent; color: var(--y-text); border: 1.5px dashed var(--y-muted); }
.y-chip.pr-chip { padding: 3px 9px; }
.pr-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; padding: 10px 12px; border: 1.5px dashed var(--y-control);
  border-radius: 10px; background: var(--y-sunk); color: var(--y-text); font-size: 14px; }
.pr-note > span:not(.y-chip) { flex: 1 1 220px; min-width: 0; }
.pr-note .y-btn { flex: none; padding: 6px 12px; font-size: 13px; }
.pr-empty { display: grid; justify-items: center; gap: 10px; max-width: 460px; margin: 6px auto 0; text-align: center; }
.pr-empty p { margin: 0; }
.td-practice { justify-items: start; text-align: left; max-width: none; margin: 0; padding: 16px 20px 20px; border-top: 1px solid var(--y-line-soft); }
.td-practice p { font-size: 14px; color: var(--y-muted); }
.td-practice strong { color: var(--y-text); }
.pr-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border: 1.5px dashed var(--y-control); }
.pr-card > div { flex: 1 1 280px; min-width: 0; display: grid; gap: 3px; }
.pr-card strong { font-size: 16px; font-weight: 650; }
.pr-card small { font-size: 14px; color: var(--y-muted); }
.pr-card-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--y-todo-bg); color: var(--y-text); }
body:has(.tour.task) :is(.modal-bg, .dy-menu, .dy-put .menu, .toasts) { z-index: 1002; }
/* ...and the task's note moves to the top of the screen while that dialog is open, so it never covers the dialog: beside
   it on a wide screen; above it on a narrower one, the dialog starting below the note. */
body:has(.modal-bg) .tour-pop.task { top: 12px !important; bottom: auto !important; left: auto !important; right: 12px !important; }
@media (max-width: 1199px) {
  body:has(.modal-bg) .tour-pop.task { right: auto !important; left: 50% !important; transform: translateX(-50%); }
  body:has(.modal-bg) .tour-pop.task .tour-dots { display: none; }
  body:has(.tour-pop.task) .modal-bg { padding-top: 176px; }
  body:has(.tour-pop.task) .modal { max-height: calc(100vh - 192px); }
}
@media (max-width: 760px) {
  .pr-card .y-btn { width: 100%; }
}

/* ---- Offer another date or size (offer-change.js, src/righto/offers.mjs) ----
   On the booking's panel: the offer waiting for the customer (amber), their yes waiting for the office (amber), or their
   no, no answer or "gone" (red), with its few buttons. The form: the days of the next three weeks as a grid of buttons,
   the free ones to choose and the others greyed with why under the number, as the AI and the website go by. */
.oc-note { display: grid; gap: 6px; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--y-soon-bg); color: var(--y-text); font-size: 14px; }
.oc-note.bad { background: var(--y-bad-bg); }
.oc-note.ok { background: var(--y-ok-bg); }
.oc-note-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.oc-note-head .icon { flex: none; color: var(--y-soon); }
.oc-note.bad .oc-note-head .icon { color: var(--y-bad); }
.oc-note.ok .oc-note-head .icon { color: var(--y-ok); }
.oc-note p { margin: 0; }
.oc-note-what b { font-weight: 650; }
.oc-note-small { font-size: 13.5px; color: var(--y-text-2); }
.oc-note-small.bad { color: var(--y-bad); font-weight: 600; }
.oc-note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.oc-note-actions .y-btn { padding: 8px 12px; border-radius: 10px; }
.oc-form { display: grid; gap: 12px; }
.oc-form .bk-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--y-text-2); }
.oc-asked { margin: 0; }
.oc-asked b { color: var(--y-text); font-weight: 600; }
.oc-form .bk-form { margin: 0; }
.oc-day { display: grid; gap: 8px; }
.oc-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oc-turn { display: flex; gap: 4px; }
.oc-turn .y-btn { padding: 6px 10px; font-size: 13px; }
.oc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.oc-dayb { display: grid; justify-items: center; gap: 1px; min-height: 64px; padding: 6px 2px; border: 1.5px solid var(--y-line); border-radius: 10px; background: var(--y-card); color: var(--y-text); font: inherit; cursor: pointer; }
.oc-dayb .oc-wd { font-size: 12px; color: var(--y-muted); }
.oc-dayb strong { font-size: 17px; font-weight: 650; line-height: 1.2; }
.oc-dayb small { min-height: 15px; font-size: 11.5px; line-height: 1.25; color: var(--y-muted); text-align: center; }
.oc-dayb.free:hover { border-color: var(--y-text); }
.oc-dayb.off { cursor: default; background: var(--y-sunk); color: var(--y-faint); border-style: dashed; }
.oc-dayb.off small { color: var(--y-bad); }
.oc-dayb.booked { border-color: var(--y-control); }
.oc-dayb.booked small { color: var(--y-text-2); }
.oc-dayb.on { border-color: var(--y-text); background: var(--y-text); color: var(--y-card); }
.oc-dayb.on .oc-wd, .oc-dayb.on small { color: var(--y-card); }
.oc-win { display: grid; gap: 8px; }
.oc-win .y-seg { flex-wrap: wrap; }
.oc-money { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.oc-money .icon { flex: none; margin-top: 2px; color: var(--y-muted); }
.oc-how { margin: 0; }
@media (max-width: 760px) {
  .oc-days { gap: 4px; }
  .oc-dayb { min-height: 58px; padding: 5px 1px; }
  .oc-dayb small { font-size: 10.5px; }
  .oc-note-actions .y-btn { min-height: 44px; }
}

/* ---- The Help (help.js): ask how anything works; the answer as steps, an example, a picture of the screen, Show me -----
   Help sits at the foot of the menu, above Guide to this page and with its look; on a phone the (i) in the yellow bar
   opens it. The panel slides in from the right on a computer and fills the screen on a phone. */
.side-help { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px; background: transparent; color: var(--y-side-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.side-help:hover { background: var(--y-side-active); }
.side-help:focus-visible { outline-color: var(--y-yellow); }
@media (max-width: 1200px) and (min-width: 761px) {
  .side-help { justify-content: center; padding: 10px 0; }
  .side-help span { display: none; }
}
.hp-wrap { position: fixed; inset: 0; z-index: 70; }
.hp-bg { position: absolute; inset: 0; background: rgba(17, 19, 21, 0.28); animation: hp-fade 0.18s ease; }
.hp { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column; background: var(--y-bg); color: var(--y-text);
  border-left: 1px solid var(--y-line); box-shadow: -18px 0 48px rgba(17, 19, 21, 0.18); animation: hp-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes hp-in { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hp-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hp, .hp-bg { animation: none; } }
.hp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 20px; background: var(--y-card); border-bottom: 1px solid var(--y-line); }
.hp-head h2 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.hp-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--y-text); color: var(--y-card); }
.hp-new { font-size: 13.5px; }
.hp-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--y-muted); cursor: pointer; }
.hp-close:hover { background: var(--y-todo-bg); color: var(--y-text); }
.hp-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 24px; display: grid; align-content: start; gap: 14px; }
.hp-intro { display: grid; gap: 14px; }
.hp-intro > p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--y-text-2); }
.hp-guide { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--y-line); border-radius: 12px; background: var(--y-card);
  color: var(--y-text); font: inherit; text-align: left; cursor: pointer; }
.hp-guide:hover { border-color: var(--y-text); }
.hp-guide > .icon { flex: none; color: var(--y-muted); }
.hp-guide strong, .hp-guide small { display: block; }
.hp-guide strong { font-size: 14.5px; }
.hp-guide small { margin-top: 2px; color: var(--y-muted); font-size: 13px; }
.hp-try { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-try > span { width: 100%; }
.hp-try button.chip { max-width: 100%; text-align: left; white-space: normal; line-height: 1.35; }
.hp-talk { display: grid; gap: 12px; }
.hp-turn { scroll-margin-top: 14px; }
.hp-talk:empty { display: none; }
.hp-q { justify-self: end; max-width: 85%; margin: 0; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--y-text); color: var(--y-card);
  font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.hp-a { display: grid; gap: 14px; min-width: 0; padding: 16px; border: 1px solid var(--y-line); border-radius: 14px; background: var(--y-card); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.hp-text p { margin: 0; }
.hp-text p + p { margin-top: 8px; }
.hp-steps { list-style: none; counter-reset: hp-step; display: grid; gap: 10px; margin: 0; padding: 0; }
.hp-steps li { counter-increment: hp-step; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.hp-steps li::before { content: counter(hp-step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--y-text); color: var(--y-card);
  font-size: 13px; font-weight: 700; line-height: 1; }
.hp-example { padding: 12px 14px; border-radius: 12px; background: var(--y-todo-bg); border-left: 3px solid var(--y-control); }
.hp-example p { margin: 0; }
.hp-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--y-muted); }
.hp-shot { display: grid; gap: 6px; margin: 0; }
.hp-shot-open { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--y-line); border-radius: 10px; overflow: hidden; background: var(--y-bg); cursor: zoom-in; }
.hp-shot-open:hover { border-color: var(--y-text); }
.hp-shot img { display: block; width: 100%; height: auto; max-height: 380px; object-fit: contain; }
.hp-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(17, 19, 21, 0.72); color: #fff; }
.hp-shot figcaption { font-size: 12.5px; line-height: 1.4; color: var(--y-muted); }
.hp-show { justify-self: start; }
.hp-wait { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--y-muted); font-size: 14px; }
.hp-guide-link { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.hp-ask { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--y-card); border-top: 1px solid var(--y-line); }
.hp-ask input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--y-control); border-radius: 10px; background: var(--y-card); color: var(--y-text); font: inherit; font-size: 15px; }
.hp-ask input:focus { border-color: var(--y-text); }
.hp-ask .y-btn { min-width: 76px; }
@media (max-width: 760px) {
  .hp { width: 100%; border-left: 0; box-shadow: none; animation: none; }
  .hp-bg { display: none; }
  .hp-head { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; }
  .hp-body { padding: 16px 16px 20px; }
  .hp-ask input { font-size: 16px; }
}
/* A row with two buttons: the row's click is the first one's; the second is pressed only on itself. */
.y-row .y-btn + .y-btn::after { content: none; }
.y-row .y-btn + .y-btn { position: relative; z-index: 1; }
