/* Stanley Brown's Workbench */
:root {
  --paper: #f7f3ec;
  --card: #fffdf9;
  --ink: #2b2520;
  --muted: #6f655c;
  --line: #e4dccf;
  --brand: #3e5641;      /* workshop green */
  --brand-dark: #2c3e2e;
  --accent: #a0623a;     /* saddle brown, for Stanley */
  --accent-soft: #f3e6da;
  --ok: #2f7a4a;
  --ok-soft: #e3f1e7;
  --warn: #8a5a00;
  --warn-soft: #fbf0d9;
  --danger: #a23b2f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(43, 37, 32, 0.06), 0 4px 14px rgba(43, 37, 32, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- buttons and inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 8px 14px; border-radius: 8px; font: 600 14px var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: var(--card); color: var(--brand); }
.btn.secondary:hover { background: #eef1ec; }
.btn.danger { background: var(--card); color: var(--danger); border-color: #d9b3ad; }
.btn.danger:hover { background: #fbeeec; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.link { background: none; border: none; color: var(--brand); padding: 4px 6px; font-weight: 500; }
.btn.link:hover { text-decoration: underline; background: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=number], select, textarea {
  font: 14px var(--sans); color: var(--ink); background: #fff; border: 1px solid #cfc5b6; border-radius: 7px; padding: 7px 9px; width: 100%;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid #8fa98f; outline-offset: 1px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
  max-width: 1040px; margin: 0 auto; padding: 56px 28px; width: 100%; }
.landing .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.landing h1 { font-size: 46px; margin-bottom: 30px; }
.landing .lede { font-size: 18px; color: var(--muted); max-width: 30em; margin: 0 0 28px; }
.landing .btn { padding: 11px 22px; font-size: 15px; }
.landing footer { text-align: center; padding: 24px; color: var(--muted); font-size: 13px; }
.photos { position: relative; aspect-ratio: 4 / 5; }
.photos figure { margin: 0; position: absolute; background: #fff; padding: 10px 10px 34px; box-shadow: var(--shadow); border-radius: 4px; }
.photos figure img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; background: var(--accent-soft); }
.photos figcaption { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font: italic 14px var(--serif); color: var(--muted); }
.photos .p1 { left: 0; top: 7%; width: 64%; height: 80%; transform: rotate(-2.5deg); z-index: 2; }
.photos .p3 { right: 0; top: 0; width: 42%; height: 43%; transform: rotate(5deg); z-index: 3; }
.photos .p2 { right: 3%; bottom: 0; width: 42%; height: 43%; transform: rotate(-3deg); z-index: 3; }
.photos.single .p1 { inset: 0; transform: rotate(-1.5deg); }
@media (max-width: 760px) {
  .landing main { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px; }
  .landing h1 { font-size: 34px; }
  .photos { max-width: 420px; width: 100%; margin: 0 auto; order: -1; }
}

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 32px; width: 100%; max-width: 380px; }
.login-card .mark { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; text-decoration: none; color: var(--ink); }
.login-card .mark img { width: 34px; height: 34px; }
.login-card .mark span { font: 600 18px var(--serif); }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; margin-top: 6px; }
.notice { border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; font-size: 14px; }
.notice.error { background: #fbeeec; color: var(--danger); border: 1px solid #efcfca; }
.notice.info { background: var(--warn-soft); color: var(--warn); border: 1px solid #efdcb4; }

/* ---------- app shell ---------- */
.topbar { background: var(--brand-dark); color: #fff; }
.topbar .inner { max-width: 1680px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .home { display: flex; align-items: center; gap: 10px; font: 600 17px var(--serif); }
.topbar .home img { width: 28px; height: 28px; background: #fff; border-radius: 50%; padding: 3px; }
.topbar .crumb { opacity: 0.85; font-size: 14px; }
.topbar .crumb::before { content: "/"; margin-right: 14px; opacity: 0.5; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 14px; opacity: 0.9; }
.topbar .signout { font-size: 14px; border: 1px solid rgba(255,255,255,0.35); padding: 5px 11px; border-radius: 7px; }
.topbar .signout:hover { background: rgba(255,255,255,0.1); }
.page { max-width: 1680px; margin: 0 auto; padding: 28px 24px 60px; }

/* ---------- home tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 22px; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); transition: transform 0.12s, border-color 0.12s; }
a.tile:hover { transform: translateY(-2px); border-color: #b9c7b9; }
.tile .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: #e7ede6; margin-bottom: 14px; }
.tile .icon svg { width: 24px; height: 24px; stroke: var(--brand); }
.tile h2 { font-size: 20px; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; }
.tile.soon { opacity: 0.6; box-shadow: none; border-style: dashed; }
.tile .tag { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- tracker ---------- */
.banner { background: var(--warn-soft); border: 1px solid #efdcb4; color: var(--warn); border-radius: 8px; padding: 9px 14px; font-size: 13.5px; margin-bottom: 22px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar h1 { margin: 0; font-size: 28px; }
.toolbar .spacer { flex: 1; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel > header h2 { margin: 0; font-size: 19px; }
.panel > header .spacer { flex: 1; }
.panel .body { padding: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; background: #faf7f2; white-space: nowrap; }
th.c, td.c { text-align: center; }
tbody tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f6f3ed; }
tr.withdrawn td { color: #9a9086; }
tr.withdrawn td.name { text-decoration: line-through; }
td.name { min-width: 180px; max-width: 260px; }
td.name b { white-space: nowrap; }
tr.done td { background: #f4f9f5; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #ece7df; color: var(--muted); white-space: nowrap; }
.pill.TNCC { background: #e4ecf6; color: #2d5384; }
.pill.ENPC { background: var(--accent-soft); color: #87502c; }
.pill.Open { background: var(--ok-soft); color: var(--ok); }
.pill.Full { background: var(--warn-soft); color: var(--warn); }
.pill.Completed { background: #e7ede6; color: var(--brand); }
.pill.Cancelled { background: #fbeeec; color: var(--danger); }
.progress { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.progress .bar { flex: 1; height: 7px; background: #ece7df; border-radius: 4px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: var(--ok); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: none; padding: 8px 14px; font: 600 14px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.back { display: inline-block; margin-bottom: 10px; font-size: 14px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; }
.facts b { color: var(--ink); font-weight: 600; }
.menu { position: relative; }
.menu .items { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 220px; z-index: 20; padding: 6px; }
.menu .items a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.menu .items a:hover { background: #f3efe8; }
.cell-input { border: 1px solid transparent !important; background: transparent !important; padding: 4px 6px !important; min-width: 90px; }
.cell-input:hover { border-color: #ddd3c5 !important; background: #fff !important; }
.cell-input:focus { border-color: #8fa98f !important; background: #fff !important; }
select.cell-input { min-width: 110px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.filters { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.filters label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.stamp { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; cursor: default; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tags .pill { font-size: 11px; padding: 1px 7px; }
.pill.tag-pay { background: var(--warn-soft); color: var(--warn); }
.pill.tag-unnamed { background: #ece4f3; color: #5d3f7a; }
.form-section { font-size: 15px; margin: 18px 0 10px; color: var(--muted); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
tr.editing td { background: #fbf9f5; padding: 16px; }
.import-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.import-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.import-card h3 { font-size: 16px; margin-bottom: 4px; }
.import-card p { margin: 0 0 10px; }
table.preview td { vertical-align: top; }
table.preview .cell-input { min-width: 150px; }
.edit-box { border-bottom: 1px solid var(--line); background: #fbf9f5; }
.edit-title { font-size: 18px; margin-bottom: 12px; }
tr.is-editing td { background: #eef3ee !important; }
td.email { max-width: 190px; overflow-wrap: break-word; }
.pill.tag-close { background: #e4ecf6; color: #2d5384; }
.closeout ol.steps { padding-left: 20px; margin: 14px 0 0; }
.closeout ol.steps li { margin-bottom: 18px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }

/* Shipping labels: sheets drawn at real size (inches); printed with no page margins. */
.label-sheets { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-top: 10px; }
.label-sheet { position: relative; width: 8.5in; height: 11in; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.label { position: absolute; box-sizing: border-box; padding: 0.12in 0.18in; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; outline: 1px dashed #e3dccf; border-radius: 0.1in; font-family: Arial, Helvetica, sans-serif; color: #000; }
.label.empty { background: repeating-linear-gradient(45deg, #faf8f4, #faf8f4 6px, #f2eee6 6px, #f2eee6 12px); }
.label-addr div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label-note { color: #444; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sheet-sm .label { padding: 0.06in 0.12in; } .sheet-sm .label-addr { font-size: 8pt; line-height: 1.15; } .sheet-sm .label-note { font-size: 6pt; -webkit-line-clamp: 1; }
.sheet-md .label-addr { font-size: 11pt; line-height: 1.25; } .sheet-md .label-note { font-size: 7.5pt; }
.sheet-lg .label-addr { font-size: 13pt; line-height: 1.3; } .sheet-lg .label-note { font-size: 8.5pt; }
.sheet-sm .label.tight .label-addr { font-size: 7pt; } .sheet-md .label.tight .label-addr { font-size: 9pt; } .sheet-lg .label.tight .label-addr { font-size: 11pt; }
@media print {
  @page { size: letter; margin: 0; }
  body.labels-mode { background: #fff; margin: 0; }
  body.labels-mode .topbar, body.labels-mode .no-print, body.labels-mode .toast { display: none !important; }
  body.labels-mode .page { padding: 0; margin: 0; max-width: none; }
  body.labels-mode .label-sheets { display: block; margin: 0; gap: 0; }
  body.labels-mode .label-sheet { box-shadow: none; border: none; page-break-after: always; break-after: page; margin: 0; }
  body.labels-mode .label-sheet:last-child { page-break-after: auto; break-after: auto; }
  body.labels-mode .label { outline: none; }
  body.labels-mode .label.empty { background: none; }
}
.label-controls { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.label-controls select { width: auto; max-width: 100%; }
.from-head { font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.08em; color: #555; margin-bottom: 0.05in; }
.label.return { justify-content: center; }
.label-from { font-size: 7pt; line-height: 1.2; color: #222; margin-bottom: 0.06in; }
.label-from div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label.has-from .label-addr { padding-left: 0.5in; }
.sheet-sm .label-from { font-size: 5pt; margin-bottom: 0.02in; } .sheet-sm .label.has-from .label-addr { padding-left: 0.2in; }
.sheet-sm .label.has-from .label-note { display: none; }
.sheet-lg .label-from { font-size: 8.5pt; }
/* Plain paper: dashed cut lines that also print. */
.label-sheets.plain .label { outline: none; border: 1.5px dashed #9a9086; border-radius: 0; padding: 0.25in 0.3in; }
.label-sheets.plain .label.empty { border-color: #e3dccf; }
.label-sheets.plain .label-addr { font-size: 14pt; line-height: 1.3; }
.label-sheets.plain .label.return .label-addr { font-size: 12pt; }
.label-sheets.plain .label-note { font-size: 9pt; }
@media print { body.labels-mode .label-sheets.plain .label { border: 1.5px dashed #777; } body.labels-mode .label-sheets.plain .label.empty { border: none; } }
td.hospital { min-width: 90px; max-width: 150px; }
td.sim { min-width: 162px; max-width: 180px; }
td.sim .cell-input { min-width: 0; width: 100%; }
td.sim .cell-input.small { font-size: 12.5px; margin-top: 4px; }
td.name .email { margin-top: 2px; overflow-wrap: break-word; }
th.step { white-space: normal; width: 74px; line-height: 1.25; }
td.notes .cell-input { min-width: 70px; }
td.sim select.cell-input { font-size: 13px; padding-left: 4px !important; padding-right: 0 !important; }
/* Confirmation box */
.modal-shade { position: fixed; inset: 0; background: rgba(43, 37, 32, 0.45); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: var(--card); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.25); padding: 22px 24px 18px; max-width: 440px; width: 100%; }
.modal p { margin: 0 0 6px; font-size: 15px; }
.modal-actions { justify-content: flex-end; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: #862f25; }
@media print { .modal-shade { display: none !important; } }
/* Sortable column headings */
.th-sort { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: inherit; }
.th-sort:hover { color: var(--ink); }
.th-sort .arrow { font-size: 10px; opacity: 0.35; letter-spacing: 0; }
.th-sort.on { color: var(--brand); }
.th-sort.on .arrow { opacity: 1; }
td.pay { min-width: 140px; }
td.pay .cell-input { min-width: 0; width: 100%; }
td.pay select.cell-input { font-size: 13px; padding-left: 4px !important; padding-right: 0 !important; }
td.pay select.pay-open { color: var(--warn); font-weight: 600; }
td.pay .pay-type { padding-left: 6px; margin-top: 2px; }
.pill.tag-status { background: #e4ecf6; color: #2d5384; }
.panel.inactive > header h2 { color: var(--muted); }
.dept-picker { display: block; }
.dept-picker .dept-other { margin-top: 4px; }
td.hospital { width: 150px; }
td.hospital .cell-input.dept { min-width: 0; width: auto; max-width: 140px; font-size: 12.5px; color: var(--muted); margin-top: 2px; padding: 2px 4px !important; }
td.hospital .cell-input.dept::placeholder { color: #b9aea2; }
table.preview td.dept .cell-input { min-width: 120px; }
.row-note { margin-top: 4px; color: #6b4f2e; background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
td.pay .stamp { display: inline; }
table.preview .pay-st .cell-input { margin-top: 4px; font-size: 13px; }
table.preview .pay-st .pay-open { color: var(--warn); font-weight: 600; }
td.pay { min-width: 175px; }
td.pay .pay-stamp { padding-left: 6px; }
select.pay-open { color: var(--warn); font-weight: 600; }
table.preview td select.cell-input { min-width: 160px; }
.stamp-edit { display: block; margin: 2px auto 0; background: none; border: 0; padding: 0 2px; font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; border-radius: 4px; }
.stamp-edit:hover, .stamp-edit:focus-visible { color: var(--brand); text-decoration: underline; background: var(--accent-soft); }
.stamp-date { font-size: 11px; padding: 1px 2px !important; width: 118px; margin-top: 2px; }
td.pay .pay-stamp { padding-left: 6px; }
td.pay .stamp-edit { display: inline; margin: 0; }
.stamp-date { display: block; margin-left: auto; margin-right: auto; }
/* A combined label lists every learner in the box (no cut-off), except on the 1-inch 5160 labels. */
.label-sheets.plain .label-note.all-names, .sheet-md .label-note.all-names, .sheet-lg .label-note.all-names { display: block; -webkit-line-clamp: unset; overflow: visible; }
table.faculty td.cert { min-width: 190px; }
.exp-expired { color: var(--danger); font-weight: 600; }
.exp-soon { color: var(--warn); font-weight: 600; }
.pill.tag-new { background: var(--ok-soft); color: var(--ok); }
.faculty-out summary { cursor: pointer; padding: 14px 18px; color: var(--muted); font-weight: 600; }
.faculty-out .out-row { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.preview-head { margin: 12px 0 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sched-day { padding: 6px 18px 18px; }
.sched-day h3 { font-size: 15px; margin: 14px 0 8px; }
.sched-title { margin-top: 12px; display: flex; gap: 8px; align-items: center; }
table.agenda td { padding: 6px 10px; vertical-align: middle; }
table.agenda td.time { white-space: nowrap; color: var(--muted); width: 120px; }
table.agenda tr.brk td { color: var(--muted); font-style: italic; background: var(--paper); }
table.agenda td.presenter { width: 300px; }
table.agenda .cell-input.t { width: 64px; }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sim-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); }
.sim-card.over { border-color: #e0a59d; background: #fbeae7; }
.sim-card.mid { border-color: #e2c27a; background: var(--warn-soft); }
.sim-card.good { border-color: #b9d8c3; background: var(--ok-soft); }
.sim-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; align-items: baseline; flex-wrap: wrap; }
.staff-row { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.staff-row > span:first-child { flex: 1; }
.sim-card select { margin-top: 6px; }
.cell-input.sched-name { width: 90px; }
/* Instructor schedule (printable) - UVM Health branding: Juniper #006341, Apple #78BE21, text #414042,
   borders #D0D0CE, panel #F1F1EF, Libre Franklin (web stand-in for Franklin Gothic). Logo and fonts are served
   from behind the login (/app/course-tracker/brand/), not from the public /assets/ folder. */
@font-face { font-family: "Libre Franklin"; font-weight: 400; font-display: swap; src: url("/app/course-tracker/brand/libre-franklin-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-weight: 600; font-display: swap; src: url("/app/course-tracker/brand/libre-franklin-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Franklin"; font-weight: 700; font-display: swap; src: url("/app/course-tracker/brand/libre-franklin-latin-700-normal.woff2") format("woff2"); }
.sched-doc { background: #fff; padding: 0.55in 0.7in; max-width: 8.5in; margin: 12px auto; box-shadow: var(--shadow);
  font-family: "Libre Franklin", "Franklin Gothic Book", "Franklin Gothic Medium", Arial, sans-serif; color: #414042;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sched-doc .brand-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sched-doc .brand-head img { height: 0.42in; width: auto; display: block; }
.sched-doc .brand-head .dept { font-size: 8.5pt; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #006341; text-align: right; }
.sched-doc .title-band { background: #006341; color: #fff; padding: 14px 18px 12px; border-bottom: 5px solid #78BE21; }
.sched-doc .title-band .kicker { font-size: 8.5pt; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #78BE21; margin: 0 0 4px; }
.sched-doc .title-band h1 { font-family: inherit; font-size: 21pt; font-weight: 700; margin: 0; color: #fff; line-height: 1.15; }
.sched-doc .title-band .when { font-size: 11.5pt; font-weight: 600; margin: 4px 0 0; color: #fff; }
.sched-doc h3 { font-family: inherit; font-size: 12.5pt; font-weight: 700; color: #006341; margin: 20px 0 8px; padding-left: 9px; border-left: 4px solid #78BE21; line-height: 1.2; }
.sched-doc table { width: 100%; border-collapse: collapse; font-size: 11pt; margin-top: 12px; }
.sched-doc th { text-align: left; font-size: 8.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #006341; padding: 6px 8px; border-bottom: 2px solid #006341; }
.sched-doc td { padding: 6px 8px; border-bottom: 1px solid #D0D0CE; vertical-align: top; }
.sched-doc td.time { white-space: nowrap; width: 1.25in; font-weight: 600; color: #006341; }
.sched-doc td.who { font-weight: 600; white-space: nowrap; } /* presenter names stay on one line */
.sched-doc tr.brk td { background: #F1F1EF; color: #6d6e71; font-style: italic; }
.sched-doc tr.brk td.time { color: #6d6e71; font-weight: 400; }
.sched-doc .sim-line { display: flex; gap: 12px; margin: 5px 0; font-size: 11pt; padding: 6px 10px; background: #F1F1EF; }
.sched-doc .sim-line b { color: #006341; min-width: 1.2in; }
.sched-doc .doc-foot { margin-top: 26px; padding-top: 8px; border-top: 1px solid #D0D0CE; font-size: 8pt; color: #6d6e71; }
@media print {
  body.doc-mode { background: #fff; }
  body.doc-mode .topbar, body.doc-mode .no-print, body.doc-mode .toast { display: none !important; }
  body.doc-mode .page { padding: 0; margin: 0; max-width: none; }
  body.doc-mode .sched-doc { box-shadow: none; margin: 0; max-width: none; padding: 0.55in 0.7in; }
}

/* ---------- Home Library ---------- */
.lib-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.lib-filters select { width: auto; max-width: 220px; }
.lib-search { flex: 1 1 260px; min-width: 200px; font: 14px var(--sans); border: 1px solid #cfc5b6; border-radius: 7px; padding: 7px 9px; background: #fff; }
.seg { display: inline-flex; border: 1px solid #cfc5b6; border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 12px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand); color: #fff; }
.lib-count { margin: -6px 0 10px; }
.lib-center { justify-content: center; }
.lib-tight { margin: 0 0 10px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; }
.lib-card { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.lib-card:hover .cover, .lib-card:focus-visible .cover { box-shadow: 0 0 0 3px #b9c9b8, var(--shadow); }
.lib-card-text { padding: 8px 2px 0; }
.lib-card .t { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card .a { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card .s { font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover { aspect-ratio: 2 / 3; width: 100%; border-radius: 4px; overflow: hidden; background: var(--accent-soft); box-shadow: var(--shadow); position: relative; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px; text-align: center;
  background: linear-gradient(160deg, #efe3d4, #e2d2bd); color: #5e4630; font: 600 14px/1.25 var(--serif); border-left: 6px solid rgba(94, 70, 48, 0.25); }
.cover-ph span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover-ph small { font: 12px var(--sans); color: #7d6650; }
.cover.small { width: 38px; box-shadow: none; }
.cover.small .cover-ph { padding: 2px; border-left-width: 3px; }
.cover.small .cover-ph span, .cover.small .cover-ph small { display: none; }
.lib-table td { vertical-align: middle; }
.lib-table td.thumb { width: 54px; }
.lib-table .t { font-weight: 600; }
.pill.fmt-Audio { background: #e4ecf6; color: #2d5384; }
.pill.fmt-Both { background: #ece4f3; color: #5d3f7a; }
tr.done-row td { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,0.25); }
tr.done-row td:last-child { text-decoration: none; }
td.nowrap { white-space: nowrap; }
.lib-edit { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; align-items: start; }
.lib-cover-edit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lib-lookup { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.lib-lookup .grow { flex: 1 1 200px; }
.lib-msg { font-size: 14px; min-height: 0; margin: 4px 0 10px; }
.lib-msg:empty { display: none; }
.lib-msg.ok { color: var(--ok); } .lib-msg.warn { color: var(--warn); } .lib-msg.error { color: var(--danger); }
.lib-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-bottom: 12px; }
.lib-picks:empty { display: none; }
.lib-pick { display: flex; gap: 10px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; font: inherit; color: inherit; }
.lib-pick:hover { border-color: #8fa98f; background: #f6f9f5; }
.lib-pick .cover { width: 44px; flex: none; box-shadow: none; }
.lib-pick .cover-ph span { display: none; }
.lib-scan { margin-bottom: 10px; }
.lib-video { position: relative; max-width: 420px; border-radius: 8px; overflow: hidden; background: #000; }
.lib-video video { display: block; width: 100%; }
.lib-video .aim { position: absolute; left: 12%; right: 12%; top: 38%; bottom: 38%; border: 2px solid rgba(255,255,255,0.85); border-radius: 6px; box-shadow: 0 0 0 999px rgba(0,0,0,0.25); }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.modal.wide { max-width: 760px; max-height: 90vh; overflow: auto; }
.modal.wide h2 { font-size: 20px; }
@media (max-width: 700px) {
  .lib-edit { grid-template-columns: 1fr; }
  .lib-cover-edit .cover { width: 120px; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px 10px; }
  .lib-filters select { flex: 1 1 140px; max-width: none; }
}
