/* Ascher's Time Clock: styles.
   Follows the Cyber Works Hub design system (spec/tokens.css names and structure, 4px spacing grid,
   chip/pill status technique with color-mix, 6/8/12/999 radii) with the brand blue #193c7d as the
   action colour and the brand lime #9bb526 as the "working now" colour. Light and dark both supported;
   default follows the device, and the header toggle remembers the choice. */

:root, [data-mode="light"] {
  --bg: #f7f7f5; --surface: #ffffff; --surface-2: #fbfbf9; --surface-inset: #f2f1ec;
  --border: #e6e4df; --border-2: #cfccc4; --border-soft: #ebe9e4;
  --text: #1a1a18; --text-muted: #26241f; --text-subtle: #26241f;
  --primary: #193c7d; --on-primary: #ffffff; --primary-wash: #e8edf7;
  --lime: #9bb526; --lime-ink: #566b0b;
  --st-in: #5f7a10; --st-in-ink: #4c6309;
  --st-warn: #d99514; --st-warn-ink: #8f5d00;
  --st-bad: #d24b4b; --st-bad-ink: #a82d2d;
  --st-cold: #8a857d; --st-cold-ink: #26241f;
  --header: #193c7d; --header-ink: #ffffff; --header-dim: #c9d6f0;
  --shadow-card: none; --shadow-pop: 0 8px 24px rgba(0,0,0,.18);
  --danger: #b3261e; --on-danger: #ffffff; --focus: #2a5bd7;
}
/* a chosen theme also sets the browser's own controls: otherwise on a dark computer an empty box in the light theme looks ticked */
:root[data-mode="light"] { color-scheme: light; }
:root[data-mode="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --bg: #0a0a0a; --surface: #151515; --surface-2: #1c1c1c; --surface-inset: #0f0f0f;
    --border: #262626; --border-2: #3a3a3a; --border-soft: #1f1f1f;
    --text: #f5f5f4; --text-muted: #e4e4e7; --text-subtle: #e4e4e7;
    --primary: #7da3ee; --on-primary: #0a1020; --primary-wash: #14203a;
    --lime: #bdde51; --lime-ink: #cfe87a;
    --st-in: #bdde51; --st-in-ink: #cfe87a;
    --st-warn: #f5b544; --st-warn-ink: #f7c66e;
    --st-bad: #ef5f5f; --st-bad-ink: #f48a8a;
    --st-cold: #71717a; --st-cold-ink: #e4e4e7;
    --header: #101826; --header-ink: #f5f5f4; --header-dim: #a8b4cc;
    --shadow-card: none; --shadow-pop: 0 8px 24px rgba(0,0,0,.55);
    --danger: #ef5f5f; --on-danger: #1a0707; --focus: #8fb2ff;
  }
}
[data-mode="dark"] {
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1c1c1c; --surface-inset: #0f0f0f;
  --border: #262626; --border-2: #3a3a3a; --border-soft: #1f1f1f;
  --text: #f5f5f4; --text-muted: #e4e4e7; --text-subtle: #e4e4e7;
  --primary: #7da3ee; --on-primary: #0a1020; --primary-wash: #14203a;
  --lime: #bdde51; --lime-ink: #cfe87a;
  --st-in: #bdde51; --st-in-ink: #cfe87a;
  --st-warn: #f5b544; --st-warn-ink: #f7c66e;
  --st-bad: #ef5f5f; --st-bad-ink: #f48a8a;
  --st-cold: #71717a; --st-cold-ink: #e4e4e7;
  --header: #101826; --header-ink: #f5f5f4; --header-dim: #a8b4cc;
  --shadow-card: none; --shadow-pop: 0 8px 24px rgba(0,0,0,.55);
  --danger: #ef5f5f; --on-danger: #1a0707; --focus: #8fb2ff;
}
:root {
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 22px; --s-6: 30px; --s-7: 44px;
  --r-chip: 4px; --r-control: 6px; --r-card: 8px; --r-pill: 999px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --tap: 44px;
  /* motion: property-scoped on purpose. NEVER transition `color` coming through a var() chain (renders stuck/black). */
  --transition: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --tx-safe: background-color var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); }
h1 { font-size: 1.3rem; font-weight: 650; letter-spacing: -.012em; margin: 0 0 var(--s-4); }
h2 { font-size: 1rem; font-weight: 650; margin: 0 0 var(--s-2); }
h3 { font-size: .95rem; margin: var(--s-4) 0 var(--s-2); }
p { margin: 0 0 var(--s-3); }
a { color: var(--primary); }
.muted { color: var(--text-muted); } .small { font-size: .95rem; }
code { font-family: var(--mono); font-size: 1em; background: var(--surface-inset); padding: 1px 6px; border-radius: var(--r-chip); }
.num, .mono { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-control); }
.skip { position: absolute; left: var(--s-3); top: -60px; background: var(--surface); color: var(--text); padding: var(--s-3) var(--s-4); border-radius: var(--r-control); z-index: 100; border: 2px solid var(--focus); }
.skip:focus { top: var(--s-3); }

/* ---- buttons and controls (44px touch targets) ---- */
button, .btn { font: inherit; min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-control); border: 1px solid var(--border-2); background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); }
button, .btn, .dnav a, .subtabs a, .chip { transition: var(--tx-safe); }
button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
@media (pointer: fine) { table.grid button { min-height: 34px; padding: 0 var(--s-3); } }
button:active:not([disabled]) { transform: translateY(1px); }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
button.primary:hover { background: var(--primary); filter: brightness(1.1); }
button.danger { background: var(--danger); border-color: var(--danger); color: var(--on-danger); font-weight: 600; }
button.ghost { background: transparent; border-color: transparent; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
button.big { width: 100%; min-height: 52px; font-size: 1.05rem; font-weight: 600; }
button[disabled] { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; width: 100%; min-height: var(--tap); padding: 9px 12px; border: 1px solid var(--border-2); border-radius: var(--r-control); background: var(--surface); color: var(--text); }
textarea { min-height: 84px; resize: vertical; }
label { display: block; font-size: 1rem; color: var(--text-muted); margin: var(--s-3) 0; }
label > input, label > select, label > textarea { margin-top: var(--s-1); color: var(--text); }
label.check { display: flex; gap: var(--s-3); align-items: flex-start; color: var(--text); font-size: .95rem; }
label.check input { width: 22px; min-height: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.field-err { color: var(--st-bad-ink); font-size: .9rem; margin: var(--s-2) 0; min-height: 1.2em; }

/* ---- header, navigation ---- */
.top { background: var(--header); color: var(--header-ink); display: flex; align-items: stretch; gap: var(--s-5); padding: 0 var(--s-4); min-height: 56px; position: sticky; top: 0; z-index: 20; }
.top > .logoplate, .top > .appname, .top > .who { align-self: center; }
.logo { height: 32px; width: auto; display: block; }
/* The ORIGINAL coloured Cyber Works logo (dark lettering) always sits on a light plate, so it is correct on the blue
   header, on the dark header and on the sign-in card. The white reversed logo is not used. */
.logoplate { display: inline-flex; align-items: center; flex: none; background: #fbfbf9; border-radius: var(--r-control); padding: 3px 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.appname { font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.appname small { display: block; font-weight: 500; font-size: .9rem; color: var(--header-dim); letter-spacing: .02em; }
.demo { border: 1px solid currentColor; color: var(--header-dim); border-radius: var(--r-chip); font-size: .9rem; letter-spacing: .06em; padding: 1px 5px; font-weight: 600; margin-left: var(--s-2); vertical-align: middle; white-space: nowrap; }
.dnav { display: flex; gap: 0; flex: 1; align-items: stretch; }
.dnav a { color: var(--header-dim); text-decoration: none; padding: 0 13px; white-space: nowrap; min-height: 56px; display: inline-flex; align-items: center; font-weight: 500; }
.dnav a:hover { background: rgba(255,255,255,.09); color: var(--header-ink); }
/* the open page is the tab that joins the page below it */
.dnav a[aria-current="page"] { background: var(--bg); color: var(--text); font-weight: 700; }
.who { display: flex; align-items: center; gap: var(--s-2); font-size: .9rem; margin-left: auto; white-space: nowrap; }
.who button { min-height: 40px; background: transparent; border-color: rgba(255,255,255,.28); color: var(--header-ink); }
.top .iconbtn { padding: 0; width: 40px; }
.bnav { display: none; }
@media (max-width: 1400px) and (min-width: 761px) { .appname small { display: none; } .who .nameonly { display: none; } .top { gap: var(--s-4); } }
/* Tablets and small laptops: the page links get their own row under the name and buttons, so nothing runs off the side. */
@media (max-width: 1270px) and (min-width: 761px) { .top { flex-wrap: wrap; row-gap: 0; padding-top: var(--s-2); } .dnav { order: 3; flex: 1 0 100%; overflow-x: auto; margin-top: var(--s-2); } .dnav a { min-height: 44px; } }
/* settings shown as label and value, two columns on wide screens */
dl.facts { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 0; margin: var(--s-3) 0 0; }
dl.facts dt, dl.facts dd { margin: 0; padding: var(--s-2) 0; border-top: 1px solid var(--border-soft); }
dl.facts dt { color: var(--text-muted); font-size: .9rem; padding-right: var(--s-3); }
dl.facts dd { font-weight: 500; }
@media (max-width: 760px) { dl.facts { grid-template-columns: 1fr; } dl.facts dt { border-top: 1px solid var(--border-soft); padding-bottom: 0; } dl.facts dd { border-top: 0; padding-top: 2px; } }
main { max-width: 1000px; margin: 0 auto; padding: var(--s-5) var(--s-4) 80px; }

/* ---- cards, chips, stats ---- */
.card { background: transparent; border: 0; border-top: 1px solid var(--border-2); border-radius: 0; padding: var(--s-4) 0; margin: 0 0 var(--s-3); box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--st, var(--text-muted)); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--st-cold)); flex: none; }
.chip.in { --st: var(--st-in-ink); } .chip.in::before { background: var(--st-in); }
.chip.warn { --st: var(--st-warn-ink); } .chip.warn::before { background: var(--st-warn); border-radius: 2px; transform: rotate(45deg); }
.chip.bad { --st: var(--st-bad-ink); } .chip.bad::before { background: var(--st-bad); border-radius: 2px; transform: rotate(45deg); }
.chip.plain::before { display: none; } .chip.plain { --st: var(--text-muted); }
/* one status line: the number that matters is large, the rest is plain text */
.strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-6); margin: 0 0 var(--s-5); padding: 0 0 var(--s-4); border-bottom: 1px solid var(--border-2); }
.strip .lead { font-size: 2.4rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.strip .lead small { font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--text-muted); margin-left: var(--s-2); }
.strip .item { color: var(--text-muted); font-size: .92rem; }
.strip .item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.strip .item.bad, .strip .item.bad b { color: var(--st-bad-ink); font-weight: 650; }
.notice { border-radius: var(--r-control); padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); font-size: .92rem; border: 1px solid; }
.notice.ok { color: var(--st-in-ink); background: color-mix(in srgb, var(--st-in) 12%, transparent); border-color: color-mix(in srgb, var(--st-in) 32%, transparent); }
.notice.warn { color: var(--st-warn-ink); background: color-mix(in srgb, var(--st-warn) 12%, transparent); border-color: color-mix(in srgb, var(--st-warn) 32%, transparent); }
.notice.bad { color: var(--st-bad-ink); background: color-mix(in srgb, var(--st-bad) 12%, transparent); border-color: color-mix(in srgb, var(--st-bad) 32%, transparent); }
.stub { margin-top: var(--s-3); font-size: .9rem; color: var(--st-warn-ink); background: color-mix(in srgb, var(--st-warn) 12%, transparent); border-radius: var(--r-control); padding: var(--s-2) var(--s-3); }

/* ---- tables (cards on phones) ---- */
.strip + .tablewrap { border-top: 0; }
.tablewrap { background: transparent; border: 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
table.grid { width: 100%; border-collapse: collapse; }
.grid caption { text-align: left; padding: var(--s-3) 0 var(--s-2); font-weight: 650; color: var(--text); font-size: .95rem; }
.grid th { text-align: left; font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border-2); font-weight: 600; white-space: nowrap; }
.grid td { padding: 7px var(--s-3); border-bottom: 1px solid var(--border-soft); vertical-align: middle; font-size: .94rem; font-variant-numeric: tabular-nums; }
.grid th:first-child, .grid td:first-child { padding-left: 0; } .grid th:last-child, .grid td:last-child { padding-right: 0; }
.grid tbody tr:hover td { background: color-mix(in srgb, var(--text) 4%, transparent); }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tr.alert td:first-child { font-weight: 600; }
.grid th.r, .grid .r { text-align: right; }
.grid tfoot td { font-weight: 650; border-top: 2px solid var(--border-2); border-bottom: 0; background: transparent; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin: 0 0 var(--s-4); }
.toolbar select { width: auto; min-width: 150px; } .toolbar b { padding: 0 var(--s-2); }

/* ---- the board, by site: whitespace and a hairline between blocks, no cards ---- */
.strip .item.warn, .strip .item.warn b { color: var(--st-warn-ink); font-weight: 650; }
.sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
@media (max-width: 900px) { .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); } }
@media (max-width: 620px) { .sgrid { grid-template-columns: 1fr; } }
.sblock { border-top: 1px solid var(--border-2); padding-top: var(--s-3); }
.sblock header { display: flex; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-1); }
.sblock h2 { margin: 0; font-size: .98rem; font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.scode { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.scount { color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.scount b { color: var(--text); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 3px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 3.6ch 1fr auto; align-items: center; gap: 1px var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--border-soft); }
.plist li:first-child { border-top: 0; }
.pid { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pbar { height: 5px; border-radius: 2px; background: color-mix(in srgb, var(--text) 11%, transparent); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--primary); }
.ptime { font-size: .92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.psince { grid-column: 2 / -1; color: var(--text-muted); font-size: .9rem; }
.pnote { grid-column: 1 / -1; color: var(--st-warn-ink); font-size: .9rem; font-weight: 600; }
.plist li.warn .pbar i { background: var(--st-warn); }
.foot { margin-top: var(--s-6); }

/* ---- time cards: the day as a timeline ---- */
.seg { display: inline-flex; vertical-align: middle; border: 1px solid var(--border-2); border-radius: var(--r-control); overflow: hidden; margin: 0 var(--s-4) var(--s-3) 0; }
.seg + .toolbar { display: inline-flex; vertical-align: middle; }
.seg button { border: 0; border-radius: 0; min-height: 38px; background: transparent; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 650; }
.tl-site { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0 0 0 auto; }
.tl-site select { width: auto; min-height: 44px; margin: 0; }
.tl { position: relative; margin-top: var(--s-2); }
.tl-head, .tl-row { display: grid; grid-template-columns: 96px 1fr 56px; }
.tl-head { height: 30px; border-bottom: 1px solid var(--border-2); }
.tl-axis { position: relative; }
.tl-axis span { position: absolute; top: 8px; transform: translateX(-50%); font-size: .9rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-row { height: max(var(--h), 40px); border-bottom: 1px solid var(--border-soft); }
.tl-who { align-self: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-tot { align-self: center; text-align: right; font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-head .tl-tot { align-self: end; padding-bottom: 5px; font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 600; }
.tl-track { position: relative; background-image: linear-gradient(to right, var(--border-soft) 1px, transparent 1px); background-size: calc(100% / var(--hours)) 100%; }
.tl-bar { position: absolute; height: 18px; border-radius: 3px; background: var(--primary); color: var(--on-primary); font-size: .9rem; font-weight: 650; display: flex; align-items: center; padding: 0 5px; overflow: hidden; white-space: nowrap; }
.tl-bar.now { background: color-mix(in srgb, var(--primary) 62%, transparent); }
.tl-bar.noout, .tl-bar.noin { background: color-mix(in srgb, var(--st-warn) 20%, transparent); border: 1.5px dashed var(--st-warn); color: var(--st-warn-ink); }
.tl-overlay { position: absolute; left: 96px; right: 56px; top: 30px; bottom: 0; pointer-events: none; }
.tl-now { position: absolute; top: 0; bottom: 0; border-left: 1.5px solid var(--text); }
.tl-now span { position: absolute; top: 1px; left: 4px; font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text); background: var(--bg); padding: 0 2px; }
.tl-legend { margin-top: var(--s-4); }
.key { display: inline-block; width: 14px; height: 9px; border-radius: 2px; vertical-align: -1px; margin: 0 4px 0 12px; background: var(--primary); }
.key:first-child { margin-left: 0; }
.key.now { background: color-mix(in srgb, var(--primary) 62%, transparent); }
.key.warn { background: color-mix(in srgb, var(--st-warn) 20%, transparent); border: 1.5px dashed var(--st-warn); }
@media (max-width: 760px) { .tl-axis span.alt { display: none; } .tl-head, .tl-row { grid-template-columns: 74px 1fr 56px; } .tl-overlay { left: 74px; right: 56px; } .tl-bar { font-size: .9rem; padding: 0 3px; } }

/* ---- phone "my sites" ---- */
/* ---- Sites screen, site page and fix cards (redesign 11-24) ---- */
.summary { font-size: 1.05rem; margin: 0 0 var(--s-1); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.summary .big { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.summary a.chip { min-height: var(--tap); align-items: center; padding: 0 var(--s-2); }
.textline { margin: 0 0 var(--s-4); } .warnword { color: var(--st-bad-ink); }
.sitefilter { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin: 0 0 var(--s-4); }
.sitefilter input { flex: 1 1 260px; max-width: 420px; }
.sitefilter .seg { margin: 0; } .sitefilter .seg button { min-height: var(--tap); }
.sitegroup { margin: 0 0 var(--s-5); } .sitegroup h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin: 0 0 var(--s-1); }
.sitegroup ul, .herelist, .fixlist, .phonelist { list-style: none; margin: 0; padding: 0; }
.siterow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); align-items: center; min-height: 64px; padding: var(--s-2) var(--s-1); border-top: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.siterow:hover { background: var(--primary-wash); }
.siterow .scode, .sitetitle .scode { background: var(--primary); color: var(--on-primary); border-radius: var(--r-control); text-align: center; margin: 0; padding: 4px 6px; font-size: 1.2rem; overflow: hidden; }
.sinfo { display: grid; min-width: 0; } .speople { color: var(--text-muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sflags { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s-1) var(--s-3); }
.sflags .go { color: var(--text-subtle); font-size: 1.5rem; line-height: 1; }
@media (max-width: 620px) { .sflags { flex-direction: column; align-items: flex-end; } .sflags .go { display: none; } }
.back { margin: 0 0 var(--s-2); } .back a { display: inline-flex; align-items: center; min-height: var(--tap); }
.sitetitle { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-1); } .sitetitle .scode { font-size: 1.6rem; min-width: 3.2ch; }
.company { margin: 0 0 var(--s-3); color: var(--text-muted); }
.howto { background: var(--primary-wash); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); max-width: 70ch; }
.block { border-top: 1px solid var(--border-2); padding-top: var(--s-3); margin-top: var(--s-5); max-width: 780px; }
.block h2 { display: flex; gap: var(--s-2); align-items: baseline; margin: 0 0 var(--s-2); font-size: 1.05rem; } .block h2 .count { color: var(--text-muted); font-weight: 500; }
.herelist li, .phonelist li { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); align-items: center; padding: var(--s-3) 0; border-top: 1px solid var(--border-soft); }
.herelist li:first-child, .phonelist li:first-child { border-top: 0; }
.herelist .since { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; } .herelist li.warn .since { color: var(--st-warn-ink); font-weight: 600; }
.pname { font-size: 1.05rem; } .pnum { color: var(--text-muted); font-variant-numeric: tabular-nums; border: 1px solid var(--border-2); border-radius: var(--r-chip); padding: 0 7px; font-size: .9rem; font-weight: 600; }
.fixlist { max-width: 780px; display: grid; gap: var(--s-3); }
.fixcard { border: 1px solid var(--border-2); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); background: var(--surface); }
.fixcard p { margin: 0 0 var(--s-2); } .fixwhere { color: var(--text-muted); font-size: .92rem; } .fixcard button { min-width: 220px; }
@media (max-width: 620px) { .fixcard button { width: 100%; } }
.navcount { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: var(--r-chip); background: var(--st-warn); color: #1a1a18; font-size: .9rem; font-weight: 700; line-height: 18px; text-align: center; }
.tl-who { line-height: 1.15; min-width: 0; padding-right: 4px; }
.siteaction { max-width: 780px; }
.tl-who small { display: block; font-weight: 500; font-size: .9rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitelink { display: inline-flex; align-items: center; min-height: 34px; min-width: 34px; }

.sites { display: block; max-width: 780px; }
.site { padding-top: var(--s-4); margin-bottom: var(--s-5); }
.site h2 { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); font-size: 1.05rem; }
.site .code { background: var(--primary); color: var(--on-primary); border-radius: var(--r-chip); padding: 1px 10px; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.site .count { margin-left: auto; color: var(--text-muted); font-size: .9rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.people { list-style: none; margin: 0 0 var(--s-3); padding: 0; }
.people li { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--border-soft); min-height: 56px; }
.people .id { font-size: 1.4rem; font-weight: 700; min-width: 3.4ch; font-variant-numeric: tabular-nums; }
.people .since { flex: 1; color: var(--text-muted); } .people .len { font-weight: 600; font-variant-numeric: tabular-nums; }
.people li.alert .since { color: var(--st-bad-ink); font-weight: 600; }

/* ---- skeleton, empty, error ---- */
.skel { background: var(--surface-inset); border-radius: var(--r-control); height: 18px; margin: var(--s-3) 0; animation: pulse 1.4s ease-in-out infinite; }
.skel.strip-s { height: 44px; width: min(560px, 100%); margin-bottom: var(--s-5); } .skel.row-s { height: 34px; margin: var(--s-2) 0; }
.skel.tall { height: 72px; }
@keyframes pulse { 50% { opacity: .45; } }
.empty { padding: var(--s-5) 0; color: var(--text-muted); border-top: 1px solid var(--border-2); }
.empty b { display: block; color: var(--text); font-size: 1rem; margin-bottom: var(--s-1); }

/* ---- sign-in ---- */
.auth, .card.auth { max-width: 400px; margin: 6vh auto; padding: var(--s-5); background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-card); }
.auth .brandrow { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.auth .logo { height: 46px; } .auth .logoplate { padding: 8px 14px; }
img.qr { display: block; background: #fff; padding: var(--s-2); border-style: solid; object-fit: contain; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; font: inherit; min-height: 44px; cursor: pointer; }
.qr { width: 168px; height: 168px; margin: var(--s-3) auto; border: 2px dashed var(--border-2); display: grid; place-items: center; text-align: center; color: var(--text-muted); font-size: .9rem; border-radius: var(--r-control); }

/* ---- dialogs ---- */
dialog { border: 1px solid var(--border-2); border-radius: 10px; padding: 0; background: var(--surface); color: var(--text); width: min(580px, 94vw); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.dlg { padding: var(--s-5); } .dlg h2 { font-size: 1.2rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s-3); }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-4); }
.compare { width: 100%; border-collapse: collapse; margin: var(--s-3) 0; font-size: .95rem; } .compare td, .compare th { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; }
.compare th { color: var(--text-muted); font-weight: 500; width: 28%; } .compare .was { color: var(--text-muted); text-decoration: line-through; } .compare .now { font-weight: 600; }
.history { background: var(--surface-inset); border-radius: var(--r-control); padding: var(--s-1) var(--s-3) var(--s-3); margin-top: var(--s-4); font-size: .9rem; }
.history ol { padding-left: 18px; margin: var(--s-2) 0 0; } .history li { margin-bottom: var(--s-2); }
.changes { margin-top: var(--s-5); }
.changes li { margin-bottom: var(--s-2); }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 30px); background: var(--primary); color: var(--on-primary); padding: var(--s-3) var(--s-5); border-radius: var(--r-card); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 60; max-width: 92vw; font-weight: 600; box-shadow: var(--shadow-pop); }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.bad { background: var(--st-bad); color: #fff; }
.print-only { display: none; }

/* ---- phones: bottom tab bar, tables become cards, nothing scrolls sideways ---- */
@media (max-width: 760px) {
  .dnav, .who { display: none; }
  .top { padding: var(--s-2) var(--s-3); gap: var(--s-3); } .top .logo { height: 24px; } .top .logoplate { padding: 3px 8px; } .appname small { display: none; }
  main { padding: var(--s-4) var(--s-3) 96px; } h1 { font-size: 1.3rem; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border-2); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bnav a, .bnav button { flex: 1; min-height: 60px; border: 0; border-radius: 0; background: none; color: var(--text-muted); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .9rem; font-weight: 600; }
  .bnav [aria-current="page"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
  .bnav svg { width: 24px; height: 24px; }
  .strip { gap: var(--s-1) var(--s-4); } .strip .lead { flex-basis: 100%; }
  .tablewrap { border: 0; }
  table.grid, .grid tbody, .grid tfoot, .grid tr, .grid td { display: block; width: 100%; }
  .grid thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grid tr { border-top: 1px solid var(--border-2); margin: 0; padding: var(--s-2) 0; }
  .grid td { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; border: 0; text-align: right; }
  .grid td::before { content: attr(data-label); color: var(--text-subtle); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding-top: 2px; flex: none; }
  /* the live board on a phone: two lines per person, not a stack of labelled fields */
  .grid.compact tr { display: grid; grid-template-columns: 1fr auto; column-gap: var(--s-3); padding: var(--s-2) 0; }
  .grid.compact td { padding: 1px 0; font-size: .95rem; }
  .grid.compact td::before { display: none; }
  .grid.compact td:nth-child(1) { grid-column: 1; grid-row: 1; justify-content: flex-start; text-align: left; }
  .grid.compact td:nth-child(2) { grid-column: 2; grid-row: 1; font-size: 1.25rem; font-weight: 700; justify-self: end; }
  .grid.compact td:nth-child(3) { grid-column: 1; grid-row: 2; color: var(--text-muted); justify-content: flex-start; gap: 0; }
  .grid.compact td:nth-child(3)::before { content: "Since "; display: inline; text-transform: none; letter-spacing: 0; font-size: inherit; color: inherit; padding: 0; margin-right: 4px; }
  .grid.compact td:nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; font-weight: 600; }
  .grid.compact td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
  .grid td.blank { display: none; } .grid td.act { justify-content: flex-end; } .grid td.act::before { display: none; } .grid td.act button { width: 100%; }
  .grid th:first-child, .grid td:first-child, .grid th:last-child, .grid td:last-child { padding-left: 0; padding-right: 0; }
  .grid tfoot tr { background: var(--surface-2); } .grid caption { padding: 0 0 var(--s-2); }
  .toast { bottom: 76px; } dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; } .actions button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .top, .bnav, .no-print, .toast, button, .skip { display: none !important; } body { background: #fff; color: #000; font-size: 12px; } main { max-width: none; padding: 0; }
  .print-only { display: block; margin-top: 28px; } .card.tc { break-inside: avoid; page-break-after: always; border: 1px solid #999; box-shadow: none; }
  .tablewrap { border: 0; } table.grid { display: table !important; } .grid thead { position: static; width: auto; height: auto; clip: auto; } .grid tbody { display: table-row-group !important; } .grid tr { display: table-row !important; border: 0; box-shadow: none; padding: 0; } .grid td { display: table-cell !important; text-align: left; padding: 4px 8px; border-bottom: 1px solid #ccc; } .grid td::before { display: none; }
  /* A sheet of paper is narrow enough to also match the phone rules above, so undo the parts that would break the printed card. */
  .grid tfoot { display: table-row-group !important; } .grid tr, .grid td { width: auto !important; } .grid tfoot tr { background: none; }
  .grid td { white-space: nowrap; } .grid td[data-label="Notes"] { white-space: normal; } .grid th.act, .grid td.act { display: none !important; }
  .grid th[title] { text-decoration: none !important; } .guide, .startbtn { display: none !important; }
  /* dark look: pale grey and lime text would vanish on white paper */
  .muted, .chip, .grid th, .grid td, h1, h2 { color: #000 !important; }
  .tl-head, .tl-row { grid-template-columns: 96px 1fr 56px; } .tl-overlay { display: none; }
}

/* admin sections */
.subtabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 var(--s-5); border-bottom: 1px solid var(--border-2); }
.subtabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); color: var(--text-muted); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subtabs a:hover { color: var(--text); }
.subtabs a[aria-current="page"] { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
fieldset.checks { border: 1px solid var(--border); border-radius: var(--r-control); margin: var(--s-3) 0; padding: var(--s-2) var(--s-3); }
fieldset.checks legend { font-size: .9rem; color: var(--text-muted); padding: 0 var(--s-2); }
.hint { display: block; margin-top: var(--s-1); }

/* page help line, demo guide */
.guide { border: 1px solid var(--border-2); border-left: 0; border-right: 0; background: var(--surface-inset); padding: 12px 14px 8px; margin: 0 0 18px; border-radius: 6px; }
.guide-head { display: flex; justify-content: space-between; align-items: center; }
.guide h2 { margin: 0; font-size: 1.25rem; }
.guide .who-now { margin: 6px 0; }
.guide .seg { margin: 6px 0 8px; }
.guide ol.tasks { list-style: none; margin: 8px 0 0; padding: 0; }
.guide ol.tasks li { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: start; padding: 9px 0; border-top: 1px solid var(--border-2); }
.guide ol.tasks li.done b { opacity: .75; }
.guide .mute { color: var(--text-muted); font-size: .92rem; }
.marks { margin: 14px 0; }
.marks summary { cursor: pointer; font-weight: 600; }
details.adv { margin: 12px 0; }
details.adv > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; }
details.adv > summary::before { content: '▸'; }
details.adv[open] > summary::before { content: '▾'; }
.marks dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.marks dt { font-weight: 600; } .marks dd { margin: 0; }
th[title] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
@media (max-width: 640px) { .guide ol.tasks li { grid-template-columns: 1fr; } .marks dl { grid-template-columns: 1fr; } }

.helpbtn { font-weight: 600; }

.guide ol.tasks .go { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 9rem; } .guide .switches { color: var(--text-muted); font-size: .9rem; text-align: center; }
.guide.compact { padding: 8px 14px; margin-bottom: 14px; } .guide.compact p { margin: 3px 0; } .guide.compact .guide-head { gap: 10px; flex-wrap: wrap; } .strip-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- first screen: one big thing to do, few words (11-24) ---- */
.startbtn { display: flex; justify-content: flex-end; margin: 0 0 var(--s-1); } .startbtn button { min-height: var(--tap); }
.onething { margin: 0 0 var(--s-3); } .onething .btn { display: flex; align-items: center; justify-content: center; max-width: 420px; min-height: 60px; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.summary { font-size: 1.15rem; } .textline { margin: 0 0 var(--s-3); }
.hint { font-size: .95rem; } .when { font-weight: 500; font-size: 1rem; } .tl-legend { margin-top: var(--s-4); }
.howto { font-size: 1.1rem; line-height: 1.7; display: inline-block; }
.guide ol.tasks li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; }
.guide.compact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-2) var(--s-4); }
a.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
@media (max-width: 760px) { .appname { font-size: .95rem; } .demo { font-size: .9rem; margin-left: 6px; } .bnav a, .bnav button { min-height: 66px; line-height: 1.2; } .bnav svg { flex: none; } main { padding-bottom: 104px; } }
.startbtn { float: right; margin: 0 0 var(--s-2) var(--s-3); }
.guide li button { white-space: nowrap; flex: none; }
.guide, .onething, .summary, .sitefilter, .sitegroup, .fixlist, .tl { clear: both; }
/* "Start here" stays out of the way of the one thing to do */
.startbtn button { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: .95rem; padding: 0 var(--s-2); }
.also { margin: calc(-1 * var(--s-1)) 0 var(--s-3); }
.siterow .scode small { display: block; font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
@media (max-width: 359px) { .top .logoplate { display: none; } .appname { font-size: .92rem; } }
@media (max-width: 760px) { .bnav a, .bnav button { min-width: 0; padding: 0 2px; flex: 1 1 0; text-align: center; } }
@media screen and (max-width: 760px) { .grid tfoot td:first-child::before { display: none; } .grid tfoot td:first-child { justify-content: flex-start; } }

/* alarms */
a.btn.alarm { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.alarmcard { border: 2px solid var(--border-2); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); background: var(--surface); }
.alarmcard.critical { border-color: var(--st-bad); } .alarmcard.warning { border-color: var(--st-warn); } .alarmcard.done { opacity: .85; }
.alarmcard p { margin: 0 0 var(--s-2); } .alarmwho { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; font-weight: 700; }
.alarmrule { font-size: .95rem; } .alarmcard button { min-width: 220px; } @media (max-width: 620px) { .alarmcard button { width: 100%; } }
.navcount.bad { background: var(--st-bad); color: #fff; }
@media (max-width: 760px) { .bnav a, .bnav button { position: relative; } .bnav .navcount { position: absolute; top: 6px; left: calc(50% + 6px); margin: 0; } }
/* header controls: the light / dark switch is a small quiet icon, not a big boxed picture */
.top .iconbtn { width: 40px; border-color: transparent; }
.top .iconbtn svg { width: 20px; height: 20px; }
.top .iconbtn:hover { background: rgba(255,255,255,.09); }
/* report choices */
.rfilters { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0 0 var(--s-2); } .rfilters .rf { margin: 0; min-width: 150px; font-weight: 600; }
.rfilters input, .rfilters select { display: block; margin-top: 2px; }
.rpicks { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-3); }
@media (max-width: 620px) { .rfilters { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); } .rfilters .rf { min-width: 0; font-size: .95rem; } .rfilters .rf:first-child { grid-column: 1 / -1; } .rpicks button { padding: 0 var(--s-2); font-size: .95rem; } }

/* correction windows */
ul.why { margin: 0 0 var(--s-3); padding-left: 1.1em; } .hintline { margin: 0 0 var(--s-2); font-weight: 700; min-height: 1.4em; }
.two { display: flex; flex-wrap: wrap; gap: var(--s-2); } .two button { flex: 1 1 140px; }

/* ---- every screen, after the 11-25 review ---- */
.grid th { text-transform: none; letter-spacing: 0; font-size: .95rem; } th[title] { text-decoration: none; cursor: auto; }
.sitegroup h2 { text-transform: none; letter-spacing: 0; font-size: 1rem; }
.chip, .pnum { font-size: .95rem; }
@media (max-width: 760px) { .demo { font-size: .875rem; margin-left: 4px; letter-spacing: 0; padding: 0 3px; } .appname { font-size: .95rem; } .bnav a, .bnav button { line-height: 1.15; } .grid td::before { text-transform: none; letter-spacing: 0; font-size: .95rem; } }
.siterow .scode small { font-size: .875rem; letter-spacing: 0; }
.whoami { display: flex; justify-content: flex-end; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-1); float: right; font-size: .95rem; }
.whoami button { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 var(--s-2); }
@media (max-width: 760px) { .whoami { float: none; justify-content: space-between; } }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); max-width: 520px; margin: 0 0 var(--s-3); text-align: center; clear: both; }
.stepper b { flex: 1; } .stepper button { min-width: 56px; flex: none; }
nav.more { display: grid; gap: var(--s-2); margin: 0 0 var(--s-3); } nav.more .btn, nav.more button { width: 100%; justify-content: center; min-height: 52px; text-decoration: none; font-size: 1.05rem; }
details.tc { border-top: 1px solid var(--border-2); padding: 0; margin: 0; }
details.tc > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); min-height: 56px; cursor: pointer; padding: var(--s-2) 0; list-style: none; }
details.tc > summary::-webkit-details-marker { display: none; } details.tc > summary::before { content: "▸"; width: 1em; } details.tc[open] > summary::before { content: "▾"; }
.tcmarks { display: flex; gap: var(--s-3); } .tchours { margin-left: auto; font-variant-numeric: tabular-nums; }
/* on a phone the marks drop under the name, so the hours stay at the end of the first line */
@media (max-width: 760px) { .tcmarks { order: 3; flex-basis: 100%; padding-left: calc(1em + var(--s-3)); } .tcmarks:empty { display: none; } }
.cards, #cardsearch { max-width: 780px; clear: both; }
button.tl-bar { border: 0; min-height: 0; padding: 0 5px; justify-content: flex-start; cursor: pointer; height: 30px; line-height: 1; }
button.tl-bar.noout, button.tl-bar.noin { border: 1.5px dashed var(--st-warn); min-width: 76px; }
button.tl-bar:disabled { cursor: default; opacity: 1; }
.tl-now span { left: auto; right: 4px; }
.tourhint { background: var(--primary-wash); border-radius: var(--r-control); padding: var(--s-2) var(--s-3); margin: 0 0 var(--s-3); font-weight: 700; }
@media (max-width: 760px) { .auth, .card.auth { margin: var(--s-4); } }
.skel { opacity: 1; background: var(--border); }
@media print { details.tc { break-inside: avoid; page-break-after: always; border: 1px solid #999; padding: 8px; } details.tc > summary { min-height: 0; } details.tc > summary::before { content: none; } .whoami, .stepper, #cardsearch, .summary { display: none !important; } details.tc[hidden] { display: none !important; } }
.howto { margin-top: var(--s-3); } .alarmcard + .alarmcard, .fixlist + .howto { margin-top: var(--s-3); }
/* Setup: find boxes, long checklists, day row */
.admfind { max-width: 420px; margin: 0 0 var(--s-3); }
.textfind { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: flex-end; margin: 0 0 var(--s-4); }
.textfind label { flex: 1 1 260px; max-width: 460px; margin: 0; }
.checklist { max-height: 240px; overflow-y: auto; margin-top: var(--s-2); padding: 0 var(--s-1); }
.checklist label.check { align-items: center; min-height: var(--tap); margin: 0; }
.dayrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.dayrow label.check { flex-direction: column; align-items: center; gap: var(--s-1); margin: 0; }
.dayrow label.check input { margin: 0; }
.dlg form[data-form^="adm-"] h3 { font-size: 1.1rem; margin: var(--s-5) 0 0; }

/* ---- design pass 11-27: calmer Reports, grouped totals, short phone rows, tidy Setup ---- */
/* plain sentence, not spaced-out pieces: "18 working at 7:40 PM" */
.summary { display: block; }
.tl-head .tl-tot { text-transform: none; letter-spacing: 0; font-size: .95rem; }
/* Reports: what to show, then the numbers with what can be done with them */
.rchoose { margin: 0 0 var(--s-4); }
.rfilters { align-items: flex-end; }
.rpicks { gap: var(--s-3); margin: var(--s-3) 0 0; align-items: center; }
.rpicks .seg { margin: 0; flex-wrap: wrap; }
.rpicks .seg button { min-height: var(--tap); }
details.rnarrow { margin: var(--s-2) 0 0; }
details.rnarrow > summary { font-weight: 600; }
details.rnarrow > summary b { font-weight: 700; }
details.rnarrow .rfilters { margin: 0 0 0 calc(1em + var(--s-2)); }
.rhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); padding: var(--s-4) 0 var(--s-3); border-top: 1px solid var(--border-2); }
.rhead p { margin: 0; }
.rhead .summary b { font-size: 1.6rem; letter-spacing: -.01em; }
.rhead .rnote { flex-basis: 100%; order: 3; }
.rwhat { font-weight: 600; }
.rdo { display: flex; gap: var(--s-2); margin-left: auto; }
.rhead + .tablewrap { border-top: 0; }
/* summaries with "Each employee / Each site": the name once per group, and each group's total stands out */
.grid.grouped tr.total td { font-weight: 700; background: color-mix(in srgb, var(--text) 7%, transparent); border-bottom: 2px solid var(--border-2); }
.grid.grouped tbody tr.total:hover td { background: color-mix(in srgb, var(--text) 10%, transparent); }
.grid.grouped tr.gfirst td:first-child { font-weight: 700; }
/* Setup: tabs on one line where they fit, the open one filled in like the page buttons */
.subtabs { clear: both; display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-2); border-radius: var(--r-control); overflow: hidden; width: fit-content; max-width: 100%; margin: 0 0 var(--s-5); }
.subtabs a { border-bottom: 0; margin: 0; padding: 0 var(--s-4); color: var(--text); font-weight: 500; border-left: 1px solid var(--border-2); }
.subtabs a:first-child { border-left: 0; }
.subtabs a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.subtabs a[aria-current="page"] { background: var(--primary); color: var(--on-primary); font-weight: 700; border-bottom: 0; }
.adm .sechead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); margin: var(--s-6) 0 var(--s-3); }
.adm > .sechead:first-child, .adm > [data-findgroup]:first-of-type .sechead { margin-top: 0; }
.adm .sechead h2 { margin: 0; font-size: 1.2rem; }
.secbtns { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.admbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-4); }
.admbar .admfind { flex: 1 1 260px; margin: 0; }
.admbar .seg { margin: 0; }
.admbar .seg button { min-height: var(--tap); }
.admadd { margin-left: auto; }
.adm .nohit { margin: 0 0 var(--s-3); }
dl.facts dt { font-size: .95rem; }
/* alarms: a clear gap between Now, Missed and Handled; the times sit above the button */
.fixlist + h2 { margin-top: var(--s-6); }
.alarmcard .alarmrule { margin-bottom: var(--s-3); }
@media (max-width: 760px) {
  .subtabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .subtabs a { justify-content: center; text-align: center; padding: 0 var(--s-1); line-height: 1.2; border-left: 0; border-top: 1px solid var(--border-2); }
  .subtabs a:nth-child(-n+3) { border-top: 0; }
  .subtabs a:not(:nth-child(3n+1)) { border-left: 1px solid var(--border-2); }
  .subtabs a:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .admadd { margin-left: 0; flex: 1 1 100%; order: -1; } .admadd button { width: 100%; }
  .rdo { margin-left: 0; flex-basis: 100%; } .rdo button { flex: 1 1 0; }
  .rpicks .seg { width: 100%; } .rpicks .seg button { flex: 1 1 auto; padding: 0 var(--s-2); }
  details.rnarrow .rfilters { margin-left: 0; }
  /* a window with three buttons stacks them, the main one last, so none wraps onto three lines */
  .actions:has(> :nth-child(3)) { flex-direction: column; }
  .actions:has(> :nth-child(3)) button { flex: none; width: 100%; }
}
/* phone tables: one bold line per row (with the hours at the end), then the rest as short "label value" pairs */
@media screen and (max-width: 760px) {
  .grid:not(.compact) tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-4); padding: var(--s-3) 0; }
  .grid:not(.compact) td { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 0 6px; width: auto; flex: 0 1 auto; min-width: 0; padding: 0; text-align: left; order: 2; font-weight: 600; }
  .grid:not(.compact) td::before { font-weight: 400; padding: 0; }
  .grid:not(.compact) td:first-child { order: 0; flex: 1 1 55%; font-size: 1.05rem; font-weight: 700; }
  .grid:not(.compact) td:first-child::before { display: none; }
  .grid:not(.compact) tr:not(:has(> td.r:last-child, > td[data-label="Hours"]:not(.blank))) > td:first-child { flex-basis: 100%; }
  .grid:not(.compact) td.r:last-child, .grid:not(.compact) td[data-label="Hours"] { order: 1; margin-left: auto; font-weight: 700; }
  .grid:not(.compact) td.act { order: 3; margin-left: auto; gap: var(--s-2); }
  .grid:not(.compact) td.act button { width: auto; min-width: 96px; }
  .grid:not(.compact) td.act::before { display: none; }
  .grid:not(.compact) td.blank { display: none; }
  /* grouped summaries: the group's name is a heading, the lines under it start with who or where */
  .grid.grouped tr.gfirst > td:first-child { flex-basis: 100%; font-size: 1.1rem; }
  .grid.grouped tr.gfirst > td:first-child::before { display: inline; font-weight: 400; }
  .grid.grouped tr.gmore > td:first-child { display: none; }
  .grid.grouped tr > td:nth-child(2) { order: 0; flex: 1 1 55%; font-size: 1.05rem; }
  .grid.grouped tr > td:nth-child(2)::before { display: none; }
  .grid.grouped tr.gfirst { border-top: 2px solid var(--border-2); }
  .grid.grouped tr.total { padding-left: var(--s-2); padding-right: var(--s-2); }
  .grid.grouped tr.total td { background: none; border: 0; }
  .grid.grouped tr.total { background: color-mix(in srgb, var(--text) 7%, transparent); border-bottom: 0; }
  .grid tfoot tr { padding-left: var(--s-2); padding-right: var(--s-2); }
  /* shifts grouped by employee and site: name, number and site head the group; each shift starts with its date */
  .grid.grouped.byplace tr.gmore > td:nth-child(-n+3) { display: none; }
  .grid.grouped.byplace tr > td:nth-child(2) { order: 0; flex: 0 1 auto; font-size: 1rem; }
  .grid.grouped.byplace tr > td:nth-child(2)::before { display: inline; }
  .grid.grouped.byplace tr > td:nth-child(3) { order: 0; flex: 1 1 50%; }
  .grid.grouped.byplace tr > td:nth-child(4) { order: 0; flex: 1 1 55%; font-size: 1.05rem; }
  .grid.grouped.byplace tr > td:nth-child(4)::before { display: none; }
}
@media print {
  .grid.grouped tr.total td { font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; background: none; }
  .rhead { border: 0; padding: 0 0 8px; } .rwhat { font-size: 14px; }
}

/* ==== design pass 2 (11-27): one type scale, rows instead of boxes, a site page in two columns ==== */
main { max-width: 1080px; padding-top: var(--s-6); }
h1 { font-size: 1.75rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 var(--s-5); }
main h2, .block h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
h2 .count, .block h2 .count { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: var(--s-1); }
.whoami { font-size: 1rem; }
.whoami button, .startbtn button { background: transparent; }
/* buttons sit on white, so they read as buttons on the grey page */
button, .btn { border-radius: 8px; background: var(--surface); }
button.ghost { background: transparent; }
.notice { font-size: 1rem; }
.notice.big { font-size: 1.15rem; font-weight: 600; padding: var(--s-4) var(--s-5); }
.empty { padding: var(--s-6) 0; font-size: 1.05rem; }
.empty b { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--s-2); }
.block { margin-top: var(--s-6); padding-top: var(--s-4); max-width: none; }
.block h2 { margin-bottom: var(--s-3); }
/* tables on a laptop: firm header, roomier rows */
.grid th { font-size: .95rem; font-weight: 700; color: var(--text); border-bottom: 2px solid var(--border-2); padding-top: 10px; padding-bottom: 10px; }
.grid td { font-size: 1rem; padding-top: 10px; padding-bottom: 10px; }

/* Sites: the one or two things to do, side by side; then the count in plain words */
.onething { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0 0 var(--s-5); }
.onething .btn { flex: 1 1 300px; max-width: 460px; min-height: 76px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: var(--s-3) var(--s-5); text-align: left; }
.onething .btn .t { font-size: 1.3rem; font-weight: 750; letter-spacing: -.01em; }
.onething .btn .s { font-size: 1rem; font-weight: 500; }
.onething .chip { font-size: 1.1rem; }
.boardstat { font-size: 1.15rem; margin: 0 0 var(--s-4); }
.boardstat b { font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.sitegroup { margin: 0 0 var(--s-6); }
.sitegroup h2 { font-size: 1.15rem; font-weight: 700; margin: 0; padding: 0 0 var(--s-2); border-bottom: 2px solid var(--text); }
.sitegroup ul > li:first-child .siterow { border-top: 0; }
.siterow { min-height: 72px; padding: var(--s-2) var(--s-2); }
.siterow .sinfo b { font-size: 1.1rem; }
.speople { font-size: 1rem; }

/* To fix (and a site's own list): rows with a coloured edge, not a stack of boxes.
   Amber: a clock-in or clock-out is missing. Blue: there is a time, someone should look at it. */
.fixgroup + .fixgroup { margin-top: var(--s-6); }
.fixgroup h2 { margin: 0 0 var(--s-2); }
.fixlist { max-width: none; display: block; border-top: 1px solid var(--border-2); container-type: inline-size; }
.fixcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 336px; align-items: center; gap: var(--s-2) var(--s-5); border: 0; border-bottom: 1px solid var(--border-2); border-radius: 0; background: transparent; padding: var(--s-4) var(--s-2) var(--s-4) var(--s-5); }
.fixcard::before { content: ""; position: absolute; left: 0; top: var(--s-3); bottom: var(--s-3); width: 5px; border-radius: 3px; background: var(--st-warn); }
.fixcard.check::before { background: var(--primary); }
.fixcard p { margin: 0; }
.fixwho { font-size: 1.1rem; }
.fixwhere { font-size: 1rem; color: var(--text); margin-top: 2px !important; }
.fixwhat { font-size: 1.05rem; }
.fixmarks { margin-top: var(--s-1) !important; }
.fixact { display: flex; justify-content: flex-end; }
.fixact .two { flex-wrap: nowrap; }
.fixact .two button { flex: none; }
.fixcard button { min-width: 160px; }
@container (max-width: 820px) {
  .fixcard { grid-template-columns: minmax(0, 1fr) auto; }
  .fixid, .fixstate { grid-column: 1; }
  .fixact { grid-column: 2; grid-row: 1 / span 2; }
}
@container (max-width: 620px) {
  .fixcard { grid-template-columns: 1fr; }
  .fixact { grid-column: 1; grid-row: auto; margin-top: var(--s-2); }
  .fixact, .fixact > *, .fixact .two button, .fixcard button { width: 100%; flex: 1 1 0; }
}
/* alarms: a tinted band with a thick edge in the alarm's colour */
.fixlist.alarms { border-top: 0; container-type: normal; }
.alarmcard { border: 0; border-left: 6px solid var(--st-warn); border-radius: 0 var(--r-card) var(--r-card) 0; background: color-mix(in srgb, var(--st-warn) 10%, var(--surface)); padding: var(--s-4) var(--s-5); }
.alarmcard + .alarmcard { margin-top: var(--s-3); }
.alarmcard.critical { border-left-color: var(--st-bad); background: color-mix(in srgb, var(--st-bad) 9%, var(--surface)); }
.alarmcard.done { opacity: 1; border-left-color: var(--border-2); background: transparent; border-bottom: 1px solid var(--border-2); border-radius: 0; }
.alarmwho { font-size: 1.15rem; } .alarmwho a { font-weight: 700; }
.alarmcard .chip { font-size: 1rem; }
.alarmrule { font-size: 1rem; }
main > h2 { margin: var(--s-6) 0 var(--s-3); }
main > h1 + h2, main > h1 + .notice + h2 { margin-top: 0; }

/* one site: the work on the left, the site's facts on the right */
.sitehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-5); margin: 0 0 var(--s-5); }
.sitehead h1 { margin: 0; font-size: 1.9rem; }
.sitehead .company { margin: var(--s-1) 0 0; font-size: 1.1rem; }
.siteaction { margin: 0; max-width: none; }
.siteaction button.big { width: auto; padding: 0 var(--s-5); }
.sitecols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-7); align-items: start; }
.sitemain > :first-child, .siteside > :first-child { margin-top: 0; }
.sitemain > .fixlist.alarms { margin-bottom: var(--s-5); }
.siteside .howto { display: block; margin: 0; font-size: 1.05rem; }
.herelist li { padding: var(--s-3) 0; }
.herelist .since { font-weight: 500; }
@media (max-width: 900px) {
  .sitecols { grid-template-columns: 1fr; gap: 0; }
  .siteside > :first-child { margin-top: var(--s-6); }
  .siteaction { flex-basis: 100%; }
  .siteaction button.big { width: 100%; }
}

/* time cards: one bar with the period (or day), its state and its buttons */
.periodbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding: var(--s-3) 0; margin: var(--s-4) 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.periodbar .stepper { margin: 0; flex: 0 1 480px; }
.periodbar .stepper b { font-size: 1.15rem; }
.periodbar .toolbar { margin: 0 0 0 auto; }
.periodbar .pstate { margin: 0; }
.tl-site { margin: 0; }
.tcsum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin: 0 0 var(--s-3); max-width: 860px; }
.tcsum .summary { margin: 0; } .tcsum .summary b { font-size: 1.5rem; font-weight: 750; }
.tcsum .tcfind { margin: 0; flex: 0 1 340px; }
.cards, #cardsearch { max-width: 860px; }
details.tc > summary { min-height: 60px; padding: var(--s-2); }
details.tc > summary:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
details.tc .pname { font-size: 1.1rem; } .tchours { font-size: 1.15rem; }
details.tc[open] { background: var(--surface); padding-bottom: var(--s-3); }
details.tc[open] > .tablewrap { margin: 0 var(--s-3) 0 calc(1em + var(--s-5)); border-bottom: 0; }

/* Texts: a text that did not simply work has an amber edge */
.grid.texts tr.alert td { background: color-mix(in srgb, var(--st-warn) 9%, transparent); }
.grid.texts tr.alert td:first-child { box-shadow: inset 4px 0 0 var(--st-warn); padding-left: var(--s-3); }

/* sign-in: the app's blue band on top of the card */
.auth, .card.auth { max-width: 420px; margin: 10vh auto; padding: 0 0 var(--s-5); overflow: hidden; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.auth > :not(.brandrow) { margin-left: var(--s-6); margin-right: var(--s-6); }
.auth .brandrow { background: var(--header); color: var(--header-ink); padding: var(--s-4) var(--s-6); margin: 0 0 var(--s-5); }
.auth .logo { height: 36px; } .auth .logoplate { padding: 4px 10px; }
.authname { font-size: 1.15rem; font-weight: 700; }
.auth h1 { font-size: 1.6rem; margin-bottom: var(--s-3); }

/* windows: a firm title; the buttons stay in view at the bottom while a long form scrolls */
dialog { border-radius: 12px; width: min(600px, 94vw); }
.dlg { padding: var(--s-5) var(--s-6) 0; }
.dlg h2 { font-size: 1.4rem; font-weight: 750; letter-spacing: -.01em; margin: 0 0 var(--s-3); }
.dlg .actions { position: sticky; bottom: 0; z-index: 2; background: var(--surface); margin: var(--s-5) calc(-1 * var(--s-6)) 0; padding: var(--s-4) var(--s-6); border-top: 1px solid var(--border-2); }
.dlg > :last-child:not(.actions), .dlg > form:last-child { margin-bottom: var(--s-5); }
.dlg > form:last-child:has(> .actions:last-child) { margin-bottom: 0; }
.compare { font-size: 1rem; }
@media (max-width: 760px) {
  main { padding-top: var(--s-4); }
  h1 { font-size: 1.5rem; margin-bottom: var(--s-4); }
  .sitehead h1 { font-size: 1.6rem; }
  .onething .btn { max-width: none; }
  .periodbar .stepper { flex: 1 1 100%; }
  .periodbar .toolbar { margin-left: 0; }
  .tcsum .tcfind { flex: 1 1 100%; }
  details.tc[open] > .tablewrap { margin: 0 var(--s-2); }
  .dlg { padding: var(--s-4) var(--s-4) 0; }
  .dlg .actions { margin: var(--s-4) calc(-1 * var(--s-4)) 0; padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); }
  .auth, .card.auth { margin: var(--s-4); }
  .auth > :not(.brandrow) { margin-left: var(--s-5); margin-right: var(--s-5); }
  .grid.texts tr.alert { box-shadow: inset 4px 0 0 var(--st-warn); padding-left: var(--s-3); background: color-mix(in srgb, var(--st-warn) 9%, transparent); }
  .grid.texts tr.alert td, .grid.texts tr.alert td:first-child { background: none; box-shadow: none; padding-left: 0; }
}
@media print {
  .sitecols { display: block; } .periodbar { border: 0; padding: 0; margin: 0 0 8px; }
  .fixcard { display: block; } .alarmcard { background: none; }
  details.tc[open] { background: none; } details.tc[open] > .tablewrap { margin: 0; }
  .grid.texts tr.alert td { background: none; box-shadow: none; }
}
/* the day or period arrows stay next to the date they change */
.periodbar .stepper { flex: 0 1 auto; gap: var(--s-3); }
.periodbar .stepper b { flex: none; min-width: 16ch; }
.periodbar:has(+ .tcsum), .periodbar:has(+ .cards) { max-width: 860px; }
@media (max-width: 760px) { .periodbar .stepper { flex: 1 1 100%; } .periodbar .stepper b { flex: 1; min-width: 0; } }
@media (max-width: 760px) { dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; } }
main > .fixlist.alarms, main > h2 { max-width: 860px; }
.rwhat .nw { white-space: nowrap; }
@media (max-width: 760px) { .rwhat .nw { white-space: normal; } .rdo button.primary { flex: 2 1 auto; } }
@media (max-width: 760px) { .periodbar .stepper b { font-size: 1.02rem; } .periodbar .stepper button { min-width: 48px; padding: 0; } }
/* paper is always white: printing from the dark look uses the light colours */
@media print {
  html:root:root, html:root[data-mode] {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-inset: #f2f1ec;
    --border: #e6e4df; --border-2: #999; --border-soft: #ccc;
    --text: #000; --text-muted: #000; --text-subtle: #000;
    --primary: #193c7d; --on-primary: #fff; --primary-wash: #e8edf7;
    --lime: #9bb526; --lime-ink: #566b0b; --st-in: #5f7a10; --st-in-ink: #4c6309;
    --st-warn: #d99514; --st-warn-ink: #8f5d00; --st-bad: #d24b4b; --st-bad-ink: #a82d2d;
    --st-cold: #8a857d; --st-cold-ink: #26241f; --danger: #b3261e;
  }
  .rhead .summary { display: block !important; }
  details.tc[open] > summary::before { content: none; }
  .back, .siteside .no-print { display: none !important; }
}

/* ==== design pass 3 (11-27): a header with its own identity, a title band per page, wider pages ==== */
main { max-width: 1200px; padding-top: 0; }
/* laptop header: name and buttons on top, the pages as folder tabs underneath; the open tab joins the page's title band */
@media (min-width: 761px) {
  .top { flex-wrap: wrap; row-gap: 0; padding: 0 var(--s-5); min-height: 0; gap: 0 var(--s-4); }
  .top > .logoplate, .top > .appname, .top > .who { min-height: 60px; }
  .top > .logoplate { align-self: center; min-height: 0; }
  .appname { display: flex; align-items: center; font-size: 1.2rem; }
  .appname small { display: none; }
  .dnav { order: 3; flex: 1 0 100%; margin: 0 calc(-1 * var(--s-5)); padding: 6px var(--s-5) 0; gap: 4px; overflow-x: auto; background: rgba(0,0,0,.18); align-items: flex-end; }
  .dnav a { min-height: 46px; padding: 0 var(--s-5); border-radius: 8px 8px 0 0; font-weight: 600; color: var(--header-dim); }
  .dnav a:hover { background: rgba(255,255,255,.1); }
  .dnav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 750; }
  .who { gap: var(--s-3); font-size: 1rem; }
  .who .nameonly { display: inline; font-weight: 600; }
  .who .startlink { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 var(--s-2); background: transparent; }
}
@media (max-width: 1000px) and (min-width: 761px) { .who .nameonly { display: none; } }
.moreme { font-weight: 700; font-size: 1.1rem; margin: 0 0 var(--s-3); }
/* each page's title band: white across the whole width, the title and the page's own switches in it */
.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface), 0 1px 0 100vmax var(--border-2); clip-path: inset(0 -100vmax -1px); padding: var(--s-5) 0; margin: 0 0 var(--s-5); }
.pagehead h1 { margin: 0; font-size: 2rem; letter-spacing: -.025em; }
.pagehead > .seg, .pagehead > .subtabs { margin: 0; }
.pagehead > .back { flex-basis: 100%; margin: 0 0 calc(-1 * var(--s-3)); }
.pagehead > .sitehead { flex: 1 1 100%; margin: 0; }
.pagestat { margin: 0; font-size: 1.15rem; }
.pagestat b { font-size: 1.7rem; font-weight: 750; font-variant-numeric: tabular-nums; }
main > .guide { margin-top: var(--s-4); }
main > .guide + .pagehead { margin-top: 0; }
/* Sites: each row says its state with a coloured edge and a strong word; who is there, with the time they came */
.siterow { position: relative; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s-1) var(--s-4); min-height: 84px; padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); }
.siterow::before { content: ""; position: absolute; left: 0; top: var(--s-2); bottom: var(--s-2); width: 6px; border-radius: 3px; background: transparent; }
.siterow.bad::before { background: var(--st-bad); } .siterow.warn::before { background: var(--st-warn); } .siterow.in::before { background: var(--st-in); }
.siterow.bad { background: color-mix(in srgb, var(--st-bad) 7%, transparent); }
.siterow.bad:hover { background: color-mix(in srgb, var(--st-bad) 12%, transparent); }
.siterow .scode { font-size: 1.4rem; padding: 6px; }
.siterow .sinfo { display: grid; gap: 2px var(--s-5); align-items: center; }
.siterow .sinfo > b { font-size: 1.15rem; }
.speople { display: flex; flex-wrap: wrap; gap: 2px var(--s-4); white-space: normal; overflow: visible; color: var(--text); font-size: 1rem; }
.pwho { white-space: nowrap; } .pwho b { font-weight: 600; }
.pwho.warn { color: var(--st-warn-ink); font-weight: 600; }
.sflags { gap: var(--s-2) var(--s-5); }
.sstate { display: inline-flex; align-items: center; gap: 6px; font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
.sstate.in { color: var(--st-in-ink); } .sstate.in b { font-size: 1.35rem; }
.sstate.warn { color: var(--st-warn-ink); }
.sstate.warn:not(.alarm)::before { content: ""; width: 9px; height: 9px; background: var(--st-warn); transform: rotate(45deg); border-radius: 2px; }
.sstate.alarm { padding: 5px 12px; border-radius: var(--r-control); }
.sstate.alarm.bad { background: var(--danger); color: var(--on-danger); }
.sstate.alarm.warn { background: var(--st-warn); color: #1a1a18; }
.sstate.quiet { font-weight: 500; color: var(--text); }
@media (min-width: 900px) { .siterow .sinfo { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); } }
@media (max-width: 620px) { .siterow { grid-template-columns: 52px minmax(0, 1fr) auto; padding-left: var(--s-4); gap: var(--s-1) var(--s-3); } .siterow .scode { font-size: 1.2rem; } .sflags { gap: var(--s-1); } .sstate.alarm { padding: 3px 8px; } }
/* Alarms: what happened on the left, the window's steps on the right */
.alarmcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 44%); gap: var(--s-3) var(--s-7); align-items: center; padding: var(--s-5) var(--s-6); }
.alarmcard.done { display: block; }
.amain > p { margin: 0 0 var(--s-2); } .amain > button { margin-top: var(--s-2); }
.awhat { font-size: 1.2rem; }
.asteps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.asteps li { display: grid; gap: 2px; padding-top: var(--s-2); border-top: 6px solid color-mix(in srgb, var(--text) 18%, transparent); }
.asteps li.past { border-top-color: var(--text); } .asteps li.past.warn { border-top-color: var(--st-warn); } .asteps li.past.crit { border-top-color: var(--st-bad); }
.asteps li span { font-size: .95rem; } .asteps li b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.adays { margin: var(--s-3) 0 0; }
main > .fixlist.alarms, main > h2 { max-width: none; }
.sitemain .alarmcard { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .alarmcard { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-4); }
  .amain { display: contents; }
  .amain > button { order: 2; margin-top: var(--s-2); }
  .alarmcard > .aside { order: 1; margin: var(--s-2) 0; }
}
/* Time cards: wider list; a card with something to fix says so on its own line, with the amber edge */
.cards, #cardsearch, .tcsum, .periodbar:has(+ .tcsum), .periodbar:has(+ .cards) { max-width: 980px; }
details.tc.needsfix > summary { box-shadow: inset 5px 0 0 var(--st-warn); padding-left: var(--s-4); }
.tcfix { display: inline-flex; align-items: center; gap: 6px; color: var(--st-warn-ink); font-weight: 700; }
.tcfix::before { content: ""; width: 9px; height: 9px; background: var(--st-warn); transform: rotate(45deg); border-radius: 2px; }
.tcdays { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.tchours { margin-left: var(--s-5); min-width: 8ch; text-align: right; }
/* one day: room for the code and the name side by side */
.tl-head, .tl-row { grid-template-columns: 190px 1fr 64px; }
.tl-overlay { left: 190px; right: 64px; }
.tl-who { display: flex; align-items: baseline; gap: var(--s-2); }
.tlcode { font-weight: 700; }
.tl-who small { font-size: 1rem; font-weight: 500; color: var(--text); }
/* only where there is room for two columns: stated without the width it once overrode the phone layout */
@media (min-width: 901px) { .sitecols { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 760px) {
  .pagehead { padding: var(--s-4) 0; margin-bottom: var(--s-4); gap: var(--s-2) var(--s-4); }
  .pagehead h1 { font-size: 1.6rem; }
  .pagestat { flex-basis: 100%; font-size: 1.05rem; } .pagestat b { font-size: 1.4rem; }
  .pagehead > .subtabs { flex-basis: 100%; }
  .tl-head, .tl-row { grid-template-columns: 92px 1fr 52px; }
  .tl-overlay { left: 92px; right: 52px; }
  .tl-who { display: block; } .tl-who small { display: block; font-size: .95rem; }
  .tcdays { display: none; } .tchours { margin-left: auto; }
}
@media print {
  .pagehead { box-shadow: none; clip-path: none; background: none; padding: 0 0 8px; }
  .tl-head, .tl-row { grid-template-columns: 140px 1fr 56px; }
  details.tc.needsfix > summary { box-shadow: none; }
  .siterow.bad { background: none; }
}
.asteps li b { white-space: nowrap; }
@media (max-width: 520px) { .asteps { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-3); } }
.cards, #cardsearch, .tcsum, .periodbar:has(+ .tcsum), .periodbar:has(+ .cards) { max-width: none; }
.tcsum .tcfind { flex: 0 1 380px; }
@media (max-width: 760px) { .tchours { min-width: 0; } }

/* ---- Setup: code list and activity (added 11-30) -------------------------------------------------------------- */
.codehow { font-size: 1.1rem; margin: 0 0 var(--s-4); }
.actbar label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 600; }
.actbar { align-items: flex-end; }
@media print { .codepeople { break-before: page; } .subtabs, .actbar { display: none !important; } }
@media (max-width: 620px) { .actbar .admadd { order: 2; display: flex; flex-direction: column; gap: var(--s-3); width: 100%; } .actbar label { order: 1; } }
.codetitle { display: none; }
@media print {
  body:has(.codehow) .pagehead { display: none !important; }
  .codetitle { display: block; font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; }
  body:has(.codehow) .adm table.grid th, body:has(.codehow) .adm table.grid td { padding: 3px 8px !important; line-height: 1.3; }
}

/* ---- access review sheet, shift position, office keypad (12-01) ---------------------------------------------- */
.tick { display: inline-block; min-width: 9ch; min-height: 1.4em; border-bottom: 1px solid currentColor; }
.signoff { display: flex; flex-wrap: wrap; gap: var(--s-5); margin-top: var(--s-5); font-weight: 600; }
.signoff span { display: inline-block; width: 16ch; border-bottom: 1px solid currentColor; }
.posline { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.keypad { max-width: 460px; margin: 0 auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.keypad label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 600; }
.keypad input { font-size: 1.6rem; text-align: center; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.keys button { font-size: 1.6rem; min-height: 60px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.kinds button { min-height: 64px; font-size: 1.25rem; }
.keysay { min-height: 3.2em; text-align: center; font-size: 1.3rem; font-weight: 700; margin: 0; }
.keysay.bad { color: var(--danger); }
.wrapany { overflow-wrap: anywhere; }
@media print { .signoff p { font-size: 11pt; margin-top: 14pt; } }
