/* Verdynt/OS admin. One typeface (Atkinson Hyperlegible, built for legibility in glare and at a distance),
   a cold snow-and-spruce palette, and trail-sign shapes where the content really is a trail. */

@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Asset risk and program progress (muni release 1): map colors, light and dark alike */
  --risk-low: #2e7d32; --risk-medium: #c79a00; --risk-high: #e07400; --risk-very-high: #c62828; --risk-none: #8a8f94;
  --prog-todo: #1f5fd1; --prog-done: #2e7d32; --prog-skipped: #8a8f94; --prog-failed: #c62828;
  /* Brand: slate and spruce with brand gold. Gold is a fill (with dark slate text, 8:1) or a line, never text on white. */
  --snowpack: #edf1f3;
  --powder: #ffffff;
  --spruce: #0e2632;
  --spruce-soft: #1d4452;
  --quiet: #4f636d;
  --line: #d3dce1;
  --line-strong: #aebcc4;
  --accent: #d8b672;          /* primary buttons, badges, counts */
  --accent-hover: #c49d55;    /* 6.2:1 with --on-accent */
  --on-accent: #0e2632;       /* text on the gold */
  --accent-line: #9a7630;     /* gold strong enough for lines, stripes, rings and tracks on white (4.2:1) */
  --accent-ink: #1d4452;      /* text that marks the selected thing */
  --accent-tint: #f7efdc;     /* the selected thing's background */
  --accent-glow: rgba(154, 118, 48, 0.18);
  --link: #1d4452;            /* links are spruce, underlined (10.5:1 on white) */
  --link-hover: #0e2632;
  --trail-blue: var(--accent-line);      /* older name, kept for code that still says it */
  --trail-blue-dark: var(--accent-hover);
  --on-fill: #ffffff;         /* text on the green, red and slate status fills */
  --open: #17703f;
  --open-tint: #e3f3ea;
  --open-line: #a9d8bd;
  --hold: #8a5300;
  --hold-tint: #fbefd6;
  --hold-line: #e0b560;
  --closed: #b42318;
  --closed-tint: #fbe5e2;
  --closed-line: #e0908a;
  --closed-line-soft: #efb3ab;
  --info-line: #c6d8f4;
  --warn-mark: #d98a00;
  --warn-line: #c98800;
  --warn-fill: #f2b33d;
  --warn-fill-ink: #2c1c00;
  --warn: #b45309;
  --warn-bg: #fff4d6;
  --warn-ink: #8a5300;
  --invalid: #b3261e;
  --toast-warn: #6b4300;
  --offline-bg: #8a1f11;
  --req-submit: #c2410c;
  --req-approve: #a16207;
  --disabled-bg: #f7f9fa;
  --disabled-line: #c9d0d8;
  --disabled-ink: #4a5562;
  --focus: #9a7630;        /* the focus ring: a darker gold, 4.2:1 on white (the brand gold is 1.9:1 there) */
  /* one radius scale */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --rail: 232px;
  --ink: #0e2632;
  --ink-2: #1d4452;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --panel-alt: #f4f6f8;
  --chart-1: #2a78d6;         /* chart series 1 and 2 (Forecast data): checked for color vision and contrast on white */
  --chart-2: #eb6834;
  --field: #ffffff;
  --info-tint: #eaf2fb;
  --sel-bg: #0e2632;
  --sel-ink: #ffffff;
  --open-ink: #17543a;
  --hold-ink: #6b4300;
  --closed-ink: #7a160d;
  --muted: #52656d;
  /* fixed colors: paper, print and dark surfaces that stay dark in both themes */
  --white: #ffffff;
  --black: #000000;
  --sign-ink: #000000;   /* help signs print black on white in every theme (help/places) */
  --sign-paper: #ffffff;
  --print-rule: #999999;
  --canvas: #fbfdfe;
  --on-dark-ink: #eaf3f7;
  --on-dark-muted: #cfe0e7;
  --on-dark-quiet: #a9c2cd;
  --on-dark-line: #6c8593;
  --on-dark-warn: #ffd9a0;
  --on-dark-alert: #ffd0c9;
  --board-bg: #12303a;
  --savebar-dark: #0b151b;
  /* maps */
  --map-pin: #c8321e;
  --sev-minor: #2f7d4f; --sev-moderate: #d99a1c; --sev-serious: #d4561f; --sev-critical: #b3201a;
  --park-attention: #b87400;
  --gps-ring: #4ea1ff; --gps-dot: #1b74e4;
  --area-map-bg: #10262e;
  --run-green: #3fbf6a; --run-blue: #5b9cff; --run-black: #f4f4f4; --run-park: #ff9f43; --run-lift: #e2b866;
  --gate-type-ink: #10202f; --gate-flag: #ffd23f;
  /* lesson label colors */
  --tag-red: #d64545; --tag-blue: #2f6fd0; --tag-green: #2e8b57; --tag-orange: #e8892b; --tag-purple: #7e57c2;
  --tag-yellow: #f2c94c; --tag-pink: #e86fa6; --tag-teal: #1f9e9e; --tag-brown: #8d6e63; --tag-gray: #8a959b;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--snowpack);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; }
h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
/* (The frame, its side menu and its bars are in one block further down: "The frame".) */
.brand { padding: 0 10px; }
.brand strong { display: block; font-size: 1.25rem; letter-spacing: 0.01em; }
.brand span { display: block; color: var(--on-dark-muted); font-size: 0.875rem; margin-top: 2px; }
.main { padding: 28px 32px 64px; max-width: 1180px; width: 100%; }

@media (max-width: 860px) {
  .main { padding: 20px 16px 56px; }
}

/* ---------- page structure ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.section { margin-top: 36px; }
.section > header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-strong); }
.section > header p { color: var(--quiet); font-size: 0.9375rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--quiet); }
.small { font-size: 0.875rem; }
.stack { display: grid; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.empty { padding: 28px 16px; color: var(--quiet); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.empty .btn { margin-top: 10px; }
.loading { color: var(--quiet); padding: 20px 0; }
.error-box { background: var(--closed-tint); color: var(--closed-ink); border: 1px solid var(--closed-line-soft); border-radius: var(--radius); padding: 12px 14px; }

/* ---------- controls ---------- */
.btn {
  font: inherit;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled, .btn.primary:disabled, .btn.danger:disabled { opacity: 1; background: var(--disabled-bg); border-color: var(--disabled-line); color: var(--disabled-ink); cursor: not-allowed; box-shadow: none; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.dialog.nudge { animation: nudge 0.25s ease-in-out; }
@media (prefers-reduced-motion: reduce) { .dialog.nudge { animation: none; outline: 3px solid var(--focus); } }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--closed); border-color: var(--closed-line-soft); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 0.875rem; }
.btn.link { background: none; border: none; color: var(--link); padding: 4px 6px; min-height: 0; text-decoration: underline; }

label.field, .field { display: grid; gap: 4px; font-weight: 700; font-size: 0.9375rem; align-content: start; }
.field .hint { font-weight: 400; color: var(--quiet); font-size: 0.8125rem; }
input, select, textarea {
  font: inherit;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  font-weight: 400;
}
textarea { min-height: 96px; resize: vertical; }
/* Form controls and every button take the body font (browsers default some to Arial) */
button, input, select, textarea, optgroup { font-family: inherit; }
body .leaflet-container, body .leaflet-container .leaflet-control-attribution, body .leaflet-control-layers, body .leaflet-popup-content { font-family: inherit; }
/* Map zoom buttons are 44 px targets on every device */
body .leaflet-container .leaflet-bar a, body .leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 22px; }
input[type='checkbox'] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--link); }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 700; min-height: 44px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.form .wide { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.inline-form label.field { min-width: 150px; flex: 1 1 150px; }
.inline-form .btn { flex: none; }


/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.875rem; color: var(--quiet); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
tr.attention td { background: var(--hold-tint); }

/* ---------- status ---------- */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.state::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); flex: none; }
.state[data-state='good']::before { background: var(--open); }
.state[data-state='warn']::before { background: var(--warn-mark); }
.state[data-state='bad']::before { background: var(--closed); }
.state[data-state='good'] { color: var(--open); }
.state[data-state='warn'] { color: var(--hold); }
.state[data-state='bad'] { color: var(--closed); }
.state[data-state='neutral'] { color: var(--quiet); }
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.mark svg { flex: none; }

/* ---------- dashboard figures: plain numbers on a shared baseline, not a wall of cards ---------- */
.figures { display: flex; flex-wrap: wrap; gap: 24px 0; }
.figure { padding: 0 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line-strong); min-width: 150px; }
.figure:last-child { border-right: none; }
.figure strong { display: block; font-size: 2.25rem; line-height: 1.1; }
.figure span { color: var(--quiet); }
.figure em { display: block; font-style: normal; font-size: 0.875rem; color: var(--quiet); margin-top: 2px; }

/* ---------- the gate: one answer, readable across a counter ---------- */
.gate {
  border-radius: var(--radius);
  padding: 28px 24px;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: var(--surface);
  border: 2px dashed var(--line-strong);
  color: var(--quiet);
}
.gate strong { font-size: 2.75rem; line-height: 1.05; }
.gate span { font-size: 1.125rem; }
.gate[data-result='ok'], .gate[data-result='good'] { background: var(--open); border: 2px solid var(--open); color: var(--white); }
.gate[data-result='bad'] { background: var(--closed); border: 2px solid var(--closed); color: var(--white); }
.gate[data-result='warn'] { background: var(--warn-fill); border: 2px solid var(--warn-line); color: var(--warn-fill-ink); }
.scan-input { font-size: 1.5rem; min-height: 56px; letter-spacing: 0.04em; text-transform: uppercase; }
.codes { display: grid; gap: 8px; margin-top: 12px; }
.code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.06em; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.code small { font-size: 0.875rem; font-weight: 400; letter-spacing: 0; color: var(--quiet); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- people picker, chips ---------- */
.picker { position: relative; }
.picker-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); max-height: 260px; overflow-y: auto; box-shadow: 0 6px 18px rgba(18, 48, 58, 0.18); }
.picker-results button { display: block; width: 100%; text-align: left; font: inherit; background: none; border: none; padding: 10px 12px; min-height: 44px; cursor: pointer; }
.picker-results button:hover, .picker-results button:focus-visible { background: var(--snowpack); }
.picker-hit { display: grid !important; gap: 2px; }
.picker-name { font-weight: 700; }
.picker-line { display: block; }
.picker-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.picker-empty { padding: 10px 12px; }
.chip { display: inline-flex; gap: 8px; align-items: center; background: var(--snowpack); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 4px 6px 4px 12px; font-weight: 700; }
.chip button { font: inherit; border: none; background: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; color: var(--quiet); }
.chip button:hover { background: var(--line); }

/* ---------- dialogs and toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(18, 48, 58, 0.55); display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; z-index: 50; }
.dialog { background: var(--surface); border-radius: var(--radius-md); width: min(680px, 100%); padding: 24px; display: grid; gap: 16px; box-shadow: 0 18px 50px rgba(18, 48, 58, 0.35); }
.dialog.wide { width: min(920px, 100%); }
.dialog header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.dialog .footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; left: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 80; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--spruce); color: var(--white); padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.toast[data-kind='error'] { background: var(--closed); }
.toast[data-kind='warn'] { background: var(--toast-warn); }

/* ---------- sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.signin-side { background: var(--spruce); color: var(--white); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.signin-side h1 { font-size: 2.5rem; line-height: 1.1; max-width: 12ch; }
.signin-side p { color: var(--on-dark-muted); max-width: 36ch; }
.signin-side .brand { padding: 0; margin-bottom: 20px; }
.signin-side h1 { margin-bottom: 12px; }
.main { min-width: 0; }
.signin-form { padding: 48px; display: grid; align-content: center; justify-items: start; gap: 16px; }
.signin-form form { display: grid; gap: 16px; width: min(380px, 100%); }
.ridge { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .signin { grid-template-columns: 1fr; } .signin-side { padding: 28px; } .signin-side h1 { font-size: 1.75rem; } .signin-form { padding: 28px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- segmented status control (lifts, trails) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-weight: 700; min-height: 40px; padding: 4px 14px; border: none; border-right: 1px solid var(--line-strong); background: var(--surface); color: var(--quiet); cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button:hover { background: var(--snowpack); }
.seg button[aria-pressed='true'][data-tone='good'] { background: var(--open); color: var(--white); }
.seg button[aria-pressed='true'][data-tone='warn'] { background: var(--warn-fill); color: var(--warn-fill-ink); }
.seg button[aria-pressed='true'][data-tone='bad'] { background: var(--closed); color: var(--white); }
.seg button:disabled { cursor: default; }
.head-q { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.head-q-label { font-weight: 700; }
.patient-who .seg { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
@media (max-width: 640px) { .patient-who .seg { flex-direction: column; width: 100%; } .patient-who .seg button { border-right: none; border-bottom: 1px solid var(--line-strong); text-align: left; } .patient-who .seg button:last-child { border-bottom: none; } }
.page-note { color: var(--quiet); max-width: 62ch; }
.basket-total { font-size: 1.5rem; font-weight: 700; }
.week-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px; background: var(--surface); }
.hours { font-weight: 700; }

/* grid children default to min-width:auto, which lets a wide table push the whole page sideways */
.stack > *, .section, .two-col > *, .form > * { min-width: 0; }

/* ---- patrol cases and team ---- */
.case h2 { font-size: 1.125rem; }
.case h4 { font-size: 0.9375rem; margin: 0; }
.case-head h1 { font-size: 1.5rem; }
.stack.tight { gap: 4px; }
.lock-note, .warn-note { background: var(--hold-tint); border: 1px solid var(--hold); color: var(--hold); border-radius: var(--radius); padding: 10px 14px; font-weight: 700; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: none; }
.problems { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.stamps .btn { min-height: 44px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--line-strong); display: grid; gap: 8px; }
.timeline li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
.kv dt { color: var(--quiet); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.prospect-log li { display: block; }
.error-text { color: var(--closed); }
.prospect-filters > * { width: auto; flex: 1 1 170px; }
.prospect-filters > input[type=search] { flex-basis: 260px; }
.patient > h3 { font-size: 1.125rem; padding: var(--sp-2) 0 0; }
.note { border-top: 1px solid var(--line); padding-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sigpad { width: 100%; max-width: 480px; aspect-ratio: 8 / 3; background: var(--white); border: 2px dashed var(--line-strong); border-radius: var(--radius); touch-action: none; cursor: crosshair; }
.sig-img { max-width: 100%; border: 1px solid var(--line); background: var(--white); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(80px, 2fr) 3ch; gap: 10px; align-items: center; }
.bars meter { width: 100%; height: 14px; }
@media (max-width: 700px) {
  .post-row { grid-template-columns: 1fr 1fr; }
  .case .btn { min-height: 44px; }
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: 6px; }
}

/* ---------- guest help page (public) ---------- */
.help-body { background: var(--snowpack); }
.help { max-width: 560px; margin: 0 auto; padding: 16px; }
.help-alert { border: 2px solid var(--closed); background: var(--surface); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
.help-alert p { margin: 4px 0 0; }
.help-msg { font-weight: 700; }
.help-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.help textarea, .help input, .help select { width: 100%; font: inherit; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.btn.big { min-height: 52px; font-size: 1.1rem; }
.help-noscript { max-width: 560px; margin: 16px auto; padding: 0 16px; font-weight: 700; }
.help-done { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
/* Street alerts (muni release 1): checkboxes on the sign-up and manage pages, and a notice's page. */
.help .alert-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
.help .alert-check input { width: 22px; min-height: 22px; height: 22px; margin: 2px 0 0; flex: none; }
.help .alert-row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.alert-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.alert-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.alert-card .muted { margin: 0; }
.alert-set { border: 0; border-top: 1px solid var(--line); margin: 12px 0 0; padding: 10px 0 0; } /* 2026.11.23: alerts and reminders on the manage page */
.alert-set legend { font-weight: 700; padding: 0; }
.contact-flag:not(:empty) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; } /* 2026.11.23: Email bouncing, Landline under an address */
.alert-ended { border-left: 6px solid var(--line-strong); }
.alert-live { border-left: 6px solid var(--closed); }
.alert-updates { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alert-updates li { border-top: 1px solid var(--line); padding-top: 8px; }
.call-card { border: 1px solid var(--line-strong); border-left-width: 6px; border-radius: var(--radius); background: var(--surface); padding: 12px 14px; display: grid; gap: 6px; }
.call-card[data-priority='critical'] { border-left-color: var(--closed); }
.call-card[data-priority='high'] { border-left-color: var(--warn-fill); }
.call-card[data-priority='normal'] { border-left-color: var(--link); }
.call-card[data-priority='low'] { border-left-color: var(--line-strong); }
.call-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.timeline li { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; }

/* ---------- incident form (NSAAR layout) ---------- */
.nsaar-sec { display: block; }
.nsaar-sec > summary { font-size: 1.15rem; font-weight: 700; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.nsaar-note { max-width: 70ch; margin: 4px 0 12px; }
.nsaar-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.nsaar-grid .wide { grid-column: 1 / -1; }
.req { color: var(--closed); font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row.tight { gap: 6px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: center; min-height: 36px; font-weight: 400; }
.check input { width: 20px; height: 20px; flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.bodymap { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.bodymap .part { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; border-bottom: 1px solid var(--line); }
.bodymap select { width: 5em; min-height: 36px; }
.settings-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 16px; }
.aid { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
fieldset.field { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; min-width: 0; }
fieldset.field legend { font-weight: 700; padding: 0 6px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
@media print {
  .rail, .who, .tabs, .btn, button, .footer, .toast { display: none !important; }
  .shell { display: block !important; }
  details > summary { list-style: none; }
  .panel { break-inside: avoid; border-color: var(--print-rule); }
  input, select, textarea { border: none !important; background: none !important; }
  body { background: var(--white); }
}

.input-row { display: flex; gap: 6px; align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { min-height: 44px; }

/* customer form */
.cust-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.cust-group legend { font-weight: 700; padding: 0 6px; }
.cust-group .form .wide { grid-column: 1 / -1; }
.cust-lines { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0; }
.cust-lines dt { color: var(--quiet); }
.cust-lines dd { margin: 0; }

/* "missing" items that jump to the field */
.problem-link { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--link); text-decoration: underline; text-align: left; cursor: pointer; min-height: 32px; }
.problem-link:hover { color: var(--ink); }
.flash { outline: 3px solid var(--accent-line); outline-offset: 4px; border-radius: var(--radius-sm); }

/* patrol map */
.map-box { height: 60vh; min-height: 320px; border: 1px solid var(--line-strong); border-radius: var(--radius); isolation: isolate; background: var(--snowpack); }
.map-box.tall { height: 70vh; }
.map-readout { margin: 0; min-height: 1.5em; }
.map-pin { background: none; border: 0; }
.map-pin span { display: block; width: 26px; height: 26px; margin: 2px; border: 3px solid var(--white); border-radius: 50% 50% 50% 0; background: var(--map-pin); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55); transform: rotate(-45deg); }
.map-pin.sev-minor span { background: var(--sev-minor); }
.map-pin.sev-moderate span { background: var(--sev-moderate); }
.map-pin.sev-serious span { background: var(--sev-serious); }
.map-pin.sev-critical span { background: var(--sev-critical); }
.map-pop { display: grid; gap: 2px; min-width: 160px; }
@media print { .map-box { display: none; } }

/* ---------- the basket and checkout ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: grid; gap: 4px; text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px; min-height: 84px; cursor: pointer; align-content: start; }
.tile:hover, .tile:focus-visible { background: var(--snowpack); border-color: var(--ink); }
.tile-price { font-size: 1.25rem; font-weight: 700; }
.basket { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.basket-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qty { display: inline-flex; gap: 6px; align-items: center; }
.line-price { font-weight: 700; min-width: 5ch; text-align: right; }
.who-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pay-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.tender-row { flex-wrap: wrap; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.gear { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.gear .din { width: 5.5em; margin-left: auto; }
.receipt-head strong { font-size: 1.5rem; }
.change-due { font-size: 2rem; font-weight: 700; background: var(--hold-tint); border: 2px solid var(--warn-line); border-radius: var(--radius); padding: 12px 16px; }
.basket-panel { position: sticky; top: calc(var(--stick-top, 0px) + 12px); }
.basket-total[data-state='good'] { color: var(--open); }
@media (max-width: 640px) { .basket-line { grid-template-columns: minmax(0, 1fr) auto; } .who-row { grid-template-columns: 1fr; } }

/* ---------- sell and gate: a calmer, roomier counter ---------- */
:root { --lift: 0 1px 2px rgba(18, 48, 58, 0.06), 0 8px 24px rgba(18, 48, 58, 0.07); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--lift); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }

.sell-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.sell-main { gap: 24px; }
@media (max-width: 1100px) { .sell-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 900px) { .sell-grid { grid-template-columns: 1fr; } }

/* menu: pill tabs, a quiet toolbar, big tap targets */
.sell-menu .tabs { border-bottom: none; gap: 6px; margin-bottom: 16px; padding-bottom: 2px; }
.sell-menu .tabs button { border: 1px solid transparent; border-radius: var(--radius-pill); padding: 8px 18px; margin: 0; background: var(--snowpack); color: var(--ink-2); }
.sell-menu .tabs button:hover { border-color: var(--line-strong); }
.sell-menu .tabs button[aria-selected='true'] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.menu-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 16px; }
.menu-tools .field { min-width: 170px; }
.menu-tools input, .menu-tools select { min-height: 44px; }

.tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-height: 112px; padding: 14px 14px 12px 18px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent-line); }
.tile::after { content: '+'; position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--link); background: var(--info-tint); }
.tile:hover, .tile:focus-visible { background: var(--surface); border-color: var(--link); box-shadow: 0 4px 14px var(--accent-glow); transform: translateY(-1px); }
.tile:active { transform: none; }
.tile strong { font-size: 1.0625rem; padding-right: 30px; line-height: 1.25; }
.tile-price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

/* basket: the one strong element on the page */
.basket-panel { position: sticky; top: calc(var(--stick-top, 0px) + 16px); display: grid; gap: 14px; }
.basket-head { display: flex; align-items: center; gap: 10px; }
.count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.875rem; display: inline-grid; place-items: center; }
.basket-empty { padding: 28px 8px; text-align: center; color: var(--quiet); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); }
.basket { gap: 0; }
.basket-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'what price' 'qty remove'; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.basket-line:first-child { padding-top: 0; }
.basket-what { grid-area: what; min-width: 0; }
.basket-line .line-price { grid-area: price; font-size: 1.0625rem; }
.basket-line .qty { grid-area: qty; }
.basket-line > .btn.link { grid-area: remove; justify-self: end; color: var(--closed); font-size: 0.875rem; }
.basket-line > span:empty { grid-area: qty; }
.qty .btn { min-width: 36px; padding: 0; border-radius: 50%; }
.qty span { min-width: 2ch; text-align: center; font-weight: 700; }
.basket-summary { display: grid; gap: 4px; padding-top: 4px; }
.basket-summary .basket-total { font-size: 2rem; letter-spacing: -0.02em; align-items: baseline; }
.promo-row { display: grid; gap: 4px; }
.promo-input { display: flex; gap: 8px; }
.promo-input input { flex: 1; min-width: 0; }
.basket-panel .btn.big { width: 100%; }

/* sold today */
.order-list { list-style: none; margin: 0; padding: 0; }
.order-row { display: grid; grid-template-columns: 56px 56px auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.order-id { font-weight: 700; }
.order-total { text-align: right; }
.order-actions { display: inline-flex; gap: 6px; }
@media (max-width: 640px) { .order-row { grid-template-columns: auto auto 1fr; } .order-actions { grid-column: 1 / -1; } }

/* gate page */
.gate-page { max-width: 760px; margin: 0 auto; gap: 20px; }
.gate-page .scan-input { text-align: center; min-height: 72px; font-size: 1.75rem; border-width: 2px; border-radius: var(--radius-md); }
.gate-page .gate { min-height: 220px; display: grid; align-content: center; justify-items: center; text-align: center; border-radius: var(--radius-xl); }
.gate-page .gate strong { font-size: 3.5rem; }

/* receipts, ticket slips and printing */
.print-area { display: grid; gap: 16px; justify-items: center; }
.sheet { background: var(--white); color: var(--black); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.8125rem; line-height: 1.35; }
.receipt-sheet { width: 300px; max-width: 100%; }
.rc-head { text-align: center; margin-bottom: 8px; }
.rc-head strong { font-size: 1rem; display: block; }
.rc-meta { margin: 6px 0; }
.rc-lines { border-top: 1px dashed var(--black); border-bottom: 1px dashed var(--black); padding: 6px 0; margin: 6px 0; display: grid; gap: 6px; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; }
.rc-sub { color: var(--ink); padding-left: 8px; }
.rc-totals { display: grid; gap: 2px; }
.rc-total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--black); padding-top: 4px; margin-top: 2px; }
.rc-foot { text-align: center; margin-top: 10px; border-top: 1px dashed var(--black); padding-top: 8px; }
.slip { width: 340px; max-width: 100%; display: grid; gap: 8px; text-align: center; border: 2px solid var(--black); }
.slip header { display: grid; gap: 2px; }
.slip header strong { font-size: 1rem; }
.slip-who { font-size: 1.125rem; font-weight: 700; display: grid; }
.slip-who small { font-weight: 400; font-size: 0.8125rem; }
.slip-codes { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.slip-codes svg { max-width: 100%; height: auto; }
.slip-code { letter-spacing: 0.12em; font-weight: 700; }
.slip.wristband { width: 420px; padding: 8px 12px; grid-template-columns: 1fr auto; text-align: left; align-items: center; }
.slip.wristband header, .slip.wristband .slip-when, .slip.wristband .slip-code { grid-column: 1 / -1; }
@media print {
  body:has(.print-overlay) > *:not(.print-overlay) { display: none !important; } /* only while a receipt or slip is open */
  .print-overlay { position: static; background: none; padding: 0; display: block; overflow: visible; }
  .print-overlay .dialog { box-shadow: none; border: 0; max-width: none; width: auto; padding: 0; }
  .print-overlay .dialog > header, .no-print { display: none !important; }
  .print-area { display: block; }
  .sheet { border-radius: 0; margin: 0 auto 12mm; break-inside: avoid; page-break-inside: avoid; }
  .slip { break-after: page; }
  .receipt-sheet { border: 0; padding: 0; }
}

/* photos, family, drawer, money */
.photo-field { display: grid; gap: 8px; justify-items: start; }
.photo-field .photo-preview { width: 96px; height: 120px; border-radius: var(--radius); border: 1px solid var(--line); object-fit: cover; background: var(--info-tint); }
.photo-field .photo-empty { width: 96px; height: 120px; border-radius: var(--radius); border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 0.8125rem; padding: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.family-chip { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 6px 12px; font: inherit; cursor: pointer; }
.family-chip:hover { background: var(--info-tint); }
.guardian-row { display: grid; gap: 4px; }
.waiver-text { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface-2); white-space: pre-wrap; font-size: 0.875rem; }
.drawer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.drawer-grid > div { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; display: grid; gap: 2px; }
.drawer-grid strong { font-size: 1.25rem; }
.drawer-grid small { color: var(--muted); }
.variance-over { color: var(--open-ink); font-weight: 700; }
.variance-short { color: var(--closed-ink); font-weight: 700; }
.gate-person { display: flex; gap: 20px; align-items: center; justify-content: center; text-align: left; margin-top: 8px; }
.gate-person img { width: 160px; height: 200px; object-fit: cover; border-radius: var(--radius-md); border: 3px solid rgba(255, 255, 255, 0.85); }
.gate-person .gate-name { font-size: 2rem; font-weight: 700; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.0625rem; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; word-break: break-all; }

.gear.match { background: var(--open-tint); border-color: var(--open-line); }
.waiver-read summary { cursor: pointer; font-size: 0.875rem; }

/* ---------------------------------------------------------------- ski school */
.board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.board .panel.attention { border-left: 4px solid var(--warn); }
.students { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.students .link { color: inherit; font-weight: 600; }
.level > summary { cursor: pointer; padding: 6px 0; }
.skills { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 4px; }
.credits { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.report-card { width: 640px; max-width: 100%; font-family: inherit; }
.report-card h2 { margin: 4px 0; }
.rcard-block { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.rcard-levels, .rcard-levels ul { list-style: none; padding-left: 0; margin: 4px 0; }
.rcard-levels ul { padding-left: 16px; }
.rcard-levels .passed::before { content: '\2713  '; }
.rcard-levels .todo { color: var(--muted); }

/* the public booking page */
.book-body { background: var(--snowpack); }
.book { max-width: 640px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.book .field { display: grid; gap: 4px; }
.book input, .book select, .book textarea { width: 100%; font: inherit; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-sizing: border-box; }
.book input[type='checkbox'] { width: auto; min-height: 0; }
.book fieldset { border: 1px solid var(--line); }
.book .reference { font-size: 1.4rem; letter-spacing: 2px; }
@media print { .book-body { background: var(--white); } }

.empty-day { font-weight: 600; }

/* ---------------------------------------------------------------- patrol: bedside card, quick vitals, stages, hand-off sheet
   A gloved thumb in the cold: 48 px or larger targets, one clear primary action, and status told in words as well as colour. */
:root { --watch: #8a5300; --watch-tint: #fbefd6; --alert: #b42318; --alert-tint: #fbe5e2; --ok-tint: #e3f3ea; }


.bedside { border-radius: var(--radius-lg); border-left: 6px solid var(--accent-line); box-shadow: var(--lift); gap: 14px; }
.bedside h3 { font-size: 1.375rem; line-height: 1.2; }
.bedside h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--quiet); }
.bedside .complaint { font-size: 1.0625rem; }
.bedside .sample { gap: 8px 16px; }
.bedside .sample .state { white-space: normal; }
.bedside .sample .state[data-state='bad'] { background: var(--alert-tint); padding: 4px 12px; border-radius: var(--radius-pill); }
.vhead { align-items: baseline; }
.due { font-weight: 700; font-size: 0.9375rem; padding: 4px 12px; border-radius: var(--radius-pill); }
.due:empty { display: none; }
.due[data-level='ok'] { background: var(--ok-tint); color: var(--open); }
.due[data-level='watch'] { background: var(--watch-tint); color: var(--watch); }
.due[data-level='alert'] { background: var(--alert-tint); color: var(--alert); }
.vstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .vstrip { grid-template-columns: repeat(6, 1fr); } }
.vtile { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 8px 6px; text-align: center; display: grid; gap: 0; background: var(--surface); }
.vtile .vl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--quiet); font-weight: 700; }
.vtile .vv { font-size: 1.75rem; line-height: 1.15; }
.vtile .vf { font-size: 0.8125rem; font-weight: 700; min-height: 1.2em; }
.vtile[data-level='watch'] { background: var(--watch-tint); border-color: var(--hold-line); color: var(--watch); }
.vtile[data-level='alert'] { background: var(--alert-tint); border-color: var(--closed-line); color: var(--alert); }
.bed-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bed-actions .btn.big { min-height: 52px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row.quick .btn { min-height: 44px; }
.vtable { font-size: 0.9375rem; }
.vtable td[data-level='watch'] { background: var(--watch-tint); font-weight: 700; }
.vtable td[data-level='alert'] { background: var(--alert-tint); font-weight: 700; }
.fw { font-size: 0.75rem; }

.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.stage { display: grid; gap: 2px; align-content: center; justify-items: start; text-align: left; font: inherit; border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; min-height: 64px; background: var(--surface); color: var(--ink); }
.stage .sname { font-size: 0.8125rem; font-weight: 700; color: var(--quiet); }
.stage b { font-size: 1.125rem; }
.stage.done { background: var(--ok-tint); border-color: var(--open-line); }
.stage.done .sname { color: var(--open); }
button.stage.todo { border-style: dashed; border-color: var(--link); color: var(--accent-ink); cursor: pointer; font-weight: 700; }
button.stage.todo:hover { background: var(--info-tint); }
button.stage:disabled { opacity: 0.6; }

details.paperwork { padding: 0; }
details.paperwork > summary { list-style: none; cursor: pointer; padding: 16px; display: grid; gap: 2px; font-size: 1.25rem; font-weight: 700; min-height: 56px; }
details.paperwork > summary::-webkit-details-marker { display: none; }
details.paperwork > summary::after { content: 'Show'; justify-self: start; margin-top: 4px; font-size: 0.875rem; color: var(--accent-ink); text-decoration: underline; }
details.paperwork[open] > summary::after { content: 'Hide'; }
details.paperwork > div { padding: 0 16px 16px; }
details.more > summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }

/* quick vitals sheet */
.dialog.sheet { width: min(760px, 100%); }
@media (max-width: 640px) {
  .overlay:has(.dialog.sheet) { padding: 0; place-items: end center; }
  .dialog.sheet { border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-height: 94vh; overflow-y: auto; padding: 16px; }
}
.vsheet { gap: 16px; }
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .vgrid { grid-template-columns: repeat(4, 1fr); } .vgrid.two { grid-template-columns: repeat(2, 1fr); } }
.vstep { display: grid; gap: 4px; align-content: start; }
.vstep label { font-weight: 700; font-size: 0.9375rem; }
.step-row { display: grid; grid-template-columns: 52px 1fr 52px; gap: 6px; }
.step-btn { min-height: 56px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 1.75rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.step-btn:active { background: var(--snowpack); }
.step-input { min-height: 56px; width: 100%; text-align: center; font: inherit; font-size: 1.5rem; font-weight: 700; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); padding: 0 4px; -moz-appearance: textfield; }
.step-input::-webkit-outer-spin-button, .step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-input[data-level='watch'] { background: var(--watch-tint); border-color: var(--hold-line); }
.step-input[data-level='alert'] { background: var(--alert-tint); border-color: var(--closed-line); }
.vstep .last { font-size: 0.8125rem; color: var(--quiet); }
.flag { font-size: 0.8125rem; font-weight: 700; min-height: 1.1em; }
.flag[data-level='watch'] { color: var(--watch); }
.flag[data-level='alert'] { color: var(--alert); }
.vblock { display: grid; gap: 6px; }
.chip { min-height: 48px; min-width: 48px; padding: 0 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
#v-pain .chip { min-width: 44px; padding: 0 10px; }

/* hand-off sheet */
.handoff { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 16px; box-shadow: var(--lift); max-width: 980px; }
.handoff-tools { position: sticky; top: 0; background: var(--surface); z-index: 2; padding-bottom: 8px; }
.hs-head { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; border-bottom: 3px solid var(--ink); padding-bottom: 12px; }
.hs-head h1 { font-size: 1.875rem; }
.hs-head .eyebrow { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--quiet); font-weight: 700; }
.hs-meta { display: grid; gap: 2px; text-align: right; font-size: 0.9375rem; }
@media (max-width: 640px) { .hs-meta { text-align: left; } }
.hs-alert { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; background: var(--snowpack); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); padding: 12px 14px; }
.hs-alert > div:first-child { background: var(--alert-tint); border-radius: var(--radius); padding: 6px 10px; margin: -6px 0; }
.hs-alert .k, .hs-sign .k { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--quiet); font-weight: 700; }
.danger-text { color: var(--alert); font-size: 1.125rem; }
.hs-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .hs-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.hs h3 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.hs { display: grid; gap: 6px; break-inside: avoid; }
.medbox { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 6px 10px; }
.medbox.none { border-color: var(--line-strong); color: var(--quiet); }
.times li { display: flex; justify-content: space-between; }
.hs-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 8px; }
.hs-sign .line { border-bottom: 1.5px solid var(--ink); min-height: 34px; padding-top: 6px; font-weight: 700; }
@media print {
  @page { margin: 12mm; }
  body { background: var(--white); }
  .handoff { border: none; box-shadow: none; padding: 0; font-size: 10.5pt; gap: 10px; max-width: none; }
  .handoff-tools, .page-head, .tabs { display: none !important; }
  .hs-grid { grid-template-columns: 1fr 1fr; }
  .hs-alert { border-color: var(--black); }
  .vtable td[data-level='watch'], .vtable td[data-level='alert'] { background: none; text-decoration: underline; }
}

a.btn { text-decoration: none; }
.vtable td, .vtable th { white-space: nowrap; }
.bedside .plain li { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; justify-content: space-between; }
.bedside .plain li .btn { flex: none; }
.case-head h1 { font-size: 1.5rem; }

/* ---- patrol home, new case button, offline banner */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 20px; border-radius: var(--radius-pill); border: none; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: 1.0625rem; box-shadow: 0 6px 18px rgba(8, 35, 60, 0.35); cursor: pointer; }
.fab span { font-size: 1.5rem; line-height: 1; margin-top: -2px; }
.fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.offline-banner { position: sticky; top: var(--stick-top, 0px); z-index: 49; /* under open dialogs (50), over the page */ background: var(--offline-bg); color: var(--white); padding: 10px 14px; border-radius: var(--radius-md); margin-bottom: 12px; }
.offline-banner[hidden] { display: none; }
.home-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.home-top .grow { flex: 1 1 260px; }
.home-top .grow input { width: 100%; min-height: 48px; font-size: 1rem; }
.nudges { display: grid; gap: 8px; }
.nudge { display: block; padding: 12px 14px; border-radius: var(--radius-md); background: var(--snowpack); border: 1.5px solid var(--line-strong); color: inherit; text-decoration: none; font-weight: 600; }
.nudge.warn { background: var(--hold-tint); border-color: var(--hold-line); }
a.nudge:hover { border-color: var(--link); }
.case-list { display: grid; gap: 8px; }
.case-row { display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-md); color: inherit; text-decoration: none; background: var(--surface); min-height: 56px; }
.case-row:hover, .case-row:focus-visible { border-color: var(--link); box-shadow: var(--lift); }
.cr-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* ---- checklists, collision panel, forms */
.checklist { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; background: var(--surface); }
.checklist summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: none; }
.checklist li.done span:first-of-type { color: var(--quiet); }
.checklist .check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.checklist .check input, .checks .check input { width: 24px; height: 24px; flex: none; }
.checks { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checks legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.parties li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.parties-grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .parties-grid { grid-template-columns: 1fr 1fr; } }
.party-card { border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); padding: 10px 12px; break-inside: avoid; }
.party-card h4 { margin-bottom: 2px; }
.statement { font-size: 0.9375rem; line-height: 1.5; border-left: 4px solid var(--ink); padding-left: 12px; }
.sigbox { min-height: 72px; display: flex; align-items: flex-end; }
.sigbox .sig-img { max-height: 70px; }
.takehome .lead-text { font-size: 1.125rem; }
.takehome .urgent h3 { color: var(--alert); border-bottom-color: var(--alert); }
.takehome .bullets { list-style: disc; padding-left: 22px; }
.takehome .bullets li { padding: 3px 0; font-size: 1.0625rem; }
.takehome .emergency { font-weight: 800; font-size: 1.25rem; border: 2px solid var(--alert); color: var(--alert); text-align: center; padding: 8px; border-radius: var(--radius-md); }
.bed-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media print { .fab, .offline-banner, .handoff .chip-row { display: none !important; } }

/* ======================================================================================================
   Design pass: one spacing scale, one control size, roomier panels.
   Everything below overrides the earlier rules on purpose, so the scale lives in one place.
   Spacing scale: 4, 8, 12, 16, 24, 32, 48. Controls are 44 px (40 px for small), radius 8 px, panels 14 px.
   ====================================================================================================== */
:root {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --shadow-sm: 0 1px 2px rgba(18, 48, 58, 0.05);
}

/* shell: more air around the content */
.main { padding: var(--sp-6) var(--sp-7) 120px; max-width: 1160px; }
.page-head { margin-bottom: var(--sp-5); gap: var(--sp-3) var(--sp-5); }
h1 { font-size: 2rem; letter-spacing: -0.01em; }
.page-head h1 { margin: 0; }
.section { margin-top: var(--sp-6); }
.section > header { margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); }

/* rhythm: stacks breathe, panels hold their content with room to spare */
.stack { gap: var(--sp-4); }
.stack.tight { gap: var(--sp-2); }
.row { gap: var(--sp-3); }
.spread { gap: var(--sp-3) var(--sp-5); }
.panel { padding: var(--sp-5); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel.stack { gap: 20px; }
.empty { padding: var(--sp-6) var(--sp-5); border-radius: var(--radius-lg); }
.case { gap: var(--sp-5); }
.case > section.stack { gap: var(--sp-4); }

/* controls: one height, one radius, the same gap everywhere */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 44px; padding: 0 18px; line-height: 1.2; border-radius: var(--radius); transition: background-color 0.12s, border-color 0.12s; }
.btn:hover { background: var(--surface-2); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.small { min-height: 40px; padding: 0 14px; }
.btn.big { min-height: 52px; padding: 0 22px; }
.btn.link { display: inline; min-height: 0; padding: 4px 6px; background: none; }
.btn.link:hover { background: none; }
.btn.quiet-danger { border-color: transparent; background: none; color: var(--closed); font-weight: 700; }
.btn.quiet-danger:hover { background: var(--closed-tint); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

label.field, .field { gap: var(--sp-2); font-weight: 700; }
.field .hint { margin-top: 0; line-height: 1.4; }
input, select, textarea { min-height: 46px; padding: 10px 12px; border-radius: var(--radius); }
textarea { padding: 12px; line-height: 1.5; }
input[type='datetime-local'], input[type='date'], input[type='time'] { min-width: 0; }
.form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; align-items: start; }
.inline-form { gap: var(--sp-3); }

/* tables */
th, td { padding: 14px 18px; }
.table-wrap { border-radius: var(--radius-lg); }

/* dialogs: a header you can tell from the body, and a footer that is clearly the end */
.overlay { padding: 8vh 16px 24px; }
.dialog { padding: var(--sp-5) var(--sp-6) var(--sp-6); gap: var(--sp-5); border-radius: var(--radius-xl); }
.dialog header { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line); align-items: center; }
.dialog header h2 { font-size: 1.375rem; }
.dialog form.stack { gap: var(--sp-5); }
.dialog .footer { padding-top: var(--sp-5); border-top: 1px solid var(--line); gap: var(--sp-3); }
.dialog .footer.row { justify-content: flex-end; }
@media (max-width: 640px) {
  .overlay { padding: 16px 12px; }
  .dialog { padding: var(--sp-5) var(--sp-4) var(--sp-5); }
  .dialog .footer .btn { flex: 1 1 auto; }
}

/* the case page */
.back { margin: 0 0 calc(var(--sp-2) * -1); }
.back a { color: var(--quiet); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.back a:hover { color: var(--link); text-decoration: underline; }
.case-head { padding: var(--sp-5) var(--sp-6); gap: var(--sp-4); }
.case-head .case-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--sp-3) var(--sp-5); }
.case-head h1 { font-size: 1.75rem; margin-bottom: var(--sp-1); }
.case-head .actions { padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* progress: the one strong element on the case page */
.progress { gap: var(--sp-4); border-left: 6px solid var(--accent-line); }
.progress-top { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; justify-content: space-between; }
.progress-top h2 { margin-bottom: 2px; }
.pbar { height: 8px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--open); border-radius: var(--radius-pill); transition: width 0.3s; }
.psteps { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.pstep { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 0.9375rem; cursor: pointer; }
.pstep:hover { border-color: var(--ink); }
.pstep.done { background: var(--ok-tint); border-color: var(--open-line); color: var(--open); }
.pstep.done::before { content: '\2713'; font-weight: 700; }
.pstep.next { border-color: var(--link); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-glow); }
@media (prefers-reduced-motion: reduce) { .pbar > i { transition: none; } }

/* patient card: headings in plain sentence case, sections divided, buttons one size */
.bedside { padding: var(--sp-6); gap: var(--sp-5); border-radius: var(--radius-xl); }
.bedside h4 { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink); }
.bedside > .stack.tight { padding-top: var(--sp-5); border-top: 1px solid var(--line); gap: var(--sp-3); }
.bedside .plain li { padding: var(--sp-3) 0; }
.bedside .vhead { margin-bottom: calc(var(--sp-2) * -1); }
.vstrip { gap: var(--sp-3); }
.vtile { padding: var(--sp-4) var(--sp-2); }
.vtile .vl { text-transform: none; letter-spacing: 0; font-size: 0.875rem; }
.vtile .vv { font-size: 1.875rem; }
.bed-actions { display: grid; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.bed-primary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 280px)); gap: var(--sp-3); }
.bed-secondary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-3); }
.bed-secondary .btn { width: 100%; }
.bed-foot { display: flex; justify-content: flex-end; padding-top: var(--sp-2); }
.chip-row { gap: var(--sp-3); }
.stages { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.stage { padding: var(--sp-3) var(--sp-4); min-height: 72px; }
.checklist { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-lg); }
details.paperwork > summary { padding: var(--sp-5); }
details.paperwork > div { padding: 0 var(--sp-5) var(--sp-5); }
.nsaar-sec > summary { min-height: 48px; }
.nsaar-sec[open] > summary { margin-bottom: var(--sp-2); }
.nsaar-note { margin: var(--sp-1) 0 var(--sp-4); line-height: 1.5; }
.nsaar-grid { gap: var(--sp-4) var(--sp-5); }
.nsaar-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); padding-top: var(--sp-2); }
.hs-alert .k, .hs-sign .k, .hs-head .eyebrow, .hs h3 { text-transform: none; letter-spacing: 0; }
.hs h3 { font-size: 1rem; }

/* patrol home and lists */
.home-top { gap: var(--sp-3); margin-bottom: var(--sp-1); }
.nudges { gap: var(--sp-3); }
.nudge { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-lg); }
.case-list { gap: var(--sp-3); }
.case-row { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius-lg); gap: var(--sp-1); }
.cr-tags { margin-top: var(--sp-2); gap: var(--sp-3); }
.fab { right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); min-height: 56px; padding: 0 24px; }
.filters { gap: var(--sp-3); }

@media (max-width: 860px) { .main { padding: var(--sp-5) var(--sp-4) 112px; } }
@media (max-width: 640px) {
  .panel { padding: var(--sp-4) 18px; }
  .case-head { padding: var(--sp-4) 18px; }
  .bedside { padding: var(--sp-5) 18px; }
  .tabs { margin-bottom: var(--sp-4); }
  .fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  h1 { font-size: 1.625rem; }
  th, td { padding: 12px 14px; }
}
@media print { .progress, .back { display: none !important; } }

/* time clock kiosk (manager side) */
.row.between { justify-content: space-between; align-items: center; }
.pair-code { font-size: 2rem; font-weight: 700; letter-spacing: 0.18em; text-align: center; padding: var(--sp-4); background: var(--info-tint); border-radius: var(--radius); }
.kiosk-link { word-break: break-all; }
.punch-photo { width: 100%; max-width: 480px; border-radius: var(--radius); }
tr.row-warn td { background: var(--hold-tint); }
.check { display: flex; gap: var(--sp-2); align-items: center; min-height: 44px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.badge-card { display: grid; justify-items: center; gap: 8px; text-align: center; font-family: inherit; }
.badge-name { font-size: 1.125rem; font-weight: 700; }
@media print { .badge-grid { grid-template-columns: repeat(3, 1fr); } .badge-card { break-inside: avoid; border: 1px dashed var(--black); margin: 0; } }

/* ================= The frame (2026.11.21): the side menu, the top bar, the phone bar and Menu sheet, Jump to =================
   The menu is for places, the top bar is for actions. On a computer: a side menu 240 px wide (a 56 px row for the
   organization, one list that scrolls as a whole in 32 px rows, a 56 px row for the person) that collapses to a 64 px
   strip of icons, and a 52 px top bar. On a phone (860 px and under): a 56 px top bar, a bottom bar, and the Menu sheet.
   Built by public/js/nav.js. */
/* The side menu and the bars have their own surface in each theme: white beside the light page, deep slate beside the dark one. */
:root {
  --side: #ffffff; --side-ink: #1b3642; --side-ico: #1d4452; --side-muted: #52656d; --side-line: #dce3e7; --side-hover: #eef2f4; --side-field: #f1f4f6;
  --side-active-bg: var(--accent-tint); --side-active-ink: #0e2632; --side-sec-bg: #eef2f4;
  --pop-shadow: 0 10px 30px rgba(14, 38, 50, 0.18), 0 1px 3px rgba(14, 38, 50, 0.08);
  --avatar-bg: #1d4452; --avatar-ink: #ffffff;
  --rail-open: 240px; --rail-strip: 64px;
  /* How far down a bar that sticks to the top of a page must sit to clear the top bar (a computer; on a phone such
     bars cover the top bar, as before). */
  --stick-top: 52px;
}
:root[data-theme='dark'] {
  --side: #0c171d; --side-ink: #c9d5db; --side-ico: #a7b8c0; --side-muted: #97aab3; --side-line: #26363f; --side-hover: rgba(255, 255, 255, 0.06); --side-field: #16232b;
  --side-active-bg: rgba(216, 182, 114, 0.14); --side-active-ink: #ebd3a0; --side-sec-bg: rgba(255, 255, 255, 0.07);
  --pop-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --avatar-bg: #2b4250; --avatar-ink: #e6edf0;
}
.shell { --rail-w: var(--rail-open); display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.shell.collapsed { --rail-w: var(--rail-strip); }
.frame { min-width: 0; display: block; }
/* The first stop for the Tab key, in sight only while it has the focus: past the menu, to the page. */
.skip-link { position: fixed; z-index: 90; top: 8px; left: 8px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--sel-bg); color: var(--sel-ink); font: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; transform: translateY(-64px); }
.skip-link:focus-visible { transform: none; outline: 3px solid var(--focus); outline-offset: 2px; }
.ico { flex: none; }
.brand-mark { display: block; width: auto; height: 18px; flex: none; }
.brand-logo-full { display: block; width: 220px; max-width: 100%; height: auto; }
kbd { font: inherit; font-size: .75rem; line-height: 1; padding: 3px 5px; border-radius: var(--radius-xs); border: 1px solid var(--side-line); color: inherit; background: transparent; }

/* ---- the side menu */
.rail { position: sticky; top: 0; z-index: 35; justify-self: start; width: var(--rail-w); height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; overflow: clip; background: var(--side); color: var(--side-ink); border-right: 1px solid var(--side-line); }
.rail :focus-visible, .topbar :focus-visible, .tabbar :focus-visible, .menu-sheet :focus-visible, .pop-menu :focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
/* The organization: its name with Verdynt/OS under it, and the button that collapses the menu. */
.rail-org { position: relative; flex: none; height: 56px; width: var(--rail-open); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--side-line); }
.rail-org .brand-mark { width: 32px; height: 18px; }
.org-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.org-text strong { font-size: .875rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-text span { font-size: .75rem; color: var(--side-muted); }
.org-mono { display: none; flex: none; width: 32px; height: 32px; place-items: center; border-radius: var(--radius); background: var(--side-field); border: 1px solid var(--side-line); color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.rail-toggle { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--side-line); border-radius: var(--radius-sm); background: transparent; color: var(--side-muted); cursor: pointer; }
.rail-toggle:hover { background: var(--side-hover); color: var(--ink); }

/* The one list: Home, Pinned, then every section, all open. It scrolls as a whole. Rows keep one width whether the
   menu is open or a strip, so nothing in them moves when the strip opens over the page. */
.rail .nav { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 12px; scrollbar-width: thin; scrollbar-color: var(--side-line) transparent; }
.nav-items { list-style: none; margin: 0; padding: 0; }
.nav-items[hidden] { display: none; }
.nav-row { position: relative; display: flex; align-items: center; gap: 10px; width: calc(var(--rail-open) - 24px); height: 32px; padding: 0 8px 0 11px; border-radius: var(--radius); color: var(--side-ink); font-size: .875rem; line-height: 1.2; text-decoration: none; cursor: pointer; -webkit-touch-callout: none; }
.nav-row .ico { color: var(--side-ico); }
.nav-row:hover { background: var(--side-hover); color: var(--ink); }
.nav-row[aria-current='page'], .nav-row.is-current { background: var(--side-active-bg); color: var(--side-active-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent-line); }
.nav-row[aria-current='page'] .ico, .nav-row.is-current .ico { color: currentColor; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A section's label: quiet words, not a heading that shouts. It is a button that folds its section. */
.nav-sec { width: calc(var(--rail-open) - 24px); padding-top: 2px; }
.nav-head { display: flex; align-items: flex-end; justify-content: space-between; height: 32px; margin: 0; font-size: .75rem; font-weight: 400; }
.nav-title { margin: 0; padding: 0 0 5px 11px; font: inherit; color: var(--side-muted); }
.nav-fold { flex: 1; min-width: 0; height: 32px; display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 5px 11px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--side-muted); font: inherit; letter-spacing: .01em; text-align: left; cursor: pointer; }
.nav-fold:hover { color: var(--ink); }
.nav-fold-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chev { flex: none; width: 6px; height: 6px; margin: 0 0 5px 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0; transition: opacity .12s ease, transform .12s ease; }
.nav-fold:hover .nav-chev, .nav-fold:focus-visible .nav-chev { opacity: 1; }
.nav-fold[aria-expanded='false'] .nav-chev { opacity: 1; transform: translateY(1px) rotate(-45deg); }
/* The section holding the open page stays open: its label is not a control while it does. */
.nav-fold[aria-disabled='true'] { cursor: default; }
.nav-fold[aria-disabled='true']:hover { color: var(--side-muted); }
.nav-fold[aria-disabled='true'] .nav-chev { opacity: 0; }
.nav-edit { flex: none; height: 32px; padding: 0 8px 5px; display: inline-flex; align-items: flex-end; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font: inherit; font-size: .75rem; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.nav-edit:hover { color: var(--ink); }

/* A count: only where something waits on this person. A quiet gold pill; red when it is overdue or urgent. */
.nav-badge { flex: none; margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: .71875rem; font-weight: 700; line-height: 1; display: inline-grid; place-items: center; }
.nav-badge.alert { background: var(--closed); color: var(--on-fill); }
.nav-badge.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--accent-line); }

/* The person: one row that opens the account menu. */
.rail-foot { position: relative; flex: none; width: var(--rail-open); border-top: 1px solid var(--side-line); }
.acct { width: 100%; height: 55px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; border: 0; background: none; color: var(--side-muted); font: inherit; text-align: left; cursor: pointer; }
.acct:hover, .acct[aria-expanded='true'] { background: var(--side-hover); }
.rail .acct:focus-visible, .shell.collapsed .rail:not(.peek) .rail-toggle:focus-visible { outline-offset: -3px; }
.avatar { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--avatar-bg); color: var(--avatar-ink); font-weight: 700; font-size: .75rem; letter-spacing: .02em; }
.acct.has-new .avatar::after { content: ''; position: absolute; top: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-line); box-shadow: 0 0 0 2px var(--side); }
.who-text { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.who-text b { font-size: .8125rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text span { font-size: .75rem; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Collapsed: a 64 px strip of icons. The names are still there for screen readers; a count sits on its icon; section
   labels become thin rules. */
.shell.collapsed .rail:not(.peek) .nav-row { width: 40px; }
.shell.collapsed .rail:not(.peek) .nav-label, .shell.collapsed .rail:not(.peek) .org-text, .shell.collapsed .rail:not(.peek) .acct .who-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell.collapsed .rail:not(.peek) .nav-badge:not(.dot) { position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; font-size: .625rem; box-shadow: 0 0 0 2px var(--side); }
.shell.collapsed .rail:not(.peek) .nav-sec { width: 40px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--side-line); }
.shell.collapsed .rail:not(.peek) .nav-head { display: none; }
.shell.collapsed .rail:not(.peek) .acct > .ico { display: none; }
.shell.collapsed .rail:not(.peek) .org-mono { display: grid; }
/* The strip's top cell is the button that opens the menu again: the mark shows, and an arrow takes its place under the pointer. */
.shell.collapsed .rail:not(.peek) .rail-toggle { position: absolute; inset: 0; width: var(--rail-strip); height: 55px; border: 0; border-radius: 0; background: var(--side); opacity: 0; }
.shell.collapsed .rail:not(.peek) .rail-toggle:hover, .shell.collapsed .rail:not(.peek) .rail-toggle:focus-visible { opacity: 1; }
/* The strip opened over the page by the pointer or the keyboard: the page under it does not move. */
.shell.collapsed .rail.peek { width: var(--rail-open); border-right-color: var(--line-strong); box-shadow: 10px 0 30px rgba(8, 28, 36, .16); }
/* In the dark theme a shadow alone is lost on the dark page: a lighter edge and a raised surface set the panel apart. */
:root[data-theme='dark'] .shell.collapsed .rail.peek { --side: #13212a; border-right-color: #5b7584; box-shadow: 1px 0 0 rgba(255, 255, 255, .06), 14px 0 36px rgba(0, 0, 0, .65); }
/* The "moved here" note stays beside the panel while it is open over the page, never over the person's name. */
.shell.collapsed .rail.peek .moved-here.by-rail { left: calc(var(--rail-open) + 10px); }
.rail { transition: width .14s ease-out; }

/* ---- menus that open from a button: the account menu and + New */
.pop-menu { position: absolute; z-index: 60; display: grid; gap: 1px; width: 264px; padding: 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--pop-shadow); }
.pop-menu hr, .sheet-rows hr, .sheet-body > hr { width: auto; margin: 5px 4px; border: 0; border-top: 1px solid var(--line); }
.menu-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius); background: none; color: var(--ink); font: inherit; font-size: .875rem; text-align: left; text-decoration: none; cursor: pointer; }
.menu-row .ico { color: var(--side-ico); }
.menu-row > span:not(.nav-badge) { flex: 1; min-width: 0; }
.menu-row:hover, .menu-row:focus-visible { background: var(--surface-2); color: var(--ink); }
.menu-row[aria-current='page'] { font-weight: 700; }
.menu-row .nav-badge.dot { margin-left: 0; }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.menu-who .who-text b { font-size: .875rem; }
.menu-label { margin: 0; padding: 6px 10px 2px; font-size: .75rem; color: var(--quiet); }
.theme-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 2px 6px 4px; }
.theme-choice { min-height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-size: .8125rem; cursor: pointer; }
.theme-choice:hover { background: var(--surface-2); }
.theme-choice[aria-checked='true'] { background: var(--accent-tint); border-color: var(--accent-line); font-weight: 700; }
.who-version { display: block; padding: 6px 10px 4px; border-radius: var(--radius-sm); font-size: .75rem; color: var(--quiet); text-decoration: none; }
.who-version:hover { color: var(--ink); text-decoration: underline; }
.pop-menu .who-version { min-height: 32px; display: flex; align-items: center; padding: 0 10px; }
/* The account menu sits over the account row; beside the avatar when the menu is a strip. */
.acct-menu { position: fixed; left: 8px; bottom: 62px; }
.shell.collapsed .acct-menu { left: calc(var(--rail-strip) + 8px); bottom: 10px; }
.new-menu { top: calc(100% + 6px); right: 0; width: 240px; }

/* For 14 days: "Settings, Help and Sign out moved here.", pointing at the account row. */
.moved-here { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: var(--radius); background: var(--sel-bg); color: var(--sel-ink); font-size: .8125rem; line-height: 1.3; box-shadow: var(--pop-shadow); }
.moved-here .btn { flex: none; min-height: 32px; padding: 0 10px; border-color: transparent; background: var(--surface); color: var(--ink); font-size: .8125rem; }
.moved-here.by-rail { position: fixed; z-index: 34; left: calc(var(--rail-w) + 10px); bottom: 10px; width: 300px; }
.moved-here.by-rail::before { content: ''; position: absolute; left: -5px; bottom: 15px; width: 10px; height: 10px; background: var(--sel-bg); transform: rotate(45deg); }
.moved-here.in-sheet { margin-top: 14px; }

/* ---- the top bar: where you are, then the actions */
.topbar { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 28px; background: var(--side); border-bottom: 1px solid var(--side-line); container: topbar / inline-size; }
.top-brand { display: none; }
.top-where { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 1.125rem; line-height: 1.2; font-weight: 700; color: var(--ink); white-space: nowrap; }
.where-app { flex: none; }
.where-app a { color: inherit; text-decoration: none; border-radius: var(--radius-xs); }
.where-app a:hover { text-decoration: underline; text-underline-offset: 3px; }
.where-sep, .where-part { font-weight: 400; color: var(--side-muted); }
.where-part { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.top-star { flex: none; display: inline-flex; }
.top-star:empty { display: none; }
.top-jump { flex: 0 1 280px; min-width: 132px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 7px 0 10px; border: 1px solid var(--side-line); border-radius: var(--radius); background: var(--side-field); color: var(--side-muted); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; }
.top-jump:hover { border-color: var(--line-strong); color: var(--ink); }
.top-jump-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.top-jump kbd { flex: none; background: var(--side); }
.top-new { position: relative; flex: none; }
.btn.top-new-btn { min-height: 34px; height: 34px; padding: 0 12px 0 10px; gap: 6px; font-size: .8125rem; font-weight: 700; }
.top-sos { flex: none; height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 10px; border: 1.5px solid var(--closed); border-radius: var(--radius); background: var(--side); color: var(--closed); font: inherit; font-size: .8125rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.top-sos:hover { background: var(--closed-tint); }
.top-btn { position: relative; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--side-line); border-radius: var(--radius); background: var(--side); color: var(--ink); cursor: pointer; }
.top-btn:hover { background: var(--side-hover); border-color: var(--line-strong); color: var(--ink); }
.top-btn[aria-current='page'] { background: var(--side-active-bg); border-color: var(--accent-line); }
.top-btn .nav-badge { position: absolute; top: -6px; right: -6px; margin: 0; min-width: 17px; height: 17px; padding: 0 4px; font-size: .65625rem; box-shadow: 0 0 0 2px var(--side); }
/* When the bar is short of room (a narrow window, or Ask open beside the page), things give way in this order, so
   where you are and Guest needs help keep their words longest: the Ctrl K hint, Jump to's words, New's word, and only
   then Guest needs help's. Every button keeps its name for screen readers. */
@container topbar (max-width: 880px) { .top-jump { flex-basis: 160px; } .top-jump kbd { display: none; } }
@container topbar (max-width: 760px) { .top-jump { flex: none; min-width: 34px; width: 34px; padding: 0; justify-content: center; } .top-jump-text { display: none; } }
@container topbar (max-width: 680px) { .btn.top-new-btn { width: 34px; padding: 0; } .top-new-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@container topbar (max-width: 600px) { .top-sos { width: 34px; padding: 0; justify-content: center; } .top-sos span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* On a computer the top bar names the page and holds its Help, so the page header keeps only what it adds: a title
   that repeats the app's name is there for screen readers but not drawn, the breadcrumb and the Help button are not
   drawn, and a header with nothing else takes no room. On a phone the header is as it was. (main.js decorateHead) */
@media (min-width: 861px) {
  .page-head h1.h1-same { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .page-head .head-lead .crumbs, .page-head .head-tools .help-btn { display: none; }
  .page-head .head-tools.only-help { display: none; }
  /* No title and no summary left: the page's buttons keep their place on the right. */
  .page-head.no-title > .head-lead { flex: 0 0 auto; }
  .page-head.no-title { justify-content: flex-end; }
  .page-head.head-bare { margin: 0; }
  .page-head:has(h1.h1-same) { align-items: center; }
}

/* ---- jump-to palette */
.palette-overlay { place-items: start center; padding-top: min(14vh, 120px); }
.palette { width: min(600px, 100%); background: var(--surface); border-radius: var(--radius-xl); box-shadow: 0 24px 70px rgba(8, 28, 36, .45); overflow: hidden; animation: pal-in .14s ease-out; }
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .palette { animation: none; } }
.palette-top { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); color: var(--quiet); }
.palette-input { flex: 1; min-width: 0; height: 60px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.125rem; color: var(--ink); }
.palette-input:focus-visible { outline: 0; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 420px); overflow-y: auto; }
.palette-heading { padding: 10px 12px 4px; font-size: .8125rem; font-weight: 700; color: var(--quiet); }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 46px; border-radius: var(--radius-md); cursor: pointer; color: var(--ink); }
.palette-item[aria-selected='true'] { background: var(--accent-tint); color: var(--accent-ink); }
.p-title { flex: 1; min-width: 0; }
.p-hint { font-size: .8125rem; color: var(--quiet); }
.palette-none { padding: 24px 12px; color: var(--quiet); }
.palette-foot { display: flex; gap: 18px; padding: 10px 20px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--quiet); background: var(--surface-2); }
.palette-foot kbd { margin-right: 4px; color: var(--quiet); border-color: var(--line); }

/* ---- phones: no side menu; a top bar with the organization and three buttons, a bottom bar, and the Menu sheet */
.tabbar, .new-fab { display: none; }
.tab { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--side-ink); font: inherit; font-size: .71875rem; line-height: 1.2; text-decoration: none; cursor: pointer; -webkit-touch-callout: none; user-select: none; }
.tab .ico { color: var(--side-ico); }
/* A bar label is 12 letters at most (nav.js SHORT and barLabel), so it is never cut. */
.tab span { white-space: nowrap; }
.tab[aria-current='page'], .tab.is-current, .tab.on { color: var(--ink); font-weight: 700; }
.tab[aria-current='page'] .ico, .tab.is-current .ico, .tab.on .ico { color: currentColor; }
.tab[aria-current='page']::before, .tab.is-current::before, .tab.on::before { content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 var(--radius-xs) var(--radius-xs); background: var(--accent-line); }
.tab .nav-badge:not(.dot) { position: absolute; top: 6px; left: calc(50% + 3px); margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: .625rem; box-shadow: 0 0 0 2px var(--side); }
.tab.has-new::after { content: ''; position: absolute; top: 10px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent-line); box-shadow: 0 0 0 2px var(--side); }
.new-fab { position: fixed; z-index: 44; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px rgba(14, 38, 50, .28); cursor: pointer; }
.new-fab:active { background: var(--accent-hover); }

/* The Menu sheet: Home, Pinned and every section as grids of tiles, all open, and one row for the account. */
.overlay.menu-overlay { z-index: 60; }
.dialog.menu-sheet { width: min(560px, 100%); gap: 12px; padding: 14px 14px 20px; font-family: inherit; font-size: 1rem; line-height: 1.45; color: var(--ink); background: var(--snowpack); }
.menu-sheet header { padding-bottom: 0; border-bottom: 0; }
.menu-sheet header h2 { font-size: 1.25rem; }
.sheet-close { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.sheet-body { display: grid; gap: 0; }
.sheet-search { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--quiet); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.sheet-help-here { width: 100%; justify-content: center; margin: 12px 0 0; }
.sheet-sec { margin-top: 14px; }
.sheet-sec.sheet-home { margin-top: 12px; }
.sheet-label { display: flex; align-items: center; justify-content: space-between; min-height: 24px; margin: 0 2px 6px; font-size: .8125rem; color: var(--quiet); }
.sheet-label h3 { margin: 0; font: inherit; }
.sheet-label .nav-edit { height: 44px; min-width: 44px; margin: -12px -8px -8px 0; padding: 0 8px; align-items: center; justify-content: center; font-size: .8125rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.sheet-item { position: relative; min-width: 0; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-size: .75rem; line-height: 1.15; text-align: center; text-decoration: none; -webkit-touch-callout: none; user-select: none; }
.sheet-item .ico { color: var(--side-ico); }
.sheet-item-text { max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sheet-item[aria-current='page'], .sheet-item.is-current { background: var(--accent-tint); border-color: var(--accent-line); font-weight: 700; }
.sheet-item[aria-current='page'] .ico, .sheet-item.is-current .ico { color: currentColor; }
.sheet-item .nav-badge:not(.dot) { position: absolute; top: 5px; right: 6px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: .625rem; }
.sheet-acct { width: 100%; min-height: 60px; margin-top: 16px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--quiet); font: inherit; text-align: left; cursor: pointer; }
.sheet-acct .who-text b { font-size: .9375rem; }
.sheet-acct .who-text span { font-size: .8125rem; white-space: normal; }
.sheet-acct .nav-badge { margin-left: 0; }
.sheet-rows { display: grid; gap: 2px; }
.sheet-rows .menu-row { min-height: 48px; padding: 0 12px; font-size: 1rem; }
.sheet-rows .theme-seg { padding: 2px 12px 6px; gap: 6px; }
.sheet-rows .theme-choice { min-height: 44px; font-size: .9375rem; }
.sheet-rows .menu-label { padding: 8px 12px 2px; font-size: .8125rem; }
.sheet-rows .menu-who { padding: 4px 12px 8px; }
.sheet-rows .who-version { min-height: 44px; display: flex; align-items: center; padding: 0 12px; font-size: .8125rem; }
.dialog.acct-sheet, .dialog.new-sheet { background: var(--surface); }

@media (max-width: 860px) {
  :root { --stick-top: 0px; }
  .shell { display: block; }
  .rail { display: none; }
  .topbar { height: 56px; gap: 8px; padding: 0 12px 0 16px; }
  .top-where, .top-star, .top-new, .top-sos, .top-help { display: none; }
  .top-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
  .top-brand strong { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-brand .brand-mark { width: auto; height: 20px; }
  .top-jump { flex: none; min-width: 44px; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--radius-md); background: var(--side); color: var(--ink); }
  .top-jump .ico { width: 20px; height: 20px; }
  .top-jump-text, .top-jump kbd { display: none; }
  .top-btn { width: 44px; height: 44px; border-radius: var(--radius-md); }
  .top-btn .ico { width: 20px; height: 20px; }
  .top-btn .nav-badge { top: -5px; right: -5px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--side); border-top: 1px solid var(--side-line); }
  .new-fab { display: grid; }
  .main { padding-bottom: 120px; }
  /* Room under the last of the page for the round + (56 px and its gap) above the bottom bar, so it never covers it. */
  .shell.has-fab .main { padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px)) !important; }
  .fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  /* A block overlay, so the sheet grows with what is in it and the overlay scrolls: the sheet scrolls as one. */
  .overlay.menu-overlay { padding: 0; display: block; overflow-y: auto; overscroll-behavior: contain; }
  .overlay.phone-menu-overlay { background: var(--snowpack); }
  .dialog.menu-sheet.phone-menu { width: 100%; max-width: 600px; margin: 0 auto; min-height: 100%; height: auto; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; align-content: start; padding: 10px 14px calc(24px + env(safe-area-inset-bottom, 0px)); }
  /* The account and + New: sheets that rise from the bottom, over the Menu. */
  .overlay.acct-sheet-overlay, .overlay.new-sheet-overlay { display: flex; align-items: flex-end; }
  .dialog.acct-sheet, .dialog.new-sheet { width: 100%; max-height: 92vh; overflow-y: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 12px 8px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .acct-sheet header, .new-sheet header { padding: 0 4px 0 12px; }
}
@media (max-width: 340px) { .tab { font-size: .65625rem; } }
/* Messages that pop up clear the side menu on a computer and the bottom bar on a phone. */
@media (min-width: 861px) {
  body:has(.shell) .toasts { left: calc(var(--rail-open) + 16px); }
  body:has(.shell.collapsed) .toasts { left: calc(var(--rail-strip) + 16px); }
  .in-settings body:has(.shell) .toasts { left: 16px; }
}
@media (max-width: 860px) { body:has(.shell) .toasts { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
@media print { .rail, .topbar, .tabbar, .new-fab, .moved-here { display: none !important; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Patrol access levels */
.levels .matrix { width: 100%; border-collapse: collapse; }
.levels .matrix th, .levels .matrix td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.levels .matrix .center { text-align: center; }
.levels .matrix thead th { position: sticky; top: 0; background: var(--surface); font-weight: 600; }
.levels .matrix .group-row th { background: var(--panel-alt); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.levels .matrix input[type=checkbox] { width: 20px; height: 20px; }

/* Terrain park */
.park-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.park-day { margin: 0; }
.park-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.park-side ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.park-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 6px 0; font: inherit; color: inherit; cursor: pointer; }
span.park-row { cursor: default; }
.park-banner { padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--hold-tint); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.park-map.placing { cursor: crosshair; outline: 3px solid var(--warn-mark); }
.park-pin-wrap { background: none; border: 0; }
.park-pin { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 2px; border-radius: var(--radius-sm); border: 3px solid var(--white); color: var(--white); font: 700 14px/1 system-ui, sans-serif; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55); background: var(--sev-minor); }
.park-pin.st-needs_attention { background: var(--park-attention); }
.park-pin.st-closed { background: var(--sev-critical); }
.park-pin.uninspected { border-style: dashed; }
.park-pop .row { margin-top: 6px; }
@media (max-width: 800px) { .park-layout { grid-template-columns: 1fr; } }
.park-controls input, .park-controls select { width: auto; min-width: 0; flex: 0 1 auto; }
.park-controls input[type=date] { min-width: 150px; }
.park-controls .row { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.park-controls .row select { max-width: 190px; }
.park-controls > button { min-width: 40px; }
@media (min-width: 801px) { .park-map { height: 62vh; } }
/* Terrain park records (2026.11.12): big targets for gloves, the checklist, areas for the day, the day record. */
.btn.big { min-height: 56px; padding: 10px 18px; font-size: 1.05rem; }
.big-select { min-height: 56px; font-size: 1.05rem; }
.park-items { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.park-item { border: 1px solid var(--line); border-left: 6px solid var(--open); border-radius: var(--radius); padding: 8px 10px; background: var(--surface); }
.park-item.st-closed { border-left-color: var(--closed); }
.park-item.st-needs_attention { border-left-color: var(--hold); }
.park-item.st-new { border-left-color: var(--line-strong); }
.park-when { display: block; width: 100%; }
.park-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 6px; }
.park-checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.park-check { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.park-check input { grid-column: 1 / -1; }
.park-check-label { font-weight: 700; }
.segs { display: inline-flex; gap: 4px; }
.seg { min-width: 64px; min-height: 56px; font: inherit; font-weight: 700; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--radius); cursor: pointer; }
.seg[aria-pressed="true"].seg-pass { background: var(--open); border-color: var(--open); color: var(--on-fill); }
.seg[aria-pressed="true"].seg-fail { background: var(--closed); border-color: var(--closed); color: var(--on-fill); }
.seg[aria-pressed="true"].seg-na { background: var(--ink-2); border-color: var(--ink-2); color: var(--on-fill); }
.big-check { min-height: 56px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.big-check input { width: 28px; height: 28px; }
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.park-photos li { margin: 4px 0; }
.park-nearest { background: var(--info-tint); border-radius: var(--radius); padding: 8px 12px; font-weight: 700; }
.park-area-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.park-area { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--surface-2); }
.park-outbox { border: 1px solid var(--hold); background: var(--hold-tint); border-radius: var(--radius); padding: 8px 12px; display: grid; gap: 6px; }
.park-outbox .refused { color: var(--closed-ink); }
.park-blocked ul { margin: 6px 0 0 18px; }
.park-pin.roped { outline: 3px dotted var(--warn-mark); }
.park-plot { width: 100%; max-width: 760px; height: auto; border-radius: var(--radius); }
.park-history s, .park-record s { color: var(--quiet); text-decoration-thickness: 2px; }
.park-dialog.dialog { max-width: 760px; }
.park-snap { border: 1px solid var(--line); border-left: 6px solid var(--accent-line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0 12px; }
.park-snap .plain li { padding: 2px 0; border: 0; }
@media (max-width: 520px) {
  .park-actions { grid-template-columns: 1fr; }
  .park-check { grid-template-columns: 1fr; }
  .segs { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media print { .park-record .no-print { display: none !important; } .park-record table { font-size: 11px; } }

/* ---- Patrol: search and case lists ---- */
.solo > div > .tabs { display: none; }
.search { position: relative; }
.search input { width: 100%; min-height: 48px; font-size: 1rem; padding-left: 42px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23587' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 14px center; }
.cases-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cases-bar { flex-wrap: nowrap; }
.cases-bar .grow { flex: 1 1 200px; min-width: 0; }
.cases-filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cases-filters select, .cases-filters input { min-height: 40px; width: auto; }
.cases-filters [hidden] { display: none; }
.fchips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fchips button { font: inherit; font-size: 0.9375rem; font-weight: 600; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.fchips button[aria-pressed='true'] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.cases-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 36px; }
.pill { font: inherit; font-size: 0.875rem; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--snowpack); cursor: pointer; }
.pill:hover { border-color: var(--alert); }
.btn.ghost { background: none; border-color: transparent; color: var(--link); text-decoration: underline; }
.menu-pop { position: relative; }
.menu-pop summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.menu-pop summary::-webkit-details-marker { display: none; }
.menu-pop:not([open]) > .menu-items { display: none; } /* closed: the items are not there for a click, a tab or a screen reader */
.menu-items { position: absolute; right: 0; z-index: 20; margin-top: 6px; min-width: 240px; padding: 10px; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--lift); }
.menu-items .btn { width: 100%; justify-content: flex-start; }
@media (min-width: 900px) { .cases .case-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .cases .cr-meta { grid-column: 1; } .cases .cr-tags { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; margin: 0; } }

/* ================= Density and device pass: tighter on a desk, still easy to tap on a phone ================= */

/* Patrol: the title, and its pages as quiet underline tabs */
.patrol-head { justify-content: flex-start; gap: 10px 20px; margin-bottom: 12px; }

/* Access levels: names and ticks side by side, small enough to see the whole grid */
.levels .lv-legend { font-size: 0.875rem; color: var(--quiet); }
.levels .lv-legend summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.levels .lv-legend ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.levels .table-wrap { max-height: 72vh; overflow: auto; }
.levels .matrix { table-layout: fixed; min-width: 600px; }
.levels .matrix th, .levels .matrix td { padding: 5px 10px; vertical-align: middle; }
.levels .matrix thead th { top: 0; z-index: 3; background: var(--surface-2); font-size: 0.8125rem; text-align: center; white-space: normal; }
.levels .matrix thead th:first-child { text-align: left; }
.levels .matrix th:first-child, .levels .matrix td:first-child { width: 300px; }
.levels .matrix th.center, .levels .matrix td.center { width: 78px; }
.levels .matrix .lv-about { display: none; }
.levels .matrix tbody th { font-weight: 400; text-align: left; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.levels .matrix .f-label { font-weight: 700; font-size: 0.9375rem; line-height: 1.25; }
.levels .matrix .f-about { color: var(--quiet); font-size: 0.8125rem; line-height: 1.3; }
.levels .matrix .group-row th { padding: 4px 10px; background: var(--info-tint); font-size: 0.75rem; position: static; }
.levels .matrix tbody tr:not(.group-row):hover th, .levels .matrix tbody tr:not(.group-row):hover td { background: var(--info-tint); }
.levels .matrix input[type='checkbox'] { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.levels .matrix.people th:first-child, .levels .matrix.people td:first-child { width: auto; }
.levels .matrix.people { min-width: 0; table-layout: auto; }
.levels .matrix.people select { min-height: 34px; padding: 4px 8px; width: auto; }

/* Desk and laptop: compact controls and rows so more records fit on screen */
@media (min-width: 861px) and (hover: hover) and (pointer: fine) {
  .main { padding: 20px 28px 48px; max-width: 1400px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.125rem; }
  .page-head { margin-bottom: 14px; }
  .section { margin-top: 22px; }
  .stack { gap: 12px; }
  .panel { padding: 14px 16px; }
  .panel.stack { gap: 12px; }
  .card { padding: 14px 16px; }
  .btn { min-height: 36px; padding: 0 14px; }
  .btn.small { min-height: 30px; padding: 0 10px; font-size: 0.8125rem; }
  .btn.big { min-height: 44px; }
  input, select { min-height: 36px; padding: 5px 10px; }
  textarea { min-height: 72px; padding: 8px 10px; }
  input[type='checkbox'] { width: 18px; height: 18px; min-height: 18px; }
  label.field, .field { gap: 3px; font-size: 0.875rem; }
  label.check, .check { min-height: 32px; }
  .form { gap: 10px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
  .inline-form, .row, .filters { gap: 8px; }
  th, td { padding: 7px 12px; }
  th { font-size: 0.8125rem; }
  .table-wrap { border-radius: var(--radius-md); }
  .case-list { gap: 8px; }
  .case-row { padding: 9px 14px; border-radius: var(--radius-md); }
  .cr-tags { margin-top: 2px; }
  .nudge { padding: 10px 14px; border-radius: var(--radius-md); }
  .home-top .grow input, .search input { min-height: 40px; font-size: 0.9375rem; }
  .cases-filters select, .cases-filters input { min-height: 34px; }
  .fchips button { min-height: 32px; padding: 0 12px; font-size: 0.875rem; }
  .cases-bar .grow { flex-basis: 260px; }
  .tile { min-height: 84px; padding: 10px 12px 8px 16px; }
  .tile-price { font-size: 1.25rem; margin-top: 4px; }
  .dialog { padding: 18px 22px 20px; gap: 14px; }
  .dialog form.stack { gap: 14px; }
  .dialog header h2 { font-size: 1.125rem; }
  .dialog .footer { padding-top: 14px; }
  .case-head { padding: 14px 18px; gap: 10px; }
  .case-head h1 { font-size: 1.5rem; }
  .bedside { padding: 18px; gap: 14px; }
  .nsaar-grid { gap: 10px 16px; }
  .fab { min-height: 48px; padding: 0 20px; right: 20px; bottom: 20px; }
}

/* Phones and small tablets: fewer margins, one column, tables become cards, taps stay big */
@media (max-width: 640px) {
  .main { padding: 12px 12px 104px; }
  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.125rem; }
  .page-head { margin-bottom: 12px; gap: 8px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .section { margin-top: 18px; }
  .stack { gap: 10px; }
  .panel, .card { padding: 12px 14px; }
  .panel.stack { gap: 10px; }
  .form { gap: 10px; grid-template-columns: 1fr; }
  label.field, .field { gap: 3px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; }
  input, select { min-height: 44px; font-size: 1rem; }
  .row { gap: 8px; }
  .case-row { padding: 10px 12px; }
  .patrol-head { display: grid; gap: 8px; }
  .fchips button { min-height: 38px; padding: 0 12px; }
  .cases-filters { gap: 8px; }
  .cases-filters select { flex: 1 1 0; min-width: 0; }
  .dialog { padding: 14px 14px 16px; gap: 12px; }
  .bedside { padding: 14px; gap: 12px; }
  .case-head { padding: 12px 14px; }

  /* A table becomes a list of cards: the column name sits beside each value */
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  table.rt tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  table.rt tr:last-child { border-bottom: 0; }
  table.rt td { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 3px 0; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  table.rt td[data-label]::before { content: attr(data-label); flex: none; max-width: 42%; text-align: left; font-weight: 700; font-size: 0.8125rem; color: var(--quiet); }
  table.rt td.actions { justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
  table.rt td.actions .btn { flex: none; white-space: nowrap; overflow-wrap: normal; }
  table.rt td.actions .btn + .btn { margin-left: 0; }
  /* A status switch (Open, On hold, Wind hold, Closed) takes the card's full width under its label, and a word never
     breaks inside a button (2026.11.13: lifts read "Op en" and "Clos ed" on phones) */
  table.rt td:has(> .seg) { flex-direction: column; align-items: stretch; gap: 4px; }
  table.rt td > .seg { display: flex; width: 100%; }
  table.rt td > .seg button { flex: 1 1 auto; padding: 4px 8px; white-space: nowrap; overflow-wrap: normal; min-height: 44px; }
  .levels .matrix th:first-child, .levels .matrix td:first-child { width: 138px; }
  .levels .matrix th.center, .levels .matrix td.center { width: 58px; padding: 5px 2px; }
  .levels .matrix .lv-admin { display: none; }
  .levels .matrix .f-about { display: none; }
  .levels .matrix { min-width: 0; }
}
@media (max-width: 640px) {
  .cases .fchips { flex-wrap: nowrap; overflow-x: auto; display: flex; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .cases .fchips button { flex: none; white-space: nowrap; }
}
@media (max-width: 640px) { table.rt td:empty { display: none; } }

/* ================= Mountain operations: grooming, maintenance, reports ================= */
span.stack.tight { display: inline-flex; flex-direction: column; gap: 2px; }
.row.wrap { flex-wrap: wrap; }
.row .grow-end, .row.grow-end { margin-left: auto; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-3, 12px); }
.stats .stat { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stats .stat strong { font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats .stat span { font-size: .8rem; color: var(--muted); }
.chk-row { display: grid; grid-template-columns: 1fr 9.5rem; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.chk-row > input { grid-column: 1 / -1; }
.wo-notes, .handoffs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wo-notes li { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 3px solid var(--line-strong); }
.handoffs li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); border-left: 4px solid var(--accent-line); }
.handoffs li.acked { opacity: .7; border-left-color: var(--line-strong); }
.handoffs li p { margin: 6px 0; white-space: pre-wrap; }
textarea[readonly] { width: 100%; font: inherit; resize: vertical; }
@media (max-width: 640px) {
  .chk-row { grid-template-columns: 1fr; }
  .row .grow-end { margin-left: 0; }
}
@media print {
  .sidebar, .topbar, .tabs, .page-head, button, header .row { display: none !important; }
}
header > .row { flex-wrap: wrap; justify-content: flex-end; }
header > .row > input, header > .row > select { width: auto; min-width: 0; flex: 0 1 auto; }
@media (max-width: 640px) { header > .row { justify-content: flex-start; } header > .row > input[type='date'] { flex: 1 1 9rem; } }

/* ================= Documents ================= */
.role-grid { display: grid; grid-template-columns: 1fr 6rem 9rem; gap: 8px 12px; align-items: center; }
.role-grid input[type='checkbox'] { width: 20px; height: 20px; justify-self: start; }
a.btn.small { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 480px) { .role-grid { grid-template-columns: 1fr 4.5rem 6.5rem; } }

/* ================= Instructor availability calendar ================= */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-day { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 64px; padding: 4px 6px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.cal-day:disabled { opacity: .4; cursor: not-allowed; }
.cal-day.open { background: var(--open-tint); border-color: var(--open-line); }
.cal-day.today .cal-n { text-decoration: underline; }
.cal-day[aria-pressed='true'] { outline: 3px solid var(--accent-line); outline-offset: -2px; background: var(--accent-tint); }
.cal-n { font-weight: 700; font-size: .95rem; }
.cal-t { font-size: .7rem; line-height: 1.2; color: var(--open-ink); white-space: nowrap; }
.time-chip { display: inline-flex; gap: 8px; align-items: center; padding: 2px 4px 2px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); }
label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
label.check input { width: 20px; height: 20px; }
@media (max-width: 560px) { .cal-day { min-height: 54px; padding: 3px 4px; } .cal-t { font-size: .62rem; } }
.snippet { color: var(--ink); font-style: italic; }
.scanbar { margin: 6px 0 10px; }
input[type='search'][aria-label='Search documents'] { min-width: min(20rem, 100%); }

/* Platform console */
.platform { min-height: 100vh; padding: 1.5rem 1rem; }
.platform-box { max-width: 28rem; margin: 3rem auto; }
.platform-box.wide { max-width: 60rem; margin-top: 1rem; }
.app-row { align-items: flex-start; padding: .35rem 0; }
.app-row .hint { display: block; margin-left: 0; font-weight: 400; color: var(--muted); }
.app-row b { display: block; }
.row.between { justify-content: space-between; align-items: center; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: var(--radius); padding: .6rem .8rem; margin: .5rem 0; }
.warn { color: var(--warn-ink); }

/* ---------- self-serve demo ---------- */
.demo-pill { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: var(--radius-pill); background: var(--sel-bg); color: var(--sel-ink); font-size: 0.875rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.demo-pill a { color: var(--sel-ink); font-weight: 700; text-underline-offset: 3px; }
/* On a phone the pill sits just above the bottom bar (the frame's breakpoint), and leaves the corner to the round + New button. */
@media (max-width: 860px) { .demo-pill { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); border-radius: var(--radius-md); } .shell.has-fab ~ .demo-pill { right: 84px; } }
.cred { width: min(420px, 100%); padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.cred-h { font-weight: 700; margin-bottom: 8px; }
.cred dl { display: grid; gap: 6px; margin: 0; }
.cred-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.cred-row dt { color: var(--quiet); }
.cred-row dd { margin: 0; overflow-wrap: anywhere; }
.cred code { font-size: 1rem; font-weight: 700; }

/* Rentals */
.callout { border: 1px solid var(--line-strong); border-left: 6px solid var(--warn-mark); border-radius: var(--radius-lg); padding: 14px 16px; background: var(--surface); display: grid; gap: 10px; }
.card.stat { padding: 14px 16px; }
.card.stat .big { font-size: 1.7rem; font-weight: 700; }
.tag-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; width: 100%; }
.gear-tag { border: 1px dashed var(--black); padding: 8px; text-align: center; background: var(--white); color: var(--black); break-inside: avoid; }
.gear-tag svg { max-width: 100%; height: auto; }

/* Rental counter: pick gear from tiles, see the rental build up beside them */
.rent-find { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.rchips.small .chip, .rchips .chip { min-height: 38px; padding: 0 12px; font-weight: 400; }
.chip .n { font-size: .8rem; font-weight: 400; color: var(--quiet); }
.chip.on { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.chip.on .n { color: var(--on-dark-muted); }
.chip:focus-visible, .gear-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gear-tile { position: relative; display: grid; gap: 2px; text-align: left; padding: 10px 12px; min-height: 92px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; align-content: start; }
.gear-tile:hover { border-color: var(--link); }
.gear-tile .size { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.gear-tile .what { font-size: .95rem; }
.gear-tile .meta { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: var(--quiet); flex-wrap: wrap; }
.gear-tile .tag { background: var(--hold-tint); color: var(--hold); border-radius: var(--radius-xs); padding: 0 5px; font-weight: 700; }
.gear-tile .grade { border: 1px solid var(--line-strong); border-radius: var(--radius-xs); padding: 0 4px; }
.gear-tile.on { background: var(--open-tint); border: 2px solid var(--open); padding: 9px 11px; }
.gear-tile .tick { position: absolute; top: 6px; right: 8px; color: var(--open); font-weight: 700; font-size: 1.1rem; }
@media (max-width: 900px) { .rent-find { grid-template-columns: 1fr; } }
.cart-line { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.cart-line .row { flex-wrap: wrap; }

/* Rental pickup card and receipt code */
.rc-code { text-align: center; margin-top: 10px; display: grid; gap: 4px; justify-items: center; }
.rc-code svg { max-width: 100%; height: auto; }
.scan-bar { max-width: 560px; }
.pickup { border-left: 6px solid var(--accent-line); display: grid; gap: 12px; }
.pickup h2, .pickup h3 { margin: 0; }
.pickup-photo { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; background: var(--snowpack); display: grid; place-items: center; font-weight: 700; color: var(--quiet); }

/* Rentals, fitting: Ready to fit, the fitting card, the queue board and the rental agreement */
.fit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: start; }
.fit-layout h2 { margin: 0; font-size: 1.15rem; }
.fit-side { display: grid; gap: 10px; position: sticky; top: calc(var(--stick-top, 0px) + 12px); }
.fit-find { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.fit-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fit-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; grid-template-areas: 'who what wait' 'meta meta wait'; gap: 2px 12px; align-items: center; text-align: left; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.fit-row:hover { border-color: var(--link); }
.fit-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fit-who { grid-area: who; font-size: 1.05rem; }
.fit-what { grid-area: what; }
.fit-what .tag { background: var(--hold-tint); color: var(--hold); border-radius: var(--radius-xs); padding: 0 5px; font-weight: 700; font-size: .8rem; }
.fit-meta { grid-area: meta; }
.fit-wait { grid-area: wait; font-weight: 700; white-space: nowrap; }
.fit-card { display: grid; gap: 10px; border-left: 6px solid var(--accent-line); }
.fit-card h4 { margin: 6px 0 0; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--quiet); }
.fit-head { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.fit-head h3 { margin: 0; }
.fit-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.fit-height { flex-wrap: nowrap; gap: 4px; }
.fit-height input { width: 3.6rem; min-width: 0; }
.fit-num { width: 6.5rem; }
.fit-tech { width: 8rem; }
.fit-ability { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fit-ability button { display: grid; gap: 2px; text-align: left; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.fit-ability button small { color: var(--quiet); }
.fit-ability button.on { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.fit-ability button.on small { color: inherit; }
.fit-ability button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fit-suggest { display: grid; gap: 4px; }
.fit-din { font-size: 1.5rem; }
.fit-caution { color: var(--hold-ink, var(--hold)); }
.fit-sign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fit-binding { flex-wrap: wrap; }
.fit-binding select { width: auto; min-width: 8rem; }
.fit-actions { flex-wrap: wrap; justify-content: flex-end; }
.fit-pick > summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.fit-confirm { font-size: 1.05rem; }
.fit-left > summary { cursor: pointer; padding: 6px 0; }
.fit-left-sizes { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
.fit-none { grid-column: 1 / -1; }
.fit-size { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px 8px; font-size: .9rem; }
.fit-size.none { color: var(--quiet); border-style: dashed; }
.fit-left-mini .table-wrap { max-width: 420px; }
.fit-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.fit-board-wrap:fullscreen { background: var(--surface); padding: 24px; overflow: auto; }
.fit-board-col { background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius-lg); padding: 16px; }
.fit-board-col h2 { margin: 0 0 6px; font-size: 1.6rem; }
.fit-board-count { font-size: 3.5rem; font-weight: 700; line-height: 1; }
.fit-board-count span { font-size: 1.2rem; font-weight: 400; }
.fit-board-wait { font-size: 1.1rem; margin-top: 4px; }
.fit-board ol { margin: 12px 0 0; padding-left: 1.4em; font-size: 1.4rem; display: grid; gap: 4px; }
.fit-board li { display: flex; justify-content: space-between; gap: 8px; }
.fit-board-min { color: var(--quiet); font-size: 1.1rem; }
.agreement-sheet { display: grid; gap: 10px; color: var(--black); background: var(--white); padding: 12px; }
.agreement-sheet .ag-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.agreement-sheet .ag-code { text-align: center; }
.agreement-sheet .ag-code svg { max-width: 100%; height: auto; }
.agreement-sheet .ag-person { border-top: 1px solid var(--black); padding-top: 6px; break-inside: avoid; }
.agreement-sheet .ag-person h3 { margin: 0 0 4px; }
.agreement-sheet .ag-gear { width: 100%; border-collapse: collapse; }
.agreement-sheet .ag-gear th, .agreement-sheet .ag-gear td { border-bottom: 1px solid var(--print-rule); padding: 3px 4px; text-align: left; font-size: .9rem; }
.agreement-sheet .sig-img { max-width: 260px; max-height: 90px; border: 1px solid var(--print-rule); }
.agreement-sheet .ag-terms { border-top: 1px solid var(--black); padding-top: 6px; }
@media (max-width: 1100px) { .fit-layout { grid-template-columns: 1fr; } .fit-side { position: static; } }
@media (max-width: 520px) { .fit-row { grid-template-columns: 1fr auto; grid-template-areas: 'who wait' 'what what' 'meta meta'; } .fit-ability { grid-template-columns: 1fr; } .fit-details { grid-template-columns: 1fr 1fr; } }
/* ---- Rental returns: scan to return, Out now search, deposits, season buyout, shop reports ---- */
.return-bar { display: grid; gap: 10px; max-width: 640px; }
.return-scan { font-size: 1.35rem; min-height: 56px; letter-spacing: .02em; }
.return-scan.ok { animation: return-ok .6s ease-out; }
.return-scan.bad { animation: return-bad .6s ease-out; }
@keyframes return-ok { from { box-shadow: 0 0 0 4px var(--open); } to { box-shadow: 0 0 0 0 transparent; } }
@keyframes return-bad { from { box-shadow: 0 0 0 4px var(--closed); } to { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .return-scan.ok, .return-scan.bad { animation: none; } }
.return-results { max-width: 760px; }
.return-card { display: grid; gap: 8px; border-left: 6px solid var(--accent-line); }
.return-card.closed { border-left-color: var(--open); }
.return-card.error-box { display: block; }
.return-head { margin: 0; font-size: 1.1rem; }
.return-card p { margin: 0; }
.small-head { margin: 4px 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--quiet); }
.return-pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.return-piece { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.return-piece .row { flex-wrap: nowrap; }
.out-find { display: grid; gap: 8px; }
.out-find input[type=search] { max-width: 520px; }
.fee-input { width: 6.5rem; }
.out-tags { overflow-wrap: anywhere; }
@media (min-width: 601px) and (max-width: 1280px) { .out-list td.actions .row { flex-direction: column; align-items: stretch; } }
.day-input { width: 5rem; }
.buyout-row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.returns-settings h3 { margin: 0; }
.season-date { border: 0; padding: 0; margin: 0; }
.season-date legend { padding: 0; font-weight: 600; }
.deposit-step { min-width: min(100%, 420px); }
.deposit-wait { font-size: 1.15rem; font-weight: 700; margin: 8px 0; }
.report-range { align-items: end; flex-wrap: wrap; }
@media (max-width: 600px) { .return-scan { font-size: 1.15rem; } .return-piece .row { flex-wrap: wrap; } }
/* ---- rentals: guest rental forms, the QR poster, groups and bag labels */
.rform-bar { flex-wrap: wrap; align-items: center; }
.rform-bar input[type='search'] { flex: 1 1 240px; max-width: 420px; }
.rform-card { display: grid; gap: 10px; border-left: 6px solid var(--accent-line); }
.rform-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rform-person { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.rform-person h3 { margin: 0; }
.rform-person fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.rform-person legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.rform-sig { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rform-sig img { width: 180px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.rform-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; margin: 0; }
.rform-poster { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 24px; background: var(--white); color: var(--black); }
.rform-poster h2 { font-size: 2rem; margin: 0; }
.rform-poster-mtn { font-size: 1.125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rform-poster-sub { font-size: 1.125rem; margin: 0; }
.rform-poster-qr svg { width: 320px; max-width: 80vw; height: auto; }
.rform-poster ol { text-align: left; font-size: 1.125rem; max-width: 34rem; display: grid; gap: 6px; }
.rform-poster-url { font-size: 0.875rem; overflow-wrap: anywhere; margin: 0; }
.bag-label { border: 1px dashed var(--black); padding: 10px; background: var(--white); color: var(--black); break-inside: avoid; display: grid; gap: 4px; text-align: left; }
.bag-label svg { max-width: 100%; height: auto; }
.bag-name { font-size: 1.25rem; font-weight: 700; }
.bag-gear { margin: 0; padding-left: 18px; font-size: 0.875rem; }

/* ---------- day board ---------- */
.board-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.board-clear { margin: 0; }
.board-alert { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface); color: inherit; text-decoration: none; font-weight: 700; }
.board-alert:hover { background: var(--surface); }
.board-alert .ba-tag { flex: none; font-size: 0.8125rem; padding: 2px 10px; border-radius: var(--radius-pill); border: 1.5px solid currentColor; }
.board-alert.stop { border-color: var(--closed); color: var(--closed-ink); background: var(--closed-tint); }
.board-alert.warn { border-color: var(--warn-mark); color: var(--hold-ink); background: var(--hold-tint); }
.board-alert.info { border-color: var(--line-strong); }
.board-edit { margin-bottom: 20px; padding: 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.board-edit[hidden] { display: none; }
.row.wrap { flex-wrap: wrap; }
.row.grow-end { margin-left: auto; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.bd-tile { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px 18px 18px; min-width: 0; }
.bd-tile > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.bd-tile > header h2 { font-size: 1.125rem; margin: 0; }
.bd-tools { display: inline-flex; gap: 4px; }
.btn.icon { min-width: 36px; padding: 0 8px; font-weight: 700; }
.bd-list { list-style: none; margin: 0; padding: 0; }
.bd-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.bd-list li:last-child { border-bottom: none; }
.bd-tile .figures { gap: 12px 0; }
.bd-tile .figure { min-width: 0; padding-right: 18px; margin-right: 18px; }
.bd-tile .figure strong { font-size: 1.75rem; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.notes li.pinned { background: var(--hold-tint); margin: 0 -8px; padding: 8px; border-radius: var(--radius-sm); }
.notes p { margin: 0 0 2px; }
.linklike { background: none; border: 0; padding: 0 6px; color: var(--link); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.875rem; }
.board-host { background: transparent; }
.board-host:fullscreen { background: var(--snowpack); padding: 28px; overflow: auto; }
.wall .bd-tile { padding: 22px 26px 26px; }
.wall .bd-tile > header h2 { font-size: 1.5rem; }
.wall .bd-list li, .wall .bd-tile p, .wall .notes li { font-size: 1.25rem; }
.wall .bd-tile .figure strong { font-size: 2.75rem; }
.wall .board-alert { font-size: 1.375rem; padding: 16px 22px; }
.wall-exit { margin-bottom: 14px; }
.wall .board-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }

/* help */
.help-search { margin-bottom: var(--sp-4, 16px); max-width: 640px; }
.help-search input { width: 100%; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.help-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 16px 18px; }
.help-card h2 { margin: 0 0 2px; font-size: 1.125rem; }
.help-card p { margin: 0 0 8px; font-size: 0.9rem; }
.help-card ul, .help-results { list-style: none; margin: 0; padding: 0; }
.help-card li, .help-results li { padding: 5px 0; }
.help-results li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.help-back { margin: 0 0 12px; }
.help-article { max-width: 46rem; }
.help-article h1 { margin: 0 0 8px; }
/* Help topic titles match every other page title: Barlow Condensed */
.help-article h1, .help h1, .help-done h1 { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 700; font-size: 2.125rem; line-height: 1.05; }
.help-intro { font-size: 1.0625rem; color: var(--ink-2); margin: 0 0 16px; }
.help-article ol { padding-left: 1.4rem; display: grid; gap: 10px; }
.help-tips, .help-related { margin-top: 20px; padding: 12px 16px; border-left: 4px solid var(--accent-line); background: var(--info-tint); border-radius: var(--radius-sm); }
.help-tips h2, .help-related h2 { margin: 0 0 6px; font-size: 1rem; }
.help-tips ul, .help-related ul { margin: 0; padding-left: 1.2rem; }
.help-stuck { margin-top: 28px; padding: 12px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); max-width: 46rem; }
@media print { .help-search, .help-stuck { display: none !important; } }
.help-article > p:last-child { margin-top: 20px; }

/* Customer alerts, notes and data quality */
.cust-alerts { display: grid; gap: 8px; justify-items: start; }
.cust-alerts > .cust-alert { justify-self: stretch; }
.cust-alert { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 2px solid var(--line-strong); border-left-width: 8px; border-radius: var(--radius-sm); background: var(--snowpack); }
.cust-alert[data-tone='bad'] { border-color: var(--closed); }
.cust-alert[data-tone='warn'] { border-color: var(--warn-mark); }
.cust-alert[data-tone='good'] { border-color: var(--open); }
.cust-alert .btn { margin-left: auto; }
.flag-pill { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 0.8125rem; font-weight: 700; background: var(--snowpack); max-width: 100%; }
.flag-pill[data-kind='do_not_rent'], .flag-pill[data-kind='banned'] { border-color: var(--closed); color: var(--closed); }
.flag-pill[data-kind='unpaid_balance'], .flag-pill[data-kind='medical_alert'] { border-color: var(--warn-mark); color: var(--hold); }
.flag-pill[data-kind='vip'] { border-color: var(--open); color: var(--open); }
.cust-note { padding: 8px 0; border-top: 1px solid var(--line); }
.cust-note p { margin: 4px 0; white-space: pre-wrap; }
.cust-quality { margin: 8px 0 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cust-quality summary { cursor: pointer; font-weight: 700; }

/* ---------- Area identity, grouped menu and one tab style (design review, release 1) ---------- */
/* The page carries its group (data-group on the page: home, sales, hill, school, office) for any page-level accent. */

/* Page header, the same on every page (main.js adds the breadcrumb, Help and "<App> settings"): a breadcrumb where
   the page has tabs, the title in Barlow Condensed, the one-line summary, then Help, the app's settings and the
   page's own buttons. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 12px 16px; margin-bottom: 18px; }
.page-head > .head-lead { flex: 1 1 300px; min-width: 0; display: grid; gap: 2px; }
.page-head h1 { display: block; margin: 0; font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 700; font-size: 2.125rem; line-height: 1.05; letter-spacing: .2px; }
.head-lead > p:not(.crumbs) { color: var(--quiet); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; font-size: .8125rem; color: var(--quiet); }
.crumbs a { color: var(--quiet); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-2); }
.head-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head-tools .btn { font-weight: 700; color: var(--ink); text-decoration: none; }
.head-tools .btn .ico { color: var(--quiet); }
.help-btn { padding-inline: 12px; }
/* For two weeks: setup for this app moved to Settings */
.moved-note { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; margin: -6px 0 16px; padding: 8px 8px 8px 14px; border-radius: var(--radius-md); background: var(--info-tint); color: var(--ink); font-size: .9375rem; }
.moved-note a { font-weight: 700; }
.moved-close { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: none; color: var(--quiet); cursor: pointer; }
.moved-close:hover { background: var(--surface-2); color: var(--ink); }

.sell-menu .tabs button[aria-selected='true'] { border-color: var(--ink); }
@media (max-width: 640px) {
  .page-head h1 { font-size: 1.75rem; }
  .head-tools .btn { min-height: 44px; }
}
/* Phone page header (2026.11.13): the work starts higher. Help and the app's settings are round icon buttons in the
   title row (their words stay for screen readers and as the tooltip); Patrol's header New case hides (the floating one
   stays) and so does Wall screen; Today's Day and Customize share one row. */
.p-app { color: var(--quiet); font-weight: 400; }
@media (max-width: 860px) {
  .page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .page-head > * { grid-column: 1 / -1; }
  .page-head > .head-lead { grid-column: 1; grid-row: 1; }
  .page-head > .head-tools { grid-column: 2; grid-row: 1; align-self: start; flex-wrap: nowrap; gap: 6px; }
  .page-head > .head-lead:has(> .crumbs) + .head-tools { margin-top: 20px; }
  .head-tools .btn { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: var(--radius-pill); }
  .head-tools .btn .ico { color: var(--ink); }
  .head-tools .head-btn-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .patrol-head .patrol-new, .page-head .wall-btn { display: none; }
  .patrol-head .patrol-actions:not(:has(> :not(.patrol-new))) { display: none; }
  .page-head .actions.dash-actions { flex-wrap: nowrap; align-items: flex-end; }
  .page-head .actions.dash-actions .field { flex: 1 1 auto; min-width: 0; }
  .page-head .actions.dash-actions .btn { flex: 0 0 auto; }
}

/* Dates and short fields do not need the whole page */
.field input[type='date'], .field input[type='datetime-local'], .field input[type='time'] { max-width: 15rem; }
.form .field input[type='date'], .dialog .field input[type='date'] { max-width: none; }

/* Phone: the Today controls sit in one row under the title */
@media (max-width: 640px) {
  .page-head .actions, .page-head > .row { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-head .actions .field, .page-head > .row .field { flex: 1 1 100%; }
  .page-head .actions .btn, .page-head > .row .btn { flex: 1 1 0; }
}
/* The page frame takes focus after each navigation so screen readers announce the new page; it should not draw a ring. */
main:focus, main:focus-visible, #main:focus, [tabindex='-1']:focus:not(input):not(button) { outline: none; }
.msg-body { white-space: pre-wrap; font: inherit; background: var(--snowpack); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0; }

/* Weekly report: the day-by-day list needs room for "$1,234 · 56 guests" and some air under the buttons. */
.bars.week-bars li { grid-template-columns: 110px minmax(80px, 1fr) minmax(150px, 190px); }
.bars.week-bars li > span:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .bars.week-bars li { grid-template-columns: 90px 1fr; } .bars.week-bars li > span:last-child { grid-column: 1 / -1; text-align: left; } }

/* Product form: the days it is sold sit on one line across the whole form. */
.form fieldset.days { grid-column: 1 / -1; }
.form fieldset.days .row { flex-wrap: wrap; gap: 6px 18px; }

.brand-logo { max-height: 56px; max-width: 220px; }
.brand-hero { max-width: 100%; max-height: 140px; border-radius: var(--radius); }

.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card .big { font-size: 1.75rem; line-height: 1.1; }
.pace-bars { display: block; min-width: 120px; }

.more-details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.more-details[open] > summary { margin-bottom: 8px; }
.seg.tender-row .btn[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cash-quick .btn { min-height: 52px; min-width: 88px; font-size: 1.05rem; }
.change-due { font-size: 1.6rem; font-weight: 800; }
[aria-invalid='true'] { border-color: var(--invalid) !important; box-shadow: 0 0 0 2px rgba(179, 38, 30, 0.25); }

/* Sell: a tap on a tile says "Added"; on phones and tablets the basket total and Checkout stay at the bottom */
.tile.added { outline: 3px solid var(--accent-line); position: relative; }
.tile.added::after { content: attr(data-added); position: absolute; top: 6px; right: 8px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); }
.mobile-basket-bar { display: none; }
@media (max-width: 900px) {
  .mobile-basket-bar:not([hidden]) { display: flex; position: sticky; bottom: 0; z-index: 20; justify-content: space-between; align-items: center; gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(10, 20, 35, .12); font-weight: 700; }
  .mobile-basket-bar .btn { min-height: 48px; }
}
.drawer-badge { display: inline-flex; align-items: center; }

/* Patrol: choices sized for gloves */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.btn.big-choice { min-height: 56px; font-size: 1.05rem; font-weight: 700; }
.btn.big-choice[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sell-menu .tabs { flex-wrap: wrap; overflow-x: visible; mask-image: none; -webkit-mask-image: none; }

/* ---------- waivers ---------- */
.waiver-copy { white-space: pre-wrap; font-size: 0.9375rem; line-height: 1.55; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.sig-image { width: 100%; max-width: 360px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.link-box { display: inline-block; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); word-break: break-all; font-size: 0.875rem; }
.waiver-panel { flex-wrap: wrap; align-items: center; }
.gate-waiver { margin-top: 6px; }
@media print { .waiver-copy { border: 0; padding: 0; background: none; } }

/* ---------- platform console: the Demos dashboard ---------- */
.platform-box.wider { max-width: 82rem; margin-top: 1rem; }
.demo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.demo-stat { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px; }
.demo-stat b { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.demo-stat span { font-weight: 700; }
.demo-stat small { color: var(--quiet); }

/* ---------- the case page: wristband, three views, bedside tools ----------
   The wristband is the one bold element: a spruce band that stays at the top, so whoever holds the phone always sees whose
   record it is and what might hurt them. Everything under it stays quiet. */
.case { gap: var(--sp-4); }
.wristband { position: sticky; top: var(--stick-top, 0px); z-index: 30; background: var(--spruce); color: var(--white); border-radius: var(--radius-lg); padding: 10px 14px 0; display: grid; gap: 6px; box-shadow: 0 6px 18px rgba(8, 35, 50, 0.22); }
.wristband .back { margin: 0; }
.wristband .back a { color: var(--on-dark-muted); min-height: 32px; }
.wristband .back a:hover { color: var(--white); }
.wb-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 0.9375rem; }
.wb-case { font-weight: 700; letter-spacing: 0.01em; }
.wb-state { display: inline-flex; gap: 6px; margin-left: auto; }
.wristband .state { background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-pill); padding: 2px 10px; font-size: 0.8125rem; }
.wb-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.wb-name { font-size: 1.375rem; line-height: 1.2; }
.wb-sub { color: var(--on-dark-muted); font-weight: 700; }
.wb-allergy { background: var(--closed-tint); color: var(--closed-ink); font-weight: 700; border-radius: var(--radius-pill); padding: 2px 12px; }
.wb-unknown { color: var(--on-dark-warn); font-weight: 700; font-size: 0.9375rem; }
.wb-more { color: var(--on-dark-muted); font-size: 0.9375rem; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); margin: 4px -14px 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.modes [role='tab'] { font: inherit; font-weight: 700; color: var(--on-dark-muted); background: none; border: none; min-height: 48px; cursor: pointer; border-bottom: 4px solid transparent; }
.modes [role='tab']:hover { color: var(--white); }
.modes [role='tab'][aria-selected='true'] { color: var(--white); border-bottom-color: var(--accent); }
.modes [role='tab']:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
@media (max-width: 640px) {
  .main:has(.wristband) { padding-top: 8px; }
  .wristband { border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0 -16px; padding: 8px 16px 0; }
  .modes { margin: 4px -16px 0; }
  .wb-name { font-size: 1.25rem; }
}

.pane { gap: var(--sp-4); }
.version-banner { background: var(--hold-tint); border: 1.5px solid var(--hold-line); color: var(--hold-ink); border-radius: var(--radius-md); padding: 12px 16px; }
.outbox-strip { display: grid; gap: 8px; background: var(--hold-tint); border: 1.5px solid var(--hold-line); border-radius: var(--radius-md); padding: 12px 16px; }
.outbox-strip .refused { color: var(--alert); }
.outbox-strip.no-signal { border-color: var(--alert); } /* one strip says it all: no signal, and what waits on this phone */
.outbox-refused { background: var(--alert-tint); color: var(--alert); border-radius: var(--radius-md); padding: 10px 12px; }

/* progress becomes a slim guide that sits between the wristband and the view */
.progress { padding: var(--sp-4) var(--sp-5); gap: var(--sp-3); }
.progress-top h2 { font-size: 1rem; color: var(--quiet); }
.progress-words p { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) {
  .psteps { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .pstep { white-space: nowrap; }
  .progress-top .btn { width: 100%; }
}

/* care */
.care-patients { align-items: center; }
.pswitch { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-panel .stages { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 640px) {
  .timeline-panel .stages { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .timeline-panel .stage { flex: 0 0 132px; scroll-snap-align: start; }
}
.stage.queued { border-style: dashed; border-color: var(--hold-line); background: var(--hold-tint); }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.tool { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; font: inherit; font-weight: 700; text-align: left; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; }
.tool:hover { border-color: var(--ink); }
.tool-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.tool.done { background: var(--ok-tint); border-color: var(--open-line); }
.tool.done .tool-dot { background: var(--open); border-color: var(--open); }
.tool[data-tool='arrest'] { color: var(--alert); border-color: var(--closed-line); }
.log li .what { font-weight: 700; }
li.voided .what, tr.voided td:not(:last-child) { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--quiet); }
.void-note { display: block; font-size: 0.8125rem; font-weight: 700; color: var(--alert); text-decoration: none; }
tr.voided .void-note { white-space: normal; }
.late-tag, .queued-tag { display: inline-block; margin-left: 6px; font-size: 0.75rem; font-weight: 700; border-radius: var(--radius-pill); padding: 1px 8px; vertical-align: middle; }
.late-tag { background: var(--surface-2); color: var(--quiet); }
.locked-tag { white-space: normal; max-width: 16rem; border-radius: var(--radius); background: var(--warn-bg, var(--surface-2)); } /* review round 2 S1: recorded while locked, not yet confirmed */
.queued-tag { background: var(--hold-tint); color: var(--hold-ink); }
li.queued, tr.queued { opacity: 0.85; }
.effect { color: var(--open); font-weight: 700; }
.btn.quiet { border-color: transparent; background: none; color: var(--quiet); font-weight: 700; }
.btn.quiet:hover { background: var(--snowpack); color: var(--ink); }
.voided-patients { border-left: 6px solid var(--line-strong); }

/* bedside sheets */
.vsheet .q h4 { font-size: 0.9375rem; }
.vsheet .q label { font-weight: 700; }
.short-num { max-width: 140px; font-size: 1.25rem; font-weight: 700; text-align: center; }
.band-note { background: var(--info-tint); color: var(--accent-ink); border-radius: var(--radius-md); padding: 8px 12px; font-weight: 700; }
.pupil-row, .cms-row { display: grid; grid-template-columns: 88px 1fr; gap: 8px; align-items: center; }
.cms-row { grid-template-columns: 1fr; }
.cms-row > span { font-weight: 700; font-size: 0.9375rem; }
fieldset.cms { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
fieldset.cms legend { font-weight: 700; padding: 0 6px; }
details.gcs summary { gap: 12px; }
.arrest-top { display: grid; gap: 6px; background: var(--sel-bg); color: var(--sel-ink); border-radius: var(--radius-md); padding: 14px 16px; }
.arrest-clock { font-size: 1.5rem; font-weight: 700; }
.arrest-cycle { font-weight: 700; }
.arrest-cycle[data-level='alert'] { color: var(--on-dark-alert); }
.arrest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .arrest-grid { grid-template-columns: repeat(4, 1fr); } }
.arrest-btn { min-height: 64px; font-size: 1.0625rem; font-weight: 700; }
.arrest-btn.danger { background: var(--alert); border-color: var(--alert); color: var(--white); }
.arrest-btn.good { background: var(--open); border-color: var(--open); color: var(--white); }
.arrest-log { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.refusal-block { background: var(--alert-tint); color: var(--closed-ink); border: 1.5px solid var(--closed-line); border-radius: var(--radius-md); padding: 10px 12px; }

/* report: a section list beside the form on a wide screen */
.report-grid { display: grid; gap: var(--sp-4); }
.report-nav ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.report-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.report-nav a:hover { border-color: var(--ink); }
@media (min-width: 1000px) {
  .report-grid { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
  .report-nav { position: sticky; top: calc(var(--stick-top, 0px) + 190px); }
  .report-nav ol { display: grid; gap: 2px; overflow: visible; }
  .report-nav a { border: none; border-radius: var(--radius); background: none; min-height: 40px; white-space: normal; }
  .report-nav a:hover { background: var(--surface); }
}
.from-note { font-size: 0.8125rem; font-weight: 700; color: var(--accent-ink); }
.from-note.differs { color: var(--hold); }
.prefilled input, .prefilled textarea, .prefilled select, .prefilled .bodymap { background: var(--info-tint); }
.draft-row { align-items: center; }
.narrative-field textarea { min-height: 180px; }

@media print {
  .wristband { position: static; box-shadow: none; background: var(--white); color: var(--black); border: 2px solid var(--black); }
  .wristband .state { border: 1px solid var(--black); }
  .modes, .progress, .outbox-strip, .tools, .bed-actions, .bed-foot, .report-nav, .chip-row.quick, .draft-row { display: none !important; }
  .case > .pane[hidden] { display: grid !important; }
  .case > .pane { break-before: page; }
  .bedside[hidden] { display: grid !important; }
  .btn.quiet, .btn.quiet-danger { display: none !important; }
  li.voided .what, tr.voided td { color: var(--black); }
}
.offline-banner:not([hidden]) ~ div .wristband { top: 64px; }
.bed-grid { display: grid; gap: var(--sp-5); }
.bed-now { gap: var(--sp-4); }
.bed-logs { gap: var(--sp-5); }
.bed-logs > .stack.tight, .bed-more { padding-top: var(--sp-4); border-top: 1px solid var(--line); gap: var(--sp-3); }
.bed-now .bed-actions { border-top: none; padding-top: 0; }
.bed-now .bed-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bedside .plain.log li { flex-wrap: wrap; }
.bedside .plain.log li > span:first-child { flex: 1 1 260px; min-width: 0; }
.bedside .plain.log li > .row, .bedside .plain.log li > .btn { margin-left: auto; flex: none; }
@media (min-width: 1100px) {
  .bed-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .bed-logs { border-left: 1px solid var(--line); padding-left: var(--sp-5); }
  .bed-logs > .stack.tight:first-child { border-top: none; padding-top: 0; }
  .bed-now .vstrip { grid-template-columns: repeat(3, 1fr); }
  .timeline-panel .stages { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
}
@media (max-width: 640px) {
  .bedside { padding: var(--sp-4); }
  .tools { grid-template-columns: 1fr 1fr; }
}
/* the bedside sheets share a class name with the printed receipt; keep the app's own type in them */
.dialog.sheet { font-family: inherit; font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--surface); }
.report-grid > *, .pane > * { min-width: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* jumping to a section stops below the wristband instead of under it */
.pane [id], .pane details[data-section], .pane [data-field] { scroll-margin-top: calc(var(--stick-top, 0px) + 180px); }

/* ---------- Assets and fleet ----------
   The asset page reads like the plate on the machine: the tag, the name, the meters, then four big buttons for what
   people do standing beside it. Lists stay quiet; colour only marks what needs attention. */
.note-box { background: var(--info-tint); border: 1px solid var(--info-line); border-radius: var(--radius-md); padding: 10px 14px; }
.pair { display: grid; gap: var(--sp-4); }
.pair > * { min-width: 0; }
@media (min-width: 900px) { .pair { grid-template-columns: 1fr 1fr; align-items: start; } }
.plain.rows > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain.rows > li:last-child { border-bottom: none; }
.filters { flex-wrap: wrap; gap: 8px; }
.filters input[type=search] { min-width: min(320px, 100%); }
.tag-cell { font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
tr.status-out_of_service td:first-child { box-shadow: inset 4px 0 0 var(--closed); }
tr.status-needs_service td:first-child { box-shadow: inset 4px 0 0 var(--warn-mark); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--ink); }
.stat b { font-size: 1.75rem; line-height: 1.1; }
.stat span { color: var(--quiet); font-weight: 700; font-size: 0.9375rem; }
.stat.bad { border-color: var(--closed-line); background: var(--closed-tint); }
.stat.bad b { color: var(--closed); }
.stat.warn { border-color: var(--hold-line); background: var(--hold-tint); }
.stat.warn b { color: var(--hold); }
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); padding: 4px 14px; background: var(--surface); font-weight: 700; color: var(--ink-2); }
.cat-chip .down { color: var(--closed); }

.asset-head { display: grid; gap: var(--sp-4); border-left: 6px solid var(--ink); }
.asset-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.asset-title h1 { font-size: 1.625rem; }
.asset-tag { display: inline-block; font-weight: 700; letter-spacing: 0.06em; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 0 8px; margin-bottom: 6px; }
.asset-state { display: flex; gap: 8px; flex-wrap: wrap; }
.asset-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.asset-meters > div { background: var(--snowpack); border-radius: var(--radius-md); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.asset-meters .k { font-size: 0.8125rem; color: var(--quiet); font-weight: 700; }
.asset-meters b { font-size: 1.5rem; line-height: 1.15; overflow-wrap: anywhere; }
.asset-meters b.small-b { font-size: 1.0625rem; }
.asset-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .asset-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.asset-actions .btn { width: 100%; }
.btn.warn-btn { border-color: var(--hold-line); color: var(--hold-ink); background: var(--hold-tint); }
.btn.warn-btn:hover { background: var(--hold-tint); }
.attention { border-left: 6px solid var(--warn-mark); }
.replace-flag { background: var(--hold-tint); border: 1.5px solid var(--hold-line); border-radius: var(--radius-md); padding: 10px 12px; color: var(--hold-ink); }
.tag-panel svg.qr { border: 1px solid var(--line); border-radius: var(--radius); }
.tag-big { font-size: 1.5rem; letter-spacing: 0.06em; }
.wo-total { border-top: 1px solid var(--line); padding-top: 10px; }
.wo-sheet h3 { font-size: 1rem; }
.po-line { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) 90px 110px auto; gap: 8px; align-items: center; }
@media (max-width: 700px) { .po-line { grid-template-columns: 1fr 1fr; } }
.ins-item { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ins-label { font-weight: 700; }
.chip.result-pass[aria-pressed='true'] { background: var(--open); border-color: var(--open); }
.chip.result-fail[aria-pressed='true'] { background: var(--closed); border-color: var(--closed); }
.chip.result-na[aria-pressed='true'] { background: var(--quiet); border-color: var(--quiet); }

/* QR label sheet: three across on letter paper, each label about 2.6 by 1.2 inches */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.label-card { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 8px; background: var(--white); break-inside: avoid; }
.label-text { display: grid; gap: 1px; min-width: 0; }
.label-text b { font-size: 1.25rem; letter-spacing: 0.05em; }
.label-text span { overflow-wrap: anywhere; }
@media print {
  .labels-tools { display: none !important; }
  .labels { grid-template-columns: repeat(3, 2.6in); gap: 0.1in; }
  .label-card { height: 1.2in; border: 1px solid var(--black); }
  .asset-actions, .asset-page .btn { display: none !important; }
}
.cost-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cost-grid > div { background: var(--snowpack); border-radius: var(--radius-md); padding: 8px 12px; display: grid; gap: 2px; }
.cost-grid .k { font-size: 0.8125rem; color: var(--quiet); font-weight: 700; }
.cost-grid b { font-size: 1.125rem; }

/* ---- Work order costs, the Done tab's totals and the monthly report (2026.11.20, works-costs.js, month-report.js) */
.cost-rows { display: grid; gap: 8px; }
.cost-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cost-row select { flex: 1 1 200px; min-width: 0; }
.cost-row input:not(.short-num) { flex: 2 1 180px; min-width: 0; }
.cost-row .short-num { flex: 0 0 96px; width: 96px; }
.cost-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; }
.wo-costs { border-top: 1px solid var(--line); padding-top: 10px; }
.done-range input[type='date'] { width: auto; }
.done-totals { margin-bottom: 12px; }
.month-report .report-head h2 { font-size: 1.5rem; margin: 0; }
.month-report .report-head p { margin: 0; }
.highlights { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.highlight { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; display: grid; gap: 6px; break-inside: avoid; }
.highlight h3, .highlight p { margin: 0; }
.highlight .photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.highlight figure { margin: 0; display: grid; gap: 2px; }
.highlight img { width: 140px; height: 105px; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.month-report table th, .month-report table td { padding: 6px 8px; }
.top-streets { margin: 0; padding-left: 1.4em; columns: 2; }
@media (max-width: 560px) { .cost-row .short-num { flex-basis: 96px; width: 96px; } .top-streets { columns: 1; } }
@media print {
  .month-report .report-part { break-inside: avoid-page; border: 0; padding: 0; }
  .month-report .table-wrap { overflow: visible; }
  .month-report table { font-size: 11px; }
  .month-report details { display: block; }
  .month-report details > summary { list-style: none; font-weight: 700; }
}

/* Gate: phone helpers, the camera view and pairing codes */
.reader-tools { justify-content: center; gap: 8px; }
.camera-view { width: 100%; max-height: 50vh; background: var(--black); border-radius: var(--radius); object-fit: cover; }
.pair-code { font: 700 2.25rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.12em; text-align: center; padding: 12px; border: 2px dashed var(--line); border-radius: var(--radius-md); user-select: all; }

/* Injury network report (platform console) */
.print-only { display: none; }
.injury-report table.grid { font-size: 0.875rem; }
.injury-report table.grid th, .injury-report table.grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.injury-report table.grid thead th { vertical-align: bottom; white-space: normal; min-width: 64px; }
.injury-report table.grid tbody tr:last-child th, .injury-report table.grid tbody tr:last-child td { font-weight: 700; }
@media print {
  .print-only { display: block; }
  .injury-report .two-col { grid-template-columns: 1fr 1fr; gap: 16px; }
  .injury-report .figure strong { font-size: 1.5rem; }
}
label.net-check { align-items: flex-start; font-weight: 400; }
label.net-check input { margin-top: 3px; }
label.net-check .hint { display: block; font-weight: 400; }
.injury-report > .row select { width: auto; }

/* Guided tours (demo mountains) */
.tour-card { position: fixed; right: 20px; bottom: 96px; z-index: 70; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: 0 14px 40px rgba(18, 48, 58, 0.32); border-top: 4px solid var(--accent-line); display: grid; gap: 8px; }
.tour-card h2 { font-size: 1.125rem; margin: 0; }
.tour-card p { margin: 0; line-height: 1.45; }
.tour-card .tour-meta { font-size: 0.8125rem; color: var(--quiet); }
.tour-card .tour-hint { font-size: 0.8125rem; color: var(--hold-ink); }
.tour-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.tour-actions .tour-end { margin-left: auto; }
.tour-ring { outline: 3px solid var(--accent-line) !important; outline-offset: 4px; border-radius: var(--radius); animation: tour-pulse 1.6s ease-out 2; }
@keyframes tour-pulse { 0% { box-shadow: 0 0 0 0 rgba(26, 102, 204, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(26, 102, 204, 0); } }
@media (prefers-reduced-motion: reduce) { .tour-ring { animation: none; } }
body:has(.tour-card) .demo-pill { display: none; }
.tour-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tour-pick { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.tour-pick:hover, .tour-pick:focus-visible { border-color: var(--link); box-shadow: 0 0 0 2px var(--accent-line); }
.tour-pick span { color: var(--quiet); font-size: 0.9375rem; }
.tour-pick small { color: var(--quiet); }
.demo-pill button { background: none; border: 0; color: var(--sel-ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }
@media (max-width: 760px) { .tour-card { left: 12px; right: 12px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); padding: 14px; } }
@media print { .tour-card { display: none; } }
.tour-card.tour-top { bottom: auto; top: 16px; }
@media (max-width: 760px) { .tour-card.tour-top { top: 12px; bottom: auto; } }

/* Inbox (team messages) */
.inbox { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-height: 70vh; height: calc(100vh - 210px); overflow: hidden; }
.inbox-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-side > .row { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.inbox-side h2 { font-size: 1rem; margin: 0; }
.inbox-list { overflow-y: auto; flex: 1; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-row { position: relative; display: grid; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.thread-row:hover { background: var(--snowpack); }
.thread-row[aria-current='page'] { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent-line); }
.thread-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.thread-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-top small { color: var(--quiet); flex: none; }
.thread-last { color: var(--quiet); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 32px; }
.unread-dot { position: absolute; right: 16px; bottom: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.inbox-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread-empty { flex: 1; display: grid; place-items: center; color: var(--quiet); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.thread-head h2 { font-size: 1.0625rem; margin: 0; }
.thread-head > .row { margin-left: auto; flex-wrap: wrap; }
.thread-back { display: none; font-size: 1.75rem; line-height: 1; text-decoration: none; color: var(--ink); padding: 0 6px; }
.msg-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; background: var(--snowpack); }
.msg-older { text-align: center; margin-bottom: 8px; }
.msg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.msg { display: grid; gap: 4px; max-width: min(620px, 85%); justify-self: start; }
.msg.mine { justify-self: end; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-meta { display: flex; gap: 8px; align-items: baseline; font-size: 0.8125rem; }
.msg-meta small { color: var(--quiet); }
.msg-remove { font-size: 0.75rem; padding: 0; }
.bubble { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs); padding: 10px 14px; display: grid; gap: 8px; }
.msg.mine .bubble { background: var(--info-tint); border-color: var(--info-line); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg); }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.msg.system { justify-self: center; max-width: 90%; display: flex; gap: 8px; color: var(--quiet); font-size: 0.8125rem; text-align: center; }
.msg-links { display: grid; gap: 6px; }
.link-card { display: flex; align-items: stretch; border: 1px solid var(--line); border-left: 4px solid var(--accent-line); border-radius: var(--radius); background: var(--surface); min-width: 220px; }
.link-card .link-open { flex: 1; display: grid; gap: 1px; padding: 8px 12px; color: inherit; text-decoration: none; min-width: 0; }
.link-card a.link-open:hover strong { text-decoration: underline; color: var(--link); }
.link-card small { color: var(--quiet); font-size: 0.75rem; }
.link-card strong { overflow: hidden; text-overflow: ellipsis; }
.link-card span { color: var(--quiet); font-size: 0.875rem; }
.link-card.off { border-left-color: var(--line-strong); background: var(--snowpack); }
.link-card.off strong { font-weight: 500; color: var(--quiet); }
.link-remove { border: 0; background: none; font-size: 1.25rem; padding: 0 12px; color: var(--quiet); cursor: pointer; }
.composer { border-top: 1px solid var(--line); padding: 12px 18px; display: grid; gap: 8px; background: var(--surface); }
.compose-links { display: flex; flex-wrap: wrap; gap: 8px; }
.compose-links:empty { display: none; }
.compose-row { display: flex; gap: 10px; align-items: flex-end; }
.compose-row textarea { flex: 1; resize: vertical; min-height: 44px; max-height: 200px; }
.pick-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; }
.pick-list .pick span { display: grid; }
.pick-list .pick small { color: var(--quiet); text-transform: capitalize; }
.pick-head { margin: 8px 0 2px; font-size: 0.8125rem; color: var(--quiet); font-weight: 700; }
.share-btn .ico { vertical-align: -3px; }
.row.end { justify-content: flex-end; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 190px); border-radius: var(--radius-md); }
  .inbox.has-thread .inbox-side { display: none; }
  .inbox:not(.has-thread) .inbox-thread { display: none; }
  .inbox-side { border-right: 0; }
  .thread-back { display: inline-block; }
  .thread-head > .row { width: 100%; }
  .msg { max-width: 92%; }
  .compose-row .btn { min-height: 44px; }
}
@media (max-width: 760px) {
  .inbox-head p.muted, .inbox-head .head-tools { display: none; }
  .inbox { height: calc(100dvh - 210px); min-height: 420px; }
  .thread-head { flex-wrap: wrap; padding: 10px 12px; gap: 6px 10px; }
  .thread-head > .stack { flex: 1; min-width: 0; }
  .thread-head > .row { width: 100%; margin-left: 0; gap: 6px; }
  .thread-head > .row .btn { min-height: 34px; padding: 4px 10px; }
  .msg-scroll { padding: 12px; }
  .composer { padding: 10px 12px; }
}

/* Patrol case review */
.review-box { border: 2px solid var(--accent-line); border-radius: var(--radius-md); padding: 16px; background: var(--info-tint); }
.review-box h2, .review-changes h2 { font-size: 1.0625rem; margin: 0; }
.review-box .check { font-weight: 400; align-items: flex-start; }
.review-box .check input { margin-top: 3px; }
.review-changes { border-left: 4px solid var(--hold); background: var(--hold-tint); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 6px; }
.review-changes ul { margin: 0; padding-left: 20px; }
.review-flag { border-left: 4px solid var(--closed); background: var(--closed-tint); border-radius: var(--radius); padding: 10px 14px; margin: 0; }
.review-history summary { cursor: pointer; color: var(--quiet); }
.review-history ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.comment-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 8px; align-items: center; }
.review-person { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.review-person:last-child { border-bottom: 0; }
.review-person .lead-pick { font-weight: 400; color: var(--quiet); min-height: 0; }
.review-people { max-height: 360px; }
.row.wrap { flex-wrap: wrap; }
@media (max-width: 760px) { .comment-row { grid-template-columns: 1fr; } .review-person { flex-wrap: wrap; } }

/* Version numbers and What's new */
.signin-version { margin: 8px 0 0; font-size: .75rem; color: var(--quiet); }
.version-line { margin-top: 20px; }
.whatsnew-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 640px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
.whatsnew-link:hover { border-color: var(--link); }
.whatsnew-link b { color: var(--accent-ink); }
.new-pill { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; line-height: 1.6; }
.releases { display: grid; gap: 28px; max-width: 46rem; }
.release header h2 { margin: 0; font-size: 1.25rem; }
.release header p { margin: 2px 0 10px; }
.release.is-new { padding-left: 14px; border-left: 4px solid var(--accent-line); }
.release-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.release-notes li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 10px; align-items: start; line-height: 1.5; }
.release-notes .state { justify-self: start; }
.help-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 12px; max-width: 980px; }
.help-news .whatsnew-link { max-width: none; }
.roadmap { display: grid; gap: 28px; max-width: 46rem; }
.roadmap-stage header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.roadmap-stage header h2 { margin: 0; font-size: 1.25rem; }
.roadmap-stage header p { margin: 0; }
.roadmap-stage.is-now { padding-left: 14px; border-left: 4px solid var(--accent-line); }
.roadmap-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.roadmap-items li { line-height: 1.5; }
.roadmap-items li p { margin: 2px 0 0; }
.roadmap-app { margin-left: 8px; white-space: nowrap; }
@media (max-width: 520px) { .release-notes li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Staff and schedule ---------- */
.sched-head { display: grid; gap: 10px; margin-bottom: 14px; }
.week-bar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.week-nav .week-title { min-width: 10.5rem; text-align: center; }
.icon-btn { font-size: 1.25rem; line-height: 1; min-width: 40px; justify-content: center; }
.week-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.week-filter { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.week-filter select { min-height: 40px; }
.linkish { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }

/* department colours: the left edge of each shift, with the name always written beside it */
[data-dept] { --dept: #6b7c86; }
[data-dept='lifts'] { --dept: #1b5fc1; }
[data-dept='rentals'] { --dept: #7a4fd0; }
[data-dept='ski_school'] { --dept: #0f7f86; }
[data-dept='patrol'] { --dept: #b42318; }
[data-dept='food'] { --dept: #b45f00; }
[data-dept='guest_services'] { --dept: #b0306a; }
[data-dept='grooming'] { --dept: #3d6b1f; }
[data-dept='maintenance'] { --dept: #5c5f66; }
[data-dept='admin'] { --dept: #12303a; }

.sched-grid { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.sg-row { display: grid; grid-template-columns: minmax(150px, 1.15fr) repeat(7, minmax(0, 1fr)) 64px; border-top: 1px solid var(--line); }
.sg-row:first-child { border-top: 0; }
.sg-headrow { background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.sg-row > div { padding: 8px; min-width: 0; }
.sg-row > div + div { border-left: 1px solid var(--line); }
.sg-headrow > div { display: grid; font-size: .875rem; color: var(--quiet); }
.sg-headrow b { color: var(--ink); }
.sg-headrow small { font-size: .75rem; }
.sg-day.is-today { box-shadow: inset 0 3px 0 var(--accent-line); background: var(--info-tint); }
.sg-name { display: grid; align-content: start; gap: 2px; }
.sg-name a { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sg-name a:hover { text-decoration: underline; }
.sg-name small { color: var(--quiet); font-size: .75rem; line-height: 1.3; }
.sg-cell { display: flex; flex-direction: column; gap: 6px; position: relative; min-height: 56px; }
.sg-hours { text-align: right; font-weight: 700; font-size: .875rem; }
.sg-hours.is-over { color: var(--hold); background: var(--hold-tint); }
.sg-open { background: var(--hold-tint); }
.sg-open .sg-name b { color: var(--hold); }
.sg-toggle { grid-template-columns: 1fr; background: var(--surface-2); }
.sg-toggle > div { padding: 6px 12px; }

.shift-block { display: grid; gap: 1px; text-align: left; width: 100%; font: inherit; font-size: .8125rem; line-height: 1.3; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-left: 4px solid var(--dept); border-radius: var(--radius-sm); padding: 5px 7px; cursor: pointer; }
.shift-block b { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-block span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-block .sb-sub { color: var(--quiet); font-size: .75rem; white-space: normal; }
.shift-block:hover { border-color: var(--link); border-left-color: var(--dept); background: var(--info-tint); }
.shift-block.is-draft { border-style: dashed; border-left-style: solid; background: var(--surface-2); }
.shift-block.is-open { background: var(--hold-tint); border-color: var(--hold-line); border-left-color: var(--dept); }
.cell-add { align-self: stretch; min-height: 28px; border: 1px dashed transparent; background: none; color: transparent; border-radius: var(--radius-sm); font: inherit; font-size: 1.125rem; cursor: pointer; margin-top: auto; }
.sg-cell:hover .cell-add, .cell-add:focus-visible { border-color: var(--line-strong); color: var(--link); background: var(--info-tint); }
.sched-key { margin-top: 8px; }

.sched-phone { display: none; }
.day-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 12px; }
.day-strip button { display: grid; justify-items: center; gap: 0; padding: 6px 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font: inherit; color: var(--quiet); cursor: pointer; min-height: 60px; }
.day-strip button span { font-size: .75rem; }
.day-strip button b { font-size: 1.125rem; color: var(--ink); }
.day-strip button small { font-size: .6875rem; min-height: 1em; }
.day-strip button small.has-open { color: var(--hold); font-weight: 700; }
.day-strip button.is-today { border-color: var(--link); }
.day-strip button[aria-selected='true'] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.day-strip button[aria-selected='true'] b, .day-strip button[aria-selected='true'] small { color: var(--white); }
.day-title { margin: 4px 0 8px; }
.day-group { font-weight: 700; color: var(--quiet); font-size: .875rem; margin: 14px 0 6px; }
.day-list { display: grid; gap: 8px; }
.day-list .shift-block { font-size: .9375rem; padding: 10px 12px; }
.day-list .shift-block b { font-size: .9375rem; }

@media (max-width: 900px) {
  .sched-wide { display: none; }
  .sched-phone { display: block; }
  .week-bar { display: grid; }
  .week-nav { justify-content: space-between; }
  .week-actions .btn { flex: 1 1 auto; }
}

/* the shift dialog */
.shift-when { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .shift-when { grid-template-columns: 1fr 1fr; } .shift-when > :first-child { grid-column: 1 / -1; } }
.cand-box { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 8px 12px 12px; margin: 0; }
.cand-box legend { font-weight: 700; padding: 0 6px; }
.cand-list { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.cand-group { display: grid; gap: 2px; margin-top: 6px; }
.cand-title { font-size: .8125rem; font-weight: 700; color: var(--quiet); margin: 4px 0 2px; }
.cand { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: var(--radius); cursor: pointer; }
.cand:hover { background: var(--snowpack); }
.cand input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.cand-text { display: grid; }
.cand-sub { font-size: .8125rem; color: var(--quiet); }
.cand[data-tone='warn'] .cand-sub { color: var(--hold); }
.cand.is-blocked { cursor: not-allowed; opacity: .75; }
.cand.is-blocked:hover { background: none; }
.footer .footer-start { margin-right: auto; }
.day-seg { flex-wrap: wrap; }
.day-seg button[aria-pressed='true'] { background: var(--sel-bg); color: var(--sel-ink); }

/* hours */
.hours-table .punch-row > td { background: var(--surface-2); padding: 8px 12px 12px; }
.hours-table .punch-row .table-wrap { background: var(--surface); }

/* staff list and person page */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar input[type=search] { flex: 1 1 240px; min-height: 44px; }
.filter-bar select { min-height: 44px; }
.filter-bar .btn.primary { margin-left: auto; }
.notice-box { border-left: 4px solid var(--warn-mark); padding-left: 14px; }
/* Street notice review (2026.11.20): Send now on its own line, "Or send it later" with its own label, the draft's Edit and
   Delete apart from sending; blanks still in a message are marked. */
.notice-send { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.notice-later { display: grid; gap: 4px; margin-top: 4px; }
.notice-later > label { font-weight: 700; }
.notice-later .row { align-items: center; }
.notice-later input[type="datetime-local"] { flex: 1 1 14rem; max-width: 18rem; min-width: 0; }
.notice-draft-actions { border-top: 1px solid var(--line); padding-top: 10px; }
.msg-body mark { background: var(--hold-tint); color: var(--hold); font-weight: 700; border-radius: var(--radius-xs); padding: 0 2px; }
/* A request's clock label ("Make safe:", "Fix:") before its words, in the list and the request (2026.11.20). */
.clock-label { font-weight: 700; margin-right: 2px; }
.state.req-clock { white-space: normal; align-items: baseline; }
.state.req-clock::before { align-self: center; }
/* A work order's Cancel job and Delete, apart from the work buttons (2026.11.20). */
.wo-danger { border-top: 1px solid var(--line); padding-top: 10px; }
.person-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--quiet); margin-top: 4px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pcard { display: grid; gap: 10px; }
.pcard .card-head { margin: 0; }
.pcard .table-wrap { border: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.big-pair { display: flex; gap: 24px; }
.big-pair b { font-size: 1.5rem; }
.setup-h { margin-top: 12px; }
.week-filter select, .filter-bar select { width: auto; flex: 0 1 auto; }
.filter-bar input[type=search] { width: auto; }
.sg-row { grid-template-columns: minmax(150px, 1.15fr) repeat(7, minmax(0, 1fr)) 76px; }
.sg-hours { white-space: nowrap; }
.sg-cell:has(.shift-block) .cell-add { position: absolute; right: 4px; bottom: 4px; width: 26px; min-height: 26px; padding: 0; margin: 0; }
.sg-cell:has(.shift-block) { padding-bottom: 8px; }
.sg-cell { min-height: 48px; }
.sg-row.sg-toggle { grid-template-columns: 1fr; }
.sg-patrol { background: var(--surface-2); }
.shift-block.is-readonly { cursor: pointer; text-decoration: none; background: var(--surface); border-style: solid; }
.shift-block.is-readonly.is-open { background: var(--hold-tint); }
.shift-block.is-mine { border-width: 2px; border-color: var(--ink); border-left-width: 4px; }
.shift-block:disabled { cursor: default; opacity: 1; color: var(--ink); }
.sg-row.is-me .sg-name b { text-decoration: underline; }
.shift-when.two { grid-template-columns: 1fr 1fr; }
.perm-list { display: grid; gap: 4px; max-height: 60vh; overflow-y: auto; }
.perm-group { margin: 10px 0 2px; font-size: .875rem; color: var(--quiet); }
.perm-row { display: grid; grid-template-columns: 1fr minmax(180px, 230px); gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.perm-row select { min-height: 40px; }
@media (max-width: 560px) { .perm-row { grid-template-columns: 1fr; gap: 4px; } }
.tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: .75rem; font-weight: 700; color: var(--quiet); vertical-align: middle; }
.tag[data-kind='patrol'] { border-color: var(--closed-line-soft); color: var(--closed); }

/* Patrol > Team > Cover */
.cover-setting { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; }
.cover-setting input { width: 18px; height: 18px; }
.cover-section { margin-top: 24px; }
.cover-section > h3 { font-size: 1rem; margin: 0 0 10px; }
.cover-list { display: grid; gap: 8px; }
.cover-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 10px 10px; }
.cover-leaf { display: grid; justify-items: center; align-content: center; width: 56px; height: 60px; border-radius: var(--radius-sm); background: var(--sel-bg); color: var(--sel-ink); line-height: 1.05; }
.cover-leaf span { font-size: .6875rem; opacity: .85; }
.cover-leaf b { font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.cover-main { min-width: 0; display: grid; gap: 2px; }
.cover-main p { margin: 0; }
.cover-when b { font-size: .9375rem; }
.cover-who { font-size: .9375rem; }
.cover-why { font-size: .8125rem; color: var(--hold); }
.cover-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cover-history summary { cursor: pointer; font-weight: 600; }
.cover-past { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .875rem; }
.shift-block .sb-cover { justify-self: start; font-size: .6875rem; font-weight: 600; color: var(--hold); background: var(--hold-tint); border-radius: var(--radius-pill); padding: 0 6px; }
@media (max-width: 640px) {
  .cover-item { grid-template-columns: 48px 1fr; padding: 10px; }
  .cover-leaf { width: 48px; height: 54px; }
  .cover-actions { grid-column: 1 / -1; justify-content: stretch; }
  .cover-actions .btn { flex: 1; }
}

/* ---------------------------------------------------------------- Patrol operations (2026.10.11) */
.duty-me { border-left: 4px solid var(--line-strong); }
.duty-me.is-on { border-left-color: var(--open); }
.duty-me .row { margin-top: 10px; flex-wrap: wrap; }
.duty-me input, .duty-me select { max-width: 200px; }
.duty-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.duty-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.duty-list li:last-child { border-bottom: 0; }
.meter-bar { height: 10px; border-radius: var(--radius-pill); background: var(--snowpack); overflow: hidden; margin: 8px 0; }
.meter-bar span { display: block; height: 100%; background: var(--open); }

.room { padding: 16px; }
.room-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 16px 16px 0; }
.room-head h1 { margin: 0; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.room-tile { display: grid; gap: 4px; min-height: 96px; padding: 14px; text-align: left; font: inherit; border-radius: var(--radius-md); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.room-tile b { font-size: 1.125rem; }
.room-tile span { color: var(--quiet); font-size: .875rem; }
.room-tile.is-on { border-color: var(--open); background: var(--open-tint); }
.room-tile.is-on span { color: var(--open); font-weight: 700; }

.sweep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sweep-card { display: grid; gap: 8px; align-content: start; border-top: 4px solid var(--line-strong); }
.sweep-card.is-mine { border-top-color: var(--link); }
.sweep-card.is-clear { border-top-color: var(--open); }
.sweep-stops { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.sweep-stops li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.sweep-stops li.is-swept .stop-name { color: var(--open); }
.sweep-stops li.is-flag { background: var(--hold-tint); border-radius: var(--radius-sm); padding: 4px 6px; }
.stop-mark { font-size: .875rem; color: var(--quiet); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.open-list { display: grid; gap: 8px; }
.open-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; }
.open-row p { margin: 2px 0 0; }

.flag-list { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px; border: 1px solid var(--hold-line); background: var(--hold-tint); border-radius: var(--radius); }
.lift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pre { white-space: pre-wrap; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.log-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.log-sec h3 { font-size: 1rem; margin: 0; }

.allergy-box { border: 2px solid var(--closed); background: var(--closed-tint); border-radius: var(--radius); padding: 10px 12px; }
.allergy-box h4 { color: var(--closed); margin: 0 0 6px; }
.allergy-box[data-hit='yes'] { box-shadow: 0 0 0 3px var(--closed); }
.allergy-box input[type='text'], .allergy-box input:not([type]) { margin-top: 6px; width: 100%; }
.tq-banner { margin: 0; padding: 8px 12px; border-radius: var(--radius); background: var(--closed); color: var(--white); }
.hs-critical { border: 2px solid var(--closed); background: var(--closed-tint); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 4px; }
.hs-critical p { margin: 0; }
.hs-allergy { margin: 8px 0; font-size: 1.05rem; }
.my-call { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; }
.my-call.is-new { border: 2px solid var(--closed); background: var(--closed-tint); }
.search-who p { margin: 2px 0; }
.release-pack .kv th { text-align: left; padding: 4px 12px 4px 0; vertical-align: top; color: var(--quiet); font-weight: 600; }
.release-pack .kv td { padding: 4px 0; }
@media print {
  .no-print { display: none !important; }
  .page-break { break-after: page; }
}
@media (max-width: 640px) {
  .sweep-grid, .lift-grid, .log-grid { grid-template-columns: 1fr; }
  .room-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Billing: the mountain's Verdynt/OS subscription ---------- */
.billing-standing.is-grace { border-left: 5px solid var(--warn-fill); }
.billing-standing.is-read_only { border-left: 5px solid var(--closed); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.plan-card { display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; min-height: 132px; }
.plan-card:hover:not(:disabled) { border-color: var(--ink); }
.plan-card.on { border: 2px solid var(--open); padding: 13px 15px; background: var(--open-tint); }
.plan-card:disabled { cursor: default; }
.plan-card:disabled:not(.on) { opacity: 0.7; }
.plan-name { font-weight: 700; font-size: 1.05rem; }
.plan-price { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.plan-price small { font-size: 0.875rem; font-weight: 400; color: var(--quiet); }
.plan-blurb { font-size: 0.9rem; }
.plan-apps { font-size: 0.8rem; color: var(--quiet); }
.plan-current { justify-self: start; font-size: 0.8rem; font-weight: 700; color: var(--open); }
.addon-list { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin: 0; display: grid; gap: 2px; }
.addon-list legend { font-weight: 700; padding: 0 6px; }
.addon { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.addon input { width: 20px; height: 20px; }
.addon-price { white-space: nowrap; font-weight: 700; }
.plan-total { font-size: 1.1rem; margin: 0; }
.pay-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pay-way { display: grid; gap: 4px; align-content: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.pay-way p { margin: 0 0 8px; }
.pay-way .btn { justify-self: start; }
.billing-banner { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 10px 20px; font-size: 0.925rem; background: var(--hold-tint); color: var(--hold-ink); border-bottom: 1px solid var(--hold-line); }
.billing-banner.is-read_only { background: var(--closed-tint); color: var(--closed-ink); border-bottom-color: var(--closed-line-soft); }
.billing-banner.is-trial { background: var(--info-tint); color: var(--accent-ink); border-bottom-color: var(--info-line); }
.billing-banner a { font-weight: 700; color: inherit; text-underline-offset: 3px; }
@media print { .billing-banner { display: none; } }
/* Console badges (mountain status, billing) */
.badge { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 700; background: var(--snowpack); color: var(--quiet); border: 1px solid var(--line); }
.badge.ok { background: var(--open-tint); color: var(--open); border-color: var(--open-line); }
.badge.warn { background: var(--hold-tint); color: var(--hold); border-color: var(--hold-line); }
.badge.bad { background: var(--closed-tint); color: var(--closed); border-color: var(--closed-line-soft); }

/* ---------- Today for a municipality, by role (2026.11.20, views/today-muni.js) ---------- */
.today-muni { display: flex; flex-direction: column; gap: 18px; }
.today-h { font-size: 1.125rem; margin: 6px 0 -4px; }
.today-cards { display: flex; flex-direction: column; gap: 14px; }
.bd-tile.bd-action { border-left: 4px solid var(--closed); }
.today-lines { list-style: none; margin: 0; padding: 0; }
.today-lines li + li { border-top: 1px solid var(--line); }
.today-line { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; color: inherit; text-decoration: none; }
a.today-line:hover .today-t b { text-decoration: underline; }
.today-n { min-width: 2.2ch; text-align: right; font-size: 1.25rem; }
.today-t { min-width: 0; }
.today-quiet { margin: 0; }
.today-oncall { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cb-board { display: flex; flex-direction: column; gap: 12px; }
.cb-board h2, .cb-board h3 { margin: 0; }
.cb-board h3 { font-size: 1rem; margin-bottom: 4px; }
.cb-counts { margin: 0; }
.cb-oncall-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.cb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.cb-card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-card.is-in { border-left: 4px solid var(--open); }
.cb-card p { margin: 0; }
.cb-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.cb-work { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.cb-off, .cb-unassigned { margin: 0; }
.myday { display: flex; flex-direction: column; gap: 14px; }
.myday-clock { gap: 10px 14px; align-items: center; }
.myday-list { list-style: none; margin: 0; padding: 0; }
.myday-list li + li { border-top: 1px solid var(--line); }
.myday-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 12px 0; color: inherit; text-decoration: none; min-height: 44px; }
.myday-item:hover b { text-decoration: underline; }
.myday-title { min-width: 0; }
.myday-meta { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.desk-oncall p { margin: 4px 0 8px; }
/* Work orders: pick several to assign, and the map (2026.11.20) */
.wo-bulkbar { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 14px; gap: 10px; align-items: center; box-shadow: 0 -6px 18px -12px rgba(0, 0, 0, 0.35); }
.wo-pick { width: 22px; height: 22px; }
.oncall-cal { overflow-x: auto; }
.oncall-cal tr.is-today td { background: var(--surface-2); font-weight: 700; }
.oncall-cal .is-holiday { color: var(--hold); }
.apps-list { list-style: none; margin: 0; padding: 0 20px; }
.apps-foot { padding-bottom: 16px; }
.apps-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 0; align-items: center; }
.apps-list li + li { border-top: 1px solid var(--line); }
.apps-list .app-text { min-width: 0; flex: 1 1 280px; }
.apps-list .app-side { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Today: the morning board (the same card the website shows) ---------- */
.bd-tile.bd-morning { grid-column: 1 / -1; padding: 0; overflow: hidden; border: 0; background: transparent; box-shadow: none; }
.bd-tile.bd-morning > header { display: none; }
.board-edit:not([hidden]) ~ .board-host .bd-morning > header { display: flex; }
.mboard { background: var(--board-bg); color: var(--on-dark-ink); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 1px 0 rgba(18, 48, 58, 0.25), 0 18px 40px -24px rgba(18, 48, 58, 0.5); }
.mb-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.mb-h b { font-size: 1.35rem; font-weight: 700; }
.mb-h span { font-size: 0.875rem; color: var(--on-dark-quiet); }
.mb-s { padding: 4px 20px 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); column-gap: 40px; align-items: start; }
.mb-t { font-size: 0.875rem; color: var(--on-dark-quiet); padding: 14px 0 4px; }
.mb-t a { color: var(--on-dark-quiet); text-decoration: none; }
.mb-t a:hover { color: var(--white); text-decoration: underline; }
.mb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.mb-n { font-weight: 700; }
.mb-d { font-size: 0.875rem; color: var(--on-dark-quiet); line-height: 1.4; }
.mb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: var(--radius-pill); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.mb-chip.good { background: var(--open-tint); color: var(--open-ink); }
.mb-chip.warn { background: var(--hold-tint); color: var(--hold-ink); }
.mb-chip.bad { background: var(--closed-tint); color: var(--closed-ink); }
.mb-chip.neutral { background: var(--info-tint); color: var(--ink); }
.mb-foot { display: grid; border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 6px; }
.mb-foot a { padding: 14px 20px; border-left: 1px solid rgba(255, 255, 255, 0.14); color: var(--on-dark-ink); text-decoration: none; }
.mb-foot a:first-child { border-left: 0; }
.mb-foot a:hover { background: rgba(255, 255, 255, 0.06); }
.mb-foot b { display: block; font-size: 2rem; line-height: 1; font-weight: 700; }
.mb-foot span { display: block; font-size: 0.8125rem; color: var(--on-dark-quiet); margin-top: 4px; }
@media (max-width: 640px) { .mb-row { grid-template-columns: minmax(0, 1fr); } .mb-chip { justify-self: start; } .mb-foot a { padding: 12px 12px; } .mb-foot b { font-size: 1.6rem; } .mb-s { grid-template-columns: minmax(0, 1fr); } }
.wall .mboard { font-size: 1.15rem; }

/* ---- sign-in tiers (2026.10.17): passkey sign-in, shared terminals, the patrol two-step notice, console access */
.signin-passkey { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.signin-passkey .btn { width: 100%; justify-content: center; }
.signin.terminal .signin-form h2 { font-size: 1.5rem; }
.signin.terminal input[name="pin"] { font-size: 1.4rem; letter-spacing: .3em; }
.banner.warn { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line-strong); border-left: 6px solid var(--warn-mark); border-radius: var(--radius); background: var(--hold-tint); }
.callout.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
[data-step-up] .row .btn.primary { min-width: 12rem; }

/* ---------- Verdynt/OS dark theme (the default for staff): deep slate, gold accent, from the brand mockup.
   Light stays available in the account menu; printing always uses the light colours. ---------- */
:root[data-theme='dark'] {
  color-scheme: dark;
  --snowpack: #16222a;
  --powder: #21313b;
  --surface: #21313b;
  --surface-2: #293b46;
  --field: #1a2831;
  --panel-alt: #293b46;
  --chart-1: #3987e5;
  --chart-2: #d95926;
  --spruce: #0e1a21;
  --spruce-soft: #21313b;
  --ink: #e6edf0;
  --ink-2: #c7d4da;
  --quiet: #a0b2bb;
  --muted: #a0b2bb;
  --line: #31444f;
  --line-strong: #476070;
  --accent: #d8b672;
  --accent-hover: #c49d55;
  --on-accent: #14212a;
  --accent-line: #d8b672;
  --accent-ink: #ebd3a0;
  --accent-tint: rgba(216, 182, 114, 0.14);
  --accent-glow: rgba(216, 182, 114, 0.22);
  --link: #e3c68b;
  --link-hover: #ebd3a0;
  --on-fill: #14212a;
  --open-line: rgba(111, 217, 160, 0.45);
  --hold-line: rgba(233, 176, 75, 0.5);
  --closed-line: rgba(240, 118, 107, 0.5);
  --closed-line-soft: rgba(240, 118, 107, 0.4);
  --info-line: rgba(120, 170, 230, 0.4);
  --disabled-bg: #26353f;
  --disabled-line: #3a4c57;
  --disabled-ink: #7f949e;
  --sel-bg: #d8b672;
  --sel-ink: #14212a;
  --open: #6fd9a0; /* 7.7:1 on --surface, 5.5:1 on its own tint; the filled uses below take dark text */
  --open-tint: rgba(111, 217, 160, 0.15);
  --open-ink: #9be3bd;
  --ok-tint: rgba(111, 217, 160, 0.15);
  --hold: #e9b04b;
  --hold-tint: rgba(233, 176, 75, 0.15);
  --hold-ink: #f3d08c;
  --watch: #e9b04b;
  --watch-tint: rgba(233, 176, 75, 0.15);
  --warn: #e9b04b;
  --warn-bg: rgba(233, 176, 75, 0.15);
  --warn-ink: #f3d08c;
  --closed: #f0766b;
  --closed-tint: rgba(240, 118, 107, 0.15);
  --closed-ink: #ffb6ad;
  --alert: #f0766b;
  --alert-tint: rgba(240, 118, 107, 0.15);
  --info-tint: rgba(120, 170, 230, 0.13);
  --focus: #ffb547;
  --lift: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.28);
}
/* White on the green or red fill is about 2:1 in the dark theme; the fills take the same dark ink as the gold accent (over 5.8:1). */
:root[data-theme='dark'] .seg button[aria-pressed='true'][data-tone='good'], :root[data-theme='dark'] .seg button[aria-pressed='true'][data-tone='bad'],
:root[data-theme='dark'] .gate[data-result='ok'], :root[data-theme='dark'] .gate[data-result='good'], :root[data-theme='dark'] .gate[data-result='bad'],
:root[data-theme='dark'] .arrest-btn.good, :root[data-theme='dark'] .arrest-btn.danger, :root[data-theme='dark'] .tq-banner,
:root[data-theme='dark'] .chip.result-pass[aria-pressed='true'], :root[data-theme='dark'] .chip.result-fail[aria-pressed='true'], :root[data-theme='dark'] .chip.result-na[aria-pressed='true'] { color: var(--on-accent); }
:root[data-theme='dark'] input, :root[data-theme='dark'] select, :root[data-theme='dark'] textarea { background-color: var(--field); }
:root[data-theme='dark'] .panel, :root[data-theme='dark'] .table-wrap, :root[data-theme='dark'] .card, :root[data-theme='dark'] .dialog { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset; }
:root[data-theme='dark'] .error-box { border-color: rgba(240, 118, 107, 0.45); }
:root[data-theme='dark'] .overlay { background: rgba(5, 12, 16, 0.7); }
:root[data-theme='dark'] .sigpad, :root[data-theme='dark'] .sig-img, :root[data-theme='dark'] .sig-image { border-color: var(--line-strong); }
@media print {
  :root[data-theme='dark'] {
    color-scheme: light;
    --snowpack: #ffffff; --powder: #ffffff; --surface: #ffffff; --surface-2: #f7f9fa; --field: #ffffff; --panel-alt: #f4f6f8;
    --spruce: #0e2632; --ink: #0e2632; --ink-2: #1d4452; --quiet: #4f636d; --muted: #52656d; --line: #d3dce1; --line-strong: #aebcc4;
    --accent-line: #9a7630; --accent-ink: #1d4452; --accent-tint: #f7efdc; --link: #1d4452; --on-accent: #0e2632; --on-fill: #fff; --sel-bg: #0e2632; --sel-ink: #fff;
    --open-line: #a9d8bd; --hold-line: #e0b560; --closed-line: #e0908a; --closed-line-soft: #efb3ab; --info-line: #c6d8f4;
    --open: #17703f; --open-tint: #e3f3ea; --open-ink: #17543a; --hold: #8a5300; --hold-tint: #fbefd6; --hold-ink: #6b4300;
    --closed: #b42318; --closed-tint: #fbe5e2; --closed-ink: #7a160d; --info-tint: #eaf2fb;
  }
  :root[data-theme='dark'] a { color: inherit; }
}
:root[data-theme='dark'] .toast { border: 1px solid var(--line-strong); }

/* The try page's code step: six digits, spaced so they're easy to check against the email. */
.code-input { font-size: 1.5rem; letter-spacing: 0.4em; font-variant-numeric: tabular-nums; max-width: 12ch; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Terrain park: where you are while dropping pins, and how close the GPS is. */
.gps-ring { stroke: var(--gps-ring); stroke-width: 1.5; fill: var(--gps-ring); fill-opacity: 0.12; }
.gps-dot { stroke: var(--white); stroke-width: 3; fill: var(--gps-dot); fill-opacity: 1; }
.gps-line { font-weight: 700; }

/* Asset map: points as coloured dots (by system), the layer list with swatches, and drag handles when reshaping */
.amap-dot-wrap { background: none; border: 0; }
.amap-dot { display: block; width: 18px; height: 18px; margin: 4px; border-radius: 50%; background: var(--c); border: 3px solid var(--white); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.amap-dot.off { background: var(--white); border-color: var(--c); border-style: dashed; }
.amap-swatch { display: inline-block; width: 14px; height: 14px; border-radius: var(--radius-xs); background: var(--c); vertical-align: -2px; }
.amap-legend { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.amap-legend label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; cursor: pointer; }
.amap-handle { background: var(--white); border: 3px solid var(--board-bg); border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }

/* Patrol menu (2026.10.32): New case always in the header; on phones the five sections fill the width and every page in
   a section is a large wrapped button, so nothing is hidden off the edge and gloved fingers hit their target. */
.patrol-head { flex-wrap: wrap; align-items: center; }
.patrol-new { margin-left: auto; min-height: 44px; font-size: 1rem; gap: 6px; }
.patrol-new span { font-size: 1.35rem; line-height: 1; }
@media (min-width: 901px) { .fab[data-act='new-case'] { display: none; } }
@media (max-width: 900px) {
  .patrol-head { gap: 10px; }
  .patrol-head h1 { flex: 1 1 auto; }
  .patrol-new { margin-left: 0; }
}

/* ---- patrol report check and fill in from the story */
.report-check { border-left: 4px solid var(--hold); background: var(--hold-tint); border-radius: var(--radius); padding: 10px 14px; }
.report-check > summary { cursor: pointer; min-height: 32px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.report-check > summary .muted { font-size: 0.9em; }
.check-items { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.check-items li { line-height: 1.35; }
.check-why { display: block; color: var(--muted); font-size: 0.92em; margin-top: 2px; }
.story-fill { margin-top: 6px; }
.fill-group { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.fill-group legend { font-weight: 700; margin-bottom: 4px; }
.fill-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; min-height: 44px; }
.fill-row input { width: 22px; height: 22px; margin: 2px 0 0; }
.fill-row:has(input:not(:checked)) { opacity: 0.6; }
.fill-text { display: grid; gap: 2px; }
.fill-value { font-size: 1.05em; }
.fill-quote { color: var(--muted); font-style: italic; font-size: 0.92em; }

/* ---- programs in sessions: a card per weekday, the lesson dates as a strip */
.pdays { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pday { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--snowpack, transparent); color: inherit; text-decoration: none; min-height: 44px; }
.pday:hover, .pday:focus-visible { border-color: var(--line-strong); box-shadow: 0 0 0 2px var(--line); }
.pday-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pday-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.pday-time { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.pday-count b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pday-wait { color: var(--hold, var(--muted)); font-weight: 700; }
.pday-bar { height: 8px; border-radius: var(--radius-xs); background: var(--line); overflow: hidden; margin-top: 6px; }
.pday-bar i { display: block; height: 100%; background: var(--open); }
.pday.is-full .pday-bar i { background: var(--hold); }
.pdates { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pdate { display: inline-block; font: inherit; font-size: 0.82rem; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent; color: inherit; font-variant-numeric: tabular-nums; }
button.pdate { cursor: pointer; min-height: 36px; min-width: 56px; }
.pdate.is-reserve { border-style: dashed; color: var(--muted); }
.pdate.is-makeup { border-color: var(--open); }
.pdate.is-off { text-decoration: line-through; color: var(--muted); border-color: var(--line); opacity: 0.8; }
.pterm h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.daypick { display: flex; flex-wrap: wrap; gap: 8px; }
.daypick-item { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 12px; min-height: 44px; cursor: pointer; font-weight: 700; }
.daypick-item:has(input:checked) { background: var(--sel-bg, var(--line)); }
.plain-set { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 8px; }
.plain-set legend { font-weight: 700; padding: 0 4px; }
.plevel + .plevel { border-top: 1px solid var(--line); padding-top: 10px; }
.attend { display: grid; gap: 4px; }
.prog-sell { padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 8px; }
.prog-sell-box { margin-bottom: 14px; }
.ptype-head { display: flex; align-items: baseline; gap: 8px; font-size: 1.15rem; margin: 14px 0 0; }
.ptypes { display: grid; gap: 6px; }
.ptype { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ptype.is-hidden b { color: var(--muted); }
.pday-disc { justify-self: start; font-size: 0.8rem; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); }
.care-flag { display: inline-block; font-size: 0.82rem; font-weight: 700; color: var(--hold-ink, var(--hold)); background: var(--hold-tint); border-radius: var(--radius-sm); padding: 1px 6px; }

/* ---------- the assistant's Ask panel ---------- */
.ask-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); z-index: 45; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-strong); box-shadow: -8px 0 24px rgba(14, 38, 50, .14); }
.ask-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.ask-panel h2 { margin: 0; font-size: 1.25rem; }
.ask-intro { margin: 0 16px 8px; color: var(--quiet); font-size: .875rem; }
.ask-log { flex: 1; overflow-y: auto; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.ask-a { border-top: 1px solid var(--line); padding-top: 12px; }
.ask-q { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.ask-text p { margin: 0 0 8px; line-height: 1.5; }
.ask-text ol, .ask-text ul { margin: 0 0 8px; padding-left: 22px; line-height: 1.5; }
.ask-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ask-links .btn { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ask-meta { margin: 4px 0; font-size: .8125rem; color: var(--quiet); }
.ask-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.ask-rate { background: none; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 10px; font: inherit; font-size: .8125rem; color: var(--quiet); cursor: pointer; min-height: 32px; }
.ask-rate[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: var(--surface-2); }
.ask-escalate { width: 100%; display: grid; gap: 6px; margin-top: 6px; }
.ask-escalate p { margin: 0; font-size: .875rem; color: var(--quiet); }
.ask-sent { margin: 6px 0 0; color: var(--open-ink); font-size: .875rem; }
.ask-starters { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ask-chip { background: var(--info-tint); border: 1px solid transparent; border-radius: var(--radius-md); padding: 8px 12px; font: inherit; font-size: .9375rem; color: var(--ink); text-align: left; cursor: pointer; }
.ask-chip:hover { border-color: var(--link); }
.ask-box { display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px 16px; border-top: 1px solid var(--line); }
.ask-box textarea { flex: 1; resize: none; min-height: 44px; font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field); color: var(--ink); }
@media (min-width: 1200px) { body.asking .frame { margin-right: 400px; } }
@media (max-width: 900px) { .ask-panel { top: auto; height: 85vh; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: var(--radius-lg) var(--radius-lg) 0 0; } }
.help input[type="checkbox"] { width: auto; min-height: 0; margin-right: 8px; }
.help .check { display: flex; align-items: center; }
.locate-go { width: 100%; min-height: 64px; font-size: 1.25rem; }

/* ---------- photos on a case ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-tile { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: inherit; }
.photo-tile img { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--surface-2); }
.photo-none { height: 120px; display: grid; place-items: center; background: var(--surface-2); color: var(--quiet); font-size: .875rem; }
.photo-cap { padding: 2px 8px 8px; font-size: .8125rem; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-view img { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto; border-radius: var(--radius); }
.photo-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.photo-facts dt { font-weight: 600; }
.photo-facts dd { margin: 0; min-width: 0; }
.photo-facts .hash { font-size: .75rem; word-break: break-all; }
.steps-row { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; }
.steps-row input:not([type=checkbox]) { min-width: 0; }
.steps-rule input { max-width: 120px; }
.locate-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.steps-row > .row { flex-wrap: nowrap; align-items: center; }
.steps-row > .row > input { flex: 2 1 auto; width: auto; min-width: 0; }
.steps-row > .row > select { flex: 1 1 170px; width: auto; }
.steps-rule { align-items: center; }
.ins-item .row input[type="number"], .ins-item .row input[type="date"] { width: auto; max-width: 200px; flex: 0 1 200px; }
@media (max-width: 600px) { .steps-row > .row { flex-wrap: wrap; } .steps-row > .row > input { flex-basis: 100%; } }
.steps-mini { display: grid; gap: 2px; font-size: .8125rem; color: var(--quiet); }

/* ---------- demo page: "Is this you?" ---------- */
.area-map { width: 100%; max-width: 420px; aspect-ratio: 4 / 3; background: var(--area-map-bg); border-radius: var(--radius); border: 1px solid var(--line-strong); }
.area-map path { stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.area-map .area-green { stroke: var(--run-green); }
.area-map .area-blue { stroke: var(--run-blue); }
.area-map .area-black, .area-map .area-double_black { stroke: var(--run-black); }
.area-map .area-park { stroke: var(--run-park); }
.area-map .area-lift { stroke: var(--run-lift); stroke-dasharray: 5 4; stroke-width: 2; }
.area-choice { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; width: 100%; }

/* ---------------------------------------------------------------- Patrol > Admin > Report requirements */
.req-page { padding-bottom: 96px; }
.req-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.req-preset { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.req-preset h4 { margin: 0; display: flex; gap: 8px; align-items: center; }
.req-preset p { margin: 0; color: var(--quiet); flex: 1; }
.req-types { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.req-types button[aria-pressed='true'] { background: var(--sel-bg, var(--ink)); color: var(--sel-ink); }
.req-count { font-weight: 800; opacity: .85; }
.req-section > summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 700; padding: 2px 0; }
.req-rows { display: flex; flex-direction: column; margin-top: 8px; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 6px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.req-row select { min-height: 40px; width: 100%; }
.req-row[data-level='submit'] .req-label { font-weight: 700; }
.req-row[data-level='approve'] .req-label { font-weight: 600; }
.req-row[data-level='off'] .req-label { color: var(--quiet); }
.req-label { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.req-when-toggle { font: inherit; font-size: .8125rem; font-weight: 600; border: none; background: none; padding: 2px 0; color: var(--quiet); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.req-when-toggle:disabled { text-decoration: none; cursor: default; }
.req-when-toggle[hidden] { display: none; }
.req-copy { width: auto; min-width: 180px; }
.req-when { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0 2px; }
.req-when[hidden] { display: none; }
.req-cond { font: inherit; font-size: .875rem; font-weight: 600; min-height: 34px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--quiet); cursor: pointer; }
.req-cond[aria-pressed='true'] { background: var(--snowpack); border-color: var(--ink); color: var(--ink); }
.req-cond:disabled { cursor: default; }
.req-diff summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.req-savebar { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
.req-savebar[hidden] { display: none; }
.req-savebar input { min-width: 220px; flex: 1; }
@media (max-width: 640px) {
  .req-row { grid-template-columns: 1fr; }
  .req-types { flex-direction: column; width: 100%; }
  .req-types button { border-right: none; border-bottom: 1px solid var(--line-strong); text-align: left; }
}
/* report requirements on the case: the level of each field, what is left, N/A with a reason */
.req-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: var(--radius-pill); font-size: .6875rem; line-height: 1.5; font-weight: 700; vertical-align: 1px; border: 1px solid var(--line-strong); color: var(--quiet); white-space: nowrap; }
.req-tag[data-level='submit'] { border-color: var(--req-submit); color: var(--req-submit); }
.req-tag[data-level='approve'] { border-color: var(--req-approve); color: var(--req-approve); }
/* answered: the tag goes away, and comes back if the answer is cleared */
.req-tag[data-met='true'] { display: none; }
.req-left { font-size: .8125rem; font-weight: 700; color: var(--req-submit); margin-left: 8px; }
.req-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0 0; }
.req-line.done { color: var(--quiet); }
.na-line { display: block; margin-top: 4px; font-size: .875rem; }
.linkish { font: inherit; font-size: .875rem; border: none; background: none; padding: 4px 0; color: var(--link, inherit); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.na-ask { display: block; color: var(--quiet); }
/* before the patient leaves */
.leave-panel { border-left: 4px solid var(--req-submit); }
.leave-panel h3 { margin: 0 0 4px; }
.leave-item { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.leave-item:first-child { border-top: none; padding-top: 0; }
.leave-do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.leave-do input { flex: 1 1 180px; min-height: 44px; }
.leave-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.leave-reasons[hidden] { display: none; }
.review-gaps h3 { font-size: 1rem; margin: 4px 0; }
.record-gaps { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 16px; }
.record-gaps h3 { font-size: 1rem; margin: 2px 0 4px; }
.record-gaps ul { margin: 0; padding-left: 20px; }
@media print { .record-gaps { break-inside: avoid; } }

/* Patrol crews: coverage chips (filled of needed), the crew cards, the coming weeks, and sign-ups waiting */
.crew-chip { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font: inherit; font-size: .75rem; line-height: 1.3; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: inherit; text-align: left; }
button.crew-chip { cursor: pointer; }
button.crew-chip:hover { border-color: currentColor; }
.crew-chip b { font-weight: 600; }
.crew-chip span { font-variant-numeric: tabular-nums; }
.crew-chip .cc-miss { flex-basis: 100%; font-weight: 600; }
.crew-chip[data-tone='good'] { background: var(--ok-tint); border-color: var(--open-line); color: var(--open); }
.crew-chip[data-tone='short'] { background: var(--hold-tint); border-color: var(--hold-line); color: var(--hold); }
.crew-chip[data-tone='critical'] { background: var(--alert-tint); border-color: var(--closed-line); color: var(--alert); }
.crew-chip[data-tone='none'] { border-style: dashed; color: var(--muted); }
.crew-chips { margin: 4px 0 10px; }
.sg-crews .sg-cell { align-content: start; }
.shift-block .sb-noshow { justify-self: start; font-size: .6875rem; font-weight: 600; color: var(--alert); background: var(--alert-tint); border-radius: var(--radius-pill); padding: 0 6px; }
.crew-list { display: grid; gap: 12px; margin: 12px 0 24px; }
.crew-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.crew-main h3 { margin: 0 0 4px; }
.crew-main p { margin: 2px 0; }
.crew-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.crew-days { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.crew-days li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: start; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.crew-days li.is-today { background: var(--ok-tint); }
.cd-date { font-variant-numeric: tabular-nums; padding-top: 2px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.role-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.role-row { display: grid; grid-template-columns: 2fr 80px 1.3fr 1.3fr auto; gap: 8px; align-items: end; }
.member-list { display: grid; gap: 6px; max-height: 50vh; overflow: auto; }
.member-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.signup-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.signup-row { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .crew-card { grid-template-columns: 1fr; }
  .crew-actions { flex-direction: row; flex-wrap: wrap; }
  .crew-days li { grid-template-columns: 1fr; gap: 4px; }
  .role-row { grid-template-columns: 1fr 1fr; }
}

/* Patrol report: the mountain's records at the time, who was told, and the lift */
.cond-box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 10px 14px; margin: 8px 0 12px; }
.cond-box h3, .lift-box h3 { margin: 0; font-size: .9375rem; }
.cond-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0; }
.cond-list dt { font-weight: 600; }
.cond-list dd { margin: 0; }
.lift-box { margin: 8px 0 12px; display: grid; gap: 6px; }
.lift-box .row select { min-width: 12rem; }
.contact-chips .stage small { display: block; font-weight: 400; }
.timeline li.waiting { opacity: .75; font-style: italic; }
@media (max-width: 640px) { .cond-list { grid-template-columns: 1fr; } .cond-list dd { margin-bottom: 6px; } }
.gear-list > li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.gear-facts { margin: 2px 0; padding-left: 18px; font-size: .875rem; }
.gear-contract { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }

/* Lost and found */
.lf-list { display: grid; gap: 10px; }
.lf-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lf-report { grid-template-columns: 1fr auto; }
.lf-main p { margin: 0 0 4px; }
.lf-photo { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.lf-nophoto { display: grid; place-items: center; font-weight: 700; font-size: 1.5rem; color: var(--muted); }
.lf-preview { max-width: 200px; border-radius: var(--radius); }
@media (max-width: 640px) { .lf-item { grid-template-columns: 48px 1fr; } .lf-photo { width: 48px; height: 48px; } .lf-item .cover-actions { grid-column: 1 / -1; } .lf-report .cover-actions { grid-column: auto; } }

/* Patrol kits */
.kit-board { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kit-card { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); padding: 10px 12px; display: grid; gap: 4px; }
.kit-card p { margin: 0; }
.kit-card[data-standing='ready'] { border-left-color: var(--open); }
.kit-card[data-standing='check_due'] { border-left-color: var(--hold); }
.kit-card[data-standing='needs_restock'], .kit-card[data-standing='expired'], .kit-card[data-standing='not_ready'] { border-left-color: var(--alert); }
.kit-label { font-weight: 700; font-size: 1.0625rem; }
.kit-check { display: grid; gap: 6px; }
.kit-check-row { display: grid; grid-template-columns: 1fr 80px 160px; gap: 8px; align-items: center; }
.kit-item-row { display: grid; grid-template-columns: 1fr 80px auto auto; gap: 8px; align-items: center; }
.kit-contents li { padding: 4px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .kit-check-row { grid-template-columns: 1fr 70px; } .kit-check-row > :last-child { grid-column: 1 / -1; } }
.crew-chip .cc-team { font-style: italic; }
.team-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.rot-n { min-width: 1.5rem; font-weight: 600; }
.rot-row { display: grid; grid-template-columns: 2rem 1fr auto; gap: 8px; align-items: center; }

/* scene: the scene diagram (patrol-scene.js) and the witness's statement page (witness.js) */
.scene-canvas { width: 100%; max-width: 900px; aspect-ratio: 800 / 560; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--canvas); touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.scene-canvas svg { display: block; width: 100%; height: 100%; }
.scene-canvas .scene-item { cursor: grab; }
.scene-img { display: block; width: 100%; max-width: 900px; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); }
.scene-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.scene-tool { min-height: 48px; justify-content: flex-start; gap: 8px; text-align: left; }
.scene-tool[aria-pressed="true"] { outline: 3px solid var(--focus); outline-offset: 1px; }
.scene-ico { display: inline-block; min-width: 1.6em; font-weight: 700; text-align: center; }
.scene-selbar { min-height: 44px; align-items: center; gap: 8px; }
.scene-selbar:empty { display: none; }
.witness-show .qr-box { display: flex; justify-content: center; }
#page .sigpad { width: 100%; max-width: 480px; height: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); touch-action: none; }
@media (max-width: 640px) {
  /* phones: the tools sit in one row you swipe, right under the drawing, so both stay on screen */
  .scene-tools { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .scene-tool { min-height: 44px; white-space: nowrap; }
}

/* claims: claim file, documentation score, season risk report, secure links (views/claim-render.js, patrol-claim.js, patrol-risk.js, claim-share.js) */
.claim-file { max-width: 980px; margin: 0 auto; }
.cf-bar { margin-bottom: 16px; gap: 8px; }
.cf-doc { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; min-width: 0; }
.cf-head h1 { margin: 2px 0 8px; font-size: 1.6rem; line-height: 1.2; }
.cf-resort { margin: 0; font-weight: 700; color: var(--quiet); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8rem; }
.cf-basis { margin: 6px 0 0; padding: 8px 12px; border-radius: var(--radius); border-left: 5px solid var(--line-strong); background: var(--surface-2); }
.cf-basis.is-frozen { border-left-color: var(--open); background: var(--open-tint); color: var(--open-ink); }
.cf-basis.is-live { border-left-color: var(--warn-mark); background: var(--hold-tint); color: var(--hold-ink); }
.cf-hold { margin: 6px 0 0; padding: 8px 12px; border-radius: var(--radius); border-left: 5px solid var(--closed); background: var(--closed-tint); color: var(--closed-ink); }
.cf-sec { display: grid; gap: 10px; min-width: 0; break-inside: auto; }
.cf-sec > h2 { margin: 0; font-size: 1.1rem; padding-bottom: 4px; border-bottom: 2px solid var(--line-strong); }
.cf-sec h3 { margin: 4px 0; font-size: 1rem; }
.cf-sec h4 { margin: 8px 0 4px; font-size: 0.9rem; color: var(--quiet); }
.cf-kv { gap: 3px 18px; }
.cf-patient, .cf-witness { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; min-width: 0; break-inside: avoid; }
.cf-void { color: var(--closed); font-weight: 700; font-size: 0.85rem; }
.cf-list { margin: 0; padding-left: 20px; }
.cf-table table { width: 100%; }
.cf-table th, .cf-table td { padding: 6px 10px; font-size: 0.9rem; vertical-align: top; }
.cf-narrative p, .cf-statement { white-space: pre-wrap; overflow-wrap: anywhere; }
.cf-statement { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-2); }
.cf-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 3px solid var(--line-strong); display: grid; gap: 6px; }
.cf-timeline li { display: grid; grid-template-columns: 170px max-content minmax(0, 1fr); gap: 2px 12px; align-items: baseline; }
.cf-timeline time { color: var(--quiet); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.cf-timeline span { overflow-wrap: anywhere; }
.cf-timeline .cf-tl-told b { color: var(--accent-ink); }
.cf-timeline .cf-tl-report b { color: var(--open-ink); }
.cf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cf-photo { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; break-inside: avoid; display: grid; align-content: start; min-width: 0; }
.cf-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--snowpack); display: block; }
.cf-photo figcaption { display: grid; gap: 2px; padding: 8px 10px; font-size: 0.85rem; min-width: 0; }
.cf-sha { font-size: 0.72rem; overflow-wrap: anywhere; color: var(--quiet); }
.cf-nophoto { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--snowpack); color: var(--quiet); }
.cf-scene { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.cf-foot { border-top: 1px solid var(--line-strong); padding-top: 10px; font-size: 0.85rem; color: var(--quiet); }
.cf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cf-tile { display: grid; gap: 2px; align-content: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); border-top: 4px solid var(--line-strong); }
.cf-tile b { font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cf-tile span { font-size: 0.875rem; color: var(--quiet); }
.cf-tile small { font-size: 0.8rem; color: var(--quiet); }
.cf-tile.is-good { border-top-color: var(--open); }
.cf-tile.is-warn { border-top-color: var(--warn-mark); }
.cf-tile.is-bad { border-top-color: var(--closed); }
.cf-breakdowns { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cf-score-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.cf-score-num { display: grid; gap: 2px; min-width: 130px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 6px solid var(--line-strong); }
.cf-score-num b { font-size: 1.8rem; line-height: 1.1; }
.cf-score-num span { font-size: 0.85rem; color: var(--quiet); }
.cf-score-num.is-good { border-left-color: var(--open); }
.cf-score-num.is-warn { border-left-color: var(--warn-mark); }
.cf-score-num.is-bad { border-left-color: var(--closed); }
.cf-flags { padding: 8px 12px; border-radius: var(--radius); background: var(--hold-tint); color: var(--hold-ink); }
.cf-flags p { margin: 2px 0; }
.cf-flags .state { background: var(--surface); padding: 2px 8px; border-radius: var(--radius-pill); }
.cf-shares { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cf-shares > li { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; display: grid; gap: 4px; min-width: 0; }
.cf-views summary { cursor: pointer; font-size: 0.875rem; color: var(--accent-ink); }
.cf-link span { overflow-wrap: anywhere; font-size: 0.95rem; letter-spacing: 0; }
.docscore-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; display: grid; gap: 10px; }
.ds-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ds-more { margin-left: auto; color: var(--link); font-weight: 700; }
.ds-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ds-cell { display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 5px solid var(--line-strong); color: inherit; text-decoration: none; min-width: 0; }
.ds-cell:hover { border-color: var(--ink); }
.ds-cell b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.ds-cell span { font-size: 0.82rem; color: var(--quiet); }
.ds-cell.is-good { border-left-color: var(--open); }
.ds-cell.is-warn { border-left-color: var(--warn-mark); }
.ds-cell.is-bad { border-left-color: var(--closed); }
.help.cs-wide { max-width: 1000px; }
.cs-banner { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: var(--radius); background: var(--info-tint); font-size: 0.9rem; }
.cs-gate { margin-top: 32px; }
.cs-msg { margin-top: 32px; }
@media (max-width: 640px) {
  .cf-doc { padding: 14px 12px; }
  .cf-head h1 { font-size: 1.3rem; }
  .cf-timeline li { grid-template-columns: 1fr; }
  .cf-doc .cf-kv, .cf-score .cf-kv { grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); gap: 4px 12px; }
  .ds-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cf-photos { grid-template-columns: 1fr 1fr; }
}
@media print {
  .claim-file { max-width: none; }
  .cf-doc { border: 0; padding: 0; }
  .cf-photos { grid-template-columns: repeat(3, 1fr); }
  .cs-banner, .ds-more { display: none !important; }
  .cf-table { overflow: visible; }
}
li.voided > .prewrap { text-decoration: line-through; color: var(--quiet); }

/* ---- Settings area ---- */
/* Settings has its own list on the left in place of the app menu (views/settings.js sets .in-settings on <html>).
   Cards with label-left, control-right rows; a save bar that stays in view while a page has unsaved changes. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
.in-settings .rail { display: none; }
.in-settings .shell, .in-settings .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
.in-settings .main { padding: 0; max-width: none; }
.set-area { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--stick-top, 0px)); background: linear-gradient(to right, var(--surface) 263px, var(--line) 263px, var(--line) 264px, transparent 264px); }
.set-nav { padding: 18px 12px 24px; position: sticky; top: var(--stick-top, 0px); height: calc(100vh - var(--stick-top, 0px)); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.set-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.set-backapp { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: var(--radius); color: var(--ink-2); font-weight: 700; text-decoration: none; align-self: flex-start; }
.set-backapp span { font-size: 1.375rem; line-height: 1; }
.set-backapp:hover, .set-link:hover { background: var(--surface-2); }
.set-nav-title { margin: 12px 10px 4px; font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', sans-serif; font-size: 1.75rem; line-height: 1.1; font-weight: 700; }
.set-group-name { padding: 14px 10px 4px; font-size: 0.8125rem; font-weight: 700; color: var(--quiet); }
.set-link { display: flex; align-items: center; min-height: 38px; padding: 6px 10px; border-radius: var(--radius); color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.set-link[aria-current='page'] { background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent-line); }
.set-main { min-width: 0; padding: 26px 36px 0; max-width: 1060px; width: 100%; display: flex; flex-direction: column; }
.set-head { margin-bottom: 20px; align-items: flex-end; }
.set-head-text { display: grid; gap: 4px; min-width: 0; flex: 1 1 360px; }
.set-head h1 { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', sans-serif; font-size: 2.125rem; line-height: 1.05; }
.set-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; color: var(--quiet); }
.set-crumbs li + li::before { content: '/'; margin-right: 6px; }
.set-crumbs a { color: inherit; }
.set-line { color: var(--quiet); }
.set-back { display: none; }
.set-open { font-weight: 700; text-decoration: none; }
.set-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 32px; align-content: start; }
.set-body > .set-body { padding-bottom: 0; }
.set-panels { gap: 20px; }
.set-body .panel { border-radius: var(--radius-lg); padding: 18px 20px; }
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.set-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.set-card-head h2 { font-size: 1.0625rem; }
.set-card-intro { padding: 14px 20px 0; color: var(--quiet); }
.set-rows > .set-card-intro:last-child { padding-bottom: 16px; }
.set-rows > .table-wrap { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0; }
/* A table in a settings card (Logins) stays inside the card: its action buttons wrap onto a second line rather than
   pushing the row past the edge, and anything still wider scrolls inside the card, never the page. */
.set-card > .table-wrap { overflow-x: auto; max-width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0; }
.set-card > .table-wrap td.actions { white-space: normal; }
.set-card > .table-wrap td.actions .btn { white-space: nowrap; margin: 2px 0 2px 6px; }
.set-card > .table-wrap td.actions .btn + .btn { margin-left: 6px; }
.set-rows > .callout { margin: 14px 20px 0; }
.set-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); }
.set-rows > .set-row:first-child, .set-rows > .set-card-intro + .set-row { border-top: 0; }
.set-row-text { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.set-label { font-weight: 700; }
.set-hint { color: var(--quiet); font-size: 0.875rem; line-height: 1.4; }
.set-url { overflow-wrap: anywhere; }
.set-row-control { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.set-row-control input:not([type=checkbox]):not(.set-num), .set-row-control select { min-width: 240px; max-width: 100%; }
.set-row.wide { flex-direction: column; align-items: stretch; }
.set-row.wide .set-row-text { flex: none; }
.set-row.wide .set-row-control { flex: none; }
.set-row.wide .set-row-control > * { width: 100%; }
.set-amount { display: inline-flex; align-items: center; gap: 8px; }
.set-unit { color: var(--quiet); white-space: nowrap; }
input.set-num { width: 88px; min-width: 0; text-align: right; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 4px 0; align-items: end; }
.set-grid .set-row { flex-direction: column; align-items: flex-start; gap: 6px; border-top: 0; padding: 12px 20px; }
.set-grid .set-row-text { flex: none; }
.set-preview { margin: 4px 20px 18px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--info-tint); color: var(--ink-2); font-size: 0.875rem; }
.set-section-body { padding: 16px 20px; }
.set-section-body > .section:first-child { margin-top: 0; }
.set-note { color: var(--quiet); font-size: 0.875rem; }
.set-lead { color: var(--ink-2); }
.set-empty { color: var(--quiet); padding: 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }
.set-list { margin: 0; padding: 14px 20px 16px 40px; display: grid; gap: 6px; }
.set-callout { margin: 14px 20px 0; display: block; }
.set-form { padding: 16px 20px; }
input.switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: var(--radius-lg); background: var(--line-strong); border: 0; position: relative; cursor: pointer; margin: 0; flex: none; transition: background-color .15s; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: var(--radius-pill); background: var(--white); box-shadow: 0 1px 2px rgba(14, 38, 50, .3); transition: left .15s; }
input.switch:checked { background: var(--accent-line); }
input.switch:checked::after { left: 23px; }
input.switch:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }
.set-savebar { position: sticky; bottom: 0; z-index: 20; margin: 0 -36px; padding: 12px 36px; background: var(--spruce); color: var(--white); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); }
:root[data-theme='dark'] .set-savebar { background: var(--savebar-dark); border-top: 1px solid var(--line-strong); }
.set-savebar-text { font-weight: 700; }
.set-savebar .set-undo { background: transparent; color: var(--white); border-color: var(--on-dark-line); }
.set-savebar .set-undo:hover { background: rgba(255, 255, 255, .08); }
.set-savebar .set-save, .set-savebar .set-save:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.set-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.set-role { min-height: 44px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.set-role[aria-checked='true'] { border-color: var(--link); background: var(--accent-tint); color: var(--accent-ink); font-weight: 700; }
.set-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.set-menu-list { list-style: none; margin: 0; padding: 6px 0; }
.set-menu-list li { display: flex; align-items: center; gap: 10px; padding: 6px 18px; min-height: 52px; }
.set-move { display: flex; gap: 4px; }
.set-icon-btn { width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--quiet); cursor: pointer; font-size: 0.6875rem; }
.set-icon-btn:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); }
.set-icon-btn:disabled { opacity: .35; cursor: default; }
.set-menu-name { flex: 1; font-weight: 700; display: grid; gap: 0; min-width: 0; }
.set-menu-name.plain { font-weight: 400; }
.set-menu-note { font-size: 0.75rem; font-weight: 400; color: var(--quiet); }
.set-menu-foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; justify-content: space-between; padding: 16px 18px; }
.set-menu-foot select { min-width: 220px; }
.set-menu-foot > p { flex: 1 1 280px; }
@media (max-width: 860px) {
  .in-settings .main { padding: 0 0 120px; }
  .set-area { display: block; min-height: 0; background: none; }
  .set-area.is-home .set-main, .set-area:not(.is-home) .set-nav { display: none; }
  .set-nav { position: static; height: auto; border: 0; background: transparent; padding: 12px 16px 24px; }
  .set-nav ul { gap: 6px; }
  .set-link { min-height: 52px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
  .set-backapp { min-height: 44px; }
  .set-main { padding: 12px 16px 0; }
  .set-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; align-self: flex-start; }
  .set-crumbs { display: none; }
  .set-head h1 { font-size: 1.875rem; }
  .set-row { padding: 14px 16px; }
  .set-card-head, .set-card-intro, .set-section-body, .set-form { padding-left: 16px; padding-right: 16px; }
  .set-row-control input:not([type=checkbox]):not(.set-num), .set-row-control select { min-width: 0; width: 100%; }
  .set-row-control { flex: 1 1 100%; }
  .set-row:has(> .set-row-control > input.switch) { flex-wrap: nowrap; }
  .set-row:has(> .set-row-control > input.switch) .set-row-text { flex: 1 1 auto; }
  .set-row-control:has(> input.switch) { flex: 0 0 auto; }
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .set-savebar { margin: 0 -16px; padding: 10px 16px; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .set-savebar .row { width: 100%; }
  .set-savebar .btn { flex: 1; }
  .set-icon-btn { width: 44px; height: 44px; }
  .set-menu-list li { padding: 6px 16px; }
  .set-two { grid-template-columns: minmax(0, 1fr); }
}
.set-menus { gap: 18px; }
.set-body [role='tabpanel'] > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

/* ---- App screens (menus redesign) ---- */
/* Patrol: the section is the page title; Patrol settings and New case sit at the right of the header. */
.page-head.patrol-head { justify-content: space-between; align-items: flex-end; }
.patrol-head .page-note { margin: 2px 0 0; color: var(--quiet); }
.patrol-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.patrol-actions .btn { min-height: 40px; }
.psec-waiting { color: var(--hold-ink); }
@media (max-width: 720px) {
  .patrol-actions { width: 100%; }
  .patrol-actions .btn { min-height: 44px; flex: 1 1 auto; justify-content: center; }
}

/* Today: big job buttons for staff, instructors, the counter and patrol (LiftPhone design). */
.jobs-host:empty { display: none; }
.today-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 var(--sp-5, 24px); }
.job-btn { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 124px; padding: 16px; border-radius: var(--radius-xl);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm, none); }
.job-btn:hover { border-color: var(--link); color: var(--ink); }
.job-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.job-btn .ico { color: var(--link); }
.job-btn .job-text { display: flex; flex-direction: column; gap: 2px; }
.job-btn strong { font-size: 1.0625rem; }
.job-btn .job-text span { font-size: 0.8125rem; color: var(--quiet); }
.job-btn.is-first { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.job-btn.is-first .ico, .job-btn.is-first .job-text span { color: var(--on-accent); }
.job-btn.is-first .job-text span { opacity: 0.88; }
.job-btn.is-first:hover { background: var(--accent-hover); color: var(--on-accent); }
@media (max-width: 720px) { .today-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Settings cards drawn by the apps: a label on the left, its switch on the right. */
.app-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.app-setting-row label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.app-setting-row input[type='checkbox'] { width: 22px; height: 22px; flex: none; accent-color: var(--link); }
.partner-rule { padding: 8px 0; border-bottom: 1px solid var(--line); }
.partner-rule p { margin: 2px 0 0; }

/* ---- Attractions ---- */
[data-dept='attractions'] { --dept: #8a4b0f; }
:root[data-theme='dark'] [data-dept='attractions'] { --dept: #e0a35c; }
.attr-name { display: flex; flex-direction: column; }
.attr-note { display: block; max-width: 28ch; }
tr.attr-blocked td { background: var(--closed-tint); }
.attr-section .seg { width: fit-content; max-width: 100%; }
.attr-section .seg button { min-height: 44px; }
.attr-section .seg button:disabled[data-tone='good'] { text-decoration: line-through; }
.attr-downtime { margin-top: 16px; }
.attr-check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attr-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.attr-item.is-pass { border-color: var(--open); background: var(--open-tint); }
.attr-item.is-fail { border-color: var(--closed); background: var(--closed-tint); }
.attr-item > input, .attr-item > .attr-note-slot, .attr-item > small { grid-column: 1 / -1; }
.attr-item-label { font-weight: 700; color: var(--ink); }
.attr-item-act { display: flex; gap: 6px; }
.attr-item-act .btn { min-height: 44px; min-width: 72px; }
.attr-item-act .btn[aria-pressed='true'][data-tone='good'] { background: var(--open); border-color: var(--open); color: var(--surface); }
.attr-item-act .btn[aria-pressed='true'][data-tone='bad'] { background: var(--closed); border-color: var(--closed); color: var(--surface); }
.attr-checks-field { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0; }
.attr-checks-field legend { font-weight: 700; padding: 0 4px; }
.attr-checks-edit { margin: 0; padding-left: 1.5em; display: grid; gap: 6px; }
.attr-checks-edit li { display: flex; gap: 6px; align-items: center; }
.attr-checks-edit li input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.attr-staff { padding: 12px 0; border-bottom: 1px solid var(--line); }
.attr-staff:last-child { border-bottom: none; }
.attraction-box { margin-top: 12px; }
@media (max-width: 640px) {
  .attr-item { grid-template-columns: minmax(0, 1fr); }
  .attr-item-act .btn { flex: 1 1 0; }
  .attr-checks-edit li { flex-wrap: wrap; }
  .attr-checks-edit li input { flex-basis: 100%; }
}

/* ---- Checklists ---- */
/* The case panel: each item is one full-width tap target (bedside, gloves, a phone in the cold). */
.checklist .cl-items { margin: 4px 0 0; }
.checklist .cl-items li.cl-item { padding: 0; }
.checklist .cl-check { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 4px; cursor: pointer; flex-wrap: wrap; }
.checklist .cl-check input { width: 28px; height: 28px; flex: none; accent-color: var(--open); }
.checklist .cl-label { flex: 1 1 200px; min-width: 0; }
.checklist .cl-item.done .cl-label { color: var(--quiet); }
.checklist .cl-stamp { font-size: 0.8125rem; color: var(--quiet); margin-left: 40px; flex-basis: 100%; }
.checklist .cl-waiting { color: var(--hold-ink); font-weight: 700; }
.checklist .cl-title { flex: 1 1 auto; min-width: 0; }
.cl-cards { gap: 10px; }
.btn.cl-add { min-height: 48px; padding: 8px 18px; }
.cl-filter { width: 100%; min-height: 44px; }
.cl-pick { max-height: 60vh; overflow-y: auto; margin: 0; }
.cl-pick li { padding: 0; border-bottom: 0; }
.cl-pick-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 10px 14px; margin: 4px 0;
  font: inherit; text-align: left; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.cl-pick-btn:hover { border-color: var(--link); }
.cl-pick-btn .cl-for { color: var(--ink-2); }
/* Settings, Patrol, Checklists */
.cl-setup .cl-group h3 { margin: 8px 0 4px; }
.cl-rows { margin: 0; }
.cl-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; }
.cl-row-text { display: grid; gap: 2px; flex: 1 1 280px; min-width: 0; }
.cl-row-when { color: var(--ink-2); }
.cl-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-row-actions .btn { min-height: 44px; }
.cl-archived summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.cl-preview { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.cl-edit-field > .btn { justify-self: start; min-height: 44px; }
.cl-edit-items { margin: 4px 0 8px; padding-left: 22px; display: grid; gap: 6px; }
.cl-edit-item { display: flex; gap: 6px; align-items: center; }
.cl-edit-item input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.cl-edit-item .btn { min-height: 44px; min-width: 44px; }
@media (max-width: 640px) {
  .cl-row-actions { width: 100%; justify-content: flex-end; }
  .cl-edit-item { flex-wrap: wrap; }
  .cl-edit-item input { flex-basis: 100%; }
}

/* ---- Activities ---- */
/* Sell, Activities tab: an attraction's times as big buttons with places left, and guests by type. */
.act-about p { margin: 4px 0; }
.act-limits { padding: 8px 12px; border-left: 4px solid var(--hold); background: var(--hold-tint); color: var(--hold-ink); border-radius: var(--radius); }
.act-product { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.act-product h3 { margin: 0; font-size: 1rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.slot-btn { display: grid; gap: 2px; justify-items: start; min-height: 56px; padding: 8px 12px; font: inherit; text-align: left; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.slot-btn small { color: var(--quiet); }
.slot-btn:hover:not(:disabled), .slot-btn:focus-visible { border-color: var(--link); }
.slot-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.slot-btn.on { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.slot-btn.on small { color: var(--sel-ink); }
.slot-btn.full, .slot-btn:disabled { cursor: not-allowed; color: var(--quiet); background: var(--snowpack); border-style: dashed; }
.act-guests { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.act-guest { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.act-guest .qty .btn { min-width: 44px; min-height: 44px; }
.act-add { align-items: center; }
/* Checkout: the rider's limits box beside "who is it for". */
.who-limits .limits-ok { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; padding: 6px 8px; border: 1px solid var(--hold); border-radius: var(--radius); background: var(--hold-tint); color: var(--hold-ink); }
.who-limits .limits-ok input { width: 22px; height: 22px; flex: none; accent-color: var(--link); }
.who-limits .limits-ok small { display: block; color: var(--hold-ink); }
/* Products and prices, and Settings: the activity setup and the time-slot generator. */
.act-setup, .act-includes { display: grid; gap: 8px; }
.act-for { font-weight: 600; }
.slot-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slot-fill input { width: auto; max-width: 8rem; }
.gate-place { margin-bottom: 4px; }
@media (max-width: 720px) {
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-btn { min-height: 60px; }
  .act-add .btn { width: 100%; min-height: 48px; }
}

/* ---- Ski school: My day, safety flags and the safety fields (round 2, Track CORE) ---- */
.myday-bar { align-items: center; flex-wrap: wrap; gap: 8px; }
.myday-bar input[type=date] { width: auto; min-height: 44px; }
.myday-day { margin: 4px 0 0; }
.myday-card { border-left: 4px solid var(--accent-line); }
.myday-card.program { border-left-color: var(--open); }
.myday-head { display: grid; gap: 2px; }
.myday-time { font-size: 1.15rem; }
.myday-title { font-weight: 600; }
.myday-roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.myday-student { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.myday-face { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--quiet); overflow: hidden; }
.myday-face img { width: 100%; height: 100%; object-fit: cover; }
.myday-who { display: grid; gap: 2px; min-width: 0; }
.myday-who a { overflow-wrap: anywhere; }
.myday-actions { display: grid; gap: 6px; justify-items: end; }
.myday-marks { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.myday-marks .btn, .myday-actions .btn { min-height: 44px; }
.myday-pay { font-weight: 600; color: var(--ink-2); }
.myday-count { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.myday-count p { margin: 0; }
.myday-flags { gap: 6px; flex-wrap: wrap; margin: 2px 0; }
.flag { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px; border-radius: var(--radius-pill); font-weight: 700; font-size: .9rem; cursor: pointer; border: 1.5px solid; }
.flag span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: .8rem; color: var(--on-fill); }
.flag.allergy { background: var(--closed-tint); color: var(--closed-ink); border-color: var(--closed); }
.flag.allergy span { background: var(--closed); }
.flag.medical { background: var(--hold-tint); color: var(--hold-ink); border-color: var(--hold); }
.flag.medical span { background: var(--hold); }
fieldset.safety { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
fieldset.safety legend { font-weight: 700; padding: 0 4px; }
@media (max-width: 720px) {
  .myday-student { grid-template-columns: 40px minmax(0, 1fr); }
  .myday-face { width: 40px; height: 40px; }
  .myday-actions { grid-column: 1 / -1; justify-items: stretch; grid-template-columns: 1fr 1fr; }
  .myday-actions > .myday-marks { grid-column: 1 / -1; }
  .myday-marks { justify-content: stretch; }
  .myday-marks .btn { flex: 1 1 0; }
}

/* ---- ski school: check-in, the lineup board and lesson labels (round 2, Track LINEUP) */
.lu-scan-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.lu-scan-row .lu-scan { flex: 1 1 260px; min-height: 52px; font-size: 1.25rem; }
.lu-list { display: grid; gap: 6px; margin: 0; padding: 0; }
.lu-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lu-row.in { border-left: 5px solid var(--open); }
.lu-who { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.lu-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lu-tools { flex-wrap: wrap; align-items: end; }
.lu-head h2 { margin: 0; }
.lu-board { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); align-items: start; }
.lu-col { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px; display: grid; gap: 8px; min-height: 140px; align-content: start; }
.lu-col.attention { border-left: 4px solid var(--hold); }
.lu-col.over { outline: 3px dashed var(--accent-line); outline-offset: -3px; }
.lu-col header { display: grid; gap: 4px; }
.lu-col select { width: 100%; }
.lu-col .lu-levels { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 6px; align-items: center; }
.lu-col .lu-levels select { min-width: 0; }
.lu-waiting { background: var(--surface-2); border-style: dashed; }
.lu-chips { display: grid; gap: 6px; margin: 0; padding: 0; }
.lu-chips > li.lu-chip { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); cursor: grab; }
.lu-chips > li.lu-chip.in { border: 1px solid var(--open); border-left-width: 4px; }
.lu-list > li.lu-row { padding: 10px 12px; border: 1px solid var(--line); }
.lu-list > li.lu-row.in { border-left: 5px solid var(--open); }
.lu-chip.dragging { opacity: 0.5; }
.lu-chip:focus-visible { outline: 3px solid var(--focus); }
.lu-chip-name { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-chip-meta { font-size: 0.8125rem; color: var(--muted); }
.lu-chip-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--closed); color: var(--white); font-weight: 700; font-size: 0.8125rem; }
.lu-empty { margin: 0; }
.lu-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.35); vertical-align: middle; }
.lu-host:fullscreen { background: var(--snowpack); padding: 24px; overflow: auto; }
.lu-host:fullscreen .lu-chip { font-size: 1.125rem; }
.c-red { background: var(--tag-red); } .c-blue { background: var(--tag-blue); } .c-green { background: var(--tag-green); } .c-orange { background: var(--tag-orange); } .c-purple { background: var(--tag-purple); }
.c-yellow { background: var(--tag-yellow); } .c-pink { background: var(--tag-pink); } .c-teal { background: var(--tag-teal); } .c-brown { background: var(--tag-brown); } .c-gray { background: var(--tag-gray); }
.label-roll { display: grid; gap: 10px; justify-items: center; }
.label-sheet { display: grid; grid-template-columns: repeat(3, 2.4in); gap: 0.1in; justify-content: center; }
.lesson-label { width: 2.25in; height: 1.25in; padding: 0.06in 0.08in; box-sizing: border-box; display: grid; grid-template-rows: auto auto auto 1fr; gap: 1px; overflow: hidden; font-family: Arial, Helvetica, sans-serif; border: 1px dashed var(--black); border-radius: 0; }
.lesson-label .ll-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.lesson-label .ll-name { font-size: 15pt; line-height: 1.05; }
.lesson-label .ll-allergy { font-size: 7pt; font-weight: 700; border: 1.5px solid var(--black); padding: 0 3px; }
.lesson-label .ll-mid { display: flex; gap: 6px; align-items: center; font-size: 8pt; font-weight: 700; }
.lesson-label .ll-color { color: var(--black); padding: 0 4px; border: 1px solid var(--black); }
.lesson-label .ll-small { font-size: 7pt; line-height: 1.1; }
.lesson-label .ll-code { display: flex; align-items: end; gap: 4px; font-size: 6pt; }
.lesson-label .ll-code svg { height: 0.28in; width: auto; max-width: 1.6in; }
@page lesson-roll { size: 2.25in 1.25in; margin: 0; }
@media print {
  .lesson-label.roll { page: lesson-roll; border: 0; margin: 0; break-after: page; }
  .label-sheet .lesson-label { margin: 0; break-inside: avoid; }
}

/* ---- Sell, Lessons: one day at a time, by age and level (round 2, Track LINEUP) */
.sl-find { display: grid; gap: 6px; margin-bottom: 8px; }
.sl-find input { width: 100%; }
.sl-results { gap: 4px; }
.sl-results > li { border: 0; padding: 0; }
.sl-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 8px 12px; align-items: end; }
.sl-tools .check { grid-column: 1 / -1; }
.sl-tools .field { min-width: 0; margin: 0; }
.sl-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sl-days .btn { display: inline-flex; gap: 4px; align-items: baseline; min-height: 44px; }
.sl-days .btn[aria-pressed='true'] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.sl-days .btn[aria-pressed='true'] small { color: inherit; }
.sl-list { display: grid; gap: 8px; }
.sl-card { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sl-card.unfit { opacity: 0.75; border-style: dashed; }
.sl-time { display: grid; }
.sl-time strong { font-size: 1.0625rem; }
.sl-what { display: grid; gap: 2px; min-width: 0; }
.sl-side { display: grid; gap: 4px; justify-items: end; text-align: right; }
.sl-side .btn { min-width: 72px; }
.sl-other summary { cursor: pointer; padding: 6px 0; }
.sl-other { display: grid; gap: 8px; }
.sl-student { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.who-safety { border-left: 3px solid var(--line-strong); padding-left: 10px; margin: 0 0 8px; }
.who-safety summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
@media (max-width: 560px) {
  .sl-card { grid-template-columns: 1fr auto; }
  .sl-time { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
}
@media print { .lesson-label .ll-color, .lesson-label .ll-allergy { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.sl-tools input, .sl-tools select { width: 100%; min-width: 0; box-sizing: border-box; }

/* ---- ski school families (2026.11.5, Track PARENTS): recaps to send, the waitlist, the families settings */
.recap-lesson { gap: 16px; }
.recap-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; background: var(--surface); }
.recap-card textarea { width: 100%; }
.recap-skills { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.recap-skills legend { font-weight: 700; margin-bottom: 4px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 6px 0; cursor: pointer; }
.check-row input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.recap-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.recap-photo { margin: 0; display: grid; gap: 4px; justify-items: start; }
.recap-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); background: var(--line); }
.waitlist { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.waitlist li { padding: 6px 0; border-top: 1px solid var(--line); }
.waitlist li:first-child { border-top: 0; }
.set-subhead { font-size: 1rem; margin: 16px 20px 4px; }

/* ---- Ski school pay: the pay line on My day, private requests, My pay and payroll (school-pay.js) ---- */
.pay-line { margin: 4px 0 0; }
.pay-line .pay-label { font-weight: 600; color: var(--ink); }
.pay-line .pay-note { display: block; }
.pay-top { margin-bottom: 16px; }
.pay-top-head { font-size: 1.125rem; margin: 0; }
.req-card { border-left: 4px solid var(--hold); }
.req-card .req-when { font-size: 1.0625rem; }
.req-card .req-students { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.req-card .row .btn { min-height: 44px; min-width: 96px; }
.pay-week { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.pay-week-name { flex: 1 1 12rem; }
.pay-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pay-tile { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pay-tile strong { font-size: 1.375rem; line-height: 1.2; }
.pay-filter select { max-width: 16rem; }

/* ---- Ski school, the director (round 2): weather call choices, seat fill bars, the copy result ---- */
.wx-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
.wx-choices legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.wx-choice { display: flex; gap: 10px; align-items: flex-start; min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.wx-choice input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--link); }
.wx-choice span { display: grid; gap: 2px; }
.wx-choice small { color: var(--quiet); }
.wx-choice:has(input:checked) { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--accent-line); }
.wx-choice:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.notice.good { background: var(--open-tint); border-color: var(--open); }
@media (min-width: 721px) {
  .staffing-day table { table-layout: fixed; width: 100%; }
  .staffing-day th:nth-child(1) { width: 6.5rem; }
  .staffing-day th:nth-child(2) { width: auto; }
  .staffing-day th:nth-child(n+3):nth-child(-n+6) { width: 5.5rem; }
  .staffing-day th:nth-child(7) { width: 8rem; }
  .staffing-day th:nth-child(8) { width: 8rem; }
}
.copy-days { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-day { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 6px 4px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); font-weight: 700; }
.fillbar { display: inline-block; min-width: 4.5rem; padding: 2px 6px; border-radius: var(--radius-xs); font-variant-numeric: tabular-nums; background: linear-gradient(90deg, var(--open-tint) var(--fill, 0%), transparent var(--fill, 0%)); }
@media (max-width: 720px) {
  .wx-choices { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------- 2026.11.7: Sell on a phone, the day limit, the gate's guest type */
/* On a phone the basket comes straight after the menu (before Sold today), and the Checkout bar sits above the bottom navigation. */
@media (max-width: 900px) {
  .sell-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .sell-grid > .sell-main { display: contents; }
  .sell-grid .sell-menu { order: 1; }
  .sell-grid > .sell-side { order: 2; }
  .sell-grid .sell-orders { order: 3; }
  .sell-grid .mobile-basket-bar { order: 4; }
  .sell-grid .basket-panel { position: static; }
}
@media (max-width: 860px) {
  .mobile-basket-bar:not([hidden]) { bottom: calc(68px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
}
.over-limit .field { margin-top: 8px; }
.gate-type { display: inline-block; margin-top: 6px; padding: 4px 16px; border-radius: var(--radius-md); background: var(--white); color: var(--gate-type-ink); font-size: 2.25rem; font-weight: 800; letter-spacing: .04em; }
.gate-type.flag { background: var(--gate-flag); }

/* ---- Guests round 2, Track WINDOW: the welcome back, scan to find, typed quantities, rewards in the basket, Line mode */
.guest-card { border: 1px solid var(--line); border-left: 4px solid var(--accent-line); border-radius: var(--radius); background: var(--surface-2); padding: 10px 12px; margin: 4px 0 8px; }
.guest-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.guest-say { margin: 6px 0; font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.guest-facts { margin: 0; padding-left: 18px; }
.guest-facts li { margin: 2px 0; }
.guest-badge { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--info-tint); color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.guest-rewards { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.guest-reward { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.gate-welcome { margin-top: 8px; font-size: 1.25rem; font-weight: 700; }
.find-box { display: grid; gap: 8px; }
.find-box .find-label { font-weight: 700; }
.find-input { width: 100%; min-height: 48px; font-size: 1.1rem; }
.find-results:empty { display: none; }
.find-results { display: grid; gap: 6px; }
.find-title { margin: 0; }
.find-people .picker-hit { width: 100%; text-align: left; }
.qty .qty-input, .qty-input { width: 4.5em; min-height: 40px; text-align: center; font-size: 1.05rem; }
.reward-line .line-price { color: var(--open-ink); font-weight: 700; }
.soft-missing { background: var(--hold-tint); color: var(--hold-ink); }
.change-day-row { flex-wrap: wrap; }
.receipt-send .row { flex-wrap: wrap; }
.receipt-send input[type='email'] { flex: 1 1 220px; min-width: 0; }
.line-mode { max-width: 640px; margin: 0 auto; }
.line-tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.line-tiers .btn { min-height: 48px; flex: 1 1 auto; }
.line-tiers .btn[aria-pressed='true'] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.line-qty-row { align-items: center; gap: 8px; }
.line-qty-row .btn { min-width: 48px; min-height: 48px; font-size: 1.3rem; }
.line-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.line-tile { display: grid; gap: 6px; min-height: 96px; padding: 14px; border: 2px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font-size: 1.1rem; text-align: left; cursor: pointer; }
.line-tile[aria-pressed='true'] { border-color: var(--link); background: var(--info-tint); }
.line-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.line-pay-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.line-pay-buttons .btn { min-height: 64px; font-size: 1.15rem; }
.line-pay-buttons .btn:last-child { grid-column: 1 / -1; min-height: 48px; }
@media (max-width: 480px) {
  .line-tiles { grid-template-columns: 1fr 1fr; }
  .guest-reward .btn { margin-left: auto; }
}

/* ---- Guest rewards and recaps settings (guests round 2, Track LOYALTY: guest-rewards.js) */
.set-section-body.gr-body { padding: 0; }
.gr-body > .set-row:first-of-type { border-top: 0; }
.gr-intro { margin: 0; padding: 16px 20px 4px; color: var(--muted); }
.gr-sub { margin: 0; padding: 16px 20px 4px; font-size: 1rem; border-top: 1px solid var(--line); }
.gr-body > .notice { margin: 8px 20px; }
.gr-pair { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gr-pair select { min-width: 200px; }
.gr-cost { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); }
.gr-pad { padding: 4px 20px; margin: 0; }
.gr-body > .table-wrap { margin: 4px 20px 8px; }
.gr-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.gr-save-note { color: var(--muted); font-weight: 700; }
@media (max-width: 720px) {
  .gr-intro, .gr-sub, .gr-cost, .gr-pad, .gr-save { padding-left: 16px; padding-right: 16px; }
  .gr-body > .table-wrap, .gr-body > .notice { margin-left: 16px; margin-right: 16px; }
  .gr-pair select { min-width: 0; max-width: 100%; }
  .gr-save .btn { flex: 1 1 auto; }
}

/* ---- Guests round 2, FAIR: the fair settings (Settings, Sell and gate) */
.fair-set-head { margin: 18px 0 2px; font-size: 1rem; color: var(--ink-2); }
.fair-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.fair-badge { display: inline-block; padding: 3px 12px; border-radius: var(--radius-pill); background: var(--sel-bg); color: var(--sel-ink); font-weight: 700; font-size: .875rem; }
.fair-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.fair-who img { width: 40px; height: 40px; border-radius: var(--radius); object-fit: cover; flex: none; }
.fair-pass { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; display: grid; gap: 4px; }
.fair-pass:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---- Ski school, the season plan (2026.11.9, Track PLAN: school-plan.js): day types, the month calendar, check and publish */
.plan-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-editor .plan-head-card h2 { margin: 0; }
.plan-parts > .tabs { flex-wrap: wrap; }
.plan-type { border-left: 6px solid var(--type, var(--line-strong)); }
.plan-type h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.plan-swatch { display: inline-block; width: 14px; height: 14px; border-radius: var(--radius-xs); background: var(--type, var(--line-strong)); flex: none; }
.plan-kinds { grid-template-columns: 1fr 1fr; }
.plan-lengths { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 12px; border: 0; padding: 0; margin: 0; }
.plan-lengths legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.plan-weekdays { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.plan-cal-head h3 { margin: 0; text-align: center; flex: 1; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.plan-key { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.plan-month { display: grid; gap: 4px; }
.plan-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.plan-head > div { font-weight: 700; font-size: .85rem; color: var(--quiet); text-align: center; padding: 4px 0; }
.plan-cell { min-height: 112px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; display: flex; flex-direction: column; overflow: hidden; }
.plan-cell.plan-out { background: transparent; border-color: transparent; }
.plan-cell.plan-none { background: var(--surface-2); }
.plan-cell.plan-today { outline: 2px solid var(--accent-line); outline-offset: -2px; }
.plan-num { position: absolute; top: 4px; right: 6px; font-weight: 700; font-size: .85rem; color: var(--quiet); pointer-events: none; }
.plan-dayname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan-daybtn { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; padding: 6px 6px 6px 10px; border: 0; border-left: 5px solid var(--type, var(--line-strong)); background: color-mix(in srgb, var(--type, transparent) 9%, transparent); color: var(--ink); text-align: left; font: inherit; font-size: .8rem; cursor: pointer; }
.plan-daybtn:hover { background: color-mix(in srgb, var(--type, transparent) 18%, transparent); }
.plan-daybtn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.plan-daybtn.plan-closed { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--type, var(--quiet)) 14%, transparent) 6px 8px); }
.plan-type-name { font-weight: 700; padding-right: 20px; }
.plan-holiday { color: var(--closed-ink); font-weight: 600; }
.plan-lines { display: grid; gap: 1px; color: var(--ink-2); }
.plan-lines > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-count { display: none; color: var(--ink-2); }
.plan-booked { margin-top: auto; font-weight: 600; color: var(--open-ink); }
.plan-summary .plan-big { font-size: 1.25rem; font-weight: 700; margin: 0; }
.plan-patterns { margin-top: 24px; }
@media (max-width: 720px) {
  .plan-pair, .plan-kinds { grid-template-columns: 1fr; }
  /* On a phone the month reads as a list of days, a week at a time. */
  .plan-head { display: none; }
  .plan-week { grid-template-columns: 1fr; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .plan-cell { min-height: 0; }
  .plan-cell.plan-out { display: none; }
  .plan-cell.plan-none { display: none; }
  .plan-week-empty { display: none; }
  .plan-num { display: none; }
  .plan-dayname { position: static; width: auto; height: auto; clip: auto; padding: 6px 10px 0; font-weight: 700; font-size: .9rem; }
  .plan-daybtn { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 44px; font-size: .9rem; }
  .plan-lines { display: none; }
  .plan-count { display: inline; }
  .plan-booked { margin-top: 0; }
}

/* ---- Ski school, Fill and staff (2026.11.9, Track STAFF: school-staff.js): the month, a day's lesson times, the My day card */
.fill-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fill-title { margin: 0; font-size: 1.25rem; }
.fill-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .875rem; color: var(--muted); }
.fill-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fill-wd { font-size: .8125rem; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.fill-cell { min-height: 96px; }
.fill-cal .plan-num { display: none; } /* the fill day draws its own date beside its mark */
.fill-cell.blank { visibility: hidden; }
.fill-day { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; height: 100%; min-height: 96px; padding: 6px 8px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; font: inherit; font-size: .8125rem; }
button.fill-day { cursor: pointer; }
button.fill-day:hover { border-color: var(--line-strong); }
.fill-day.empty { background: var(--surface-2); color: var(--muted); }
.fill-day.past { opacity: .7; }
.fill-day.today { box-shadow: inset 0 0 0 2px var(--accent-line); }
.fill-day.mark-red { border-left-color: var(--closed); background: var(--closed-tint); }
.fill-day.mark-amber { border-left-color: var(--warn-mark); background: var(--hold-tint); }
.fill-day.mark-green { border-left-color: var(--open); }
.fill-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.fill-head .state { font-size: .75rem; }
.fill-num { font-weight: 700; font-size: .9375rem; }
.fill-wdname { display: none; }
.fill-line { line-height: 1.3; }
.fill-group { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 6px; }
.fill-group.mark-red { border-left-color: var(--closed); }
.fill-group.mark-amber { border-left-color: var(--warn-mark); }
.fill-group.mark-green { border-left-color: var(--open); }
.fill-group .btn { justify-self: start; }
.fill-ghead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fill-ghead h3 { margin: 0; font-size: 1rem; }
.fill-short { margin: 0; font-weight: 700; color: var(--closed-ink); }
.fill-nums { margin: 0; }
.fill-lessons { display: grid; gap: 6px; margin: 0; }
.fill-suggest { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fill-needs { margin-bottom: 12px; }
.fill-need { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
@media (max-width: 720px) {
  /* A phone: the days that have lessons, one under the other. */
  .fill-month { grid-template-columns: 1fr; }
  .fill-wd, .fill-cell.blank, .fill-cell.none { display: none; }
  .fill-cell, .fill-day { min-height: 0; }
  .fill-wdname { display: inline; font-weight: 700; margin-right: auto; }
  .fill-head .fill-num { display: none; }
  .fill-day { font-size: .875rem; padding: 8px 12px; }
  .fill-bar .btn { flex: 1 1 auto; }
  .fill-title { order: -1; flex-basis: 100%; }
}

/* ---- Lesson planning, Track GUEST (2026.11.9): pools and privates, level questions (school-guest.js), Sell's level questions and next times */
.gs-set { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.gs-set legend { font-weight: 700; margin-bottom: 6px; }
.gs-radios { display: grid; gap: 8px; }
.gs-radio { align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.gs-radio span { display: grid; gap: 2px; }
.gs-disc { display: grid; gap: 12px; }
.gs-q { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.gs-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); }
.gs-q-body { display: grid; gap: 8px; min-width: 0; }
.gs-leads { display: grid; gap: 8px; }
@media (min-width: 700px) { .gs-leads { grid-template-columns: 1fr 1fr; } }
.gs-looks { margin: 0; }
.sell-placement { display: grid; gap: 6px; margin: 4px 0 10px; }
.sell-placement .sp-q { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sell-placement .sp-q > span { flex: 1 1 220px; }
.sl-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.gs-intro { margin: 0 0 12px; }

/* ---- Signing in (2026.11.10, Track SIGNIN): show password, the remembered mountain, mountain notes, the locked tab, sessions */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { padding-right: 52px; }
.pw-reveal { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; padding: 0; border: none; border-radius: var(--radius); background: transparent; color: var(--quiet); cursor: pointer; }
.pw-reveal:hover { color: var(--ink); }
.pw-reveal:focus-visible { outline: 2px solid var(--accent-line); outline-offset: -2px; }
.pw-reveal[aria-pressed='true'] { color: var(--link); }
.signin-mountain { margin: 0; font-size: 0.9375rem; }
.signin-mountain strong { overflow-wrap: anywhere; }
.signin-mountain .btn.link { min-height: 32px; margin-left: 4px; font-weight: 700; }
[data-mountain-note]:empty { display: none; }
.signin-note { margin: 0; padding: 8px 10px; border-left: 3px solid var(--line-strong); background: var(--surface-2, transparent); font-size: 0.875rem; }
.signin-note.warn { border-left-color: var(--warn); }
.signin-form .signin-hint { margin: 0 0 0 32px; font-size: 0.8125rem; color: var(--quiet); max-width: 38ch; }
.signin-form [data-locked-as] { max-width: 42ch; margin: 0; }
.session-use { display: grid; gap: 2px; }
.tag.this-tab { border-color: var(--link); color: var(--link); }

/* ---- The Mountain calendar (2026.11.10, Track CALENDAR: calendar.js): the list, week and month, kinds by color, the Today card */
[data-kind='event'] { --k: #1b5fc1; }
[data-kind='meeting'] { --k: #7b3fb0; }
[data-kind='training'] { --k: #17703f; }
[data-kind='closure'] { --k: #b42318; }
[data-kind='other'] { --k: #5f7480; }
[data-kind='upkeep'] { --k: #b56a00; }
[data-kind='tickets'] { --k: #0f7c86; }
:root[data-theme='dark'] [data-kind='event'] { --k: #6ea3f0; }
:root[data-theme='dark'] [data-kind='meeting'] { --k: #b892e0; }
:root[data-theme='dark'] [data-kind='training'] { --k: #5cc68b; }
:root[data-theme='dark'] [data-kind='closure'] { --k: #f07a6e; }
:root[data-theme='dark'] [data-kind='other'] { --k: #9fb1ba; }
:root[data-theme='dark'] [data-kind='upkeep'] { --k: #e8a443; }
:root[data-theme='dark'] [data-kind='tickets'] { --k: #4fc2cc; }
.mcal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 10px; }
.mcal-seg button[aria-pressed='true'] { background: var(--spruce); color: var(--on-fill); }
:root[data-theme='dark'] .mcal-seg button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.mcal-nav { display: flex; align-items: center; gap: 6px; }
.mcal-nav .btn { min-width: 44px; min-height: 40px; }
.mcal-jump { min-height: 40px; max-width: 11rem; }
.mcal-title { font-size: 1.15rem; margin: 0; flex: 1 1 auto; }
.mcal-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 14px; }
.mcal-filters .field { margin: 0; min-width: 11rem; }
.mcal-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.mcal-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.mcal-kind[aria-pressed='false'] { color: var(--quiet); background: transparent; text-decoration: line-through; }
.mcal-kind[aria-pressed='false'] .mcal-swatch { opacity: .35; }
.mcal-swatch { width: 12px; height: 12px; border-radius: var(--radius-xs); background: var(--k); flex: none; }
.mcal-days, .mcal-list { display: grid; gap: 8px; }
.mcal-days { gap: 18px; }
.mcal-day-head { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 6px; }
.mcal-today-tag { display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700; }
.mcal-day.mcal-today { border-left: 4px solid var(--accent-line); padding-left: 10px; }
.mcal-none { margin: 0; }
.mcal-item { display: grid; grid-template-columns: 10.5rem 1fr; gap: 4px 12px; width: 100%; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-left: 6px solid var(--k); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.mcal-item:hover { background: color-mix(in srgb, var(--k) 8%, var(--surface)); }
.mcal-when { font-weight: 700; color: var(--ink-2); }
.mcal-what { display: grid; gap: 2px; min-width: 0; }
.mcal-what b { overflow-wrap: anywhere; }
.mcal-meta { color: var(--muted); font-size: .875rem; }
.mcal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.mcal-week .mcal-day { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 8px; min-height: 160px; }
.mcal-week .mcal-day.mcal-today { border: 2px solid var(--accent-line); padding: 7px; }
.mcal-week .mcal-item { grid-template-columns: 1fr; padding: 6px 8px 6px 10px; font-size: .875rem; }
.mcal-week .mcal-day-head { font-size: .9rem; }
.mcal-week .mcal-day-head { flex-wrap: wrap; gap: 4px 8px; }
.mcal-week .mcal-meta { display: none; }
.mcal-month { display: grid; gap: 4px; }
.mcal-mhead, .mcal-mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mcal-mhead > div { text-align: center; font-weight: 700; font-size: .85rem; color: var(--quiet); padding: 2px 0; }
.mcal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-height: 104px; padding: 4px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.mcal-cell:hover { border-color: var(--line-strong); }
.mcal-cell.mcal-out { background: var(--surface-2); color: var(--quiet); }
.mcal-cell.mcal-today { border: 2px solid var(--accent-line); padding: 3px 5px 5px; }
.mcal-cell[aria-selected='true'] { outline: 3px solid var(--focus); outline-offset: -3px; }
.mcal-num { font-weight: 700; font-size: .875rem; }
.mcal-cell.mcal-today .mcal-num { color: var(--link); }
.mcal-chips { display: grid; gap: 2px; min-width: 0; }
.mcal-chip { display: block; padding: 1px 6px; border-left: 4px solid var(--k); border-radius: var(--radius-xs); background: color-mix(in srgb, var(--k) 14%, var(--surface)); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal-more { font-size: .78rem; color: var(--quiet); font-weight: 700; }
.mcal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.mcal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.mcal-picked { margin-top: 16px; }
.mcal-facts { display: grid; grid-template-columns: 6rem 1fr; gap: 6px 12px; margin: 0; }
.mcal-facts dt { font-weight: 700; color: var(--quiet); }
.mcal-facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.mcal-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.mcal-pair .field { margin: 0; }
.mcal-who { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; display: grid; gap: 6px; }
.mcal-who legend { font-weight: 700; padding: 0 4px; }
.mcal-team-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 12px; padding-left: 24px; }
.mcal-link { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.mcal-howto { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.mcal-coming-host { margin-bottom: 16px; }
.mcal-coming header { margin-bottom: 8px; }
.mcal-coming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mcal-coming-list li { display: grid; grid-template-columns: 6rem 1fr auto; gap: 4px 12px; align-items: baseline; padding: 6px 0 6px 10px; border-left: 4px solid var(--k); }
.mcal-coming-day { font-weight: 700; color: var(--ink-2); }
.wall .mcal-coming-host { display: none; }
/* The week reads as seven columns only where each column has room; below that, one day under the next. */
@media (max-width: 1200px) {
  .mcal-week { grid-template-columns: 1fr; }
  .mcal-week .mcal-day { min-height: 0; }
  .mcal-week .mcal-meta { display: block; }
}
@media (max-width: 720px) {
  .mcal-title { flex-basis: 100%; order: -1; }
  .mcal-seg { display: flex; width: 100%; }
  .mcal-seg button { flex: 1; padding: 4px 6px; }
  .mcal-filters .field { flex: 1 1 100%; }
  .mcal-item { grid-template-columns: 1fr; }
  .mcal-pair { grid-template-columns: 1fr; }
  .mcal-cell { min-height: 52px; padding: 4px; align-items: center; }
  .mcal-chips { display: none; }
  .mcal-dots { display: flex; justify-content: center; }
  .mcal-coming-list li { grid-template-columns: 5rem 1fr; }
  .mcal-coming-list li > .muted { grid-column: 2; }
}

/* ---- Lift inspections by lift type (2026.11.10, SLIM 7d: lift-checks.js): the checklist editor. The ticking list uses the attraction styles. */
.liftchk-edit { margin: 0; padding-left: 1.5em; display: grid; gap: 6px; }
.liftchk-edit li { display: flex; gap: 6px; align-items: center; }
.liftchk-edit li input[type='text'], .liftchk-edit li input:not([type]) { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.liftchk-req { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; min-height: 44px; }
@media (max-width: 640px) {
  .liftchk-edit li { flex-wrap: wrap; }
  .liftchk-edit li input:not([type]) { flex-basis: 100%; }
}

/* ---- Fix release 2026.11.11, Track OPS (ui.js dialogs, tables) */
/* A table's hidden screen-reader text (.sr, absolutely placed) stays inside its own scroller, so a wide table scrolls
   in its box and never makes the whole page scroll sideways (UI-2). */
.table-wrap { position: relative; }
/* "Close and lose what you typed here?" at the top of a dialog (UI-1). */
.discard-ask { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: var(--sp-3, 12px) var(--sp-4, 16px); background: var(--surface); }
.discard-ask p { margin: 0 0 8px; font-weight: 600; }
.discard-ask .row { display: flex; flex-wrap: wrap; gap: 8px; }
.discard-ask .btn { min-height: 44px; }
/* On a touch screen (iPad, phone) there is no hover: the schedule grid's "+" in each cell is always shown. */
@media (hover: none) {
  .cell-add { border-color: var(--line); color: var(--link); }
}
/* The weekly report's "needs attention" lines are sentences: they wrap at phone width instead of running 3 px off. */
.bd-list .state { white-space: normal; align-items: flex-start; }
.bd-list .state::before { margin-top: 0.3em; }

/* ---- Patrol fixes (2026.11.11, Track PATROL): guest help repeats on the board, the sweep's finds, number boxes, photo time source */
.call-repeats { font-size: .9rem; }
.call-repeats summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.call-repeats ul { margin: 4px 0 0; padding-left: 18px; }
.sweep-stops .stop-mark s { color: var(--muted); }
.short-num, .input-row input.short-num { min-width: 64px; }

/* ---- Privacy (2026.11.11, track PRIVACY): a closed mountain's export screen, and what stayed after an anonymise. */
.closed-export-page { max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.closed-export h1 { margin-top: 0; }
.closed-export-files { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.closed-export-files .btn { min-height: 44px; width: 100%; justify-content: flex-start; }
.kept-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* ---- Navigation v2: the side menu picks the app; tabs on the page pick the part of the app ---- */
/* (The side menu and the phone Menu sheet are in "The frame" block.) */

/* Tabs: the one tab component (ui.js tabs() and linkTabs()). Row 1, the app's main tabs: words, a line under the open
   one. Row 2, only where an app needs it: lighter, smaller, no line, the open one on a soft tint. */
.tabs { display: flex; align-items: stretch; }
.tabs button, .tabs > a { font: inherit; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs.row1 { gap: 22px; margin: 0 0 14px; padding: 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs.row1 button, .tabs.row1 > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1px; margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--quiet); font-size: 1rem; font-weight: 400; }
.tabs.row1 button:hover, .tabs.row1 > a:hover { color: var(--ink); background: none; }
.tabs.row1 button[aria-selected='true'], .tabs.row1 > a[aria-current] { color: var(--ink); font-weight: 700; border-bottom-color: var(--link); }
.tabs.row2 { gap: 4px; margin: -4px 0 18px; padding: 0; border: 0; flex-wrap: wrap; overflow: visible; }
.tabs.row2 button { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; margin: 0; border: 0; border-radius: var(--radius); background: none; color: var(--quiet); font-size: .9375rem; font-weight: 400; }
.tabs.row2 button:hover { color: var(--ink); background: var(--surface-2); }
.tabs.row2 button[aria-selected='true'] { color: var(--ink); font-weight: 700; background: var(--info-tint); }
:root[data-theme='dark'] .tabs.row2 button[aria-selected='true'] { background: rgba(255, 255, 255, .08); }
/* Sell's product pills choose what to sell inside the Sell card: they keep their own pill look (see .sell-menu). */
.tabs.tabs-pills button { font-weight: 700; min-height: 44px; white-space: nowrap; }
@media (max-width: 860px) {
  .tabs.row1 { gap: 18px; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  /* Row 2 stays one line on a phone and slides sideways (it wrapped to three lines on Patrol, Cases), with 44px
     targets for gloved hands; the open tab is scrolled into view (ui.js) */
  .tabs.row2 { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .tabs.row2::-webkit-scrollbar { display: none; }
  .tabs.row2 button { flex: none; }
  .tabs.row2 button { min-height: 44px; padding: 0 14px; }
}

/* Filters look like filters, not tabs: outlined, and a check mark on the one that is on. */
.fchips button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2); font-weight: 400; }
.fchips button:hover { border-color: var(--quiet); color: var(--ink); }
.fchips button[aria-pressed='true'] { background: transparent; border-color: var(--link); color: var(--ink); font-weight: 700; }
.fchips button[aria-pressed='true']::before { content: '✓'; font-weight: 700; color: var(--link); }
.avail-seg { width: fit-content; max-width: 100%; }
.avail-seg button[aria-pressed='true'] { background: var(--sel-bg); color: var(--sel-ink); }

/* Settings, Menus: Home is fixed at the top for everyone */
.set-fixed { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 14px 20px 18px; list-style: none; }
.set-fixed-app { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-pill); color: var(--ink-2); }

/* Patient-record check and quick resume (feat/auth-hardening): one large passkey button first, for gloved hands. */
.btn.passkey-big, .signin-form .btn.passkey-big { width: 100%; min-height: 60px; font-size: 1.15rem; justify-content: center; }
.resume-lead { font-size: 1.05rem; }
.signin-check { display: flex; gap: 8px; align-items: flex-start; }
.signin-form .resume-slot, .signin-form .signin-passkey { width: min(380px, 100%); }
.passkey-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.passkey-count.short { color: var(--warn-ink); font-weight: 600; }

/* A check box on its own (in a table cell) sits in a 44 px label, so the whole square around it can be pressed. */
label.check-hit { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -11px 0; cursor: pointer; }

/* Phones: buttons and check boxes are at least 44 px targets. Small buttons keep their padding and font, only their height
   grows; a check box or radio button grows its label's hit area instead of the box itself. */
@media (max-width: 600px) {
  .btn:not(.link), .btn.small:not(.link), summary.btn { min-height: 44px; }
  label:not(.check-hit):has(> input[type='checkbox']), label:not(.check-hit):has(> input[type='radio']) { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  label.field:has(> input[type='checkbox']), label.field:has(> input[type='radio']) { display: grid; align-content: center; }
  .seg button, .chip, .fchips button { min-height: 44px; }
  /* Ready for you (AI release 1): written one step more specific than the card's own rules, which come later in the file. */
  .ready-list .ready-card { padding: 14px 12px; }
  .ready-card .ready-actions .btn { flex: 1 1 140px; }
}

/* ---------- Printing a patrol case (Care, Report and Record on paper) ----------
   The case header starts page 1 with Care under it (no page of its own); Report and Record each start a page. The printout
   keeps what was recorded and drops the controls: buttons, helper text, how long ago, open dialogs and the sticky bars.
   Date and time boxes print as words in the same format as the rest of the page (see printableTimes in ui.js). */
.print-value { display: none; }
@media print {
  .case-page .wristband { position: static !important; top: auto; }
  .case-page .case > .pane { break-before: auto !important; }
  .case-page .case > .pane ~ .pane { break-before: page !important; }
  .case-page .panel, .case-page .bedside, .case-page details { break-inside: auto; box-shadow: none; }
  .case-page h2, .case-page h3, .case-page h4, .case-page summary { break-after: avoid; }
  .case-page .vgrid, .case-page .vtile, .case-page tr, .case-page li { break-inside: avoid; }
  .case-page .hint, .case-page .field .hint, .case-page .no-print, .case-page .seg:not(:has([aria-pressed='true'])),
  .case-page .chip-row, .case-page .fchips, .case-page .add-row, .case-page .discard-ask { display: none !important; }
  .case-page input[type='datetime-local'], .case-page input[type='date'], .case-page input[type='time'] { display: none !important; }
  .case-page .print-value { display: inline; font-weight: 400; }
  .case-page input:placeholder-shown, .case-page textarea:placeholder-shown { color: transparent; }
  .case-page details.nsaar-sec:not([open])::details-content, .case-page .bedside details.more:not([open])::details-content { content-visibility: visible; display: block; }
  .case-page select { appearance: none; -webkit-appearance: none; background-image: none !important; }
  .case-page details > summary { pointer-events: none; }
  body:not(:has(.print-overlay)) .overlay, .topbar, .tabbar, .offline-banner, .demo-pill, .toasts, .fab, .new-fab { display: none !important; }
}

/* ---------------------------------------------------------------- ski school safety (feat/school-safety) */
.group-fold > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; min-height: 44px; }
.group-fold > summary::marker { color: var(--quiet); }
.gf-count { font-size: 0.9rem; color: var(--quiet); font-weight: 600; }
.gf-count.all { color: var(--open-ink); }
.over-ratio { border-left: 4px solid var(--closed) !important; background: var(--closed-tint); }
.lu-col.over-ratio { background: var(--surface); }
.ratio-line.over { color: var(--closed-ink); font-weight: 600; }
.place-line { color: var(--ink-2); }
.pickup-editor .pk-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 6px; align-items: center; }
.pk-pic { font-size: 0.85rem; display: grid; gap: 2px; }
.pk-photo { max-width: 180px; }
.pk-choice { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); min-height: 56px; }
.pk-choice:has(input:checked) { border-color: var(--accent-line); box-shadow: 0 0 0 2px var(--info-tint); }
.pk-choice > span:last-child { display: grid; }
.pk-face { width: 48px; height: 48px; border-radius: 50%; background: var(--snowpack); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.pk-face img { width: 100%; height: 100%; object-fit: cover; }
.pk-id { font-weight: 600; }
.at-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.at-grid .btn { min-height: 52px; }
.band-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.band-row input[type="number"] { width: 4.5em; }
.band-row input:not([type]) { width: 10em; }
.lost-strip, .pickup-strip { margin-bottom: 8px; }
.myday-tools { gap: 6px; }
.myday-fold > summary { border-top: 1px solid var(--line); }
.updates-list { display: grid; gap: 10px; }
.updates-list img { max-width: 100%; border-radius: var(--radius); }
@media (max-width: 640px) {
  .pickup-editor .pk-row { grid-template-columns: 1fr 1fr; }
  .pickup-editor .pk-row > :first-child { grid-column: 1 / -1; }
}
.pk-choice { justify-content: flex-start; }
.pk-choice input[type="radio"] { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; }
.pickup-names { align-items: center; gap: 8px; }
.band-row > input { flex: none; }
.band-row > input[type="number"] { width: 5.5em !important; min-width: 0 !important; }
.band-row > input:not([type="number"]) { width: 11em !important; min-width: 0 !important; }
.band-rows { width: 100%; }
.lost-strip.notice, .notice.bad { background: var(--closed-tint); border-color: var(--closed); color: var(--ink); }
.lost-strip strong { color: var(--closed-ink); }

/* feat/school-pay: setup warning, satisfaction score, add-on summary, group links */
.pay-setup ul { margin: 0; }
.nps-chip { white-space: nowrap; }
.extras-summary { align-items: center; gap: 6px; }
.link-box { width: 100%; }
.my-score { margin: 0; }

/* Money, Forecast data (money-forecast.js): two series, validated for color vision and contrast on both surfaces. */
.fc-root { --fc-1: var(--chart-1); --fc-2: var(--chart-2); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 0.9rem; }
.fc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fc-key { display: inline-block; width: 14px; height: 8px; border-radius: var(--radius-xs); }
.fc-key.fc-now { background: var(--fc-1); }
.fc-key.fc-was { background: var(--fc-2); }
.fc-key-dash { background: repeating-linear-gradient(90deg, var(--fc-2) 0 4px, transparent 4px 6px) !important; }
.fc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fc-bars li { display: grid; grid-template-columns: 96px minmax(80px, 1fr) 6.5ch; gap: 10px; align-items: center; }
.fc-day { white-space: nowrap; }
.fc-val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-track { display: grid; gap: 2px; }
.fc-bar { display: block; height: 8px; min-width: 2px; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.fc-bar.fc-now { background: var(--fc-1); }
.fc-bar.fc-was { background: var(--fc-2); }
.fc-chart { width: 100%; height: auto; max-width: 720px; display: block; }
.fc-grid { stroke: var(--line); stroke-width: 1; }
.fc-axis { fill: var(--muted); font-size: 12px; }
.fc-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fc-now-stroke { stroke: var(--fc-1); }
.fc-was-stroke { stroke: var(--fc-2); }
.fc-dash { stroke-dasharray: 6 4; }
.fc-dot { fill: var(--surface); stroke-width: 2; opacity: 0; }
.fc-hit:hover .fc-dot { opacity: 1; }
.fc-cov { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fc-cov th, .fc-cov td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fc-cov thead th { color: var(--quiet); font-weight: 600; }
.fc-cov tbody th { font-weight: 400; }
@media (max-width: 640px) {
  .fc-bars li { grid-template-columns: 92px minmax(60px, 1fr) 6.5ch; gap: 8px; font-size: 0.9rem; }
  .fc-cov { font-size: 0.8rem; }
  .fc-cov th, .fc-cov td { padding: 6px 3px; }
  .fc-cov .state { gap: 3px; }
}

/* ---------- Ready for you: drafts the assistant prepared, to approve (AI release 1) ---------- */
.ready-host { margin: 0 0 20px; }
.ready { display: flex; flex-direction: column; gap: 12px; }
.ready-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.ready-head h2 { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 1.625rem; line-height: 1.1; }
.ready-count { font-weight: 700; color: var(--quiet); }
.ready-intro { margin: -4px 0 0; }
.ready-list { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ready-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-line); border-radius: var(--radius-md); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ready-card > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 12px; }
.ready-card h3 { font-size: 1.125rem; }
.ready-sum { color: var(--quiet); margin-top: 2px; }
.ready-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.ready-chip.is-edited { background: var(--accent-tint); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ready-fallback { background: var(--info-tint); border-radius: var(--radius); padding: 10px 12px; }
.ready-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ready-field > label { font-weight: 700; }
.ready-text, .ready-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field); color: var(--ink); font: inherit; line-height: 1.45; }
.ready-text { resize: vertical; }
.ready-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ready-copy .btn { margin-left: auto; }
.ready-email { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; }
.ready-email > summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.ready-email[open] { padding-bottom: 12px; }
.ready-email[open] > :not(summary) { margin-top: 10px; }
.ready-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.ready-check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--accent-line); }
.ready-check span { display: flex; flex-direction: column; gap: 2px; }
.ready-check small { color: var(--quiet); }
.ready-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ready-card .btn { min-height: 44px; }
.ready-actions .btn { min-width: 120px; }
.ready-inbox-host { margin: 0 0 12px; }
.ready-inbox { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-tint); color: var(--ink); text-decoration: none; }
.ready-inbox > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ready-inbox small { color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready-go { font-size: 1.5rem; color: var(--ink-2); }
.cw-section .row .btn { min-height: 44px; }
.cw-voice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cw-voice legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
@media (min-width: 1100px) { .ready-list { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); } }
/* Phones: the Ready for you cards' own rules are in the phone block above (one block, so its 44 px targets stay together). */

/* ---------------------------------------------------------------- Morning brief (ai/brief) */
.brief-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.brief-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px 22px; max-width: 760px; }
.brief-head h2 { margin: 2px 0 12px; font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 600; font-size: 1.7rem; }
.brief-kicker { margin: 0; color: var(--quiet); font-size: .875rem; font-weight: 700; }
.brief-summary { background: var(--accent-tint); border-left: 4px solid var(--accent-line); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px; }
.brief-summary p { margin: 4px 0; font-size: 1.02rem; }
.brief-sec h3, .brief-actions h3 { margin: 18px 0 4px; font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 1.2rem; font-weight: 600; color: var(--accent-ink); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.brief-sec ul { margin: 6px 0 0; padding-left: 20px; }
.brief-sec li { margin: 3px 0; }
.brief-action-list { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.brief-action-list .btn { white-space: normal; text-align: left; }
.brief-label { margin: 18px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--quiet); font-size: .85rem; }
.brief-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.brief-side h2 { margin: 0 0 8px; font-size: 1rem; }
.brief-days { list-style: none; margin: 0; padding: 0; }
.brief-days a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.brief-days a:hover { background: var(--surface-2); }
.brief-days a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); }
.brief-day { font-weight: 700; }
.brief-first { color: var(--quiet); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brief-none h2 { margin-top: 0; }
@media (max-width: 860px) {
  .brief-grid { grid-template-columns: minmax(0, 1fr); }
  .brief-card { padding: 16px; }
}

/* ---------------------------------------------------------------- Mountain places and help signs (help/places) */
/* Guest needs help here: on Mountain status, the Gate and in the menu. Large, outlined in red, one hand with gloves. */
.staff-help-btn { min-height: 56px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border: 2px solid var(--closed); color: var(--closed); background: var(--surface); font-weight: 700; font-size: 1.05rem; }
.staff-help-btn:hover { background: var(--closed-tint); }
.staff-help-btn .sh-plus { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--closed); color: var(--on-fill); font-size: 1.3rem; line-height: 1; }
.staff-help .sh-status { font-size: 1.1rem; font-weight: 700; }
.staff-help .sh-sent { font-size: 1.2rem; color: var(--open); }
.staff-help .sh-911 { font-weight: 700; color: var(--closed); }
@media (max-width: 860px) { .page-head > .head-help-here { width: 100%; justify-content: center; } }

/* Mapping the mountain */
.places-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .places-grid { grid-template-columns: minmax(0, 1fr); } }
.mark-card h2 { margin: 0; }
.mark-card .big-select, .mark-card .big-input { min-height: 52px; font-size: 1.1rem; width: 100%; }
.mark-card .code-input { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 700; font-size: 1.6rem; letter-spacing: 2px; text-transform: uppercase; max-width: 10rem; }
.mark-card .mark-actions .btn { flex: 1 1 0; min-height: 56px; }
.mark-card .mark-btn { font-size: 1.15rem; }
.gps-line { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--open); font-weight: 700; }
.gps-line.gps-weak { border-left-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; }
.places-tools { flex-wrap: wrap; gap: 8px; }
.place-code { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 1.15rem; letter-spacing: 1px; }
.error-list { margin: 0; padding-left: 20px; color: var(--invalid); }
.place-map { display: block; width: 100%; height: auto; max-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); }
.place-map .pm-bg { fill: var(--surface-2); }
.place-map .pm-empty, .place-map .pm-scale text { fill: var(--quiet); font-size: 12px; }
.place-map .pm-north-ring { fill: var(--surface); stroke: var(--line-strong); }
.place-map .pm-north-line { stroke: var(--closed); stroke-width: 2.5; stroke-linecap: round; }
.place-map .pm-north-tip { fill: var(--closed); }
.place-map .pm-north-n { fill: var(--ink); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.place-map .pm-scale line { stroke: var(--ink); stroke-width: 2; }
.place-map .pm-point circle, .place-map .pm-point rect { fill: var(--spruce-soft); stroke: var(--surface); stroke-width: 1.5; }
.place-map .pm-tower rect { fill: var(--accent-line); }
.place-map .pm-label { fill: var(--ink); font-size: 11px; font-weight: 700; paint-order: stroke; stroke: var(--surface-2); stroke-width: 3px; }
.place-map .pm-pick { cursor: pointer; }
.place-map .pm-pick:focus-visible circle, .place-map .pm-pick:focus-visible rect { stroke: var(--focus); stroke-width: 3; }
.place-map .pm-ring { fill: var(--gps-ring); fill-opacity: .18; stroke: var(--gps-dot); stroke-width: 1.5; }
.place-map .pm-focus { fill: var(--gps-dot); stroke: var(--surface); stroke-width: 2.5; }
.place-map .pm-trail { fill: none; stroke: var(--gps-dot); stroke-width: 2; stroke-dasharray: 5 4; }
.place-map .pm-trail-dot { fill: var(--gps-dot); fill-opacity: .55; }

/* No one on duty got the alert for a new request (dispatch.js alertNewRequest): a red banner on the board and the call. */
.nobody-banner { margin: -2px 0 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--closed); color: var(--on-fill); font-weight: 400; }

/* A call's location panel */
.call-where { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); }
.call-where h3 { margin: 0; }
.call-where .where-words { margin: 0; font-size: 1.2rem; font-weight: 700; }
.call-where .where-facts { gap: 6px 14px; align-items: center; }
.call-where .where-moved { font-weight: 700; }
.call-where .place-map { max-width: 460px; }

/* Help signs: black on white, very large, nothing small. One sign to a printed page. */
.signs-page { display: grid; gap: 24px; justify-items: center; }
.signs-tools { justify-self: stretch; }
.help-sign { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; background: var(--sign-paper); color: var(--sign-ink); border: 6px solid var(--sign-ink); border-radius: var(--radius-md); font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; break-after: page; page-break-after: always; break-inside: avoid; }
.help-sign p { margin: 0; line-height: 1.1; }
.help-sign .hs-ask { font-weight: 700; }
.help-sign .hs-code { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 700; line-height: .9; letter-spacing: 2px; }
.help-sign .hs-how { font-weight: 700; }
.help-sign .hs-911 { font-weight: 700; background: var(--sign-ink); color: var(--sign-paper); border-radius: var(--radius-sm); padding: 4px 12px; }
.help-sign .hs-mountain { font-weight: 700; }
.help-sign .hs-qr { display: block; }
.help-sign-sticker { width: 4in; height: 4in; padding: .14in; }
.help-sign-sticker .hs-ask { font-size: 22pt; }
.help-sign-sticker .hs-qr { width: 1.55in; height: 1.55in; }
.help-sign-sticker .hs-code { font-size: 54pt; }
.help-sign-sticker .hs-how { font-size: 13pt; }
.help-sign-sticker .hs-911 { font-size: 15pt; }
.help-sign-sticker .hs-mountain { font-size: 12pt; }
.help-sign-tower { width: 8.5in; height: 11in; padding: .45in; border-width: 10px; }
.help-sign-tower .hs-ask { font-size: 48pt; }
.help-sign-tower .hs-qr { width: 4.2in; height: 4.2in; }
.help-sign-tower .hs-code { font-size: 150pt; }
.help-sign-tower .hs-how { font-size: 26pt; }
.help-sign-tower .hs-911 { font-size: 32pt; padding: 6px 20px; }
.help-sign-tower .hs-mountain { font-size: 22pt; }
@media (max-width: 860px) { .help-sign-tower { transform: scale(.42); transform-origin: top center; margin-bottom: calc(-11in * .58); } }
.stencil-title { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-size: 2.4rem; margin: 0; }
.stencil-sub { margin: 0; font-size: 1.1rem; }
.stencil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6in, 1fr)); gap: 12px; width: 100%; }
.stencil-cell { display: flex; flex-direction: column; align-items: center; border: 4px solid var(--sign-ink); border-radius: var(--radius); padding: 8px; background: var(--sign-paper); color: var(--sign-ink); break-inside: avoid; }
.stencil-code { font-family: 'Barlow Condensed', 'Atkinson Hyperlegible', system-ui, sans-serif; font-weight: 700; font-size: 96pt; line-height: .95; letter-spacing: 3px; }
.stencil-tower { font-size: 16pt; font-weight: 700; }
@media print {
  .signs-page .no-print { display: none !important; }
  .signs-page { gap: 0; }
  .help-sign { margin: 0 auto; transform: none !important; }
  .help-sign:last-child { break-after: auto; page-break-after: auto; }
  .stencil-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Map orientation (help/places): the turn panel, and a Leaflet map turned to match the trail map */
.turn-panel .turn-row { flex-wrap: wrap; gap: 8px; }
.turn-panel .turn-now { font-size: 1.1rem; font-weight: 700; margin: 0; }
.map-turn-wrap { position: relative; overflow: hidden; }
.map-turn-wrap > .leaflet-container[data-map-rotate] { position: absolute; transform-origin: 50% 50%; }
.leaflet-container[data-map-rotate] .leaflet-marker-icon > *, .leaflet-container[data-map-rotate] .leaflet-popup-content-wrapper, .leaflet-container[data-map-rotate] .leaflet-tooltip { rotate: calc(var(--map-turn, 0deg) * -1); }
.leaflet-container[data-map-rotate] .leaflet-popup-tip-container { display: none; }
.map-turn-wrap > .leaflet-control-container { position: absolute; inset: 0; pointer-events: none; z-index: 800; }
.map-turn-wrap > .leaflet-control-container .leaflet-control { pointer-events: auto; }
.map-north { position: absolute; z-index: 801; left: 10px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); display: grid; place-items: center; pointer-events: none; }
.map-north svg { width: 34px; height: 34px; }
.map-north line { stroke: var(--closed); stroke-width: 3; stroke-linecap: round; }
.map-north circle { fill: var(--closed); }
.map-north text { fill: var(--ink); font-size: 11px; font-weight: 700; }
.turn-prompt { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-tint); border-left: 4px solid var(--accent-line); color: var(--ink); font-weight: 700; }
.turn-panel .btn[aria-pressed='true'] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* help/guest: the call view's Guest section (what the guest tapped, and messages both ways) */
.guest-box { border-top: 1px solid var(--line); padding-top: 12px; }
.guest-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.guest-box dt { font-weight: 700; } .guest-box dd { margin: 0; }
.guest-msgs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.guest-msgs li { padding: 6px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.guest-msgs li.from-guest { border-left: 4px solid var(--accent-line); }
.guest-box textarea { flex: 1 1 16rem; min-height: 56px; }
@media (max-width: 560px) { .guest-box dl { grid-template-columns: 1fr; gap: 0; } .guest-box dd { margin-bottom: 6px; } }

/* Municipal edition (muni release 1): a work order's facts on Work orders. */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--quiet); }
dl.facts dd { margin: 0; }
@media (max-width: 560px) { dl.facts { grid-template-columns: 1fr; gap: 0; } dl.facts dd { margin-bottom: 6px; } }

/* ---- Municipal edition (muni release 1): asset risk, the map item panel, photos and programs */
.amap-dot.wo { box-shadow: 0 0 0 3px var(--risk-very-high), 0 1px 4px rgba(0, 0, 0, 0.6); }
.mini-map { height: 220px; min-height: 180px; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb { width: 88px; height: 88px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); overflow: hidden; background: var(--snowpack); cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-panel .form label { display: flex; align-items: center; gap: 8px; }
.prog-bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: var(--line-strong); }
.prog-bar span { display: block; height: 100%; }
.prog-bar .done { background: var(--prog-done); }
.prog-bar .skipped { background: var(--prog-skipped); }
.prog-bar .failed { background: var(--prog-failed); }
.prog-target { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.prog-target .dist { font-variant-numeric: tabular-nums; }
/* Requests (muni release 1): filter rows keep their selects and dates at their own width. */
.req-filters > select, .req-filters > input { width: auto; min-width: 0; flex: 0 1 auto; }
.req-filters > input[type=search] { min-width: min(260px, 100%); }
/* ---- Buildings (muni release 1): the life-safety calendar, rounds on a phone, the year grid and the printable binder */
.bld-cal { list-style: none; margin: 0; padding: 0; }
.bld-cal-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bld-pick-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.bld-pick-extra { padding: 4px 0 4px 32px; }
.bld-pick-extra input:not([type='checkbox']), .bld-pick-extra select { flex: 1 1 10rem; min-width: 0; }
.bld-year { table-layout: fixed; }
.bld-year th[scope='row'] { text-align: left; font-weight: 600; width: 34%; }
.bld-cell { text-align: center; font-weight: 700; }
.bld-cell.bld-done { color: var(--open); }
.bld-cell.bld-late { color: var(--hold); background: var(--watch-tint); }
.bld-cell.bld-missed, .bld-cell.bld-overdue { color: var(--closed); background: var(--alert-tint); }
.bld-cell.bld-due { color: var(--quiet); }
.bld-round { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bld-stop { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.bld-stop.bld-found { box-shadow: 0 0 0 3px var(--accent-line); }
.bld-stop-pass { border-left: 6px solid var(--open); }
.bld-stop-fail, .bld-stop-missing { border-left: 6px solid var(--closed); }
.bld-stop-skipped { opacity: 0.75; }
.bld-stop-actions .btn { min-height: 48px; min-width: 6.5rem; flex: 1 1 6.5rem; }
.binder-head h1 { margin: 0 0 4px; }
.binder-section { margin-top: 24px; }
.binder-section h2 { font-size: 1.15rem; border-bottom: 2px solid var(--line-strong); padding-bottom: 4px; }
@media (max-width: 640px) { .bld-cal-row { grid-template-columns: 1fr; gap: 4px; } .bld-pick-extra { padding-left: 0; } }
@media print {
  .binder { font-size: 10.5pt; }
  .binder .table-wrap { overflow: visible; }
  .binder table { width: 100%; border-collapse: collapse; }
  .binder th, .binder td { border-bottom: 1px solid var(--print-rule); padding: 3px 6px; vertical-align: top; }
  .binder tr { break-inside: avoid; page-break-inside: avoid; }
  .binder-section { break-inside: auto; }
  .binder-section h2 { break-after: avoid; page-break-after: avoid; }
  .back, .page-head.no-print, .week-filter.no-print { display: none !important; }
}

/* ---------- utilities (2026.11.20): map item picker, route order, door hangers, utilities screens ---------- */
.feature-picker .row input[type=search] { flex: 1; min-width: 0; }
.picker-list { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; margin: 0; }
.picker-list .btn { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; }
.intake-checks .warn-note { font-weight: 400; }
.intake-checks .warn-note strong { font-weight: 700; }
.route-list { list-style: decimal; padding-left: 28px; margin: 0; display: grid; gap: 6px; }
.route-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.route-row[draggable="true"] { cursor: grab; }
.route-row.dragging { opacity: 0.5; }
.route-row.drop-here { border-color: var(--ink); box-shadow: inset 0 2px 0 var(--ink); }
.route-grip { color: var(--quiet); }
.route-rest li { padding: 4px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 700px) {
  .route-row { grid-template-columns: auto minmax(0, 1fr); }
  .route-row select, .route-row .row { grid-column: 1 / -1; }
}
.door-list { columns: 2; column-gap: 24px; }
.door-list li { break-inside: avoid; padding: 2px 0; }
@media (max-width: 700px) { .door-list { columns: 1; } }
.util-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.util-figures .figure { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.util-figures .figure strong { font-size: 1.4rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.mcm { break-inside: avoid; }
@media print { .util-map { display: none; } .table-scroll { overflow: visible; } }
.valve-times { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 7em; gap: 8px; padding-left: 28px; }
.valve-times label { display: grid; gap: 2px; }
@media (max-width: 700px) { .valve-times { grid-template-columns: minmax(0, 1fr); padding-left: 0; } }

/* nav pins: start */
/* Pins (public/js/pins.js): the star in the top bar, the Pin / Unpin menu on a menu row, and the Edit dialog. */
.pin-star { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--quiet); cursor: pointer; }
.pin-star:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); }
.pin-star[aria-pressed='true'] { color: var(--accent-line); border-color: var(--accent-line); background: var(--accent-tint); }
.pin-star[aria-pressed='true'] .ico path { fill: currentColor; }
.pin-star:disabled { opacity: .45; cursor: default; }

.pin-menu { position: fixed; z-index: 70; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(8, 28, 36, 0.28); }
.pin-menu-item { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius); background: none; color: var(--ink); font: inherit; font-size: .9375rem; text-align: left; cursor: pointer; }
.pin-menu-item:hover, .pin-menu-item:focus-visible { background: var(--surface-2); }

.pins-edit { display: grid; gap: var(--sp-5, 20px); }
.pins-section { display: grid; gap: 10px; min-width: 0; }
.pins-section h3 { margin: 0; font-size: 1.0625rem; }
.pins-section h3:focus-visible { outline-offset: 4px; }
.pins-section > p { margin: 0; }
.pins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pins-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pins-row.dragging { border-color: var(--accent-line); box-shadow: 0 6px 18px rgba(8, 28, 36, 0.22); background: var(--accent-tint); }
.pins-grip { display: inline-grid; place-items: center; flex: none; width: 28px; height: 36px; color: var(--quiet); cursor: grab; touch-action: none; border-radius: var(--radius-sm); }
.pins-grip:hover { color: var(--ink); background: var(--surface-2); }
.pins-row.dragging .pins-grip { cursor: grabbing; }
.pins-name { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-weight: 600; }
.pins-name.plain { font-weight: 400; }
.pins-name .ico { flex: none; color: var(--quiet); }
.pins-name span { min-width: 0; overflow-wrap: anywhere; }
.pins-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.pins-name-input { flex: 1; min-width: 120px; }
.pins-move { display: flex; gap: 4px; flex: none; }
.pins-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--quiet); cursor: pointer; }
.pins-icon-btn:hover:not(:disabled) { border-color: var(--line-strong); color: var(--ink); }
.pins-icon-btn:disabled { opacity: .35; cursor: default; }
.pins-row .btn.small { flex: none; }
.pins-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pins-foot p { margin: 0; flex: 1 1 100%; }
.pins-ask { padding: 10px 12px; border: 1px solid var(--closed-line-soft); border-radius: var(--radius); background: var(--closed-tint); }
.pins-sub { font-size: .875rem; color: var(--quiet); font-weight: 600; }
.pins-none { margin: 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--quiet); }
.pins-bar { padding-top: var(--sp-5, 20px); border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .pin-menu-item { min-height: 44px; }
  .pins-row { flex-wrap: wrap; justify-content: flex-end; }
  .pins-name { flex: 1 1 60%; }
  .pins-rename { flex: 1 1 100%; }
  .pins-grip { width: 36px; height: 44px; }
  .pins-icon-btn { width: 44px; height: 44px; }
  .pins-row .btn.small, .pins-foot .btn.small { min-height: 44px; }
}
/* nav pins: end */

/* ---- Trash and recycling: collection routes (2026.11.22, public/js/trash-routes.js) ---- */
/* The driver's list is used in gloves and in the sun: rows at least 72px, buttons 64px tall, bold words, no thin grays. */
.rt-h { margin: 8px 0; }
.rt-daybar { align-items: end; margin: 12px 0; }
.rt-daybar input[type='date'], .rt-daybar input[type='month'] { width: auto; max-width: 220px; }
.rt-routes { display: grid; gap: 12px; }
.plain.rt-routes li { padding: 0; border-bottom: none; }
.rt-card { display: grid; gap: 8px; padding: 16px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 72px; }
.rt-card:hover, .rt-card:focus-visible { border-color: var(--ink); }
.rt-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; font-size: 1.125rem; }
.rt-card-meta { color: var(--ink-2); font-size: 0.9375rem; }
.rt-card .state { white-space: normal; text-align: left; align-items: baseline; } /* "Delayed for snow: now Friday, November 13" wraps on a phone */
.rt-card-top > b { min-width: 0; overflow-wrap: anywhere; }
.rt-card.rt-delayed { border-color: var(--warn-line); background: var(--warn-bg); }
.rt-bar { display: flex; height: 12px; border-radius: var(--radius-pill); background: var(--snowpack); overflow: hidden; border: 1px solid var(--line-strong); }
.rt-bar-done { background: var(--open); }
.rt-bar-skip { background: var(--closed); }
.rt-head { position: sticky; top: 0; z-index: 2; background: var(--snowpack); padding: 8px 0 12px; display: grid; gap: 6px; border-bottom: 2px solid var(--line-strong); }
.rt-head h2 { margin: 0; font-size: 1.5rem; }
.rt-sub, .rt-count { margin: 0; font-size: 1.0625rem; }
.rt-stops { display: grid; gap: 10px; margin: 12px 0; }
.plain li.rt-stop, .rt-stop { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; min-height: 72px; padding: 12px 14px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.rt-stop-words { display: grid; gap: 4px; font-size: 1.1875rem; line-height: 1.3; }
.rt-stop-words b { font-weight: 800; }
.rt-why { font-size: 0.9375rem; color: var(--ink-2); font-weight: 600; }
.rt-tag { justify-self: start; font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--info-tint); color: var(--ink); }
.plain li.rt-stop.rt-done, .rt-stop.rt-done { border-color: var(--open-line); background: var(--open-tint); }
.plain li.rt-stop.rt-skipped, .rt-stop.rt-skipped { border-color: var(--closed-line); background: var(--closed-tint); }
.rt-waiting-row { border-style: dashed; }
.rt-acts { display: flex; gap: 10px; }
.rt-btn { font: inherit; font-size: 1.125rem; font-weight: 800; min-height: 64px; min-width: 88px; padding: 8px 16px; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; text-align: center; text-decoration: none; touch-action: manipulation; }
.rt-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rt-done-btn { background: var(--open); border-color: var(--open); color: var(--on-fill); }
.rt-skip-btn { background: var(--surface); }
.rt-undo-btn { min-width: 72px; font-size: 1rem; border-color: var(--line-strong); }
.rt-reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rt-reason[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
.rt-sheet-q { font-size: 1.25rem; font-weight: 800; margin: 0; }
.rt-note, .rt-odo { font-size: 1.25rem; min-height: 56px; }
.rt-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rt-photo-btn { width: 100%; }
.rt-preview { max-width: 100%; max-height: 220px; border-radius: var(--radius); }
.rt-trucks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rt-truck { display: grid; gap: 2px; text-align: left; place-items: start; }
.rt-truck span { font-size: 0.9375rem; font-weight: 600; }
.rt-truck[aria-checked='true'] { background: var(--ink); color: var(--surface); }
.rt-truck:disabled { opacity: 0.55; cursor: not-allowed; }
.rt-start { display: grid; gap: 12px; margin: 12px 0; }
.rt-pre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rt-finish { display: grid; margin: 16px 0; }
.rt-finish .btn { min-height: 64px; font-size: 1.125rem; }
.rt-waiting { padding: 12px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--warn-line); font-size: 1rem; }
.rt-refused { margin: 6px 0 0; color: var(--closed-ink); font-weight: 700; }
.rt-delayed { font-size: 1.125rem; font-weight: 700; }
.rt-map { height: 360px; margin-top: 12px; }
.rt-quote { margin: 0; padding: 10px 14px; border-left: 4px solid var(--line-strong); background: var(--surface-2); }
.rt-h3 { margin-top: 20px; }
.rt-seg button { white-space: nowrap; }
@media (max-width: 700px) {
  .rt-seg { display: flex; flex-wrap: wrap; overflow: visible; }
  .rt-seg button { flex: 1 1 auto; border-bottom: 1px solid var(--line-strong); }
  .rt-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
  .rt-figures .figure { min-width: 0; margin: 0; padding: 0 8px 0 0; }
  .rt-figures .figure strong { font-size: 1.75rem; }
}
@media (max-width: 520px) {
  .plain li.rt-stop, .rt-stop { grid-template-columns: 1fr; }
  .rt-acts { display: grid; grid-template-columns: 1fr 1fr; }
  .rt-acts > :only-child { grid-column: 1 / -1; }
  .rt-acts .rt-undo-btn { grid-column: 1 / -1; }
  .rt-map { height: 280px; }
}
@media print {
  .rt-acts, .rt-waiting, .rt-start, .rt-finish, .rt-tools { display: none; }
  .rt-head { position: static; }
}
/* collection routes: end */
/* ---------- Trash and recycling: tonnage by month (2026.11.22, views/trash-tonnage.js) ---------- */
.tn-bar { display: flex; min-width: 120px; height: 12px; border-radius: var(--radius-xs); overflow: hidden; background: var(--panel-alt); }
.tn-bar span { display: block; height: 100%; }
.tn-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--quiet); }
.tn-legend i { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-xs); margin-right: 6px; vertical-align: -1px; }
.tn-trash { background: var(--quiet); }
.tn-recycling { background: var(--prog-todo); }
.tn-yard { background: var(--open); }
.tn-food { background: var(--hold); }
.tn-other { background: var(--line-strong); }

/* ---------------------------------------------------------------- fix/ops 2026.11.23 */
/* A new release while the app is open: a small bar at the bottom, above the phone bar, never covering a form. */
.newversion-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: min(560px, calc(100vw - 32px)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,.18)); font-size: .95rem; }
.newversion-bar .newversion-note { flex-basis: 100%; color: var(--warn-ink, var(--ink)); }
@media (max-width: 700px) { .newversion-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
/* A municipality's first-day checklist on Today. */
.first-day { display: grid; gap: 8px; margin-bottom: 12px; border-left: 6px solid var(--accent); }
.first-day-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; }
.first-day-steps li p { margin: 2px 0 4px; }
.first-day-steps li.is-done b { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
/* Settings, Payments: what Stripe still needs. */
.payments-checklist .checklist { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.sample-file { margin-left: 4px; }

/* Cases on this phone (no signal, 2026.11.24): room below the list so the floating New case button never covers a case. */
[data-area='kept-cases'] { margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* Data import (2026.11.26): the console's Import data and the app's Settings > Import */
.importer .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.importer td select { max-width: 100%; }
.importer .req { font-weight: 600; }
.importer .lead { font-size: 1.05rem; }
.importer li.warn { color: var(--warn-ink, inherit); }
.set-rows > .importer { padding: 14px 20px 20px; }
@media (max-width: 640px) { .set-rows > .importer { padding: 12px 16px 16px; } }
