@font-face {
  font-family: "Poppins";
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  src: url(assets/fonts/poppins-200.woff2) format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(assets/fonts/poppins-600.woff2) format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url(assets/fonts/poppins-700.woff2) format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(assets/fonts/opensans-400.woff2) format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url(assets/fonts/opensans-600.woff2) format("woff2");
}
:root {
  /* Aubin Environmental brand tokens, drawn from aubin.com.au */
  --paper: #f5f4f2;
  --surface: #ffffff;
  --surface-2: #f0eeeb;
  --ink: #141416;
  --ink-dim: #3f4349;
  --line: #dedbd7;
  --accent: #d8531c;
  --accent-strong: #a9431a;
  --accent-soft: #f6dcc9;
  --good: #1e798d;
  --good-bg: #dceef1;
  --warn: #9c6b12;
  --warn-bg: #f5ead0;
  --crit: #a82f22;
  --crit-bg: #f6dcd5;
  --brand-plate: #141416;
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141416; --surface: #1b1c1e; --surface-2: #232427; --ink: #ffffff; --ink-dim: #adb0b3;
    --line: #35373a; --accent: #e2703d; --accent-strong: #f08652; --accent-soft: #3a2013;
    --good: #35b7ce; --good-bg: #113239; --warn: #e0b04c; --warn-bg: #332711; --crit: #e2695a; --crit-bg: #341c17;
  }
}
:root[data-theme="dark"] {
  --paper: #141416; --surface: #1b1c1e; --surface-2: #232427; --ink: #ffffff; --ink-dim: #adb0b3;
  --line: #35373a; --accent: #e2703d; --accent-strong: #f08652; --accent-soft: #3a2013;
  --good: #35b7ce; --good-bg: #113239; --warn: #e0b04c; --warn-bg: #332711; --crit: #e2695a; --crit-bg: #341c17;
}
:root[data-theme="light"] {
  --paper: #f5f4f2; --surface: #ffffff; --surface-2: #f0eeeb; --ink: #141416; --ink-dim: #3f4349;
  --line: #dedbd7; --accent: #d8531c; --accent-strong: #a9431a; --accent-soft: #f6dcc9;
  --good: #1e798d; --good-bg: #dceef1; --warn: #9c6b12; --warn-bg: #f5ead0; --crit: #a82f22; --crit-bg: #f6dcd5;
}
@media (prefers-reduced-motion: reduce) { *{ transition: none !important; animation: none !important; } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: var(--accent-strong); }

html, body { overflow-x: hidden; }
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.app > main { min-width: 0; overflow-y: auto; height: 100vh; }
.app > .sidebar { overflow-y: auto; height: 100vh; }

.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; flex-direction: column; gap: 10px; }
.brand .plate { background: var(--brand-plate); border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; }
.brand .plate img { display: block; height: 26px; width: auto; }
.brand .sub { font-size: 11.5px; color: var(--ink-dim); letter-spacing: 0.02em; padding-left: 2px; }
nav.tabs { display: flex; flex-direction: column; gap: 2px; }
/* Tier 1 group heading. Sits above its items in the visual hierarchy through weight, full-strength
   ink and a section rule — not size alone, which is what made it read as subordinate before. */
.nav-label {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  margin: 22px 0 8px; padding: 0 10px 7px; border-bottom: 1px solid var(--line);
}
.nav-label:first-child { margin-top: 0; }
/* Tier 2 stays quieter: sentence case, regular weight, dimmed until hovered or active. */
.tab-btn { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--ink-dim); display: flex; align-items: center; gap: 9px; }
.tab-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: none; }
.tab-btn:hover { background: var(--surface-2); color: var(--ink); }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tab-btn.active { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.tab-btn.active .dot { background: var(--accent); }
.tab-btn.disabled { cursor: default; opacity: 0.55; }
.tab-btn.disabled:hover { background: none; color: var(--ink-dim); }

.account-box { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.account-box .who { font-size: 12.5px; }
.account-box .who .name { font-weight: 600; }
.account-box .who .role { color: var(--ink-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.account-box .actions { display: flex; gap: 8px; }

/* ---- Professor AUBOT — floating action button, fixed to the viewport, always reachable ---- */
.drbot-float { position: fixed; right: 22px; bottom: 22px; z-index: 500; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.drbot-float-status { font-size: 11.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; box-shadow: 0 6px 18px rgba(0,0,0,.14); white-space: nowrap; }
.drbot-float-status:empty { display: none; }
.drbot-float-status.listening { color: var(--good); }
.drbot-float-status.speaking { color: var(--accent-strong); }
.drbot-float-status.err { color: var(--crit); }
.drbot-float-row { display: flex; align-items: center; gap: 10px; }
.drbot-fab { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 9px; background: var(--accent); color: #fff; padding: 13px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.24); font-family: var(--font-display); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.drbot-fab:hover { background: var(--accent-strong); }
.drbot-fab:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.drbot-fab-icon { font-size: 19px; line-height: 1; }
.drbot-mic-fab { all: unset; box-sizing: border-box; cursor: pointer; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.drbot-mic-fab:hover { border-color: var(--accent); }
.drbot-mic-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.drbot-mic-fab.on { background: var(--crit-bg); border-color: var(--crit); color: var(--crit); animation: drbot-pulse 1.4s ease-in-out infinite; }
@keyframes drbot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (max-width: 720px) { .drbot-fab-text { display: none; } .drbot-fab { padding: 13px; } }

main { padding: 26px 32px 60px; max-width: 1240px; }
header.page-head { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
header.page-head h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; font-size: 28px; margin: 0 0 4px; text-wrap: balance; }
header.page-head p { margin: 0; color: var(--ink-dim); font-size: 13.5px; max-width: 68ch; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line); }
.stat.s-warn::before { background: var(--warn); }
.stat.s-good::before { background: var(--good); }
.stat .label { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 6px; }
.stat .value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; }
.stat .foot { font-size: 12px; color: var(--ink-dim); margin-top: 3px; }

section.panel { display: none; flex-direction: column; gap: 18px; }
section.panel.active { display: flex; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h2 { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.03em; text-transform: uppercase; margin: 0 0 3px; font-weight: 600; color: var(--ink-dim); }
.card .desc { color: var(--ink-dim); font-size: 12.5px; margin: 0 0 14px; max-width: 72ch; }

table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
thead th { text-align: left; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; padding: 0 10px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 560px; overflow-y: auto; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll .table-wrap { overflow: visible; }
.table-scroll table thead th { top: 0; }
tfoot td { padding: 10px; font-weight: 700; border-top: 1px solid var(--line); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.chip.ok { background: var(--good-bg); color: var(--good); }
.chip.ok::before { background: var(--good); }
.chip.low { background: var(--warn-bg); color: var(--warn); }
.chip.low::before { background: var(--warn); }
.chip.crit { background: var(--crit-bg); color: var(--crit); }
.chip.crit::before { background: var(--crit); }
.chip.neutral { background: var(--surface-2); color: var(--ink-dim); }
.chip.neutral::before { background: var(--ink-dim); }
.chip.admin { background: var(--accent-soft); color: var(--accent-strong); }
.chip.admin::before { background: var(--accent-strong); }

.bom-tree { display: flex; flex-direction: column; gap: 5px; }
.bom-node { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bom-node.leaf { border-style: dashed; }
.bom-row { display: grid; grid-template-columns: 18px 1fr 90px 110px 130px; align-items: center; gap: 10px; padding: 7px 10px; background: var(--surface); cursor: pointer; }
.bom-row.leaf-row { cursor: default; }
.bom-row .name { font-weight: 600; font-size: 12.5px; }
.bom-row .id { color: var(--ink-dim); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; font-weight: 400; }
.bom-row .meta { color: var(--ink-dim); font-size: 11.5px; }
.bom-row .qty { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }
.bom-children { display: none; border-top: 1px solid var(--line); padding-left: 20px; }
.bom-node.open > .bom-children { display: block; }
.chevron { width: 13px; height: 13px; transition: transform 0.15s ease; color: var(--ink-dim); flex: none; }
.bom-node.open > .bom-row .chevron { transform: rotate(90deg); }
.bom-node.leaf > .bom-row .chevron { visibility: hidden; }
mark { background: var(--accent-soft); color: var(--ink); border-radius: 2px; padding: 0 1px; }

input, select, button.btn, textarea {
  font-family: var(--font-body); font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); padding: 6px 8px;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input.num-sm { width: 72px; font-family: var(--font-mono); text-align: right; }
button.btn { cursor: pointer; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.btn.primary:hover { background: var(--accent-strong); }
button.btn.ghost:hover { background: var(--surface-2); }
button.btn.sm { padding: 4px 8px; font-size: 11.5px; }
button.btn:disabled { opacity: .5; cursor: default; }

.form-grid { display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-dim); }
.field select, .field input { width: 100%; }

.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .field input[type="search"] { width: 260px; }
.toolbar .checkfield { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding-bottom: 6px; }

.log-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.log-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.log-item:last-child { border-bottom: none; }
.log-item .delta { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.log-item .delta.pos { color: var(--good); }
.log-item .delta.neg { color: var(--crit); }
.muted { color: var(--ink-dim); }

.report-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 980px) { .report-grid { grid-template-columns: 1fr; } .form-grid, .stat-row { grid-template-columns: 1fr 1fr; } }

.empty-note { color: var(--ink-dim); font-size: 12.5px; padding: 10px 0; }
.roadmap-note { font-size: 11.5px; color: var(--ink-dim); line-height: 1.5; padding: 10px 10px 0; }
textarea.paste-box { width: 100%; min-height: 100px; font-family: var(--font-mono); resize: vertical; }
.summary-line { font-size: 13px; margin-bottom: 12px; }
.summary-line b { font-family: var(--font-mono); }
.result-note { font-size: 12.5px; color: var(--ink-dim); margin-top: 8px; }
.error-note { font-size: 12.5px; color: var(--crit); margin-top: 8px; }

input.cell-input { width: 62px; font-family: var(--font-mono); text-align: right; }
input.cell-input.wide { width: 78px; }
.unavail-note { color: var(--ink-dim); font-size: 11px; }
.build-ctl { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.build-ctl input { width: 56px; font-family: var(--font-mono); text-align: right; }
.build-ctl input.minutes { width: 64px; }
.build-msg { font-size: 11.5px; margin-top: 4px; }
.build-msg.err { color: var(--crit); }
.build-msg.ok { color: var(--good); }
.asm-row-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px 10px 10px 30px; background: var(--surface); border-top: 1px dashed var(--line); font-size: 11.5px; }
.asm-row-extra .info { display: inline-flex; align-items: center; gap: 5px; }
.asm-row-extra .lbl { color: var(--ink-dim); text-transform: uppercase; letter-spacing: .04em; font-size: 10.5px; }
.asm-row-extra .build-msg { flex-basis: 100%; }

.forecast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-bottom: 6px; }
.forecast-cell { display: flex; flex-direction: column; gap: 4px; }
.forecast-cell label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-dim); }
.forecast-cell input { width: 100%; font-family: var(--font-mono); text-align: right; }

tr.overdue td { background: var(--crit-bg); }
.row-note { font-size: 11px; color: var(--ink-dim); }

/* ---- Login screen ---- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--paper); }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px 26px; }
.login-card .plate { background: var(--brand-plate); border-radius: 8px; padding: 16px 18px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.login-card .plate img { height: 30px; }
.login-card h1 { font-family: var(--font-display); font-size: 18px; margin: 0 0 4px; text-align: center; }
.login-card p.sub { text-align: center; color: var(--ink-dim); font-size: 12.5px; margin: 0 0 20px; }
.login-card .field { margin-bottom: 14px; }
.login-card button.btn { width: 100%; padding: 9px; margin-top: 4px; }
[hidden] { display: none !important; }

/* ---- Staff tab ---- */
.staff-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---- Production time (build) tab ---- */
.pick-field { min-width: 260px; }
select.staff-select { min-width: 200px; height: 84px; }
.build-ctl select.staff-select { min-width: 130px; height: 52px; font-size: 11.5px; }

/* ---- Ask (chat) tab ---- */
.chat-card { display: flex; flex-direction: column; }
.chat-window { display: flex; flex-direction: column; gap: 12px; min-height: 360px; max-height: 60vh; overflow-y: auto; padding: 4px 2px 12px; }
.chat-bubble { max-width: 78%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.chat-bubble.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-bubble.assistant { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 3px; }
.chat-bubble.pending { color: var(--ink-dim); font-style: italic; }
.chat-input-row { display: flex; gap: 8px; margin-top: 10px; }
.chat-input-row input { flex: 1; }

/* ---- Care Plans tab ---- */
tr.cp-row { cursor: pointer; }
.cp-checklist-group { margin-bottom: 16px; }
.cp-checklist-group:last-child { margin-bottom: 0; }
.cp-checklist-group h3 { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.cp-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cp-item:last-child { border-bottom: none; }
.cp-item input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.cp-item .cp-item-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cp-item .cp-item-label { font-size: 13px; }
.cp-item.done .cp-item-label { color: var(--ink-dim); text-decoration: line-through; }
.cp-item .cp-item-meta { font-size: 11px; color: var(--ink-dim); }
.cp-item .cp-item-row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-item .cp-item-row2 input { font-size: 12px; }
.cp-item .cp-item-value { width: 160px; }
select.cp-item-value { width: auto; max-width: 260px; }
.cp-item .cp-item-comment { flex: 1; min-width: 180px; }
.cp-item .cp-item-custom { color: var(--accent-strong); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; }

.cp-odour-loc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.cp-odour-loc-row:last-child { border-bottom: none; }

.cp-spare-admin-rows { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cp-spare-admin-row { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12px; }

.cp-odour-block { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.cp-odour-block h4 { margin: 0 0 8px; font-size: 13px; }
.cp-odour-block .field { margin-bottom: 8px; }
.cp-odour-block select[multiple] { min-height: 130px; width: 100%; }

/* ---- Staff table actions ---- */
.row-actions { white-space: nowrap; }
.row-actions .btn { margin-right: 4px; }
.btn.ghost.danger { color: var(--crit); }
.btn.ghost.danger:hover { background: var(--crit-bg); }
.btn[disabled] { opacity: .45; cursor: default; }
tr.row-inactive td { opacity: .6; }
.staff-edit { background: var(--surface-2); border-radius: 8px; padding: 14px 16px; }
.staff-edit .form-grid { margin-bottom: 0; }

/* ---- Home / landing page ----
   Deliberately sparse: it exists to show the shape of the menu, so the three cards mirror the
   tier 1 nav groups exactly and everything else stays out of the way. */
.home { max-width: 940px; margin: 0 auto; padding: 24px 0 8px; }
.home-head { text-align: center; margin-bottom: 40px; }
.home-eyebrow { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.home-head h1 { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 10px; }
.home-sub { font-size: 14px; color: var(--ink-dim); margin: 0; }

.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-card {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 22px 22px; min-height: 190px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.home-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.07); }
.home-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-card-label { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
/* The accent rule under the heading echoes the nav's tier 1 treatment. */
.home-card-label::after { content: ""; display: block; width: 26px; height: 2px; background: var(--accent); margin-top: 10px; }
.home-card-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }
.home-card-links { margin-top: auto; font-size: 11px; color: var(--ink-dim); opacity: .8; line-height: 1.6; }

.home-foot { margin-top: 32px; text-align: center; }
.home-hint { font-size: 12px; color: var(--ink-dim); margin: 0; }
.home-alert {
  display: inline-block; margin-bottom: 14px; padding: 10px 16px; border-radius: 8px;
  background: var(--warn-bg); color: var(--warn); font-size: 13px; border: 1px solid transparent; cursor: pointer;
}
.home-alert:hover { border-color: var(--warn); }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-head h1 { font-size: 32px; }
}

/* Home sits above the first group heading, so that heading needs its top margin back. */
.nav-home { margin-bottom: 4px; }

/* ---- Training Modules ---- */
.policy-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.policy-item:last-child { margin-bottom: 0; }
.policy-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.policy-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.policy-title { font-weight: 600; font-size: 14px; }
.policy-meta { font-size: 11.5px; color: var(--ink-dim); margin-bottom: 3px; }
.policy-meta.signed-note { color: var(--good); }
.policy-sign { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.policy-statement { font-size: 12px; color: var(--ink-dim); font-style: italic; margin: 0 0 8px; }
.policy-sign-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.policy-sign-row input[type="text"] { min-width: 240px; }
.policy-assign { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.policy-assign .checkfield { margin: 0; }

/* Sub-heading inside a card, one step below the card's own h2. */
.cp-subhead { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* Export controls above the maintenance report preview. */
.cp-export-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cp-export-bar .checkfield { margin: 0; }

.cp-note-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.cp-note-item:last-child { border-bottom: none; }
.cp-note-item .cp-note-meta { color: var(--ink-dim); font-size: 11px; margin-top: 2px; }
#cp-voice-btn.recording, #cp-log-voice-btn.recording { background: var(--crit-bg); color: var(--crit); border-color: var(--crit); }

#cp-overview-table select.cp-sched-resourcing, #cp-overview-table select.cp-sched-frequency { min-width: 140px; }
#cp-overview-table select.cp-sched-months { min-width: 160px; min-height: 68px; display: block; margin-bottom: 4px; }
#cp-overview-table input.cp-sched-note { width: 100%; min-width: 160px; }
#cp-overview-table td { vertical-align: top; }

/* Generic collapsible-card pattern — applied to every card automatically (see makeCardsCollapsible in app.js) */
.collapsible-card > .collapse-toggle { cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; }
.collapsible-card .collapse-chevron { display: inline-block; font-size: 11px; color: var(--ink-dim); transition: transform 0.15s ease; flex: none; }
.collapsible-card.collapsed .collapse-chevron { transform: rotate(-90deg); }
.collapsible-card.collapsed .collapse-body { display: none; }
.collapsible-card .collapse-body { margin-top: 3px; }
