:root {
  --bg: #eef3f9;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-soft: #f5f8fc;
  --ink: #1d2938;
  --muted: #6b7a90;
  --accent: #2656c3;
  --accent-soft: rgba(38, 86, 195, 0.12);
  --line: #d8e0eb;
  --holiday-bg: linear-gradient(180deg, rgba(192, 52, 64, 0.14), rgba(255, 255, 255, 0.92) 42%);
  --holiday-border: #d46872;
  --holiday-text: #8a2432;
  --scheduled-bg: linear-gradient(135deg, #e7f8ef 0%, #dcf2e6 100%);
  --scheduled-border: #23885b;
  --carry-bg: linear-gradient(135deg, #eff4ff 0%, #e3ebff 100%);
  --carry-border: #6b8df5;
  --leave-bg: linear-gradient(135deg, #fff0b8 0%, #ffe89c 100%);
  --leave-border: #d4a017;
  --dayoff-bg: linear-gradient(135deg, #ffe8da 0%, #ffd5c5 100%);
  --dayoff-border: #d26a37;
  --edl-bg: linear-gradient(135deg, #f3e8ff 0%, #e6d8ff 100%);
  --edl-border: #7b58d6;
  --shadow: 0 18px 44px rgba(25, 39, 62, 0.10);
  --shadow-soft: 0 10px 30px rgba(25, 39, 62, 0.06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(44, 92, 197, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(35, 136, 91, 0.10), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #edf2f8 100%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 28px 36px;
}
.topbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}
.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.nav form {
  margin: 0;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.form-card { max-width: 720px; }
.grid {
  display: grid;
  gap: 18px;
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
h1, h2, h3 { margin-top: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
th { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.error {
  background: rgba(212, 104, 114, 0.12);
  border: 1px solid #e2a39b;
  color: #812c1f;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.notice {
  background: rgba(15, 143, 140, 0.10);
  border: 1px solid #7fc4c2;
  color: #10514f;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
/* A one-time secret shown on screen: monospaced so it can be read out
   and typed without ambiguity. */
.credential {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: var(--surface, #fff);
  border: 1px dashed #7fc4c2;
  border-radius: 10px;
  padding: 10px 12px;
  display: inline-block;
  margin-top: 6px;
  user-select: all;
}
.button, button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}
.button.secondary, button.secondary {
  background: #dfe7f4;
  color: var(--ink);
}
.button.inline, button.inline {
  padding: 8px 12px;
  font-size: 0.92rem;
}
.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check-row input[type="checkbox"] { width: auto; margin-top: 3px; }
.check-row .muted { margin-top: 4px; }
input, select, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  background: white;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}
.title-block h1 {
  margin: 0 0 8px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.title-block .meta {
  color: var(--muted);
  font-size: 14px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.card-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.card-detail {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.assignment-editor {
  max-width: 960px;
}
.assignment-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.assignment-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.staff-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.staff-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-areas:
    "check name"
    "check code";
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.staff-choice:hover {
  border-color: rgba(38, 86, 195, 0.38);
  box-shadow: var(--shadow-soft);
}
.staff-choice:has(input:checked) {
  border-color: rgba(38, 86, 195, 0.62);
  background: var(--accent-soft);
}
.staff-choice input {
  grid-area: check;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}
.staff-choice-name {
  grid-area: name;
  min-width: 0;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}
.staff-choice-code {
  grid-area: code;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
/* Page header: a title line and a toolbar line, no cards. */
.page-head { margin: 4px 0 16px; }
.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.button.quiet {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
.button.quiet:hover { background: var(--accent-soft); }
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.month-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-toolbar .month-bar { margin: 0; justify-content: flex-start; }
.toolbar-filter { width: min(300px, 100%); }
.lock-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #eceff5;
  color: #4b5b73;
  white-space: nowrap;
}
.lock-pill.is-partial { background: #fff3d6; color: #7a5a12; }
[data-swap-region][aria-busy="true"] { opacity: 0.55; transition: opacity 120ms ease; }
.form-dialog { width: min(680px, calc(100vw - 32px)); }
.form-dialog .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.form-dialog h1 { display: none; }
.quick-add-dialog { width: min(420px, calc(100vw - 32px)); }
.quick-add-actions { display: grid; gap: 8px; }
.quick-add-actions .button { text-align: center; }
[data-quick-add] .day:not(.is-locked), [data-quick-add] .mobile-day-card:not(.is-locked) { cursor: pointer; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Month bar: ‹ November 2026 › — the month name is the picker. */
.month-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
}
.month-bar-step {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #dfe7f4;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  user-select: none;
}
.month-bar-step:hover { background: #d2dcee; }
.month-bar-step.is-disabled { opacity: 0.32; pointer-events: none; }
.month-bar-current {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}
.month-bar-current::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.month-bar-current select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 8px 30px 8px 12px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  text-align-last: center;
  color: var(--ink);
  cursor: pointer;
}
.month-bar-current select:hover { background: rgba(38, 86, 195, 0.06); }
.month-bar-current select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.month-bar-go { flex: 0 0 auto; }
.js .month-bar-go { display: none; }
.toolbar {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}
.toolbar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
}
.toolbar-title {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
}
.calendar-shell {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mobile-agenda {
  display: none;
}
.mobile-day-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}
.mobile-day-card.is-hidden {
  display: none;
}
.mobile-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.mobile-day-title {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.mobile-day-subtitle {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mobile-day-events {
  display: grid;
  gap: 7px;
}
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #f5f8fc;
  border-bottom: 1px solid var(--line);
}
.weekday {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
/* Pay periods are what hours are measured against, so the calendar names
   where each one begins. Two alternating tones are enough to separate
   neighbours without inventing a colour per period. */
.pay-period-band {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.pay-period-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.pay-period-band.tone-a .pay-period-marker { background: #2656c3; }
.pay-period-band.tone-b .pay-period-marker { background: #0f8f8c; }
.pay-period-band.tone-a { box-shadow: inset 4px 0 0 #2656c3; }
.pay-period-band.tone-b { box-shadow: inset 4px 0 0 #0f8f8c; }
.pay-period-name {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
}
.pay-period-range { color: var(--muted); }
.pay-period-note {
  color: var(--muted);
  font-style: italic;
}
/* Only drawn when a period starts on a day other than Monday, which the
   band above the row cannot express on its own. */
.day.is-period-start {
  box-shadow: inset 3px 0 0 var(--accent);
}
.day {
  min-height: 170px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.week .day:last-child { border-right: none; }
.day.is-outside {
  background: var(--paper-soft);
  color: var(--muted);
}
.day.is-today {
  background: linear-gradient(180deg, rgba(44, 92, 197, 0.08), transparent 40%), var(--paper);
}
.day.is-holiday {
  background: var(--holiday-bg);
  box-shadow: inset 0 0 0 1px rgba(212, 104, 114, 0.18);
}
.day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.day-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.day.is-today .day-number {
  background: var(--accent);
  color: white;
}
.day-tag {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.holiday-tag { color: var(--holiday-text); }
.events {
  display: grid;
  gap: 7px;
}
/* Locked days: still readable, visibly not for changing. */
.day.is-locked, .mobile-day-card.is-locked {
  background-image: repeating-linear-gradient(
    135deg, rgba(107, 122, 144, 0.07) 0 6px, transparent 6px 14px);
}
.day.is-locked .day-number, .mobile-day-card.is-locked .day-number { opacity: 0.7; }
.event {
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 4px solid var(--scheduled-border);
  background: var(--scheduled-bg);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.12);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.event:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(31, 46, 69, 0.10), inset 0 0 0 1px rgba(47, 143, 91, 0.12);
}
.event.is-hidden { display: none; }
.event.carry-in {
  border-left-color: var(--carry-border);
  background: var(--carry-bg);
  box-shadow: inset 0 0 0 1px rgba(123, 158, 255, 0.18);
}
.event.annual-leave {
  border-left-color: var(--leave-border);
  background: var(--leave-bg);
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, 0.18);
}
.event.educational-leave {
  border-left-color: var(--leave-border);
  background: var(--leave-bg);
  box-shadow: inset 0 0 0 1px rgba(212, 160, 23, 0.18);
}
.event.days-off {
  border-left-color: var(--dayoff-border);
  background: var(--dayoff-bg);
  box-shadow: inset 0 0 0 1px rgba(210, 106, 55, 0.18);
}
.event.required-shift {
  border-left-color: #4c56c6;
  background: linear-gradient(135deg, #ebeefe 0%, #dfe4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(76, 86, 198, 0.18);
}
.event.canceled-shift {
  border-left-color: #0f8f8c;
  background: linear-gradient(135deg, #e8fbf9 0%, #c9f1ed 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 143, 140, 0.18);
}
.event-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.event-staff {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}
.calendar-hint { margin: 0 0 12px; }
.event.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
dialog.event-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px 20px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 24px 60px rgba(21, 33, 54, 0.22);
  color: inherit;
  background: white;
}
dialog.event-dialog::backdrop {
  background: rgba(21, 33, 54, 0.42);
}
.event-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.event-dialog-title { margin: 0; font-size: 18px; }
.event-dialog-actions { margin-top: 16px; }
.event-dialog-actions[hidden] { display: none; }
.detail-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}
.detail-item-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.detail-item-value {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
}
.detail-row-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-shell {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.table-shell table {
  min-width: 620px;
  margin: 0;
}
.page-stats { margin-top: 18px; }
.stats-card { margin-bottom: 18px; }
.stats-table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.stats-table {
  min-width: 980px;
}
.stats-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7faff;
  box-shadow: inset 0 -1px 0 var(--line);
}
.stats-table .stats-sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: white;
}
.stats-table .stats-staff-header {
  min-width: 190px;
  background: #f7faff;
  z-index: 4;
}
.stats-table .stats-staff-cell {
  font-weight: 700;
}
.stats-table .stats-group-header {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.stats-table .group-0 {
  background: rgba(38, 86, 195, 0.04);
}
.stats-table .group-1 {
  background: rgba(35, 136, 91, 0.04);
}
.stats-table td.group-0,
.stats-table th.group-0 {
  box-shadow: inset 1px 0 0 rgba(38, 86, 195, 0.08);
}
.stats-table td.group-1,
.stats-table th.group-1 {
  box-shadow: inset 1px 0 0 rgba(35, 136, 91, 0.08);
}
.stats-total-col {
  font-weight: 700;
  color: var(--ink);
}
.stats-tone-positive {
  color: #9a2f2f;
  background-image: linear-gradient(rgba(202, 66, 66, 0.09), rgba(202, 66, 66, 0.09));
}
.stats-tone-negative {
  color: #1e6b3a;
  background-image: linear-gradient(rgba(35, 136, 91, 0.10), rgba(35, 136, 91, 0.10));
}
.stats-sort-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.stats-sort-button:hover {
  text-decoration: underline;
}
.stats-table tbody tr:hover td,
.stats-table tbody tr:hover th {
  background-image: linear-gradient(rgba(38, 86, 195, 0.03), rgba(38, 86, 195, 0.03));
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.link-button:hover {
  text-decoration: underline;
}
@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(44, 92, 197, 0.12), transparent 34%),
      linear-gradient(180deg, #f8fbff 0%, #edf2f8 100%);
  }
  .shell {
    padding: 16px 14px 28px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 0 8px;
  }
  .brand {
    font-size: 1.18rem;
  }
  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }
  .nav > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    text-align: center;
    font-weight: 600;
    text-decoration: none;
  }
  .nav > form {
    display: block;
  }
  .nav > form button {
    width: 100%;
    min-height: 42px;
  }
  .card {
    padding: 16px;
    border-radius: 16px;
  }
  .weekday-row { display: none; }
  .calendar-shell { display: none; }
  .mobile-agenda {
    display: grid;
    gap: 12px;
  }
  .week { grid-template-columns: 1fr; }
  .day {
    min-height: auto;
    border-right: none;
    padding: 10px;
  }
  .events {
    gap: 6px;
  }
  .event {
    padding: 7px 9px;
  }
  .event-title {
    font-size: 12px;
  }
  .event-staff {
    font-size: 11px;
  }
  .hero, .summary, .grid.two { grid-template-columns: 1fr; }
  .title-block h1 {
    font-size: 28px;
  }
  .card-value {
    font-size: 24px;
  }
  .toolbar-card {
    padding: 12px 14px;
  }
  .toolbar-row,
  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .toolbar-row > *,
  .detail-actions > * {
    width: 100%;
  }
  .detail-row-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .stats-table {
    min-width: 760px;
  }
  .table-shell table {
    min-width: 560px;
  }
  input, select, textarea, button, .button {
    font-size: 16px;
  }
  /* The bar rides along the top of a long calendar, so the chevrons
     are always within reach of a thumb. */
  .page-head-row { flex-direction: column; align-items: stretch; }
  .page-title { font-size: 24px; }
  .page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .page-actions > .button:first-child { grid-column: 1 / -1; }
  /* Two buttons: both full width. Three: the two secondaries pair up. */
  .page-actions > .button:nth-child(2):last-child { grid-column: 1 / -1; }
  .page-actions > .button { text-align: center; }
  /* Dissolve the toolbar's box so the month bar is a direct child of
     the page and its sticky containing block spans the calendar. */
  .page-toolbar { display: contents; }
  .month-row { display: contents; }
  .toolbar-filter { width: 100%; margin: 0 0 12px; }
  .lock-pill { align-self: flex-start; margin: 0 0 10px; }
  .month-bar.is-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -14px 12px;
    padding: 8px 14px;
    background: rgba(248, 251, 255, 0.96);
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 16px rgba(21, 33, 54, 0.08);
  }
  .month-bar-current select { font-size: 19px; }
  .assignment-editor-head {
    flex-direction: column;
    gap: 10px;
  }
  .assignment-count {
    white-space: normal;
  }
  .staff-choice-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr;
  }
  .day-head {
    margin-bottom: 8px;
  }
  .day-number {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .day-tag {
    font-size: 10px;
  }
  .table-shell table {
    min-width: 520px;
  }
  .stats-table {
    min-width: 700px;
  }
}
