/*
 * base.css — Teachers Hub shared design system
 * Light theme, DM Sans typography
 * All pages link this file; page-specific styles remain inline.
 */

/* ── Shared design tokens (spacing, type, shadow, radius, motion) ── */
@import url('tokens.css');

/* ── Google Fonts ─────────────────────────────────────────────── */
/* DM Sans (body) + Lora (titles/hero — used by .page-hero__title and
   modal headings). Lora must live here so EVERY page that loads base.css
   renders hero titles in Lora, not the Georgia serif fallback — only ~18
   of 47 page sources carried a per-page Lora <link>, so the rest were
   silently falling back. Loading it once in base.css fixes all of them. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ── Teachers Hub accent + brand overrides ─────────────────────── */
:root {
  /* Brand */
  --brand:     #6c5ce7;
  --brand-2:   #ede9fe;

  /* Accent (per-page override via inline :root) */
  --accent:    #6c5ce7;
  --accent-2:  #ede9fe;

  /* Topbar */
  --topbar-h:  60px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  font-size: 14px;
  /* Intentionally NO overflow-x rule on body. `overflow-x: hidden` turns body
     into a scroll container and silently breaks `position: sticky` on every
     descendant (the navbar). `overflow-x: clip` is supposed to be safe but
     practical testing on TH /competency-framework 2026-05-22 showed the
     navbar still failed to stick on production Chrome — exact reason
     unclear (possibly interaction with auth-guard's body.style.visibility
     toggle, possibly UA-specific). Removing the rule entirely is the
     surest fix; if horizontal scroll appears anywhere, fix the offending
     wide child explicitly rather than clipping at body. */
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar container — defensive sticky ───────────────────────── */
/* The navbar partial is injected into <div id="navbar-container"> by
   pages on `authReady`. .nav inside the partial declares its own
   `position: sticky; top: 0`, but practical testing 2026-05-22 showed
   it failed to stick on TH /competency-framework. Belt-and-braces:
   pin sticky onto the wrapper container too. This survives partial-
   injection timing quirks (the .nav rule lands AFTER body has been
   visibility-toggled visible; the wrapper is already in the DOM and
   sticky-eligible from first paint). */
#navbar-container {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ── Topbar (shared by content pages via navbar partial) ──────── */
/* The navbar partial renders as a <nav> with class .nav.
   This styles the light-theme topbar wrapper used on sub-pages.   */
.page-topbar {
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 3px solid var(--accent);
  gap: 16px;
}
.page-topbar-left  { display: flex; align-items: center; gap: 14px; }
.page-topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.page-topbar-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 700; color: white;
  display: flex; align-items: center; gap: 8px;
}

/* ── Back button (used on sub-pages in page-topbar) ───────────── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.75); font-size: 12.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: all .18s ease;
  font-family: 'DM Sans', sans-serif;
}
.back-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .18s ease;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-2);
  text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-primary:hover {
  filter: brightness(0.88);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(108,92,231,.35);
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--paper-2); }

.btn-danger {
  background: var(--red-2);
  border-color: #fca5a5;
  color: var(--red);
}
.btn-danger:hover { background: #fecaca; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  justify-content: center;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .22s ease, transform .22s ease;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* ── Badges / Pills ───────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: var(--paper-2); border: 1px solid var(--border);
  color: var(--ink-2);
}
.badge-accent {
  background: var(--accent-2);
  border-color: rgba(108,92,231,.2);
  color: var(--accent);
}
.badge-green  { background: var(--green-2); border-color: rgba(5,150,105,.2); color: var(--green); }
.badge-amber  { background: var(--amber-2); border-color: rgba(176,120,0,.2); color: var(--amber); }
.badge-red    { background: var(--red-2);   border-color: rgba(220,38,38,.2); color: var(--red); }
.badge-blue   { background: var(--blue-2);  border-color: rgba(26,95,168,.2); color: var(--blue); }

/* ── Role badges (pacing pages) ───────────────────────────────── */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-2);
}
.role-badge .role-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.role-dot-admin   { background: #f5a623; }
.role-dot-teacher { background: #059669; }

/* ── Progress pill (pacing pages) ────────────────────────────── */
.prog-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
}
.prog-bar-wrap { width: 90px; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prog-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s ease; }
.prog-text { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.prog-text strong { color: var(--ink); }

/* ── User chip ────────────────────────────────────────────────── */
.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 7px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; color: rgba(255,255,255,.8); font-size: 12px; font-weight: 500;
}
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white; flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Spinner ──────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ── Modal overlay ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28,28,46,.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 24px;
  width: 100%; max-width: 500px; margin: 20px;
  transform: translateY(16px) scale(0.98);
  transition: transform .28s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 50%;
  background: transparent; cursor: pointer;
  font-size: 18px; color: var(--ink-3);
  transition: all .15s;
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }

.modal-field { margin-bottom: 16px; }
.modal-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 6px;
}
.modal-input, .modal-textarea, .modal-select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 13.5px; font-family: 'DM Sans', sans-serif;
  color: var(--ink); outline: none; background: var(--paper);
  transition: border-color .15s;
}
.modal-input:focus, .modal-textarea:focus, .modal-select:focus {
  border-color: var(--accent); background: var(--white);
}
.modal-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-err { font-size: 12px; color: var(--red); margin-top: 6px; }

/* ── Search input ─────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  opacity: .4; pointer-events: none;
}
.search-input {
  width: 100%;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--paper); color: var(--ink);
  outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: var(--accent); background: var(--white); }

/* ── Chips (filter pills) ─────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font-size: 11.5px; font-weight: 500;
  padding: 3px 10px; border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--paper); color: var(--ink-2);
  cursor: pointer; transition: all .15s; line-height: 1.6;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: white; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Confirm dialog ───────────────────────────────────────────── */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(28,28,46,.45);
  backdrop-filter: blur(3px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s;
}
.confirm-overlay.open { opacity: 1; visibility: visible; }
.confirm-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 24px 24px 20px;
  width: 100%; max-width: 380px; margin: 20px;
  transform: scale(0.96);
  transition: transform .22s cubic-bezier(0.34,1.56,0.64,1);
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.confirm-msg   { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin-bottom: 20px; }
.confirm-btns  { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Page header (icon + title + subtitle) ────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.page-header-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, black));
  box-shadow: 0 4px 14px rgba(108,92,231,.28);
}
.page-header-icon svg { width: 24px; height: 24px; color: #fff; }
.page-header-title { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.page-header-sub   { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

/* ── Floating home button ─────────────────────────────────────── */
.home-float {
  position: fixed; bottom: 22px; left: 22px;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--ink); border: 1px solid rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); text-decoration: none;
  box-shadow: 0 4px 18px rgba(28,28,46,.35);
  transition: all .22s cubic-bezier(0.16,1,0.3,1); z-index: 150;
}
.home-float:hover {
  color: white; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(108,92,231,.4); transform: translateY(-2px);
}

/* ── Pacing page layout ───────────────────────────────────────── */
.pacing-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 15px;
  height: var(--topbar-h);
  position: sticky;
  top: 60px;
  z-index: 200;
  gap: 12px;
}
.pacing-topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

/* ── Pacing breadcrumb ────────────────────────────────────────── */
.pacing-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.pacing-brand { display: flex; align-items: center; gap: 10px; }
.pacing-breadcrumb { display: flex; align-items: center; gap: 5px;
  font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--ink-3);
  margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--border);
}
.pacing-brand-mark {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif; font-size: 10px; font-weight: 700;
  color: white; flex-shrink: 0; letter-spacing: .02em;
}
.pacing-brand-text h1 { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; color: var(--ink); }
.pacing-brand-text p  { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.pacing-back-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 7px;
  background: var(--paper); border: 1px solid var(--border);
  color: var(--ink-2); font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
  flex-shrink: 0;
}
.pacing-back-btn:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); }
.pacing-back-btn svg { flex-shrink: 0; }
.pacing-breadcrumb a {
  color: var(--ink-3); text-decoration: none;
  transition: color .15s;
}
.pacing-breadcrumb a:hover { color: var(--accent); }
.pacing-breadcrumb-sep { color: var(--border); font-size: 14px; line-height: 1; user-select: none; }
.pacing-breadcrumb-current { color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
  .pacing-breadcrumb { display: none; }
}

/* ── Page breadcrumb (content pages: announcements, library, etc.) ── */
.page-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.page-breadcrumb a {
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  color: var(--ink-3); text-decoration: none;
  transition: color .15s;
}
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb-sep { color: var(--border); font-size: 14px; line-height: 1; user-select: none; }
.page-breadcrumb-current {
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  color: var(--accent); font-weight: 600;
}

/* ────────────────────────────────────────────────────────────────
   CANONICAL FEATURE-PAGE CHROME (2026-05-22, ported from Central Hub)
   ----------------------------------------------------------------
   .page-hero        — standard hero band; pick gradient via
                       data-accent="cyan|mor|dark" (see tokens.css
                       --hero-grad-* + docs/architecture/DESIGN_SYSTEM.md
                       "Page families").
   .page-toolbar     — sticky search + filter row that sits directly
                       under the hero.
   .page-empty       — canonical empty-state (icon + title + desc + CTA).

   Don't override .page-hero background or .page-toolbar layout in
   page <style> blocks. New family? Add it to tokens.css +
   DESIGN_SYSTEM.md first.
─────────────────────────────────────────────────────────────────── */

.page-hero {
  position: relative;
  overflow: hidden;
  /* Vertical padding only on the outer. Horizontal padding lives on
     .page-hero__inner so it pads INSIDE the --container-max clamp, matching
     how body wrappers (page-wrap / mb-page / similar) pad their content.
     Otherwise hero text sits 40px right of body content on viewports > 1280px
     — same asymmetric clamp-then-pad bug as root CLAUDE.md Common Mistake #52.
     Past incident 2026-05-22 on TH announcements / messageboard / surveys;
     rule lifted into canonical CSS so every TH page gets the alignment for free. */
  padding: 52px 0;
  color: #fff;
  background: var(--hero-grad-cyan);
  /* Liveliness pass (2026-05-29, ported from CH): each family also exposes
     its bright accent + mesh so the icon, title glow, top rule + ::before
     pick it up. Defaults to cyan; the [data-accent] rules below set the
     rest. Pages with a bespoke page-local .page-hero override keep their
     own look but inherit this chrome (mapped per page where it matters). */
  --hero-vivid: var(--hero-vivid-cyan);
  --hero-mesh:  var(--hero-mesh-cyan);
  /* 3px family-vivid top rule + a soft inset glow below it, so even the
     gradient's darkest stop reads as "this family" at a glance. */
  border-top: 3px solid var(--hero-vivid);
  box-shadow: inset 0 7px 26px -10px var(--hero-vivid);
  /* hero text + KPIs rise in on load (see keyframes below) */
  animation: heroFadeIn 0.5s ease both;
}
.page-hero[data-accent="cyan"]   { background: var(--hero-grad-cyan);   --hero-vivid: var(--hero-vivid-cyan);   --hero-mesh: var(--hero-mesh-cyan); }
.page-hero[data-accent="mor"]    { background: var(--hero-grad-mor);    --hero-vivid: var(--hero-vivid-mor);    --hero-mesh: var(--hero-mesh-mor); }
.page-hero[data-accent="dark"]   { background: var(--hero-grad-dark);   --hero-vivid: var(--hero-vivid-dark);   --hero-mesh: var(--hero-mesh-dark); }
/* Semantic family expansion (2026-05-27) — see tokens.css + root CLAUDE.md "Page Families" */
.page-hero[data-accent="amber"]  { background: var(--hero-grad-amber);  --hero-vivid: var(--hero-vivid-amber);  --hero-mesh: var(--hero-mesh-amber); }
.page-hero[data-accent="teal"]   { background: var(--hero-grad-teal);   --hero-vivid: var(--hero-vivid-teal);   --hero-mesh: var(--hero-mesh-teal); }
.page-hero[data-accent="rose"]   { background: var(--hero-grad-rose);   --hero-vivid: var(--hero-vivid-rose);   --hero-mesh: var(--hero-mesh-rose); }
.page-hero[data-accent="violet"] { background: var(--hero-grad-violet); --hero-vivid: var(--hero-vivid-violet); --hero-mesh: var(--hero-mesh-violet); }
.page-hero[data-accent="slate"]  { background: var(--hero-grad-slate);  --hero-vivid: var(--hero-vivid-slate);  --hero-mesh: var(--hero-mesh-slate); }

/* Layered hero texture (2026-05-29) — replaces the single faint radial.
   Bottom→top: family mesh (two vivid blobs that brighten the gradient)
   · fine white dot-grid for subtle depth · the original soft radial-light
   highlight. All decorative, pointer-events:none. */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    var(--hero-radial-light),
    var(--hero-dot-grid),
    var(--hero-mesh);
  background-size: auto, 22px 22px, auto;
  pointer-events: none;
  z-index: 0;
}

/* Soft 40px fade overlay rendered just BELOW the hero on the body background
   — gives the hero→content handoff a gradient bleed instead of a hard edge.
   Family token picked by the same data-accent the hero uses. */
.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -40px;
  height: 40px;
  pointer-events: none;
  background: var(--hero-fade-cyan);
}
.page-hero[data-accent="cyan"]::after { background: var(--hero-fade-cyan); }
.page-hero[data-accent="mor"]::after  { background: var(--hero-fade-mor); }
.page-hero[data-accent="dark"]::after { background: var(--hero-fade-dark); }
/* Semantic family expansion (2026-05-27) */
.page-hero[data-accent="amber"]::after  { background: var(--hero-fade-amber); }
.page-hero[data-accent="teal"]::after   { background: var(--hero-fade-teal); }
.page-hero[data-accent="rose"]::after   { background: var(--hero-fade-rose); }
.page-hero[data-accent="violet"]::after { background: var(--hero-fade-violet); }
.page-hero[data-accent="slate"]::after  { background: var(--hero-fade-slate); }

/* Family-tinted body background — opt-in via <body data-page-accent="cyan|mor|dark">.
   3-4% saturated off-white so content cards (var(--white)) still read as elevated. */
body[data-page-accent="cyan"] { background: var(--paper-tinted-cyan); }
body[data-page-accent="mor"]  { background: var(--paper-tinted-mor); }
body[data-page-accent="dark"] { background: var(--paper-tinted-dark); }
/* Semantic family expansion (2026-05-27) */
body[data-page-accent="amber"]  { background: var(--paper-tinted-amber); }
body[data-page-accent="teal"]   { background: var(--paper-tinted-teal); }
body[data-page-accent="rose"]   { background: var(--paper-tinted-rose); }
body[data-page-accent="violet"] { background: var(--paper-tinted-violet); }
body[data-page-accent="slate"]  { background: var(--paper-tinted-slate); }

/* ── Accent bleed into content (2026-05-29 liveliness pass, ported from CH) ──
   The family colour stops at the hero today — scroll past it and the body
   reads un-themed. We carry it down via a DEDICATED --family-accent /
   --family-soft pair (NOT the global --accent — many pages deliberately
   set their own --accent, sometimes off-family; clobbering those would
   change page intent). Keys off the data-page-accent already declared.

   --family-accent = each family's MID accent (same hue the footer CTA uses),
   good against the white card surface. --family-soft = its pale tint for
   hairline top-rules / underlines. */
body[data-page-accent="cyan"]   { --family-accent: #0891b2; --family-soft: var(--accent-soft-cyan); }
body[data-page-accent="mor"]    { --family-accent: #6c5ce7; --family-soft: var(--accent-soft-mor); }
body[data-page-accent="dark"]   { --family-accent: #6c5ce7; --family-soft: var(--accent-soft-dark); }
body[data-page-accent="amber"]  { --family-accent: #d97706; --family-soft: var(--accent-soft-amber); }
body[data-page-accent="teal"]   { --family-accent: #0f9b8e; --family-soft: var(--accent-soft-teal); }
body[data-page-accent="rose"]   { --family-accent: #e11d48; --family-soft: var(--accent-soft-rose); }
body[data-page-accent="violet"] { --family-accent: #7c3aed; --family-soft: var(--accent-soft-violet); }
body[data-page-accent="slate"]  { --family-accent: #475569; --family-soft: var(--accent-soft-slate); }

/* Carry the family colour into the shared .card: a family-tinted top accent
   that appears on hover. Page-local card classes are untouched — this only
   lifts the generic shared .card so dashboards/listing grids read themed. */
body[data-page-accent] .card { border-top: 2px solid transparent; }
body[data-page-accent] .card:hover {
  border-top-color: var(--family-accent);
  box-shadow: var(--shadow), inset 0 2px 0 0 var(--family-accent);
  transform: translateY(-1px);
}

/* Family-tinted sticky toolbar underline + a thin family rule at the top of
   the info strip, so the chrome below the hero reads themed instead of flat
   grey on every page. */
body[data-page-accent] .page-toolbar { border-bottom-color: var(--family-soft); }
body[data-page-accent] .page-info-strip { border-top: 2px solid var(--family-soft); }

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.page-hero__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  /* Family-vivid tinted glass tile + a soft glow ring in the family hue,
     so the icon slot reads as a coloured focal point rather than a flat
     white square (2026-05-29 liveliness pass, ported from CH). */
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hero-vivid) 38%, transparent) 0%,
                            color-mix(in srgb, var(--hero-vivid) 14%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--hero-vivid) 55%, transparent);
  box-shadow: 0 6px 22px -6px color-mix(in srgb, var(--hero-vivid) 70%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  margin-top: var(--space-1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.page-hero__icon svg { width: 30px; height: 30px; }
.page-hero:hover .page-hero__icon {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 28px -6px color-mix(in srgb, var(--hero-vivid) 80%, transparent);
}

.page-hero__text {
  flex: 1;
  min-width: 240px;
}
.page-hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--hero-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.page-hero__title {
  font-family: var(--font-title);
  font-size: 2.1rem;
  font-weight: var(--fw-semibold);
  color: #fff;
  margin-bottom: var(--space-3);
  line-height: 1.2;
  /* faint family-tinted glow behind the title text for depth */
  text-shadow: 0 2px 18px color-mix(in srgb, var(--hero-vivid) 45%, transparent);
}
.page-hero__desc {
  font-size: var(--text-base);
  color: var(--hero-desc);
  max-width: 560px;
  line-height: 1.6;
}

.page-hero__kpis {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-left: auto;
}
.page-hero__kpi {
  background: var(--hero-kpi-bg);
  border: 1px solid var(--hero-kpi-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  min-width: 120px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
/* a thin family-vivid bar down the left edge of each KPI tile */
.page-hero__kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--hero-vivid);
  opacity: 0.85;
}
.page-hero__kpi:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--hero-vivid) 55%, transparent);
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--hero-vivid) 70%, transparent);
}
.page-hero__kpi--primary {
  background: var(--hero-kpi-bg-primary);
  border-color: rgba(108,92,231,0.4);
}
/* Per-family primary-KPI tile (2026-05-27) */
.page-hero[data-accent="amber"]  .page-hero__kpi--primary { background: var(--hero-kpi-bg-primary-amber);  border-color: rgba(217,119,6,0.45); }
.page-hero[data-accent="teal"]   .page-hero__kpi--primary { background: var(--hero-kpi-bg-primary-teal);   border-color: rgba(20,184,166,0.45); }
.page-hero[data-accent="rose"]   .page-hero__kpi--primary { background: var(--hero-kpi-bg-primary-rose);   border-color: rgba(225,29,72,0.42); }
.page-hero[data-accent="violet"] .page-hero__kpi--primary { background: var(--hero-kpi-bg-primary-violet); border-color: rgba(124,58,237,0.45); }
.page-hero[data-accent="slate"]  .page-hero__kpi--primary { background: var(--hero-kpi-bg-primary-slate);  border-color: rgba(148,163,184,0.4); }
.page-hero__kpi-num {
  font-family: var(--font-title);
  font-size: 2.4rem;
  line-height: 1;
  font-weight: var(--fw-semibold);
  color: #fff;
}
.page-hero__kpi--primary .page-hero__kpi-num { font-size: 2.8rem; }
.page-hero__kpi-lbl {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hero-kpi-lbl);
  margin-top: var(--space-2);
}
.page-hero__kpi-sub {
  font-size: var(--text-xs);
  color: var(--hero-kpi-sub);
  margin-top: var(--space-1);
  font-weight: var(--fw-normal);
}

@media (max-width: 768px) {
  .page-hero { padding: var(--space-8) 0; }
  .page-hero__inner { padding: 0 var(--space-6); flex-direction: column; gap: var(--space-4); }
  .page-hero__title { font-size: 1.7rem; }
  .page-hero__kpis { margin-left: 0; }
  .page-hero__kpi-num { font-size: 1.8rem; }
  .page-hero__kpi--primary .page-hero__kpi-num { font-size: 2.2rem; }
}

/* ── Hero entrance motion (2026-05-29 liveliness pass, ported from CH) ──
   The whole hero fades+rises in; text block and KPI aside stagger so the
   page feels alive on load instead of snapping into a static band.
   Honour prefers-reduced-motion — disable all of it. */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroRiseIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-hero__text { animation: heroRiseIn 0.55s ease 0.05s both; }
.page-hero__kpis { animation: heroRiseIn 0.55s ease 0.16s both; }
/* icon fades in only (no transform fill — it owns its own hover transform) */
@keyframes heroIconIn { from { opacity: 0; } to { opacity: 1; } }
.page-hero__icon { animation: heroIconIn 0.5s ease 0.02s both; }

@media (prefers-reduced-motion: reduce) {
  .page-hero,
  .page-hero__text,
  .page-hero__kpis,
  .page-hero__icon { animation: none; }
  .page-hero__kpi,
  .page-hero__icon { transition: none; }
}

.page-toolbar {
  position: sticky;
  top: 0;
  /* --z-sticky (50) keeps the toolbar above page content but BELOW the
     navbar's stacking context so navbar dropdown panels overlay it. */
  z-index: var(--z-sticky);
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-10);
}
.page-toolbar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .page-toolbar { padding: var(--space-3) var(--space-5); }
}

.page-empty {
  padding: var(--space-16) var(--space-5);
  text-align: center;
}
.page-empty__icon {
  font-size: 2.4rem;
  margin-bottom: var(--space-3);
  opacity: 0.6;
}
.page-empty__title {
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--ink-2);
  margin-bottom: var(--space-2);
}
.page-empty__desc {
  font-size: var(--text-sm);
  color: var(--ink-3);
  max-width: 360px;
  margin: 0 auto;
}

/* ── Pacing layout grid ───────────────────────────────────────── */
.pacing-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--topbar-h));
  transition: grid-template-columns .25s ease;
  position: relative;
}
.pacing-layout.sidebar-collapsed { grid-template-columns: 0px 1fr; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sidebar-inner { min-width: 280px; display: flex; flex-direction: column; flex: 1; overflow-y: auto; }
.pacing-layout.sidebar-collapsed .sidebar { border-right: none; }
.pacing-layout.sidebar-collapsed .sidebar-inner { visibility: hidden; }

.sidebar-section { padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.sidebar-label {
  font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px;
}

/* ── Sidebar toggle ───────────────────────────────────────────── */
.sidebar-toggle {
  position: absolute; top: 10px; left: 280px; z-index: 100;
  width: 22px; height: 38px;
  background: var(--white); border: 1px solid var(--border);
  border-left: none; border-radius: 0 6px 6px 0;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  box-shadow: 2px 0 6px rgba(28,28,46,.08);
  transition: left .25s ease, background .15s, color .15s;
}
.sidebar-toggle:hover { background: var(--paper); color: var(--ink); }
.sidebar-toggle svg { transition: transform .25s; }
.pacing-layout.sidebar-collapsed .sidebar-toggle { left: 0px; border-left: 1px solid var(--border); }
.pacing-layout.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* ── Pacing main area ─────────────────────────────────────────── */
.pacing-main { overflow-y: auto; display: flex; flex-direction: column; }

.view-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 24px; background: white;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; gap: 12px;
}
.tab-group { display: flex; gap: 2px; background: var(--paper); border-radius: 8px; padding: 3px; }
.tab-btn {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  padding: 5px 13px; border-radius: 6px; border: none; background: none;
  color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.tab-btn.on { background: white; color: var(--ink); box-shadow: var(--shadow-sm); }
.view-actions { display: flex; gap: 7px; align-items: center; }

.pacing-panel { display: none; flex: 1; padding: 20px 24px; }
.pacing-panel.on { display: block; }

/* ── Chapter/Topic blocks ─────────────────────────────────────── */
.ch-block {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.ch-block:hover { box-shadow: var(--shadow); }

/* ── Empty states ─────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--ink-3); font-size: 15px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }

/* ── Pacing topic pagination ──────────────────────────────────── */
.ch-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px; border-top: 1px solid var(--border);
  background: var(--paper); font-size: .72rem; color: var(--ink-3);
  gap: 12px;
}
.pg-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.pg-btn {
  font-family: 'DM Sans', sans-serif; font-size: .7rem;
  padding: 3px 9px; border-radius: 5px;
  border: 1px solid var(--border); background: white; color: var(--ink-2);
  cursor: pointer; transition: all .12s;
}
.pg-btn:hover:not([disabled]) { border-color: var(--ink-2); color: var(--ink); }
.pg-btn[disabled] { opacity: .35; cursor: not-allowed; }
.pg-btn.pg-active { background: var(--accent); border-color: var(--accent); color: white; }
.pg-info { color: var(--ink-3); font-size: .7rem; white-space: nowrap; }

/* ── Pacing chapter pagination ────────────────────────────────── */
.chapter-paginator {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px 16px;
  border-top: 1px solid var(--border);
  background: white;
  flex-shrink: 0;
}
.ch-pg-btns { display: flex; gap: 4px; align-items: center; }
.ch-pg-btn {
  font-family: 'DM Sans', sans-serif; font-size: .72rem;
  padding: 4px 11px; border-radius: 6px;
  border: 1px solid var(--border); background: white; color: var(--ink-2);
  cursor: pointer; transition: all .12s;
}
.ch-pg-btn:hover:not([disabled]) { border-color: var(--ink-2); color: var(--ink); }
.ch-pg-btn[disabled] { opacity: .35; cursor: not-allowed; }
.ch-pg-btn.ch-pg-active { background: var(--accent); border-color: var(--accent); color: white; }
.ch-pg-info { font-size: .72rem; color: var(--ink-3); white-space: nowrap; }

/* ── Pacing modal ─────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(28,28,46,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal-bg.open { display: flex; }

.modal {
  background: white; border-radius: 14px;
  width: 500px; max-width: 92vw; max-height: 82vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: popIn .18s ease;
}
.modal.modal-wide { width: 720px; }
@keyframes popIn { from { transform: scale(.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-shrink: 0;
}
.modal-head-text h3 { font-family: 'Lora', serif; font-size: 1.05rem; }
.modal-head-text p  { font-size: .72rem; color: var(--ink-3); margin-top: 3px; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-3); padding: 0 2px; line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-nav-btn {
  background: none; border: 1px solid var(--border); cursor: pointer;
  font-size: .8rem; color: var(--ink-3); padding: 3px 9px;
  border-radius: 5px; line-height: 1; transition: all .12s;
}
.modal-nav-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.modal-nav-btn:disabled { opacity: .3; cursor: not-allowed; }

.modal-body { padding: 16px 22px 22px; overflow-y: auto; flex: 1; }

.obj-entry { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.obj-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.obj-entry-code { font-family: 'DM Mono', monospace; font-size: .72rem; color: var(--blue); font-weight: 500; margin-bottom: 4px; }
.obj-entry-text { font-size: .82rem; line-height: 1.65; color: var(--ink); }

/* Pacing empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty-icon { font-size: 2rem; margin-bottom: 8px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ink); color: white;
  padding: 10px 18px; border-radius: 8px;
  font-size: .78rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(60px); opacity: 0;
  transition: all .25s ease;
  z-index: 2000;
}
.toast.show         { transform: translateY(0); opacity: 1; }
.toast.show.toast-warn    { background: var(--amber);   color: #fff3cd; }
.toast.show.toast-success { background: var(--success, #16a34a); color: #fff; }

/* ── Utility ──────────────────────────────────────────────────── */
.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;
}

/* ============================================================
   CANONICAL PAGE FOOTER (ported from AH base.css, which in turn
   was ported from CH shared-styles.css — 2026-05-25)
   Use on feature pages with a forward-flow CTA + nav columns.
   Sticky-footer pattern via :has() pushes the footer to the
   bottom of short pages without affecting pages that lack one.
   Currently used by: references.html. Other TH pages may adopt
   over time.
   ============================================================ */
body:has(> .page-footer) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body:has(> .page-footer) > .page-footer { margin-top: auto; }

.page-footer {
  margin-top: var(--space-12);
  background: var(--hero-grad-dark);
  color: rgba(255,255,255,0.92);
  position: relative;
  overflow: hidden;
}
.page-footer::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(108,92,231,0.18) 0%, transparent 50%),
    radial-gradient(circle at 88% 80%, rgba(8,145,178,0.14) 0%, transparent 55%);
  pointer-events: none;
}
.page-footer__inner {
  position: relative; z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-10) var(--space-10) var(--space-6);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-10);
  align-items: start;
}
@media (max-width: 820px) {
  .page-footer__inner { grid-template-columns: 1fr; gap: var(--space-6); padding: var(--space-8) var(--space-6) var(--space-5); }
}

.page-footer__cta { display: flex; flex-direction: column; gap: var(--space-3); }
.page-footer__cta-eyebrow {
  font-size: 0.7rem; font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.page-footer__cta-title {
  font-family: 'Lora', serif;
  font-size: 1.5rem; font-weight: 600;
  color: #fff; line-height: 1.25;
  margin: 0;
}
.page-footer__cta-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  max-width: 460px;
}
.page-footer__cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--space-2);
  padding: 11px 22px;
  background: linear-gradient(135deg, #7c3aed 0%, #5a4bd1 100%);
  color: #fff; text-decoration: none;
  border-radius: 10px;
  font-size: 0.875rem; font-weight: 600;
  width: fit-content;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(108,92,231,0.35);
}
.page-footer__cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(108,92,231,0.45);
}
/* Family-matched footer CTA (2026-05-27) — set data-accent on <footer class="page-footer">
   and the CTA button picks up the family gradient automatically. Default (no attr) stays mor. */
.page-footer[data-accent="cyan"]   .page-footer__cta-btn { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); box-shadow: 0 4px 14px rgba(8,145,178,0.35); }
.page-footer[data-accent="cyan"]   .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(8,145,178,0.45); }
.page-footer[data-accent="amber"]  .page-footer__cta-btn { background: linear-gradient(135deg, #d97706 0%, #92400e 100%); box-shadow: 0 4px 14px rgba(217,119,6,0.35); }
.page-footer[data-accent="amber"]  .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(217,119,6,0.45); }
.page-footer[data-accent="teal"]   .page-footer__cta-btn { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); box-shadow: 0 4px 14px rgba(20,184,166,0.35); }
.page-footer[data-accent="teal"]   .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(20,184,166,0.45); }
.page-footer[data-accent="rose"]   .page-footer__cta-btn { background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%); box-shadow: 0 4px 14px rgba(225,29,72,0.35); }
.page-footer[data-accent="rose"]   .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(225,29,72,0.45); }
.page-footer[data-accent="violet"] .page-footer__cta-btn { background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%); box-shadow: 0 4px 14px rgba(124,58,237,0.35); }
.page-footer[data-accent="violet"] .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(124,58,237,0.45); }
.page-footer[data-accent="slate"]  .page-footer__cta-btn { background: linear-gradient(135deg, #475569 0%, #334155 100%); box-shadow: 0 4px 14px rgba(71,85,105,0.35); }
.page-footer[data-accent="slate"]  .page-footer__cta-btn:hover { box-shadow: 0 6px 18px rgba(71,85,105,0.45); }

.page-footer__nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}
@media (max-width: 480px) {
  .page-footer__nav { grid-template-columns: 1fr; }
}
.page-footer__nav-group { display: flex; flex-direction: column; gap: var(--space-2); }
.page-footer__nav-heading {
  font-size: 0.7rem; font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.page-footer__nav-link {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: color 0.12s;
  line-height: 1.6;
}
.page-footer__nav-link:hover { color: #fff; }

.page-footer__meta {
  position: relative; z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-4) var(--space-10) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}
@media (max-width: 820px) {
  .page-footer__meta { padding: var(--space-3) var(--space-6) var(--space-5); }
}
.page-footer__meta-left { display: flex; align-items: center; gap: var(--space-2); }
.page-footer__meta-right { font-style: italic; color: rgba(255,255,255,0.42); }
/* ================================================================
   === A11Y (sync: shared-design/a11y.css) — WCAG 2.2 AA, 2026-05-31 ===
   Byte-identical copy of the block in shared-design/a11y.css.
   Edit there + all 3 hub copies together. Provides keyboard
   focus-visible ring (survives legacy outline:none), .skip-link
   (2.4.1 Bypass Blocks), .sr-only utility.
   ================================================================ */
:root {
  --focus-ring: #6c5ce7;
  --focus-ring-contrast: #ffffff;
}
*:focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  z-index: 100000;
  margin: 8px;
  padding: 10px 16px;
  background: var(--focus-ring);
  color: var(--focus-ring-contrast);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--focus-ring-contrast) !important;
  outline-offset: 2px;
}
#main-content:focus,
#main-content:focus-visible {
  outline: none !important;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
