/* Badgework look (PROJECT_BRIEF.md → "Look"). Nov 15, 2026: "Professional" — universal, clean, organized, like a
   dashboard at a very successful company: neutral grays, one restrained accent (Ink), fine lines and almost no
   shadow, 6/10px corners, compact 32px buttons with centered text and icons. Phones first, then 601 / 761 / 1024 / 1280.
   Green, yellow and red are only for operator levels and badges, never for status. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/PlusJakartaSans-latin.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --page: #F7F8FA;
  --box: #FFFFFF;
  --box-2: #F8F9FB;       /* table heads, quiet strips */
  --shade: #F1F3F6;       /* hover, tracks, chips */
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #586374;
  --faint: #94A3B8;
  --line: #E5E8EE;
  --line-2: #CBD2DC;      /* control borders */
  --line-strong: #0F172A;
  --accent: #1F2A44;
  --accent-hover: #0F172A;
  --accent-weak: #EEF0F4;
  --accent-ink: #FFFFFF;
  --main: #1F2A44;        /* the one filled button on a screen */
  --main-hover: #2B3854;
  --main-ink: #FFFFFF;
  --amber: #B45309;
  --amber-weak: #FEF3E2;
  --danger: #B91C1C;
  --exp: #0F172A;          /* Expired: solid dark */
  --exp-ink: #FFFFFF;
  /* Side menu */
  --side: #F8F9FB;
  --side-ink: #475569;
  --side-active: #FFFFFF;
  /* Operator level colors: only for levels and badges */
  --l1: #1E7B3A;
  --l2: #E8B500;
  --l3: #C62828;
  /* Chart series (validated for color blindness) */
  --ok: #94A3B8;
  --due: #A3ADBD;
  --done: #1F2A44;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 28px -8px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .05);
  --r: 6px;   /* controls */
  --r2: 10px; /* cards */
  --head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Dark: follows the device unless Light is picked in Settings; or Dark picked on any device */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0B0D12;
    --box: #12151C;
    --box-2: #161A22;
    --shade: #1A1F29;
    --ink: #E8ECF2;
    --ink-2: #C3CAD5;
    --muted: #8A94A6;
    --faint: #5F697A;
    --line: #222733;
    --line-2: #343B4A;
    --line-strong: #E8ECF2;
    --accent: #E8ECF2;
    --accent-hover: #FFFFFF;
    --accent-weak: #1E2430;
    --accent-ink: #0B0D12;
    --main: #E8ECF2;
    --main-hover: #FFFFFF;
    --main-ink: #0B0D12;
    --amber: #F5A524;
    --amber-weak: #2E2310;
    --danger: #F87171;
    --exp: #E8ECF2;
    --exp-ink: #0B0D12;
    --side: #0F1218;
    --side-ink: #AEB6C4;
    --side-active: #1A1F29;
    --ok: #64748B;
    --due: #5F697A;
    --done: #C3CAD5;
    --shadow: none;
    --shadow-lg: 0 12px 28px -8px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --page: #0B0D12;
  --box: #12151C;
  --box-2: #161A22;
  --shade: #1A1F29;
  --ink: #E8ECF2;
  --ink-2: #C3CAD5;
  --muted: #8A94A6;
  --faint: #5F697A;
  --line: #222733;
  --line-2: #343B4A;
  --line-strong: #E8ECF2;
  --accent: #E8ECF2;
  --accent-hover: #FFFFFF;
  --accent-weak: #1E2430;
  --accent-ink: #0B0D12;
  --main: #E8ECF2;
  --main-hover: #FFFFFF;
  --main-ink: #0B0D12;
  --amber: #F5A524;
  --amber-weak: #2E2310;
  --danger: #F87171;
  --exp: #E8ECF2;
  --exp-ink: #0B0D12;
  --side: #0F1218;
  --side-ink: #AEB6C4;
  --side-active: #1A1F29;
  --ok: #64748B;
  --due: #5F697A;
  --done: #C3CAD5;
  --shadow: none;
  --shadow-lg: 0 12px 28px -8px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0; min-height: 100vh;
  background: var(--page); color: var(--ink);
  font: 400 14px/1.5 var(--body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 14.5px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--accent-hover); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sub { color: var(--muted); }
.nw { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
/* The clean look (Trevor, Nov 15; PROJECT_BRIEF.md → "Buttons"): compact, flat, no shadow; one filled button per
   screen or form for its main action; outlined for the rest; red outline for anything that removes or stops;
   words, not icons. Touch screens get an invisible 44px tap area (see the end of this file). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--box); color: var(--ink);
  font: 600 13px/1 var(--body); text-align: center; vertical-align: middle;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .05); transition: background .12s, border-color .12s;
}
.btn:active { box-shadow: none; transform: translateY(.5px); }
.btn.main { background: var(--main); border-color: var(--main); color: var(--main-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(15, 23, 42, .18); }
.btn.pill { border-radius: 999px; padding: 0 18px; } /* Sign out (Trevor, Nov 15) */
.btn.danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line-2)); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
/* A quiet secondary button: just the words and icon, no border or fill */
.btn.subtle { min-height: 32px; padding: 0 8px; margin-right: -8px; border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.subtle svg { width: 16px; height: 16px; color: var(--muted); }
.btn:disabled { opacity: .6; cursor: default; }
.btn svg { width: 15px; height: 15px; flex: none; display: block; }
.btn-quiet, .link-btn {
  min-height: 32px; padding: 0 8px; border: 0; background: none; color: var(--ink);
  font: 600 13px var(--body); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px;
}
@media (hover: hover) {
  .btn.main:hover { background: var(--main-hover); border-color: var(--main-hover); color: var(--main-ink); }
  .btn:not(.main):hover { background: var(--box-2); border-color: color-mix(in srgb, var(--line-2) 70%, var(--ink)); color: var(--ink); }
  .btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
  .btn.subtle:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
  .btn-quiet:hover, .link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }
}

/* ---------- Fields ---------- */
.field { margin-top: 18px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--box); color: var(--ink);
  font: 400 14px var(--body);
}
select.input { padding-right: 32px; }
.input::placeholder { color: var(--faint); opacity: 1; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.input[aria-invalid="true"], .input[aria-invalid="true"]:focus { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.code-input { font: 700 22px var(--head); letter-spacing: .12em; text-align: center; }
.notice { margin-top: 12px; color: var(--danger); font-weight: 600; }

/* ---------- App frame: side menu (computers), top bar, phone tab bar ---------- */
.app { min-height: 100vh; }
.side { display: none; }
.top { position: sticky; top: 0; z-index: 5; padding: 0 16px; background: color-mix(in srgb, var(--box) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px; max-width: 1208px; min-height: 56px; margin: 0 auto; }
.mark { display: flex; align-items: center; gap: 9px; min-height: 44px; font: 700 15px/1 var(--head); color: var(--ink); text-decoration: none; flex: none; }
.mark-badge { width: 18px; height: 24px; border-radius: 5px; background: var(--accent); position: relative; flex: none; }
.mark-badge::after { content: ""; position: absolute; left: 5px; right: 5px; top: 4px; height: 3px; border-radius: 2px; background: var(--accent-ink); }
.top-search { display: none; flex: 1; max-width: 460px; }
.top-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Find anyone from any page */
.search { position: relative; }
.search .input { padding-left: 36px; }
.search .input, .input[type="search"] { border-radius: 999px; padding-right: 16px; background: var(--box-2); } /* search bars are pills (Trevor, Nov 15) */
.input[type="search"]:not(.search .input) { padding-left: 16px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
/* The "/" shortcut: a small square with the slash dead center (Trevor, Nov 16) */
.search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--box-2); color: var(--muted);
  font: 600 12px/1 var(--body); pointer-events: none;
}
.top-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: min(70vh, 520px); overflow: auto; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: var(--shadow-lg); }

/* Account menu: on phones the initials in the top bar; on computers your name at the foot of the side menu */
.acct { position: relative; flex: none; }
.acct-btn {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px;
  border: 0; border-radius: 999px; background: none; color: var(--ink); font: 600 13.5px/1 var(--body); cursor: pointer;
}
.acct-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-btn[aria-expanded="true"] { background: var(--shade); }
@media (hover: hover) { .acct-btn:hover { background: var(--shade); } }
.acct-init {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent-weak); color: var(--accent); font: 700 12px/1 var(--body); letter-spacing: .02em;
}
.acct-name { display: none; }
.acct-caret { display: none; width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.acct-btn[aria-expanded="true"] .acct-caret { transform: rotate(180deg); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: 260px; max-width: calc(100vw - 32px);
  background: var(--box); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r2);
  box-shadow: var(--shadow-lg);
}
.acct-who { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.acct-text { display: grid; gap: 2px; min-width: 0; font-size: 13px; color: var(--muted); }
.acct-text b { font-size: 14px; color: var(--ink); }
.acct-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; justify-content: center; }
/* Manage access, Transfer ownership (Nov 15) */
.acct-links { display: grid; padding: 6px 8px; border-top: 1px solid var(--line); }
.acct-link { display: flex; align-items: center; min-height: 40px; padding: 0 8px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.acct-link[hidden] { display: none; }
@media (hover: hover) { .acct-link:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); } }
.acct-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (pointer: coarse) { .acct-link { min-height: 44px; } }
/* The look (Auto / Light / Dark), above Sign out; computers and tablets only */
.acct-look { display: grid; gap: 6px; padding: 10px 16px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.acct-look .seg button { flex: 1; justify-content: center; }
.acct-out { width: 100%; justify-content: center; }
/* Back to top: a small round button, only after scrolling a long page */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 20px; z-index: 30; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 99px; background: var(--box); color: var(--ink-2); box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .to-top:hover { background: var(--shade); color: var(--ink); } }
@media (max-width: 600px) { .to-top { bottom: calc(70px + env(safe-area-inset-bottom)); } } /* above the tab bar */
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
.req-row .link-btn { grid-column: 2; grid-row: 1 / span 2; }
@media (min-width: 761px) { .req-row .link-btn { grid-column: 3; grid-row: 1; } }
/* Settings → Required training: one row per group */
.req-list { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r2); background: var(--box); }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 14px; }
.req-row + .req-row { border-top: 1px solid var(--line); }
.req-note { margin-top: 10px; font-size: 13px; }
.req-row.off .rq-who b, .req-row.off .rq-what { color: var(--muted); }
.renew-pick { display: flex; gap: 8px; grid-column: 2; margin-top: 6px; }
.renew-pick .input:first-child { width: 84px; }
.renew-pick select.input { width: auto; }
.rq-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.rq-what { grid-column: 1; font-size: 14px; color: var(--ink-2); }
.req-row .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (min-width: 761px) { .req-row { grid-template-columns: 220px minmax(0, 1fr) auto; } .rq-what { grid-column: 2; } .req-row .btn { grid-column: 3; grid-row: 1; } }
/* Settings → Your account (the Sign out on phones, where the top bar has no account circle) */
.me-card { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--box); }
/* Settings → Organization: logo and name (Nov 15); no box until a logo is set */
.co-card { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--box); }
.co-card[hidden] { display: none; }
.conn-list { margin-top: 12px; }
.section h2[id] { scroll-margin-top: 84px; } /* a jump from Home's Set up lands below the top bar */
.conn-side { display: flex; align-items: center; gap: 12px; flex: none; }
@media (max-width: 479px) { .conn-side .tag { display: none; } }
.co-text { display: grid; gap: 2px; min-width: 0; }
.co-text > span { overflow-wrap: anywhere; color: var(--muted); }
.co-text b { font-weight: 600; }
.co-logo { display: block; max-height: 48px; max-width: 140px; width: auto; height: auto; object-fit: contain; padding: 4px; background: #FFFFFF; border-radius: var(--r); }
.co-logo-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.co-logo-field legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.co-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.co-logo-tile { display: flex; align-items: center; justify-content: center; width: 168px; height: 64px; padding: 8px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r); }
.co-logo-tile img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.co-logo-tile.empty { background: transparent; border-style: dashed; }
.co-logo-acts { display: flex; gap: 8px; }
.co-logo-acts [hidden] { display: none; }
.me-card .me-text { min-width: 0; } /* Sign out stays on the right at every width (Trevor, Nov 15) */
.me-card .me-text > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .btn { flex: none; }
.me-text { display: grid; gap: 2px; min-width: 0; color: var(--muted); font-size: 13px; }
.me-text b { color: var(--ink); font-size: 15px; }
/* Phones: no account circle in the top bar; Sign out is in Settings */
@media (max-width: 600px) { .top .acct { display: none; } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(var(--n, 4), 1fr);
  background: var(--box); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.tabbar-2 { --n: 2; } .tabbar-3 { --n: 3; } .tabbar-4 { --n: 4; } .tabbar-5 { --n: 5; }
.tabbar .tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 54px; color: var(--muted); text-decoration: none; font: 500 12px/1 var(--body);
}
.tabbar .tab svg { width: 20px; height: 20px; }
.tabbar .tab[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tab-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 12px/18px var(--body); text-align: center; }
.has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.side-badge { margin-left: auto; padding: 1px 7px; border-radius: 99px; background: var(--shade); color: var(--ink-2); font: 600 12px/18px var(--body); }
.side-badge.hot { background: var(--accent); color: var(--accent-ink); }

@media (min-width: 601px) {
  .top-search { display: block; }
  .top-acts .btn .lab { display: inline; }
}
@media (min-width: 1024px) {
  .tabbar { display: none; }
  .has-tabbar { padding-bottom: 0; }
  .app { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
    padding: 0 12px 12px; background: var(--side); color: var(--side-ink); border-right: 1px solid var(--line);
  }
  .side .mark { min-height: 56px; margin: 0 -12px 12px; padding: 0 22px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--r); color: var(--side-ink); font-weight: 500; font-size: 13.5px; text-decoration: none; }
  .side-nav a svg { width: 18px; height: 18px; flex: none; }
  .side-nav a[aria-current="page"] { background: var(--side-active); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
  @media (hover: hover) { .side-nav a:hover { background: var(--shade); color: var(--ink); } }
  .side .acct { margin-top: auto; }
  .side .acct-btn { width: 100%; padding: 8px 10px; border-radius: var(--r); color: var(--ink); text-align: left; }
  .side .acct-btn[aria-expanded="true"] { background: var(--side-active); }
  @media (hover: hover) { .side .acct-btn:hover { background: var(--side-active); } }
  .side .acct-init { background: var(--accent-weak); color: var(--ink); }
  .side .acct-name { display: grid; gap: 2px; min-width: 0; margin-right: auto; }
  .side .acct-name span { color: var(--side-ink); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side .acct-caret { display: block; color: var(--side-ink); transform: rotate(180deg); }
  .side .acct-btn[aria-expanded="true"] .acct-caret { transform: none; }
  .side .acct-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; }
  .top .mark, .top .acct { display: none; }
  .top { padding: 0 32px; }
  .top-in { max-width: 1216px; }
}

/* ---------- Page ---------- */
.wrap {
  max-width: 1280px; margin: 0 auto; padding: 20px 16px 0;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
}
.wrap.narrow { max-width: 760px; padding-bottom: 40px; }
@media (min-width: 761px) { .wrap { padding-top: 24px; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); } }
@media (min-width: 1024px) { .wrap { padding: 24px 32px 48px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 20px; }
.page-head h1 { margin-right: auto; }
.placeholder-note { margin-top: 20px; color: var(--muted); }

/* ---------- Panels (cards) ---------- */
.panel { background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); padding: 14px; min-width: 0; box-shadow: var(--shadow); }
.panel h2 { margin-bottom: 10px; }

/* ---------- Count tiles ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 14px 16px; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.kpi-label { color: var(--muted); font-weight: 600; font-size: 13px; line-height: 1.2; }
.kpi .num { font: 650 24px/1.1 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.soon .num { color: var(--amber); }
@media (hover: hover) { .kpi:hover { background: var(--box-2); } }
@media (min-width: 761px) { .kpis { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Status tags and level chips ---------- */
.tag {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 22px; padding: 0 8px;
  border: 0; border-radius: 6px; background: var(--box); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 12px/1 var(--body); white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tag:has(svg)::before { display: none; }
.tag.good { background: var(--box); color: var(--ink-2); }
.tag.soon { background: var(--amber-weak); color: var(--amber); box-shadow: none; }
.tag.expired { background: var(--exp); color: var(--exp-ink); box-shadow: none; }
.tag.check { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag svg { width: 11px; height: 11px; flex: none; }
.lvl { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; }
.lvl i { width: 12px; height: 16px; border-radius: 3px; position: relative; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.lvl i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 2.5px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.85); }
.lvl.l1 i { background: var(--l1); } .lvl.l2 i { background: var(--l2); } .lvl.l3 i { background: var(--l3); }

/* ---------- Badge scan: what anyone sees when they scan a badge ---------- */
.badge-body { background: var(--page); }
.badge-main { width: 100%; max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.bd-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r2); background: var(--box); box-shadow: var(--shadow); }
.bd-none { padding: 24px 20px; }
.bd-none h1 { font-size: 20px; margin-bottom: 6px; }
.bd-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-size: 14px; }
.bd-banner svg { width: 26px; height: 26px; flex: none; }
.bd-banner span { display: grid; gap: 2px; }
.bd-banner b { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.bd-banner.ok { background: var(--accent-weak); color: var(--accent); }
.bd-banner.warn { background: var(--amber-weak); color: var(--amber); }
.bd-banner.stop { background: #B42318; color: #FFFFFF; }
.bd-banner.stop b { text-transform: uppercase; }
.bd-banner.off { background: var(--shade); color: var(--ink-2); }
.bd-head { padding: 16px 18px 4px; }
.bd-head h1 { font-size: 24px; line-height: 1.2; }
.bd-head .sub { margin-top: 2px; }
.bd-sec { padding: 14px 18px 4px; }
.bd-sec + .bd-sec { border-top: 1px solid var(--line); }
.bd-sec h2 { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bd-runs { display: grid; gap: 2px; padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.bd-runs .k { color: var(--muted); font-size: 13px; }
.bd-runs .v { font-weight: 650; }
.bd-runs.no .v { color: var(--muted); }
.bd-runs .why { color: var(--danger); font-size: 13px; font-weight: 600; }
.bd-list { list-style: none; margin: 0; padding: 0; }
.bd-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 10px 0; }
.bd-list li + li { border-top: 1px solid var(--line); }
.bd-name { font-weight: 650; }
.bd-dates, .bd-note { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.bd-dates b { color: var(--ink); font-weight: 600; }
.bd-empty { padding: 6px 0 12px; }
.bd-foot { margin-top: 14px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Sign-in and 404 ---------- */
.signin-main {
  width: 100%; max-width: 420px; margin: 0 auto; padding: 40px 16px 48px;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
}
.signin-mark { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 24px; font: 700 17px/1 var(--head); }
.signin-mark .mark-badge { width: 20px; height: 26px; }
.signin-card { padding: 24px 20px; border-radius: var(--r2); box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12); }
.signin-card h1 { font-size: 20px; }
.signin-card .sub { margin-top: 6px; }
.signin-card .btn.block { margin-top: 18px; min-height: 38px; }
.signin-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 12px; }
.hint { margin-top: 16px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Preview page and bar (preview only: remove before launch) ---------- */
.preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px;
  padding: 4px 16px; background: #2B2F36; color: #FFFFFF; font-size: 14px;
}
.preview-bar a { display: inline-flex; align-items: center; min-height: 44px; color: #FFFFFF; font-weight: 600; }
.preview-code { font: 700 16px var(--head); letter-spacing: .1em; }
.preview-sec { margin-top: 16px; }
.preview-sec p + p { margin-top: 6px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .meta { display: block; color: var(--muted); font-size: 14px; }
.plain-list .email { color: var(--muted); font-size: 14px; align-self: center; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* =====================================================================
   Home (PROJECT_BRIEF.md → "Look", Nov 14, 2026 rework): Tasks first, then the picture
   ===================================================================== */

/* Search results (top bar and People) */
.results { margin-top: 8px; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; box-shadow: var(--shadow); }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 8px 16px 8px 13px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent;
}
.result-list li.lv1 { border-left-color: var(--l1); }
.result-list li.lv2 { border-left-color: var(--l2); }
.result-list li.lv3 { border-left-color: var(--l3); }
@media (hover: hover) { .result-list li:hover { background: var(--box-2); } }
.r-name { font-weight: 600; min-width: 0; color: var(--ink); }
.role-tag { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: #475467; color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1.35; vertical-align: 1px; white-space: nowrap; }
/* One solid color per role (Trevor, Nov 15): Foreman green (brighter than the Lvl 1 green), Safety blue, Super purple,
   director and up black (white in dark mode so it doesn't disappear) */
.role-tag.r-super { background: #7E22CE; }
.role-tag.r-gs { background: #3B0764; } /* General Super: a deeper purple, a step above Super */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role-tag.r-gs { background: #C084FC; color: #2E1065; } }
:root[data-theme="dark"] .role-tag.r-gs { background: #C084FC; color: #2E1065; }
.role-tag.r-safety { background: #1D4ED8; }
.role-tag.r-foreman { background: #4ADE80; color: #052E16; }
.role-tag.r-lead { background: #101828; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role-tag.r-lead { background: #F2F4F7; color: #101828; } }
:root[data-theme="dark"] .role-tag.r-lead { background: #F2F4F7; color: #101828; }
.r-meta { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.r-foot { padding: 12px 16px; color: var(--muted); font-size: 13px; }
.result-list:last-child li:last-child { border-bottom: 0; }

/* Cards: a header row with a line under it, then the body */
.panel { overflow-wrap: normal; }
.panel > h2 { margin: -16px -16px 14px; padding: 15px 16px 14px; border-bottom: 1px solid var(--line); font: 650 14px/1.3 var(--body); }
.panel-foot, .panel .empty { margin-top: 12px; color: var(--muted); font-size: 13px; }
.panel.card { padding: 0; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 52px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.card-h h2 { display: flex; align-items: center; margin: 0; font-size: 14px; font-weight: 650; }
.card-h .sub { font-size: 12.5px; }
.card-b { padding: 16px; }
.card-f { display: flex; justify-content: center; padding: 6px 16px; border-top: 1px solid var(--line); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 8px; border-radius: 99px; background: var(--shade); color: var(--ink-2); font-size: 12px; font-weight: 700; }

/* Chart legend and columns over hairline grid lines */
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }
.k-due { background: var(--due); }
.k-renewed { background: var(--done); }
.chart { border-radius: 8px; touch-action: pan-y; }
.chart:focus-visible { outline-offset: 4px; }
.cols { position: relative; display: flex; align-items: flex-end; }
.cols.tall { height: 170px; padding-left: 28px; }
.cols.short { height: 140px; }
.cols .grid { position: absolute; top: 0; right: 0; bottom: 0; left: 28px; pointer-events: none; }
.gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.gl span { position: absolute; left: -28px; transform: translateY(-50%); width: 22px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.group { position: relative; flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 2px; height: 100%; transition: opacity .15s; }
.group.dim { opacity: .4; }
.bar { position: relative; display: block; width: min(18px, 40%); border-radius: 3px 3px 0 0; }
.bar.s-due { background: var(--due); }
.bar.s-renewed { background: var(--done); }
.bar.one { width: min(24px, 60%); background: var(--done); }
.bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 4px; font: 600 12px/1 var(--body); color: var(--ink); white-space: nowrap; }
.baseline { border-top: 1px solid var(--line-2); }
.chart .baseline { margin-left: 28px; }
.xlabels { display: flex; margin-top: 6px; }
.xlabels span { flex: 1; min-width: 0; padding: 0 1px; text-align: center; font-size: 12px; line-height: 1.2; color: var(--muted); }
.xlabels.months { padding-left: 28px; }
/* Small phones show every third month, phones every other month, bigger screens all twelve */
.xlabels.months span:not(:nth-child(3n+1)) { visibility: hidden; }
@media (min-width: 375px) {
  .xlabels.months span:not(:nth-child(3n+1)) { visibility: visible; }
  .xlabels.months span:nth-child(even) { visibility: hidden; }
}
@media (min-width: 601px) { .xlabels.months span:nth-child(even) { visibility: visible; } }
.readout { margin-top: 10px; font-weight: 600; font-size: 13.5px; min-height: 1.5em; }
.numbers { margin-top: 2px; }
.numbers summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin-left: -8px; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.numbers table { margin: 4px 0 0; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.numbers th, .numbers td { padding: 4px 14px; border-bottom: 1px solid var(--line); text-align: right; }
.numbers th[scope="row"], .numbers thead th:first-child { text-align: left; }

/* Page sections: a heading row with a line under it (People, a person's page, Classes, Settings…) */
.section { margin-top: 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 16px; }
.section-head .sub { font-size: 13px; }
/* A button in a section header (Invite someone, Add a training, Import a sheet): a bit shorter, with room above the line */
.section-head:has(.btn) { padding-bottom: 14px; }
.section-head .btn { min-height: 32px; padding: 0 12px; }

/* Greeting */
.hello { margin-bottom: 20px; }
.hello-date { color: var(--muted); font-size: 13px; font-weight: 600; }
.hello h1 { margin-top: 2px; }
.hello + .done-note { margin: -8px 0 16px; }

.home { display: grid; gap: 20px; }
.home-grid { display: grid; gap: 20px; }
.home-side { display: grid; gap: 20px; align-content: start; }
.trends { display: grid; gap: 20px; }
/* Home → Set up (Nov 15) */
.home > .setup-card { order: 0; }
.setup-list { list-style: none; margin: 0; padding: 4px 16px; }
.setup-list li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; }
.setup-list li + li { border-top: 1px solid var(--line); }
.su-mark { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); border-radius: 50%; }
.su-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.setup-list .done .su-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.setup-list .done .su-label { color: var(--muted); }
.su-label { flex: 1; min-width: 0; }
/* Phones: Tasks come before the numbers; with no class tasks (no Tasks card) the numbers lead */
.home > .home-grid { order: 1; }
.home > .status-card { order: 2; }
.home > .home-grid:not(:has(.tasks)) { order: 3; }
.home > .needs-card { order: 3; }
.home > .trends { order: 4; }
.home > .round-card { order: 2; }
/* Fall protection on Home (Nov 15): small live cards in one strip at the top, each one tap to the class screen */
.home > .live-strip { order: 0; }
.live-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.panel.live-card { display: grid; gap: 8px; align-content: start; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.live-card .track { background: var(--line); }
a.live-card { cursor: pointer; transition: border-color .12s, background .12s; }
@media (hover: hover) { a.live-card:hover { border-color: var(--line-2); background: var(--box-2); color: var(--ink); } }
a.live-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lc-head h2 { margin: 0; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-go { width: 16px; height: 16px; margin-left: auto; flex: none; color: var(--muted); }
.lc-line { margin: 0; color: var(--muted); font-size: 13px; }
.lc-num { display: flex; align-items: baseline; gap: 6px; margin: 0; min-width: 0; }
.lc-num b { font-size: 22px; font-weight: 650; line-height: 1; letter-spacing: -.02em; }
.lc-num > span { color: var(--muted); font-size: 13px; }
.lc-right { margin-left: auto; white-space: nowrap; font-size: 12.5px; }
.tag.live { background: var(--accent-weak); color: var(--ink); box-shadow: none; }

/* A round (Fall protection at every job site): "150 of 457 employees complete", a bar, then Not yet / Done */
.round-h-r { display: inline-flex; align-items: center; gap: 14px; }
.round-top { display: grid; gap: 8px; padding-bottom: 12px; }
.round-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; }
.round-n b { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.round-n span { color: var(--muted); font-size: 13.5px; }
.round-top .track { height: 8px; }
.round-foot { display: flex; justify-content: space-between; gap: 12px; margin: 0; color: var(--muted); font-size: 12.5px; }
.round-late { color: var(--ink); font-weight: 600; }
.round-bar { display: flex; padding: 0 16px 12px; border-bottom: 1px solid var(--line); }
.round-card.show-not .tbl :is(th, td):nth-child(2) { display: none; }

/* Employee training status */
.status-card { display: grid; gap: 14px; }
.status-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.status-top h2 { margin: 0; font-size: 15px; }
.status-top .sub { font-size: 13px; }
.sbar { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--shade); }
.sbar span { flex: 1 1 0; min-width: 4px; }
.b-ok { background: var(--ok); } /* On time: calm slate, so it never looks like Expired (solid dark) */
.b-soon { background: var(--amber); }
.b-exp { background: var(--exp); }
.stats { display: grid; margin: 0 -16px -16px; border-top: 1px solid var(--line); }
.stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stat:last-child { border-bottom: 0; border-radius: 0 0 var(--r2) var(--r2); }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .k::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.stat .v { grid-column: 2; grid-row: 1 / span 2; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat .s { color: var(--muted); font-size: 12px; }
.s-good { --c: var(--ok); } .s-soon { --c: var(--amber); } .s-expired { --c: var(--exp); }
@media (hover: hover) { .stat:hover { background: var(--box-2); color: var(--ink); } }

/* Tasks */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.task-list li:last-child { border-bottom: 0; }
.t-ic { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; }
.t-ic svg { width: 17px; height: 17px; }
.t-accent { background: var(--accent-weak); color: var(--accent); }
.t-warn { background: var(--amber-weak); color: var(--amber); }
.t-dark { background: var(--exp); color: var(--exp-ink); }
.t-grey { background: var(--shade); color: var(--ink-2); }
.t-tx b { display: block; font-weight: 650; }
.t-tx span { display: block; margin-top: 1px; color: var(--muted); font-size: 12.5px; }
.t-do { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tasks-clear { display: flex; align-items: center; gap: 10px; padding: 20px 16px; color: var(--muted); }
.tasks-clear svg, .done-today svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.done-today { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--box-2); border-radius: 0 0 var(--r2) var(--r2); color: var(--muted); font-size: 12.5px; }

/* 2 week look ahead (Nov 16): two rows of Monday to Friday; days already gone this week are quieter */
.week { list-style: none; margin: 0; padding: 12px 16px 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.week li.past { opacity: .55; }
.week li { display: grid; gap: 5px; align-content: start; min-width: 0; min-height: 76px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--box); }
.week li.today { box-shadow: inset 0 2px 0 var(--ink); }
.week li.today b { color: var(--ink); }
.week small { color: var(--muted); font-size: 12px; font-weight: 600; }
.week b { font-size: 15px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.week i { display: block; padding: 3px 5px; border-radius: 5px; background: var(--box); border: 1px solid var(--line); font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week .wk-tiny { display: none; }
/* Phones (Nov 15): the same two rows of five, compact, instead of a long list; class names use their short name */
@media (max-width: 600px) {
  .week { gap: 4px; padding: 10px 12px 12px; }
  .week li { min-height: 58px; padding: 6px 3px; gap: 4px; justify-items: center; text-align: center; }
  .week small { font-size: 12px; }
  .week b { font-size: 14px; }
  .week i { max-width: 100%; padding: 2px 3px; white-space: normal; line-height: 1.2; text-overflow: clip; }
  .week .wk-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* still read out in full */
  .week .wk-tiny { display: inline; }
}

/* OSHA program seats */
.prog { display: grid; gap: 12px; }
.prog-row { display: grid; gap: 6px; }
.prog-row div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.prog-row div span { color: var(--muted); }
.track { display: block; height: 6px; border-radius: 99px; background: var(--shade); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

/* Needs training next: a table with All / Expired / Due soon */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--shade); }
.seg button { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 600 12.5px var(--body); cursor: pointer; white-space: nowrap; }
.seg button span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: var(--box); color: var(--ink); box-shadow: var(--shadow); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 10px 12px; background: var(--box-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .hide-s { display: none; }
@media (hover: hover) { .tbl tbody tr:hover td { background: var(--box-2); } }
.tbl .who { display: grid; gap: 1px; color: var(--ink); text-decoration: none; }
.tbl .who b { font-weight: 600; white-space: nowrap; }
/* The narrowest phones: names may wrap and cells tighten, so the table fits without sideways scrolling */
@media (max-width: 360px) { .tbl .who b { white-space: normal; } .tbl th, .tbl td { padding-left: 8px; padding-right: 8px; } .tbl td { overflow-wrap: anywhere; } }
.tbl .who > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; color: var(--muted); font-size: 12.5px; }
.tbl .who .lvl { color: var(--ink-2); font-size: 12px; gap: 5px; }
.tbl .who .lvl i { width: 8px; height: 12px; border-radius: 2px; }
.tbl .who .lvl i::after { display: none; }
.tbl .due b { display: block; font-weight: 600; white-space: nowrap; }
.tbl .due span { display: block; color: var(--muted); font-size: 12.5px; }

/* Operators by level */
.levels { display: grid; gap: 14px; }
/* Percent circles beside the chart: the side column fills the chart's height, the circles take the extra room */
.trends-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rings-card { flex: 1; display: flex; flex-direction: column; }
.rings { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-content: center; gap: 14px 16px; }
.ring { display: grid; grid-template-columns: 68px minmax(0, 1fr); grid-template-areas: "c t" "c n"; align-items: center; column-gap: 12px; min-width: 0; }
.ring-wrap { grid-area: c; position: relative; width: 68px; }
.ring-wrap svg { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.ring-track { stroke: var(--shade); }
.ring-fill { stroke: var(--done); stroke-linecap: round; }
.ring-wrap b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.ring-t { grid-area: t; align-self: end; font-size: 13px; font-weight: 650; }
.ring-n { grid-area: n; align-self: start; color: var(--muted); font-size: 12px; line-height: 1.35; }
.lv-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 28px; align-items: center; gap: 10px; }
.lv-row .track { height: 8px; }
.lv-row .track i.l1 { background: var(--l1); } .lv-row .track i.l2 { background: var(--l2); } .lv-row .track i.l3 { background: var(--l3); }
.lv-row b { text-align: right; font-weight: 650; }
.lv-row .lvl { font-size: 13px; }

@media (min-width: 601px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { grid-template-columns: minmax(0, 1fr); gap: 2px; border-bottom: 0; border-right: 1px solid var(--line); }
  .stat:last-child { border-right: 0; border-radius: 0 0 var(--r2) 0; }
  .stat:first-child { border-radius: 0 0 0 var(--r2); }
  .stat .v { grid-column: 1; grid-row: 2; }
  .stat .s { grid-row: 3; }
  .tbl .hide-s { display: table-cell; }
  .tbl th, .tbl td { padding: 10px 16px; }
  .task-list li { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; }
  .t-ic { grid-row: auto; }
  .t-do { grid-column: 3; margin-top: 0; justify-content: flex-end; }
  .trends { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  .home > * { order: 0 !important; }
  .home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; }
  /* Beside Tasks, the side column is always as tall as Tasks (Trevor, Nov 16: no leftover space): the 2 week look
     ahead takes up whatever room is left, its two week rows sharing it evenly */
  .home-grid:has(.tasks) { align-items: stretch; }
  .home-grid:has(.tasks) .home-side { grid-template-rows: minmax(0, 1fr); grid-auto-rows: auto; align-content: stretch; }
  .home-grid:has(.tasks) .week-card { display: flex; flex-direction: column; }
  .home-grid:has(.tasks) .week { flex: 1; grid-auto-rows: 1fr; }
}

/* =====================================================================
   Employee page (PROJECT_BRIEF.md → "Look"): the badge card, then certs by Equipment / Safety
   ===================================================================== */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-left: -4px; padding: 0 4px; color: var(--ink); text-decoration: none; font-weight: 600; }
.back svg { width: 18px; height: 18px; }
.missing-head { margin: 12px 0 8px; }
.person { display: grid; gap: 16px; padding: 12px 0 4px; }
.person .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.person .actions .btn { flex: none; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.not-yet { margin-top: 10px; color: var(--muted); font-size: 14px; }
@media (min-width: 601px) { .person .actions .btn { flex: none; } }

/* The badge itself: drawn like the printed card, so it stays white in dark mode too */
.idcard {
  max-width: 380px;
  background: #FFFFFF; color: #142026;
  border: 1px solid #C9D2D6; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.idcard-band { padding: 10px 16px; background: #D2D9DC; color: #142026; font: 700 14px/1 var(--head); letter-spacing: .06em; text-transform: uppercase; }
.idcard.lv1 .idcard-band { background: var(--l1); color: #FFFFFF; }
.idcard.lv2 .idcard-band { background: var(--l2); }
.idcard.lv3 .idcard-band { background: var(--l3); color: #FFFFFF; }
.idcard-body { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; }
.idcard-body > div { min-width: 0; }
.idcard-name { font-size: 22px; }
.idcard-body span { display: block; margin-top: 4px; color: #4F5D64; font-size: 14px; }
.idcard-body span b { font-weight: 400; }
.idcard-qr { display: block; width: 76px; height: 76px; flex: none; border-radius: 4px; }
.idcard-qr svg { display: block; width: 100%; height: 100%; }
.idcard-qr:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.details-link { align-self: center; }

/* Cannot operate: a dark band on the badge, a box on the page */
.idcard.held .idcard-band { background: #142026; color: #FFFFFF; }
.idcard.coord .idcard-band { background: #1E3A8A; color: #FFFFFF; } /* Safety coordinator: navy, never a level color */
/* Inactive (Nov 16): the whole badge greyed out, with only the Inactive tag and Mark active under it */
.idcard.off { filter: grayscale(1); opacity: .5; }
.idcard.off .idcard-band { background: #D2D9DC; color: #142026; }
.off-row { align-items: center; }
.cert-head { margin-top: 24px; }
.idcard-body .idcard-warn { color: #B42318; font-weight: 600; }
.hold-box { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--danger); border-left-width: 4px; border-radius: var(--r); background: var(--box); }
.hold-box b { color: var(--danger); }
/* Missing required training, on the person page */
.miss-box { margin: 16px 0 4px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--exp); border-radius: var(--r); background: var(--box); }
.miss-box h2 { margin-bottom: 6px; font-size: 15px; }
.miss-box ul { list-style: none; margin: 0; padding: 0; }
.miss-box li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 8px 0; }
.miss-box li + li { border-top: 1px solid var(--line); }
.mb-name { font-weight: 650; }
.mb-why { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.miss-box > .sub { margin-top: 6px; font-size: 13px; }
.hold-box .link-btn { margin-left: -8px; }
.cleared { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cleared h3 { font: 600 16px/1.25 var(--body); margin-bottom: 4px; }
.cleared-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.cleared-head h3 { margin: 0; }
.mpick { position: relative; }

.mpick-link { display: inline-flex; align-items: center; gap: 4px; margin-right: -8px; }
.mpick-link svg { width: 16px; height: 16px; }
.mpick-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; display: grid; gap: 2px; width: max-content; min-width: 230px; max-width: calc(100vw - 32px); padding: 8px; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.mpick-panel[hidden] { display: none; }
.mpick-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: var(--r); cursor: pointer; }
.mpick-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.mpick-all { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; margin-bottom: 2px; }
.mpick-actions { display: flex; gap: 8px; padding: 8px 0 0; }
@media (hover: hover) { .mpick-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); } }
.cleared .sub { font-size: 14px; }
.hold-set { margin: 8px 0 0; }
.cant-op { color: var(--danger); font-weight: 600; }
.rep-machines { display: block; margin-top: 4px; font-size: 13px; }

/* Cert rows */
.certs { list-style: none; margin: 0; padding: 0; }
.cert { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cert h3 { font: 600 16px/1.25 var(--body); }
.cert .tag { align-self: start; }
.cert .dates { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); font-size: 14px; }
.cert .dates b { color: var(--ink); font-weight: 600; }
.cert .extra, .cert .not-yet { grid-column: 1 / -1; }
.cert .extra .link-btn { margin-left: -8px; }
.cert .verify { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 14px; }
.cert .not-yet { margin-top: 0; }
.section .empty { margin-top: 12px; color: var(--muted); }
@media (min-width: 761px) { .cert { padding: 16px 0; } }

/* Person page, in order: Equipment, Safety training, Operator level, Details. Computers: two rows of two
   (Equipment | Safety training, then Operator level | Details; Trevor, Nov 16). Phones and tablets: one column. */
.two-col { display: grid; gap: 0 40px; }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Person page: Details (title, work email), Edit details and Mark inactive (Nov 15) */
.details { list-style: none; margin: 0; padding: 0; }
.details li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details li > span:first-child { color: var(--muted); flex: none; }
.details li > span:last-child { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.details .unset { color: var(--muted); }
/* The Details panel (Nov 16): name, number, title, work email, each with a small pencil before it for admins.
   Every line is the same height, so changing one doesn't make the panel jump. */
.sheet .details li { align-items: center; min-height: 48px; padding: 6px 0; }
.details .detail-val { display: inline-flex; align-items: center; gap: 6px; }
.pencil {
  position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px;
  padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; flex: none;
}
.pencil svg { width: 13px; height: 13px; }
.pencil::after { content: ''; position: absolute; inset: -10px; } /* a 44px tap area on touch screens */
@media (hover: hover) { .pencil:hover { color: var(--accent); background: var(--shade); } }
.pencil:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Changing one: label, box, then Cancel and Save on the same line (stacked on phones) */
.details li.detail-edit { display: block; }
.detail-edit form { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: start; }
.detail-edit .detail-label { color: var(--muted); line-height: 34px; }
.detail-edit .input { height: 34px; min-height: 34px; padding: 0 10px; }
.detail-acts { display: flex; justify-content: flex-end; gap: 6px; }
.detail-acts .btn:not(.main) { border-color: transparent; background: none; color: var(--ink-2); }
.detail-edit .form-error { margin: 0; }
@media (min-width: 601px) {
  .detail-edit form { grid-template-columns: 128px minmax(0, 1fr) auto; column-gap: 12px; }
  .detail-edit .form-error { grid-column: 2 / -1; }
}
/* Title suggestions: small chips under the box (tap to use) */
.detail-box { display: grid; gap: 6px; min-width: 0; }
.title-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.title-chips[hidden] { display: none; }
.title-chip {
  position: relative; min-height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--box-2); color: var(--ink-2); font: 600 12px var(--body); cursor: pointer;
}
@media (hover: hover) { .title-chip:hover { border-color: var(--accent); color: var(--accent); } }
@media (pointer: coarse) { .title-chip::after { content: ''; position: absolute; inset: -9px -3px; } }
/* Under the lines: a quiet "Saved." on the left, Replace badge and Mark inactive together on the right */
.detail-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 0; min-height: 32px; }
.detail-saved { margin: 0 auto 0 0; color: var(--muted); font-size: 13px; }
/* Two short fields side by side (first and last name); stacked on narrow phones */
.run-new { margin: 10px 0 14px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field-pair .field { min-width: 0; }
@media (max-width: 380px) { .field-pair { grid-template-columns: 1fr; } }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.history .by { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.lvl-down { font-weight: 400; color: var(--muted); }
.lvl-pick .choice { grid-template-columns: auto 1fr auto; column-gap: 10px; min-height: 44px; }
.lvl-pick .choice:has(input:disabled) { cursor: default; opacity: .65; }

/* Earlier records: closed until asked for */
.earlier { padding-bottom: 32px; }
.earlier summary {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); cursor: pointer; list-style: none;
  font: 700 18px/1.1 var(--head);
}
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.earlier[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.earlier summary .sub { font: 400 15px var(--body); }
.earlier-note { margin-top: 10px; font-size: 14px; }
.earlier .cert { grid-template-columns: 1fr; }
.earlier .cert .extra { font-size: 14px; }

/* Rows that open someone's page: the whole row is the tap target */
.result-list li, .ledger .row { position: relative; }
.to-person { color: inherit; text-decoration: none; }
.to-person::after { content: ""; position: absolute; inset: 0; }
.to-person:focus-visible { outline: none; }
.result-list li:has(.to-person:focus-visible), .ledger .row:has(.to-person:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (hover: hover) {
  .result-list li:hover, .ledger .row:hover { background: var(--shade); }
  .back:hover { text-decoration: underline; }
}

/* =====================================================================
   People: search, quick filters and the list
   ===================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted);
  font: 600 14px/1 var(--body); cursor: pointer;
}
.chip b { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (hover: hover) { .chip[aria-pressed="false"]:hover { color: var(--ink); } }
/* Inactive sits apart from the other filters, after a thin divider (Trevor, Nov 16: never mixed in) */
.chip.apart { position: relative; }
.chip.apart::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 1px; background: var(--muted); opacity: .55; }
.tag.inactive { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.chips.chips-folded { display: none; } /* too many to fit on one line: shown as a dropdown instead (ui.js) */
.search-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.search-row > .search { flex: 1; min-width: 0; margin: 0; }
.chip-select {
  display: block; flex: none; width: auto; max-width: 42%; margin-top: 10px; padding: 0 34px 0 14px; border-radius: 999px;
  appearance: none; -webkit-appearance: none; font-weight: 600; color: var(--ink); cursor: pointer;
  background: var(--box) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
.search-row > .chip-select { margin-top: 0; }
.chip-select[hidden] { display: none; }
.list-count { margin-top: 16px; font-size: 14px; }
#people-list .results { margin-top: 6px; }
#people-list .empty { margin-top: 12px; color: var(--muted); }

/* =====================================================================
   Classes: scheduling with the trainer (PROJECT_BRIEF.md → "Running a class" → "Scheduling")
   ===================================================================== */
.done-note { margin: -4px 0 8px; padding: 10px 14px; background: var(--box); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); font-weight: 600; }
.done-note[tabindex="-1"]:focus { outline: none; } /* focused only so screen readers say it; not something to act on */
.person ~ .done-note { margin: 16px 0 4px; }
.class-list { list-style: none; margin: 12px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.class-row { display: grid; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.class-row:last-child { border-bottom: 0; }
.class-row > .tag { justify-self: start; }
.cr-main { display: grid; gap: 2px; min-width: 0; }
.cr-what { font-size: 15px; font-weight: 600; }
.cr-when { color: var(--muted); font-size: 14px; }
/* Class and program details: label / value rows (Nov 15) */
.cr-dl { display: grid; gap: 4px; margin: 8px 0 0; font-size: 14px; }
.cr-dl > div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
.cr-dl dt { color: var(--muted); }
.cr-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cr-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cr-days li { display: flex; flex-wrap: wrap; gap: 0 10px; }
.cr-days li span:first-child { min-width: 96px; }
.cr-meta { color: var(--muted); font-size: 14px; }
.cr-moved { color: var(--amber); font-size: 14px; font-weight: 600; }
.cr-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.cr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-teach { display: grid; gap: 4px; margin-top: 8px; max-width: 320px; font-size: 14px; color: var(--muted); }
.section > .empty { margin-top: 12px; color: var(--muted); }
.stage-note { margin: 28px 0 0; color: var(--muted); font-size: 14px; }
@media (min-width: 761px) {
  .class-row { grid-template-columns: 1fr auto; align-items: center; }
  .cr-side { justify-content: flex-end; }
  .class-row.request { align-items: start; }
}

/* The pop-up sheet: slides up from the bottom on phones, a centered window on bigger screens */
.sheet {
  width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--r2) var(--r2) 0 0;
  background: var(--page); color: var(--ink);
}
.sheet::backdrop { background: rgba(10, 16, 18, .55); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; background: var(--box); border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin-right: auto; font-size: 15px; }
@media (hover: hover) { .sheet-x:hover { background: var(--shade); color: var(--ink); } }
.sheet-head h2:focus { outline: none; } /* focus starts here when it opens, so a tap never leaves a ring on the close button */
.sheet-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: var(--r); color: var(--muted); }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-body { overflow-y: auto; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.sheet-body > .sub { margin-bottom: 12px; }
.sheet-form { display: grid; gap: 14px; }
.sheet-form .field { display: grid; gap: 6px; font-weight: 600; }
.sheet-form .field .sub { font-weight: 400; }
.sheet-form .field-help { font-size: 13px; }
.sheet-actions { display: flex; flex-wrap: wrap; flex-direction: row-reverse; justify-content: flex-start; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet-actions .btn:not(.main):not(.danger) { border-color: transparent; background: none; color: var(--ink-2); }
.summary-list { margin: 0 0 12px; display: grid; gap: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.summary-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 600; }
@media (min-width: 601px) {
  .sheet { width: min(560px, calc(100% - 48px)); margin: auto; border-radius: var(--r2); }
  .sheet:has(.plan-form) { width: min(720px, calc(100% - 48px)); } /* room for what's on each calendar day */
}

/* Settings → Team: who has access and with which role */
.team-head { align-items: center; flex-wrap: wrap; }
.team-help { margin-top: 10px; font-size: 14px; }
.team-search { margin-top: 14px; }
/* One compact row per person, so 60+ superintendents stay easy to scan: name and role on phones, plus email on wider screens */
.team-list { list-style: none; margin: 6px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; }
.team-list li + li { border-top: 1px solid var(--line); }
.team-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; grid-template-areas: "name tag go" "role role go";
  gap: 2px 10px; align-items: center; width: 100%; min-height: 52px; padding: 7px 12px 7px 14px;
  border: 0; background: none; color: var(--ink); font: 400 14px/1.3 var(--body); text-align: left; cursor: pointer;
}
.tr-name, .tr-email, .tr-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-name { grid-area: name; font-weight: 600; }
.tr-name .sub { font-weight: 400; }
.tr-email { display: none; }
.tr-role { grid-area: role; color: var(--muted); font-size: 14px; }
.tr-tag { grid-area: tag; }
.tr-tag:empty { display: none; }
.tr-go { grid-area: go; width: 18px; height: 18px; color: var(--muted); }
.team-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.team-more { margin-top: 10px; }
/* Phones are view only: rows to read, not to tap */
.team-row.view { cursor: default; }
@media (hover: hover) { .team-row.view:hover { background: none; } }
.inv-list > li.inv-view { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; min-height: 44px; padding: 6px 12px 6px 14px; }
.phone-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.invite-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 12px 14px; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
@media (hover: hover) { .team-row:hover { background: var(--shade); } }
@media (min-width: 761px) {
  .team-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 104px 18px; grid-template-areas: "name email role tag go";
    min-height: 42px; padding-block: 4px;
  }
  .tr-email { display: block; grid-area: email; color: var(--muted); font-size: 14px; }
  .tr-tag { justify-self: end; }
  .tr-tag:empty { display: block; }
}
.form-error { padding: 10px 14px; border: 1px solid var(--danger); border-radius: var(--r); color: var(--danger); font-weight: 600; }
.choice-list { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-list legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.choice-list legend .sub { font-weight: 400; }
.choice-list .field-help { margin: -2px 0 2px; font-weight: 400; }
.choice {
  display: grid; grid-template-columns: 20px 1fr; gap: 2px 12px; align-items: start;
  min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--box); font-weight: 400; cursor: pointer;
}
.choice input { grid-row: span 2; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.choice b { font-weight: 600; }
.choice .sub { font-size: 14px; }
.choice.one { align-items: center; }
.choice.one input { grid-row: auto; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.choice-list:disabled .choice { cursor: default; opacity: .65; }
.sheet-more { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.danger-link { margin-left: -8px; color: var(--danger); }
.off-classes { margin-top: 10px; }
@media (hover: hover) { .choice:hover { border-color: var(--line-strong); } .choice-list:disabled .choice:hover { border-color: var(--line); } }

/* Settings → Training records: past imports */
.import-list { list-style: none; margin: 6px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.import-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; }
.import-list li + li { border-top: 1px solid var(--line); }
.il-main { display: grid; gap: 2px; min-width: 0; }
.il-main b { font-weight: 600; overflow-wrap: anywhere; }
.il-main .sub { font-size: 13px; }

/* Import a sheet: choose, check the columns, see what will happen */
.import-step { margin-top: 24px; }
.import-help { margin-top: 8px; font-size: 14px; }
.import-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.import-file .sub { font-size: 14px; overflow-wrap: anywhere; }
.import-file label.btn:has(+ input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.import-sample { display: inline-block; margin: 6px 0 0 -8px; }
.import-step .form-error { margin-top: 10px; }
.col-map { display: grid; gap: 4px 16px; margin-top: 4px; }
.col-map .field { margin-top: 8px; }
.col-map .field span { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.col-sum { list-style: none; margin: 8px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); font-size: 14px; }
.col-sum li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; padding: 6px 14px; }
.col-sum li + li { border-top: 1px solid var(--line); }
.cs-field { font-weight: 600; }
.cs-col { color: var(--muted); overflow-wrap: anywhere; }
.cs-eg { grid-column: 1 / -1; overflow-wrap: anywhere; }
.cs-eg::before { content: "e.g. "; color: var(--muted); }
@media (min-width: 601px) {
  .col-sum li { grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1.4fr); }
  .cs-eg { grid-column: auto; }
}
.import-sum { margin-top: 10px; }
.import-sum b { font-weight: 600; }
.import-rows { list-style: none; margin: 6px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.import-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 12px; padding: 8px 14px; font-size: 14px; }
.import-row + .import-row { border-top: 1px solid var(--line); }
.ir-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.ir-main { display: grid; gap: 2px; min-width: 0; }
.ir-who { font-weight: 600; }
.ir-what { overflow-wrap: anywhere; }
.ir-why { color: var(--amber); }
@media (min-width: 601px) { .col-map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .col-map { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Verify: records that need a second look */
.verify-help { margin: -6px 0 12px; font-size: 14px; }
.verify-list { list-style: none; margin: 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.verify-row { display: grid; gap: 8px; padding: 10px 14px; }
.verify-row + .verify-row { border-top: 1px solid var(--line); }
.vr-main { display: grid; gap: 2px; min-width: 0; }
.vr-name { color: var(--ink); font-weight: 600; text-decoration: none; justify-self: start; }
.vr-name .sub { font-weight: 400; font-size: 13px; }
.vr-what { font-size: 14px; }
.vr-why { color: var(--amber); font-size: 14px; }
.vr-why .sub { font-size: 13px; }
.vr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.verify-empty { margin-top: 12px; }
@media (hover: hover) { .vr-name:hover { text-decoration: underline; } }
@media (min-width: 761px) {
  .verify-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
}

/* OSHA invites: who's on the class, requests, and who needs it most */
.inv-when { margin: -6px 0 8px; font-size: 14px; }
.inv-help { margin-top: 8px; font-size: 14px; }
.inv-list { list-style: none; margin: 8px 0 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.inv-list > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; }
.inv-list > li + li { border-top: 1px solid var(--line); }
.inv-main { display: grid; gap: 1px; min-width: 0; }
.inv-main b { font-weight: 600; }
.inv-main .sub { font-size: 13px; }
.inv-why { color: var(--muted); font-size: 13px; }
.inv-act { display: flex; align-items: center; gap: 4px; flex: none; }
.inv-pick { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 0 12px; width: 100%; min-height: 44px; cursor: pointer; }
.inv-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.inv-list.pick > li { padding: 4px 12px; }
@media (hover: hover) { .inv-list.pick > li:hover { background: var(--shade); } }
.inv-more { margin-top: 8px; }
.inv-search { margin-top: 10px; }
.inv-list:empty { display: none; }
.inv-none { padding: 10px 14px !important; }
.inv-bar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; margin-top: 10px; padding: 10px 12px; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); }
.inv-bar .sub { margin-right: auto; font-size: 14px; }
@media (min-width: 761px) { .inv-bar { bottom: 12px; } }
.head-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-days { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 0; background: var(--box); border: 1px solid var(--line); border-radius: var(--r2); font-size: 14px; }
.pg-days li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; padding: 6px 12px; }
.pg-days li + li { border-top: 1px solid var(--line); }
.pg-days .sub, .pg-days .cant-op { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-size: 13px; }
.pg-n { color: var(--muted); }
.pg-date { font-weight: 600; }
.pg-part { grid-column: 2; }
@media (min-width: 601px) {
  .pg-days li { grid-template-columns: 56px 150px minmax(0, 1fr) auto; }
  .pg-part { grid-column: auto; }
  .pg-days .sub, .pg-days .cant-op { grid-column: auto; grid-row: auto; }
}
.pg-plan .pg-days { margin: 0; }
.pg-cancel { margin: 16px 0 0 -8px; }

/* The calendar: one row per day, a morning and an afternoon button */
.cal { display: grid; gap: 18px; }
.cal-week h3 { margin-bottom: 8px; font: 600 14px/1.2 var(--body); color: var(--muted); }
.cal-day { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cal-date { grid-column: 1 / -1; font-weight: 600; }
.slot {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-height: 52px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--box); color: var(--ink); font: 600 14px/1.1 var(--body); text-align: left;
}
.slot small { font-size: 12px; font-weight: 400; color: var(--muted); }
button.slot { cursor: pointer; }
.slot.open { border-color: var(--accent); }
.slot.open small { color: var(--accent); font-weight: 600; }
.slot.booked, .slot.blocked, .slot.past { background: var(--shade); color: var(--muted); }
button.slot.blocked { border-style: dashed; color: var(--ink); }
.cal-nav { display: flex; justify-content: space-between; gap: 10px; }
@media (min-width: 601px) {
  .cal-day { grid-template-columns: 1fr 140px 140px; align-items: center; }
  .cal-date { grid-column: auto; }
}
@media (hover: hover) { button.slot:hover { border-color: var(--line-strong); } }

/* =====================================================================
   Crew training record for a GC: a clean sheet on screen, a landscape table on paper
   ===================================================================== */
.report-controls { margin-bottom: 16px; }
/* Reports → the builder: who is on it, then the report below */
.rb { padding: 10px 12px; }
.rb .seg { display: inline-flex; }
.rb h2 { font-size: 15px; margin-bottom: 10px; }
.rb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.rb-field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.rb-job { flex: 1 1 200px; max-width: 280px; }
.rb-add { flex: 2 1 280px; max-width: 420px; }
.rb-add .search { position: relative; display: block; }
.rb-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; max-height: 320px; overflow-y: auto; background: var(--box); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, .18)); font-weight: 400; }
.rb-results li { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.rb-results li[aria-selected="true"] { background: var(--shade); }
@media (hover: hover) { .rb-results li[data-add]:hover { background: var(--shade); } }
.rb-results .rb-nomatch { cursor: default; color: var(--muted); }
.rb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.rb-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 2px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--box); font-size: 13px; font-weight: 600; }
.rb-chip-id { color: var(--muted); font-weight: 400; }
.rb-chip button { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 4px; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.rb-chip button:hover { background: var(--shade); color: var(--ink); }
@media (pointer: coarse) { .rb-chip { min-height: 44px; } .rb-chip button { width: 40px; height: 40px; } }
.rb-clear { margin-left: 4px; }
.rb-hint { margin: 0; font-size: 13px; }
.rb-acts { display: flex; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--box); box-shadow: var(--shadow); } /* one joined bar */
.rb-acts .btn { border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink); }
.rb-acts .btn + .btn { border-left: 1px solid var(--line); }
@media (hover: hover) { .rb-acts .btn:hover { background: var(--shade); } }
.rb-pick { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rb-pick-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.rb-search { flex: 1 1 240px; max-width: 360px; }
.rb-list { list-style: none; margin: 8px 0 0; padding: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--box); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rb-person { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.rb-person input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
@media (hover: hover) { .rb-person:hover { background: var(--shade); } }
.rb-none { padding: 10px; }
@media (max-width: 600px) { .rb-acts { margin-left: 0; width: 100%; } .rb-acts .btn { flex: 1; padding-inline: 8px; min-height: 44px; } }
.rb-to { grid-template-columns: 1fr; max-height: 240px; margin-top: 0; }
.rb .done-note { margin: 10px 0 0; }
.rc-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 8px; }
.rc-job { display: grid; gap: 6px; flex: 1 1 220px; max-width: 360px; font-weight: 600; }
.rc-help { margin-top: 8px; font-size: 14px; }
.report { background: #FFFFFF; color: #142026; border: 1px solid #C9D0D3; border-radius: 0; padding: 20px 16px; margin-bottom: 32px; box-shadow: 0 1px 2px rgba(20, 32, 38, .08), 0 6px 18px rgba(20, 32, 38, .10); } /* a sheet of paper: square corners, sits on the page */
:root[data-theme="dark"] .report { border-color: #000; box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .report { border-color: #000; box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .45); } }
.rep-head { display: grid; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid #142026; }
.rep-company { font: 700 14px/1.2 var(--head); letter-spacing: .06em; text-transform: uppercase; color: #4F5D64; }
.rep-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rep-logo { display: block; max-height: 48px; max-width: 160px; width: auto; height: auto; object-fit: contain; }
.rep-head h1 { font-size: 28px; color: #142026; }
.rep-meta { display: grid; gap: 4px; margin: 0; font-size: 14px; }
.rep-meta div { display: flex; gap: 8px; }
.rep-meta dt { min-width: 150px; color: #4F5D64; }
.rep-head .rep-meta { margin-top: 2px; }
.rep-meta dd { margin: 0; font-weight: 600; }
.rep-summary { margin: 14px 0; font-size: 14px; color: #142026; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th, .rep-table td { padding: 8px; text-align: left; vertical-align: top; border-bottom: 1px solid #D2D9DC; }
.rep-table thead th { font: 700 12px/1.2 var(--head); letter-spacing: .04em; text-transform: uppercase; color: #4F5D64; border-bottom: 1.5px solid #142026; }
.rep-name { display: block; font-weight: 600; font-size: 14px; }
.rep-id { display: block; color: #4F5D64; font-weight: 400; }
.rep-cname { display: block; font-weight: 600; }
.rep-ok, .rep-soon, .rep-bad, .rep-none { display: block; }
.rep-none { color: #4F5D64; }
.rep-soon { color: #B45309; font-weight: 600; }
.rep-bad { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.rep-equip { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.report .lvl { color: #142026; }
.rep-sub { margin: 22px 0 6px; font: 700 14px/1.2 var(--head); color: #142026; }
.rep-foot { margin-top: 14px; display: grid; gap: 4px; font-size: 12px; color: #4F5D64; }
/* Phones: each person is a small card (no sideways scrolling) */
@media (max-width: 760px) {
  .rep-table thead { display: none; }
  .rep-table, .rep-table tbody, .rep-table tr, .rep-table th, .rep-table td { display: block; width: 100%; }
  .rep-table tr { padding: 10px 0; border-bottom: 1px solid #D2D9DC; }
  .rep-table tr.needs-attn { border-left: 4px solid #142026; padding-left: 10px; }
  .rep-table th, .rep-table td { border: 0; padding: 3px 0; }
  .rep-table td { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
  .rep-table td::before { content: attr(data-label); color: #4F5D64; font-size: 12px; }
}
@media (min-width: 761px) {
  .report { padding: 40px 44px; max-width: 1100px; margin-inline: auto; }
  .report-controls { max-width: 1100px; margin-inline: auto; } /* the menu and the title line up with the paper */
  .rep-head { grid-template-columns: 1fr auto; align-items: start; } /* the date and coordinator sit in the top corner (Trevor, Nov 15) */
}

/* ---------- Running a class: the code people scan, who's signed in, Finish ---------- */
/* Start a class window: groups with a small heading, the new-class form below a line */
.start-group + .start-group { margin-top: 20px; }
.start-h { margin: 0 0 8px; font: 600 14px/1.3 var(--body); color: var(--muted); }
.start-group .inv-list { margin: 0; }
.start-group .inv-list > li { padding: 10px 10px 10px 14px; }
.start-group .inv-main .sub { margin-top: 2px; }
.start-new { gap: 16px; }
.start-new.after { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.start-new .field { margin-top: 0; }
.start-new .start-h { margin: 0 0 -4px; }
.start-new .sheet-actions { margin-top: 4px; }
.where label { font-weight: 600; }
.where-hits { margin: 2px 0 0; }
.where-hits > li { padding: 0; }
.where-pick { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 400 15px var(--body); text-align: left; cursor: pointer; }
@media (hover: hover) { .where-pick:hover { background: var(--shade); } }
.where-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.run-head > div:first-child { min-width: 0; margin-right: auto; }
.run-meta { margin-top: 4px; }
.run-grid { display: grid; gap: 16px; }
.run-qr { text-align: center; }
.run-qr > h2 { text-align: left; }
.run-qr > .sub { max-width: 300px; margin: 0 auto; font-size: 14px; }
.qr-box { display: block; width: 100%; max-width: 280px; margin: 4px auto 12px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.qr { display: block; width: 100%; height: auto; border-radius: var(--r); }
.run-qr-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.run-qr-acts svg { width: 16px; height: 16px; }
.run-qr > .run-preview { max-width: none; margin: 16px -16px -16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--shade); border-radius: 0 0 var(--r2) var(--r2); font-size: 13px; }
.panel > .run-here-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.run-count { color: var(--muted); font: 600 15px/1.25 var(--body); white-space: nowrap; }
.run-warn { margin: 0 0 10px; padding: 8px 12px; border-left: 4px solid var(--amber); background: var(--shade); border-radius: var(--r); font-size: 14px; }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.run-row:first-child { border-top: 0; }
.run-row.unmatched b { color: var(--amber); }
.rr-main { min-width: 0; }
.rr-main b { font-weight: 600; }
.rr-meta { display: block; color: var(--muted); font-size: 13px; }
.rr-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.run-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.run-add .sub { font-size: 14px; }
.run-missing { margin-top: 12px; }
.run-missing summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.qr-full { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 16px; background: #FFFFFF; color: #142026; text-align: center; }
.qr-full .qr { width: min(78vmin, 640px); }
.qr-full-name { font: 700 clamp(20px, 4vmin, 36px)/1.2 var(--head); }
.qr-full p { font-size: clamp(16px, 2.6vmin, 24px); }
.qr-full .btn { color: #142026; background: #FFFFFF; border-color: #D2D9DC; }
@media (min-width: 761px) {
  .run-grid { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: start; }
  .run-grid.done { grid-template-columns: minmax(0, 1fr); }
}
/* Sign-in on a worker's own phone */
.ci-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ci-top .signin-mark { margin: 0; }
.ci-class { font-weight: 600; color: var(--ink); }
.ci-done { text-align: center; }
.ci-check { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.ci-check svg { width: 28px; height: 28px; }
/* Plan an OSHA program: a Dates field that opens a month calendar to pick the class days */
.flabel { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.plan-form .field { margin-top: 0; }
.pick-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.pick-btn svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.pick-btn .ph { color: var(--faint); }
.pick-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.cal-pick { margin-top: 8px; padding: 12px 12px 4px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--box); box-shadow: var(--shadow-lg); }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cp-head b { font-weight: 650; font-size: 14px; }
.cp-navs { display: flex; gap: 4px; }
.cp-nav { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--line-2); border-radius: 7px; background: var(--box); color: var(--ink-2); cursor: pointer; }
.cp-nav svg { width: 14px; height: 14px; }
.cp-nav:disabled { opacity: .35; cursor: default; }
/* The month: hairline cells, the date small at the top left, and what's on a taken day under it */
.cp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cp-dow { padding: 6px 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--box-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.cp-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; height: 52px; padding: 5px 6px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: var(--box); color: var(--ink); font: 600 12.5px/1 var(--body); font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.cp-num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: -2px 0 0 -3px; border-radius: 99px; }
.cp-what { display: block; max-width: 100%; padding: 2px 5px; border-radius: 4px; background: var(--shade); color: var(--ink-2); font: 600 12px/1.15 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-cell.out { background: var(--box-2); color: var(--faint); cursor: default; }
.cp-cell.off { background: var(--shade); color: var(--muted); }
.cp-cell.past { color: var(--faint); }
.cp-cell:disabled { cursor: not-allowed; }
.cp-cell.busy .cp-num { color: var(--muted); }
.cp-cell.today .cp-num { background: var(--ink); color: var(--box); }
.cp-cell.on { background: var(--accent-weak); box-shadow: inset 0 0 0 2px var(--accent); }
.cp-cell.on .cp-what { background: none; padding-left: 0; padding-right: 0; color: var(--accent); }
@media (hover: hover) {
  .cp-cell:not(:disabled):not(.on):not(.out):hover { background: var(--shade); }
  .cp-nav:not(:disabled):hover { background: var(--shade); }
}
.cp-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 40px; font-size: 13px; }
.cp-foot .link-btn:disabled { color: var(--faint); cursor: default; text-decoration: none; }
/* Phones: shorter cells; a taken day keeps a small mark and its full label on long-press / in the list */
@media (max-width: 600px) {
  .cal-pick { margin-left: -4px; margin-right: -4px; padding: 10px 8px 2px; }
  .cp-cell { height: 46px; padding: 4px 3px; }
  .cp-what { padding: 1px 3px; }
}
.plan-form .pg-days { margin: 8px 0 0; }
.plan-form .field-help { display: block; margin-top: 6px; font-size: 12.5px; }

/* Accept or decline an invite (the page the invite email opens) */
.inv-days { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; gap: 8px; text-align: left; }
.inv-days li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--box-2); }
.inv-days b { font-weight: 650; }
.inv-days span { color: var(--muted); font-size: 13px; }
.inv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.inv-btns .btn { min-height: 44px; }
.inv-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }
.inv-change { margin-top: 12px; }
.ci-done .inv-days { text-align: left; }
.ans-yes { color: var(--accent); font-weight: 600; }
.inv-declined-h { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

@media print {
  @page { size: letter landscape; margin: 0.45in; }
  :root { color-scheme: light; }
  body { background: #FFFFFF !important; color: #142026; padding: 0 !important; font-size: 12px; }
  .preview-bar, .top, .side, .tabbar, .to-top, .report-controls { display: none !important; }
  .app { display: block; }
  .wrap { max-width: none; padding: 0 !important; }
  .report, :root[data-theme] .report { border: 0; padding: 0; margin: 0; box-shadow: none !important; max-width: none; }
  .rep-table { font-size: 11px; }
  .rep-table thead { display: table-header-group; }
  .rep-table tr { break-inside: avoid; }
  .rep-table td { display: table-cell; }
  .rep-table td::before { content: none; }
  .rep-head { grid-template-columns: 1fr auto; align-items: start; } /* the date and coordinator sit in the top corner (Trevor, Nov 15) */
  .lvl i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* =====================================================================
   Touch screens: controls keep their compact look, with an invisible 44px tap area (build rules: 44px taps)
   ===================================================================== */
@media (pointer: coarse) {
  .btn, .chip, .link-btn, .btn-quiet, .seg button { position: relative; }
  .btn::before, .chip::before, .link-btn::before, .btn-quiet::before, .seg button::before { content: ""; position: absolute; inset: -6px 0; }
  .seg button { min-height: 34px; }
  .btn.sm { min-height: 34px; }
  .tbl .who { min-height: 44px; align-content: center; }
  .acct-btn { min-height: 44px; }
  .link-btn, .btn-quiet { min-height: 36px; }
  .chip { min-height: 36px; }
  .input { min-height: 40px; font-size: 16px; } /* 16px stops iPhones zooming in; 40px keeps it compact */
  .search .input { padding-left: 38px; }
}

/* =====================================================================
   Dropdowns (Nov 15): the app's own look instead of the browser's (dropdown.js). The real <select> stays hidden.
   ===================================================================== */
select.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--box); background-image: none; color: var(--ink);
  font: 400 14px/1.2 var(--body); text-align: left; cursor: pointer;
}
.dd-btn.chip-select { width: auto; border-radius: 999px; padding: 0 12px 0 14px; font-weight: 600; }
.dd-btn[hidden] { display: none; }
.dd-btn[aria-invalid="true"] { border-color: var(--danger); }
.dd-btn:disabled { opacity: .6; cursor: default; }
.dd-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-val.dd-ph { color: var(--faint); }
.dd-chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .12s; }
.dd-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.dd-btn[aria-expanded="true"] .dd-chev { transform: rotate(180deg); }
@media (hover: hover) { .dd-btn:not(:disabled):hover { border-color: color-mix(in srgb, var(--line-2) 70%, var(--ink)); } }
.dd-list {
  position: fixed; z-index: 60; list-style: none; margin: 0; padding: 4px; max-width: min(420px, calc(100vw - 16px));
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; background: var(--box); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r2);
  box-shadow: var(--shadow-lg);
}
.dd-list li { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 8px; border-radius: var(--r); font-size: 14px; cursor: pointer; white-space: nowrap; }
.dd-list li.on { background: var(--shade); }
.dd-list li[aria-disabled="true"] { color: var(--faint); cursor: default; }
.dd-check { width: 15px; height: 15px; flex: none; visibility: hidden; color: var(--ink); }
.dd-list li[aria-selected="true"] { font-weight: 600; }
.dd-list li[aria-selected="true"] .dd-check { visibility: visible; }
@media (pointer: coarse) { .dd-btn { min-height: 40px; font-size: 16px; } .dd-list li { min-height: 44px; font-size: 15px; } }

/* Moving between pages (Nov 16): a quick fade instead of a blank flash; the menus and top bar stay put. */
@view-transition { navigation: auto; }
.side { view-transition-name: side; }
.top { view-transition-name: top; }
.tabbar { view-transition-name: tabbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Phone Home, Badge-forward (Trevor's pick, Nov 16) ---------- */
:root { --badge: #1F2A44; --badge-ink: #FFFFFF; }
:root[data-theme="dark"] { --badge: #26355A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --badge: #26355A; } }
.ph-hi { padding: 4px 0 14px; }
.ph-date { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ph-hi h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.ph-badge { display: block; position: relative; overflow: hidden; margin-bottom: 14px; padding: 26px 18px 16px; border-radius: 16px; background: var(--badge); color: var(--badge-ink); text-decoration: none; }
.ph-badge::before { content: ""; position: absolute; top: 10px; left: 50%; width: 44px; height: 6px; margin-left: -22px; border-radius: 4px; background: var(--page); }
.ph-badge::after { content: ""; position: absolute; right: -44px; top: -44px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255, 255, 255, .05); pointer-events: none; }
.ph-badge-k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .78; }
.ph-badge-n { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.ph-badge-n b { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ph-badge-n span { font-size: 14px; opacity: .85; }
.ph-meter { display: block; height: 6px; margin: 12px 0 10px; border-radius: 3px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.ph-meter i { display: block; height: 100%; min-width: 6px; border-radius: 3px; background: #FFFFFF; }
.ph-badge-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; opacity: .9; }
.ph-badge-go { display: flex; align-items: center; justify-content: space-between; margin: 14px -18px 0; padding: 12px 18px 0; border-top: 1px dashed rgba(255, 255, 255, .25); font-size: 13px; font-weight: 600; }
.ph-badge-go .lc-go { width: 16px; height: 16px; }
.ph-sec { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; }
.ph-sec h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ph-sec a { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.ph-card { list-style: none; margin: 0 0 14px; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ph-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.ph-row + .ph-row { border-top: 1px solid var(--line); }
.ph-when { width: 46px; flex: none; text-align: center; padding: 6px 0; border-radius: 10px; background: var(--shade); }
.ph-when small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ph-when b { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; }
.ph-when.today { background: var(--badge); color: var(--badge-ink); }
.ph-when.today small { color: inherit; opacity: .8; }
.ph-tx { flex: 1; min-width: 0; }
.ph-tx > b { display: block; font-size: 15px; font-weight: 700; }
.ph-tx > span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.ph-tx > .ph-act { margin-top: 10px; display: flex; gap: 8px; }
.ph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.ph-stat { padding: 12px; border-radius: 12px; background: var(--box); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ph-stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.ph-stat span { font-size: 12px; font-weight: 700; color: var(--muted); }
.ph-stat.soon { border-color: var(--amber); }
.ph-stat.soon span { color: var(--amber); }
.ph-stat.expired { background: var(--exp); border-color: var(--exp); color: var(--exp-ink); }
.ph-stat.expired span { color: var(--exp-ink); opacity: .8; }
.ph-people li + li { border-top: 1px solid var(--line); }
.ph-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 0; color: var(--ink); text-decoration: none; }
.ph-edge { width: 4px; align-self: stretch; border-radius: 0 3px 3px 0; background: var(--line); flex: none; }
.ph-edge.l1 { background: var(--l1); } .ph-edge.l2 { background: var(--l2); } .ph-edge.l3 { background: var(--l3); }
.ph-person .ph-tx > b { font-size: 14px; }
.ph-person .ph-tx > span { font-size: 12px; }
.ph-person .tag { flex: none; }

/* ---------- Settings as a menu of groups (Badge-forward, Nov 16) ---------- */
.me-badge { margin-bottom: 4px; }
.me-badge .me-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.me-badge .me-role, .me-badge .me-mail { font-size: 13px; opacity: .85; margin-top: 2px; overflow-wrap: anywhere; }
.me-badge .me-out { color: var(--badge-ink); background: transparent; border-color: rgba(255, 255, 255, .4); }
.me-badge .me-out:hover { background: rgba(255, 255, 255, .1); }
.set-solo .me-badge { max-width: 420px; }
.set-group { padding: 18px 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.set-list { list-style: none; margin: 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.set-list li + li { border-top: 1px solid var(--line); }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.set-row:hover { background: var(--shade); }
.set-row[aria-current] { background: var(--shade); box-shadow: inset 3px 0 0 var(--badge); }
.set-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--shade); }
.set-row[aria-current] .set-ic, .set-row:hover .set-ic { background: var(--box); }
.set-ic svg { width: 18px; height: 18px; }
.set-tx { flex: 1; min-width: 0; }
.set-tx b { display: block; font-size: 15px; font-weight: 700; }
.set-tx span { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.set-sum { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.set-row .tr-go { width: 16px; height: 16px; flex: none; color: var(--muted); }
.set-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 32px; }
.set-back svg { width: 16px; height: 16px; }
.set-back[hidden] { display: none; }
.set-head:has(.set-back:not([hidden])) { display: block; }
.set-pane > .section:first-child, .set-pane > .section:not([hidden]) { margin-top: 0; }
.set-open .set-pane .section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
@media (min-width: 1024px) {
  .set { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
  .set-menu { position: sticky; top: 76px; }
  .set-row { min-height: 52px; }
  .set-tx span { display: none; }
  .set-pane .section-head { margin-top: 0; }
}

/* ---------- People, Badge-forward (Nov 16) ---------- */
.pp-head h1 { display: flex; align-items: baseline; gap: 8px; }
.pp-n { font-size: 15px; font-weight: 700; color: var(--muted); }
.pp-counts { margin: 12px 0 0; }
.pp-counts .ph-stat { font: inherit; text-align: left; cursor: pointer; }
.pp-counts .ph-stat[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); }
.pp-more { display: flex; flex-wrap: nowrap; gap: 18px; margin-top: 10px; min-height: 32px; align-items: center; }
.pp-more .link-btn b { font-weight: 800; margin-left: 2px; }
.pp-more .link-btn[aria-pressed="true"] { text-decoration-thickness: 2px; color: var(--ink); }
.pp-letter { padding: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.pp-letter + .results { margin-top: 0; border-radius: 14px; }

/* ---------- Person page, Badge-forward (Nov 16): the badge as a real ID card, records as cards ---------- */
.pe .idcard { position: relative; max-width: 440px; background: var(--badge); color: #FFFFFF; border: 0; border-radius: 18px; box-shadow: none; }
.pe .idcard::before { content: ""; position: absolute; top: 10px; left: 50%; z-index: 1; width: 44px; height: 6px; margin-left: -22px; border-radius: 4px; background: var(--page); }
.pe .idcard-band { height: 46px; display: flex; align-items: flex-end; padding: 0 18px 8px; background: rgba(255, 255, 255, .12); color: #FFFFFF; font: 800 12px/1 var(--head); letter-spacing: .12em; }
.pe .idcard.lv1 .idcard-band { background: var(--l1); color: #FFFFFF; }
.pe .idcard.lv2 .idcard-band { background: var(--l2); color: #1A1400; }
.pe .idcard.lv3 .idcard-band { background: var(--l3); color: #FFFFFF; }
.pe .idcard.held .idcard-band { background: #05070B; color: #FFFFFF; }
.pe .idcard.coord .idcard-band { background: #2B4EB3; color: #FFFFFF; }
.pe .idcard.off .idcard-band { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
.pe .idcard-body { padding: 16px 18px 14px; align-items: flex-start; }
.pe .idcard-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: #FFFFFF; }
.pe .idcard-body span { color: rgba(255, 255, 255, .85); font-size: 13px; }
.pe .idcard-qr { width: 78px; height: 78px; padding: 6px; border-radius: 8px; background: #FFFFFF; }
.idcard-runs { margin: 0 18px; padding: 12px 0 14px; border-top: 1px dashed rgba(255, 255, 255, .25); }
.idcard-runs small { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.idcard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.idcard-chips span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .13); font-size: 12px; font-weight: 700; }
.pe .idcard-runs .idcard-warn { color: #FCA5A5; font-size: 13px; font-weight: 700; }
.pe .person .actions { align-items: center; }
.pe .section-head h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pe .section-head { border-bottom: 0; padding-bottom: 0; }
.pe .certs, .pe .history { margin-top: 8px; background: var(--box); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pe .cert, .pe .history li { padding: 12px 14px; border-bottom: 0; }
.pe .cert + .cert, .pe .history li + li { border-top: 1px solid var(--line); }
.pe .cert h3 { font-size: 15px; font-weight: 700; }
.pe .cert .dates { font-size: 12px; }
.pe .cert.flag { box-shadow: inset 3px 0 0 var(--exp); }
.pe .history .by { font-size: 12px; }
.pe .cleared { border-bottom: 0; }
@media (min-width: 1200px) {
  .pe { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; }
  .pe-left { position: sticky; top: 76px; }
  .pe .person { padding-top: 0; }
  .pe-right > .two-col > .section:first-child, .pe-right > .two-col > .section:nth-child(2), .pe-right > .miss-box:first-child { margin-top: 0; }
}

.pe .person { gap: 10px; }
.pe .cleared { padding: 14px 0 6px; }
.pe .cleared-head h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pe .cleared p { font-size: 14px; }
.pe .earlier summary > span:first-child { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ---------- Classes, Badge-forward (Nov 16) ---------- */
.cl-sec { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.cl-sec span { font-weight: 700; letter-spacing: 0; text-transform: none; }
.cl-list { list-style: none; margin: 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cl-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; }
.cl-row + .cl-row { border-top: 1px solid var(--line); }
.cl-row .ph-when { align-self: flex-start; }
.cl-tx { flex: 1; min-width: 0; }
.cl-tx > b { display: block; font-size: 15px; font-weight: 700; }
.cl-slot { display: inline-flex; align-items: center; height: 22px; margin-left: 6px; padding: 0 8px; border-radius: 6px; background: var(--shade); font-size: 12px; font-weight: 700; vertical-align: 1px; }
.cl-where, .cl-note { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.cl-acts { display: flex; gap: 8px; width: 100%; padding-left: 58px; }
.cl-badge { margin-bottom: 14px; padding-bottom: 14px; }
.cl-badge-name { margin: 4px 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.cl-badge-where { font-size: 13px; opacity: .85; }
.cl-days { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; }
.cl-days li { padding: 7px 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); text-align: center; }
.cl-days li.past { opacity: .5; }
.cl-days small { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: .75; }
.cl-days b { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; }
.cl-days span { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; opacity: .9; }
.cl-badge .ph-badge-go { margin-top: 14px; }
@media (min-width: 761px) {
  .cl-row { flex-wrap: nowrap; align-items: center; }
  .cl-row .ph-when { align-self: center; }
  .cl-acts { width: auto; padding-left: 0; flex: none; }
}
@media (min-width: 1200px) {
  .cl-grid.has-prog { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
  .cl-prog { position: sticky; top: 76px; }
}
.cl-grid { display: flex; flex-direction: column; }
.cl-prog { order: -1; } /* phones and iPads: the program first */
@media (min-width: 1200px) { .cl-grid.has-prog { display: grid; } .cl-grid.has-prog .cl-prog { order: 0; } }

/* ---------- Reports, Badge-forward (Nov 16): tabs, the summary badge, people as rows; paper only when printing ---------- */
.rp-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.rp-tabs button { height: 40px; padding: 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rp-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.rp-badge { overflow: visible; }
.rp-badge::after { display: none; }
.rp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-scope { position: relative; z-index: 2; }
.rp-scope[hidden] { display: none; }
.rp-pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: var(--badge-ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.rp-pill svg { width: 14px; height: 14px; }
.rp-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; padding: 6px; border-radius: 10px; background: var(--box); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; }
.rp-menu[hidden] { display: none; }
.rp-menu button { height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.rp-menu button:hover { background: var(--shade); }
.rp-menu button[aria-pressed="true"] { font-weight: 800; }
.rp-menu button[aria-pressed="true"]::after { content: " ✓"; }
.rp-n { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.rp-n b { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rp-n span { font-size: 14px; opacity: .85; }
.rp-gap { margin-top: 10px; }
.rp-acts { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.rp-acts .btn { background: transparent; color: var(--badge-ink); border-color: rgba(255, 255, 255, .35); }
.rp-acts .btn:hover { background: rgba(255, 255, 255, .1); }
.rp-acts .btn.main { background: #FFFFFF; color: #1F2A44; border-color: #FFFFFF; }
.rp-left .rb-pick { margin-top: 14px; }
.rp-left .done-note { margin-top: 12px; }
.rp-filt { display: flex; flex-wrap: nowrap; gap: 18px; padding-bottom: 8px; }
.rp-filt button { height: 32px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rp-filt button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.rp-list { list-style: none; margin: 0; padding: 0; background: var(--box); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rp-row { display: flex; gap: 12px; padding: 12px 14px 12px 0; }
.rp-row + .rp-row { border-top: 1px solid var(--line); }
.rp-p { flex: 1; min-width: 0; }
.rp-who { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.rp-who b { font-size: 15px; font-weight: 700; }
.rp-who span { font-size: 12px; color: var(--muted); }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rc { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 8px; border-radius: 6px; background: var(--shade); color: var(--ink); font-size: 12px; font-weight: 700; }
.rc svg { width: 12px; height: 12px; flex: none; }
.rc.soon { background: var(--amber-weak); color: var(--amber); }
.rc.exp { background: var(--exp); color: var(--exp-ink); }
.rc.miss { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.rc.na { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.rp-runs { margin-top: 6px; font-size: 12px; color: var(--muted); }
.rp-stop { color: var(--danger); font-weight: 700; }
.rp-more { display: flex; justify-content: center; padding: 12px; }
.rp-paper { display: none; }
@media (min-width: 1200px) {
  .rp { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
  .rp-left { position: sticky; top: 76px; }
  .rp-right > .cl-sec:first-child { padding-top: 0; }
}
@media print { .rp-paper { display: block !important; } .rp, .rp-tabs { display: none !important; } }

/* ---------- Computer Home, Badge-forward (Nov 16) ---------- */
.hm-upd { margin-top: 4px; font-size: 12px; color: var(--muted); }
.hm-hi { padding-bottom: 6px; }
.hm-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; margin: 8px 0 4px; }
.hm-setup > b { font-size: 14px; font-weight: 800; }
.hm-setup ul { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.hm-setup li { display: inline-flex; align-items: center; gap: 6px; }
.hm-setup li.done { text-decoration: line-through; }
.hm-setup li i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.hm-setup li.done i { background: var(--ink); border-color: var(--ink); color: var(--box); }
.hm-setup li i svg { width: 10px; height: 10px; }
.hm { display: grid; gap: 0 24px; margin-top: 12px; }
.hm-live { display: grid; gap: 14px; margin-bottom: 4px; }
.hm-live .ph-badge { margin-bottom: 0; }
.hm-coming { padding: 14px 16px; background: var(--box); border: 1px solid var(--line); border-radius: 14px; }
.hm-k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.hm-crows { list-style: none; margin: 0; padding: 0; }
.hm-crows .ph-row { padding: 8px 0; flex-wrap: wrap; }
.hm-crows .ph-row + .ph-row { border-top: 0; }
.hm-crows .ph-tx > span { font-size: 12px; }
.hm-tasks ul { list-style: none; margin: 0; padding: 0; }
.hm-task { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.hm-task + .hm-task { border-top: 1px solid var(--line); }
.hm-task .t-ic { width: 34px; height: 34px; border-radius: 10px; grid-row: auto; flex: none; }
.hm-tx { flex: 1; min-width: 0; }
.hm-tx b { display: block; font-size: 14px; font-weight: 700; }
.hm-tx span { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.hm-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hm-done, .hm-clear { display: flex; align-items: center; gap: 8px; padding: 11px 16px; font-size: 12px; color: var(--muted); }
.hm-done { border-top: 1px solid var(--line); background: var(--shade); }
.hm-done svg, .hm-clear svg { width: 14px; height: 14px; flex: none; }
.hm-needs-head { align-items: center; }
.hm-nf { display: flex; gap: 16px; }
.hm-nf button { height: 32px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; }
.hm-nf button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.hm-needs { list-style: none; padding: 0; }
.hm-needs li + li { border-top: 1px solid var(--line); }
.hm-need a { display: grid; grid-template-columns: 4px minmax(0, 1.3fr) minmax(0, 1fr) 140px auto; gap: 14px; align-items: center; padding: 11px 16px 11px 0; color: var(--ink); text-decoration: none; }
.hm-need a:hover { background: var(--shade); }
.hm-need .ph-edge { align-self: stretch; }
.hm-who b, .hm-due b { display: block; font-size: 14px; font-weight: 700; }
.hm-due b { font-size: 13px; }
.hm-who span, .hm-due span { display: block; font-size: 12px; color: var(--muted); }
.hm-what { font-size: 13px; font-weight: 600; }
.hm-need .tag { justify-self: end; }
.hm-weeks { list-style: none; padding: 12px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.hm-weeks li { min-height: 74px; padding: 6px 4px 8px; border-radius: 10px; background: var(--shade); text-align: center; }
.hm-weeks small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.hm-weeks b { display: block; font-size: 16px; font-weight: 800; }
.hm-weeks i { display: block; margin-top: 4px; padding: 2px 0; border-radius: 4px; background: var(--box); font-style: normal; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-weeks li.today { background: var(--badge); color: var(--badge-ink); }
.hm-weeks li.today small { color: inherit; opacity: .8; }
.hm-weeks li.today i { background: rgba(255, 255, 255, .18); color: var(--badge-ink); }
.hm-weeks li.past { opacity: .5; }
.hm-side .panel { margin-top: 16px; border-radius: 14px; }
.hm-side .card-h h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
@media (min-width: 761px) { .hm-live:not(.one) { grid-template-columns: 1.4fr 1fr; } }
@media (min-width: 1200px) {
  .hm { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
  .hm-side > .ph-sec:first-child { padding-top: 0; }
}
@media (max-width: 1100px) { .hm-need a { grid-template-columns: 4px minmax(0, 1fr) auto; } .hm-what, .hm-due { grid-column: 2; } .hm-need .tag { grid-column: 3; grid-row: 1; } }

/* ---------- Team notes: the message board on Home (Nov 16; reworked: fixed size, one clean send bar, instant) ---------- */
.nb { margin-bottom: 8px; }
.nb-head { align-items: center; }
.nb-links { display: flex; gap: 14px; }
.nb-links button { height: 28px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }
.nb-links button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nb-av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 800; }
.nb-msg:not(.last) .nb-av { visibility: hidden; }
.nb-av.t1 { background: #DCE6FF; color: #1E3A8A; } .nb-av.t2 { background: #EDE3FF; color: #5B21B6; }
.nb-av.t3 { background: #DDF1F7; color: #155E75; } .nb-av.t4 { background: #E7E9EE; color: #334155; }
:root[data-theme="dark"] .nb-av.t1 { background: #23345E; color: #C7D7FF; } :root[data-theme="dark"] .nb-av.t2 { background: #34285A; color: #DCCBFF; }
:root[data-theme="dark"] .nb-av.t3 { background: #173A46; color: #BDEBF7; } :root[data-theme="dark"] .nb-av.t4 { background: #283141; color: #D5DCE6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nb-av.t1 { background: #23345E; color: #C7D7FF; } :root:not([data-theme="light"]) .nb-av.t2 { background: #34285A; color: #DCCBFF; }
  :root:not([data-theme="light"]) .nb-av.t3 { background: #173A46; color: #BDEBF7; } :root:not([data-theme="light"]) .nb-av.t4 { background: #283141; color: #D5DCE6; }
}
/* One fixed size: the notes scroll inside, the send bar stays put */
.nb-board { display: flex; flex-direction: column; height: 380px; border-radius: 16px; background: var(--box); border: 1px solid var(--line); overflow: hidden; }
.nb-list { flex: 1; display: flex; flex-direction: column; list-style: none; margin: 0; padding: 12px 12px 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nb-list > .nb-msg:first-child, .nb-list > .nb-empty { margin-top: auto; } /* few notes rest at the bottom, just above the send bar */
.nb-msg { display: flex; gap: 8px; align-items: flex-end; margin-top: 2px; }
.nb-msg.first { margin-top: 12px; }
.nb-body { max-width: 80%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.nb-name { margin: 0 0 3px 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.nb-private { display: inline-flex; align-items: center; height: 18px; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--ink); color: var(--box); font-size: 12px; font-weight: 800; vertical-align: 1px; }
.nb-bubble { padding: 8px 12px; border-radius: 16px; background: var(--shade); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; }
.nb-msg.first:not(.last) .nb-bubble { border-bottom-left-radius: 6px; }
.nb-msg:not(.first):not(.last) .nb-bubble { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.nb-msg.last:not(.first) .nb-bubble { border-top-left-radius: 6px; }
.nb-msg.first.last .nb-bubble { border-bottom-left-radius: 6px; }
.nb-bubble.direct { box-shadow: inset 0 0 0 1.5px var(--ink); }
.nb-meta { display: flex; align-items: center; gap: 10px; min-height: 22px; margin: 2px 4px 0; font-size: 12px; color: var(--muted); }
.nb-done { height: 22px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.nb-done:hover, .nb-done:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) { .nb-done { position: relative; } .nb-done::after { content: ""; position: absolute; inset: -11px -10px; } }
.nb-msg.mine { flex-direction: row-reverse; }
.nb-msg.mine .nb-body { align-items: flex-end; }
.nb-msg.mine .nb-bubble { background: var(--badge); color: var(--badge-ink); }
.nb-msg.mine.first:not(.last) .nb-bubble, .nb-msg.mine.first.last .nb-bubble { border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.nb-msg.mine:not(.first):not(.last) .nb-bubble { border-radius: 16px 6px 6px 16px; }
.nb-msg.mine.last:not(.first) .nb-bubble { border-radius: 16px 6px 16px 16px; }
.nb-msg.mine .nb-bubble.direct { box-shadow: none; }
.nb-msg.mine .nb-av { display: none; }
.nb-msg.new { animation: nb-in .22s ease-out; }
.nb-msg.out { opacity: 0; transform: scale(.97); transition: opacity .15s ease, transform .15s ease; }
@keyframes nb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .nb-msg.new { animation: none; } .nb-msg.out { transition: none; } .nb-list { scroll-behavior: auto; } }
.nb-empty { margin: auto 0; padding: 40px 12px; font-size: 13px; color: var(--muted); text-align: center; list-style: none; }
/* The send bar: To on the left, one line to type, Post; everything centered */
.nb-write { display: flex; align-items: center; gap: 8px; margin: 8px; padding: 4px 4px 4px 4px; border-radius: 999px; background: var(--page); border: 1px solid var(--line); transition: border-color .15s ease; }
.nb-write:focus-within { border-color: var(--line-2); }
.nb-to { position: relative; flex: none; }
.nb-to-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--box); color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); }
.nb-to-btn b { color: var(--ink); font-weight: 800; }
.nb-to-btn.direct { background: var(--ink); color: var(--box); box-shadow: none; }
.nb-to-btn.direct b { color: var(--box); }
.nb-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; min-width: 200px; max-height: 260px; overflow-y: auto; padding: 6px; border-radius: 12px; background: var(--box); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; }
.nb-menu[hidden] { display: none; }
.nb-menu button { height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.nb-menu button:hover { background: var(--shade); }
.nb-menu button[aria-pressed="true"] { font-weight: 800; }
.nb-menu button[aria-pressed="true"]::after { content: " ✓"; }
.nb-input { flex: 1; min-width: 0; height: 32px; max-height: 96px; padding: 7px 2px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; line-height: 18px; resize: none; field-sizing: content; min-height: 32px; }
.nb-input:focus { outline: none; }
.nb-post { flex: none; height: 32px; padding: 0 16px; border-radius: 999px; align-self: center; }
.nb-err { margin: -2px 16px 8px; font-size: 13px; color: var(--danger); }
.nb-err[hidden] { display: none; }
.nb-donelist { list-style: none; margin: 0 0 8px; padding: 0; max-height: 220px; overflow-y: auto; background: var(--box); border: 1px solid var(--line); border-radius: 14px; }
.nb-donelist li { padding: 10px 14px; font-size: 13px; color: var(--muted); }
.nb-donelist li + li { border-top: 1px solid var(--line); }
.nb-donelist p { color: var(--ink); overflow-wrap: anywhere; }
.nb-donelist span { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; }
.nb-donelist svg { width: 12px; height: 12px; }
.hm-side > [data-notes] .ph-sec { padding-top: 0; }
@media (max-width: 760px) { .nb-board { height: 340px; } }
.nb-doneline { display: flex; align-items: flex-start; gap: 6px; margin: 10px auto 2px; max-width: 92%; padding: 6px 12px; border-radius: 999px; background: var(--shade); color: var(--muted); font-size: 12px; line-height: 1.4; }
.nb-doneline svg { width: 12px; height: 12px; flex: none; margin-top: 2px; color: var(--ink); }
.nb-doneline b { color: var(--ink); font-weight: 700; }
.nb-doneline .nb-snip { color: var(--ink); }
.nb-list > .nb-doneline:first-child { margin-top: auto; }
.nb-doneline.new { animation: nb-in .22s ease-out; }
@media (prefers-reduced-motion: reduce) { .nb-doneline.new { animation: none; } }

/* Boxes that scroll inside instead of growing (Trevor, Nov 16: "feels more professional"): computers and iPads only;
   on phones the page itself scrolls, and a box inside it would catch your thumb */
@media (min-width: 720px) {
  .hm-tasks .hm-scroll { max-height: 372px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .hm-needs.hm-scroll { max-height: 492px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .hm-scroll.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
}

