/* 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. */
/* Open Sans with every weight from 300 to 800, so bold text is really bold. English letters, £ and € are in the first
   file; accented letters such as Welsh ŵ or Polish Ł are in the other, which a browser only fetches when a page uses
   them. Declared first, as Google Fonts does, so a character in both ranges comes from the English file. */
@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-Variable-latin-ext.woff2") format("woff2");
    font-weight: 300 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Open Sans";
    src: url("fonts/OpenSans-Variable-latin.woff2") format("woff2");
    font-weight: 300 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

: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;
    --brand-blue: #074c88;
    --neutral-ink: #3f4b46;
    --neutral-soft: #eef2f0;
    --on-accent: #ffffff;
    --focus: #2d5f86;
    --field-line: #6b7d74;
    --ghost-line: #7d9188;
    --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-brand-blue: #7db4ea; /* The app's dark-mode CWR blue; Micro on the navy uses --nav-accent, the app's dark-mode green. */
    --nav-muted: #a9b8cc;
    --nav-line: #4a6488;
    --nav-art: #2b4365; /* The hero pictures keep their soft navy; borders on the navy use --nav-line. */
    --paper: #ffffff;
    --paper-ink: #03152f;
    --paper-hover: #e6eef8;
    --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 sign-in panel is dark in both modes. */
@media screen {
    :root[data-theme="dark"] {
        --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;
        --brand-blue: #7db4ea;
        --blue-soft: #1a2a37;
        --neutral-ink: #cccccc;
        --neutral-soft: #242424;
        --on-accent: #121212;
        --focus: #6cb6f0;
        --field-line: #777777;
        --ghost-line: #6a6a6a;
        --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 long unbroken value (an email, a reference, a web link) wraps instead of widening the page on a phone. */
    overflow-wrap: break-word;
}

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: a fixed-width side bar, the page centred beside it; below 900px a top bar with a folding Menu. */
.shell {
    --side-width: 248px;
    display: grid; grid-template-columns: var(--side-width) minmax(0, 1fr); min-height: 100vh;
    /* The side bar's colour and edge, drawn the full page height under the sticky menu. */
    background: linear-gradient(to right, var(--surface) calc(var(--side-width) - 1px), var(--line) calc(var(--side-width) - 1px) var(--side-width), transparent var(--side-width));
}

.side-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 20px 13px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.office-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); text-decoration: none; min-width: 0; }
.office-brand img { flex: none; width: 36px; height: 36px; }
.office-brand-text { display: flex; flex-direction: column; min-width: 0; }
.office-brand-name { font-weight: 700; font-size: 1.125rem; line-height: 1.2; color: var(--green-dark); }
.office-brand-cwr { color: var(--brand-blue); }
.office-brand-user { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-brand:hover { color: var(--ink); }
/* The sign-in page's name on its navy panel. */
.brand-name { color: #ffffff; font-weight: 700; font-size: 1.125rem; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--neutral-ink);
    text-decoration: none;
    font-size: 0.9375rem;
}
.nav-icon { flex: none; color: var(--muted); }
.nav-link:hover { background: var(--neutral-soft); color: var(--ink); }
.nav-link.active { background: var(--green-soft); color: var(--green-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.nav-link.active .nav-icon { color: var(--green); }
.nav-spacer { flex-grow: 1; }
.nav-form { margin: 0; }
.nav-button { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
/* The colour switch sits on the light side bar here, not the dark footer it was drawn for. */
.side-nav .theme-choice, .office-menu-panel .theme-choice { border-color: var(--line); max-width: none; }
.side-nav .theme-choice, .office-parent { flex-shrink: 0; }
.side-nav .theme-choice button { padding: 4px 6px; line-height: 1.2; }
.side-nav .theme-choice button, .office-menu-panel .theme-choice button { color: var(--neutral-ink); border-right-color: var(--line); }
.side-nav .theme-choice button:hover, .office-menu-panel .theme-choice button:hover { background: var(--neutral-soft); color: var(--ink); }
.side-nav .theme-choice button[aria-pressed="true"], .office-menu-panel .theme-choice button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-dark); }

.office-bar { display: none; }
@media (max-width: 899px) {
    .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; background: none; }
    .side-nav { display: none; }
    .office-bar {
        position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
    }
    .office-bar .office-brand { padding: 4px 0; }
    .office-menu { display: block; flex: none; }
    .office-menu .site-menu-button { border-color: var(--line); color: var(--ink); }
    .office-menu-panel {
        position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto;
        display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 16px; background: var(--surface);
        border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -16px rgb(0 0 0 / 30%);
    }
}

/* Light, Dark or Match device. It sits on the public site's dark footer, so it uses its colours (the office menus restyle it above). */
.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 {
    width: 100%;
    min-width: 0;
    max-width: 1280px;
    margin: 0 auto;
    /* Room at the foot so the last row can scroll clear of the floating Ask button. */
    padding: 32px 40px 112px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.content:focus { outline: none; }

@media (max-width: 700px) {
    .content { padding: 24px 16px 112px; }
}

/* 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(min(220px, 100%), 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; }
/* A wide panel straight on the page keeps its own height; only side by side in .columns does it grow. */
.content > .panel-wide { flex: none; }
.empty { margin: 0; }

.header-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Compliance checks on Home: the app's list, one row per check. */
.readiness-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 20px 0; }
.list-card .readiness-head h2 { padding: 0; margin: 0; }
.readiness-overview { display: flex; justify-content: space-between; gap: 12px; margin: 12px 20px 0; padding: 12px 16px; border-left: 4px solid var(--amber-ink); background: var(--amber-soft); border-radius: 6px; }
.readiness-blocked { border-left-color: var(--red-ink); background: var(--red-soft); }
.readiness-list { list-style: none; margin: 8px 0 0; padding: 0; }
.readiness-item { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.readiness-text .sub, .readiness-item > .sub { display: block; color: var(--muted); font-size: 0.8125rem; }
.readiness-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber-ink); }
.readiness-dot-ready { background: var(--green); }
.readiness-dot-blocked { background: var(--red-ink); }

/* Customers list: initial, type and contact, like the app's rows. */
.customer-cell { display: flex; gap: 12px; align-items: center; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.plain-link { color: var(--ink); }

.task-list { list-style: none; margin: 0; padding: 0; }
.task { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.task > span:not(.pill) { flex: 1 1 12rem; min-width: 0; }

/* 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; }
    /* The value column wraps a long email or reference; the label beside it keeps whole words. */
    .table-stack td { overflow-wrap: anywhere; }
    .table-stack td > * { min-width: 0; max-width: 100%; }
    .table-stack td::before { overflow-wrap: normal; }
    .table-stack .row-link { white-space: normal; }
    /* The job form's waste rows span the card while keeping the established label/value columns side by side. */
    .lines .table-stack td { width: 100%; align-items: center; }
}

.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; gap: 12px; min-height: 44px; font-size: 1.375rem; text-decoration: none; }
/* CWR and Micro in the app's colours, on the navy. */
.nav-brand-cwr { color: var(--nav-brand-blue); }
.nav-brand-micro { color: var(--nav-accent); }
.sign-in-home { align-self: flex-start; }
.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, .plan-controls .text-input {
    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; }
.cell-end { text-align: right; }
/* 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: 44px; 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; min-width: 0; }
.filter-wide { flex: 2 1 min(280px, 100%); }
.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(min(160px, 100%), 1fr)); gap: 12px; }
.facts dt { color: var(--muted); font-size: 0.8125rem; }
.facts dd { margin: 0; font-weight: 600; }
select.field { padding-right: 8px; max-width: 100%; min-width: 0; }

.panel-chart { flex: 2 1 480px; }
.chart { width: 100%; height: auto; max-height: 300px; 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; }

/* Plan picker: comfortable controls for a phone or tablet, with the selected period easy to see. */
.plan-controls { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 6px 12px; align-items: end; margin: 0 0 20px; }
.plan-people-control { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.plan-people-control .field-label { display: block; margin-bottom: 6px; }
.plan-people-picker { display: grid; gap: 8px; }
.plan-people-picker .btn { min-height: 44px; }
.plan-people-picker .text-input { width: 100%; min-width: 0; }
.segmented { display: flex; grid-column: 2; grid-row: 1 / span 2; flex-wrap: wrap; gap: 8px; }
.segmented-option {
    flex: 1 1 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--ghost-line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.segmented-option:hover { border-color: var(--green); }
.segmented-option--on, .segmented-option--on:hover { background: var(--green); border-color: var(--green); color: var(--on-accent); }

@media (max-width: 700px) {
    .plan-controls { grid-template-columns: minmax(0, 1fr); }
    .plan-people-control { grid-column: 1; grid-row: 1 / span 2; }
    .segmented { grid-column: 1; grid-row: 3; }
}

/* 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: 44px; font-size: 0.9375rem; max-width: 100%; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.job-form { padding: 24px; max-width: 1080px; 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; min-width: 0; }
.form-row > .stack:has(> #driver), .form-row > .stack:has(> #vehicle) { flex: 1.4 1 240px; }
.lines .field { width: 100%; min-height: 44px; font-size: 0.9375rem; }
.lines textarea.field { min-height: 44px; padding: 8px 14px; resize: vertical; }
.lines .line-code { width: 190px; }
.lines .line-quantity { width: 90px; }
.ewc-picker-host { position: relative; }
.field-group { display: flex; flex-direction: column; gap: 12px; }
.field-group[hidden] { display: none; }
[data-facility-details] .field[readonly] { background: var(--line-soft); }
.address-finder.is-off { display: none; }
.ewc-picker { position: absolute; z-index: 20; margin: 0; padding: 4px 0; list-style: none; max-height: 320px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--field-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.ewc-picker[hidden] { display: none; }
.ewc-picker [role="option"] { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; cursor: pointer; }
.ewc-picker [role="option"]:hover, .ewc-picker [aria-selected="true"] { background: var(--green-soft); }
.ewc-picker-code { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ewc-picker-words { flex: 1 1 auto; }
.ewc-picker-hazard { flex: 0 0 auto; font-size: 0.8125rem; font-weight: 700; color: var(--red-ink); }
.ewc-picker-none { padding: 10px 14px; color: var(--muted); }
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(min(320px, 100%), 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(min(260px, 100%), 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(min(220px, 100%), 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(min(200px, 100%), 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) .office-bar, .shell:has(.day-sheet) .skip-link, .shell:has(.day-sheet) ~ .ask-widget { 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; }

/* The usual blue focus ring is too dark on the navy sign-in panel, so it turns white there. */
.sign-in-intro :focus-visible { outline-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). */
.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(min(260px, 100%), 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(min(200px, 100%), 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; }

/* Waste codes: the search page and the job form's waste rows, as in the app. */
.quick-terms { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.quick-terms[hidden] { display: none; }

/* Wraps at large text: the description takes its own line, quantity and price share the next. */
.extra-charge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.extra-charge-row .field { min-width: 0; width: 100%; }
.extra-charge-row [data-extra-description] { flex: 1 1 12rem; width: auto; }
.extra-charge-row [data-extra-quantity] { flex: 0 0 4.5rem; width: auto; }
.extra-charge-row [data-extra-price] { flex: 1 0 6rem; width: auto; max-width: 9rem; }
.extra-charge-row .visually-hidden { position: absolute; }
.ewc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ewc-item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.ewc-item p { margin: 0 0 4px; }
.ewc-code { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ewc-description::first-letter { text-transform: uppercase; }
.ewc-questions { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.875rem; }
.ewc-notes { padding: 8px 20px; display: flex; flex-direction: column; gap: 8px; }
.ewc-notes p { margin: 0; }
.ewc-warning { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber-ink); }
.ewc-row-notes { padding: 8px 0; }
.ewc-row-notes p { margin: 4px 0 0; }
@media (max-width: 700px) {
    .ewc-item { grid-template-columns: 1fr; gap: 4px; }
}

/* Ask CWR: a floating button over every office page, dragged anywhere; its box opens beside it. */
.ask-widget { position: fixed; right: 20px; bottom: 20px; z-index: 50; }
.ask-button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px 8px;
    border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); text-decoration: none; cursor: grab; user-select: none;
    /* Only the button drags; the open box keeps touch scrolling for long answers. */
    touch-action: none;
}
.ask-button:hover { border-color: var(--green); }
.ask-button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.ask-widget.is-dragging .ask-button { cursor: grabbing; }
.ask-button-label { font-weight: 700; font-size: 0.875rem; line-height: 1; }
.ask-button-logo { display: block; width: 48px; height: 48px; border-radius: 12px; pointer-events: none; }
.ask-panel {
    position: absolute; right: 0; bottom: calc(100% + 10px); width: min(420px, calc(100vw - 32px));
    max-height: min(70vh, 640px); overflow: auto; padding: 14px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
.ask-panel[hidden] { display: none; }
.ask-widget.opens-down .ask-panel { bottom: auto; top: calc(100% + 10px); }
.ask-widget.opens-right .ask-panel { right: auto; left: 0; }
.ask-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-panel-head h2 { margin: 0; font-size: 1.125rem; }
.ask-close { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.ask-form { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; margin-top: 6px; }
.ask-form .field-label { grid-column: 1 / -1; }
.ask-form .field { min-width: 0; }
.ask-form[hidden], .ask-note[hidden] { display: none; }
.ask-answer:empty { display: none; }
.ask-answer { margin-top: 10px; }
.ask-answer h3 { margin: 0 0 4px; font-size: 1rem; }
.ask-answer p { margin: 0 0 8px; }
.ask-page-answer > p { padding: 0 20px; }
.ask-waste-codes td:first-child { white-space: nowrap; }
.ask-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-blue); font-weight: 700; }
.ask-link:hover { color: var(--ink); }
.ask-left:empty { display: none; }
.ask-note { margin-top: 10px; }
@media (max-width: 600px) {
    .ask-panel { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; max-height: 75vh; }
    .ask-widget.opens-down .ask-panel, .ask-widget.opens-right .ask-panel { left: 16px; right: 16px; top: auto; bottom: 16px; }
}

/* Job page: a clear way back, and the job card in tidy groups (where and when, vehicle and driver, money). */
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: -16px; font-weight: 600; text-decoration: none; }
.back-link::before { content: "\2190"; }
.back-link:hover { text-decoration: underline; }
.job-card { padding-bottom: 4px; }
.job-card > .facts-group { margin: 0; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.job-card > .form-error, .job-card > .ewc-warning { margin: 0 20px 16px; }
.job-card > .fine-print { margin: 0 20px 16px; }
/* panel-wide drops the side padding for full-width tables; this card has none, so its text gets it back. */
.handover-card > :not(h2) { margin-left: 20px; margin-right: 20px; }
.job-card .facts { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 16px 24px; }
.job-card .facts dd { overflow-wrap: anywhere; }
.facts-wide { grid-column: 1 / -1; }
.facts .facts-text { font-weight: 400; white-space: pre-line; }
.facts .plain-list { margin: 0; padding: 0; list-style: none; gap: 2px; }
.assign-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px 24px; align-items: end; background: var(--canvas); }
.assign-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.assign-field .field { width: 100%; min-height: 44px; }
.assign-actions { grid-column: 1 / -1; display: flex; }
@media (max-width: 700px) {
    .assign-panel { grid-template-columns: 1fr; }
    .assign-actions .btn { width: 100%; }
}

/* Shared pieces some office pages use (Help, Insurance, Plan, forms) that had no styles of their own. */
.card-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.card-heading h2 { margin: 0; }
.list-card > .card-heading { padding: 0; }
.list-card > .muted { margin: 12px 20px 20px; }
.clean-list { list-style: none; margin: 12px 0 0; padding: 0; }
.row-card { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.row-card > div:first-child { flex: 1 1 260px; min-width: 0; }
.row-card p { margin: 4px 0 0; }
.panel .clean-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.panel .row-card { display: block; padding: 0; border: 0; }
.inline-form > summary { list-style: none; cursor: pointer; }
.inline-form > summary::-webkit-details-marker { display: none; }
.inline-form[open] > summary { margin-bottom: 12px; }
.inline-form[open] { flex-basis: 100%; }
.panel .inline-form > summary { width: 100%; justify-content: flex-start; }
.panel .guide-card { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: block; line-height: 1.5; }
.panel .guide-card h3 { margin: 0 0 6px; font-size: 1rem; }
.panel .guide-card p { margin: 0 0 6px; }
.plain-fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plain-fieldset legend { font-weight: 700; padding: 0 0 8px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.plan-card h3 { margin: 0 0 8px; font-size: 1.125rem; }
.plan-card .big-number { margin-bottom: 4px; }
.plan-card ul { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.plan-actions form { margin: 0; }
.detail-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px 24px; }
.detail-list dt { color: var(--muted); font-size: 0.8125rem; }
.detail-list dd { margin: 0; font-weight: 600; }
.panel .row-card:has(> details[open]) { grid-column: 1 / -1; }
.dwt-form { max-width: 420px; }
.dwt-form .hint { margin-top: -6px; }

.office-parent { display: grid; gap: 6px; margin: 4px 8px; padding: 8px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 0.8125rem; line-height: 1.4; }
.office-parent:hover, .office-parent:focus-visible { background: var(--neutral-soft); }
.office-parent .cwr-logo { width: 160px; padding: 8px 10px; }
@media (max-width: 700px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tile { padding: 14px; }
    .tile-value { font-size: 1.5rem; }
}
/* Long option text or large text never pushes a form wider than the screen. */
.field { min-width: 0; max-width: 100%; }
select.field { text-overflow: ellipsis; }
.inline-form > summary.btn { white-space: normal; text-align: left; }
.facts > div { min-width: 0; }
.facts dd { overflow-wrap: anywhere; }
