:root {
  --ink: #273d44;
  --muted: #597d87;
  --line: #d8cfc5;
  --panel: #ffffff;
  --soft: #eae6ef;
  --page: #f7f6f4;
  --brand-primary: #273d44;
  --brand-secondary: #375357;
  --brand-blue: #597d87;
  --brand-accent: #d8cfc5;
  --danger: #a33e35;
  --ok: #2f7b53;
  --focus: rgba(89, 125, 135, 0.48);
  --shadow: rgba(39, 61, 68, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.brand-home {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-home:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-secondary);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-logo {
  width: 150px;
  height: 42px;
  object-fit: contain;
}

.admin-link {
  margin-left: auto;
  color: var(--brand-secondary);
  text-decoration: none;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.utility-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--brand-primary);
  background: white;
  font-weight: 800;
  text-decoration: none;
}

.utility-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 32px;
  padding: 56px clamp(20px, 6vw, 88px);
  background: linear-gradient(90deg, rgba(39, 61, 68, 0.88), rgba(55, 83, 87, 0.64), rgba(89, 125, 135, 0.34));
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  right: clamp(28px, 9vw, 112px);
  top: 50%;
  width: clamp(260px, 36vw, 520px);
  height: clamp(160px, 22vw, 320px);
  background: url("/assets/alteas-ah-mark.png") center / contain no-repeat;
  opacity: 0.18;
  transform: translateY(-50%);
  filter: brightness(0) invert(1);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  color: white;
  max-width: 780px;
}

.hero-logo {
  width: 150px;
  height: auto;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 12px;
  color: var(--brand-accent);
}

.hero h1 {
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1.02;
  margin: 10px 0 22px;
  letter-spacing: 0;
}

.lede {
  font-size: 19px;
  max-width: 720px;
  line-height: 1.6;
}

.signin-panel,
.admin-controls,
.lesson-card,
.quiz-card,
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px var(--shadow);
}

.signin-panel {
  padding: 24px;
}

label {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-weight: 700;
  color: var(--brand-primary);
}

input {
  width: 100%;
  border: 1px solid var(--brand-accent);
  border-radius: 6px;
  padding: 12px 13px;
  min-height: 44px;
}

.form-error {
  margin: 10px 0 14px;
  color: #8f2f24;
  font-weight: 800;
}

select {
  width: 100%;
  border: 1px solid var(--brand-accent);
  border-radius: 6px;
  padding: 12px 13px;
  min-height: 44px;
  background: white;
}

button,
.secondary {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 11px 16px;
  background: var(--brand-primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.secondary {
  background: var(--soft);
  color: var(--brand-primary);
}

.course-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.side-nav {
  position: sticky;
  top: 88px;
  align-self: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
}

.side-brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.side-brand img {
  width: 112px;
  height: auto;
  flex: 0 0 auto;
}

.side-brand span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.side-nav button {
  width: 100%;
  margin: 5px 0;
  background: transparent;
  color: var(--ink);
  justify-content: space-between;
  text-align: left;
  border: 1px solid transparent;
  gap: 10px;
}

.side-nav button span {
  min-width: 0;
}

.side-nav button em {
  color: var(--ok);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.side-nav button.active {
  border-color: var(--brand-blue);
  background: var(--soft);
}

.progress {
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-secondary);
}

.lesson-card,
.quiz-card,
.course-overview {
  padding: clamp(20px, 4vw, 44px);
  max-width: 1080px;
}

.lesson-card h1,
.quiz-card h1,
.course-overview h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  margin-top: 0;
}

.course-hero,
.lesson-hero,
.quiz-intro {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(39, 61, 68, 0.98), rgba(55, 83, 87, 0.88), rgba(89, 125, 135, 0.76));
  background-size: cover;
  background-position: center;
  color: white;
  padding: clamp(26px, 5vw, 56px);
  margin-bottom: 26px;
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(39, 61, 68, 0.98), rgba(55, 83, 87, 0.88), rgba(89, 125, 135, 0.72));
}

.course-home-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, rgba(39, 61, 68, 0.98), rgba(55, 83, 87, 0.88), rgba(89, 125, 135, 0.72));
}

.catalog-hero > *:not(.catalog-hero-mark),
.course-home-hero > *:not(.course-hero-mark),
.lesson-hero > *,
.quiz-intro > * {
  position: relative;
  z-index: 1;
}

.lesson-hero::after,
.quiz-intro::after {
  content: "";
  position: absolute;
  right: clamp(24px, 8vw, 96px);
  top: 50%;
  width: clamp(220px, 30vw, 410px);
  height: clamp(135px, 18vw, 252px);
  background: url("/assets/alteas-ah-mark.png") center / contain no-repeat;
  opacity: 0.2;
  transform: translateY(-50%);
  filter: brightness(0) invert(1);
  pointer-events: none;
  z-index: 0;
}

.course-hero-mark {
  position: absolute;
  right: clamp(24px, 8vw, 96px);
  top: 50%;
  width: clamp(220px, 30vw, 410px);
  max-height: 72%;
  object-fit: contain;
  opacity: 0.2;
  transform: translateY(-50%);
  filter: brightness(0) invert(1);
  pointer-events: none;
  z-index: 0;
}

.catalog-hero-mark {
  position: absolute;
  right: clamp(24px, 8vw, 96px);
  top: 50%;
  color: rgba(255, 255, 255, 0.2);
  font-size: clamp(110px, 18vw, 260px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.8;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.course-hero p,
.lesson-hero p,
.quiz-intro p {
  max-width: 780px;
  font-size: 18px;
  line-height: 1.6;
}

.overview-stats,
.quiz-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.overview-stats span,
.quiz-readiness span {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 9px 14px;
}

.toc-section {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.division-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}

.division-card {
  position: relative;
  display: block;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--brand-primary);
  color: white;
  text-decoration: none;
  box-shadow: 0 16px 36px var(--shadow);
}

.division-card img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.division-card:hover img {
  transform: scale(1.025);
}

.division-card.active {
  border-color: var(--brand-accent);
  box-shadow: 0 18px 42px rgba(39, 61, 68, 0.2);
}

.division-card:focus-visible {
  outline: 4px solid rgba(216, 207, 197, 0.82);
  outline-offset: 4px;
}

.division-overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 8px;
  padding: 22px;
  background: linear-gradient(0deg, rgba(39, 61, 68, 0.96), rgba(39, 61, 68, 0.68), rgba(39, 61, 68, 0));
}

.division-overlay em {
  justify-self: start;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.division-overlay strong {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.division-overlay small {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  line-height: 1.45;
}

.division-section {
  margin-top: 22px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 4px 0 0;
}

.lesson-media img {
  width: 100%;
  display: block;
  object-fit: contain;
  background: var(--page);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.module-card {
  position: relative;
  min-height: 180px;
  display: grid;
  align-content: start;
  justify-items: start;
  text-align: left;
  gap: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(39, 61, 68, 0.08);
}

.catalog-card {
  text-decoration: none;
}

.module-card:hover {
  border-color: var(--brand-blue);
}

.module-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-blue);
  color: white;
  font-weight: 900;
}

.module-card small {
  color: var(--muted);
  line-height: 1.4;
}

.status-pill {
  margin-top: auto;
  border-radius: 999px;
  background: #e8f5ed;
  color: var(--ok);
  padding: 5px 10px;
  font-size: 12px;
  font-style: normal;
}

.status-pill.muted {
  background: var(--soft);
  color: var(--muted);
}

.lesson-section {
  margin: 30px 0;
}

.dashboard-demo {
  margin: 0 0 34px;
  overflow: hidden;
  border: 1px solid #cfdadd;
  border-radius: 10px;
  background: #f3f6f7;
  box-shadow: 0 18px 44px rgba(39, 61, 68, 0.13);
}

.dashboard-demo-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #273d44, #3f626a 72%, #597d87);
  color: white;
}

.dashboard-demo-header > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.dashboard-demo-header h2 {
  margin: 10px 0 8px;
  color: white;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.dashboard-demo-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.demo-data-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-demo-brand {
  align-self: center;
  color: rgba(255, 255, 255, 0.13);
  font-size: 96px;
  font-weight: 950;
  line-height: 0.8;
}

.dashboard-demo-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-bottom: 1px solid #d5e0e2;
  background: #eaf1f2;
}

.dashboard-demo-guide div {
  display: grid;
  gap: 3px;
}

.dashboard-demo-guide span {
  color: #597d87;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-demo-guide strong {
  color: #273d44;
  font-size: 14px;
  line-height: 1.45;
}

.dashboard-demo-guide button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
}

.dashboard-demo-filters {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 0.95fr 1.5fr;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #d5e0e2;
  background: #ffffff;
}

.dashboard-demo-filters label {
  display: grid;
  gap: 6px;
  color: #5a6c72;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-demo-filters select,
.dashboard-demo-filters input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cbd8db;
  border-radius: 6px;
  background: #f8fafb;
  color: #273d44;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.dashboard-demo-filters select:focus,
.dashboard-demo-filters input:focus {
  outline: 3px solid rgba(89, 125, 135, 0.22);
  border-color: #597d87;
}

.dashboard-demo-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 20px 22px;
}

.dashboard-metric {
  display: grid;
  align-content: start;
  min-height: 166px;
  padding: 16px;
  border: 1px solid #d5e0e2;
  border-radius: 8px;
  background: white;
  color: #273d44;
  text-align: left;
  box-shadow: 0 8px 20px rgba(39, 61, 68, 0.07);
}

.dashboard-metric:hover,
.dashboard-metric.active {
  transform: translateY(-1px);
  border-color: #597d87;
  box-shadow: 0 0 0 3px rgba(89, 125, 135, 0.15), 0 12px 24px rgba(39, 61, 68, 0.1);
}

.dashboard-metric span {
  color: #5f747a;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.dashboard-metric strong {
  margin: 10px 0 8px;
  color: #273d44;
  font-size: 34px;
  line-height: 1;
}

.dashboard-metric small {
  color: #63747a;
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-metric em {
  align-self: end;
  margin-top: 11px;
  color: #597d87;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.dashboard-chart-card,
.dashboard-table-card {
  margin: 0 22px 20px;
  overflow: hidden;
  border: 1px solid #d5e0e2;
  border-radius: 8px;
  background: white;
}

.dashboard-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e9ea;
}

.dashboard-table-heading h3 {
  margin: 2px 0 0;
  color: #273d44;
}

.dashboard-table-heading p {
  margin: 0;
}

.dashboard-table-heading > span {
  color: #63747a;
  font-size: 12px;
  text-align: right;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dashboard-bar-item {
  display: grid;
  grid-template-columns: 140px 1fr 54px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #273d44;
  text-align: left;
}

.dashboard-bar-item:hover {
  background: #f1f5f6;
}

.dashboard-bar-item span {
  font-size: 12px;
  font-weight: 800;
}

.dashboard-bar-item i {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2eaec;
}

.dashboard-bar-item b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #597d87, #6c9990);
}

.dashboard-bar-item strong {
  color: #273d44;
  font-size: 13px;
  text-align: right;
}

.dashboard-table-scroll {
  overflow-x: auto;
}

.dashboard-table-card table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.dashboard-table-card th,
.dashboard-table-card td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6ecee;
  color: #3f5157;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.dashboard-table-card th {
  position: sticky;
  top: 0;
  background: #edf3f4;
  color: #52666c;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-table-card tbody tr:hover {
  background: #f7f9fa;
}

.dashboard-row-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f6f7c;
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-empty {
  padding: 28px !important;
  color: #63747a !important;
  text-align: center !important;
}

.dashboard-resident-detail {
  margin: 0 22px 20px;
  padding: 20px;
  border: 1px solid #cddbdd;
  border-left: 6px solid #597d87;
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-detail-heading > span,
.dashboard-resident-detail > div > span {
  color: #597d87;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-detail-heading h3,
.dashboard-resident-detail > div > h3 {
  margin: 5px 0 7px;
  color: #273d44;
}

.dashboard-detail-heading p,
.dashboard-resident-detail > div > p {
  margin: 0;
  color: #5d7076;
  line-height: 1.5;
}

.dashboard-resident-detail dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.dashboard-resident-detail dl div {
  padding: 11px 12px;
  border-radius: 6px;
  background: #f1f5f6;
}

.dashboard-resident-detail dt {
  color: #6a7b80;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-resident-detail dd {
  margin: 5px 0 0;
  color: #273d44;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.dashboard-diagnosis-panel,
.dashboard-timeline {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dce5e7;
}

.dashboard-diagnosis-panel > strong,
.dashboard-timeline > strong {
  color: #273d44;
}

.diagnosis-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.diagnosis-codes span {
  padding: 5px 8px;
  border-radius: 5px;
  background: #273d44;
  color: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.dashboard-diagnosis-panel ul,
.dashboard-timeline ol {
  margin-bottom: 0;
  padding-left: 20px;
}

.dashboard-diagnosis-panel li,
.dashboard-timeline li {
  margin: 7px 0;
  color: #4f6268;
  line-height: 1.45;
}

.dashboard-timeline li span {
  display: inline-block;
  min-width: 96px;
  color: #597d87;
  font-weight: 900;
}

.dashboard-demo-footer {
  padding: 15px 22px;
  border-top: 1px solid #d5e0e2;
  background: #eaf1f2;
  color: #4f6268;
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-demo-footer strong {
  color: #273d44;
}

.lesson-media {
  margin: 0 0 28px;
}

.lesson-media img {
  max-height: 460px;
}

.lesson-media-portrait {
  display: grid;
  justify-items: center;
}

.lesson-media-portrait img {
  width: min(100%, 720px);
  max-height: 760px;
  background: #eef3f6;
}

.lesson-media-wide img {
  width: 100%;
  aspect-ratio: 5 / 3;
  max-height: none;
  object-fit: cover;
}

.lesson-media-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: none;
  object-fit: cover;
}

.lesson-media-clinical-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.lesson-media-feature img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: none;
  object-fit: cover;
  object-position: center 42%;
}

.lesson-photo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lesson-photo-card-grid.is-selectable {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.symptom-photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  box-shadow: 0 8px 18px rgba(39, 61, 68, 0.07);
}

.photo-card-button {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.photo-card-button.active,
.photo-card-button:focus-visible {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(89, 125, 135, 0.18), 0 12px 24px rgba(39, 61, 68, 0.12);
  outline: none;
}

.symptom-photo-card img {
  width: 100%;
  height: 152px;
  max-height: none;
  display: block;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.lesson-photo-card-grid.is-selectable .symptom-photo-card img {
  height: 290px;
  padding: 8px;
  object-fit: contain;
}

.lesson-photo-card-grid.fit-cover .symptom-photo-card img {
  padding: 0;
  object-fit: cover;
}

.lesson-photo-card-grid.fit-cover .symptom-photo-card.fit-contain img {
  padding: 8px;
  object-fit: contain;
}

.symptom-photo-card div {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.symptom-photo-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.symptom-photo-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.photo-card-detail {
  margin: 14px;
  padding: 16px 18px;
  border-left: 5px solid var(--brand-primary);
  border-radius: 8px;
  background: var(--soft);
}

.photo-card-detail strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.photo-card-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal-open {
  overflow: hidden;
}

.photo-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.photo-card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(39, 61, 68, 0.72);
}

.photo-card-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 94vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 24, 29, 0.36);
}

.photo-card-modal-dialog img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  background: #ffffff;
  border: 0;
  border-radius: 8px 8px 0 0;
}

.photo-card-modal-dialog div {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line);
}

.photo-card-modal-dialog strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 22px;
}

.photo-card-modal-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.photo-card-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 9px 12px;
  border: 1px solid rgba(39, 61, 68, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(39, 61, 68, 0.16);
}

.lesson-media-infographic img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.lesson-video {
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--brand-primary);
}

.lesson-video-stack {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.lesson-video-stack .lesson-video {
  margin-top: 0;
}

.lesson-video-card {
  display: grid;
  gap: 8px;
}

.lesson-video iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.lesson-video-caption {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lesson-media figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.objectives,
.bullet-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.objectives li,
.bullet-list li {
  border-left: 5px solid var(--brand-blue);
  background: var(--soft);
  padding: 12px 14px;
}

.cards,
.accordion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.flip-card,
.info-block,
.question-card,
.knowledge-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  min-height: 140px;
}

.flip-card {
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  align-items: start;
  justify-content: start;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(39, 61, 68, 0.08);
}

.flip-card strong {
  display: block;
  color: var(--brand-secondary);
  margin-bottom: 10px;
}

.info-block {
  min-height: 0;
}

.info-block summary {
  cursor: pointer;
  color: var(--brand-secondary);
  font-weight: 900;
}

.checklist-band {
  background: var(--soft);
  border-radius: 8px;
  padding: 20px;
}

.trigger-panel {
  border: 1px solid var(--brand-accent);
  background: #f7f2ed;
  border-radius: 8px;
  padding: 20px;
}

.trigger-panel ol {
  columns: 2;
  padding-left: 22px;
  line-height: 1.8;
}

.step-grid,
.resource-grid,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.step-card,
.resource-card,
.scenario-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  min-height: 160px;
  box-shadow: 0 10px 24px rgba(39, 61, 68, 0.08);
}

.resource-panel {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.resource-card {
  display: grid;
  gap: 8px;
  min-height: 0;
  color: inherit;
  text-decoration: none;
}

.resource-card:hover {
  border-color: var(--brand-blue);
}

.resource-card strong {
  color: var(--brand-secondary);
}

.resource-card span {
  color: var(--muted);
  line-height: 1.45;
}

.step-card span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: var(--brand-blue);
  color: white;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

.step-card h3,
.scenario-card strong {
  display: block;
  color: var(--brand-secondary);
}

.scenario-panel {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.scenario-card div {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.scenario-card button {
  width: 100%;
  justify-content: flex-start;
  background: var(--soft);
  color: var(--brand-primary);
}

.scenario-card button.selected {
  background: var(--brand-primary);
  color: white;
}

.scenario-card.correct {
  border-color: rgba(47, 123, 83, 0.55);
}

.scenario-card.incorrect {
  border-color: rgba(163, 62, 53, 0.6);
}

.scenario-result {
  margin-bottom: 0;
  font-weight: 800;
}

.lesson-actions,
.quiz-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.knowledge-panel {
  background: #fbfaf8;
  margin-top: 28px;
}

.question-card {
  margin: 18px 0;
  box-shadow: 0 10px 24px rgba(39, 61, 68, 0.08);
}

.question-card.correct {
  border-color: rgba(47, 123, 83, 0.55);
}

.question-card.incorrect {
  border-color: rgba(163, 62, 53, 0.6);
}

.question-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.choice,
.choice-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
}

.choice-card {
  min-height: 56px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}

.choice:hover,
.choice-card:hover {
  background: var(--soft);
}

.choice-card input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--brand-primary);
}

.choice-label {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--brand-primary);
  font-weight: 900;
}

.choice-text {
  min-width: 0;
  line-height: 1.35;
}

.explanation {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.result {
  padding: 16px;
  border-radius: 8px;
  margin-top: 18px;
  font-weight: 800;
}

.result.pass {
  color: var(--ok);
  background: #e8f5ed;
}

.result.fail {
  color: var(--danger);
  background: #f9e9e7;
}

.training-disclaimer {
  margin: 16px 0 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-page {
  padding: 24px;
}

.admin-controls {
  padding: 20px;
  margin-bottom: 18px;
}

#pin-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.report-summary article,
.user-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px var(--shadow);
}

.report-summary article {
  padding: 16px;
}

.report-summary strong {
  display: block;
  color: var(--brand-primary);
  font-size: 26px;
  line-height: 1;
}

.report-summary span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.report-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.report-tab {
  background: var(--soft);
  color: var(--brand-primary);
}

.report-tab.active {
  background: var(--brand-primary);
  color: white;
}

.admin-panel {
  margin-bottom: 18px;
}

.admin-hidden {
  display: none;
}

.admin-empty {
  margin: 0;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-card {
  padding: 18px;
  margin-bottom: 14px;
}

.user-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.user-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.user-card p {
  margin: 5px 0 0;
  color: var(--muted);
}

.user-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.user-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfaf8;
}

.user-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-meta dd {
  margin: 3px 0 0;
  font-weight: 800;
}

.learner-course-list {
  display: grid;
  gap: 8px;
}

.learner-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.learner-course strong,
.learner-course span {
  display: block;
}

.learner-course span,
.learner-course em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.learner-course a {
  color: var(--brand-secondary);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.certificates-page {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.certificates-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(39, 61, 68, 0.98), rgba(55, 83, 87, 0.88), rgba(89, 125, 135, 0.74));
  color: white;
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 18px;
}

.certificates-hero::after {
  content: "AH";
  position: absolute;
  right: clamp(20px, 8vw, 96px);
  top: 50%;
  color: rgba(255, 255, 255, 0.18);
  font-size: clamp(120px, 18vw, 250px);
  font-weight: 900;
  line-height: 0.8;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.certificates-hero > * {
  position: relative;
  z-index: 1;
}

.certificates-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
}

.certificates-hero p {
  max-width: 680px;
  line-height: 1.6;
}

.certificates-panel,
.certificate-card,
.certificate-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 45px var(--shadow);
}

.certificates-panel {
  padding: 20px;
  margin-bottom: 20px;
}

.certificate-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.certificate-lookup-form label {
  margin: 0;
}

.certificate-results {
  display: grid;
  gap: 14px;
}

.certificate-list {
  display: grid;
  gap: 10px;
}

.certificate-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.certificate-card strong,
.certificate-card span,
.certificate-card small {
  display: block;
}

.certificate-card strong {
  font-size: 18px;
}

.certificate-card span,
.certificate-card small {
  margin-top: 5px;
  color: var(--muted);
}

.certificate-card a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 9px 13px;
  background: var(--brand-primary);
  color: white;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.certificate-empty {
  padding: 18px;
}

.certificate-empty h2 {
  margin: 0 0 8px;
}

.certificate-empty p {
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  white-space: nowrap;
}

th {
  background: var(--soft);
}

.certificate-page {
  background: #f2f2ef;
}

.certificate {
  max-width: 1000px;
  margin: 40px auto 16px;
  background: white;
  padding: 18px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.12);
}

.certificate-border {
  border: 8px double var(--brand-primary);
  min-height: 650px;
  text-align: center;
  padding: 70px 60px;
}

.cert-logo {
  display: block;
  width: 170px;
  height: auto;
  margin: 0 auto;
}

.certificate h1 {
  font-size: 50px;
  margin: 8px 0 30px;
}

.certificate h2 {
  font-size: 44px;
  border-bottom: 1px solid var(--line);
  display: inline-block;
  padding: 0 40px 12px;
}

.cert-credentials {
  color: var(--muted);
  font-weight: 800;
  margin: -10px auto 24px;
  max-width: 760px;
}

.certificate h3 {
  font-size: 24px;
  max-width: 760px;
  margin: 18px auto 34px;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.cert-grid span,
.cert-grid strong {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.print-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.print-actions a {
  color: var(--brand-secondary);
  font-weight: 800;
  align-self: center;
}

.fine-print {
  color: var(--muted);
  margin-top: 32px;
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.5;
}

@media (max-width: 850px) {
  .hero,
  .course-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
  }

  .division-picker {
    grid-template-columns: 1fr;
  }

  .division-card,
  .division-card img {
    min-height: 230px;
  }

  .trigger-panel ol {
    columns: 1;
  }

  .lesson-photo-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-demo-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-demo-header {
    padding: 22px;
  }

  .dashboard-demo-brand {
    display: none;
  }

  .report-summary,
  .user-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learner-course {
    align-items: flex-start;
    flex-direction: column;
  }

  .certificate-lookup-form,
  .certificate-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .certificate-card {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    margin-left: 0;
    width: 100%;
  }

  .utility-link {
    width: 100%;
  }

  .certificates-page {
    width: min(100% - 24px, 1080px);
    padding-top: 18px;
  }

  .report-summary,
  .user-meta {
    grid-template-columns: 1fr;
  }

  .report-tabs {
    flex-direction: column;
  }

  .dashboard-demo-guide,
  .dashboard-table-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-demo-filters {
    grid-template-columns: 1fr;
  }

  .dashboard-demo-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-card,
  .dashboard-table-card,
  .dashboard-resident-detail {
    margin-right: 12px;
    margin-left: 12px;
  }

  .dashboard-bar-item {
    grid-template-columns: 94px 1fr 44px;
    gap: 8px;
  }

  .lesson-photo-card-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .symptom-photo-card img {
    height: 160px;
  }

  .lesson-photo-card-grid.is-selectable .symptom-photo-card img {
    height: 220px;
  }

  .photo-card-modal {
    padding: 12px;
  }

  .photo-card-modal-dialog {
    width: 96vw;
    max-height: 90vh;
  }

  .photo-card-modal-dialog img {
    max-height: 58vh;
  }

  .photo-card-modal-dialog div {
    padding: 15px;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.25in;
  }

  html,
  body,
  .certificate-page {
    width: 8in;
    min-height: 10.5in;
    margin: 0;
    background: white;
  }

  .print-actions,
  .topbar {
    display: none;
  }

  .certificate {
    box-sizing: border-box;
    width: 8in;
    height: 10.5in;
    margin: 0;
    padding: 0.08in;
    box-shadow: none;
    max-width: none;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }

  .certificate-border {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding: 0.34in 0.42in;
    border-width: 6px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .cert-logo {
    align-self: center;
    width: 1.35in;
  }

  .certificate .eyebrow {
    margin: 0.12in 0 0.06in;
    font-size: 10px;
  }

  .certificate h1 {
    font-size: 38px;
    line-height: 1.05;
    margin: 0 0 0.28in;
  }

  .certificate h2 {
    font-size: 36px;
    line-height: 1.05;
    margin: 0.46in auto 0.16in;
    padding: 0 0.3in 0.1in;
    max-width: 6.7in;
  }

  .cert-credentials {
    margin: 0 auto 0.18in;
    max-width: 6.5in;
    font-size: 13.5px;
    line-height: 1.25;
  }

  .certificate h3 {
    font-size: 21px;
    line-height: 1.2;
    margin: 0.16in auto 0.3in;
    max-width: 6.4in;
  }

  .certificate p {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
  }

  .cert-grid {
    width: 6.25in;
    max-width: none;
  }

  .cert-grid span,
  .cert-grid strong {
    padding: 0.11in;
    font-size: 16px;
    line-height: 1.15;
  }

  .fine-print {
    margin-top: 0.38in;
    max-width: 6.55in;
    font-size: 13.5px;
    line-height: 1.35;
  }
}
