/* ═══════════════════════════════════════════════════════════════
   Rep1 Learn — Education Platform Styles
   Same brand as the rest of the site (see docs/design.md).
   Canonical colors/fonts live in tokens.css; this :root aliases
   into them. Fonts load via <link> in each page head — no @import.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette — aliases into tokens.css */
  --learn-bg: var(--bg-page);
  --learn-surface: var(--bg-surface);
  --learn-surface-alt: var(--bg-surface-2);
  --learn-border: var(--border-primary);
  --learn-border-light: var(--border-strong);
  --learn-text: var(--text-primary);
  --learn-text-muted: var(--text-secondary);
  --learn-text-faint: var(--text-faint);
  --learn-accent: var(--text-accent);
  --learn-accent-soft: var(--accent-soft);
  --learn-success: var(--status-ok);
  --learn-error: var(--status-err);
  --learn-blue: var(--text-secondary);
  --learn-purple: var(--text-secondary);
  --learn-orange: var(--text-secondary);
  --learn-cyan: var(--text-secondary);
  --learn-green: var(--status-ok);

  /* Spacing — generous for learning content */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px;  --space-8: 64px;

  --radius-sm: 6px;
  --radius-md: var(--rep1-radius-control);
  --radius-lg: var(--rep1-radius-card);

  /* --font-display is consumed by lots of bold UI chrome, so it resolves
     to Inter. True headings (h1/h2, stats) use --font-headline — the
     condensed brand stack. */
  --font-display: var(--rep1-font-body);
  --font-headline: var(--rep1-font-display);
  --font-body: var(--rep1-font-body);
}

/* ─── Base ─── */
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Keep scrolled-to targets clear of the sticky topbar (WCAG 2.4.11) */
html { scroll-padding-top: 90px; }
body {
  background: var(--learn-bg);
  color: var(--learn-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--learn-accent); text-decoration: none; }
a:hover { color: var(--text-primary); }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-narrow {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ─── Top bar (post-login) ─── */
.learn-topbar {
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--learn-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.learn-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.learn-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-headline);
  font-size: 20px; font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--learn-text);
  text-decoration: none;
}
.learn-logo .accent { color: #e83030; }
.learn-logo .divider { color: var(--learn-border-light); font-weight: 300; margin: 0 2px; }
.learn-logo .learn-label {
  font-size: 13px; font-weight: 500;
  color: var(--learn-text-muted);
  letter-spacing: 0;
}
.learn-nav {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
  margin-left: 32px;
}
.learn-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--learn-text-muted);
  transition: all 0.15s;
}
.learn-nav a:hover { color: var(--learn-text); background: var(--learn-surface); }
.learn-nav a.active { color: var(--learn-text); background: var(--learn-surface-alt); }
.learn-user {
  display: flex; align-items: center; gap: 12px;
}
.learn-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--learn-accent);
  border: 1px solid var(--learn-border-light);
}
.learn-user-name {
  font-size: 13px; font-weight: 600;
  color: var(--learn-text);
}
.learn-user-role {
  font-size: 11px;
  color: var(--learn-text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.payment-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--learn-success);
  border: 1px solid rgba(34, 197, 94, 0.25);
}
/* Narrow screens: nav overflowed onto the user controls (taps on Sign out
   hit nav links). Wrap the bar — nav becomes its own scrollable row. */
@media (max-width: 760px) {
  .learn-topbar-inner { flex-wrap: wrap; row-gap: 8px; padding: 10px 16px; }
  .learn-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .learn-user-name, .learn-user-role { display: none; }
}

.payment-pill.grace {
  background: rgba(251, 191, 36, 0.08);
  color: var(--status-warn);
  border-color: rgba(251, 191, 36, 0.25);
}

/* ─── Centered auth pages ─── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  /* Outranks the base .auth-side rule below (same specificity loses on order) */
  .auth-shell .auth-side, .auth-side { display: none !important; }
  /* Centering an overflowing flex column clips/overlaps content on phones */
  .auth-main { justify-content: flex-start; padding-top: 40px; }
}
.auth-side {
  background: var(--bg-page);
  border-right: 1px solid var(--learn-border);
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side-logo {
  display: flex; align-items: center; gap: 12px;
}
.auth-side-mark {
  font-family: var(--font-headline);
  font-size: 56px; font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--learn-text);
  line-height: 1;
}
.auth-side-mark .red { color: #e83030; }
.auth-side-wordmark {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--learn-text-muted);
  margin-top: 6px;
  text-transform: uppercase;
}
.auth-side-sublabel {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--learn-accent);
  margin-top: 10px;
  padding: 4px 10px;
  border: 1px solid var(--learn-accent);
  border-radius: 4px;
  white-space: nowrap;
}
.auth-side-hero {
  margin-top: 80px;
}
.auth-side-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--learn-accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.auth-side-title {
  font-family: var(--font-headline);
  font-size: 46px;
  font-weight: 400;
  line-height: var(--rep1-display-leading);
  letter-spacing: var(--rep1-display-tracking);
  color: var(--learn-text);
  margin-bottom: 22px;
}
.auth-side-title .accent { color: var(--learn-accent); }
.auth-side-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--learn-text-muted);
  max-width: 420px;
}
.auth-side-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--learn-border);
}
.auth-stat-value {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  color: var(--accent-display);
  line-height: 1;
}
.auth-stat-label {
  font-size: 11px;
  color: var(--learn-text-faint);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
}
.auth-side-footer {
  font-size: 12px;
  color: var(--learn-text-faint);
}

.auth-main {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 600px) {
  .auth-main { padding: 32px 24px; }
}
.auth-step-meta {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 12px;
}
.auth-title {
  font-family: var(--font-headline);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--learn-text);
  margin-bottom: 8px;
}
.auth-sub {
  font-size: 14px;
  color: var(--learn-text-muted);
  margin-bottom: 32px;
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--learn-text-faint);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 14px;
  color: var(--learn-text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.form-input:focus {
  border-color: var(--learn-accent);
  background: var(--learn-surface-alt);
}
.form-input::placeholder { color: var(--learn-text-faint); }
.form-help {
  font-size: 12px;
  color: var(--learn-text-faint);
  margin-top: 6px;
}

/* Persona selector */
.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.persona-option {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  color: var(--learn-text);
}
.persona-option:hover { border-color: var(--learn-border-light); background: var(--learn-surface-alt); }
.persona-option.selected {
  border-color: var(--learn-accent);
  background: var(--learn-accent-soft);
}
.persona-option-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--learn-text);
  margin-bottom: 4px;
}
.persona-option.selected .persona-option-title { color: var(--learn-accent); }
.persona-option-desc {
  font-size: 12px;
  color: var(--learn-text-faint);
  line-height: 1.45;
}

.btn-primary {
  width: 100%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled {
  background: var(--learn-border);
  color: var(--learn-text-faint);
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--learn-border);
  color: var(--learn-text);
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--learn-border-light); background: var(--learn-surface); }

.auth-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--learn-border);
  font-size: 13px;
  color: var(--learn-text-muted);
  text-align: center;
}
.auth-footer a { font-weight: 600; }

.error-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--learn-error);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.error-banner.show { display: block; }

/* ─── Checkout ─── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 56px auto;
  padding: 0 24px;
}
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-form, .checkout-summary {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
}
.checkout-summary { position: sticky; top: 80px; align-self: start; }

.plan-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--learn-bg);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--learn-border);
  margin-bottom: 28px;
}
.plan-option {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.plan-option:hover { background: var(--learn-surface); }
.plan-option.selected {
  background: var(--learn-surface);
  border-color: var(--learn-accent);
}
.plan-option-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 4px;
}
.plan-option.selected .plan-option-label { color: var(--learn-accent); }
.plan-option-price {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 400;
  color: var(--learn-text);
}
.plan-option-desc {
  font-size: 11px;
  color: var(--learn-text-muted);
  margin-top: 2px;
}

.stripe-card {
  display: grid;
  gap: 14px;
}
.stripe-card-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}
.stripe-disclaimer {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--learn-bg);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--learn-text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.stripe-disclaimer strong { color: var(--learn-text); font-weight: 700; }

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--learn-border);
  font-size: 14px;
}
.summary-line.total {
  border-top: 2px solid var(--learn-border-light);
  border-bottom: none;
  padding-top: 18px;
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}
.summary-line.total .amount { color: var(--learn-accent); }

.grace-explainer {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--learn-text-muted);
  line-height: 1.55;
}
.grace-explainer strong { color: var(--learn-success); }

/* ─── Course catalog ─── */
.dash-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--learn-border);
}
.dash-greet-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 12px;
}
.dash-greet-name {
  font-family: var(--font-headline);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: var(--rep1-display-tracking);
  line-height: var(--rep1-display-leading);
  margin-bottom: 8px;
}
.dash-greet-sub {
  font-size: 15px;
  color: var(--learn-text-muted);
}
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
@media (max-width: 700px) { .dash-stats { grid-template-columns: repeat(2, 1fr); } }
.dash-stat {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.dash-stat-label {
  font-size: 11px;
  color: var(--learn-text-faint);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.dash-stat-value {
  font-family: var(--font-headline);
  font-size: 26px;
  font-weight: 400;
  color: var(--accent-display);
}
.dash-stat-foot {
  font-size: 11px;
  color: var(--learn-text-muted);
  margin-top: 4px;
}

/* Course sections */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 20px;
}
.section-title {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.section-meta {
  font-size: 13px;
  color: var(--learn-text-muted);
}

/* Course grid */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.course-card {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-2px);
  border-color: var(--learn-border-light);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
.course-card-banner {
  height: 80px;
  position: relative;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.course-card-banner::before { content: none; }
.course-card-category {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}
.course-card-title-banner {
  font-family: var(--font-headline);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}
.course-card-body {
  padding: 18px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-card-short {
  font-size: 13.5px;
  color: var(--learn-text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.course-card-meta {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--learn-text-faint);
  padding-top: 14px;
  border-top: 1px solid var(--learn-border);
}
.course-card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Baseline (pre-course diagnostic) score chip */
.course-card-baseline {
  margin-left: auto;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--learn-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--learn-border);
  border-radius: 999px;
}

/* Course card in "enrolled" state */
.course-card.enrolled {
  border-color: var(--border-strong);
}
.course-card-progress {
  margin-top: 12px;
}
.progress-bar {
  height: 4px;
  background: var(--learn-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent-display);
  border-radius: 2px;
  transition: width 0.4s;
}
.progress-label {
  font-size: 11px;
  color: var(--learn-text-muted);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}
.progress-label strong { color: var(--learn-text); font-weight: 600; }

.course-card.completed {
  border-color: rgba(34, 197, 94, 0.3);
}

/* Badge display */
.badge-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.earned-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  min-width: 220px;
}
.earned-badge-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--rep1-metal-gold);
  color: #0a0d14;
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.earned-badge-icon.silver { background: var(--rep1-metal-silver); }
.earned-badge-icon.gold { background: var(--rep1-metal-gold); }
.earned-badge-icon.bronze { background: #cd7f32; color: #fff; }
.earned-badge-meta-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--learn-text);
}
.earned-badge-meta-desc {
  font-size: 11px;
  color: var(--learn-text-faint);
  margin-top: 2px;
}

/* ─── Course player ─── */
.player-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}
@media (max-width: 1000px) {
  .player-shell { grid-template-columns: 1fr; }
}

.player-back {
  font-size: 13px;
  color: var(--learn-text-muted);
  margin-bottom: 16px;
  display: inline-block;
}
.player-eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 10px;
}
.player-title {
  font-family: var(--font-headline);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: var(--rep1-display-tracking);
  line-height: var(--rep1-display-leading);
  margin-bottom: 12px;
}
.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--learn-text-muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--learn-border);
  margin-bottom: 28px;
}
.player-meta-item { display: flex; align-items: center; gap: 6px; }
.player-meta-item strong { color: var(--learn-text); font-weight: 600; }

.video-wrap {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  aspect-ratio: 16 / 9;
  position: relative;
}
.video-wrap video {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}

.module-info {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.module-info-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 8px;
}
.module-info-title {
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.module-info-body {
  font-size: 14.5px;
  color: var(--learn-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.module-info-points {
  list-style: none;
  margin-top: 12px;
}
.module-info-points li {
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--learn-text);
  line-height: 1.55;
  padding-left: 20px;
  position: relative;
}
.module-info-points li::before {
  content: '›';
  color: var(--learn-accent);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.module-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--learn-border);
  margin-top: 20px;
}

/* Sidebar — module list */
/* — Bulk reset all courses (learn.html — beta testing tool) — */
.learn-reset-all {
  margin-top: 56px;
  padding: 24px;
  border: 1px dashed rgba(232, 48, 48, 0.35);
  border-radius: 12px;
  background: rgba(232, 48, 48, 0.03);
  max-width: 640px;
}
.learn-reset-all-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.learn-reset-all-badge {
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  border: 1px solid rgba(232, 48, 48, 0.5);
  border-radius: 3px;
}
.learn-reset-all-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--learn-text);
}
.learn-reset-all-note {
  font-size: 13px;
  color: var(--learn-text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Module page progress bar */
.page-progress {
  margin: 22px 0 18px;
  padding: 14px 16px;
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: 10px;
}
.page-progress.hidden { display: none; }
.page-progress-label {
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.page-progress-dots {
  display: flex;
  gap: 6px;
  /* Keep all tabs in a single row and let the user scroll horizontally when
     the strip is too long for the viewport (e.g. 11-tab modules). Wrapping
     hid Quiz + Reflection tabs on modules with 6 student actions because
     rows 10–11 fell below the fold. */
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.page-progress-dots::-webkit-scrollbar {
  height: 6px;
}
.page-progress-dots::-webkit-scrollbar-thumb {
  background: var(--learn-border);
  border-radius: 4px;
}
.page-dot { flex-shrink: 0; scroll-snap-align: start; }
.page-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: transparent;
  border: 1px solid var(--learn-border);
  border-radius: 999px;
  color: var(--learn-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  transition: all 0.15s ease;
}
.page-dot:hover { border-color: var(--learn-text-muted); color: var(--learn-text); }
.page-dot .page-dot-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--learn-border);
  color: var(--learn-text);
  font-size: 11px;
  font-weight: 700;
}
.page-dot .page-dot-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.page-dot.active {
  background: var(--accent-soft);
  border-color: var(--accent-display);
  color: var(--learn-text);
}
.page-dot.active .page-dot-idx {
  background: var(--rep1-red-600);
  color: #fff;
}
.page-dot.done {
  border-color: rgba(34, 197, 94, 0.35);
  color: var(--learn-text);
}
.page-dot.done .page-dot-idx {
  background: #22C55E;
  color: #0a0a0a;
}
@media (max-width: 720px) {
  .page-dot .page-dot-label { display: none; }
  .page-dot { padding: 4px 6px; }
}

/* Student Action — progressive prompt blocks */
.sa-block {
  padding: 16px 0;
  border-top: 1px solid var(--learn-border);
  animation: sa-fade-in 0.25s ease;
}
.sa-block:first-child { border-top: 0; padding-top: 0; }
.sa-block.sa-hidden { display: none; }
@keyframes sa-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sa-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  cursor: default;
}
.sa-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rep1-red-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}
.sa-prompt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--learn-text);
}
.sa-textarea {
  width: 100%;
  min-height: 84px;
  margin-left: 32px;
  width: calc(100% - 32px);
  background: var(--learn-bg);
  border: 1px solid var(--learn-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--learn-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  transition: border-color 0.15s ease;
}
.sa-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}
.sa-choices {
  margin-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sa-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--learn-bg);
  border: 1px solid var(--learn-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}
.sa-choice:hover { border-color: var(--learn-text-muted); }
.sa-choice input { accent-color: var(--accent-display); }
.sa-choice.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent-display);
  color: var(--learn-text);
}

/* Student Action — Choose ONE cards (selectable options above prompts) */
.ch-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--learn-text-muted); margin: 0 0 8px;
}
.ch-cards { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.ch-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 14px 16px;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 8px;
  color: var(--learn-text); font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.4;
  cursor: pointer; transition: all 0.15s ease;
}
.ch-card:hover { border-color: var(--learn-text-muted); background: var(--learn-surface); }
.ch-dot {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--learn-border); background: transparent;
  transition: all 0.15s ease;
}
.ch-card.is-selected {
  border-color: var(--accent-display);
  background: var(--accent-soft);
}
.ch-card.is-selected .ch-dot {
  border-color: var(--accent-display);
  background: var(--accent-display);
  box-shadow: inset 0 0 0 3px var(--learn-bg);
}
.ch-text { flex: 1; }

/* Student Action — Multi-prompt (numbered questions with per-item textarea) */
.mp-rows { display: flex; flex-direction: column; gap: 12px; }
.mp-item {
  display: flex; gap: 12px;
  padding: 14px 16px;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 8px;
}
.mp-num {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--learn-surface); border: 1px solid var(--learn-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display, inherit); font-size: 13px; font-weight: 700; color: var(--learn-text);
  margin-top: 2px;
}
.mp-body { flex: 1; min-width: 0; }
.mp-label {
  display: block; margin: 0 0 8px;
  font-size: 14px; font-weight: 600; color: var(--learn-text); line-height: 1.4;
}
.mp-input {
  width: 100%; min-height: 72px; resize: vertical;
  padding: 10px 12px;
  background: var(--learn-surface); border: 1px solid var(--learn-border); border-radius: 6px;
  color: var(--learn-text); font-family: inherit; font-size: 14px; line-height: 1.5;
  box-sizing: border-box;
}
.mp-input:focus { outline: none; border-color: var(--border-focus); }

/* Student Action — Fill-in-the-blank (identity statement) */
.fb-sentence {
  padding: 18px 20px; margin: 4px 0 0;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 8px;
  font-size: 16px; line-height: 2.4; color: var(--learn-text);
  display: block;
}
.fb-text { white-space: pre-wrap; }
.fb-input {
  display: inline-block;
  min-width: 140px; padding: 6px 10px; margin: 0 4px;
  background: var(--learn-surface); border: 1px solid var(--learn-border); border-radius: 6px;
  color: var(--learn-text); font-family: inherit; font-size: 15px; font-weight: 600;
  vertical-align: baseline;
}
.fb-input:focus { outline: none; border-color: var(--border-focus); }
.fb-input::placeholder { color: var(--learn-text-muted); font-weight: 400; font-style: italic; }

@media (max-width: 720px) {
  .mp-item { flex-direction: row; }
  .fb-input { min-width: 100px; }
}

/* Student Action — Budget Allocator */
.ba-summary {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 18px; margin: 0 0 12px;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 10px;
}
.ba-summary-label { font-size: 12px; color: var(--learn-text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 8px; }
.ba-summary-val { font-family: var(--font-display, inherit); font-size: 22px; font-weight: 800; color: var(--learn-text); }
.ba-remaining.is-balanced { color: #22C55E; }
.ba-remaining.is-over { color: #ef4444; }
.ba-rows { display: flex; flex-direction: column; gap: 8px; }
.ba-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 8px;
}
.ba-cat { font-weight: 600; font-size: 15px; color: var(--learn-text); }
.ba-input-wrap { position: relative; display: inline-flex; align-items: center; }
.ba-dollar { position: absolute; left: 10px; color: var(--learn-text-muted); font-size: 14px; }
.ba-input {
  width: 100px; padding: 8px 10px 8px 22px; text-align: right;
  background: var(--learn-surface); border: 1px solid var(--learn-border); border-radius: 6px;
  color: var(--learn-text); font-family: inherit; font-size: 15px; font-weight: 700;
}
.ba-input:focus { outline: none; border-color: var(--border-focus); }

/* Student Action — Classify (segmented labels per item) */
.cl-rows { display: flex; flex-direction: column; gap: 8px; }
.cl-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--learn-bg); border: 1px solid var(--learn-border); border-radius: 8px;
}
.cl-item { font-size: 14px; color: var(--learn-text); flex: 1; }
.cl-labels { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-pill {
  background: transparent; border: 1px solid var(--learn-border); color: var(--learn-text-muted);
  padding: 5px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.cl-pill:hover { border-color: var(--learn-text-muted); color: var(--learn-text); }
.cl-pill.is-right { background: rgba(34,197,94,0.15); border-color: #22C55E; color: #22C55E; }
.cl-pill.is-wrong { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #ef4444; }
.cl-pill.is-picked { background: var(--accent-soft); border-color: var(--accent-display); color: var(--learn-text); }

@media (max-width: 720px) {
  .cl-row { flex-direction: column; align-items: flex-start; }
}

/* Student Action NEED/WANT sort pills */
.sa-pill {
  background: transparent;
  border: 1px solid var(--learn-border);
  color: var(--learn-text-muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sa-pill:hover { border-color: var(--learn-text-muted); }

/* Reset progress — beta testing tool inside course sidebar */
.sidebar-reset {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(232, 48, 48, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-reset-btn {
  background: transparent;
  border: 1px solid rgba(232, 48, 48, 0.4);
  color: var(--text-accent);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  align-self: flex-start;
}
.sidebar-reset-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent-display);
}
.sidebar-reset-note {
  font-size: 11px;
  color: var(--learn-text-faint);
  line-height: 1.4;
}

.player-sidebar {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 80px;
}
.sidebar-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--learn-border);
}
.sidebar-head-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 4px;
}
.sidebar-head-progress {
  font-size: 13px;
  color: var(--learn-text);
  font-weight: 600;
}
.module-list { list-style: none; }
.module-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--learn-border);
  cursor: pointer;
  transition: background 0.15s;
}
.module-item:hover { background: var(--learn-surface-alt); }
.module-item.active { background: var(--learn-accent-soft); }
/* De-emphasize via color, not opacity — dimmed rows fell below AA contrast */
.module-item.done .module-name { color: var(--learn-text-muted); font-weight: 500; }
.module-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--learn-bg);
  border: 1px solid var(--learn-border-light);
  color: var(--learn-text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.module-item.done .module-num {
  background: var(--learn-success);
  border-color: var(--learn-success);
  color: #0a0d14;
}
.module-item.active .module-num {
  background: var(--rep1-red-600);
  border-color: var(--rep1-red-600);
  color: #fff;
}
.module-meta {
  flex: 1;
  min-width: 0;
}
.module-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--learn-text);
  line-height: 1.35;
  margin-bottom: 2px;
}
.module-item.active .module-name { color: var(--learn-accent); }
.module-dur {
  font-size: 11px;
  color: var(--learn-text-faint);
}

/* Quiz */
.quiz-card {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
}
.quiz-question {
  margin-bottom: 28px;
}
.quiz-q-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--learn-text-faint);
  margin-bottom: 8px;
}
.quiz-q-text {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--learn-text);
  margin-bottom: 16px;
}
.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-option {
  background: var(--learn-bg);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--learn-text);
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiz-option:hover { border-color: var(--learn-border-light); background: var(--learn-surface-alt); }
.quiz-option.selected {
  border-color: var(--learn-accent);
  background: var(--learn-accent-soft);
  color: var(--learn-accent);
}
.quiz-option.correct {
  border-color: var(--learn-success);
  background: rgba(34, 197, 94, 0.08);
  color: var(--learn-success);
}
.quiz-option.wrong {
  border-color: var(--learn-error);
  background: rgba(239, 68, 68, 0.08);
  color: var(--learn-error);
}
.quiz-option-letter {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--learn-surface);
  border: 1px solid var(--learn-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--learn-text-muted);
  flex-shrink: 0;
}
.quiz-option.selected .quiz-option-letter { background: var(--rep1-red-600); color: #fff; border-color: var(--rep1-red-600); }
.quiz-option.correct .quiz-option-letter { background: var(--learn-success); color: #0a0d14; border-color: var(--learn-success); }
.quiz-option.wrong .quiz-option-letter { background: var(--learn-error); color: #fff; border-color: var(--learn-error); }
.quiz-explain {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg-well);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  font-size: 13px;
  color: var(--learn-text-muted);
  line-height: 1.55;
  display: none;
}
.quiz-explain.show { display: block; }

/* Badge earn modal */
.badge-modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.badge-modal.show { opacity: 1; pointer-events: auto; }
.badge-modal-inner {
  background: var(--learn-surface);
  border: 1px solid var(--learn-border);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  max-width: 480px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s;
}
.badge-modal.show .badge-modal-inner { transform: scale(1); }
.badge-modal-eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--learn-accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.badge-modal-shield {
  width: 100px; height: 100px;
  margin: 0 auto 24px;
  background: var(--rep1-metal-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 32px;
  font-weight: 400;
  color: #0a0d14;
  letter-spacing: 0;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.05), 0 0 0 16px rgba(255, 255, 255, 0.025);
}
.badge-modal-shield.silver { background: var(--rep1-metal-silver); color: #0a0d14; }
.badge-modal-shield.gold { background: var(--rep1-metal-gold); color: #0a0d14; }
.badge-modal-shield.bronze { background: #cd7f32; color: #fff; }
.badge-modal-name {
  font-family: var(--font-headline);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 8px;
}
.badge-modal-desc {
  font-size: 14px;
  color: var(--learn-text-muted);
  margin-bottom: 28px;
  line-height: 1.55;
}
.badge-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Misc */
.flex-row { display: flex; gap: 12px; align-items: center; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* In-text links must not rely on color alone (WCAG 1.4.1) */
p a, footer > a, .learn-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
