/* CWR Micro office website. Colours match the phone app (apps/CWR.Micro.App/wwwroot/app.css); the navy is the app's
   splash and icon background, behind the CWR Micro mark. */
@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-Regular.ttf") format("truetype");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --ink: #17231f;
    --muted: #4f5d57;
    --line: #d9e2de;
    --line-soft: #edf1ef;
    --surface: #ffffff;
    --canvas: #f3f6f4;
    --nav: #03152f;
    --nav-ink: #d3deec;
    --nav-hover: #0f2a4d;
    --green: #147a55;
    --green-dark: #0d5d40;
    --green-soft: #e2f2eb;
    --amber-ink: #8a5208;
    --amber-soft: #fff2dc;
    --red-ink: #8f2525;
    --red-soft: #fbe6e4;
    --blue-ink: #234b6b;
    --blue-soft: #e4eef6;
    --neutral-ink: #3f4b46;
    --neutral-soft: #eef2f0;
    --on-accent: #ffffff;
    --focus: #2d5f86;
    --field-line: #8fa39b;
    --ghost-line: #b9cbc3;
    --chart-axis: #a9bab3;
    /* The public site's dark header, hero and footer, and the white buttons on them, look the same in both modes. */
    --on-nav: #ffffff;
    --nav-accent: #7fd6ad;
    --nav-muted: #a9b8cc;
    --nav-line: #2b4365;
    --paper: #ffffff;
    --paper-ink: #03152f;
    --paper-hover: #e6eef8;
    --hero-edge: transparent;
    --phone-frame: #020c1b;
    --star: #b26a00;
    color-scheme: light;
}

/* Dark mode is the visitor's choice (Light, Dark or Match device, at the foot of the side menu and the front page;
   theme.js marks the page dark). It is light until chosen, and printing always uses the light colours. Solid green and
   red buttons turn light with dark text; the side menu and sign-in panel are dark in both modes. */
@media screen {
    :root[data-theme="dark"] {
        --hero-edge: #3a3a3a;
        --phone-frame: #24344a;
        --star: #f2c14e;
        color-scheme: dark;
        --ink: #ececec;
        --muted: #ababab;
        --line: #3a3a3a;
        --line-soft: #2c2c2c;
        --surface: #1c1c1e;
        --canvas: #121212;
        --nav: #020c1b;
        --green: #4cc08f;
        --green-dark: #7fd6ad;
        --green-soft: #1f2a25;
        --amber-ink: #f2c983;
        --amber-soft: #3d2e14;
        --red-ink: #f6b3b0;
        --red-soft: #43201f;
        --blue-ink: #9cc5ea;
        --blue-soft: #1a2a37;
        --neutral-ink: #cccccc;
        --neutral-soft: #242424;
        --on-accent: #121212;
        --focus: #6cb6f0;
        --field-line: #777777;
        --ghost-line: #474747;
        --chart-axis: #555555;
    }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--canvas);
    color: var(--ink);
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
}

a { color: var(--green-dark); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; }
h2 { margin: 0 0 12px; font-size: 1.125rem; }

.muted { color: var(--muted); margin: 4px 0 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Shell */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }

.side-nav {
    flex: 1 1 240px;
    max-width: 100%;
    background: var(--nav);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand { padding: 6px 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.brand-name { color: #ffffff; font-weight: 700; font-size: 1.125rem; }
.brand-user { color: #9fb8ad; font-size: 0.8125rem; }

.nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    color: var(--nav-ink);
    text-decoration: none;
    font-size: 0.9375rem;
}
.nav-link:hover { background: var(--nav-hover); color: #ffffff; }
.nav-link.active { background: var(--green); color: var(--on-accent); font-weight: 600; }
.nav-spacer { flex-grow: 1; }
.nav-form { margin: 0; }
.nav-button { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }

/* Light, Dark or Match device. It sits on the dark side menu or footer, so it uses their colours. */
.theme-choice { display: flex; width: 100%; max-width: 320px; margin: 8px 0; border: 1px solid var(--nav-line); border-radius: 8px; overflow: hidden; }
.theme-choice button { flex: 1 1 0; min-height: 44px; padding: 0 10px; border: 0; border-right: 1px solid var(--nav-line); background: none; color: var(--nav-ink); font: inherit; font-size: 0.8125rem; cursor: pointer; }
.theme-choice button:last-child { border-right: 0; }
.theme-choice button:hover { background: var(--nav-hover); color: var(--on-nav); }
.theme-choice button[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); font-weight: 600; }

.content {
    flex: 999 1 560px;
    min-width: 0;
    max-width: 1280px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.content:focus { outline: none; }

@media (max-width: 700px) {
    .content { padding: 24px 16px; }
    .side-nav { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .brand { flex-basis: 100%; padding-bottom: 8px; }
    .nav-spacer { display: none; }
}

/* Shown on every page when the API is the test server. */
.test-server-band { margin: 0 0 16px; padding: 8px 14px; border-radius: 8px; background: #a12622; color: #ffffff; font-size: 0.875rem; }
.test-server-band strong { margin-right: 6px; letter-spacing: 0.04em; }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    border: 1px solid var(--green);
    background: var(--green);
    color: var(--on-accent);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--green-dark); color: var(--on-accent); }
.btn-large { min-height: 48px; font-size: 1rem; }

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill-good { background: var(--green-soft); color: var(--green-dark); }
.pill-warning { background: var(--amber-soft); color: var(--amber-ink); }
.pill-urgent { background: var(--red-soft); color: var(--red-ink); }
.pill-info { background: var(--blue-soft); color: var(--blue-ink); }
.pill-neutral { background: var(--neutral-soft); color: var(--neutral-ink); }

/* Home */
.page-header { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-size: 0.875rem; color: var(--muted); }
.tile-value { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.tile-detail { font-size: 0.8125rem; color: var(--muted); }
.tile-link { color: var(--ink); text-decoration: none; }
.tile-link:hover { border-color: var(--green); color: var(--ink); }
.tile-link .tile-detail { color: var(--green-dark); }

.columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.panel { padding: 20px; min-width: 0; }
.panel-narrow { flex: 1 1 360px; }
.panel-wide { flex: 2 1 560px; padding-left: 0; padding-right: 0; }
.panel-wide h2, .panel-wide .empty { padding: 0 20px; }
.empty { margin: 0; }

.task-list { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line-soft); }

/* Relative, so the absolutely placed screen-reader labels in its cells are clipped with the table instead of widening the page. */
.table-scroll { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table .sub { display: block; color: var(--muted); font-size: 0.8125rem; }

/* On a phone each row becomes a small card, so no column is hidden off to the side. */
@media (max-width: 700px) {
    .table-stack thead { position: absolute; left: -9999px; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr { padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
    .table-stack td { display: grid; grid-template-columns: max(88px, 5.5rem) minmax(0, 1fr); justify-items: start; gap: 8px; padding: 4px 0; border: 0; }
    .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: 0.8125rem; }
}

.error-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

/* Sign in */
.sign-in { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sign-in-intro {
    flex: 1 1 420px;
    background: var(--nav);
    color: #ffffff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.brand-home { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand-home:hover { color: var(--on-nav); text-decoration: underline; }
.sign-in-intro h1 { font-size: 2.5rem; max-width: 520px; }
.sign-in-intro p { margin: 0; color: #c7dad1; font-size: 1.0625rem; max-width: 520px; }
.sign-in-panel { flex: 1 1 420px; padding: 56px 16px; display: flex; align-items: center; justify-content: center; }
.sign-in-card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.sign-in-card h2 { font-size: 1.5rem; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.field-label { font-weight: 600; }
.field {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--field-line);
    border-radius: 8px;
    font: inherit;
    font-size: 1.0625rem;
    color: var(--ink);
    background: var(--surface);
}
.field-code { font-size: 1.375rem; letter-spacing: 6px; }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: 20px; height: 20px; flex: none; }
.text-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.notice { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--blue-soft); color: var(--blue-ink); }
.form-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--red-soft); color: var(--red-ink); }
.dev-code { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); }
.fine-print { margin: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 0.8125rem; color: var(--muted); }
.fine-print p { margin: 0 0 6px; }
.fine-print-heading { margin: 0 0 6px; font-size: 0.8125rem; font-weight: 600; }

@media (max-width: 700px) {
    .sign-in-intro { padding: 32px 16px; }
    .sign-in-intro h1 { font-size: 1.75rem; }
    .sign-in-card { padding: 24px 16px; }
}

/* Plain pages */
.message-page { max-width: 560px; margin: 80px auto; padding: 0 16px; }
.support-ref { font-family: Consolas, monospace; }

/* Lists: notes, invoices and reports */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.number { text-align: right; white-space: nowrap; }
/* A job, day or month that cost more at the tip than it brought in. */
.negative { color: var(--red-ink); }
.table th.number { text-align: right; }

.btn-ghost { background: var(--surface); color: var(--green-dark); border-color: var(--ghost-line); }
.btn-ghost:hover { background: var(--green-soft); color: var(--green-dark); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }

.filters { padding: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
.filter { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; }
.filter-wide { flex: 2 1 280px; }
.filter-actions { flex-direction: row; align-items: center; gap: 12px; flex: 0 0 auto; }
.filters .field { min-height: 44px; font-size: 0.9375rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--ghost-line);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}
.tab:hover { border-color: var(--green); color: var(--ink); }
.tab-on, .tab-on:hover { background: var(--green); border-color: var(--green); color: var(--on-accent); font-weight: 600; }

.list-card { padding: 8px 0 0; }
.list-card h2 { padding: 12px 20px 0; }
.list-card .empty { padding: 16px 20px 20px; }
.list-note { margin: 0 20px; padding: 16px 0 20px; }
.row-link { font-weight: 600; white-space: nowrap; }
.row-actions { display: inline-flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 20px; color: var(--muted); font-size: 0.875rem; }
.pager-links { display: inline-flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.tile-urgent { color: var(--red-ink); }

.form-card { padding: 24px; max-width: 560px; display: flex; flex-direction: column; gap: 16px; }
.hint { color: var(--muted); font-size: 0.875rem; margin-top: -6px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.facts dt { color: var(--muted); font-size: 0.8125rem; }
.facts dd { margin: 0; font-weight: 600; }
select.field { padding-right: 8px; }

.panel-chart { flex: 2 1 480px; }
.chart { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--chart-axis); stroke-width: 1; }
.chart-bar { fill: var(--green); }
.chart-value { fill: var(--ink); font-size: 13px; font-weight: 600; }
.chart-label { fill: var(--muted); font-size: 13px; }
.big-number { margin: 0 0 12px; font-size: 2.25rem; font-weight: 700; line-height: 1.2; }
.muted-inline { font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.report-table { flex: 1 1 420px; min-width: 0; }

/* Jobs: the day board, one job, and the job form. */
.day-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.day-nav h2 { margin: 0; flex: 1 1 240px; }
.board-group h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.assign-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.assign-form .field { min-height: 40px; font-size: 0.9375rem; max-width: 240px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.job-form { padding: 24px; max-width: 860px; display: flex; flex-direction: column; gap: 24px; }
/* A fieldset is as wide as its widest content by default, so a wide table inside it can't scroll on a phone. */
fieldset { min-width: 0; }
.job-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.job-form legend { font-size: 1.125rem; font-weight: 700; padding: 0 0 8px; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-row > .stack { flex: 1 1 200px; }
.lines .field { width: 100%; min-height: 40px; font-size: 0.9375rem; }
.lines .line-code { width: 120px; }
.lines .line-quantity { width: 90px; }
textarea.field { padding: 10px 14px; min-height: 88px; }
.btn-danger, .btn-danger:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-danger:hover { filter: brightness(0.9); }

@media (max-width: 700px) {
    .filter-actions { flex-basis: 100%; }
    .job-form { padding: 16px; }
    .pager { padding: 14px 16px; }
    /* Report tables keep their columns on a phone, so tighter cells let all four fit. */
    .report-table .table th, .report-table .table td { padding-left: 12px; padding-right: 12px; }
}

/* Team and vans: drivers, codes, vehicles, daily checks and defects. */
.driver-code { margin: 0; font-family: Consolas, monospace; font-size: 2rem; font-weight: 700; letter-spacing: 4px; }
.registration-field { text-transform: uppercase; }
.due-soon { color: var(--amber-ink); font-weight: 600; }
.defect-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.defect-card { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.defect-card h3 { margin: 0; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.defect-card p { margin: 0; }
.defect-card .booking-photos { margin: 4px 0; }
.defect-urgent { border-color: var(--red-ink); }
.defect-fix summary { cursor: pointer; color: var(--green-dark); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.panel .page-actions { margin-top: 16px; }
.defect-fix form { margin-top: 8px; }

@media (max-width: 700px) {
    .defect-list { grid-template-columns: minmax(0, 1fr); }
    .table-stack .assign-form, .table-stack .assign-form .field { max-width: 100%; min-width: 0; }
    /* A cell holding a form puts its label on top, so each box gets the card's full width and a long vehicle name fits. */
    .table-stack td.cell-label-above { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .table-stack td.cell-label-above .assign-form { width: 100%; }
    .table-stack td.cell-label-above .assign-form .field { flex: 1 1 100%; }
}

/* Settings: the business, licences, receiving facilities, prices and credits. */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.settings-link { padding: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.settings-link:hover { border-color: var(--green); color: var(--ink); }
.settings-link strong { color: var(--green-dark); font-size: 1.0625rem; }
.settings-link > span { color: var(--muted); font-size: 0.875rem; }
.settings-todo { margin-top: 12px; }
.settings-gap { margin-top: 12px; }
.settings-logo { max-width: 240px; max-height: 120px; object-fit: contain; align-self: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--surface); }
.settings-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.field-file { padding: 10px 14px; font-size: 0.9375rem; }

/* A customer's private page: one column, readable on a phone. */
.customer-page { max-width: 860px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.customer-head { display: flex; flex-direction: column; gap: 6px; }
.customer-head h1 { margin: 0; }
.customer-head p { margin: 0; }
.customer-business { font-weight: 700; color: var(--green-dark); }
.customer-page h2 { margin: 0 0 12px; font-size: 1.25rem; }
.customer-page .row-link { white-space: normal; overflow-wrap: anywhere; }
.customer-list { list-style: none; margin: 0; padding: 0; }
.customer-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.customer-list .sub { color: var(--muted); font-size: 0.875rem; }
.customer-documents { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.customer-owed { margin: 0; padding: 8px 20px 4px; }
.customer-foot { border-top: 0; }
.customer-link-field { width: 100%; font-family: Consolas, monospace; font-size: 0.875rem; }

/* The public booking page, which customers open on their phones. */
.booking { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.booking-header { margin-bottom: 16px; }
.booking-header .brand-name { color: var(--green-dark); font-weight: 700; }
.booking-header h1 { margin: 4px 0 12px; font-size: 1.5rem; }
.booking-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.booking-steps li { counter-increment: step; padding: 4px 10px; border-radius: 999px; background: var(--neutral-soft); color: var(--muted); font-size: 0.8125rem; }
.booking-steps li::before { content: counter(step) ". "; }
.booking-steps .booking-step-on { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.booking-card { padding: 20px; }
.booking-price { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; padding: 16px; border-radius: 10px; background: var(--green-soft); }
.booking-lines { margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.booking-choice { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.booking-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.booking-photos img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.day-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; border: 0; }

/* Accounts export: the Xero or QuickBooks choice. */
.choice-group { border: 0; margin: 0; padding: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.choice-group legend { width: 100%; padding: 0; }
.account-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.account-fields > div { display: flex; flex-direction: column; gap: 6px; }

/* Find address (AddressFinderControls.razor): hidden parts stay hidden even where a class sets display. */
.address-finder { display: grid; gap: 0.5rem; justify-items: start; }
.address-finder select { width: 100%; }
.address-finder [hidden] { display: none !important; }
.address-finder p:empty { display: none; }

/* Customers: a customer's details, and a list's heading with its button beside it. */
.customer-details { display: flex; flex-direction: column; gap: 12px; }
.customer-details h2 { margin: 0; }
.list-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px 0; }
.list-card .list-heading h2 { padding: 0; margin: 0; }

/* Day sheet: each vehicle's run, printed one vehicle to a page. */
.btn[hidden] { display: none; }
.day-sheet { display: flex; flex-direction: column; gap: 16px; }
.day-sheet-run { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.day-sheet-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.day-sheet-head h2 { margin: 0; }
.day-sheet-stops { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.day-sheet-stop { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.day-sheet-time { flex: 0 0 auto; min-width: 110px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
/* A job number stays on one line; the time column widens to fit it. */
.day-sheet-job { white-space: nowrap; }
.day-sheet-time .sub, .day-sheet-detail .sub { color: var(--muted); font-size: 0.875rem; }
.day-sheet-detail { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.day-sheet-detail p { margin: 0 0 4px; }
.day-sheet-waste { margin: 4px 0; padding-left: 18px; }
.day-sheet-notes { font-weight: 600; }

/* Only the day sheet prints without the menu; other pages print as they are. */
@media print {
    .no-print, .shell:has(.day-sheet) .side-nav, .shell:has(.day-sheet) .skip-link { display: none !important; }
    .shell:has(.day-sheet), .shell:has(.day-sheet) .content { display: block; padding: 0; }
    .day-sheet, .day-sheet-run, .day-sheet-stops { display: block; }
    .day-sheet-run { border: 0; padding: 0; }
    .day-sheet-run + .day-sheet-run { break-before: page; }
    .day-sheet-detail a { color: inherit; text-decoration: none; }
    .day-sheet .pill { border: 1px solid currentColor; background: none; }
}

/* Vans out today: a round's card is as tall as what's in it, with its lines lined up under the heading. */
.round-card { flex: 0 0 auto; padding-bottom: 12px; }
.round-card > p, .round-card > h3 { margin-left: 20px; margin-right: 20px; }

/* Public front page. The header, hero and footer are dark in both modes, like the side menu. */
.site-header, .hero, .site-footer { background: var(--nav); color: var(--on-nav); }
/* The usual blue focus ring is too dark on the navy, so it turns white there. */
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible, .side-nav :focus-visible, .sign-in-intro :focus-visible { outline-color: var(--on-nav); }
.site-bar, .hero-inner, .site-footer-inner, .site-section, .site-band { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.site-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--on-nav); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.site-brand:hover { color: var(--on-nav); }
.site-logo { flex: none; width: 36px; height: 36px; padding: 3px; border-radius: 9px; background: var(--paper); }
.site-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.site-by { font-size: 0.75rem; font-weight: 400; color: var(--nav-muted); }
.site-parent { color: var(--nav-ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.site-nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--nav-ink); text-decoration: none; }
.site-nav-link:hover { background: var(--nav-hover); color: var(--on-nav); }
.site-nav-button { display: inline-flex; align-items: center; min-height: 44px; margin-left: 8px; padding: 0 18px; border-radius: 8px; background: var(--paper); color: var(--paper-ink); font-weight: 700; text-decoration: none; }
.site-nav-button:hover { background: var(--paper-hover); color: var(--paper-ink); }
.site-main:focus { outline: none; }
.site-band .test-server-band { margin: 16px 0 0; }

.hero { padding: 40px 0 72px; border-bottom: 1px solid var(--hero-edge); }
.hero-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.eyebrow { margin: 0 0 12px; color: var(--nav-accent); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8125rem; }
.hero h1 { margin: 0 0 18px; font-size: 3rem; line-height: 1.1; font-weight: 700; }
.hero-lead { margin: 0 0 28px; font-size: 1.1875rem; line-height: 1.55; color: var(--nav-ink); max-width: 600px; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-button { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 10px; background: var(--paper); color: var(--paper-ink); font-weight: 700; text-decoration: none; }
.store-button:hover { background: var(--paper-hover); color: var(--paper-ink); }
.store-icon { flex: none; }
.store-soon { margin: 0; padding: 12px 18px; border: 1px solid var(--nav-line); border-radius: 10px; color: var(--on-nav); font-weight: 600; }
.hero-note { margin: 16px 0 0; font-size: 0.875rem; color: var(--nav-muted); }
.hero-phone { flex: 1 1 320px; min-width: 0; display: flex; justify-content: center; }
.phone { width: 280px; max-width: 100%; padding: 18px; border: 8px solid var(--phone-frame); border-radius: 28px; background: var(--canvas); color: var(--ink); }
.phone p { margin: 0; }
.phone-day { font-size: 0.75rem; color: var(--muted); }
.phone-count { margin-bottom: 14px; font-weight: 700; font-size: 1.125rem; }
.phone-job { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.phone-job-title { font-weight: 700; font-size: 0.875rem; }
.phone .phone-job-where { margin: 4px 0 8px; font-size: 0.8125rem; color: var(--muted); }
.phone .phone-action { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--green); color: var(--on-accent); text-align: center; font-weight: 700; font-size: 0.875rem; }

.site-section { padding-top: 64px; padding-bottom: 64px; }
.hero-short { padding-bottom: 56px; }
#price { padding-top: 48px; }
.included-list { margin: 16px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 1.0625rem; line-height: 1.5; }
.section-heading { margin: 0 0 8px; font-size: 2rem; line-height: 1.2; }
.section-lead { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--muted); max-width: 680px; }
.feature-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { padding: 22px; border-radius: 14px; }
.feature h3 { margin: 12px 0 6px; font-size: 1.125rem; }
.feature p { margin: 0; color: var(--muted); line-height: 1.5; }
.feature-icon { color: var(--green); }

.price-card { padding: 36px; border-radius: 18px; display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; justify-content: space-between; }
.price-text { flex: 1 1 420px; min-width: 0; }
.price-figure { margin: 0; display: flex; flex-direction: column; }
.price-amount { font-size: 2.75rem; font-weight: 700; line-height: 1.1; color: var(--green-dark); }
.price-per { color: var(--muted); }

.book-band { background: var(--green-soft); }
.book-band .section-lead { color: var(--ink); }

.owners { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-top: 56px; padding-bottom: 56px; }

.site-footer { padding: 32px 0; font-size: 0.875rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-company { margin: 0; color: var(--nav-ink); }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--nav-ink); }
.site-footer-links a:hover { color: var(--on-nav); }

/* Find a carrier: the search, carrier and town pages, and star reviews (also on the owner's and customer's pages). */
.find-hero { background: var(--green-soft); }
.find-hero .site-section { padding-top: 48px; padding-bottom: 48px; }
.find-hero h1 { margin: 0 0 12px; font-size: 2.5rem; line-height: 1.15; }
.find-hero .hero-lead { color: var(--ink); margin-bottom: 20px; }
.find-hero .hero-note { color: var(--muted); }
.crumbs { margin-bottom: 12px; font-size: 0.875rem; color: var(--muted); }
.postcode-search { margin-top: 20px; max-width: 560px; }
.postcode-label { display: block; margin-bottom: 6px; font-weight: 700; }
.postcode-row { display: flex; flex-wrap: wrap; gap: 10px; }
.postcode-field { flex: 1 1 200px; min-width: 0; text-transform: uppercase; }
.carrier-list, .review-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.carrier-card { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 20px; }
.carrier-card-main { flex: 1 1 320px; min-width: 0; }
.carrier-card-main p { margin: 4px 0 0; }
.carrier-name { margin: 0; font-size: 1.25rem; }
.carrier-where, .carrier-takes { color: var(--muted); }
.carrier-rating { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.carrier-licence { display: inline-flex; gap: 6px; align-items: center; color: var(--green-dark); font-weight: 600; font-size: 0.9375rem; }
.licence-icon { flex: none; }
.carrier-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.carrier-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding-top: 40px; padding-bottom: 0; }
.carrier-details .card { padding: 22px; }
.carrier-details h2 { margin: 0 0 10px; font-size: 1.25rem; }
.carrier-about { margin: 12px 0 0; white-space: pre-line; }
.tick-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.trust-line { margin: 28px 0 8px; padding: 14px 16px; border-left: 4px solid var(--green); border-radius: 8px; background: var(--surface); max-width: 760px; line-height: 1.5; }
.town-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 24px; }
.town-list a { display: inline-flex; align-items: center; min-height: 44px; }
.narrow-section { max-width: 720px; }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.star { fill: var(--line); }
.star-on { fill: var(--star); }
.review { padding: 20px; }
.review-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.review-who { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; }
.review-comment { margin: 10px 0 0; white-space: pre-line; line-height: 1.5; }
.review-reply { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--canvas); }
.review-reply p { margin: 0; white-space: pre-line; }
.review-reply .review-reply-label { margin-bottom: 4px; font-weight: 700; font-size: 0.875rem; white-space: normal; }
.review-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.star-picker { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.field-short { max-width: 240px; }
.plain-list { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rate-link { align-self: flex-start; margin-top: 8px; }

@media (max-width: 700px) {
    .site-bar, .hero-inner, .site-footer-inner, .site-section, .site-band { padding-left: 16px; padding-right: 16px; }
    .find-hero h1 { font-size: 1.75rem; }
    .site-nav-button { margin-left: 0; }
    .hero { padding: 24px 0 48px; }
    .hero h1 { font-size: 2rem; }
    .section-heading { font-size: 1.5rem; }
    .site-section { padding-top: 40px; padding-bottom: 40px; }
    .price-card { padding: 24px 16px; }
}
