:root {
  --bg: #fffaf0;
  --surface: #faf5e8;
  --surface-raised: #f5f0e0;
  --surface-current: var(--amber-soft);
  --card: #ffffff;
  --card-soft: #f5f0e0;
  --text: #0a0a0a;
  --ink: #0a0a0a;
  --muted: #5f5f5f;
  --border: #e5e5e5;
  --line: #e5e5e5;
  --accent: #1a3a3a;
  --accent-dark: #0a0a0a;
  --accent-strong: #1a3a3a;
  --accent2: #b8a4ed;
  --soft: #f5f0e0;
  --blue-soft: #dcefe8;
  --green: #1a3a3a;
  --green-soft: #dff1eb;
  --good: #1a3a3a;
  --red: #b42318;
  --red-soft: #fff2f1;
  --red-line: color-mix(in srgb, var(--red) 36%, transparent);
  --bad: #b42318;
  --amber: #e8b94a;
  --amber-soft: #fff0bd;
  --warn: #fff0bd;
  --warnline: #e8b94a;
  --radius: 12px;
  --radius-panel: 16px;
  --shadow: none;
  color-scheme: light;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0;
}

body::selection {
  background: #b8a4ed;
  color: var(--text);
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid rgba(26, 58, 58, 0.32) !important;
  outline-offset: 3px;
}

img,
iframe,
embed,
object,
video {
  max-width: 100%;
}

header,
.site-hero,
.site-header,
.simple-header {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

main {
  background: var(--bg) !important;
}

h1,
h2,
h3,
.page-title,
.section-title,
.question,
.file-title,
.tile h2,
.panel h2,
.card h2,
.card h3 {
  color: var(--text) !important;
  letter-spacing: 0;
}

.page-title,
.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4rem);
}

.section-title,
.simple-header .page-title,
.disclaimer-modal h2 {
  font-size: 2rem;
}

.sub,
.page-intro,
.section-subtitle,
.muted,
.meta,
.file-meta,
.file-note,
.slide-page-indicator,
.footer-note,
.source,
.smalllink,
.loc,
label.small,
.empty,
.empty-results,
.card p,
.tile p,
.about-box p,
.source-card p,
.panel p {
  color: var(--muted) !important;
}

.panel,
.quiz-card,
.summary,
.miss,
.stat,
.card,
.quick-card,
.about-box,
.file-card,
.empty-card,
.tile,
.source-card,
.disclaimer-box,
.call-picker,
.active-checklist,
.doc-priority,
.doc-checklist-panel,
.doc-standard,
.sample-documentation,
.reportbox,
.report-box {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

.hero-panel,
.hero-panel div,
.option,
.choice,
.drugBtn,
.big-check,
.call-type-button,
.doc-check-grid label,
.competency-row,
.slide-preview,
.slide-placeholder,
.disclaimer-agreement {
  background: var(--surface-raised) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
}

.slide-preview img {
  content-visibility: auto;
  contain-intrinsic-size: 720px 540px;
}

button,
input,
select,
textarea {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted) !important;
}

.button,
.card-button,
.primary,
.source-link,
.btn.blue,
.btn.dark,
.filter-tab.active,
.disclaimer-accept-button,
.info-button,
.form-actions .info-button,
.not-found-links .info-button,
#checkBtn,
#restartBtn,
#sendReportBtn {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  color: #ffffff !important;
}

.button *,
.card-button *,
.primary *,
.source-link *,
.btn.blue *,
.btn.dark *,
.filter-tab.active *,
.disclaimer-accept-button *,
.info-button * {
  color: inherit !important;
}

.button.secondary,
.button.white,
.source-link.secondary,
.small-link,
.smalllink,
.btn,
.btn.ghost,
.topbar-button,
.back,
.back-link,
a.btn.ghost[href="../"],
a.btn.ghost[href="../index.html"],
#prevBtn,
#nextBtn,
#finishBtn,
#reportBtn,
#copySourceBtn,
#slidePrevBtn,
#slideNextBtn {
  background: var(--surface-raised) !important;
  border-color: var(--border) !important;
  color: var(--accent) !important;
}

.back,
.back-link,
a.btn.ghost[href="../"],
a.btn.ghost[href="../index.html"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  width: fit-content !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  padding: 10px 13px !important;
  text-decoration: none !important;
  white-space: normal !important;
}

.back::before,
.back-link::before,
a.btn.ghost[href="../"]::before,
a.btn.ghost[href="../index.html"]::before {
  content: "\2039";
  display: inline-block;
  font-size: 1.25em;
  line-height: 0.75;
}

.file-card:hover,
.tile:hover,
.quick-card:hover,
.module-card:hover,
.drugBtn:hover,
.option:hover,
.choice:hover,
.back:hover,
.back-link:hover,
.small-link:hover,
.smalllink:hover,
.btn:hover,
.topbar-button:hover,
.button:hover,
.card-button:hover {
  border-color: var(--accent) !important;
  text-decoration: none !important;
}

:where(
  .button,
  .card-button,
  .primary,
  .source-link,
  .btn,
  .topbar-button,
  .back,
  .back-link,
  .small-link,
  .smalllink,
  .module-item,
  .module-tool,
  .file-card,
  .tile,
  .quick-card,
  .module-filter,
  .filter-tab,
  .option,
  .choice,
  .drugBtn,
  .call-type-button,
  .big-check,
  .resource-links a,
  .focus-actions a
),
:where(
  .button,
  .card-button,
  .primary,
  .source-link,
  .btn,
  .topbar-button,
  .back,
  .back-link,
  .small-link,
  .smalllink,
  .module-item,
  .module-tool,
  .file-card,
  .tile,
  .quick-card,
  .module-filter,
  .filter-tab,
  .option,
  .choice,
  .drugBtn,
  .call-type-button,
  .big-check,
  .resource-links a,
  .focus-actions a
):hover,
:where(
  .button,
  .card-button,
  .primary,
  .source-link,
  .btn,
  .topbar-button,
  .back,
  .back-link,
  .small-link,
  .smalllink,
  .module-item,
  .module-tool,
  .file-card,
  .tile,
  .quick-card,
  .module-filter,
  .filter-tab,
  .option,
  .choice,
  .drugBtn,
  .call-type-button,
  .big-check,
  .resource-links a,
  .focus-actions a
):focus-visible,
:where(
  .module-filter.active,
  .filter-tab.active,
  .option.selected,
  .choice.selected,
  .option:has(input:checked),
  .choice:has(input:checked),
  .drugBtn.active,
  .call-type-button.active,
  .big-check:has(input:checked)
) {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

:where(
  .button,
  .card-button,
  .primary,
  .source-link,
  .btn,
  .topbar-button,
  .back,
  .back-link,
  .small-link,
  .smalllink,
  .module-item,
  .module-tool,
  .file-card,
  .tile,
  .quick-card,
  .module-filter,
  .filter-tab,
  .option,
  .choice,
  .drugBtn,
  .call-type-button,
  .big-check,
  .resource-links a,
  .focus-actions a
) * {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.tag,
.status,
.pill {
  background: var(--surface-raised) !important;
  border-color: var(--border) !important;
  border-radius: 999px !important;
  color: var(--accent) !important;
}

.status.complete,
.num.done,
.choice.correct,
.option.correct,
.feedback.good,
.big-check:has(input:checked) {
  background: var(--green-soft) !important;
  border-color: #a4d4c5 !important;
  color: var(--good) !important;
}

.status.current,
.status.soon,
.status.coming {
  background: var(--surface-current) !important;
  border-color: #ff4d8b !important;
  color: #9f1748 !important;
}

.choice.wrong,
.choice.incorrect,
.option.incorrect,
.feedback.bad,
.num.miss,
.jump-grid button.missed,
.danger,
.btn.danger,
#resetBtn {
  background: var(--red-soft) !important;
  border-color: var(--red-line) !important;
  color: var(--bad) !important;
}

.notice,
.student-warning,
.source-note,
.disclaimer-warning,
.audit-strip {
  background: var(--amber-soft) !important;
  border: 1px solid var(--warnline) !important;
  border-radius: var(--radius) !important;
  color: #4a3200 !important;
}

.choice,
.option {
  overflow: hidden !important;
  padding: 0 !important;
}

.option .letter,
.choice .letter {
  min-width: 42px !important;
  width: 42px !important;
  min-height: 52px !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: var(--surface-raised) !important;
  color: var(--accent) !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.option.selected,
.choice.selected,
.option:has(input:checked),
.choice:has(input:checked) {
  background: #efe7ff !important;
  border-color: #b8a4ed !important;
  box-shadow: 0 0 0 3px rgba(184, 164, 237, 0.24) !important;
  color: var(--text) !important;
}

.option.selected .letter,
.choice.selected .letter,
.option:has(input:checked) .letter,
.choice:has(input:checked) .letter,
.jump-grid button.current,
.num.active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
}

.choice.correct .letter,
.option.correct .letter {
  background: var(--accent) !important;
  border-right-color: var(--accent) !important;
  color: #ffffff !important;
}

.choice.wrong .letter,
.choice.incorrect .letter,
.option.incorrect .letter {
  background: #9f1748 !important;
  border-right-color: #9f1748 !important;
  color: #ffffff !important;
}

.progress,
.progress-wrap {
  background: var(--surface-raised) !important;
}

.bar,
#bar {
  background: var(--accent) !important;
  transition: none !important;
}

.star-btn,
.star {
  background: var(--amber-soft) !important;
  border-color: var(--warnline) !important;
  color: #4a3200 !important;
}

.star-btn.starred,
.star.on {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
}

.ecg-strip {
  background: #ffffff !important;
}

.floating-disclaimer-button {
  background: rgba(255, 250, 240, 0.96) !important;
  border-color: var(--border) !important;
  color: var(--accent) !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid,
  .quick-grid,
  .module-toolbar,
  .documentation-tools,
  .documentation-summary,
  .documentation-grid,
  .doc-check-grid,
  .call-checker,
  .competency-list,
  .controls,
  .study-layout,
  .hero,
  .statgrid,
  .layout,
  .twocol,
  .testgrid,
  .stats {
    grid-template-columns: 1fr !important;
  }

  .source-card,
  .call-picker {
    position: static !important;
  }
}

@media (max-width: 700px) {
  .container,
  .wrap,
  main {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .hub-topbar,
  .topbar-actions,
  .button-row,
  nav,
  .actions,
  .row,
  .meta,
  .meta-left,
  .meta-right,
  .cardTitle,
  .checklist-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .back,
  .back-link,
  a.btn.ghost[href="../"],
  a.btn.ghost[href="../index.html"],
  .small-link,
  .smalllink,
  .btn,
  .button,
  .card-button,
  .source-link,
  .topbar-button {
    width: 100% !important;
  }

  .source-actions,
  .nav {
    grid-template-columns: 1fr !important;
  }

  .option,
  .choice {
    min-width: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Study Launchpad redesign for shared/static pages. */
:root {
  --bg: #f4f7fb;
  --surface: #eaf0fb;
  --surface-raised: #eef3fb;
  --surface-current: #c6f432;
  --card: #ffffff;
  --card-soft: #eaf0fb;
  --text: #111827;
  --ink: #111827;
  --muted: #5b6575;
  --border: #d7deea;
  --line: #d7deea;
  --accent: #2457f5;
  --accent-dark: #111827;
  --accent-strong: #2457f5;
  --accent2: #6c5ce7;
  --soft: #eaf0fb;
  --blue-soft: #e8eeff;
  --green: #147a55;
  --green-soft: #dcfce7;
  --good: #147a55;
  --red: #c53030;
  --red-soft: #fff2f1;
  --bad: #c53030;
  --amber: #c6f432;
  --amber-soft: #efffc2;
  --warn: #efffc2;
  --warnline: #9ac515;
  --radius: 12px;
  --radius-panel: 16px;
  --shadow: 0 14px 32px rgba(17, 24, 39, 0.1);
}

html,
body {
  background: var(--bg) !important;
}

body {
  color: var(--text) !important;
  font-family: Aptos, "Segoe UI", Arial, system-ui, sans-serif !important;
}

header,
.site-hero,
.site-header,
.simple-header {
  background: #ffffff !important;
  border-color: var(--border) !important;
}

h1,
h2,
h3,
.page-title,
.section-title,
.question,
.file-title,
.tile h2,
.panel h2,
.card h2,
.card h3 {
  font-family: "Aptos Display", Aptos, "Segoe UI", Arial, system-ui, sans-serif !important;
  font-weight: 850 !important;
}

.eyebrow,
.hero-kicker,
.section-kicker,
.info-kicker,
.module-kicker,
.module-section-kicker,
.module-tool-type,
.disclaimer-modal-badge,
.not-found-code {
  display: none !important;
}

.panel,
.quiz-card,
.summary,
.miss,
.stat,
.card,
.quick-card,
.about-box,
.file-card,
.empty-card,
.tile,
.source-card,
.disclaimer-box,
.call-picker,
.active-checklist,
.doc-priority,
.doc-checklist-panel,
.doc-standard,
.sample-documentation,
.reportbox,
.report-box {
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

.tile:hover,
.file-card:hover,
.quick-card:hover,
.source-card:hover,
.panel:hover {
  box-shadow: var(--shadow) !important;
}

.hero-panel,
.hero-panel div,
.option,
.choice,
.drugBtn,
.big-check,
.call-type-button,
.doc-check-grid label,
.competency-row,
.slide-preview,
.slide-placeholder,
.disclaimer-agreement {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
}

.button,
.card-button,
.primary,
.source-link,
.btn.blue,
.btn.dark,
.filter-tab.active,
.disclaimer-accept-button,
.info-button,
.form-actions .info-button,
.not-found-links .info-button,
#checkBtn,
#restartBtn,
#sendReportBtn {
  background: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  color: #ffffff !important;
  border-radius: var(--radius) !important;
}

.button.secondary,
.button.white,
.source-link.secondary,
.small-link,
.smalllink,
.btn,
.btn.ghost,
.topbar-button,
.back,
.back-link,
a.btn.ghost[href="../"],
a.btn.ghost[href="../index.html"],
#prevBtn,
#nextBtn,
#finishBtn,
#reportBtn,
#copySourceBtn,
#slidePrevBtn,
#slideNextBtn {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: #1236a3 !important;
  border-radius: var(--radius) !important;
}

.option.selected,
.choice.selected,
.active-checklist,
[aria-current="page"] {
  background: var(--amber-soft) !important;
  border-color: var(--warnline) !important;
  color: var(--text) !important;
}

.correct,
.option.correct,
.choice.correct,
.good {
  background: var(--green-soft) !important;
  border-color: var(--good) !important;
  color: var(--good) !important;
}

.incorrect,
.option.incorrect,
.choice.incorrect,
.bad {
  background: var(--red-soft) !important;
  border-color: var(--bad) !important;
  color: var(--bad) !important;
}

.page-title,
.hero h1 {
  font-size: 4rem !important;
}

.simple-header .page-title,
.section-title,
.disclaimer-modal h2 {
  font-size: 2.2rem !important;
}

:focus-visible {
  outline: 3px solid rgba(36, 87, 245, 0.35) !important;
}

@media (max-width: 760px) {
  .page-title,
  .hero h1 {
    font-size: 2.55rem !important;
  }

  .simple-header .page-title,
  .section-title,
  .disclaimer-modal h2 {
    font-size: 1.8rem !important;
  }
}
