/* ============================================================================
   AcuityCare CHART LMS v2 — Master Stylesheet
   Examin layout structure + AcuityCare teal/navy palette + Outfit/Poppins type
   ============================================================================ */

/* Brand tokens — overridden inline per tenant */
:root {
  --primary:        #0D8B8E;
  --primary-hover:  #066668;
  --primary-deep:   #0A6E70;
  --primary-light:  #E4F1F1;
  --primary-50:     #EAF6F6;

  --ink:            #0B1F2A;
  --ink-soft:       #2A3F49;
  --heading:        #162726;
  --text:           #6C706F;
  --text-muted:     #8A908E;

  --paper:          #FBFCFC;
  --cream:          #F4F8F8;
  --border:         #E7ECEB;
  --bg-gray:        #F9F9F9;

  --gold:           #D9A441;
  --coral:          #E8896C;
  --success:        #1E9E6A;
  --danger:         #DC3545;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(11,31,42,.05);
  --shadow:    0 14px 40px rgba(11,31,42,.07);
  --shadow-lg: 0 30px 70px rgba(11,31,42,.12);

  --t-hero: clamp(2.6rem, 1.4rem + 4.2vw, 3.85rem);
  --t-h1:   clamp(2.1rem, 1.4rem + 2.6vw, 3rem);
  --t-h2:   clamp(1.8rem, 1.3rem + 1.9vw, 2.55rem);
  --t-h3:   clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
}

/* ─── Reset & base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
small { font-size: .85em; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: #B5C2C8; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }

/* ─── Section heading with the signature double-line divider ─────────────── */
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: .8rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-head h2 { text-transform: none; margin-bottom: 18px; }
.section-head .divider {
  display: flex; justify-content: center; gap: 6px; margin: 14px 0 20px;
}
.section-head .divider span {
  display: block;
  width: 28px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.section-head p { color: var(--text); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  transition: all .25s ease;
  text-decoration: none;
  cursor: pointer;
}
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--dark:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--sm { padding: 9px 18px; font-size: .75rem; }
.btn--lg { padding: 18px 36px; font-size: .95rem; }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.topbar {
  background: var(--ink);
  color: #B5C2C8;
  font-size: .82rem;
  padding: 10px 0;
}
.topbar__row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar a { color: #B5C2C8; }
.topbar a:hover { color: #fff; }
.topbar__meta { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar__meta span { display: inline-flex; align-items: center; gap: 8px; }
.topbar__actions { display: flex; gap: 8px; align-items: center; }
.topbar__actions .pill {
  background: var(--primary); color: var(--ink);
  padding: 5px 16px; border-radius: 4px;
  font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: 1px;
}

.mainnav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.mainnav__row { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.mainnav__logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 1.35rem;
  color: var(--ink);
}
.mainnav__logo img { height: 38px; width: auto; }
.mainnav__links { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.mainnav__links a {
  font-family: 'Poppins', sans-serif;
  color: var(--ink); font-weight: 500; font-size: .92rem;
  position: relative; padding: 4px 0;
}
.mainnav__links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--primary);
  transition: width .3s ease;
}
.mainnav__links a:hover::after, .mainnav__links a.is-active::after { width: 100%; }
.mainnav__cta { display: flex; gap: 12px; }

.hamburger { display: none; background: none; border: none; padding: 8px; }
.hamburger svg { width: 26px; height: 26px; color: var(--ink); }

@media (max-width: 980px) {
  .mainnav__links { display: none; }
  .hamburger { display: block; }
  .mainnav__cta .btn:not(:last-child) { display: none; }
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: #fff;
  padding: 120px 0 140px;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: url('/assets/chapters/marketing-hero-1.png');
  background-size: cover; background-position: center right;
  opacity: .25;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 70%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 30%, #000 70%, #000 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 640px; }
.hero__eyebrow {
  display: inline-block; font-family: 'Poppins', sans-serif;
  font-size: .8rem; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--primary);
  background: rgba(13, 139, 142, .15);
  padding: 8px 16px; border-radius: var(--r-pill);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: var(--t-hero); color: #fff; margin-bottom: 24px;
  line-height: 1.05; font-weight: 700;
}
.hero h1 .accent { color: var(--primary); }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.78); margin-bottom: 36px; max-width: 540px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── Stats strip ─────────────────────────────────────────────────────────── */
.stats {
  background: var(--ink);
  color: #fff;
  padding: 64px 0;
}
.stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px; text-align: center;
}
.stats__item .num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.6rem; font-weight: 800; color: #fff;
  line-height: 1; display: block; margin-bottom: 8px;
}
.stats__item .num em { color: var(--primary); font-style: normal; }
.stats__item .label {
  font-size: .82rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,.65);
}

/* ─── Course Cards (Examin pattern — metadata-first) ─────────────────────── */
.course-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.course-card {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all .3s ease;
}
.course-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.course-card__hero {
  position: relative; aspect-ratio: 16 / 10; background: var(--cream); overflow: hidden;
}
.course-card__hero img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.course-card:hover .course-card__hero img { transform: scale(1.05); }
.course-card__level {
  position: absolute; top: 14px; left: 14px;
  background: var(--primary); color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: .7rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 6px 12px; border-radius: var(--r-pill);
}
.course-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-card__category {
  font-family: 'Poppins', sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 8px;
}
.course-card__title {
  font-family: 'Poppins', sans-serif;
  color: var(--ink); font-size: 1.15rem; font-weight: 600;
  margin-bottom: 10px; line-height: 1.3;
}
.course-card__desc { font-size: .9rem; color: var(--text); margin-bottom: 18px; flex: 1; }
.course-card__meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-muted);
}
.course-card__meta .stat { display: inline-flex; align-items: center; gap: 6px; }
.course-card__price {
  color: var(--primary); font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: .95rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: #B5C2C8; padding: 80px 0 30px; }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}
.footer h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 36px; height: 3px; background: var(--primary); border-radius: 2px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: #B5C2C8; transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer__brand p { font-size: .9rem; line-height: 1.7; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: .82rem;
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.form-card {
  max-width: 480px; margin: 80px auto; background: #fff;
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 48px;
}
.form-card h1 { margin-bottom: 8px; }
.form-card .lead { color: var(--text); margin-bottom: 32px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 500; color: var(--ink);
  margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 12px 16px; font-size: .95rem;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .2s;
}
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(13,139,142,.12); }
textarea.form-control { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-error {
  background: #fff5f5; color: var(--danger); padding: 12px 16px;
  border-radius: var(--r-sm); font-size: .9rem; margin-bottom: 18px;
}
.form-success {
  background: #f0faf4; color: var(--success); padding: 12px 16px;
  border-radius: var(--r-sm); font-size: .9rem; margin-bottom: 18px;
}

/* ─── Dashboard Cards ─────────────────────────────────────────────────────── */
.dash {
  background: var(--cream);
  min-height: calc(100vh - 100px);
  padding: 48px 0 96px;
}
.dash h1 { margin-bottom: 8px; }
.dash .lead { color: var(--text); margin-bottom: 40px; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.stat-card {
  background: #fff; padding: 28px; border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.stat-card .label {
  font-family: 'Poppins', sans-serif;
  font-size: .75rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.stat-card .num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem; font-weight: 700; color: var(--ink); line-height: 1;
}

.progress-card {
  background: #fff; border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 24px; display: flex; gap: 20px; align-items: center;
  margin-bottom: 16px; transition: all .25s ease;
}
.progress-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.progress-card__cover {
  width: 88px; height: 88px; flex-shrink: 0;
  border-radius: var(--r-sm); overflow: hidden; background: var(--cream);
}
.progress-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.progress-card__body { flex: 1; min-width: 0; }
.progress-card__title { font-size: 1.05rem; margin: 0 0 4px; }
.progress-card__subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 12px; }
.progress-bar {
  height: 8px; background: var(--cream); border-radius: 99px; overflow: hidden;
}
.progress-bar__fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .6s ease; }
.progress-card__meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-muted); margin-top: 6px; }

/* ─── LESSON PLAYER (mimics demo-lesson.html) ───────────────────────────── */
.player {
  background: var(--cream);
  padding: 32px 0 80px;
  min-height: calc(100vh - 80px);
}
.player__breadcrumb {
  font-size: .85rem; color: var(--text-muted); margin-bottom: 16px;
}
.player__breadcrumb a { color: var(--text-muted); }
.player__breadcrumb a:hover { color: var(--primary); }
.player__title { color: var(--ink); margin-bottom: 8px; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.2rem); }
.player__subtitle { color: var(--text); margin-bottom: 32px; }

.player__shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .player__shell { grid-template-columns: 1fr; }
}

/* Sidebar */
.player__sidebar {
  background: var(--ink);
  color: #B5C2C8;
  border-radius: var(--r-lg);
  padding: 26px;
  position: sticky; top: 96px;
}
.player__sidebar h3 { color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.player__sidebar .module-meta {
  font-size: .8rem; color: rgba(255,255,255,.55);
  margin-bottom: 22px;
}
.player__progress {
  margin-bottom: 24px;
}
.player__progress-row {
  display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: 8px;
}
.player__progress-row .pct { color: #fff; font-weight: 600; }
.player__progress-bar {
  height: 7px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden;
}
.player__progress-bar__fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width .8s ease; }

.lesson-list { display: flex; flex-direction: column; gap: 4px; }
.lesson-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-sm);
  background: transparent; border: none; color: #B5C2C8;
  text-align: left; cursor: pointer; transition: all .2s ease;
  text-decoration: none; font-family: inherit; font-size: .88rem; line-height: 1.4;
  width: 100%;
}
.lesson-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.lesson-item.is-active { background: rgba(13,139,142,.22); color: #fff; }
.lesson-item.is-done { color: #8FA0A8; }
.lesson-item .dot {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 600;
}
.lesson-item.is-active .dot { background: #fff; color: var(--primary-deep); }
.lesson-item.is-done .dot { background: var(--primary); color: #fff; }
.lesson-item .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-item .duration { font-size: .75rem; opacity: .7; flex-shrink: 0; }

.sidebar-divider {
  margin: 20px 0; border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-textbook a {
  color: var(--primary); font-size: .85rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}

/* Main content panel */
.player__main {
  background: var(--ink);
  color: #B5C2C8;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.player__hero {
  position: relative;
  aspect-ratio: 16 / 8;
  background: #000;
  overflow: hidden;
}
.player__hero img {
  width: 100%; height: 100%; object-fit: cover; opacity: .85;
}
.player__hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,31,42,.15), rgba(11,31,42,.7));
}
.player__hero .chip {
  position: absolute; top: 18px; right: 18px;
  background: var(--primary); color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 6px 14px; border-radius: var(--r-pill);
  z-index: 2;
}
.player__hero .hero-title {
  position: absolute; bottom: 22px; left: 24px; right: 24px;
  color: #fff; font-family: 'Poppins', sans-serif;
  font-size: 1.2rem; font-weight: 600;
  z-index: 2;
}

.player__tabs {
  display: flex; gap: 4px; padding: 6px 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow-x: auto;
}
.player__tab {
  background: none; border: none; color: #8FA0A8;
  font-family: 'Poppins', sans-serif;
  font-size: .85rem; font-weight: 500;
  padding: 16px 14px; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.player__tab:hover { color: #fff; }
.player__tab.is-active { color: #fff; border-bottom-color: var(--primary); }

.player__panel { padding: 30px; }
.player__panel-pane { display: none; }
.player__panel-pane.is-active { display: block; }
.player__panel h3 { color: #fff; font-size: 1.2rem; margin-bottom: 14px; font-family: 'Poppins', sans-serif; }
.player__panel h4 { color: #fff; font-size: 1.02rem; margin: 24px 0 10px; }
.player__panel p, .player__panel ul, .player__panel ol { color: #B5C2C8; font-size: .92rem; line-height: 1.75; }
.player__panel strong { color: #fff; font-weight: 600; }
.player__panel a { color: var(--primary); }
.player__panel ul, .player__panel ol { padding-left: 22px; }
.player__panel li { margin-bottom: 8px; }
.player__panel .callout {
  background: rgba(13,139,142,.12);
  border-left: 3px solid var(--primary);
  padding: 18px 22px;
  border-radius: var(--r-sm);
  margin: 20px 0;
  color: #D7E0E4;
}
.player__panel .key-terms {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  padding: 20px; border-radius: var(--r-md); margin: 20px 0;
}
.player__panel .key-terms dt { color: #fff; font-weight: 600; font-family: 'Poppins', sans-serif; }
.player__panel .key-terms dd { margin: 4px 0 14px; color: #B5C2C8; }

.flip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.flip-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  padding: 16px; min-height: 140px;
  cursor: pointer; perspective: 1000px;
}
.flip-card .front, .flip-card .back { transition: opacity .3s; }
.flip-card .back { display: none; color: #B5C2C8; font-size: .88rem; }
.flip-card.is-flipped .front { display: none; }
.flip-card.is-flipped .back { display: block; }
.flip-card .label { font-family: 'Poppins', sans-serif; color: var(--primary); font-size: .7rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.flip-card .term { color: #fff; font-weight: 600; font-size: .95rem; }

/* Quiz */
.quiz {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r-md);
  padding: 22px;
  margin: 20px 0;
}
.quiz__q-count { color: var(--primary); font-family: 'Poppins', sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
.quiz__q-prompt { color: #fff; font-weight: 600; font-size: 1rem; margin: 8px 0 16px; }
.quiz__options { display: flex; flex-direction: column; gap: 10px; }
.quiz__option {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm);
  padding: 13px 16px; color: #D7E0E4;
  cursor: pointer; transition: all .2s ease; text-align: left;
  font-family: inherit; font-size: .92rem; width: 100%;
}
.quiz__option:hover { background: rgba(255,255,255,.08); }
.quiz__option .letter {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: .82rem;
}
.quiz__option.is-selected { border-color: var(--primary); }
.quiz__option.is-selected .letter { background: var(--primary); color: #fff; }
.quiz__option.is-correct { background: rgba(30,158,106,.18); border-color: var(--success); }
.quiz__option.is-correct .letter { background: var(--success); color: #fff; }
.quiz__option.is-wrong { background: rgba(232,137,108,.18); border-color: var(--coral); }
.quiz__option.is-wrong .letter { background: var(--coral); color: #fff; }
.quiz__feedback {
  margin-top: 16px; padding: 12px 16px; border-radius: var(--r-sm);
  font-size: .9rem; line-height: 1.6;
}
.quiz__feedback.pass { background: rgba(30,158,106,.18); color: #C8F0DE; }
.quiz__feedback.fail { background: rgba(232,137,108,.18); color: #FAD7C7; }

/* Writing exercise */
.writing-exercise {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r-md);
  padding: 22px; margin: 20px 0;
}
.writing-exercise .prompt { color: #fff; margin-bottom: 12px; font-weight: 500; }
.writing-exercise .rubric { color: #8FA0A8; font-size: .85rem; margin-bottom: 14px; font-style: italic; }
.writing-exercise textarea {
  width: 100%; min-height: 200px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm);
  color: #fff; padding: 14px;
  font-family: inherit; font-size: .92rem; line-height: 1.7;
  resize: vertical;
}
.writing-exercise textarea:focus { outline: none; border-color: var(--primary); }
.writing-exercise__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .82rem; color: #8FA0A8; }
.writing-exercise__feedback {
  margin-top: 14px; padding: 14px 18px; border-radius: var(--r-sm);
  background: rgba(13,139,142,.15); border-left: 3px solid var(--primary);
  color: #D7E0E4; font-size: .9rem;
}

/* Player nav */
.player__nav {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 22px 30px; border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.player__nav .helper { color: #8FA0A8; font-size: .8rem; flex: 1; min-width: 200px; }
.btn--ghost-light {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.4); color: #fff; }

/* ─── Admin layout ────────────────────────────────────────────────────────── */
.admin {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 880px) { .admin { grid-template-columns: 1fr; } }
.admin__nav {
  background: var(--ink);
  color: #B5C2C8;
  padding: 28px 20px;
}
.admin__nav .brand {
  color: #fff; font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 1.1rem; margin-bottom: 30px;
  display: flex; align-items: center; gap: 10px;
}
.admin__nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  color: #B5C2C8; font-size: .9rem; font-weight: 500;
  margin-bottom: 4px;
  text-decoration: none;
}
.admin__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin__nav a.is-active { background: rgba(13,139,142,.22); color: #fff; }
.admin__main { padding: 36px 40px; background: var(--cream); }
.admin__head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 16px; margin-bottom: 32px;
}
.admin__head h1 { margin: 0; font-size: 1.7rem; }

.table {
  width: 100%; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-md); border-collapse: separate; border-spacing: 0;
  overflow: hidden;
}
.table th, .table td { padding: 14px 16px; text-align: left; }
.table thead th {
  background: var(--cream); font-family: 'Poppins', sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
}
.table tbody td { border-top: 1px solid var(--border); font-size: .9rem; color: var(--ink); }
.table tbody tr:hover { background: #fafbfb; }
.table .actions { display: flex; gap: 8px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.badge--active { background: rgba(30,158,106,.15); color: var(--success); }
.badge--draft  { background: rgba(217,164,65,.15); color: var(--gold); }
.badge--admin  { background: rgba(13,139,142,.15); color: var(--primary); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,31,42,.6); display: none;
  align-items: center; justify-content: center; z-index: 100;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff; border-radius: var(--r-md); padding: 36px;
  max-width: 500px; width: 90%; max-height: 90vh; overflow: auto;
}
.modal h2 { margin-bottom: 8px; }
.modal .close {
  float: right; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
}

/* ─── Transcript ──────────────────────────────────────────────────────────── */
.transcript {
  max-width: 900px; margin: 40px auto; background: #fff;
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 56px; border: 4px double var(--primary);
}
.transcript__head { text-align: center; border-bottom: 2px solid var(--border); padding-bottom: 32px; margin-bottom: 32px; }
.transcript__head h1 { color: var(--primary); font-family: 'Poppins', sans-serif; font-size: 2.1rem; margin-bottom: 4px; }
.transcript__head .meta { color: var(--text-muted); font-size: .9rem; }
.transcript__person { text-align: center; padding: 24px 0; }
.transcript__person .name { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.transcript__person .label { color: var(--text-muted); font-size: .9rem; }

.transcript-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.transcript-table th, .transcript-table td { padding: 10px 12px; text-align: left; font-size: .9rem; }
.transcript-table thead th { background: var(--cream); color: var(--ink); font-family: 'Poppins', sans-serif; font-weight: 600; }
.transcript-table tbody tr { border-bottom: 1px solid var(--border); }
.transcript-table .score { text-align: right; font-weight: 600; color: var(--ink); font-family: 'Poppins', sans-serif; }

.cert-no { font-family: 'Courier New', monospace; color: var(--text-muted); font-size: .85rem; margin-top: 24px; text-align: center; }

@media print {
  .topbar, .mainnav, .footer, .no-print { display: none !important; }
  .transcript { box-shadow: none; border: 4px double var(--primary); margin: 0; }
  body { background: #fff; }
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-3 { margin-top: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
