:root {
  /* RALEN + X Brand Guidelines v1.0 */
  --forest: #0f2823;
  --teal: #2e6f63;
  --sage: #a8c0b0;
  --gold: #e2c268;
  --cream: #f6f7f4;
  --mist: #e9ece7;
  /* Site-wide brand overrides live in site_settings (see api/admin/site_settings.php)
     and are applied at runtime via applyBrandSettings() in app.js — these are just
     the shipped defaults, editable by a site admin without touching CSS. */
  --sidebar-text: #ffffff;

  --bg: var(--cream);
  --surface: #ffffff;
  --surface-2: var(--mist);
  --text: var(--forest);
  --muted: #63736c;
  --primary: var(--teal);
  --primary-2: var(--sage);
  --accent: var(--gold);
  --danger: #b85f5f;
  --border: var(--mist);
  --shadow: 0 18px 50px rgba(15, 40, 35, .10);
  --radius: 22px;

  /* Age-band defaults (teen-ish middle ground) — overridden per
     body.ageband-* below, which sets its own age-appropriate palette as the
     DEFAULT look. An explicitly chosen theme (body.theme-*, defined further
     down) always wins over these color vars — theme is a deliberate
     override, age-band is what a student sees before picking one. */
  --font-base: 16px;
  --font-family: 'Lato', system-ui, sans-serif;
  --radius-lg: 22px;
  --radius-md: 12px;
  --btn-hover-lift: translateY(-1px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--text);
  background: var(--bg);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 26px 20px;
  background: var(--forest);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.logo-mark { width: 42px; height: 42px; flex-shrink: 0; }
.logo-wordmark {
  font-family: Comfortaa, cursive;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .01em;
  color: var(--forest);
}
.logo-wordmark .lw-plus { color: var(--gold); }
.logo-wordmark .lw-x { color: var(--teal); }
.sidebar .logo-wordmark { color: var(--sidebar-text); }
.sidebar .logo-wordmark .lw-x { color: var(--sage); }
.brand-subtitle { font-size: 12px; opacity: .65; }

.nav { display: grid; gap: 7px; }
.nav-item {
  border: 0; color: var(--sidebar-text); opacity: .72; background: transparent;
  text-align: left; padding: 13px 14px; border-radius: 13px;
  display: flex; gap: 12px; align-items: center;
}
.nav-item:hover, .nav-item.active { opacity: 1; background: rgba(255,255,255,.10); }
.nav-item span { width: 20px; text-align: center; }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.mini-profile { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--accent); color: #1e2a27; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini-profile div div { font-size: 12px; opacity: .7; }

.main { padding: 28px 34px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.topbar h1 { margin: 4px 0 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; }
.top-actions { display: flex; gap: 10px; align-items: center; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--primary); }
.primary, .secondary, .ghost, .icon-button, .text-button {
  border-radius: var(--radius-md); border: 0; transition: .2s ease;
}
.primary {
  padding: 12px 18px; background: var(--primary); color: white; font-weight: 700;
  box-shadow: 0 8px 18px rgba(47,109,98,.22);
}
.primary:hover { transform: var(--btn-hover-lift); filter: brightness(.98); }
.primary:disabled, .secondary:disabled, .ghost:disabled {
  opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; filter: none;
}
.secondary { padding: 11px 16px; background: var(--surface-2); color: var(--primary); font-weight: 700; }
.ghost { padding: 10px 14px; background: transparent; border: 1px solid var(--border); color: inherit; }
.ghost.small { color: white; border-color: rgba(255,255,255,.2); width: 100%; }
.icon-button { width: 40px; height: 40px; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.text-button { background: transparent; color: var(--primary); font-weight: 700; }

/* A friendlier, more inviting look for the hint actions specifically —
   warm and rounded rather than the neutral grey .secondary buttons, so
   asking for help reads as an easy, encouraged thing to do, not a plain
   utility action lost among the others. Reuses the same amber already
   used for .hint-box/.feedback.partial so the button visually promises
   what it's about to open. */
.help-btn {
  border-radius: 999px; padding: 11px 18px 11px 14px; background: #fff6e0; color: #6b5300;
  border: 1px solid #f0dea0; font-weight: 700; display: inline-flex; align-items: center; gap: 7px;
  transition: .2s ease;
}
.help-btn:hover { background: #fdecc2; transform: var(--btn-hover-lift); }
.help-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: .6; transform: translateY(4px);} to {opacity:1; transform:none;}}

.onboarding-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.onboarding-banner strong { display: block; margin-bottom: 2px; }
.onboarding-banner p { margin: 0; }

.onboarding-pending { display: grid; gap: 14px; justify-items: start; }
.onboarding-pending p { margin: 0; font-size: 15px; }

.hero-card {
  min-height: 280px;
  padding: 36px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.28), transparent 26%),
    linear-gradient(135deg, var(--primary), #174a42);
  color: white;
  box-shadow: var(--shadow);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  overflow: hidden;
}
.hero-card h2 { font-family: Merriweather, serif; font-size: clamp(35px, 5vw, 58px); margin: 14px 0 10px; max-width: 650px; }
.hero-card p { max-width: 600px; color: rgba(255,255,255,.8); line-height: 1.6; }
.pill { display: inline-flex; padding: 7px 11px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pill-row .icon-button { width: 34px; height: 34px; flex-shrink: 0; }
.listen-controls { display: flex; gap: 6px; flex-shrink: 0; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.light { background: white; color: var(--primary); }
.ghost.light { background: transparent; border-color: rgba(255,255,255,.35); color: white; }
.ghost.light:hover { background: rgba(255,255,255,.12); }
.progress-orbit {
  flex: 0 0 180px; width: 180px; height: 180px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent) 0 74%, rgba(255,255,255,.16) 74% 100%);
}
.orbit-inner { width: 132px; height: 132px; border-radius: 50%; background: #1e5a50; display: grid; place-content: center; text-align: center; }
.orbit-inner strong { font-size: 34px; }
.orbit-inner span { font-size: 12px; opacity: .7; }

.grid { display: grid; gap: 18px; margin-top: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.metric-card, .panel, .report-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(42,77,70,.06);
}
.metric-card { padding: 22px; }
.metric-label { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.metric-value { font-size: 23px; margin-bottom: 8px; }
.metric-foot { font-size: 12px; color: var(--muted); }

.panel { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 20px; }
.panel h3, .panel-head h3 { margin: 5px 0 0; font-size: 20px; }

.onboarding-step .panel { max-width: 720px; margin: 0 auto 20px; }
.onboarding-topic-list { display: grid; gap: 20px; margin: 18px 0; }
.onboarding-subject-group h4 { margin: 0 0 10px; font-size: 14px; color: var(--primary); }
.onboarding-topic-toggle {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-weight: 600;
}
.onboarding-topic-toggle:last-child { border-bottom: 0; }
.onboarding-topic-toggle input { width: auto; }
.onboarding-levels-list { display: grid; gap: 16px; margin: 18px 0; }
.onboarding-level-row {
  display: grid; grid-template-columns: 1fr 2fr auto; align-items: center; gap: 16px;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2);
}
.onboarding-level-label { display: flex; flex-direction: column; gap: 2px; }
.onboarding-level-value { font-weight: 700; color: var(--primary); min-width: 42px; text-align: right; }
@media (max-width: 700px) {
  .onboarding-level-row { grid-template-columns: 1fr; }
  .onboarding-level-value { text-align: left; }
}

.priority-list, .task-list, .document-list { display: grid; gap: 12px; }
.priority-item, .task-item, .document-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface);
}
.priority-left, .task-left, .document-left { display: flex; align-items: center; gap: 12px; }
.subject-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface-2); font-weight: 800; color: var(--primary);
}
.priority-item small, .task-item small, .document-item small { color: var(--muted); display: block; margin-top: 4px; }
.duration { color: var(--muted); font-size: 13px; white-space: nowrap; }

.skill-bars { display: grid; gap: 16px; }
.skill-row { display: grid; gap: 7px; }
.skill-line { display: flex; justify-content: space-between; font-size: 13px; }
.bar { height: 10px; background: #e9efed; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.bar.indeterminate { position: relative; margin-top: 14px; }
.bar.indeterminate > span { position: absolute; width: 40%; animation: bar-indeterminate 1.4s ease-in-out infinite; }
@keyframes bar-indeterminate {
  0% { left: -40%; }
  100% { left: 100%; }
}
.skill-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 2px; }

.section-intro { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 22px; }
.section-intro-actions { display: flex; gap: 10px; }
.section-intro h2 { margin: 5px 0 8px; font-size: clamp(28px, 4vw, 42px); }
.section-intro p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.6; }

.week-plan { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.day-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; min-height: 320px; }
.day-card.today { outline: 2px solid var(--primary); }
.day-card h3 { margin: 4px 0 16px; }
.plan-block { padding: 12px; border-radius: 13px; background: var(--surface-2); margin-bottom: 10px; }
.plan-block strong { display:block; font-size: 13px; }
.plan-block small { color: var(--muted); }

.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.subject-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.subject-card-head { display: flex; justify-content: space-between; align-items: center; }
.subject-card h3 { margin: 0; }
.topic-chip { display:inline-flex; padding:7px 10px; border-radius:999px; background: var(--surface-2); color: var(--primary); font-size:12px; font-weight:700; margin: 10px 6px 0 0; }
.confidence { margin-top: 18px; }
.range-row { display:flex; align-items:center; gap:12px; }
input[type="range"] { width:100%; accent-color: var(--primary); }

.upload-zone {
  padding: 48px 24px; border: 2px dashed var(--primary-2); border-radius: 24px;
  background: rgba(113,169,156,.08); text-align: center; margin-bottom: 18px;
  transition: background .15s ease, border-color .15s ease;
}
.upload-zone.drag-over { background: rgba(113,169,156,.18); border-color: var(--primary); }
.upload-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface); display:grid; place-items:center; margin:0 auto 12px; font-size:26px; color: var(--primary); }
.upload-zone p { color: var(--muted); max-width: 640px; margin: 8px auto 20px; }

.profile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tag-wrap { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.tag { padding: 9px 12px; border-radius:999px; background:var(--surface-2); color:var(--primary); font-weight:700; font-size:13px; }
.method-list { display:grid; gap:12px; margin-top:16px; }
.method { padding:14px; border-radius:14px; background:var(--surface); border:1px solid var(--border); }

.report-card { padding: 30px; }
.report-header { display:flex; justify-content:space-between; align-items:start; border-bottom:1px solid var(--border); padding-bottom:20px; }
.report-header h2 { margin:5px 0 0; font-size:32px; }
.report-score { padding:10px 14px; border-radius:999px; background:var(--surface-2); color:var(--primary); font-weight:800; }
.report-summary { font-size:17px; line-height:1.7; padding:24px 0; }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.report-grid li { margin-bottom:10px; line-height:1.5; }

.session-history-note { color:var(--muted); font-size:14px; line-height:1.6; margin:18px 0 0; }

.session-history-list { display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.session-history-row { padding:16px 18px; border-radius:14px; background:var(--surface-2); }
.session-history-top { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; flex-wrap:wrap; }
.session-history-type { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--primary); }
.session-history-label { font-weight:700; margin:2px 0 3px; }
.session-history-date { color:var(--muted); font-size:12.5px; }
.session-history-score { font-weight:800; font-size:16px; white-space:nowrap; }
.session-history-score .pct { color:var(--muted); font-weight:600; font-size:12.5px; margin-left:4px; }

.session-history-dots { display:flex; gap:3px; flex-wrap:wrap; margin-top:12px; }
.session-history-dots span { width:10px; height:10px; border-radius:3px; }
/* Fully opaque, no per-state opacity — a translucent "wrong" dot blended
   with the row's own background into what read as a third, in-between
   color at this size. Exactly two colors now, matching the legend. */
.session-history-dots span.correct { background:#275d4f; }
.session-history-dots span.wrong { background:#b85f5f; }

.session-history-legend { display:flex; gap:16px; flex-wrap:wrap; margin:14px 0 4px; font-size:12.5px; color:var(--muted); }
.session-history-legend span { display:inline-flex; align-items:center; gap:6px; }
.session-history-legend i { width:10px; height:10px; border-radius:3px; display:inline-block; flex-shrink:0; }
.session-history-legend i.correct { background:#275d4f; }
.session-history-legend i.wrong { background:#b85f5f; }

.session-history-feedback { margin-top:12px; padding-top:12px; border-top:1px solid var(--border); font-size:13.5px; }
.session-history-feedback.empty { color:var(--muted); }
.session-history-feedback .fb-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.session-history-feedback .fb-pill { padding:3px 10px; border-radius:999px; font-weight:700; font-size:12px; }
.session-history-feedback .fb-pill.difficulty-too_easy, .session-history-feedback .fb-pill.difficulty-too_hard { background:#fff6e0; color:#6b5300; }
.session-history-feedback .fb-pill.difficulty-just_right { background:#e5f3ec; color:#275d4f; }
.session-history-feedback .fb-pill.neutral { background:var(--surface); color:var(--text); display:inline-flex; align-items:center; gap:3px; }
.session-history-feedback .fb-pill svg { width:12px; height:12px; }
.session-history-feedback .fb-comments { color:var(--text); font-style:italic; margin-top:4px; }

.mastery-snapshot-list { display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.mastery-snapshot-row { padding:13px 16px; border-radius:12px; background:var(--surface-2); }
.mastery-snapshot-top { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:8px; }
.mastery-snapshot-name { font-weight:700; font-size:14px; }
.mastery-snapshot-subject { color:var(--muted); font-size:12px; margin-left:6px; }
.mastery-bar-track { height:7px; border-radius:999px; background:var(--border); overflow:hidden; }
.mastery-bar-fill { height:100%; border-radius:999px; }
.mastery-state-chip { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:2px 8px; border-radius:999px; white-space:nowrap; }
.mastery-state-chip.good { background:#e5f3ec; color:#275d4f; }
.mastery-state-chip.warn { background:#fff6e0; color:#6b5300; }
.mastery-state-chip.bad { background:#f8e8e8; color:#824747; }

.muted { color: var(--muted); font-size: 12px; }
.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;
}

dialog { border:0; padding:0; background:transparent; max-width:min(92vw,620px); width:100%; }
dialog::backdrop { background:rgba(10,25,22,.55); backdrop-filter:blur(4px); }
.dialog-card { background:var(--surface); border-radius:var(--radius-lg); padding:24px; box-shadow:var(--shadow); }
.login-card h2 { margin: 0 0 18px; text-align: center; }
.dialog-head { display:flex; justify-content:space-between; gap:14px; margin-bottom:18px; }
.dialog-head h2 { margin:5px 0 0; }
.dialog-card label { display:grid; gap:7px; margin-bottom:14px; font-size:13px; font-weight:700; }
.dialog-card input, .dialog-card select, .dialog-card textarea {
  width:100%; padding:12px 13px; border-radius:12px; border:1px solid var(--border); background:#fff; color:var(--forest); font:inherit;
}
.dialog-card textarea { resize: vertical; font-family: monospace; font-size: 13px; }
.dialog-card textarea#studyNotesInput { font-family: inherit; font-size: inherit; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

.field-label { font-size:13px; font-weight:700; margin-bottom:7px; }
.avatar-picker { display:flex; gap:16px; align-items:flex-start; margin-bottom:14px; }
.avatar-large { width:64px; height:64px; font-size:24px; }
.avatar-picker-options { flex:1; min-width:0; }
.avatar-emoji-grid { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.avatar-emoji-grid button {
  width:36px; height:36px; border-radius:50%; border:2px solid transparent; background:var(--bg-alt, #f1f3f0);
  font-size:18px; display:grid; place-items:center; cursor:pointer; padding:0;
}
.avatar-emoji-grid button.selected { border-color:var(--teal); }
.avatar-upload-btn { display:inline-block; margin:0; cursor:pointer; }

.admin-color-row { display:flex; gap:24px; margin-bottom:16px; flex-wrap:wrap; }
.admin-color-row label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:700; }
.admin-color-row input[type="color"] { width:60px; height:40px; border:1px solid var(--border); border-radius:8px; padding:2px; background:#fff; }

.admin-tabs { display:flex; gap:8px; margin-bottom:18px; }
.admin-tab {
  padding:10px 16px; border-radius:var(--radius-md); border:1px solid var(--border);
  background:var(--surface); color:var(--muted); font-weight:700; cursor:pointer;
}
.admin-tab.active { background:var(--primary); color:#fff; border-color:var(--primary); }

.admin-accounts-toolbar { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.admin-accounts-toolbar input[type="search"] { flex:1; min-width:220px; padding:10px 13px; border-radius:10px; border:1px solid var(--border); font:inherit; }
.admin-accounts-toolbar select { padding:10px 13px; border-radius:10px; border:1px solid var(--border); font:inherit; background:#fff; }
.admin-accounts-table-wrap { overflow-x:auto; }
.admin-accounts-table { width:100%; border-collapse:collapse; font-size:14px; }
.admin-accounts-table th { text-align:left; padding:10px 12px; color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid var(--border); }
.admin-accounts-table td { padding:10px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.admin-accounts-table tr:last-child td { border-bottom:0; }
.account-status-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.account-status-badge.active { background:#e3f3ec; color:#1f7a4d; }
.account-status-badge.inactive { background:#fdf0dc; color:#a5670b; }
.account-status-badge.closed { background:#f4e4e4; color:#a53b3b; }
.admin-accounts-table .row-actions { display:flex; gap:6px; justify-content:flex-end; white-space:nowrap; }
.admin-accounts-table .row-actions button { padding:6px 10px; font-size:12.5px; }

.admin-pricing-list { display:flex; flex-wrap:wrap; gap:16px; margin-bottom:16px; }
.admin-pricing-card {
  flex:1 1 220px; border:1px solid var(--border); border-radius:var(--radius-md);
  padding:18px; display:flex; flex-direction:column; gap:6px;
}
.admin-pricing-card.inactive { opacity:.55; }
.admin-pricing-card .plan-price { font-size:24px; font-weight:800; margin:6px 0 2px; }
.admin-pricing-card .plan-price small { font-size:13px; font-weight:600; color:var(--muted); }
.admin-pricing-card .plan-meta { font-size:13px; color:var(--muted); }
.admin-pricing-card button { margin-top:10px; align-self:flex-start; }

.admin-email-list { display:flex; flex-direction:column; gap:10px; }
.admin-email-row {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius-md);
}
.admin-email-row .admin-email-meta strong { display:block; }
.admin-email-row .admin-email-meta span { font-size:13px; color:var(--muted); }

.admin-changelog-list, .admin-roadmap-list { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
.admin-changelog-row, .admin-roadmap-row {
  border:1px solid var(--border); border-radius:var(--radius-md); padding:14px 16px;
}
.admin-changelog-head, .admin-roadmap-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.version-badge {
  display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700;
  background:var(--surface-2); color:var(--primary);
}
.admin-changelog-changes { margin:10px 0 0; padding-left:20px; }
.admin-changelog-changes li { font-size:14px; margin-bottom:4px; }
.status-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.status-badge.status-planned { background:#eef0f4; color:#4a5568; }
.status-badge.status-in_progress { background:#fdf0dc; color:#a5670b; }
.status-badge.status-done { background:#e3f3ec; color:#1f7a4d; }
.admin-roadmap-row p { margin:8px 0 0; font-size:14px; }

.email-preview-frame {
  width:100%; height:220px; border:1px solid var(--border); border-radius:var(--radius-md);
  background:#fff; margin-bottom:16px;
}

.checkbox-field { display:flex !important; align-items:center; gap:8px; font-weight:700; }
.checkbox-field input[type="checkbox"] { width:auto; }

.admin-linked-list { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; max-height:220px; overflow-y:auto; }
.admin-linked-row {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-md); font-size:14px;
}
.admin-linked-row .muted { font-size:12.5px; }

.danger-zone { margin-top:20px; padding:16px; border:1px solid var(--danger); border-radius:var(--radius-md); background:rgba(184,95,95,.06); }
.danger-zone .field-label { color:var(--danger); }
.danger-button { background:var(--danger); color:#fff; border:0; }
.danger-button:disabled { background:var(--border); color:var(--muted); cursor:not-allowed; }

.no-students-card { max-width:480px; margin:60px auto; text-align:center; padding:40px; }
.no-students-card p { margin:12px 0 20px; }

.crop-viewport {
  width: 260px; height: 260px; margin: 0 auto 14px; position: relative;
  overflow: hidden; border-radius: 50%; background: #111; cursor: grab;
  touch-action: none; border: 3px solid var(--border);
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img { position: absolute; top: 50%; left: 50%; max-width: none; user-select: none; -webkit-user-drag: none; }

.session-card { max-width: 760px; }
.question-card { background:var(--surface-2); border-radius:var(--radius-lg); padding:20px; }
.lesson-text { margin-top:14px; line-height:1.6; font-size:15px; }

/* Charts embedded in an explanation/worked example (app.js: renderVisual()).
   Deliberately opted OUT of this app's own theme tokens (--chart-* custom
   properties set per-render in JS instead) — the validated chart palette is
   only guaranteed against the validated chart surface it ships with, not
   whichever of this app's many --surface-2 shades happens to be active. */
.lesson-visual {
  margin-top:16px; padding:16px 18px 14px; border-radius:var(--radius-md);
  background:var(--chart-surface); border:1px solid var(--chart-border);
}
.lesson-visual-title { font-weight:700; font-size:14px; color:var(--chart-ink-primary); margin-bottom:6px; }
.lesson-visual-plot { position:relative; }
.lesson-visual-plot svg { width:100%; height:auto; display:block; overflow:visible; }
.lesson-visual-axis { font-size:10px; fill:var(--chart-ink-muted); }
.lesson-visual-pie-label { font-size:11px; font-weight:700; text-anchor:middle; dominant-baseline:middle; } /* fill set per-slice in JS by that slice's own luminance */
.lesson-visual-tooltip {
  position:absolute; pointer-events:none; z-index:2; background:var(--chart-ink-primary);
  color:var(--chart-surface); padding:6px 9px; border-radius:8px; font-size:12px; line-height:1.4;
  box-shadow:0 4px 12px rgba(0,0,0,.18); white-space:nowrap;
}
.lesson-visual-tooltip .strong { font-weight:700; }
.lesson-visual-legend { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:8px; }
.lesson-visual-legend span { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--chart-ink-secondary); }
.lesson-visual-legend i { width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.lesson-visual-table-toggle { margin-top:10px; font-size:12.5px; padding:0; color:var(--chart-ink-secondary); }
.lesson-visual-table { width:100%; margin-top:10px; border-collapse:collapse; font-size:13px; }
.lesson-visual-table th, .lesson-visual-table td { text-align:left; padding:6px 10px; border-bottom:1px solid var(--chart-border); color:var(--chart-ink-primary); }
.lesson-visual-table th { color:var(--chart-ink-secondary); font-weight:700; font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; }
.answer-grid { display:grid; gap:10px; margin-top:16px; }
.answer-button { border:1px solid var(--border); background:var(--surface); color:var(--text); padding:13px; border-radius:var(--radius-md); text-align:left; transition: transform .15s ease, border-color .15s ease; }
.answer-button:hover { border-color:var(--primary); transform: var(--btn-hover-lift); }
.feedback { margin-top:14px; padding:14px; border-radius:var(--radius-md); display:none; }
.feedback.show { display:block; }
.feedback.good { background:#e5f3ec; color:#275d4f; }
.feedback.bad { background:#f8e8e8; color:#824747; }
.feedback.partial { background:#fff6e0; color:#6b5300; } /* same warm amber as .hint-box — "on the right track", not a discount grade */
.hint-box { margin-top:14px; padding:13px 14px; border-radius:var(--radius-md); background:#fff6e0; color:#6b5300; border:1px solid #f0dea0; line-height:1.5; font-size:14px; }

.short-answer-form { margin-top:16px; }
.short-answer-field {
  width:100%; padding:13px 14px; border-radius:var(--radius-md); border:1px solid var(--border);
  background:var(--surface); color:var(--text); font:inherit;
}
.short-answer-field:focus { outline:2px solid var(--primary); outline-offset:1px; }
.short-answer-field.size-word { max-width:220px; font-size:1.15em; }
.short-answer-field.size-phrase { max-width:420px; }
.short-answer-field:read-only { opacity:.85; }
.short-answer-field.correct-answer { border-color:#4d977f; background:#e5f3ec; color:#275d4f; }
.short-answer-field.partial-answer { border-color:#e0b23d; background:#fff6e0; color:#6b5300; }
.short-answer-field.wrong-answer { border-color:#c77777; background:#f8e8e8; color:#824747; }

/* Underlined like a dictionary link, not a plain highlight — signals
   "tap or hover this", works for both mouse and touch since it doesn't
   depend on a hover-only affordance to be discoverable. */
.glossary-term {
  cursor:pointer; text-decoration:underline dotted; text-decoration-color:var(--primary);
  text-underline-offset:3px; color:inherit; font-weight:600;
}
.glossary-term:hover, .glossary-term:focus-visible { background:var(--surface-2); border-radius:4px; }
/* Fixed, not absolute, and appended inside #sessionDialog by app.js rather
   than document.body — a <dialog> shown via showModal() renders in the
   browser's top layer, so anything outside it (even with a high z-index)
   would render BEHIND the modal; being a descendant is what puts it above. */
.glossary-popover {
  position:fixed; z-index:80; max-width:260px; padding:10px 12px; border-radius:var(--radius-md);
  background:var(--text); color:var(--surface); font-size:13px; line-height:1.5; box-shadow:var(--shadow);
}

.text-size-control { display:flex; align-items:center; gap:6px; }
.text-size-btn {
  width:34px; height:34px; border-radius:var(--radius-md); background:var(--surface); color:var(--text);
  border:1px solid var(--border); font-weight:700; font-size:13px; flex-shrink:0;
}
.text-size-btn:hover { border-color:var(--primary); }
/* Same rules, two possible scopes — the guided-session dialog and the
   onboarding placement-quiz screen are structurally different (a modal
   <dialog> vs a plain page view) so the class can't live on one shared
   ancestor, but the sizing itself should feel identical in both places. */
#sessionDialog.text-size-large .question-card h3, #onboardingStepQuizzes.text-size-large .question-card h3 { font-size:1.25em; }
#sessionDialog.text-size-large .lesson-text, #onboardingStepQuizzes.text-size-large .lesson-text { font-size:17px; }
#sessionDialog.text-size-large .answer-button, #onboardingStepQuizzes.text-size-large .answer-button { font-size:1.1em; }
#sessionDialog.text-size-large .hint-box, #onboardingStepQuizzes.text-size-large .hint-box { font-size:16px; }
#sessionDialog.text-size-large .short-answer-field, #onboardingStepQuizzes.text-size-large .short-answer-field { font-size:1.1em; }
#sessionDialog.text-size-large .feedback, #onboardingStepQuizzes.text-size-large .feedback { font-size:1.05em; }
#sessionDialog.text-size-xlarge .question-card h3, #onboardingStepQuizzes.text-size-xlarge .question-card h3 { font-size:1.5em; }
#sessionDialog.text-size-xlarge .lesson-text, #onboardingStepQuizzes.text-size-xlarge .lesson-text { font-size:19px; }
#sessionDialog.text-size-xlarge .answer-button, #onboardingStepQuizzes.text-size-xlarge .answer-button { font-size:1.25em; }
#sessionDialog.text-size-xlarge .hint-box, #onboardingStepQuizzes.text-size-xlarge .hint-box { font-size:18px; }
#sessionDialog.text-size-xlarge .short-answer-field, #onboardingStepQuizzes.text-size-xlarge .short-answer-field { font-size:1.25em; }
#sessionDialog.text-size-xlarge .feedback, #onboardingStepQuizzes.text-size-xlarge .feedback { font-size:1.15em; }


.session-progress-wrap { margin-bottom: 18px; }
.session-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.session-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}
.answer-button:disabled { cursor: default; }
.answer-button.correct-answer {
  border-color: #4d977f;
  background: #e5f3ec;
  color: #275d4f;
}
.answer-button.wrong-answer {
  border-color: #c77777;
  background: #f8e8e8;
  color: #824747;
}
.celebration-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.celebration-piece {
  position: absolute; top: -40px;
  animation-name: celebration-fall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes celebration-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: .2; }
}

.session-complete {
  text-align: center;
  padding: 14px 4px 6px;
}
.session-complete h2 {
  margin: 8px 0;
  font-size: 32px;
}
.session-complete p {
  color: var(--muted);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 22px;
}
.session-recap {
  text-align: left;
  max-width: 540px;
  margin: 0 auto 22px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.session-recap strong {
  display: block;
  color: var(--primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.session-recap p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}
.completion-ring {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) 0 75%, var(--surface-2) 75% 100%);
}
.completion-ring > div {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-content: center;
}
.completion-ring strong {
  display: block;
  font-size: 30px;
}
.completion-ring span,
.completion-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.completion-stats > div {
  padding: 15px;
  border-radius: 14px;
  background: var(--surface-2);
}
.completion-stats strong {
  display: block;
  font-size: 22px;
  margin-bottom: 3px;
}

/* End-of-session rating survey (app.js: renderSessionSurvey()). Deliberately
   not named .feedback* — that class already means the per-answer
   correctness box elsewhere in this dialog. */
.session-survey {
  text-align: left; max-width: 540px; margin: 22px auto 0; padding: 18px 20px;
  border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border);
}
.session-survey h3 { margin: 0 0 14px; font-size: 16px; }
.survey-field { margin-bottom: 14px; }
.survey-field:last-of-type { margin-bottom: 0; }
.survey-field > label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.survey-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.survey-pill {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-weight: 600; font-size: 13.5px; transition: .15s ease;
}
.survey-pill:hover { border-color: var(--primary); }
/* No theme-variable color is safe to pair with a FIXED text color here —
   --primary/--accent swing from light (ageband-middle's orange, needs dark
   text) to dark (the teal/slate themes' purple/maroon accent, needs light
   text) depending on the theme, so any single hardcoded ink fails somewhere.
   Selected state is conveyed by border + weight instead, with text staying
   on the same var(--text)-on-var(--surface-2) pairing already relied on
   for body text everywhere else in the app — that pairing is theme-tuned
   already, so it doesn't need re-verifying per theme the way a new color
   combination would. */
.survey-pill.selected {
  background: var(--surface); color: var(--text); font-weight: 800;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.survey-stars { display: flex; gap: 4px; }
.survey-stars button { display: inline-flex; color: var(--muted); background: transparent; padding: 2px; transition: color .15s ease; }
.survey-stars button.filled { color: var(--accent); }
.survey-field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; resize: vertical;
}
.survey-required-note { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.survey-actions { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; }
.survey-thanks {
  text-align: center; color: var(--muted); font-size: 14px; margin: 22px auto 0;
  padding: 14px; background: var(--surface-2); border-radius: var(--radius-md); max-width: 540px;
}
/* Briefly highlights the survey when a student tries to leave before
   answering it (see app.js's nudgeSurveyIntoView()) — a visual "you're
   still here" cue, not an error state. */
@media (prefers-reduced-motion: no-preference) {
  .survey-nudge { animation: survey-nudge-pulse .6s ease 2; }
}
@keyframes survey-nudge-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent); }
}

/* Age bands — automatic from the student's own year level, not user-picked.
   Each sets its own age-appropriate palette, font and shape as the DEFAULT
   look (per the "Preschool/Lower Elementary/Upper Elementary/High School"
   color-and-type research: bright saturated primaries with a big rounded
   font for young kids, cooling and quieting down toward serif/muted tones
   for teens). Positioned BEFORE the theme-* rules below on purpose: an
   explicitly chosen theme (body.theme-*) always wins the cascade for the
   color vars they share, so a student who picks "Space mission" still gets
   it regardless of age — age-band is the default, theme is the override. */
body.ageband-junior {
  --bg:#fdfcf9; --surface:#fff; --surface-2:#eef4ff; --text:#1c2333; --muted:#5b6478;
  --primary:#1d63ff; --primary-2:#7fb2ff; --accent:#ffcd00; --border:#dbe6ff;
  --font-base: 19px; --font-family: 'Fredoka', sans-serif;
  --radius-lg: 30px; --radius-md: 18px;
  --btn-hover-lift: translateY(-1px) scale(1.04);
}
body.ageband-junior .primary, body.ageband-junior .secondary { padding-top: 14px; padding-bottom: 14px; }
body.ageband-junior .answer-button { padding: 16px; }

body.ageband-middle {
  --bg:#fdfbf7; --surface:#fff; --surface-2:#fff2e2; --text:#232821; --muted:#6b7266;
  --primary:#ff9500; --primary-2:#ffc266; --accent:#4cd964; --border:#ffe9cc;
  --font-base: 17px; --font-family: 'Lexend', sans-serif;
  --radius-lg: 24px; --radius-md: 14px;
  --btn-hover-lift: translateY(-1px) scale(1.02);
}

body.ageband-teen {
  --primary:#008080; --primary-2:#5aada6; --accent:#7b1fa2;
  --font-base: 16px; --radius-lg: 20px; --radius-md: 12px;
  --btn-hover-lift: translateY(-1px);
}
body.ageband-teen h1, body.ageband-teen h2, body.ageband-teen h3 { font-family: 'Montserrat', sans-serif; }

body.ageband-senior {
  --bg:#f4f5f6; --surface:#fff; --surface-2:#eef0f2; --text:#1a1f28; --muted:#5b6472;
  --primary:#334155; --primary-2:#64748b; --accent:#6b1d2f; --border:#e2e5e9;
  --font-base: 15px; --radius-lg: 14px; --radius-md: 8px;
  --btn-hover-lift: translateY(-1px);
}
body.ageband-senior h1, body.ageband-senior h2, body.ageband-senior h3 { font-family: 'Merriweather', serif; }
body.ageband-senior .answer-button:hover { transform: none; border-color: var(--primary); }

body.theme-space {
  --bg:#0e1624; --surface:#172235; --surface-2:#202f48; --text:#eef4ff; --muted:#9dacbf;
  --primary:#6c7cff; --primary-2:#9e86ff; --accent:#f6c65b; --border:#2b3a51;
}
body.theme-sport {
  --bg:#f4f5f1; --surface:#fff; --surface-2:#eef0e8; --text:#1d241b; --muted:#70786b;
  --primary:#486738; --primary-2:#8da77e; --accent:#e0a743; --border:#dfe5da;
}
body.theme-studio {
  --bg:#faf5f0; --surface:#fffdfb; --surface-2:#f7e9df; --text:#382921; --muted:#876f62;
  --primary:#9d5e49; --primary-2:#d59b82; --accent:#deb65f; --border:#ead9cf;
}
body.theme-minimal {
  --bg:#f7f7f7; --surface:#fff; --surface-2:#f0f0f0; --text:#151515; --muted:#737373;
  --primary:#222; --primary-2:#777; --accent:#c8a75d; --border:#e2e2e2;
}
body.ageband-senior .answer-button:hover { transform: none; border-color: var(--primary); }

@media (max-width: 1100px) {
  .week-plan { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position:relative; height:auto; }
  .nav { grid-template-columns:repeat(3,1fr); }
  .sidebar-footer { display:none; }
  .grid-3, .grid-2, .subject-grid, .profile-grid, .report-grid { grid-template-columns:1fr; }
  .hero-card { align-items:flex-start; }
}
@media (max-width: 640px) {
  .main { padding:20px 16px 50px; }
  .topbar { align-items:flex-start; }
  .top-actions .icon-button { display:none; }
  .hero-card { padding:26px; }
  .progress-orbit { display:none; }
  .nav { grid-template-columns:repeat(2,1fr); }
  .week-plan { grid-template-columns:1fr; }
  .section-intro { align-items:flex-start; flex-direction:column; }
}
.login-screen {
  min-height: 100vh; display: grid; place-items: center; background: var(--bg);
}
.login-card-wrap { width: min(92vw, 400px); display: grid; gap: 24px; justify-items: center; }
.login-mode-toggle { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; width: 100%; }
.login-mode-btn { flex: 1; padding: 9px 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.login-mode-btn.active { background: #fff; color: var(--forest); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.login-brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.login-brand .logo-mark { width: 56px; height: 56px; }
.login-brand .logo-wordmark { font-size: 26px; }
.login-tagline { margin: 0; color: var(--muted); font-size: 14px; max-width: 320px; }
.login-card { width: 100%; }
.login-card .feedback.bad:empty { display: none; }
.login-signup-hint { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.login-signup-hint .text-button { font-size: 14px; }
.intake-form .feedback.bad.show, .upload-zone .feedback.bad.show { margin: 10px 0 0; padding: 10px 12px; font-size: 13px; }
.upload-actions { display: flex; gap: 10px; margin-top: 14px; justify-content: center; }
#uploadFileName { min-height: 18px; margin-top: 10px; font-weight: 700; }
.upload-progress { margin-top: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.upload-progress-bar {
  height: 8px; border-radius: 999px; background: var(--primary); width: 0%;
  transition: width .15s ease; min-width: 8px;
}
.upload-progress-label { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); text-align: center; }

.child-switcher { padding: 0 8px 18px; }
.child-switcher label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; color: rgba(255,255,255,.6); }
.child-switcher select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff;
}
/* The dropdown box itself is styled white-on-dark for the dark sidebar, but
   the native option list is rendered with a browser-default white background
   — without this, the options inherit the same white text and become
   invisible until hovered. */
.child-switcher select option { color: #0f2823; background: #fff; }

.intake-choice { display: grid; gap: 10px; margin-bottom: 18px; }
.intake-option { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.intake-form { display: grid; gap: 4px; margin-top: 8px; }
.intake-form textarea {
  width: 100%; padding: 12px 13px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--forest); font: inherit; resize: vertical;
}
.field-hint { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; line-height: 1.4; }
.consent-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.consent-line input { width: auto; margin-top: 3px; }
#uploadType { margin: 12px 0; }

.access-list { display: grid; gap: 10px; margin-bottom: 20px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--primary); font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.access-actions { display: flex; gap: 10px; flex-shrink: 0; }
.access-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface);
}
.access-row small { display: block; color: var(--muted); }
.access-dialog-card h3 { margin: 20px 0 4px; font-size: 15px; }

.subject-card-head .text-button + .text-button { margin-left: 8px; }

@media print {
  .sidebar, .topbar, .section-intro button { display:none !important; }
  .app-shell { display:block; }
  .main { padding:0; }
  .view { display:none !important; }
  #parent { display:block !important; }
  .report-card { box-shadow:none; border:0; }
}

/* Printable test sheet — toggled on only for the moment of printing (see
   printTestSheet in app.js), so it never fights the parent-report print
   rules above, which apply unconditionally to any print action. */
.print-sheet { display: none; }
@media print {
  body.printing-study-sheet .app-shell,
  body.printing-study-sheet dialog {
    display: none !important;
  }
  body.printing-study-sheet .print-sheet {
    display: block !important;
  }
}
.print-sheet { max-width: 720px; margin: 0 auto; padding: 30px 30px 50px; color: #111; background: #fff; font-family: Lato, system-ui, sans-serif; }
.print-sheet h1 { font-size: 22px; margin: 0 0 2px; }
.print-sheet .print-meta { color: #555; font-size: 13px; margin-bottom: 24px; }
.print-header { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.print-header .logo-mark { width: 24px; height: 24px; flex-shrink: 0; }
.print-header .logo-wordmark { font-family: Comfortaa, system-ui, sans-serif; font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.print-question { margin-bottom: 20px; page-break-inside: avoid; }
.print-question p { font-weight: 700; margin: 0 0 8px; }
.print-question ol { list-style: none; padding: 0; margin: 0; }
.print-question li { padding: 4px 0; }
.print-answer-key { page-break-before: always; }
.print-answer-key h2 { font-size: 18px; }
.print-answer-key ol { padding-left: 20px; }
.print-footer { position: fixed; bottom: 10px; left: 0; right: 0; text-align: center; color: #888; font-size: 11px; }
