:root {
  --bg: #f5f7fa; --surface: #fff; --surface-2: #edf1f6; --ink: #172435; --ink-2: #46546a; --muted: #5b687a;
  --line: #dce2ea; --control-line: #7b8799; --accent: #1d4ed8; --accent-ink: #fff; --accent-soft: #eff4ff;
  --ok: #166534; --ok-soft: #edf8f0; --warn: #92400e; --warn-soft: #fff7e6; --bad: #b42318; --bad-soft: #fff0ee;
  --info: #3155a3; --info-soft: #eff4ff; --go: #166534; --go-soft: #edf8f0;
  --radius: 8px; --control-radius: 6px; --tap: 48px; --tap-small: 44px; --page-width: 1040px; --nav-height: 64px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px;
  --shadow: none; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101a27; --surface: #1a2839; --surface-2: #233347; --ink: #edf2fa; --ink-2: #c8d3e3; --muted: #b0bdd0;
    --line: #37485d; --control-line: #73869f; --accent: #a1bcff; --accent-ink: #102655; --accent-soft: #253d60;
    --ok: #a4deb6; --ok-soft: #1e3b2c; --warn: #ffce87; --warn-soft: #42321d; --bad: #ffafa7; --bad-soft: #442726;
    --info: #a1bcff; --info-soft: #253d60; --go: #a4deb6; --go-soft: #1e3b2c; color-scheme: dark;
  }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; scroll-padding-bottom: calc(144px + env(safe-area-inset-bottom)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom)); }
a { color: var(--accent); text-underline-offset: 3px; }
main { max-width: var(--page-width); margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); min-width: 0; }
main:has(> form.stack:not(.card)) { max-width: 760px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px; background: var(--surface); }
.skip-link:focus { top: 12px; }
h2 { font-size: 1.125rem; line-height: 1.35; margin: var(--space-6) 0 var(--space-3); letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.4; margin: 0 0 var(--space-3); }
p { overflow-wrap: anywhere; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row, .btnrow { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: var(--space-4); }
.stack > input[type="hidden"], .stack > script, .stack > datalist { margin: 0; }
.stack > input[type="hidden"] + .field, .stack > input[type="hidden"] + .row2 { margin-top: 0; }
.inline { display: inline-flex; vertical-align: middle; }
.warn-text { color: var(--warn); }
.ok-text { color: var(--ok); }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--space-3);
  padding: 12px max(16px, calc((100vw - var(--page-width) + 32px) / 2)); padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.page-title { flex: 1; min-width: 0; }
.business-name { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .06em; margin-bottom: 2px; }
.topbar h1 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.03em; margin: 0; overflow-wrap: anywhere; }
.topbar .back { color: var(--ink-2); text-decoration: none; font-size: 1.75rem; line-height: 1; flex: 0 0 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--control-radius); border: 1px solid var(--control-line); background: var(--surface); }
.topbar .who { color: var(--accent); background: var(--accent-soft); font-size: .875rem; font-weight: 600; text-decoration: none; border-radius: var(--control-radius); padding: 8px 12px; min-height: 44px; display: flex; align-items: center; max-width: 34%; overflow-wrap: anywhere; }
.flash { max-width: calc(var(--page-width) - 32px); margin: 12px auto 0; padding: 12px 16px; background: var(--ok-soft); color: var(--ink); border-left: 3px solid var(--ok); border-radius: var(--control-radius); width: calc(100% - 32px); }
.error, .warn-box { padding: 12px 16px; border-radius: var(--control-radius); }
.error { color: var(--bad); background: var(--bad-soft); }
.warn-box { background: var(--warn-soft); color: var(--warn); border-left: 3px solid var(--warn); }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; max-width: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px; color: var(--muted); text-decoration: none; font-size: .8125rem; min-height: var(--nav-height); }
.tabbar a.on { color: var(--accent); font-weight: 650; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar svg circle[r="1.5"] { fill: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap); padding: 10px 16px; border-radius: var(--control-radius);
  border: 1px solid var(--control-line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; line-height: 1.35; font-weight: 550; text-decoration: none; text-align: center; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.primary.danger, .btn.danger.big { background: var(--bad); color: var(--surface); }
.btn.small { min-height: var(--tap-small); padding: 8px 12px; font-size: .875rem; }
.btn.big { min-height: var(--tap); font-size: 1rem; width: 100%; }
.btn.block { display: flex; width: 100%; margin: 0 0 var(--space-4); }
.btn.icon { width: var(--tap); flex: none; padding: 0; font-size: 1.5rem; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .7; cursor: wait; }
.btnrow { margin-block: var(--space-3); }
.btnrow > .btn, .btnrow > form > .btn { min-height: var(--tap); }
.btnrow > form { margin: 0; }
.btnrow form.inline { display: inline-flex; }
.copy-feedback { display: block; flex-basis: 100%; font-size: .875rem; color: var(--muted); margin-top: var(--space-2); }
@media (hover: hover) { .btn:not(.primary):hover, .topbar .back:hover { background: var(--surface-2); } .btn.primary:hover { filter: brightness(.95); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); margin: var(--space-4) 0; }
main > .card:first-child, main > .list:first-child { margin-top: 0; }
.card > p { margin: var(--space-3) 0; }
.card > :last-child { margin-bottom: 0; }
details > summary { cursor: pointer; min-height: var(--tap-small); display: flex; align-items: center; gap: var(--space-2); font-weight: 600; list-style: none; overflow-wrap: anywhere; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '▾'; color: var(--muted); margin-left: auto; flex: none; }
details[open] > summary::after { content: '▴'; }
details > summary h2 { margin: 8px 0; }
details[open] > summary { margin-bottom: var(--space-3); }
details > form.btnrow { margin-bottom: 0; }

.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .875rem; color: var(--ink-2); font-weight: 550; }
.field small { color: var(--muted); }
.field small:empty, .field small:has(> span:only-child:empty) { display: none; }
.req { color: var(--bad); margin-left: 3px; }
input, select, textarea { min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--control-radius); min-height: var(--tap); padding: 10px 12px; width: 100%; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
input.copy { font-family: ui-monospace, monospace; font-size: .875rem; }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button { font: inherit; color: var(--ink); background: var(--surface-2); border: 0; border-radius: 4px; padding: 6px 10px; margin-right: 10px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-4); margin: 0; }
fieldset > * + * { margin-top: var(--space-3); }
legend { font-weight: 600; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; min-height: var(--tap-small); padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
@supports (grid-template-rows: subgrid) { .row2 > .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: 6px; } }
.stepper { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr) var(--tap); gap: var(--space-1); }
.stepper input { text-align: center; padding: 0; }
.rulerow { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-2); align-items: center; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); z-index: 5; padding: 12px 0; margin-top: var(--space-6); background: var(--bg); border-top: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-3) 0; }
.filters select, .filters input { width: auto; flex: 1 1 160px; }
.filters select[name="cat"] { flex-basis: 200px; }
.filters .btn { min-height: var(--tap); flex: 0 0 auto; }
.custom-period { flex: 1 0 100%; }
.custom-period > summary { color: var(--ink-2); font-size: .875rem; font-weight: 500; }
.custom-period input { width: 100%; }
.more summary { font-weight: 550; color: var(--ink-2); }
.more > .field + .field { margin-top: var(--space-4); }

/* Existing agenda controls and actions, with a smaller vertical footprint. */
.agenda-page main { padding-top: var(--space-4); }
.agenda-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.agenda-toolbar .seg a.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.daynav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--space-2); align-items: center; }
.daynav .btn.icon { width: 44px; min-height: var(--tap); }
.dayform { display: flex; gap: var(--space-2); align-items: center; min-width: 0; }
.dayform input { text-align: center; font-weight: 550; min-width: 0; flex: 1; padding-inline: 6px; }
.dayform .btn { padding-inline: 12px; min-height: var(--tap); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1); margin: 12px 0 16px; }
.week a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 6px 0; border-radius: var(--control-radius); text-decoration: none; color: var(--ink-2); position: relative; min-height: 60px; font-size: .75rem; }
.week a b { font-weight: 500; }
.week a small { font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.week a.on { background: var(--accent-soft); color: var(--accent); }
.week .dot { position: absolute; bottom: -5px; font-style: normal; font-size: .6875rem; line-height: 1.4; background: var(--surface-2); color: var(--ink); border: 2px solid var(--bg); border-radius: 999px; padding: 0 5px; }
.week .dot.warn { background: var(--warn-soft); color: var(--warn); }
.agenda-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-4); }
.agenda-heading > div { min-width: 0; flex: 1 1 220px; }
.dayhead { margin: 0 0 var(--space-1); font-size: 1.125rem; letter-spacing: -.02em; }
.summary { color: var(--ink-2); font-size: .875rem; margin: 0; }
.agenda-create { flex: none; }
.agenda-group { margin: 20px 0; }
.agenda-group > h3 { color: var(--ink-2); font-size: .9375rem; font-weight: 650; margin: 0 0 var(--space-3); }
.day-empty { font-size: .875rem; padding: 8px 0; margin: 0; }
.jobs { display: flex; flex-direction: column; gap: var(--space-3); }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 96px; min-width: 0; }
.job.unassigned { border-left: 3px solid var(--warn); }
.job.st-cancelled, .job.st-noshow { background: var(--surface-2); }
.job-main { display: block; padding: var(--space-4); color: inherit; text-decoration: none; min-width: 0; }
.job-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.job-heading-meta { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; }
.job-time { font-size: 1.25rem; letter-spacing: -.025em; font-weight: 650; font-variant-numeric: tabular-nums; flex: none; }
.job-time small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); }
.job-body { min-width: 0; }
.job-locations { margin: 0; display: grid; gap: var(--space-2); }
.job-locations .location { position: relative; min-width: 0; padding-left: 16px; }
.job-locations .location::before { content: ''; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border: 1.5px solid var(--accent); border-radius: 50%; }
.job-locations .pickup::before { background: var(--accent); }
.job-locations dt { color: var(--muted); font-size: .8125rem; line-height: 1.35; margin-bottom: 1px; }
.job-locations dd { margin: 0; font-weight: 550; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }
.job-meta { color: var(--ink-2); font-size: .875rem; margin-top: var(--space-3); overflow-wrap: anywhere; }
.job-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-3); }
.job-tags:empty { display: none; }
.job-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 8px 16px; border-top: 1px solid var(--line); min-height: 60px; }
.assignee { color: var(--ink-2); font-size: .875rem; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.unassigned .assignee { color: var(--warn); }
.price { font-size: .875rem; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 4px; font-size: .75rem; line-height: 1.5; font-weight: 550; background: var(--surface-2); color: var(--ink-2); overflow-wrap: anywhere; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.go { background: var(--go-soft); color: var(--go); } .badge.mute { background: var(--surface-2); color: var(--muted); }
details.assign { position: relative; flex: none; }
details.assign > summary::after { content: none; }
details.assign > summary { min-height: var(--tap-small); margin: 0; font-weight: 600; }
.assign-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: var(--space-2); width: min(280px, calc(100vw - 64px)); max-height: 50vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--radius); padding: var(--space-2); box-shadow: 0 8px 24px rgb(0 0 0 / .12); }
.assign-list .btn { width: 100%; }
.assign.opens-up .assign-list { top: auto; bottom: calc(100% + 6px); }
.empty { text-align: center; padding: 32px 16px; margin: var(--space-4) 0; color: var(--muted); border: 1px dashed var(--control-line); border-radius: var(--radius); }
.jobform { padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.jobform > * + * { margin-top: var(--space-6); }
.jobform > input[type="hidden"], .jobform > script, .jobform > datalist { margin: 0; }
.jobform .form-section { display: grid; gap: var(--space-4); padding: 0; margin: 0; border: 0; border-radius: 0; }
.jobform .form-section + .form-section { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.jobform .form-section > * { margin: 0; }
.jobform .form-section h2 { font-size: 1rem; }
.jobform .sticky-actions { background: var(--surface); margin-bottom: -12px; }

/* Shared lists, including useful descriptions on small screens. */
.list { list-style: none; margin: var(--space-3) 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list li > a, .list li > label { display: flex; gap: var(--space-3); align-items: center; padding: 14px 16px; min-height: 60px; color: inherit; text-decoration: none; }
.list li > a > b, .list li > a > span > b { display: inline; font-weight: 600; }
.list li small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.list li > a:not(:has(.grow)) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.list.tight li > a { min-height: var(--tap-small); padding: 10px 12px; }
.list.menu li > a { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 2px 12px; }
.list.menu li > a::after { content: '›'; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 1.5rem; }
.list.menu li > a > small { display: block; grid-column: 1; font-size: .875rem; }
.expenses .grow { overflow-wrap: anywhere; }
.expenses img, .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--control-radius); flex: none; background: var(--surface-2); display: grid; place-items: center; }
/* Login has its own grid: button spacing never depends on shared text margins. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html:has(> body.auth-page) { height: 100%; overflow: hidden; overscroll-behavior: none; scroll-padding: 0; }
.auth-page { position: fixed; inset: 0; height: 100vh; height: var(--auth-viewport-height, 100dvh); padding: 0; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
.auth-page a, .auth-page button, .auth-page input { touch-action: manipulation; }
.auth-page main { --auth-edge: max(56px, calc(52px + env(safe-area-inset-top)), calc(16px + env(safe-area-inset-bottom))); display: flex; flex-direction: column; width: 100%; height: 100%; max-width: none; margin: 0; padding: var(--auth-edge) max(16px, env(safe-area-inset-right)) var(--auth-edge) max(16px, env(safe-area-inset-left)); overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: var(--auth-edge); }
.auth-nav { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); pointer-events: none; }
.auth-nav > * { pointer-events: auto; }
.auth-brand { font-size: 1rem; font-weight: 650; letter-spacing: -.02em; }
.auth-stage { width: 100%; max-width: 360px; margin: auto; flex: none; }
.auth-intro { text-align: center; }
.auth-intro h1 { margin: 0; font-size: 1.375rem; letter-spacing: -.025em; line-height: 1.3; overflow-wrap: anywhere; }
.auth-intro p { margin: var(--space-1) 0 0; color: var(--muted); font-size: .875rem; }
.auth-profiles { display: grid; gap: var(--space-3); list-style: none; padding: 0; margin: var(--space-6) 0 0; }
.auth-profile { display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-2) var(--space-4); border: 1px solid var(--control-line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.auth-avatar { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1rem; font-weight: 650; }
.auth-profile-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.auth-chevron { color: var(--muted); font-size: 1.5rem; flex: none; }
.auth-help { margin: var(--space-4) 0 0; font-size: .75rem; line-height: 1.5; color: var(--muted); text-align: center; }
.passcode-form { display: grid; gap: var(--space-3); padding: 0; }
.passcode-form > * { margin: 0; min-width: 0; }
.passcode-form > input[type="hidden"] { display: none; }
.auth-switch { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap-small); min-width: var(--tap-small); padding: 8px 12px; border-radius: var(--control-radius); font-size: .875rem; }
.passcode-field { display: block; }
.passcode-input { height: 64px; min-height: calc(1.5em + 22px); text-align: center; font-size: 1.75rem; letter-spacing: .22em; padding-inline: 8px; caret-color: var(--accent); }
.passcode-keypad:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.passcode-key { min-height: 52px; padding: 8px; font-size: 1.25rem; font-variant-numeric: tabular-nums; border-color: var(--line); }
.passcode-key:active { background: var(--accent-soft); border-color: var(--accent); }
.passcode-edit { font-size: .8125rem; color: var(--ink-2); }
.passcode-submit { width: 100%; }
.passcode-submit:disabled { cursor: default; }
@media (hover: hover) { .auth-profile:hover { background: var(--accent-soft); border-color: var(--accent); } }
@media (max-width: 600px) {
  .passcode-key { min-height: 48px; }
}
/* The page stays fixed; main can scroll only when content cannot fit. */
@media (max-width: 600px) and (max-height: 740px) {
  .passcode-form { gap: var(--space-2); }
  .passcode-key { min-height: var(--tap-small); font-size: 1.125rem; }
}
dl.kv { display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr); gap: 10px 16px; margin: var(--space-4) 0; }
dl.kv dt { color: var(--muted); overflow-wrap: anywhere; font-size: .875rem; } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { padding-left: 20px; margin: 0; } .timeline li { margin: 8px 0; } .timeline time, .history time { color: var(--muted); font-variant-numeric: tabular-nums; }
.history { list-style: none; padding: 0; margin: 0; } .history li { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.history li:first-child { border-top: 0; }
.changes { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .875rem; color: var(--ink-2); }
.steps li, .guide li { margin: var(--space-2) 0; }
.big-steps li { font-size: 1rem; margin: var(--space-3) 0; }
.invite-actions { margin-top: var(--space-3); }
.invite-actions > form { display: inline-flex; }

/* Reports retain all metrics and exports, using the same spacing rules. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.tile small { color: var(--muted); }
.tile b { font-size: 1.375rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile.hero { border-color: var(--accent); background: var(--accent-soft); }
.tile.attn b { color: var(--warn); }
.delta { font-size: .8125rem; color: var(--muted); }
.delta.good { color: var(--ok); } .delta.bad { color: var(--bad); }
.big { font-size: 1.5rem; font-weight: 650; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.split > * { min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--control-line); background: var(--surface); border-radius: var(--control-radius); overflow: hidden; }
.seg a { padding: 8px 14px; text-decoration: none; color: var(--ink-2); min-height: var(--tap-small); display: flex; align-items: center; justify-content: center; font-size: .9375rem; }
.seg a.on { background: var(--accent); color: var(--accent-ink); }
.bars { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; }
.bars .bl { grid-column: 1 / -1; overflow-wrap: anywhere; font-size: .875rem; }
.bars .bl small { color: var(--muted); }
.bars .bt { height: 10px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bars .bf { display: block; height: 100%; background: var(--accent); }
.bars .bv { font-variant-numeric: tabular-nums; font-size: .875rem; text-align: right; min-width: 72px; }
.spark { margin: var(--space-4) 0 0; padding: 16px 0; }
.spark figcaption { font-size: .875rem; color: var(--muted); margin-bottom: var(--space-2); }
.spark svg { width: 100%; height: 70px; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--accent-soft); }
.spark .hit rect { fill: transparent; }
.spark .hit circle { fill: var(--accent); opacity: 0; }
.spark .hit:hover circle { opacity: 1; }
.tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl th { color: var(--ink-2); font-weight: 600; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 600; border-bottom: 0; }
.tbl tr.flag td { background: var(--bad-soft); }
.table-scroll { max-width: 100%; overflow-x: auto; margin: var(--space-4) 0; }
.statement .tbl { min-width: 640px; }
.statement .tbl th { white-space: nowrap; }
.statement .tbl th:nth-child(1) { min-width: 100px; }
.statement .tbl th:nth-child(2) { min-width: 120px; }
.statement .tbl th:nth-child(3) { min-width: 260px; }
.table-hint { display: none; }
.statement header h2 { margin: 0; }

/* First-steps checklist */
.onboarding { border-color: var(--accent); background: var(--accent-soft); }
.onboarding h3 { margin: 0; }
.steps-list { margin: 8px 0 4px; padding-left: 22px; }
.steps-list li { margin: 8px 0; min-height: 24px; }
.steps-list li a { font-weight: 600; }
.steps-list li.done { color: var(--muted); list-style: none; margin-left: -22px; }

@media (min-width: 700px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bars li { grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) auto; }
  .bars .bl { grid-column: auto; }
  .job:has(> .job-foot) { display: grid; grid-template-columns: minmax(0, 1fr) 160px; }
  .job-main { padding: 16px 20px; }
  .job-foot { flex-direction: column; align-items: flex-start; justify-content: center; border-top: 0; border-left: 1px solid var(--line); padding: 16px; }
  .job-locations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
  .job-locations dt { font-size: .875rem; }
}
@media (max-width: 480px) {
  main { padding-top: var(--space-4); }
  .jobform { padding: var(--space-4); }
  .row2.long-fields { grid-template-columns: minmax(0, 1fr); }
  .rulerow { grid-template-columns: minmax(0, 1fr); }
  .agenda-heading > .agenda-create { width: 100%; }
  .btnrow > .btn, .btnrow > form { flex: 1 1 auto; }
  .btnrow > form > .btn { width: 100%; }
  .dayform .btn { padding-inline: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) { .table-hint { display: block; } }
@media (max-width: 359px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .week { gap: 2px; }
  .job-heading { align-items: flex-start; }
  .job-heading-meta { gap: 4px; }
  .job-locations dd { font-size: .9375rem; }
}
@media print {
  .topbar, .tabbar, .noprint, .flash, .fab, .skip-link { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  main, main:has(> form.stack:not(.card)) { max-width: none; padding: 0; }
  .statement { font-size: 11pt; }
  .table-scroll { overflow: visible; }
  .statement .tbl { min-width: 0; }
}
