/* ============================================================
 * BunkerBuster — global stylesheet
 * Friendly + warm defaults; --accent overridable per school via base.html.
 * ============================================================ */

:root {
  /* Surface */
  --bg:            hsl(40 20% 98%);
  --surface:       #ffffff;
  --surface-soft:  hsl(40 20% 96%);
  --surface-sunken:hsl(40 14% 94%);

  /* Text — verified ≥4.5:1 contrast against --bg */
  --text:          hsl(20 12% 12%);
  --text-muted:    hsl(20 10% 36%);
  --text-subtle:   hsl(20 6%  52%);

  /* Lines */
  --border:        hsl(30 15% 88%);
  --border-strong: hsl(30 12% 76%);

  /* Accent (default teal — override per school via inline <style>) */
  --accent:        hsl(173 80% 30%);
  --accent-hover:  hsl(173 80% 25%);
  --accent-soft:   hsl(173 70% 94%);
  --accent-fg:     #ffffff;

  /* Status */
  --success:       hsl(150 60% 35%);
  --success-soft:  hsl(150 55% 94%);
  --warning:       hsl(35 90% 45%);
  --warning-soft:  hsl(35 90% 94%);
  --danger:        hsl(0 70% 48%);
  --danger-soft:   hsl(0 70% 96%);

  /* Spacing scale (use as `var(--s-3)` etc) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px hsl(20 10% 10% / 0.06);
  --shadow-md: 0 4px 12px hsl(20 10% 10% / 0.08);
  --shadow-lg: 0 12px 32px hsl(20 10% 10% / 0.12);

  /* Type */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ============================================================ Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  /* Sticky nav offset so anchor links / fragment scrolls don't land underneath. */
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
/* Eliminate iOS Safari's 300ms tap delay on interactive surfaces. */
a, button, label, [role="button"] { touch-action: manipulation; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Skip link — first focusable element, visible only on focus. */
.skip-link {
  position: absolute; top: 8px; left: 8px;
  padding: 8px 12px;
  background: var(--accent); color: var(--accent-fg);
  border-radius: var(--r-md);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 120ms ease;
  z-index: 200;
}
.skip-link:focus {
  transform: translateY(0);
  text-decoration: none;
}

/* ============================================================ Typography */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-3); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 var(--s-3); }
small, .text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-strong { font-weight: 600; }
code, pre { font-family: var(--font-mono); font-size: 0.92em; }

/* ============================================================ Layout */
.page { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: clamp(16px, 4vw, 32px);
  padding-block: var(--s-5);
}
.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-5); }
.row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: var(--s-4); }
.grid-cards { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================ Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.card--soft { background: var(--surface-soft); box-shadow: none; }
.card--center { text-align: center; }
.card__head { margin-bottom: var(--s-4); }
.card__head h2, .card__head h3 { margin-bottom: var(--s-1); }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--surface-soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-soft); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: white; }
.btn--danger:hover { filter: brightness(0.95); color: white; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 var(--s-3); font-size: 0.9rem; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn[aria-current="page"] {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* ============================================================ Inputs */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
}
textarea { min-height: 96px; padding: var(--s-3); }
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Date/time inputs render the calendar/clock indicator at the right edge.
   Tint it to the accent so it doesn't read as a foreign default-blue glyph. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 120ms ease;
  filter: invert(35%) sepia(30%) saturate(800%) hue-rotate(140deg);
}
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator,
input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
input[type="month"]:hover::-webkit-calendar-picker-indicator,
input[type="week"]:hover::-webkit-calendar-picker-indicator {
  opacity: 1;
}
.field { display: block; }
.field__label { display: block; margin-bottom: var(--s-2); font-weight: 600; font-size: 0.95rem; }
.field__hint { color: var(--text-muted); font-size: 0.85rem; margin-top: var(--s-1); }
.field__error { color: var(--danger); font-size: 0.85rem; margin-top: var(--s-1); }

/* ============================================================ Badge / Pill */
.badge {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 2px var(--s-2);
  border-radius: var(--r-pill);
  font-size: 0.78rem; font-weight: 600;
  background: var(--surface-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge--warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* ============================================================ Alert / Banner */
.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}
.alert--info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert--success { background: var(--success-soft); color: var(--success); border-color: transparent; }

/* ============================================================ Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: var(--s-3); border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================================ Plain data list */
.data-list { list-style: none; padding: 0; margin: 0; }
.data-list > li { padding: var(--s-2) 0; border-bottom: 1px solid var(--border); }
.data-list > li:last-child { border-bottom: 0; }

/* ============================================================ Top navbar */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  /* Notch / status-bar safe area on iOS */
  padding-top: env(safe-area-inset-top);
  /* Subtle elevation that fades at top of scroll for depth */
  box-shadow: 0 1px 0 hsl(20 10% 10% / 0);
  transition: box-shadow 200ms ease;
}
.nav__inner {
  display: flex; align-items: center; gap: var(--s-3);
  max-width: 1100px; margin: 0 auto;
  padding: var(--s-2) clamp(16px, 4vw, 32px);
  min-height: 56px;
}
.nav__brand {
  display: flex; align-items: center; gap: var(--s-2);
  font-weight: 700; color: var(--text); text-decoration: none;
  font-size: 1rem;
  min-height: 44px;
  padding-right: var(--s-2);
  border-radius: var(--r-md);
}
.nav__brand:hover { text-decoration: none; }
.nav__brand-mark {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  flex: 0 0 auto;
  /* Slight padding via background so the colored mark gets a soft halo on busy bgs */
  background: transparent;
}
/* Hide BunkerBuster wordmark on small screens — school name is enough context */
.nav__brand-name { display: none; }
.nav__brand-school {
  color: var(--text);
  font-weight: 600;
}
@media (min-width: 480px) {
  .nav__brand-name { display: inline; }
  .nav__brand-school {
    color: var(--text-muted); font-weight: 500;
    border-left: 1px solid var(--border-strong);
    padding-left: var(--s-3); margin-left: var(--s-2);
  }
}
.nav__links {
  display: none;
  gap: var(--s-1); margin-left: var(--s-3);
}
.nav__links a {
  display: inline-flex; align-items: center;
  min-height: 40px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: background 120ms ease, color 120ms ease;
}
.nav__links a:hover { color: var(--text); background: var(--surface-soft); text-decoration: none; }
.nav__links a:active { background: var(--surface-sunken); }
.nav__links a[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent);
}

/* Nav dropdown groups (desktop): a button toggles a dropdown menu of links. */
.nav__group { position: relative; }
.nav__group-toggle {
  display: inline-flex; align-items: center; gap: var(--s-1);
  min-height: 40px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.nav__group-toggle:hover { color: var(--text); background: var(--surface-soft); }
.nav__group-toggle[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav__group-toggle[aria-expanded="true"] { background: var(--surface-soft); color: var(--text); }
.nav__group-caret {
  transition: transform 160ms ease;
  margin-left: 2px;
}
.nav__group-toggle[aria-expanded="true"] .nav__group-caret { transform: rotate(180deg); }
.nav__group-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: var(--s-1);
  z-index: 50;
}
.nav__group-toggle[aria-expanded="true"] + .nav__group-menu { display: block; }
.nav__group-menu a {
  display: block;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.nav__group-menu a:hover { color: var(--text); background: var(--surface-soft); text-decoration: none; }
.nav__group-menu a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* Mobile drawer section grouping */
.nav__drawer-section { margin: var(--s-3) 0; }
.nav__drawer-section-title {
  display: block;
  padding: var(--s-2) var(--s-3) 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}

.nav__spacer { flex: 1; }
.nav__user {
  display: none;
  align-items: center; gap: var(--s-1);
  position: relative;
  padding-left: var(--s-2);
  margin-left: var(--s-1);
}
.nav__user::before {
  content: ""; position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 1px; background: var(--border);
}
.nav__user-email {
  font-size: 0.9rem; color: var(--text-muted);
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav__user .btn[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent);
}
.nav__logout-form { margin: 0; }

/* Hamburger toggle — 44×44 with animated bars that morph to X */
.nav__toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  margin-left: auto;
  cursor: pointer;
  color: var(--text);
}
.nav__toggle:hover { background: var(--surface-soft); }
.nav__toggle:active { background: var(--surface-sunken); }
.nav__toggle-bars {
  position: relative;
  width: 22px; height: 16px;
}
.nav__toggle-bars > span {
  position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}
.nav__toggle-bars > span:nth-child(1) { top: 0; }
.nav__toggle-bars > span:nth-child(2) { top: 7px; }
.nav__toggle-bars > span:nth-child(3) { top: 14px; }
.nav.is-open .nav__toggle-bars > span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav.is-open .nav__toggle-bars > span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle-bars > span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

@media (min-width: 768px) {
  .nav__links { display: inline-flex; }
  .nav__user { display: inline-flex; }
  .nav__toggle { display: none; }
}

/* Mobile drawer — toggled by `.nav.is-open` class via JS.
   Drawer floats over content (position: absolute) so it doesn't push main down. */
.nav__drawer {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 50;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: var(--s-2) clamp(16px, 4vw, 32px) calc(var(--s-4) + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-md);
  max-height: calc(100dvh - 56px);
  overflow-y: auto;
}
.nav.is-open .nav__drawer { display: block; }
.nav__drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-2);
}
.nav__drawer-close {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  margin-right: -8px;
  border-radius: var(--r-md);
  cursor: pointer; color: var(--text);
}
.nav__drawer-close:hover { background: var(--surface-soft); }
.nav__drawer-close svg { width: 20px; height: 20px; }
.nav__drawer > a,
.nav__drawer-section > a {
  display: block;
  padding: var(--s-3) 0;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  min-height: 48px;
}
.nav__drawer > a:hover,
.nav__drawer-section > a:hover { background: var(--surface-soft); }
.nav__drawer > a:active,
.nav__drawer-section > a:active { background: var(--surface-sunken); }
.nav__drawer > a[aria-current="page"],
.nav__drawer-section > a[aria-current="page"] {
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: var(--s-2);
}
/* Sign-out section: spatial separation from regular nav per #9 destructive-separation */
.nav__drawer-meta {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
}
.nav__drawer form { margin-top: var(--s-3); }
@media (min-width: 768px) {
  .nav__drawer, .nav__toggle-input:checked ~ .nav__drawer { display: none; }
}

/* ============================================================ Auth shell (login pages) */
.auth-shell {
  display: grid; place-items: center;
  min-height: calc(100dvh - 64px);
  padding: var(--s-5) clamp(16px, 4vw, 32px);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-md);
}
.auth-card h1 { margin-bottom: var(--s-2); }
.auth-card .lede { color: var(--text-muted); margin-bottom: var(--s-5); }
.auth-card__brand {
  display: grid; place-items: center;
  margin-bottom: var(--s-2);
}
.auth-card__brand img {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
}
.auth-card .or-divider {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--text-subtle); font-size: 0.85rem; margin: var(--s-4) 0;
}
.auth-card .or-divider::before,
.auth-card .or-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

/* ============================================================ Action cards (home) */
.action-card {
  display: block;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.action-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.action-card__icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: var(--s-3);
}
.action-card__icon svg { width: 22px; height: 22px; }
.action-card h3 { margin: 0 0 var(--s-1); }
.action-card p { margin: 0; color: var(--text-muted); }

/* ============================================================ Radio cards (settings UI prefs) */
.radio-cards { display: grid; gap: var(--s-2); }
.radio-card {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card input { margin-top: 4px; accent-color: var(--accent); }
.radio-card:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
}
.radio-card__title { font-weight: 600; }
.radio-card__hint { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================ A11y / motion */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.action-card:focus-visible {
  outline-offset: 4px;
  border-color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================ Lesson card (on /today/) */
.lesson-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.lesson-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: translateY(-1px);
}
.lesson-card:active { transform: translateY(0); }
.lesson-card--done { background: linear-gradient(180deg, var(--success-soft), var(--surface) 60%); }
.lesson-card--partial { background: linear-gradient(180deg, var(--warning-soft), var(--surface) 60%); }
.lesson-card--now { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.lesson-card__time {
  display: flex; flex-direction: column; align-items: flex-start; min-width: 64px;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--border);
  padding-right: var(--s-3);
}
.lesson-card__time-h {
  font-weight: 700; font-size: 1.4rem; line-height: 1;
  color: var(--text);
}
.lesson-card__time-end {
  color: var(--text-muted); font-size: 0.78rem; margin-top: 2px;
}
.lesson-card__body { min-width: 0; }
.lesson-card__title {
  font-weight: 600; font-size: 1.05rem;
  display: flex; align-items: center; gap: var(--s-2);
}
.lesson-card__sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }
.lesson-card__chev { width: 18px; height: 18px; color: var(--text-subtle); }
.lesson-card:hover .lesson-card__chev { color: var(--accent); }

@media (max-width: 480px) {
  .lesson-card { grid-template-columns: auto 1fr auto; gap: var(--s-2); padding: var(--s-3); }
  .lesson-card__chev { display: none; }
  .lesson-card__time { min-width: 56px; padding-right: var(--s-2); }
  .lesson-card__time-h { font-size: 1.2rem; }
}

/* ============================================================ Mark page header */
.mark-head {
  display: flex; gap: var(--s-3); align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap;
  margin-top: var(--s-2);
}
.mark-head__counter {
  display: flex; align-items: baseline; gap: var(--s-2);
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 1.4rem; color: var(--text);
}
.mark-progress {
  margin-top: var(--s-3);
  height: 6px; background: var(--surface-sunken); border-radius: var(--r-pill);
  overflow: hidden;
}
.mark-progress__bar {
  height: 100%; background: var(--accent); border-radius: inherit;
  transition: width 240ms ease;
}

/* ============================================================ Attendance row (shared) */
.att-row {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%;
  padding: var(--s-3);
  border-radius: var(--r-md);
  transition: background 150ms ease;
}
.att-row__student {
  display: flex; align-items: center; gap: var(--s-3);
  flex: 1; min-width: 0;
}
.att-row__avatar {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--surface-sunken); color: var(--text-muted);
  font-weight: 700; font-size: 1rem;
  text-transform: uppercase;
}
.att-row__name {
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-row__actions { display: flex; gap: var(--s-2); flex: 0 0 auto; }
.att-row--P { background: var(--success-soft); }
.att-row--P .att-row__avatar { background: var(--success); color: white; }
.att-row--L { background: var(--warning-soft); }
.att-row--L .att-row__avatar { background: var(--warning); color: white; }
.att-row--A { background: var(--danger-soft); }
.att-row--A .att-row__avatar { background: var(--danger); color: white; }

/* Attendance pill — touch-friendly toggle */
.att-pill {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 56px; min-height: 48px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 80ms ease;
  user-select: none;
}
.att-pill:hover { color: var(--text); border-color: var(--text-muted); }
.att-pill:active { transform: scale(0.97); }
.att-pill__letter { font-size: 1rem; line-height: 1; }
.att-pill__label { font-size: 0.7rem; font-weight: 500; opacity: 0.7; }
.att-pill--p.is-on { background: var(--success); color: white; border-color: var(--success); }
.att-pill--l.is-on { background: var(--warning); color: white; border-color: var(--warning); }
.att-pill--a.is-on { background: var(--danger); color: white; border-color: var(--danger); }
.att-pill.is-on .att-pill__label { opacity: 1; }

/* On small screens, drop the word labels — letter is enough */
@media (max-width: 480px) {
  .att-pill { min-width: 44px; padding: 4px 8px; }
  .att-pill__label { display: none; }
  .att-pill__letter { font-size: 1.1rem; }
}

/* ============================================================ Mark / List layout */
.att-list {
  list-style: none; padding: 0; margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.att-list__item + .att-list__item { border-top: 1px solid var(--border); }
.att-list__item { background: var(--surface); }
.att-list__item .att-row { border-radius: 0; }

/* ============================================================ Mark / Grid layout */
.att-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}
@media (min-width: 600px) { .att-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .att-grid { grid-template-columns: repeat(3, 1fr); } }
.att-grid__tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-2);
}
.att-grid__tile .att-row {
  flex-direction: column; align-items: stretch;
  gap: var(--s-3);
}
.att-grid__tile .att-row__student { justify-content: flex-start; }
.att-grid__tile .att-row__actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}
.att-grid__tile .att-pill { width: 100%; }

/* ============================================================ Mark / Rollcall layout */
.att-rollcall {
  display: flex; flex-direction: column; gap: var(--s-3);
  max-width: 540px; margin: 0 auto; width: 100%;
}
.att-rollcall__progress {
  height: 6px; background: var(--surface-sunken); border-radius: var(--r-pill);
  overflow: hidden;
}
.att-rollcall__progress-bar {
  height: 100%; background: var(--accent); border-radius: inherit;
  transition: width 240ms ease;
}
.att-rollcall__counter {
  text-align: center; color: var(--text-muted);
  font-size: 0.85rem; font-variant-numeric: tabular-nums;
}
.att-rollcall__deck { position: relative; min-height: 180px; }
.att-rollcall__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4);
  box-shadow: var(--shadow-md);
}
.att-rollcall__card .att-row {
  flex-direction: column; align-items: stretch; text-align: center;
  gap: var(--s-5); padding: 0;
}
.att-rollcall__card .att-row__student {
  flex-direction: column; align-items: center; gap: var(--s-3);
}
.att-rollcall__card .att-row__avatar {
  width: 88px; height: 88px; flex: 0 0 88px;
  font-size: 2rem;
}
.att-rollcall__card .att-row__name {
  font-size: 1.4rem; font-weight: 600;
  white-space: normal;
}
.att-rollcall__card .att-row__actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.att-rollcall__card .att-pill {
  min-height: 64px;
  padding: 8px 12px;
}
.att-rollcall__card .att-pill__label { display: block; font-size: 0.85rem; }
.att-rollcall__nav {
  display: flex; gap: var(--s-2); justify-content: space-between;
}
.att-rollcall__nav .btn { flex: 1; }

/* ============================================================ Dropzone (file upload) */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: var(--s-6) var(--s-4);
  text-align: center;
  background: var(--surface-soft);
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
  color: var(--text);
}
.dropzone:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone--active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.005);
}
.dropzone--filled {
  background: var(--success-soft);
  border-color: var(--success);
  border-style: solid;
  color: var(--success);
}
.dropzone__input {
  /* Hide visually but stay focusable via the wrapping label */
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.dropzone__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--accent);
}
.dropzone--filled .dropzone__icon { background: var(--success-soft); color: var(--success); }
.dropzone__icon svg { width: 22px; height: 22px; }
.dropzone__title { font-weight: 600; font-size: 1.05rem; }
.dropzone__hint { color: var(--text-muted); font-size: 0.9rem; }
.dropzone--filled .dropzone__hint { color: var(--success); opacity: 0.8; }
.dropzone__filename {
  font-family: var(--font-mono); font-size: 0.9rem;
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px var(--s-2); border-radius: var(--r-sm);
}

/* ============================================================ Schedule editor */
.sched-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.sched-editor__head {
  display: flex; gap: var(--s-3); align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap;
  margin-top: var(--s-2);
}
.sched-editor__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* Palette: classes you can drag onto the grid */
.sched-palette {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sched-palette__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s-2);
  flex: 0 0 auto;
}
.sched-palette__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--s-2);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.sched-palette__item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: grab;
  user-select: none;
  transition: border-color 100ms ease, background 100ms ease;
}
.sched-palette__item:hover { background: var(--surface-soft); border-color: var(--border-strong); }
.sched-palette__item:active { cursor: grabbing; }
.sched-palette__item.is-dragging { opacity: 0.4; }
.sched-palette__dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 10px;
}
.sched-palette__body { display: flex; flex-direction: column; min-width: 0; }
.sched-palette__name { font-weight: 600; font-size: 0.95rem; }
.sched-palette__teacher { color: var(--text-muted); font-size: 0.82rem; }
.sched-palette__empty { color: var(--text-muted); padding: var(--s-3); text-align: center; }

/* Grid wrap: horizontal scroll on small screens, sticky time column */
.sched-grid-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-2);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sched-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  padding: 1px;
  border-radius: var(--r-md);
  min-width: max-content;
}
.sched-grid__head {
  background: var(--surface-soft);
  padding: var(--s-2) var(--s-2);
  font-weight: 700; text-align: center; font-size: 0.92rem;
  color: var(--text);
  position: sticky; top: 0;
  z-index: 1;
}
.sched-grid__head--corner { background: var(--surface-soft); }
.sched-grid__time {
  background: var(--surface-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem; color: var(--text-muted);
  position: sticky; left: 0;
  padding: var(--s-2);
  min-height: 64px;
  z-index: 1;
}
.sched-grid__time-start { font-weight: 700; color: var(--text); font-size: 0.82rem; }
.sched-grid__time-end { font-size: 0.7rem; }
.sched-grid__cell {
  background: var(--surface);
  padding: var(--s-2);
  min-height: 64px;
  display: flex; flex-direction: column; gap: var(--s-1);
  position: relative;
  cursor: pointer;
}
.sched-grid__cell:hover { background: var(--accent-soft); }
.sched-grid__cell.is-drag-over {
  background: var(--accent-soft);
  outline: 2px solid var(--accent); outline-offset: -2px;
}
.sched-grid__cell:empty::before {
  content: "+";
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--text-subtle); opacity: 0;
  font-size: 1.4rem; pointer-events: none;
  transition: opacity 100ms ease;
}
.sched-grid__cell:hover:empty::before { opacity: 0.5; }

/* Slot chip — a class scheduled in a particular cell */
.sched-chip {
  position: relative;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  border-radius: var(--r-sm);
  padding: 6px 28px 6px 8px;
  font-size: 0.85rem;
  cursor: grab;
  user-select: none;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.sched-chip:hover { box-shadow: var(--shadow-sm); }
.sched-chip:active { cursor: grabbing; }
.sched-chip.is-dragging { opacity: 0.45; }
.sched-chip__name { font-weight: 600; line-height: 1.2; }
.sched-chip__sub { color: var(--text-muted); font-size: 0.75rem; line-height: 1.2; }
.sched-chip__room { color: var(--text-muted); font-size: 0.7rem; }
.sched-chip__delete {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: inherit;
  opacity: 0;
  transition: opacity 100ms ease, background 100ms ease;
}
.sched-chip:hover .sched-chip__delete,
.sched-chip:focus-within .sched-chip__delete { opacity: 1; }
.sched-chip__delete:hover { background: var(--danger); color: white; opacity: 1; }
@media (hover: none) {
  /* Touch devices: always show delete button (no hover state). */
  .sched-chip__delete { opacity: 1; }
}
/* Conflict highlight — applied by editor.html JS after a Validate response
   that lists this slot's ID under data-conflict-slot-ids. Cleared on the
   next slot mutation or clean Validate. */
.sched-chip--conflict {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.45);
}

/* Class-picker dialog (mobile tap-to-add) */
.sched-picker-list {
  display: grid; gap: var(--s-2);
  max-height: 50vh; overflow-y: auto;
  margin-bottom: var(--s-4);
}
.sched-picker-list__item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer; text-align: left;
  width: 100%;
}
.sched-picker-list__item:hover { background: var(--surface-soft); border-color: var(--accent); }
.sched-picker-list__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }

/* Conflict panel uses the standard alert styling */
#sched-conflict-panel:empty { display: none; }
#sched-conflict-panel ul.conflicts {
  list-style: none; padding: 0; margin: var(--s-3) 0 0;
  display: grid; gap: var(--s-2);
}
#sched-conflict-panel .conflict {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  border-left: 3px solid var(--danger);
  font-size: 0.9rem;
}
#sched-conflict-panel .conflict-room_double_booked {
  background: var(--warning-soft); border-left-color: var(--warning);
}
#sched-conflict-panel .conflict-time_overlap {
  background: var(--surface-soft); border-left-color: var(--text-muted);
}

/* --- Layout: tablet+ puts the palette to the left of the grid */
@media (min-width: 900px) {
  .sched-editor {
    grid-template-columns: 240px 1fr;
    grid-template-areas:
      "head    head"
      "palette grid"
      ".       panel";
    align-items: start;
  }
  .sched-editor > div:first-child { grid-area: head; }
  .sched-palette {
    grid-area: palette;
    /* Sticky next to the grid; bounded to viewport so an extra-long class
       list doesn't dominate the page. The conflict panel sits in column 2
       only (empty cell in column 1) so the sticky palette never overlaps
       conflict text — sticky on grid items is bounded by the grid container,
       not the cell, so it can otherwise extend visually into later rows. */
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 96px);
  }
  .sched-grid-wrap { grid-area: grid; }
  #sched-conflict-panel { grid-area: panel; }
}

/* ============================================================ Modal / confirm dialog */
/* Uses native <dialog>; styled to match the rest of the design system. */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
}
/* For modals containing tables, multi-column choices, or per-row pickers
   that need horizontal room. Apply alongside .modal: <dialog class="modal modal--wide"> */
.modal--wide { max-width: min(820px, calc(100vw - 32px)); }
.modal::backdrop {
  background: hsl(20 10% 10% / 0.45);
  backdrop-filter: blur(2px);
}
.modal__inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s-5);
}
.modal__title {
  margin: 0 0 var(--s-2);
  font-size: 1.15rem; font-weight: 600;
}
.modal__body {
  margin: 0 0 var(--s-5);
  color: var(--text-muted);
}
.modal__actions {
  display: flex; justify-content: flex-end; gap: var(--s-2);
}
@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modalIn 160ms ease-out; }
  @keyframes modalIn {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }
}

/* ============================================================ Flash region */
.flash-region {
  max-width: 1100px;
  margin: var(--s-3) auto 0;
  padding-inline: clamp(16px, 4vw, 32px);
  display: grid; gap: var(--s-2);
}

/* ============================================================ Utilities */
.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;
}
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.flex-1 { flex: 1; }

/* ============================================================ Smart-group criteria grid (real table) */
/* The criteria list is a real <table> so row backgrounds, header
   underline, and zebra striping paint natively. Empty cells (paren
   columns in thead, the value cell before a type is picked) inherit
   the row background; the row's height is set by its tallest cell. */
.criteria-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}
.criteria-grid thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--s-2) var(--s-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.criteria-grid tbody td {
  padding: var(--s-2);
  vertical-align: middle;
}
.criteria-grid tbody tr {
  border-bottom: 1px solid var(--border);
}
.criteria-grid tbody tr:nth-child(even) {
  background: var(--surface-soft);
}
/* First data row has no prior to connect to — hide the AND/OR select. */
.criteria-grid tbody tr:first-child td.criterion-row__conn select {
  visibility: hidden;
}
/* Red × delete button. */
.criterion-row__remove--danger {
  background: transparent;
  border: 0;
  color: var(--danger);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 var(--s-2);
  cursor: pointer;
  border-radius: var(--r-sm);
}
.criterion-row__remove--danger:hover {
  background: var(--danger-soft);
}
/* Multi-control value cells interlace inputs with small connector
   words (in, %, etc.) so the row reads as a sentence, e.g.
   `Absences in window  >  5 in Last 7 days`. The connectors are
   muted and inline; no labels above or below. */
.value-cell--multi {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: nowrap;
}
.value-cell__connector {
  color: var(--text-muted);
  white-space: nowrap;
}

.value-cell--multi .input {
  width: auto;
  flex: 0 0 auto; /* 👈 prevents stretching */
}

/* ============================================================ Chip */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s-2);
  border-radius: var(--r-md);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip--ok   { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); color: #047857; }
.chip--warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.4); color: #92400e; }

/* ============================================================ Placements (worklist + per-student) */
.placements__students {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
.placements__student-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.placements__student-head h2 {
  margin: 0;
  font-size: 1.125rem;
}
.placements__gap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .placements__gap-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .placements__gap-grid { grid-template-columns: repeat(3, 1fr); }
}
.placements__gap-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.placements__gap-card--covered { background: rgba(16, 185, 129, 0.06); border-color: rgba(16, 185, 129, 0.25); }
.placements__gap-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.placements__gap-head { row-gap: var(--s-2); column-gap: var(--s-3); }
.placements__place-btn {
  margin-left: auto;
  margin-bottom: 10px;
  padding-inline: var(--s-4);
}
.placements__choices {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.placements__choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.placements__choice:hover { border-color: var(--border-strong); }
.placements__choice:has(input:checked) { border-color: var(--accent); background: rgba(13, 148, 136, 0.06); }
.placements__choice input[type="radio"] { margin-top: 2px; flex: 0 0 auto; }
.placements__choice-body { display: flex; flex-direction: column; gap: 2px; }
.placements__choice-name { font-weight: 600; }
.placements__covered-classes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* --- Marketing site (landing, about, contact, privacy, terms) -------------- */
.marketing-hero {
  text-align: center;
  padding: var(--s-6) var(--s-3);
}
.marketing-hero__title {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 auto var(--s-3);
  max-width: 18ch;
}
.marketing-hero__lede {
  max-width: 60ch;
  margin: 0 auto var(--s-4);
}
.marketing-hero__ctas {
  display: flex;
  gap: var(--s-2);
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
}

.marketing-article {
  max-width: 70ch;
  margin-inline: auto;
}
.marketing-article h2 {
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
}
.marketing-article p,
.marketing-article ul {
  line-height: 1.65;
}
.marketing-article ul {
  padding-left: var(--s-5);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--s-6);
  padding: var(--s-4) 0;
  background: var(--surface-soft);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-footer__links {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.site-footer__links a {
  color: var(--text-muted);
}
.site-footer__links a:hover {
  color: var(--text);
}

/* --- Pricing tiers (/pricing/) -------------------------------------------- */
.pricing-tiers {
  margin-top: var(--s-4);
}
.pricing-tier {
  display: flex;
  flex-direction: column;
}
.pricing-tier__label {
  margin: 0 0 var(--s-2);
}
.pricing-tier__price {
  margin: 0 0 var(--s-2);
  line-height: 1.1;
}
.pricing-tier__price-amount {
  font-size: 2rem;
  font-weight: 700;
}
.pricing-tier__price-period {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.pricing-tier__list {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0;
  flex: 1;
}
.pricing-tier__list > li {
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--border);
}
.pricing-tier__list > li:last-child {
  border-bottom: 0;
}
.pricing-tier--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
