
@font-face { font-family: Jost; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/jost.woff2) format('woff2'); }
body { margin: 0; }
.card[id] { scroll-margin-top: 96px; }
/* for keyboard users: the first Tab on any page shows a link past the header and menu (13 Nov review) */
.skip { position: absolute; left: -999px; top: 0; z-index: 30; padding: 10px 14px; background: var(--card); color: var(--ink); border: 2px solid var(--ink); }
.skip:focus { left: 8px; top: 8px; }
main:focus { outline: none; }
/* what's next on a job, under its heading: four short facts in a row on a wide screen, stacked on a phone */
/* The top bar (Tim, 17 Nov): white in light mode (option C's colours), dark slate teal in dark mode (options A and B) */
.hub-head { --bar: var(--card); --bar-ink: var(--ink); --bar-muted: var(--muted); --bar-hover: var(--chip); --bar-line: var(--line);
  position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); font-family: var(--font); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-head { --bar: #2f4a4c; --bar-ink: #fff; --bar-muted: #d9e2dc; --bar-hover: #3d5c5e; --bar-line: #3d5c5e; } }
:root[data-theme="dark"] .hub-head { --bar: #2f4a4c; --bar-ink: #fff; --bar-muted: #d9e2dc; --bar-hover: #3d5c5e; --bar-line: #3d5c5e; }
.hub-top { display: flex; align-items: center; gap: 8px 20px; min-height: 56px; padding: 0 20px; background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); font-size: 15px; line-height: 1.4; }
.hub-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--bar-ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.hub-brand img { width: 24px; height: 24px; display: block; }
.hub-count { display: inline-block; background: #8c6239; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 0 7px; margin-left: 6px; }
.hub-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skel { display: block; height: 12px; margin: 10px auto; max-width: 420px; background: linear-gradient(90deg, var(--chip), var(--line), var(--chip)); background-size: 200% 100%; animation: hub-shimmer 1.4s infinite; }
.skel.short { max-width: 260px; }
@keyframes hub-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hub-drop a > span:not(.hub-count), .hub-sidebar a > span:not(.hub-count), .hub-menu-list a > span:not(.hub-count), .hub-nav > a > span:not(.hub-count) { flex: 1; }
.hub-nav > a { gap: 8px; }
.hub-side-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 20px 7px; border-top: 1px solid var(--bar-line); color: var(--bar-muted); font-size: 14px; }
.hub-side-more > summary::-webkit-details-marker { display: none; }
.hub-side-more > summary .ico { transition: transform .15s; }
.hub-side-more[open] > summary .ico { transform: rotate(90deg); }
.hub-side-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--bar-line); }
.hub-nav { display: flex; align-self: stretch; gap: 2px; }
.hub-nav > a, .hub-group > summary { display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--bar-muted); text-decoration: none; font-weight: 500;
  border-bottom: 3px solid transparent; cursor: pointer; list-style: none; }
.hub-group > summary::-webkit-details-marker { display: none; }
.hub-group > summary::after { content: '\25BE'; font-size: 11px; margin-left: 6px; }
.hub-nav > a:hover, .hub-group > summary:hover, .hub-group[open] > summary { color: var(--bar-ink); background: var(--bar-hover); }
.hub-nav > a[aria-current="page"], .hub-group > summary.on { color: var(--bar-ink); border-bottom-color: var(--timber); }
.hub-group { position: relative; display: flex; }
.hub-drop, .hub-you-panel { position: absolute; z-index: 30; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.18); display: grid; }
.hub-drop { top: 100%; left: 0; min-width: 240px; padding: 6px 0; }
.hub-drop a, .hub-you-panel > a, .hub-sidebar a, .hub-menu-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; }
.hub-drop a { padding: 10px 16px; color: var(--ink); }
.hub-drop a:hover, .hub-you-panel > a:hover { background: var(--chip); }
.hub-drop a[aria-current="page"] { background: var(--sel); font-weight: 600; }
.hub-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.hub-find { margin: 0; }
.hub-find input { width: 260px; height: 36px; padding: 0 10px; border: 1px solid var(--bar-line); background: var(--bar-hover); color: var(--bar-ink); font: 400 14px var(--font); }
.hub-find input::placeholder { color: var(--bar-muted); }
.hub-you { position: relative; }
.hub-you > summary { list-style: none; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.hub-you > summary::-webkit-details-marker { display: none; }
.hub-you > summary { position: relative; }
.hub-you > summary .hub-count { position: absolute; top: -7px; right: -9px; margin: 0; }
.hub-you-panel { right: 0; top: 46px; width: 280px; font-size: 15px; }
.hub-you-panel > * { padding: 10px 16px; margin: 0; }
.hub-you-panel > a { color: var(--ink); }
.hub-you-who { border-bottom: 1px solid var(--line); }
.hub-you-who small { display: block; color: var(--muted); font-size: 13px; }
.hub-pick { display: flex; align-items: center; gap: 6px; }
.hub-pick span { margin-right: auto; }
.hub-pick button { min-height: 0; padding: 3px 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 13px var(--font); cursor: pointer; }
.hub-pick button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hub-you-panel .report-link { border-top: 1px solid var(--line); }
.hub-you-panel button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
/* the side menu, the usual on a computer (option B); the top bar is the choice under You. Dark slate teal in light and
   dark mode alike (Tim, 17 Nov: light mode exactly as option B), so its mark is white too */
body:has(.hub-side-on) { padding-left: 220px; }
.hub-sidebar { --bar: #2f4a4c; --bar-ink: #fff; --bar-muted: #d9e2dc; --bar-hover: #3d5c5e; --bar-line: #3d5c5e; position: fixed; left: 0; top: 0; bottom: 0; width: 220px; overflow-y: auto; z-index: 21; background: var(--bar); border-right: 1px solid var(--bar-line); padding: 16px 0; display: flex; flex-direction: column; }
.hub-sidebar .hub-brand { padding: 0 20px 10px; justify-content: flex-start; }
.hub-sidebar .hub-brand img { filter: brightness(0) invert(1); }
/* group headings: bronze, with a line between groups, so they read as headings and not as links (Tim, 17 Nov) */
.hub-sidebar h2 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #e0bb94; margin: 12px 0 4px; padding: 12px 20px 0; border-top: 1px solid var(--bar-line); cursor: default; }
.hub-sidebar .hub-brand + h2 { border-top: 0; padding-top: 4px; }
.hub-sidebar a:not(.hub-brand) { padding: 7px 20px; color: var(--bar-ink); font-size: 15px; }
.hub-sidebar a:not(.hub-brand):hover { background: var(--bar-hover); }
.hub-sidebar a[aria-current="page"] { background: var(--bar-hover); border-left: 3px solid var(--timber); padding-left: 17px; font-weight: 600; }
/* the outside site's own line for who's signed in */
.hub-me { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--bar-muted); font-size: 13px; }
.hub-me a, .hub-me button.link { color: var(--bar-muted); }
.hub-me a:hover, .hub-me button.link:hover { color: var(--bar-ink); }
.hub-me form { display: inline; margin: 0; }
.hub-me button.link { background: none; border: 0; padding: 0; min-height: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.hub-section .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 16px; }
.hub-section .name { font-size: 17px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink); margin: 0 auto 0 0; display: flex; align-items: center; gap: 10px; }
.hub-section .name .stage { letter-spacing: 0; text-transform: none; }
.hub-section .tabs { display: flex; flex-wrap: wrap; gap: 2px; border: 0; margin: 0; }
.hub-section .tabs a, .hub-section .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; min-height: 0; color: var(--muted);
  font: 500 17px/1.45 var(--font); text-decoration: none; cursor: pointer; margin: 0; }
.hub-section .tabs a:hover, .hub-section .tabs button:hover { color: var(--ink); background: none; }
.hub-section .tabs [aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
/* the Schedule's view switch (Day, Week, Build calendar, Team), the counts on To do and Clashes, and the ? for How to use, on the Schedule and its Day list */
.hub-section .tabs .vsw { display: inline-flex; border: 1px solid var(--line); margin-right: 10px; align-self: center; }
.hub-section .tabs .vsw > * { padding: 5px 10px; border: 0; border-bottom: 0; font-size: 13px; color: var(--muted); text-decoration: none; }
.hub-section .tabs .vsw > * + * { border-left: 1px solid var(--line); }
.hub-section .tabs .vsw > [aria-current="page"] { background: var(--sel); color: var(--ink); }
.hub-section .tabs .n { display: inline-block; min-width: 1.5em; padding: 0 5px; margin-left: 2px; background: var(--chip); font-size: 13px; text-align: center; }
.hub-section .tabs .n:empty { display: none; }
.hub-section .tabs .n.on { background: var(--warn-bg); color: var(--warn); }
.hub-section .tabs .helpq { border: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px 9px; margin-left: 6px; align-self: center; }
.hub-section .name .ref { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: 6px; white-space: nowrap; }
.hub-section .subtabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; }
.hub-section .subtabs a { padding: 3px 10px; font-size: 14px; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.hub-section .subtabs a:hover { color: var(--ink); }
.hub-section .subtabs [aria-current="page"] { color: var(--ink); border-color: var(--line); background: var(--card, transparent); }
.hub-section .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* a job's Schedule, Payments and Aftercare tabs: the Hub's own cards under the Schedule's page (src/pages/jobwork.js) */
.hub-after > .card { margin-top: 14px; }
.hub-after:last-child, .hub-after { margin-bottom: 24px; }
/* forms and lists in the Hub's cards under the Schedule's page (crew to-do lists, Batch 3), which has no app.css */
.hub-after form.stack { display: grid; gap: 8px; max-width: 560px; margin: 8px 0; }
.hub-after form.stack label { display: grid; gap: 4px; }
.hub-after form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0 4px; }
.hub-after ul.plain { list-style: none; padding: 0; margin: 4px 0 10px; }
.hub-after ul.plain li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.hub-after h3 { font-size: 14px; margin: 12px 0 2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-brand img { filter: brightness(0) invert(1); } }
:root[data-theme="dark"] .hub-brand img { filter: brightness(0) invert(1); }
@media (max-width: 700px) { .hub-head { position: static; } body:has(.hub-side-on) { padding-left: 0; } .hub-sidebar, .hub-find { display: none; } .hub-section .tabs a, .hub-section .tabs button { font-size: 15px; padding: 6px 8px; }
  /* phones: each menu and row of tabs is one line that scrolls sideways, rather than half the screen */
  .hub-nav, .hub-section .tabs, .hub-section .subtabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hub-nav::-webkit-scrollbar, .hub-section .tabs::-webkit-scrollbar, .hub-section .subtabs::-webkit-scrollbar { display: none; }
  .hub-nav a, .hub-section .tabs a, .hub-section .tabs button, .hub-section .subtabs a { flex: none; white-space: nowrap; }
  /* a faded right edge says the row scrolls; the person's menu folds behind their initials */
  .hub-nav, .hub-section .tabs, .hub-section .subtabs { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 24px; }
  .hub-top { gap: 10px; min-height: 52px; padding: 0 10px; }
  .hub-top .hub-nav { display: none; }
  .hub-section .row { padding: 6px 10px; gap: 4px 10px; }
  .hub-section .name { font-size: 15px; }
}
/* phones: the menu behind a Menu button (R4, 13 Nov), in the groups */
.hub-menu { position: relative; }
.hub-menu > summary { list-style: none; cursor: pointer; padding: 5px 12px; min-height: 36px; border: 1px solid var(--bar-line); background: var(--bar-hover); color: var(--bar-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.hub-menu > summary::-webkit-details-marker { display: none; }
.hub-menu > summary::before { content: ''; width: 14px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.hub-menu .hub-menu-list { position: absolute; left: 0; top: 42px; z-index: 30; background: var(--card); border: 1px solid var(--line); display: grid; min-width: 260px; max-height: 75vh; overflow-y: auto; box-shadow: 0 6px 18px rgba(0,0,0,.15); padding-bottom: 8px; }
.hub-menu-list h2 { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--chip); margin: 8px 0 0; padding: 8px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hub-menu .hub-menu-list a { padding: 11px 16px; color: var(--ink); font-size: 16px; }
.hub-menu .hub-menu-list a[aria-current="page"] { border-left: 3px solid var(--timber); padding-left: 13px; background: var(--sel); font-weight: 600; }
@media (min-width: 701px) { .hub-menu { display: none; } }
@media print { .hub-head { display: none; } }
/* Report a problem's round button and the helper's chat panel (Tim, 11 Nov), on every staff page and the Schedule */
.helper-button { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 35; width: 52px; height: 52px;
  border-radius: 50% !important; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.22); text-decoration: none; }
.helper-button:hover { background: var(--accent-dark, var(--accent)); color: var(--accent-ink); }
.helper-button:focus-visible { outline: 3px solid var(--timber, var(--accent)); outline-offset: 2px; }
.helper-button svg { width: 26px; height: 26px; }
.helper-button.helper-raised { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
.helper-panel { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); z-index: 36; width: min(390px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--card); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.28); font: 15px/1.45 var(--font); }
.helper-raised ~ .helper-panel, .helper-panel.helper-raised { bottom: calc(env(safe-area-inset-bottom, 0px) + 160px); }
.helper-panel[hidden], .helper-panel [hidden] { display: none !important; }
.helper-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--chip); }
.helper-head h2 { margin: 0 auto 0 0; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.helper-close { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 6px; min-height: 0; cursor: pointer; }
.helper-about { margin: 0; padding: 8px 12px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.helper-log { flex: 1 1 auto; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.helper-msg { margin: 0; padding: 8px 10px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.helper-them { background: var(--chip); align-self: flex-start; }
.helper-you { background: var(--accent); color: var(--accent-ink); align-self: flex-end; }
.helper-note { margin: 0; color: var(--muted); font-size: 13px; }
.helper-choose, .helper-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.helper-summary { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.helper-summary label { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.helper-summary textarea, .helper-summary select, .helper-reply textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 6px 8px; }
.helper-reply { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; border-top: 1px solid var(--line); margin: 0; }
.helper-reply textarea { flex: 1 1 auto; resize: vertical; min-height: 44px; }
.helper-foot { margin: 0; padding: 6px 12px 10px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.helper-foot .helper-again { color: var(--muted); font-size: 13px; min-height: 0; padding: 0; }
.helper-foot a { color: var(--muted); }
@media (max-width: 700px) {
  .helper-button { width: 42px; height: 42px; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
  .helper-button svg { width: 21px; height: 21px; }
  .helper-button.helper-raised { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
  .helper-panel, .helper-raised ~ .helper-panel { left: 8px; right: 8px; width: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 62px); max-height: calc(100vh - 80px); }
}
@media print { .helper-button, .helper-panel { display: none !important; } }

/* the job's stage line and Next action (Tim, 26 Nov) */
.stage-line { display: flex; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: st; overflow-x: auto; }
.stage-line li { flex: 1; min-width: 84px; position: relative; text-align: center; font-size: 13px; color: var(--muted); padding-top: 30px; }
.stage-line li::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 3px; background: var(--line); }
.stage-line li:first-child::before { left: 50%; } .stage-line li:last-child::before { right: 50%; }
.stage-line li::after { counter-increment: st; content: counter(st); position: absolute; top: 0; left: calc(50% - 12px); width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); box-sizing: border-box; }
.stage-line li.done { color: var(--ink); } .stage-line li.done::before { background: var(--accent); }
.stage-line li.done::after { content: "\2713"; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stage-line li.now { color: var(--ink); font-weight: 600; } .stage-line li.now::before { background: linear-gradient(90deg, var(--accent) 50%, var(--line) 50%); }
.stage-line li.now::after { border-color: var(--timber); color: var(--timber); box-shadow: 0 0 0 4px rgba(177, 131, 88, .18); }
.next-strip { border-left: 4px solid var(--timber); }
.ready-warn { border-left: 4px solid var(--timber); } .ready-warn p { margin: 4px 0; }
/* folded cards with a summary in the heading (Tim, 29 Nov) */
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-height: 44px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary .sum { margin-left: auto; color: var(--muted); font-size: 14px; }
details.fold > summary::after { content: '\25BE'; color: var(--muted); }
details.fold[open] > summary::after { content: '\25B4'; }
details.fold[open] > summary { margin-bottom: 8px; }
/* coming back to a group after a save: leave room above it for the saved message */
details.fold[id], #checks { scroll-margin-top: 110px; }
details.fold > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.datebox { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; margin: 0 0 12px; }
.datebox .label { grid-column: 1 / -1; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.datebox .big { font-size: 34px; font-weight: 600; line-height: 1; color: var(--accent); }
.next-main { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.next-ico { width: 42px; height: 42px; display: grid; place-items: center; background: rgba(177, 131, 88, .15); color: var(--timber); }
.next-ico .ico { width: 22px; height: 22px; }
.next-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.next-what h2 { margin: 2px 0 4px; font-size: 19px; text-transform: none; letter-spacing: 0; }
.next-meta { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; font-size: 14px; }
.next-meta dt { color: var(--muted); } .next-meta dt::after { content: ":"; } .next-meta dd { margin: 0 0 0 -12px; }
.next-who { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.next-who > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .next-main { grid-template-columns: auto 1fr; } .next-go { grid-column: 1 / -1; justify-self: start; } }
/* Today (Tim, 26 Nov) */
.today-hello { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.today-hello h2 { font-size: 24px; margin: 0; text-transform: none; letter-spacing: 0; }
.today-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 16px; }
.today-tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.today-tile strong { font-size: 28px; line-height: 1.1; } .today-tile span { color: var(--muted); font-size: 14px; }
.today-tile.hot { border-color: var(--timber); background: rgba(177, 131, 88, .12); }
.today-tile:hover { border-color: var(--accent); }
.today-next h2 { display: flex; align-items: center; gap: 8px; }
.today-next li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.today-next li:first-child { border-top: 0; }
@media (max-width: 560px) { .today-next li { flex-wrap: wrap; } .today-next li .today-what { flex-basis: 100%; } .today-next li .button { margin-left: auto; } }
.today-what { flex: 1; min-width: 0; } .today-what small { display: block; color: var(--muted); }
.today-next details > summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.today-group { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 2px; }
.today-group.hold { color: var(--bad); } .today-group.warn { color: var(--warn); }
.today-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.today-cols > div > .card, .today-cols > .card { margin: 0; }
@media (max-width: 1180px) { .today-cols { grid-template-columns: 1fr; } .today-day { order: -1; } }
/* a long to-do (a handover pack's whole list) kept to three lines: the rest is a click away */
.today-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.today-day h2 { display: flex; align-items: center; gap: 8px; }
.today-day li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.today-day li:first-child { border-top: 0; } .today-day li small { display: block; color: var(--muted); }
.today-when { font-weight: 600; color: var(--accent); }
.today-dash { margin-top: 16px; }
.today-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.today-cards > .card { margin: 0; }
.tag { font-size: 12px; font-weight: 600; padding: 1px 8px; white-space: nowrap; }
.tag.late { background: var(--bad-bg); color: var(--bad); } .tag.today { background: rgba(177, 131, 88, .18); color: #8c6239; } .tag.soon { background: var(--chip); color: var(--muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 18px 8px; }
.empty-state .ico { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.4; }
/* small touches (Tim, 26 Nov): a tick that pops, a short burst for an order accepted or a handover */
input[type=checkbox]:checked { animation: hub-pop .25s ease; }
@keyframes hub-pop { 0% { transform: scale(.7); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
button[aria-busy="true"] { opacity: .7; cursor: progress; }
.notice.celebrate { position: relative; overflow: hidden; font-weight: 600; }
.celebrate .bits i { position: absolute; top: -10px; width: 7px; height: 7px; border-radius: 2px; background: var(--timber); animation: hub-fall 1.6s ease-in forwards; }
.celebrate .bits i:nth-child(3n) { background: var(--accent); } .celebrate .bits i:nth-child(4n) { background: #2f6b3a; }
.celebrate .bits i:nth-child(1) { left: 4%; animation-delay: 0.00s; }
.celebrate .bits i:nth-child(2) { left: 11%; animation-delay: 0.08s; }
.celebrate .bits i:nth-child(3) { left: 18%; animation-delay: 0.16s; }
.celebrate .bits i:nth-child(4) { left: 25%; animation-delay: 0.24s; }
.celebrate .bits i:nth-child(5) { left: 32%; animation-delay: 0.32s; }
.celebrate .bits i:nth-child(6) { left: 39%; animation-delay: 0.00s; }
.celebrate .bits i:nth-child(7) { left: 46%; animation-delay: 0.08s; }
.celebrate .bits i:nth-child(8) { left: 53%; animation-delay: 0.16s; }
.celebrate .bits i:nth-child(9) { left: 60%; animation-delay: 0.24s; }
.celebrate .bits i:nth-child(10) { left: 67%; animation-delay: 0.32s; }
.celebrate .bits i:nth-child(11) { left: 74%; animation-delay: 0.00s; }
.celebrate .bits i:nth-child(12) { left: 81%; animation-delay: 0.08s; }
.celebrate .bits i:nth-child(13) { left: 88%; animation-delay: 0.16s; }
.celebrate .bits i:nth-child(14) { left: 95%; animation-delay: 0.24s; }
@keyframes hub-fall { to { transform: translateY(90px) rotate(320deg); opacity: 0; } }
/* the Settings home (Tim, 26 Nov) */
.set-find { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); padding: 8px 14px; margin: 0 0 16px; max-width: 640px; }
.set-find input[type=search] { border: 0; box-shadow: none; background: none; flex: 1; padding: 4px 0; font: inherit; color: var(--ink); min-width: 0; }
.set-find input:focus { outline: none; } .set-find:focus-within { outline: 2px solid var(--timber); outline-offset: 2px; }
.wn h3 { margin-top: 8px; } .wn h4 { margin: 0; font-size: 1rem; }
.wn-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.wn-counts div { background: var(--card); padding: 8px 10px; text-align: center; } .wn-counts b { display: block; font-size: 1.4rem; font-weight: 500; } .wn-counts span { font-size: 0.8rem; color: var(--muted); }
.wn-try { border: 1px solid #b18358; padding: 12px 14px; }
.wn-shot { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.wn-feature { display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 12px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); }
.wn-feature:not(:has(img)) { grid-template-columns: 1fr; }
@media (max-width: 600px) { .wn-feature { grid-template-columns: 1fr; } }
.wn-tag { font-size: 0.75rem; font-weight: 600; padding: 1px 7px; margin-left: 6px; vertical-align: 2px; background: var(--chip, #eef2ef); }
.wn-ticks { list-style: none; padding: 0; } .wn-ticks li { padding: 5px 0 5px 22px; position: relative; } .wn-ticks small { color: var(--muted); }
.wn-ticks li::before { position: absolute; left: 2px; font-weight: 700; } .wn-done li::before { content: "\2713"; } .wn-open li::before { content: "\2022"; }
.needs-you { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #f5ece3; padding: 12px 14px; margin: 0 0 16px; }
.needs-you a { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); padding: 4px 10px; text-decoration: none; color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .needs-you { background: #2e261e; } } :root[data-theme="dark"] .needs-you { background: #2e261e; }
.set-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.set-area h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0 0 4px; }
.set-ico { width: 34px; height: 34px; display: grid; place-items: center; background: var(--sel); color: var(--accent-dark); flex: none; }
.set-area > p { margin: 0 0 8px; font-size: 14px; }
.set-area li { border: 0; padding: 0; margin: 0; }
.set-area li a { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.set-area li a:hover span { text-decoration: underline; }
.set-area li small { color: var(--muted); font-size: 13px; }
.set-area details > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 8px 0 0; }
[data-hidden] { display: none !important; }

/* Colours: the Schedule's (src/static/schedule), light and dark. Dark follows the device unless someone picks Light or
   Dark in the header (the hub_theme cookie, set on the html element as data-theme). */
:root {
  --bg: #f3f6f4; --card: #fff; --ink: #22302f; --muted: #5c6b6a; --line: #d9e2dc; --chip: #eef2ef; --sel: #e3ecea;
  --accent: #4b6a6d; --accent-ink: #fff; --accent-dark: #3a5457; --timber: #b18358;
  --bad: #b3261e; --bad-bg: #fbe9e7; --warn: #8a5a00; --warn-bg: #fff3d6; --ok: #2f6b3a; --mark: none;
  --font: Jost, "Futura PT", Futura, "Century Gothic", "Avenir Next", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141917; --card: #1b211e; --ink: #e6ebe7; --muted: #9da8a1; --line: #2c3530; --chip: #222a26; --sel: #1f2d26;
  --accent: #93b6b8; --accent-ink: #0e1a1a; --accent-dark: #b4d0d1; --timber: #d0a57c;
  --bad: #f2b8b5; --bad-bg: #3a1f1d; --warn: #f0c96b; --warn-bg: #332a12; --ok: #9bd3a4; --mark: brightness(0) invert(1); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #141917; --card: #1b211e; --ink: #e6ebe7; --muted: #9da8a1; --line: #2c3530; --chip: #222a26; --sel: #1f2d26;
  --accent: #93b6b8; --accent-ink: #0e1a1a; --accent-dark: #b4d0d1; --timber: #d0a57c;
  --bad: #f2b8b5; --bad-bg: #3a1f1d; --warn: #f0c96b; --warn-bg: #332a12; --ok: #9bd3a4; --mark: brightness(0) invert(1); color-scheme: dark; }

* { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

main { max-width: 1840px; margin: 0 auto; padding: 22px 24px 70px; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1 { font-size: 30px; margin: 4px 0 16px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 24px 0 10px; font-weight: 500; }
.card h2:first-child, .card > details > summary + * h2 { margin-top: 0; }
h3 { font-size: 17px; margin: 20px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); padding: 16px 22px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.notice { background: var(--sel); border-left: 3px solid var(--accent); padding: 10px 14px; margin-bottom: 16px; }
.notice.done { border-left-color: var(--ok); }
/* the phone app's notes (src/static/app.js.txt): what's waiting to send, pinned to the foot of the screen, clear of the helper's button */
.phone-notes { position: fixed; left: max(8px, env(safe-area-inset-left, 0px)); right: calc(max(16px, env(safe-area-inset-right, 0px)) + 60px); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 34; display: grid; gap: 6px; }
.phone-notes > * { margin: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); background-color: var(--card); }
.phone-notes .notice { background: var(--sel); }
.install-pic { max-width: 100%; height: auto; border: 1px solid var(--line); }
/* the diary on the booking form (src/pages/diary.js): a line a day, its free times as small buttons */
.diary { border-top: 1px solid var(--line); margin-top: 8px; }
.diary-days li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.diary .slot { padding: 2px 8px; margin: 4px 4px 0 0; font-size: 13px; min-height: 0; }
.diary .slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 14px; margin-bottom: 16px; }
.warn-text { color: var(--bad); font-size: 13px; }
/* a form's problems (R5, src/formerrors.js): one summary at the top linking to each field, and the fields marked */
.error-summary { border: 3px solid var(--bad); background: var(--bad-bg); padding: 12px 18px; margin-bottom: 16px; }
.error-summary h2 { margin: 0 0 6px; font-size: 18px; color: var(--bad); }
.error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.error-summary a { color: var(--bad); font-weight: 600; }
[aria-invalid="true"] { border: 2px solid var(--bad) !important; }
:target[aria-invalid="true"] { outline: 3px solid var(--accent); }
.matches { list-style: none; padding: 0; }
.matches li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.matches button { margin-top: 6px; }
/* what to do next when a list or tab is empty (R5) */
.next-step { margin: 8px 0 0; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; font-size: 13px; color: var(--muted); white-space: nowrap; }
tbody tr:hover td { background: var(--chip); }
th a.sort { color: inherit; text-decoration: none; display: block; }
th a.sort:hover, th a.sort.on { color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
td:first-child a { white-space: nowrap; font-weight: 500; }
dl.fields { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 16px; margin: 0; }
dl.fields dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
dl.fields dd { margin: 0; }
dl.fields + dl.fields { margin-top: 8px; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
.stage { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid var(--line); background: var(--chip); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.stage.cancelled { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); font-weight: 600; }
table.narrow { width: auto; min-width: 0; }
table.narrow td:not(:first-child), table.narrow th:not(:first-child) { text-align: right; }
tr.sub td:first-child { padding-left: 28px; color: var(--muted); }
p.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
p.chips a.stage { text-decoration: none; gap: 6px; }
p.chips a.stage[aria-current] { background: var(--sel); border-color: var(--accent); }
h1 .stage { font-size: 14px; margin-left: 8px; }

form.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
label { display: block; font-size: 13px; color: var(--muted); }
select, input[type=email], input[type=text], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], input[type=search], input[type=number], textarea {
  font: inherit; font-size: 15px; min-height: 38px; padding: 6px 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
select:focus, input:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { width: 100%; min-height: 96px; }
small { display: block; margin-top: 2px; }
button, a.button { display: inline-block; min-height: 38px; padding: 7px 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 500 15px/22px var(--font); text-decoration: none; cursor: pointer; }
button:hover, a.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--accent-ink); }
h1 a.button { font-size: 14px; margin-left: 12px; vertical-align: middle; }
button.secondary, a.button.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
button.secondary:hover, a.button.secondary:hover { background: var(--card); border-color: var(--accent); color: var(--ink); }
button.danger { background: var(--card); color: var(--bad); border-color: var(--line); }
button.danger:hover { border-color: var(--bad); background: var(--card); color: var(--bad); }
button.link { background: none; border: 0; color: inherit; padding: 0; min-height: 0; text-decoration: underline; font: inherit; }
button.link:hover { background: none; color: var(--ink); }
fieldset { border: 1px solid var(--line); padding: 12px 16px; margin: 0 0 16px; }
legend { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 6px; font-weight: 500; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 16px; }
.grid label select, .grid label input { width: 100%; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); min-height: 38px; font-size: 15px; }
label.check input, .roles input { width: 18px; height: 18px; accent-color: var(--accent); }
/* Customers: Change view (Tim, 8 Nov) */
.view-panel > summary { font-weight: 600; cursor: pointer; }
.view-panel[open] { padding-bottom: 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 16px; }
.checks label.check { min-height: 32px; font-size: 14px; }
/* a check's answers in a row (checklists, Tim 29 Nov) */
.check-item .checks { flex-basis: 100%; grid-template-columns: repeat(4, max-content); gap: 0 20px; }
@media (max-width: 480px) { .check-item .checks { grid-template-columns: repeat(2, max-content); } }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin: 8px 0; }
form.stack > * { margin-bottom: 12px; }
form.stack > label input[type=text], form.stack > label textarea { width: 100%; }
form.inline { display: inline; margin-left: 8px; }
.hand-it { display: inline-block; margin-left: 8px; }
.hand-it summary { display: inline; cursor: pointer; text-decoration: underline; color: var(--muted); }
.hand-it[open] { display: block; margin: 6px 0 0; }
.hand-it form.inline { margin-left: 0; }
details > summary { cursor: pointer; font-weight: 500; color: var(--accent); min-height: 30px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.plain li.depth-1 { padding-left: 1.5em; } ul.plain li.depth-2 { padding-left: 3em; } ul.plain li.depth-3 { padding-left: 4.5em; }   /* My email folders */
/* previews of photos and drawings (Batch 3) */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.thumbs a { display: block; color: var(--muted); font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.thumbs img { display: block; width: 100%; height: 120px; object-fit: cover; background: var(--chip); border: 1px solid var(--line); margin-bottom: 4px; }
iframe.pdf { display: block; width: 100%; height: 75vh; border: 1px solid var(--line); background: var(--chip); }
img.drawing { max-width: 100%; height: auto; border: 1px solid var(--line); }
p.quick { display: flex; flex-wrap: wrap; gap: 8px; }
details.hide-closed:not([open]) { display: none; }
details.later { display: inline-block; vertical-align: middle; }
details.later > summary { display: inline-block; list-style: none; min-height: 0; padding: 6px 10px; border: 1px solid var(--line); font-size: 0.9em; color: var(--ink); }
details.later > summary::-webkit-details-marker { display: none; }
details.later[open] { display: block; margin-top: 6px; }
@media (min-width: 701px) { .phone-only { display: none !important; } }
/* cards side by side where there's room (contacts, the order) */
tr.late td { background: var(--bad-bg); }
tr.current td { background: var(--sel); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 0 18px; align-items: start; }
@media (max-width: 700px) { .card-grid { grid-template-columns: minmax(0, 1fr); } }
.pre { white-space: pre-wrap; }
/* a long message on Check and link: its first lines, with Show all opening the rest (no script) */
details.clip > summary { color: var(--ink); font-weight: 400; list-style: none; cursor: pointer; }
details.clip > summary::-webkit-details-marker { display: none; }
details.clip > summary .show-all { color: var(--accent); text-decoration: underline; white-space: nowrap; }
details.clip[open] > summary .show-all { display: none; }
.tick-all { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 12px; }
.tick { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.roles label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); border: 1px solid var(--line); background: var(--card); padding: 5px 12px; font-size: 13px; }
.roles label:has(input:checked) { background: var(--sel); border-color: var(--accent); font-weight: 500; }

/* Customers: the list, its search and filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin-bottom: 12px; }
.toolbar form.search { display: flex; gap: 8px; align-items: center; flex: 1 1 360px; margin: 0; }
.toolbar form.search input { flex: 1; min-width: 0; }
.toolbar details { flex: 0 1 auto; } .toolbar details[open] { flex-basis: 100%; }
.toolbar details form.filters { margin: 10px 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
table.list td { vertical-align: middle; }
td a[href^="/jobs/"] { white-space: nowrap; }
table.list td.who a { font-weight: 600; font-size: 16px; text-decoration: none; color: var(--ink); }
table.list td.who a:hover { color: var(--accent); }
table.list td.who .muted { display: block; font-size: 13px; }
/* the job overview: what's going on (wide) beside the customer at a glance */
.overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 0 18px; align-items: start; }
.overview .side-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 18px; align-items: start; }
@media (min-width: 1500px) { .overview { grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr); } .overview .side-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.card h2 .edit { float: right; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
.overview ul.todo li, .overview ul.recent li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.overview ul.todo li:last-child, .overview ul.recent li:last-child { border-bottom: 0; }
@media (max-width: 899px) { .overview { grid-template-columns: minmax(0, 1fr); } }
/* the outside site (crews, customers): works on a computer and a phone. On a phone, lists become cards, buttons are
   big and the four weeks are a list of days; on a computer, a table and a calendar grid */
html.outside main { max-width: 1200px; margin: 0 auto; }
html.outside .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 0 18px; align-items: start; }
@media (max-width: 899px) { .portal-grid { display: block; } }
.weeks { border: 1px solid var(--line); }
.week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.6fr)); border-top: 1px solid var(--line); }
.week.heads { border-top: 0; background: var(--chip); font-size: 13px; font-weight: 600; color: var(--muted); }
.week.heads span { padding: 6px 8px; text-align: left; }
.week .cell { min-height: 92px; padding: 6px 8px; border-left: 1px solid var(--line); font-size: 13px; text-align: left; }
.week .cell:first-child { border-left: 0; }
.week .cell .d { display: block; font-weight: 600; color: var(--muted); }
.week .cell.today .d { color: var(--accent); }
.week .cell.past { opacity: .45; }
.week .cell.weekend { background: var(--chip); }
.week .cell a.bk { display: block; margin-top: 4px; padding: 4px 6px; border-left: 3px solid var(--accent); background: var(--card); color: var(--ink); text-decoration: none; line-height: 1.3; }
.week .cell a.bk.unconfirmed { border-left-color: var(--timber); }
@media (max-width: 899px) {
  html.outside main { max-width: 760px; }
  html.outside table.cards, html.outside table.cards tbody, html.outside table.cards tr, html.outside table.cards td { display: block; width: auto; }
  html.outside table.cards thead { display: none; }
  html.outside table.cards tr { padding: 12px; border-bottom: 1px solid var(--line); }
  html.outside table.cards td { border: 0; padding: 3px 0; }
  html.outside .table-wrap:has(table.cards) { overflow: visible; }
  html.outside button, html.outside .button { min-height: 44px; padding: 10px 16px; font-size: 16px; }
  .weeks { border: 0; }
  .week, .week.heads { display: block; border: 0; }
  .week.heads { display: none; }
  .week .cell { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-height: 0; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 15px; }
  .week .cell .d { width: 96px; flex: none; color: var(--ink); }
  .week .cell.past, .week .cell.weekend.empty { display: none; }
  .week .cell a.bk { flex: 1 1 200px; margin: 0; }
}
/* the sales report's running-total chart (drawn by the server) */
svg.chart { width: 100%; max-width: 760px; height: auto; margin-top: 14px; font: 12px var(--font); }
svg.chart text { fill: var(--muted); }
svg.chart .grid { stroke: var(--line); }
svg.chart .line { fill: none; stroke-width: 2.5; }
svg.chart .this, .chart-key .this { stroke: var(--accent); color: var(--accent); }
svg.chart .last, .chart-key .last { stroke: var(--timber); color: var(--timber); }
svg.chart .older, .chart-key .older { stroke: var(--muted); color: var(--muted); stroke-dasharray: 4 4; }
.chart-key span { margin-right: 14px; font-weight: 600; }
/* phones: lists marked "cards" show each row as a card, each value under its column's name */
@media (max-width: 700px) {
  .table-wrap:has(table.cards) { overflow: visible; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: auto; }
  table.cards thead { display: none; }
  table.cards tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.cards td { border: 0; padding: 2px 0; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  table.cards td:empty { display: none; }
}
.stage.score { min-width: 36px; justify-content: center; font-variant-numeric: tabular-nums; }

/* lead score tiers */
.tier-hot { background: var(--timber); color: #fff; border-color: var(--timber); }
.tier-warm { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tier-cold { background: var(--chip); color: var(--muted); }
mark.gap { background: var(--warn-bg); color: var(--warn); padding: 0 2px; }

/* email previews stay as the customer will see them: light, whatever the Hub's colours */
.email-preview { max-width: 640px; background: #fff; color: #22302f; border: 1px solid var(--line); padding: 20px 24px; color-scheme: light; }
.email-preview a { color: #4b6a6d; }
.email-preview ul, .email-preview ol { margin: 0 0 12px; padding-left: 22px; }
/* the signature card in previews: the same layout the email draws with inline styles (src/signature.js) */
.sig-card { border-collapse: collapse; background: none; width: auto; }
.sig-card td { border: 0; background: none !important; }
.sig-logo { padding: 0 18px 0 0 !important; vertical-align: top !important; }
.sig-logo img { display: block; width: 120px; height: 120px; }
.sig-head { padding: 4px 0 6px !important; border-bottom: 4px solid #dda166 !important; width: 380px; }
.sig-name { font: bold 22px/1.2 var(--font); color: #4b6a6d; }
.sig-title { font: italic 16px/1.3 var(--font); color: #4b6a6d; }
.sig-icon { width: 22px; padding: 5px 10px 0 0 !important; vertical-align: middle !important; }
.sig-icon img, .sig-text img { display: inline-block; width: 22px; height: 22px; vertical-align: middle; }
.sig-text { font-size: 15px; color: #2b2c2e; vertical-align: middle !important; padding: 5px 0 0 !important; }
.sig-link { color: #4b6a6d; text-decoration: none; }
.sig-bar { color: #dda166; padding: 0 6px; }

@media print { .hub-head, .noprint, nav.tabs { display: none; } body { background: #fff; color: #000; } .card { border: 0; padding: 0; } }
.day-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-bottom: 10px; }
.day-pick input, .day-pick select { max-width: 100%; }
@media (max-width: 700px) {
  /* phones: tighter, so more shows at once (Tim, 7 Nov) */
  main { padding: 10px 8px 50px; }
  h1 { font-size: 22px; }
  h2 { margin: 14px 0 6px; font-size: 12px; }
  .card { padding: 10px 12px; margin-bottom: 8px; }
  dl.fields { grid-template-columns: minmax(90px, 38%) 1fr; gap: 3px 10px; font-size: 15px; }
  dl.fields dt { font-size: 12px; }
  .overview ul.todo li, .overview ul.recent li, ul.plain li { padding: 5px 0; }
  p.quick .button { flex: 1 1 auto; text-align: center; padding: 8px 10px; }
  .desk-only { display: none !important; }
  table.list.cards td.who a { font-size: 17px; }
}
/* Phones and tablets: fields at 16px, as an iPhone zooms the page into anything smaller when it's tapped (Tim, 16 Nov) */
@media (max-width: 899px), (pointer: coarse) {
  select, input[type=email], input[type=text], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], input[type=search], input[type=number], input[type=time], input[type=password], textarea { font-size: 16px; }
}
/* A pressed look, so a tap is seen to have landed (Tim, 16 Nov): darker while held, no movement */
button:active, a.button:active, .button:active { filter: brightness(.82); }
button.link:active, .hub-nav a:active, .hub-section .tabs a:active, .hub-section .subtabs a:active { filter: none; opacity: .6; }
a:active { opacity: .7; }
html { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* Appointments (src/pages/appointments.js): each person's colour is the left edge, from /appointments/colours.css */
.appt { display: block; border-left: 5px solid var(--line); padding: 2px 0 2px 8px; margin-bottom: 6px; }
.appt-key .appt { display: inline-block; margin-right: 12px; }
.appt.done a { text-decoration: line-through; }
.appt-month { table-layout: fixed; min-width: 640px; }
.appt-month td { vertical-align: top; height: 72px; font-size: 13px; overflow-wrap: anywhere; }
.appt-month .appt { padding-left: 5px; }
.appt a, td .appt a[href^="/jobs/"] { white-space: normal; }
.appt-month td.today { outline: 2px solid var(--ink); outline-offset: -2px; }
/* inner pages refresh (26 Nov, mockups/hub-pages-refresh.html) */
/* @maps */
/* @trades-stock */
.attention li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .attention li:last-child { border-bottom: 0; }
.attention .grow { flex: 1; } .attention .tag { min-width: 64px; text-align: center; }
.trade-card h3 { margin: 0 0 6px; font-size: 16px; } .trade-card .tag { display: inline-block; margin: 2px 0; }
.trade-card progress, td meter { display: block; width: 100%; max-width: 160px; height: 8px; margin-top: 4px; accent-color: var(--accent); }
.add-item { margin: 0 0 16px; } .add-item > summary { list-style: none; display: inline-block; cursor: pointer; min-height: 38px; padding: 7px 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 500 15px/22px var(--font); }
.add-item > summary:hover { background: var(--accent-dark); } .add-item > summary::-webkit-details-marker { display: none; }
.add-item[open] > summary { margin-bottom: 10px; }
/* @reports-showcase */
.report-tiles .up { color: var(--ok); } .report-tiles .down { color: var(--bad); }
.tag.live { background: rgba(47, 107, 58, .14); color: var(--ok); }
.piece-cards { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.piece-cards .card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; }
.ready-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ready-list .add-to { margin-left: auto; }
/* @today-crew */
html.outside .crew-day li { display: flex; align-items: center; gap: 12px; padding: 8px 0; } html.outside .crew-day .grow { flex: 1; min-width: 0; }
html.outside .crew-tomorrow { border-left: 3px solid var(--accent); padding-left: 10px; }
