:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel2: #273449;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --border: #334155;
  --focus: #fbbf24;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
/* Readable fallback text inside a <video> (black backdrop) before/without playback. */
video { color: #e8eef6; }
.topbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between;
  padding: 12px 16px; background: #0b1220; border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.05rem; }
.whoami { font-size: .85rem; color: var(--muted); }
.lock { font-size: .9rem; }
.nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 16px; background: #0b1220; border-bottom: 1px solid var(--border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.navlink {
  display: inline-block; padding: 6px 10px; border-radius: 8px;
  background: var(--panel); color: var(--text); text-decoration: none;
  font-size: .85rem; white-space: nowrap; border: 1px solid var(--border);
}
.navlink.active { background: var(--accent); color: #0b1220; border-color: var(--accent); }
.navlink.locked { opacity: .55; cursor: not-allowed; }
.navlink.enroll { background: #b02a2a; color: #fff; border-color: #b02a2a; font-weight: 700; }
body .nav a.navlink.enroll, body .nav a.navlink.enroll:hover { background: #b02a2a; color: #fff; border-color: #b02a2a; font-weight: 700; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 16px 0; }
.card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--border); text-decoration: none; color: var(--text);
}
.card:hover { border-color: var(--accent); }
.card.locked { opacity: .55; }
.num { color: var(--accent); font-weight: 700; font-size: .8rem; }
.ct { font-weight: 600; }
.ctag { color: var(--muted); font-size: .85rem; }
h1 { font-size: 1.5rem; margin: 12px 0 4px; }
h2 { font-size: 1.2rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 6px; }
.lede, .tagline { color: var(--muted); margin: 0 0 12px; }
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin: 14px 0;
}
.prose p { margin: 0 0 10px; }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .9rem; }
.prose th, .prose td { text-align: left; padding: 8px; border: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--panel2); }
.prose ul, .prose ol { padding-left: 22px; }
.callout { border-radius: 8px; padding: 10px 12px; margin: 12px 0; border: 1px solid; }
.callout.warn { background: #3a2f12; border-color: #8a6d1a; color: #fde68a; }
.callout.ok { background: #0c2f26; border-color: #1d6b4f; color: #a7f3d0; }
.muted { color: var(--muted); font-size: .9rem; }
.video-intro { color: var(--text); margin: 8px 0 14px; line-height: 1.55; }
.sources li, .answers li, .checklist li, .ex li { margin: 6px 0; }
.srcurl { display: block; font-size: .8rem; color: var(--muted); word-break: break-all; }
.field { margin: 10px 0; }
.field label { display: block; font-size: .9rem; margin-bottom: 4px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: #0b1220; color: var(--text); font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--focus); outline-offset: 1px;
}
/* Global keyboard focus visibility (WCAG 2.4.7): links, buttons, nav, cards, details. */
a:focus-visible, button:focus-visible, .navlink:focus-visible, .card:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.btn {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  background: var(--accent); color: #0b1220; border: 1px solid var(--accent);
  text-decoration: none; font-size: .9rem; font-weight: 600; cursor: pointer;
  margin: 4px 6px 4px 0;
}
.btn:hover { filter: brightness(1.1); }
.actions { margin-top: 8px; }
.player { margin: 10px 0; }
.player video, .player audio { width: 100%; border-radius: 8px; background: #000; }
.transcript { margin: 10px 0; }
.transcript summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.transcript-body { max-height: 320px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; font-size: .9rem; }
.downloads { margin: 10px 0; }
.crumb { color: var(--muted); font-size: .85rem; margin: 8px 0; }
.prevnext { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--border); }
.lead { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 12px 0; }
.lead-head { font-size: .95rem; }
.topic { color: var(--accent); }
.st { font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.st-new { background: #1d4ed8; }
.st-claimed { background: #6d28d9; }
.st-responded { background: #b45309; }
.st-resolved { background: #047857; }
.lead-meta { color: var(--muted); font-size: .8rem; margin: 4px 0; }
.lead-msg { background: #0b1220; border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin: 8px 0; white-space: pre-wrap; }
.inline { display: inline; }
.reply textarea { width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: #0b1220; color: var(--text); margin: 6px 0; }
.exanswer {
  width: 100%; min-height: 72px; padding: 9px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: #0b1220; color: var(--text);
  font-size: 1rem; margin: 4px 0 8px; resize: vertical;
}
.exanswer:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.ex label { color: var(--muted); }
.answers li.correct { border-left: 3px solid var(--ok); padding-left: 10px; }
.answers li.review { border-left: 3px solid var(--warn); padding-left: 10px; }
.answers .q { margin-top: 4px; }
.answers .a { color: var(--muted); margin-top: 4px; }
.missed { color: var(--warn); font-size: .85rem; margin-top: 4px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 16px; }
code { background: #0b1220; padding: 1px 5px; border-radius: 4px; word-break: break-all; }
@media (max-width: 520px) {
  .wrap { padding: 10px; }
  .topbar { padding: 10px 12px; }
  h1 { font-size: 1.3rem; }
  .btn { width: 100%; margin: 4px 0; }
}

/* Reviewed assessments: readable answer controls. */
.ex select{display:block;width:100%;max-width:100%;font:inherit;padding:12px;margin:8px 0 20px;border:1px solid #64748b;border-radius:6px;white-space:normal;background:#fff;color:#14202b}.ex select:focus-visible{outline:3px solid #14527a;outline-offset:3px}

/* WEB-181: keyboard and small-screen account navigation. */
.skip-link { position:absolute; top:-100px; left:12px; padding:10px; background:#fff; color:#0f172a; z-index:10; }
.skip-link:focus { top:8px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
/* The navy chrome (topbar/footer) keeps the dark accents on every course page;
   the light-theme navy focus ring would vanish there, so use gold. */
body.student .topbar :focus-visible, body.auth .topbar :focus-visible,
body.student .foot :focus-visible, body.auth .foot :focus-visible { outline-color:#f0c66b; }
.account-form input { max-width:100%; padding:10px; font:inherit; }
.account-form button { min-height:44px; padding:8px 14px; font:inherit; cursor:pointer; }
.nav a { padding:6px; }
.whoami { overflow-wrap:anywhere; }

/* WEB-183: branded light sign-in card, scoped to body.auth only — does not
   touch the dark course theme used by the signed-in dashboard/lesson pages. */
body.auth { background: #f4f6f9; color: #17202a;
  --bg:#f4f6f9; --panel:#fff; --panel2:#eef2f7; --text:#17202a; --muted:#4a5568;
  --ok:#1e6b34; --warn:#805400; --border:#d8dee6; --focus:#0b2545; }
/* Keep the light-theme accent button as shipped; only darken link text so it
   clears 4.5:1 on the near-white page (the base `a` uses the dark-theme accent). */
body.auth main a:not(.btn):not(.navlink) { color:#1d5c96; }
body.auth .topbar { background: #0b2545; border-bottom: 3px solid #c9962a; }
body.auth .topbar .whoami { display:none; }
body.auth .nav { display:none; }
body.auth .wrap { max-width: 460px; margin: 48px auto; padding: 16px; }
body.auth .auth-card {
  background: #fff; border: 1px solid #d8dee6; border-radius: 12px;
  padding: 28px 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
body.auth h1 { color: #0b2545; font-size: 1.4rem; margin: 0 0 4px; text-align: center; }
body.auth .auth-sub { color: #4a5568; text-align: center; margin: 0 0 18px; }
body.auth .account-form .field-row { margin: 0 0 16px; }
body.auth .account-form label { display: block; font-weight: 600; font-size: .92rem; color: #17202a; }
body.auth .account-form label input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 1rem;
  border: 1px solid #d8dee6; border-radius: 8px; background: #fff; color: #17202a;
}
body.auth .account-form label input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body.auth .account-form button {
  display: block; width: 100%; margin-top: 4px; padding: 13px 16px; font-size: 1rem;
  font-weight: 700; background: #b02a2a; color: #fff; border: 2px solid transparent;
  border-radius: 8px;
}
body.auth .account-form button:hover { background: #8c1f1f; }
body.auth .auth-links { text-align: center; margin-top: 18px; font-size: .92rem; color: #4a5568; }
body.auth .auth-links a { color: #1d5c96; }
body.auth p[role="status"]:empty { display: none; margin: 0; }
body.auth .foot { background: #0b2545; color: #cbd5e1; }
body.auth .foot a { color: #9fc6e8; }
@media (max-width: 480px) {
  body.auth .wrap { margin: 24px auto; padding: 12px; }
  body.auth .auth-card { padding: 22px 18px; }
}

/* Codex: unify the sign-in header with the public Academy brand. */
body.auth { min-height:100vh; display:flex; flex-direction:column; }
body.auth .topbar { padding:20px max(20px,calc((100vw - 1040px)/2)); }
body.auth .topbar .brand { display:flex; align-items:center; gap:12px; color:#fff; text-decoration:none; font-size:1.05rem; font-weight:750; }
body.auth .topbar .brand::before { content:''; display:block; width:32px; height:38px; background:url('/assets/favicon.svg') center/contain no-repeat; }
body.auth .wrap { width:100%; flex:1; }
body.auth .foot { margin-top:auto; }
body.auth .auth-links { line-height:1.65; }
body.auth p[role="status"]:not(:empty) { background:#fff2f2; border-left:3px solid #b02a2a; padding:12px; color:#8c1f1f; text-align:left; }

/* Codex: student learning pages share the public Academy palette. */
body.student { --bg:#f4f6f9; --panel:#fff; --panel2:#eef2f7; --text:#17202a; --muted:#4a5568; --accent:#1d5c96; --ok:#1e6b34; --warn:#805400; --border:#d8dee6; --focus:#0b2545; }
body.student .topbar { background:#0b2545; border-bottom:3px solid #c9962a; color:#fff; padding:20px max(20px,calc((100vw - 1040px)/2)); }
body.student .brand { display:flex; align-items:center; gap:12px; color:#fff; text-decoration:none; }
body.student .brand::before { content:''; display:block; width:32px; height:38px; background:url('/assets/favicon.svg') center/contain no-repeat; }
body.student .whoami { color:#dce7f4; }
body.student .nav { background:#fff; padding:12px max(16px,calc((100vw - 1040px)/2)); }
body.student .navlink { white-space:normal; }
body.student .navlink.active { background:#0b2545; color:#fff; }
body.student .wrap { max-width:1080px; padding:32px 20px 48px; }
body.student h1 { color:#0b2545; font-size:clamp(1.6rem,3vw,2.25rem); letter-spacing:-.025em; line-height:1.2; margin:8px 0 18px; }
body.student h2,body.student h3 { color:#0b2545; }
body.student .panel { padding:24px; border-radius:12px; }
body.student .grid { gap:18px; margin:24px 0; }
body.student .card { padding:24px; border-radius:12px; box-shadow:0 4px 20px #0b254505; }
body.student .card:hover { box-shadow:0 6px 24px #0b254512; }
body.student .num { margin-bottom:8px; }
body.student .module-status { border-top:1px solid var(--border); padding-top:12px; margin-top:auto; font-size:.82rem; font-weight:650; color:var(--accent); }
body.student .field input,body.student .field select,body.student .field textarea,body.student code { background:#fff; }
body.student .btn { background:#b02a2a; color:#fff; border-color:#b02a2a; padding:12px 18px; }
body.student .btn-secondary-course { background:#fff; color:#0b2545; border-color:#0b2545; }
body.student .callout.ok { background:#eef8f1; border-color:#a7cfb3; color:#155c2c; }
body.student .callout.warn { background:#fff8e6; border-color:#dac78f; color:#684700; }
body.student .foot { background:#0b2545; color:#dce7f4; padding:28px 20px; }
body.student .foot a { color:#b8d9f5; }
body.student .learning-progress progress { display:block; width:100%; height:10px; accent-color:#1d5c96; margin-bottom:20px; }
body.student .score-history { margin-top:20px; }
body.student .score-history summary { cursor:pointer; color:#1d5c96; font-weight:650; }
body.student .score-history ul { list-style:none; padding:0; }
body.student .score-history li { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; border-top:1px solid var(--border); padding:16px 0; }
body.student .score-history li strong { width:100%; }
body.student .score-history li span { color:var(--muted); font-size:.9rem; }
body.student .prose { overflow-wrap:anywhere; }
body.student .prose table { display:block; max-width:100%; overflow-x:auto; }
body.student .ex { padding-left:22px; }
@media(max-width:520px) { body.student .wrap { padding:24px 16px; } body.student .panel,body.student .card { padding:20px; } body.student .grid { grid-template-columns:1fr; } }

body.student .grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
body.student .lesson-jumps { display:flex; flex-wrap:wrap; gap:8px; margin:24px 0; }
body.student .lesson-jumps a { padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:#fff; text-decoration:none; font-size:.9rem; }
body.student section[id] { scroll-margin-top:20px; }
@media(max-width:800px) { body.student .grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { body.student .grid { grid-template-columns:1fr; } }

/* Review feedback: quiet navigation controls, rather than underlined tabs. */
body.student .nav a { color:#334155; text-decoration:none; font-size:.9rem; font-weight:600; padding:10px 12px; border-radius:7px; }
body.student .nav a:hover { background:#f1f3f6; color:#17202a; }
body.student .module-menu { max-width:1040px; margin:16px auto 0; padding:0 20px; }
body.student .module-menu summary { cursor:pointer; display:list-item; width:fit-content; color:#334155; font-weight:650; font-size:.9rem; padding:10px 14px; background:#fff; border:1px solid #d8dee6; border-radius:8px; }
body.student .module-menu nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px 0; }
body.student .module-menu .navlink { border:0; background:#fff; padding:12px 14px; color:#334155; }
body.student .module-menu .navlink.active { background:#e8edf3; color:#0b2545; font-weight:700; box-shadow:inset 3px 0 #0b2545; }
body.student .lesson-jumps a { color:#334155; font-weight:600; }
body.student .score-history summary { color:#334155; }
@media(max-width:520px) { body.student .module-menu nav { grid-template-columns:1fr; } }

/* Lesson reading rail and visible multiple-choice answers. */
body.lesson-page .wrap { max-width:1280px; }
.lesson-layout { display:grid; grid-template-columns:190px minmax(0,1fr); gap:32px; align-items:start; }
.lesson-sidebar { position:sticky; top:24px; margin-top:14px; }
.lesson-content { min-width:0; }
.lesson-outline summary { cursor:pointer; font-weight:700; color:#17202a; font-size:.9rem; }
.lesson-outline .current-section { display:none; }
.lesson-outline nav { margin-top:18px; display:flex; flex-direction:column; }
.lesson-outline nav a { position:relative; padding:12px 12px 12px 20px; border-left:2px solid #d8dee6; text-decoration:none; color:#4a5568; font-size:.9rem; }
.lesson-outline nav a[aria-current="location"] { color:#0b2545; background:#e8edf3; border-left-color:#0b2545; font-weight:700; border-radius:0 6px 6px 0; }
.lesson-outline nav a.earlier-section { color:#334155; border-left-color:#94a3b8; }
.quiz-question { border:0; padding:0; margin:0; min-width:0; }
.quiz-question legend { padding:0; font-weight:650; color:#17202a; margin-bottom:12px; max-width:100%; }
.quiz-options { display:grid; gap:10px; }
body.student .ex > li { margin:0 0 28px; padding-left:4px; }
body.student .quiz-option { display:flex; align-items:flex-start; gap:12px; border:1px solid #d8dee6; padding:14px; border-radius:8px; color:#334155; cursor:pointer; min-height:48px; }
.quiz-option input { width:18px; height:18px; flex-shrink:0; margin:4px 0 0; accent-color:#0b2545; }
.quiz-option:hover { background:#f4f6f9; }
.quiz-option:has(input:checked) { background:#eef2f7; border-color:#0b2545; }
.quiz-option:focus-within { outline:3px solid var(--focus); outline-offset:2px; }
.audio-alternative { margin:16px 0; }
.audio-alternative summary { color:#334155; cursor:pointer; font-size:.9rem; font-weight:600; }
@media(max-width:900px) {
 .lesson-layout { grid-template-columns:1fr; gap:4px; }
 .lesson-sidebar { position:static; margin:12px 0; }
 .lesson-outline { padding:14px 16px; border:1px solid #d8dee6; border-radius:8px; background:#fff; }
 .lesson-outline .current-section { display:inline; font-weight:400; color:#4a5568; margin-left:12px; }
}
@media print { .lesson-sidebar,.module-menu { display:none; } .lesson-layout { display:block; } }

.quiz-feedback { margin:14px 0 0; padding:14px 16px; background:#f4f6f9; border-radius:8px; font-size:.92rem; }
.quiz-feedback p { margin:8px 0 0; }
.quiz-option.correct-choice { border-color:#2c7547; background:#f0f8f2; }
.quiz-option.incorrect-choice { border-color:#b02a2a; background:#fff4f3; }
.check-results:empty { display:none; }
.check-results { margin-top:18px; }
.check-results:focus { outline:none; }
.check-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
button:disabled { opacity:.65; cursor:wait; }
.check-checklist { margin-top:18px; font-size:.92rem; }
.check-checklist summary { cursor:pointer; font-weight:600; color:#334155; }
.check-checklist li { margin:8px 0; }

.chapter { scroll-margin-top: 2rem; }
.chapter-practice { margin-top:1.25rem; padding:1rem 1.25rem; border-left:3px solid var(--accent, #357a70); background:var(--surface-soft, #f5f7f6); border-radius:0 .5rem .5rem 0; }
.chapter-sources { font-size:.85rem; overflow-wrap:anywhere; }
.chapter-video { margin:1.25rem 0; padding:0; border:0; box-shadow:none; }
.core-reference summary { cursor:pointer; font-weight:600; }
.core-reference[open] summary { margin-bottom:1rem; }

.practice-response{display:block;width:100%;min-height:7rem;margin:.6rem 0;resize:vertical;box-sizing:border-box}.chapter-practice .actions{flex-wrap:wrap}

/* Course-created practice exhibits alongside their walkthroughs. */
.practice-exhibit { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--border, #d8e0e8); border-radius: 16px; }
.exhibit-block + .exhibit-block { margin-top: 1.5rem; }
.exhibit-block h4 { margin-bottom: .5rem; font-size: 1rem; }
.exhibit-table-wrap { overflow-x: auto; max-width: 100%; }
.exhibit-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.exhibit-table th, .exhibit-table td { padding: .65rem .75rem; vertical-align: top; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--border, #d8e0e8); }
.exhibit-table th { width: 35%; font-weight: 600; }
.exhibit-limits { margin-top: 1rem; }
@media (max-width: 640px) { .practice-exhibit { padding: 1rem .75rem; } .exhibit-table th, .exhibit-table td { padding: .55rem .4rem; } }

/* Keep exhibit table captions available to assistive technology without duplicating visible headings. */
.practice-exhibit caption.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; }

/* Planned walkthroughs: informational cards, with no inactive player controls. */
.video-placeholder{margin-block:1.5rem;padding:clamp(1rem,2vw,1.5rem);border:1px solid var(--border,#d6dfdd);border-inline-start:4px solid var(--accent,#27685a);border-radius:14px;background:var(--surface-alt,#f3f7f5);overflow-wrap:anywhere}
.video-placeholder-label{margin:0 0 .5rem;font-size:.78rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted,#52635c)}
.video-placeholder h3{margin-block:.35rem .75rem;font-size:clamp(1.05rem,1.6vw,1.25rem)}
.video-placeholder p:last-child{margin-bottom:0}

/* AI study tutor (additive layer; the deterministic knowledge check remains the
   certificate backbone). */
.ai-panel { display:flex; flex-direction:column; gap:12px; }
.ai-panel label { font-weight:600; color:#17202a; display:block; margin-bottom:4px; }
.ai-panel select, .ai-panel textarea { width:100%; box-sizing:border-box; border:1px solid #d8dee6; border-radius:8px; padding:12px; font:inherit; color:#17202a; background:#fff; }
.ai-panel textarea { min-height:84px; resize:vertical; }
.ai-panel select:focus, .ai-panel textarea:focus { outline:3px solid var(--focus); outline-offset:1px; }
.ai-log { display:flex; flex-direction:column; gap:14px; max-height:460px; overflow-y:auto; padding:8px; border:1px solid #e2e8f0; border-radius:10px; background:#f8fafc; }
.ai-msg { max-width:92%; padding:12px 14px; border-radius:12px; font-size:.95rem; }
.ai-msg p { margin:6px 0 0; white-space:pre-wrap; }
.ai-msg .ai-who { display:block; font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#4a5568; }
.ai-user { align-self:flex-end; background:#0b2545; color:#fff; }
.ai-user .ai-who { color:#c9d6ea; }
.ai-assistant { align-self:flex-start; background:#fff; border:1px solid #d8dee6; }
.ai-answer { white-space:pre-wrap; }
.ai-answer a.ai-link { display:inline-block; margin-top:8px; }
.ai-thinking { opacity:.7; font-style:italic; }
.ai-sections li { margin:8px 0; }

/* FED-14: public SF 1413 lesson preview ("a sample of the specificity") */
.lesson-preview { padding: 56px 20px; }
.lesson-preview .lp-inner { max-width: 840px; margin: 0 auto; }
.lesson-preview .lp-eyebrow { font-size: .76rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; color: #8c1f1f; }
.lesson-preview h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; margin: 0 0 12px; color: #0b2545; }
.lesson-preview .lp-sub { color: #4a5568; font-size: 1.05rem; max-width: 70ch; margin: 0 0 24px; }
.lesson-preview .lp-video { margin: 0; }
.lesson-preview .lp-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border: 1px solid #d8dee6; border-radius: 12px; box-shadow: 0 14px 36px rgba(16,36,64,.16); }
.lesson-preview .lp-video figcaption { margin: 12px 0 0; text-align: center; font-size: .92rem; color: #4a5568; }
.lesson-preview .lp-video figcaption span { display: inline-block; margin-left: 6px; color: #8c1f1f; font-weight: 600; white-space: nowrap; }
.lesson-preview .lp-cta { text-align: center; margin: 26px 0 0; }
@media (max-width: 640px) { .lesson-preview { padding: 40px 16px; } }

/* FED-18 (2026-10-12): course FAQ on the enroll page (dark private-course theme). */
.faq { margin: 22px 0 8px; }
.faq h2 { color: var(--text); }
.faq-item { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); margin: 8px 0; }
.faq-item summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--text); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; font-weight: 400; color: var(--muted); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item summary:hover { background: var(--panel2); border-radius: 8px; }
.faq-item p { margin: 0; padding: 0 14px 14px; color: var(--text); font-size: .95rem; }
.faq-note { color: var(--muted); font-size: .85rem; margin: 14px 0 0; }

/* FED-117 (2026-10-13): approved refund-policy block + required Terms consent
   row on the enroll page. The checkbox is kept inline because the base
   `label input` rule makes text inputs full-width, which distorts a checkbox. */
.refund-policy { margin: 22px 0 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.refund-policy h2 { color: var(--text); font-size: 1.1rem; margin: 0 0 8px; }
.refund-policy p { color: var(--text); font-size: .95rem; margin: 0; }
body.auth .account-form .consent-row label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
body.auth .account-form .consent-row input[type="checkbox"] { display: inline-block; width: auto; margin: 3px 0 0; padding: 0; }

/* FED-25 (2026-10-12): secondary checklist email capture on /course/enroll.
   Sits below the paid checkout and is deliberately lower-emphasis than the red
   primary button, so the $2,495.95 Enroll CTA stays the page's main action. */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.checklist-capture { margin: 26px 0 8px; padding: 18px 20px; border: 1px solid #d8dee6; border-radius: 12px; background: #fff; }
.checklist-capture h2 { font-size: 1.1rem; margin: 0 0 8px; color: #0b2545; }
.checklist-capture p { color: #334155; font-size: .95rem; margin: 0 0 14px; }
.checklist-capture a { color: #1d5c96; }
body.auth .checklist-capture .account-form button { background: #fff; color: #0b2545; border: 2px solid #0b2545; font-weight: 700; }
body.auth .checklist-capture .account-form button:hover { background: #eef2f7; }
body.auth .checklist-capture #checklist-status { display: none; margin: 12px 0 0; padding: 12px; border-radius: 6px; font-weight: 600; }
body.auth .checklist-capture #checklist-status.pending { display: block; background: #eef2f7; color: #334155; border: 1px solid #d8dee6; }
body.auth .checklist-capture #checklist-status.ok { display: block; background: #e8f5ec; color: #155c2c; border: 1px solid #bfe3c8; }
body.auth .checklist-capture #checklist-status.err { display: block; background: #fff2f2; color: #8c1f1f; border: 1px solid #f3c1bb; }
@media (max-width: 480px) { .checklist-capture { padding: 16px; } }

/* FED-65 (2026-10-12): factual correction callouts (F01-F14), each tied to the
   affected lesson and the module video timestamp. High-visibility so a learner
   reads the corrected rule before the surrounding text. */
.correction-callout { margin: 14px 0; padding: 14px 16px; border: 1px solid #b45309; border-left: 6px solid #b45309; border-radius: 8px; background: #fff7ed; color: #3f2d18; }
.correction-callout .correction-tag { margin: 0 0 4px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #9a3412; }
.correction-callout .correction-title { margin: 0 0 6px; font-size: 1.02rem; font-weight: 700; color: #7c2d12; }
.correction-callout .correction-rule { margin: 0 0 8px; }
.correction-callout .correction-anecdote { margin: 0 0 8px; color: #7c2d12; }
.correction-callout .correction-meta { margin: 0; font-size: .85rem; color: #5b4636; }
.correction-callout .correction-meta a { color: #9a3412; }
.correction-captions { margin: 10px 0 0; font-size: .9rem; }
.corrections .correction-callout:last-of-type { margin-bottom: 0; }

/* FED-371: responsive inline YouTube embed for the Federal Connect explainer.
   Members-only surfaces (.federal-connect-entry and the /course/federal-connect/
   offer page); the frame keeps a 16:9 box and the iframe fills it. */
.video-embed { margin: 12px 0; }
.video-embed-cap { margin: 0 0 8px; font-weight: 600; }
.video-embed-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden;
}
.video-embed-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* FED-533: GCExperts customer-proof block — dark-theme variant for the public
   enrollment page. Copy from FED-532 (QC-approved by VM 811). */
.proof-block {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; margin: 20px 0;
}
.proof-block h2 { color: var(--text); margin: 6px 0 10px; }
.proof-eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem;
  font-weight: 700; color: var(--accent); margin: 0;
}
.proof-lede { font-size: 1.02rem; }
.proof-figure {
  display: block; font-size: 2rem; font-weight: 800; color: var(--text);
  line-height: 1.1; margin: 8px 0 2px;
}
.proof-note { color: var(--muted); font-size: .85rem; margin: 6px 0; }
.proof-cards {
  list-style: none; padding: 0; margin: 14px 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.proof-card {
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
}
.proof-card strong { display: block; color: var(--text); }
.proof-card span { color: var(--muted); font-size: .88rem; }
.proof-quote {
  background: var(--panel2); border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 10px 14px; margin: 14px 0;
}
.proof-video { margin: 16px 0; }
.proof-video-frame {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9;
  background: #000; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.proof-video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.proof-link { margin: 12px 0 4px; }
.proof-link a { font-weight: 700; }
.proof-attrib { color: var(--muted); font-size: .85rem; margin: 4px 0 0; }

/* FED-540: small attributed GCExperts source mark (proof block + footer). */
.proof-mark-link { text-decoration: none; }
.proof-mark {
  width: 18px; height: 18px;
  vertical-align: -4px;
  margin-right: .4em;
  border-radius: 3px;
}

/* FED-543: subordinate horizontal GCExperts source lockup (transparent mark +
   wordmark). The dark course theme uses the light/reversed variant. Fixed
   height, auto width keeps the 800x200 lockup small. */
.proof-mark--lockup {
  width: auto;
  height: 20px;
  vertical-align: -5px;
  margin-right: .5em;
  border-radius: 0;
}

/* Slot4 board398: enrollment proof and primary action match the light Academy theme. */
body.auth .proof-eyebrow { color:#8c1f1f; }
body.auth .btn-primary { background:#b02a2a; color:#fff; border-color:#b02a2a; }
body.auth .btn-primary:hover { background:#8c1f1f; color:#fff; border-color:#8c1f1f; }

/* Slot4 board398: signed-in account forms use the existing Academy controls. */
body.student .account-form { max-width:520px; padding:24px; margin:20px 0; background:#fff; border:1px solid #d8dee6; border-radius:12px; }
body.student .account-form .field-row { margin:0 0 16px; }
body.student .account-form label { display:block; font-weight:600; color:#17202a; }
body.student .account-form > label { margin-bottom:16px; }
body.student .account-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
body.student .account-form select, body.student .account-form textarea { display:block; width:100%; min-height:48px; margin-top:8px; padding:12px; font:inherit; color:#17202a; background:#fff; border:1px solid #b6c3d3; border-radius:8px; }
body.student .account-form button { width:100%; min-height:48px; padding:14px 20px; font:inherit; font-weight:700; background:#b02a2a; color:#fff; border:0; border-radius:8px; cursor:pointer; }
body.student .account-form button:hover { background:#8c1f1f; }
@media (max-width:520px) { body.student .account-form { padding:20px 16px; } }
