
/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

/* Accessible focus ring for keyboard users */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ===== CSS VARIABLES ===== */
:root {
  /* Brand - from BBB logo */
  --primary: #03a356;        /* bright teal/emerald green from logo */
  --primary-dark: #038747;   /* darker for depth */
  --primary-light: #069b4e;  /* lighter for highlights */
  --green: var(--primary);
  --green-pale: rgba(0,191,99,0.1);
  --green-mid: var(--primary-dark);
  --cream: #faf8f3;          /* warm cream base */
  --cream-dark: #f0ede5;     /* slightly darker cream for sections */
  --accent: #f5a623;         /* warm orangey-yellow highlight */
  --accent-light: #fde9d1;   /* light version for backgrounds */
  --amber: #f59e0b;
  /* Text */
  --text: #2c2c2c;           /* dark for readability */
  --text-dark: #1f2937;
  --text-muted: #666666;     /* medium gray */
  --text-light: #999999;     /* lighter gray */
  /* Surfaces */
  --bg: #faf8f3;
  --border: #e5ddd3;         /* warm soft border */
  --border-color: #e5ddd3;
  --border-strong: #d4cfc2;  /* stronger border */
  --white: #ffffff;
  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0,191,99,0.05);
  --shadow-sm: 0 1px 4px rgba(0,191,99,0.08), 0 1px 2px rgba(0,191,99,0.04);
  --shadow-md: 0 8px 24px -8px rgba(0,191,99,0.15), 0 2px 6px rgba(0,191,99,0.06);
  --shadow-lg: 0 24px 48px -12px rgba(0,191,99,0.25), 0 6px 16px rgba(0,191,99,0.1);
  /* Shape */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Focus */
  --focus-ring: 0 0 0 3px rgba(0,191,99,0.3);
}

/* Reduced motion */

/* ===== REVIEW SCREEN =====  */
#review {
  display: none;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding-top: 70px;
}
#review.active { display: flex; }

.review-header {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 1rem;
}

.review-header-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.review-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg);
}

.review-controls {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.review-filter, .review-sort {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-filter label, .review-sort label {
  font-weight: 600;
  font-size: 0.9rem;
}

.review-filter select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 0.9rem;
}

.review-sort-toggle {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.review-sort-toggle:hover {
  background: var(--primary-dark);
}

.review-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.trainer-card {
  background: linear-gradient(135deg, rgba(0,191,99,0.08) 0%, rgba(245,166,35,0.08) 100%);
  border: 1px solid rgba(0,191,99,0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.trainer-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: rgba(0,191,99,0.12);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.trainer-header,
.trainer-progress-row,
.trainer-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.trainer-header h2,
.trainer-progress-row h2,
.trainer-summary-top h2 {
  margin: 0 0 0.4rem;
  color: var(--text-dark);
  font-size: 1.45rem;
}

.trainer-header p,
.trainer-progress-row p,
.trainer-summary-top p,
.trainer-meta-note,
.trainer-empty-copy p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.trainer-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.trainer-stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.trainer-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.trainer-stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trainer-meta-note {
  margin-top: 0.9rem;
  font-size: 0.88rem;
}

/* ── Streak badge ── */
.trainer-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1.5px solid #ffb74d;
  color: #e65100;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ── Completed today card ── */
.trainer-card-done .trainer-done-headline h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0.75rem 0 0.4rem;
}

.trainer-card-done .trainer-done-headline p {
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.trainer-comeback {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.75rem !important;
}

.trainer-comeback-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem !important;
}

/* ── Info panel (how does it work?) ── */
.trainer-info-details {
  margin-top: 1.1rem;
  border-top: 1px solid rgba(0,0,0,0.07);
  padding-top: 0.85rem;
}

.trainer-info-summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  transition: color 0.15s;
}

.trainer-info-summary::-webkit-details-marker { display: none; }

.trainer-info-summary::before {
  content: '›';
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.2s;
  line-height: 1;
}

.trainer-info-details[open] .trainer-info-summary::before {
  transform: rotate(90deg);
}

.trainer-info-summary:hover {
  color: var(--text-dark);
}

.trainer-info-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.trainer-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.trainer-info-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 0.05rem;
}

.trainer-info-row strong {
  color: var(--text-dark);
}

/* ── Free practice badge ── */
.trainer-free-badge {
  display: inline-block;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.trainer-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0,191,99,0.12);
  overflow: hidden;
  margin: 1rem 0 1.15rem;
}

.trainer-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.trainer-question-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.trainer-question-code {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(0,191,99,0.12);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.trainer-question-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.trainer-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.trainer-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.trainer-option {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.trainer-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(0,191,99,0.05);
}

.trainer-option.correct {
  background: rgba(22,163,74,0.08);
  border-color: #16a34a;
  color: #166534;
}

.trainer-option.wrong {
  background: rgba(220,38,38,0.08);
  border-color: #dc2626;
  color: #991b1b;
}

.trainer-option:disabled {
  cursor: default;
}

.trainer-feedback {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.trainer-feedback.correct {
  color: #166534;
}

.trainer-feedback.wrong {
  color: #991b1b;
}

.trainer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.trainer-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.trainer-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trainer-summary-code {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.trainer-summary-text {
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.trainer-summary-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ── Daily Trainer page ──────────────────────────────────────────────────────*/

.dt-page {
  min-height: calc(100vh - 64px);
  background: var(--bg);
  padding: 2rem 1rem 4rem;
}

.dt-container {
  max-width: 640px;
  margin: 0 auto;
}

/* Cards */
.dt-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.dt-card-login,
.dt-card-empty,
.dt-card-start {
  background: linear-gradient(135deg, rgba(0,191,99,0.06) 0%, rgba(245,166,35,0.06) 100%);
  border-color: rgba(0,191,99,0.2);
}

.dt-card-live {
  padding: 1.5rem;
}

/* Kicker */
.dt-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(0,191,99,0.12);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Headings */
.dt-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.6rem;
  line-height: 1.25;
}

.dt-sub {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

/* CTA button */
.dt-cta {
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  width: 100%;
  justify-content: center;
}

.dt-login-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0.75rem 0 0;
}

/* Streak */
.dt-streak-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.dt-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 1.5px solid #ffb74d;
  color: #e65100;
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.dt-best-streak {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.dt-freeze-avail {
  font-size: 0.78rem;
  color: #0277bd;
  background: rgba(2,119,189,0.08);
  border: 1px solid rgba(2,119,189,0.2);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-weight: 600;
}

/* How does it work */
.dt-how {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.dt-how > summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.dt-how > summary::-webkit-details-marker { display: none; }

.dt-how > summary::before {
  content: '›';
  font-size: 1rem;
  transition: transform 0.2s;
  line-height: 1;
}

.dt-how[open] > summary::before { transform: rotate(90deg); }

.dt-how-body {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dt-how-row {
  display: flex;
  gap: 0.7rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.dt-how-row > span:first-child { flex-shrink: 0; }

.dt-how-row strong { color: var(--text-dark); }

/* Progress bar */
.dt-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.dt-progress-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dt-source-red {
  font-size: 0.72rem;
  background: rgba(220,38,38,0.08);
  color: #991b1b;
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-weight: 600;
}

.dt-source-amber {
  font-size: 0.72rem;
  background: rgba(245,166,35,0.1);
  color: #92400e;
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-weight: 600;
}

.dt-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0,191,99,0.12);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.dt-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #38d996);
  transition: width 0.4s var(--ease);
}

/* Question card */
.dt-question-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.dt-point-code {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(0,191,99,0.12);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dt-point-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.9rem;
  font-style: italic;
}

.dt-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* Options */
.dt-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dt-option {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dt-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(0,191,99,0.05);
}

.dt-option.correct {
  background: rgba(22,163,74,0.08);
  border-color: #16a34a;
  color: #166534;
  font-weight: 600;
}

.dt-option.wrong {
  background: rgba(220,38,38,0.07);
  border-color: #dc2626;
  color: #991b1b;
}

.dt-option:disabled { cursor: default; }

/* Feedback + explanation */
.dt-feedback {
  margin-top: 1rem;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
}

.dt-feedback.correct { color: #166534; }
.dt-feedback.wrong   { color: #991b1b; }

.dt-explanation {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dt-explanation > summary {
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: white;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.dt-explanation > summary::-webkit-details-marker { display: none; }

.dt-explanation > summary::before {
  content: '›';
  font-size: 1rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dt-explanation[open] > summary::before { transform: rotate(90deg); }

.dt-explanation-body {
  padding: 0.85rem 0.9rem 1rem;
  background: #fafafa;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  line-height: 1.6;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Notes rendering */
.te-bullet {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.te-dot {
  color: var(--primary-dark);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.te-warning {
  background: rgba(245,166,35,0.1);
  border-left: 3px solid #f59e0b;
  border-radius: 0 4px 4px 0;
  padding: 0.5rem 0.7rem;
  color: var(--text);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.te-line {
  color: var(--text-muted);
}

/* Next row */
.dt-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Done screen */
.dt-score {
  text-align: center;
  margin: 1rem 0;
}

.dt-score-num {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.dt-score-num span {
  font-size: 1.6rem;
  color: var(--text-muted);
}

.dt-score-msg {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.dt-comeback {
  text-align: center;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  margin: 0.5rem 0 1.5rem;
}

.dt-wrong-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.65rem;
}

.dt-wrong-list {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.dt-wrong-item {
  display: block;
  padding: 0.7rem 0.9rem;
  background: rgba(245,166,35,0.06);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.5rem;
  transition: background 0.15s;
}

.dt-wrong-item:hover { background: rgba(245,166,35,0.12); }

.dt-wrong-code {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
}

.dt-wrong-text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

/* Ghost button */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Mobile */
@media (max-width: 600px) {
  .dt-page { padding: 1rem 0.75rem 3rem; }
  .dt-card { padding: 1.25rem; }
  .dt-card-live { padding: 1rem; }
  .dt-card h1 { font-size: 1.35rem; }
  .dt-next-row { flex-direction: column-reverse; }
  .dt-next-row .btn { width: 100%; justify-content: center; }
}

/* ── end Daily Trainer ────────────────────────────────────────────────────────*/

.review-section {
  /* Spacing between sections handled below */
}

.review-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.review-spec-list, .review-mcq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-item {
  display: block;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.review-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,191,99,0.15);
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
}

.review-item-title {
  display: flex;
  gap: 0.75rem;
  font-weight: 600;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
}


.review-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.review-rag-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  opacity: 0.6;
}

.review-rag-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.review-rag-btn.review-rag-red:hover {
  background: rgba(220, 38, 38, 0.1);
}

.review-rag-btn.review-rag-amber:hover {
  background: rgba(245, 158, 11, 0.1);
}

.review-rag-btn.review-rag-green:hover {
  background: rgba(0, 166, 81, 0.1);
}

.review-item-code {
  color: var(--primary);
  font-weight: 700;
  min-width: 50px;
  flex-shrink: 0;
}

.review-item-unflag {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.review-item-unflag:hover {
  background: var(--cream-light);
  color: var(--primary);
}

.review-item-link {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.review-item-link:hover {
  color: var(--primary-dark);
  transform: translateX(2px);
}

.review-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--cream-light);
  border-radius: var(--radius);
}

.review-empty-section {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius);
}

.review-section {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.review-section:first-of-type {
  margin-top: 2rem;
}

.review-section.red {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.02);
}

.review-section.red h3 {
  color: #dc2626;
}

.review-section.red .review-item:hover {
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.review-section.amber {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.02);
}

.review-section.amber h3 {
  color: #f59e0b;
}

.review-section.amber .review-item:hover {
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.review-section.green {
  border-color: #00a651;
  background: rgba(0, 166, 81, 0.02);
}

.review-section.green h3 {
  color: #00a651;
}

.review-section.green .review-item:hover {
  border-color: #00a651;
  box-shadow: 0 2px 8px rgba(0, 166, 81, 0.15);
}

.review-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.review-section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  margin: 0;
}

.section-toggle-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: all 0.2s ease;
  font-size: 0.6rem;
  padding: 0;
  flex-shrink: 0;
}

.section-toggle-btn::before {
  content: '▼';
  font-size: 0.6rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.section-toggle-btn:hover {
  background: var(--green-pale);
  border-color: var(--primary);
}

.section-toggle-btn.collapsed::before {
  transform: rotate(-180deg);
}

.review-section h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  margin: 0;
}

.review-section-filter {
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  color: var(--text);
  min-width: 140px;
}

.review-section.red .review-section-filter { border-color: #dc2626; color: #dc2626; }
.review-section.amber .review-section-filter { border-color: #f59e0b; color: #f59e0b; }
.review-section.green .review-section-filter { border-color: #16a34a; color: #16a34a; }

.review-count {
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(0,0,0,0.08);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
}

.review-section.red .review-count {
  background: rgba(220, 38, 38, 0.15);
  color: #7f1d1d;
}

.review-section.amber .review-count {
  background: rgba(245, 158, 11, 0.15);
  color: #78350f;
}

.review-section.green .review-count {
  background: rgba(0, 166, 81, 0.15);
  color: #0a4c2e;
}

.review-empty-guide {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.review-workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.review-step {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.review-step-icon {
  font-size: 2rem;
  min-width: 2.5rem;
  text-align: center;
  line-height: 1;
}

.review-step-text {
  flex: 1;
}

.review-step-text strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.review-step-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.review-summary-card {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.05) 0%, rgba(0, 191, 99, 0.03) 100%);
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.review-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.review-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-stat {
  text-align: center;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.summary-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.summary-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.review-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.review-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
}

.review-item-title {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  flex: 1;
  font-size: 0.9rem;
}

.review-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.review-item-remove:hover {
  background: rgba(0,0,0,0.08);
  color: var(--text);
}

.review-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.btn-tiny {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-tiny:hover {
  border-color: var(--primary);
  background: rgba(0, 184, 148, 0.05);
  color: var(--primary);
}

.back-btn {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.3);
}

.back-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
  transform: translateX(-2px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Selection */
::selection { background: var(--accent-light); color: var(--primary-dark); }

/* Visually hidden (a11y) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Course main empty-state */
.course-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted);
  flex-direction: column; gap: 1.5rem;
  text-align: center; padding: 2rem;
}
.course-empty-icon {
  font-size: 4rem; opacity: 0.4;
  animation: gentle-float 3s ease-in-out infinite;
}
.course-empty p { color: var(--text-muted); font-size: 1.05rem; }

@keyframes gentle-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===== SCREEN SYSTEM ===== */
.screen { display: none; }
.screen.active { display: block; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--primary);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: 0; }
p { color: var(--text-muted); }
strong { color: var(--primary); font-weight: 600; }
em { font-style: italic; }
/* Readable measure for long-form paragraphs in body copy */
.section-header p,
.about-bio p,
.hero-sub { max-width: 62ch; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease);
  white-space: nowrap;
  line-height: 1;
  min-height: 44px; /* a11y touch target */
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; transform: translateY(-1px); }
.btn-white {
  background: white; color: var(--primary); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--accent); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; min-height: 36px; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.02rem; min-height: 52px; }
/* Translucent ghost used on dark hero/paywall backgrounds */
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-1px);
}

/* Buy button - orange and prominent */
.btn-primary[href*="lemonsqueezy"] {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3) !important;
}
.btn-primary[href*="lemonsqueezy"]:hover {
  background: #f49c1f !important;
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.4) !important;
  transform: translateY(-2px) !important;
}

/* ===== LANDING PAGE ===== */
#landing { min-height: 100vh; padding-top: 68px; }

/* NAV */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250,248,243,0.98); backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary);
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center; gap: 2rem;
  box-shadow: 0 2px 12px rgba(0,191,99,0.08);
}
.nav-brand {
  color: var(--primary); text-decoration: none;
  display: flex; align-items: center; flex-shrink: 0;
}
.nav-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-links {
  display: flex; gap: 0.5rem; align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-mobile-auth { display: none; }
/* Auth buttons hidden during loading, shown once Firebase is ready */
/* Desktop: visibility:hidden preserves nav layout so it doesn't shift */
.auth-loading [data-auth-open],
.auth-loading [data-auth-logout],
.auth-loading .nav-buy-btn { visibility: hidden; pointer-events: none; transition: none; }
/* Mobile dropdown: display:none so invisible items don't create empty lines */
.auth-loading .nav-links [data-auth-open],
.auth-loading .nav-links [data-auth-logout],
.auth-loading .nav-links .nav-buy-btn { display: none; }
[data-auth-open], [data-auth-logout], .nav-buy-btn { transition: all 0.2s ease; }
/* Reserve space in desktop nav so buttons appearing don't shift other elements */
.nav-desktop-auth { display: flex; align-items: center; }
.nav-actions { min-width: 200px; }
.nav-mobile-auth { display: none; }
.nav-actions {
  display: flex; gap: 0.75rem; align-items: center;
  flex-shrink: 0;
}
.nav-hamburger {
  display: none;
  background: white;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-weight: bold;
}
.nav-hamburger:hover { background: var(--bg-soft, #f4f1ea); color: var(--text); }
.nav-link {
  position: relative;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 600;
  padding: 0.35rem 0.1rem;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px; background: var(--primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active-page { color: var(--primary); font-weight: 700; }
.nav-link.active-page::after { transform: scaleX(1); }

/* EXAM COUNTDOWN */
.exam-countdown-banner {
  background: var(--accent-light);
  color: var(--text);
  padding: 1.1rem 1.25rem;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.countdown-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.countdown-content { flex: 1; }
.countdown-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.countdown-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(3,163,86,0.5); }
  50%       { opacity: 0.6; transform: scale(1.25); box-shadow: 0 0 0 5px rgba(3,163,86,0); }
}
.countdown-message {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.countdown-timers {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.countdown-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.countdown-blocks {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}
.cblock {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
}
.cblock.expired {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.cnum {
  font-size: 1.75rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  min-width: 1.8ch;
  display: inline-block;
  text-align: right;
}
.cunit {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.countdown-separator {
  color: var(--border-strong);
  font-size: 1.5rem;
  font-weight: 300;
  align-self: center;
  margin-top: 1rem;
}
.countdown-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: var(--primary);
  color: white;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 14px rgba(3,163,86,0.25);
}
.countdown-cta:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(3,163,86,0.35);
}

/* LEAD MAGNET BANNER */
.lead-magnet-banner {
  display: block;
  background: var(--accent-light);
  border-bottom: 2px solid var(--accent);
  padding: 14px 20px;
}

.lead-magnet-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.lead-magnet-icon { font-size: 20px; flex-shrink: 0; }

.lead-magnet-inner > div { flex: 1; }

.lead-magnet-cta {
  flex-shrink: 0;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s;
}

.lead-magnet-cta:hover { opacity: 0.8; }

@media (max-width: 640px) {
  .lead-magnet-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .lead-magnet-icon { font-size: 24px; }
}

/* HERO */
.hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(22,163,74,0.25), transparent 35%),
    radial-gradient(circle at 20% 90%, rgba(245,166,35,0.15), transparent 45%),
    linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  padding: 6rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
}
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero h1 { color: white; margin-bottom: 1.25rem; font-weight: 700; }
.hero h1 em { font-style: italic; opacity: 0.85; }
.hero-sub {
  font-size: 1.18rem; color: var(--accent);
  max-width: 620px; margin: 0 auto 1.5rem; line-height: 1.6;
  font-weight: 700;
}
.hero-checklist {
  list-style: none; padding: 0; margin: 0 auto 2.5rem;
  max-width: 560px;
  display: flex; flex-direction: column; gap: 0.7rem;
  text-align: left;
}
.hero-checklist li {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 1rem; color: rgba(255,255,255,0.92); line-height: 1.5;
}
.hero-checklist li > span { flex: 1; min-width: 0; }
.hero-checklist li strong { color: white; }
.hero-checklist li::before {
  content: '✓';
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  margin-top: 0.05rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-tags {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center;
}
/* REMOVED: hero-tags no longer used */

/* PROOF BAR */
.proof-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1.25rem 2rem;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 1.75rem;
  border-top: 1px solid rgba(0,191,99,0.2);
  border-bottom: 1px solid rgba(0,191,99,0.15);
}
.proof-item {
  display: flex; align-items: center; gap: 0.6rem;
  color: rgba(255,255,255,0.9); font-size: 0.9rem; font-weight: 500;
}
.proof-item span:first-child {
  font-size: 0.78rem;
  width: 1.5rem; height: 1.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* SECTIONS */
.section { padding: 5rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { color: var(--primary); margin-bottom: 0.75rem; }
.section-header p { font-size: 1.05rem; max-width: 580px; margin: 0 auto; color: var(--text-muted); }

/* FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem;
  border-radius: var(--radius);
  background: var(--green-pale);
  color: var(--primary);
  margin-bottom: 1.1rem;
}
.feature-icon svg { width: 1.5rem; height: 1.5rem; }
.feature-card h3 {
  color: var(--primary);
  margin-bottom: 0.5rem; font-size: 1.15rem;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.005em;
}
.feature-card p { font-size: 0.93rem; line-height: 1.65; color: var(--text-muted); }

/* TOPICS PREVIEW */
.topics-list { max-width: 720px; margin: 0 auto; }
.topic-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 1.5rem;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease),
              border-color 0.2s var(--ease);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.topic-row::after {
  content: '→';
  position: absolute; right: 1.5rem; top: 50%; transform: translate(-6px, -50%);
  color: var(--text-light); opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  font-size: 1.05rem;
  pointer-events: none;
}
.topic-row:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.topic-left { display: flex; align-items: center; gap: 1rem; }
.topic-num {
  background: var(--accent-light); color: var(--accent);
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 1.05rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(245,166,35,0.15);
}
.topic-info h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); font-family: 'DM Sans', sans-serif; }
.topic-info p { font-size: 0.82rem; color: var(--text-light); margin: 0; }
.badge {
  padding: 0.3rem 0.75rem; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.badge-free { background: var(--accent-light); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(245,166,35,0.3); }
.badge-paid { background: rgba(0,191,99,0.08); color: var(--primary); box-shadow: inset 0 0 0 1px rgba(0,191,99,0.2); }

/* PRICING */
.pricing-section { background: #1a6d4a; color: white; }
.pricing-card {
  max-width: 520px; margin: 0 auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: white;
  text-align: center;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.5);
}
.price-amount {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem; font-weight: 700;
  color: #fff; line-height: 1;
  margin-bottom: 0.25rem;
}
.price-note { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin-bottom: 2rem; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 2rem; }
.pricing-features li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85); font-size: 0.95rem;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before {
  content: '✓'; color: white;
  font-weight: 700; flex-shrink: 0;
}
.pricing-trust {
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
  margin-top: 1.25rem;
}

/* ABOUT */
.about-section { background: var(--cream-dark); padding-top: 7rem; }
.about-grid {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 4rem; align-items: start;
  max-width: 900px; margin: 0 auto;
}
.about-photo {
  width: 100%; aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: var(--primary-light);
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
}
.about-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--primary); margin-bottom: 0.25rem;
}
.about-role {
  font-size: 0.9rem; color: var(--text-muted);
  font-weight: 600; margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid var(--accent);
}
.about-bio p {
  margin-bottom: 1rem; font-size: 0.97rem; line-height: 1.75;
  color: var(--text-muted);
}
.about-bio p:last-child { margin-bottom: 0; }

/* About page — credentials badges */
.about-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.credential-badge {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--accent-light);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
}
.credential-icon { font-size: 1.25rem; flex-shrink: 0; }
.credential-title { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.credential-school { font-size: 0.8rem; color: var(--text-muted); }

/* Why I built this — 3-col grid */
.why-built-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}
.why-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.why-card::before {
  content: '';
  position: absolute;
  opacity: 0.06;
  background-size: 140px;
  background-repeat: no-repeat;
  bottom: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  pointer-events: none;
}
.why-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; position: relative; z-index: 1; }
.why-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.why-card p { font-size: 0.92rem; line-height: 1.7; color: var(--text-muted); margin: 0; position: relative; z-index: 1; max-width: 90%; margin-left: auto; margin-right: auto; }

/* ABOUT PAGE & FAQ HERO */
.about-page-hero {
  position: relative;
  overflow: hidden;
}
.about-page-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 300px;
  height: 300px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.04;
  pointer-events: none;
}
.about-page-hero .section-inner {
  position: relative;
  z-index: 1;
}
#faq .about-page-hero::before {
  top: 20px;
  right: -30px;
}
.about-page-hero {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--border);
  padding-top: 74px; /* clear fixed nav */
}

.problems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto;
}
.problem-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.problem-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.problem-card-top {
  background: var(--cream-dark);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex: 1;
  text-align: center;
}
.problem-emoji {
  font-size: 1.75rem;
  line-height: 1;
}
.problem-card-top p {
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.problem-card-bottom {
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 2px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.problem-card-bottom strong { color: var(--text); }
.problem-fix-icon {
  flex-shrink: 0;
  width: 1.25rem; height: 1.25rem;
  background: var(--primary);
  border-radius: 50%;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.1rem;
}

/* CONTACT */
.contact-section { background: var(--cream-dark); }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact-email-link {
  color: var(--primary); font-weight: 600;
  text-decoration: none;
}
.contact-email-link:hover { text-decoration: underline; color: var(--primary-dark); }
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-size: 0.88rem;
  font-weight: 600; color: var(--text);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  background: white; color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: var(--focus-ring);
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.contact-success {
  display: none;
  background: var(--green-pale); color: var(--green);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center; font-weight: 500;
  margin-top: 1rem;
}

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-q {
  width: 100%; background: white;
  border: none; padding: 1.1rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 0.97rem; font-weight: 600;
  color: var(--text); text-align: left;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--green-pale); }
.faq-q.open { background: var(--green-pale); color: var(--green); }
.faq-arrow { font-size: 1rem; transition: transform 0.2s; flex-shrink: 0; }
.faq-q.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 1rem 1.5rem 1.25rem;
  background: white;
  border-top: 1px solid var(--border);
  font-size: 0.93rem; color: var(--text-muted); line-height: 1.65;
}
.faq-a.open { display: block; }

/* AUTH MODAL */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 25, 17, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 300;
}
.auth-modal.open { display: flex; }
.auth-panel {
  position: relative;
  width: min(100%, 460px);
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(214,162,63,0.25);
}
.auth-kicker {
  display: inline-flex;
  background: var(--amber-light);
  color: var(--amber-dark);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.auth-panel h2 {
  color: var(--green);
  font-size: 1.8rem;
  margin-bottom: 0.7rem;
}
.auth-copy {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.auth-form { display: grid; gap: 0.75rem; }
.auth-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.auth-actions .btn { flex: 1 1 150px; justify-content: center; }
.auth-status {
  margin-top: 0.9rem;
  padding: 0.8rem 0.95rem;
  background: var(--amber-light);
  color: var(--amber-dark);
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}
.auth-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: white;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.auth-close:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
  transform: rotate(90deg);
}


/* ACCOUNT MODAL */
.account-panel {
  width: min(100%, 540px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem 1.75rem 1.5rem;
}
.account-content { display: flex; flex-direction: column; }
.acct-loading { text-align: center; color: var(--text-muted); padding: 2rem 0; }
.acct-empty { text-align: center; padding: 2rem 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.acct-header {
  text-align: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}
.acct-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}
.acct-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.acct-email { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.acct-meta  { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.75rem; }
.acct-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
}
.acct-badge--full    { background: rgba(0,191,99,0.12); color: var(--primary-dark); }
.acct-badge--limited { background: var(--accent-light); color: #92400e; }

.acct-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.acct-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.acct-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.acct-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.25rem;
}
.acct-overall-pct { font-weight: 700; color: var(--primary-dark); }

.acct-topics { display: flex; flex-direction: column; gap: 0.1rem; }
.acct-topic-row {
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s var(--ease);
}
.acct-topic-row--clickable { cursor: pointer; }
.acct-topic-row--clickable:hover { background: var(--cream-dark); }
.acct-topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.acct-topic-name { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.acct-topic-pct  { font-size: 0.8rem; font-weight: 700; color: var(--primary-dark); }
.acct-locked-badge { font-size: 0.75rem; color: var(--text-light); }
.acct-topic-counts { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }

.acct-actions-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.acct-actions-section .btn { justify-content: center; }
.acct-delete-btn { color: #dc2626 !important; border-color: #fca5a5 !important; }
.acct-delete-btn:hover { background: #fef2f2 !important; border-color: #dc2626 !important; }
.acct-reset-hint { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; margin: 0.25rem 0 0; }

/* VIDEO SECTION */
.video-container {
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* FOOTER — landing-footer removed; all pages now use .page-footer */

/* ===== COURSE SCREEN ===== */
#course {
  display: none;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding-top: 74px; /* clear the fixed landing-nav */
}
#course.active { display: flex; }

.course-header {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,191,99,0.12);
}
.course-header-left {
  display: flex; align-items: center; gap: 1rem;
}
.course-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 700; color: white;
  white-space: nowrap;
}
.course-brand em { font-style: italic; }
.progress-wrap {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(0, 184, 148, 0.08);
  border-radius: 8px;
  margin-bottom: 1rem;
  visibility: visible !important;
}
.progress-title {
  font-size: 0.85rem; font-weight: 700;
  color: var(--text); text-transform: uppercase;
  letter-spacing: 0.3px;
}
.progress-bar-track {
  width: 100%;
  height: 12px;
  background: rgba(0, 184, 148, 0.2);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  visibility: visible !important;
}
.progress-bar-fill {
  height: 100%;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
}

.progress-segment {
  height: 100%;
  min-width: 0;
  flex-shrink: 0;
}

.progress-segment.red {
  background: #dc2626;
}

.progress-segment.amber {
  background: #f59e0b;
}

.progress-segment.green {
  background: #00a651;
}

.progress-segment.unmarked {
  background: #d1d5db;
  transition: width 0.3s ease-out;
  box-shadow: 0 0 6px rgba(0, 184, 148, 0.4);
  display: block !important;
}
.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: normal;
  line-height: 1.3;
  visibility: visible !important;
  display: block !important;
}
.progress-label > div:first-child {
  margin-bottom: 0.5rem;
}
.progress-percentage {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 0.5rem;
}
.progress-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.progress-reset-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.progress-reset-btn:hover {
  background-color: rgba(0, 184, 148, 0.2);
}
.course-header-right { display: flex; gap: 0.75rem; align-items: center; }
.review-btn-prominent {
  background: var(--accent) !important;
  color: white !important;
  font-weight: 700 !important;
  border: none !important;
}
.review-btn-prominent:hover {
  background: #f49c1f !important;
  transform: translateY(-2px);
}

.course-body {
  display: flex; flex: 1; overflow: hidden;
}

/* SIDEBAR */
.sidebar {
  width: 280px; flex-shrink: 0;
  background: linear-gradient(180deg, white 0%, var(--cream) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
}
.sidebar-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar > .progress-wrap {
  flex-shrink: 0;
}
.sidebar-search input {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.sidebar-search input:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: var(--focus-ring);
}
.sidebar-practicals-btn {
  display: none;
}
.sidebar-close-btn {
  display: none;
}
.sidebar-review {
  margin: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fffdf5;
}
.review-panel-progress {
  background: linear-gradient(135deg, rgba(34, 139, 34, 0.08) 0%, rgba(0, 191, 99, 0.05) 100%);
  border: 1px solid rgba(0, 191, 99, 0.3);
  border-radius: 6px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.progress-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.progress-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

.progress-focus-warning {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(220, 38, 38, 0.2);
}

.review-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.75rem;
}
.review-head h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 700;
}
.review-summary {
  font-size: 0.78rem;
  color: var(--text-light);
}
.review-topic-list, .review-point-list {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.review-topic-item, .review-point-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  text-align: left;
  cursor: pointer;
  padding: 0.6rem 0.7rem;
}
.review-topic-item:hover, .review-point-item:hover { border-color: var(--amber); }
.review-topic-title {
  display: flex; justify-content: space-between; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700; color: var(--text);
}
.review-topic-subtitle, .review-point-subtitle {
  font-size: 0.75rem; color: var(--text-light); margin-top: 0.2rem;
}
.review-score {
  font-size: 0.72rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--amber-light);
  color: var(--amber-dark);
  flex-shrink: 0;
}
.review-empty {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 0.5rem 0;
  scroll-behavior: smooth;
}
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(0,191,99,0.3);
  border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(0,191,99,0.5);
}
.topic-group { }
.topic-toggle {
  width: 100%; padding: 0.75rem 0.75rem;
  background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase; letter-spacing: 0.4px;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.topic-toggle:hover {
  background: rgba(0,191,99,0.04);
  border-bottom-color: var(--primary-light);
}
.topic-toggle.open {
  border-bottom-color: var(--primary);
}
.topic-toggle-centered {
  justify-content: center;
}
.topic-toggle-centered .topic-toggle-arrow {
  position: absolute;
  right: 0.75rem;
}
.topic-toggle-arrow { font-size: 0.7rem; transition: transform 0.2s; color: var(--text-muted); }
.topic-toggle.open .topic-toggle-arrow { transform: rotate(180deg); }
.subtopic-list { display: none; }
.subtopic-list.open { display: block; }
.subtopic-btn {
  width: 100%; padding: 0.5rem 0.75rem 0.5rem 1.5rem;
  background: none; border: none; border-left: 3px solid transparent;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem; color: var(--text-muted);
  text-align: left; transition: all 0.15s;
}
.subtopic-btn:hover:not(.locked) { background: rgba(245,166,35,0.1); color: var(--accent); }
.subtopic-btn.active {
  background: rgba(0,191,99,0.12); color: var(--primary);
  border-left-color: var(--primary); font-weight: 700;
}
.subtopic-btn.locked { cursor: not-allowed; color: var(--text-light); }
.subtopic-indicators { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; }

/* MAIN CONTENT */
.course-main {
  flex: 1; overflow-y: auto;
  padding: 3rem 1.5rem 1.5rem 1.5rem;
  background: var(--cream);
}
.subtopic-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.subtopic-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--green);
  flex: 1;
  margin-bottom: 0;
}
.subtopic-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.set-all-rag {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}
.set-all-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
  white-space: nowrap;
}
.set-all-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.25rem;
  border-radius: 4px;
  line-height: 1;
  transition: transform 0.15s, background 0.15s;
}
.set-all-btn:hover {
  transform: scale(1.25);
  background: rgba(0,0,0,0.06);
}
.subtopic-reset-btn {
  background: none;
  border: 1px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.subtopic-reset-btn:hover {
  background-color: rgba(0, 184, 148, 0.1);
  border-color: var(--primary);
}
.subtopic-code {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-light); letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 0.25rem;
}
.subtopic-description {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background-color: rgba(0, 184, 148, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
}

/* SPEC POINT CARD */
.spec-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s;
}
.spec-card:hover {
  box-shadow: var(--shadow-md);
}
.spec-card.rag-red {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.03);
}

.spec-card.rag-amber {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.03);
}

.spec-card.rag-green {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.03);
}

.spec-card.flagged {
  border-color: var(--accent);
  background: rgba(245,166,35,0.02);
}

/* RAG buttons in spec card header */
.rag-btn {
  font-size: 0.75rem; font-weight: 600; padding: 0.4rem 0.7rem;
  border: 2px solid var(--border); background: white;
  border-radius: 4px; cursor: pointer; transition: all 0.2s;
  color: var(--text-muted); flex-shrink: 0;
}
.rag-btn-red {
  border-color: #dc2626;
}
.rag-btn-amber {
  border-color: #f59e0b;
}
.rag-btn-green {
  border-color: #16a34a;
}
.rag-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}
.rag-btn.active {
  color: white; font-weight: 700;
}
.rag-btn-red.active {
  background: #dc2626; border-color: #dc2626;
}
.rag-btn-amber.active {
  background: #f59e0b; border-color: #f59e0b;
}
.rag-btn-green.active {
  background: #16a34a; border-color: #16a34a;
}

/* Arrow buttons in review items */
.review-item-arrows {
  display: flex; gap: 0.35rem; flex-shrink: 0;
}
.arrow-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--border); background: white;
  border-radius: 4px; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; color: var(--text-muted);
  padding: 0; flex-shrink: 0; text-decoration: none;
}
.arrow-btn:hover {
  border-color: var(--primary); color: var(--primary);
  background: rgba(0, 184, 148, 0.08);
}
.arrow-study {
  background: transparent !important; color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important; font-weight: 600;
  gap: 0.4rem; width: auto; height: auto; padding: 0.45rem 0.85rem;
  border-radius: 6px; transition: all 0.15s;
}
.arrow-study:hover {
  border-color: var(--primary-dark) !important; background: rgba(0, 191, 99, 0.1) !important;
  color: var(--primary-dark) !important;
}
.spec-header {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.spec-header:hover {
  background: rgba(0,191,99,0.12);
  padding-left: 1.4rem;
  box-shadow: inset 2px 0 0 var(--primary);
}
.spec-code-badge {
  background: var(--primary); color: white;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  flex-shrink: 0; margin-top: 0.1rem;
  font-family: 'DM Sans', monospace;
}
.spec-text {
  flex: 1; font-size: 0.93rem; color: var(--text);
  font-weight: 500; line-height: 1.5;
}
.spec-header-actions {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.review-btn {
  width: 1.75rem; height: 1.75rem; border-radius: 4px;
  border: 1.5px solid var(--border); background: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; transition: all 0.2s; flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.75;
}
.review-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245,166,35,0.05);
  opacity: 1;
}
.review-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
  opacity: 1;
  box-shadow: 0 0 8px rgba(245,166,35,0.4);
}
.tick-btn {
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  border: 2px solid var(--border); background: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: all 0.2s; flex-shrink: 0;
}
.tick-btn.done {
  background: var(--primary); border-color: var(--primary); color: white;
}
.tick-btn:hover:not(.done) { border-color: var(--primary); }
.tick-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.expand-btn {
  display: none;
}

.spec-body { display: none; border-top: 1px solid var(--border); }
.spec-body.open { display: block; }

/* VIDEO SLOT */
.video-slot {
  display: none;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #f8f8f6;
}
.video-placeholder {
  background: var(--green-pale);
  border: 2px dashed var(--green-mid);
  border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
  color: var(--green-light);
}
.video-placeholder p { color: var(--green-light); font-size: 0.85rem; margin-bottom: 0.75rem; }
.video-url-input {
  display: flex; gap: 0.5rem; margin-top: 0.75rem;
}
.video-url-input input {
  flex: 1; padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius); font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem; outline: none;
  background: white;
}
.video-url-input input:focus { border-color: var(--green); }
.video-url-input button {
  padding: 0.45rem 0.9rem;
  background: var(--amber); color: var(--green-dark); border: none;
  border-radius: var(--radius); cursor: pointer;
  font-size: 0.82rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}
.video-embed { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); border: none; }

/* NOTES */
.spec-notes {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(250,248,243,0.5);
}
.spec-notes h4 {
  font-size: 0.75rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase;
  letter-spacing: 0.6px; margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
}
.notes-content { font-size: 0.93rem; line-height: 1.8; color: var(--text); }
.notes-content p { margin-bottom: 0.6rem; }
.notes-content p:last-child { margin-bottom: 0; }
.notes-content ul, .notes-content ol { padding-left: 1.4rem; margin: 0.25rem 0 0.75rem; }
.notes-content li { margin-bottom: 0.35rem; }
.notes-content .nested-list { padding-left: 1.25rem; margin: 0.2rem 0 0.2rem; list-style-type: circle; }
.notes-content strong { color: var(--primary); font-weight: 700; }
.notes-content .exam-tip {
  margin-top: 1rem; padding: 0.75rem 1rem;
  background: #fff8e1; border-left: 3px solid #f59e0b;
  border-radius: 0 6px 6px 0; font-size: 0.9rem; line-height: 1.6;
}
.notes-content .exam-tip strong { color: #92400e; }
.notes-placeholder { color: var(--text-muted); font-style: italic; font-size: 0.9rem; }
.notes-content .eq {
  display: inline-block;
  background: rgba(0,191,99,0.1); color: var(--primary);
  padding: 0.15rem 0.5rem; border-radius: 4px;
  font-family: 'DM Sans', monospace; font-size: 0.88em;
  font-weight: 600; border: 1px solid rgba(0,191,99,0.3);
}
.practical-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #e8f0fe; color: #2563eb;
  padding: 0.15rem 0.6rem; border-radius: 4px;
  font-size: 0.82em; font-weight: 600;
  cursor: pointer; border: none; font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}
.practical-link:hover { background: #bfcffb; }

/* QUIZ */
.spec-quiz {
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(0,191,99,0.04) 0%, rgba(245,166,35,0.02) 100%);
  border-top: 1px solid var(--border);
}
.spec-quiz h4 {
  font-size: 0.8rem; font-weight: 700;
  color: var(--primary); text-transform: uppercase;
  letter-spacing: 0.6px; margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
}
.quiz-progress {
  font-size: 0.8rem; color: var(--text-light);
  margin-bottom: 0.75rem;
}
.quiz-question {
  font-size: 0.93rem; font-weight: 500;
  color: var(--text); margin-bottom: 0.75rem; line-height: 1.5;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.quiz-opt {
  width: 100%; padding: 0.75rem 1rem;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  color: var(--text); text-align: left; transition: all 0.15s;
  font-weight: 500;
}
.quiz-opt:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(0,191,99,0.12);
  transform: translateX(6px);
  box-shadow: 0 2px 6px rgba(0,191,99,0.15);
}
.quiz-opt.correct {
  background: #d1f4e8;
  border-color: #00a651;
  color: #006e3f;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #00a651;
}
.quiz-opt.wrong {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #dc2626;
}
.quiz-opt:disabled { cursor: default; }
.quiz-feedback {
  font-size: 0.85rem; font-weight: 600; margin-bottom: 0.75rem;
  display: none;
}
.quiz-feedback.correct { color: #16a34a; display: block; }
.quiz-feedback.wrong { color: #dc2626; display: block; }
.quiz-nav { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.quiz-reset-btn {
  font-size: 0.95rem; color: var(--text-light);
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 1.2rem;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  margin-top: 1.5rem; display: block; margin-left: auto; margin-right: auto;
}
.quiz-reset-btn:hover { color: var(--green); border-color: var(--green); }

/* PAYWALL */
.paywall-panel {
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  padding: 3rem; text-align: center; color: white;
  max-width: 480px; margin: 2rem auto;
}
.paywall-panel h3 { color: var(--accent); margin-bottom: 0.75rem; font-size: 1.4rem; }
.paywall-panel p { color: rgba(255,255,255,0.8); margin-bottom: 1rem; font-size: 0.95rem; }
.paywall-features {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  text-align: left; display: inline-block;
}
.paywall-features li {
  color: rgba(255,255,255,0.85); font-size: 0.9rem;
  padding: 0.3rem 0 0.3rem 1.5rem; position: relative;
}
.paywall-features li::before {
  content: '✓'; color: var(--primary-light);
  position: absolute; left: 0; font-weight: 700;
}
.paywall-divider {
  border: none; border-top: 1px solid rgba(255,255,255,0.12);
  margin: 1.5rem 0 1.25rem;
}

/* ===== PRACTICALS SCREEN ===== */
#practicals {
  display: none;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding-top: 74px; /* clear fixed nav */
}
#practicals.active { display: flex; }

.practicals-header {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center; gap: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,191,99,0.12);
}
.practicals-header-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem; font-weight: 700; color: white;
}

.practicals-body {
  flex: 1; overflow-y: auto;
  padding: 2rem;
  background: var(--cream);
  display: flex; flex-direction: column; gap: 1.5rem;
}

/* CORMS intro box */
.corms-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}
.corms-box h2 {
  font-size: 1.2rem; margin-bottom: 1.25rem;
  color: var(--primary);
}
.corms-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
@media (max-width: 900px) {
  .corms-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .corms-grid { grid-template-columns: repeat(2, 1fr); }
}
.corms-tile {
  background: rgba(0,191,99,0.06);
  border: 1.5px solid rgba(0,191,99,0.2);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-align: center;
}
.corms-letter {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem; font-weight: 700;
  color: var(--primary); line-height: 1;
  margin-bottom: 0.4rem;
}
.corms-title {
  font-size: 0.78rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.2rem;
  font-family: 'DM Sans', sans-serif;
}
.corms-desc {
  font-size: 0.72rem; color: var(--text-muted);
  line-height: 1.4;
  font-family: 'DM Sans', sans-serif;
}

/* General advice box */
.advice-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}
.advice-box h3 {
  font-size: 1rem; margin-bottom: 0.85rem;
  color: var(--primary);
}
.advice-box ul {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.advice-box li {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
}

/* Individual practical cards */
.practical-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  overflow: hidden;
}
.practical-toggle {
  width: 100%; display: flex; align-items: center;
  gap: 1rem; padding: 1rem 1.5rem;
  background: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  text-align: left;
  transition: background 0.15s;
}
.practical-toggle:hover { background: rgba(0,191,99,0.04); }
.practical-num {
  background: var(--primary); color: white;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}
.practical-toggle-title {
  flex: 1; font-size: 0.95rem; font-weight: 600;
  color: var(--text);
}
.practical-arrow {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text-light);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.practical-toggle.open .practical-arrow { transform: rotate(180deg); }
.practical-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  flex-direction: column; gap: 1.25rem;
}
.practical-body.open { display: flex; }
.practical-section { }
.practical-section-title {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--primary); margin-bottom: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}
.practical-section p,
.practical-section li {
  font-size: 0.88rem; color: var(--text-muted);
  line-height: 1.6; font-family: 'DM Sans', sans-serif;
}
.practical-section ul,
.practical-section ol {
  padding-left: 1.25rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}

/* CORMS analysis inside practical */
.corms-analysis {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.corms-row {
  display: flex; gap: 0.85rem; align-items: flex-start;
  background: rgba(0,191,99,0.04);
  border: 1px solid rgba(0,191,99,0.15);
  border-radius: var(--radius); padding: 0.6rem 0.85rem;
}
.corms-row-letter {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--primary); flex-shrink: 0;
  width: 1.2rem; text-align: center;
}
.corms-row-content {
  font-size: 0.85rem; color: var(--text-muted);
  line-height: 1.5; font-family: 'DM Sans', sans-serif;
}

/* Practical detail view (single practical rendered in main) */
.practical-detail {
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.5rem;
}

/* ===== SPEC CARD EXPAND ARROW ===== */
.spec-expand-arrow {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-left: 0.25rem;
  transition: transform 0.2s;
  user-select: none;
  flex-shrink: 0;
}

/* ===== QUIZ DOT PROGRESS ===== */
.quiz-progress-dots {
  display: flex; gap: 0.4rem; align-items: center;
  margin-bottom: 0.85rem;
}
.quiz-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.quiz-dot.active {
  background: var(--primary);
  transform: scale(1.3);
}
.quiz-dot.done { background: var(--accent); }
.quiz-dot.done.correct { background: #16a34a; }
.quiz-dot.done.wrong   { background: #dc2626; }
.quiz-done-msg {
  font-size: 0.85rem; font-weight: 600;
}
.quiz-done-correct { color: #00a651; }
.quiz-done-wrong   { color: #d97706; }

/* ===== VIDEO PLACEHOLDER (collapsed) ===== */
.video-placeholder-collapsed {
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.video-add-btn {
  background: none; border: none;
  color: var(--text-light); font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; padding: 0;
  transition: color 0.15s;
}
.video-add-btn:hover { color: var(--primary); }
.video-url-input {
  display: flex; gap: 0.5rem; align-items: center;
  flex-wrap: wrap; padding-top: 0.5rem;
}
.video-url-input input {
  flex: 1; min-width: 160px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 0.8rem; font-family: 'DM Sans', sans-serif;
}
.video-url-input button {
  padding: 0.35rem 0.7rem;
  background: var(--green); color: white;
  border: none; border-radius: 4px;
  cursor: pointer; font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
}
.btn-cancel-video {
  background: none \!important; color: var(--text-light) \!important;
  border: 1px solid var(--border) \!important;
}

/* ===== SIDEBAR ACTIVE STATE ===== */
.subtopic-btn.active {
  background: rgba(0,191,99,0.12);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
}

/* ===== MOBILE HAMBURGER ===== */
.sidebar-toggle-btn {
  display: none;
  background: none; border: none;
  font-size: 1.4rem; cursor: pointer;
  color: white; padding: 0.2rem 0.4rem;
  line-height: 1;
}

/* ===== FOOTER ===== */
.page-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo {
  height: 36px;
  width: auto;
  opacity: 0.85;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== RESPONSIVE — TABLET / MOBILE ===== */
@media (max-width: 768px) {

  /* ── Nav ── */
  .landing-nav {
    padding: 0 1rem;
    height: 60px;
    gap: 0.75rem;
  }
  .nav-logo { height: 34px; }
  /* Mobile nav dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(250,248,243,0.99);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--primary);
    flex-direction: column;
    padding: 0.25rem 1.25rem 0.75rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .nav-links .nav-link::after { display: none; }
  .nav-links .nav-link:last-child { border-bottom: none; }
  .nav-hamburger { display: block; }
  .nav-desktop-auth { display: none !important; }
  .nav-actions {
    min-width: unset;
    margin-left: auto; /* push hamburger to far right on mobile */
  }
  .nav-links .nav-mobile-auth {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    border-left: none; border-right: none; border-top: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
  }
  .nav-links .nav-mobile-auth:last-child { border-bottom: none; }

  /* ── Landing page clear fixed nav ── */
  #landing { padding-top: 60px; }
  #course, #practicals { padding-top: 60px; }
  #review { padding-top: 60px; }

  /* ── Hero ── */
  .hero {
    padding: 2rem 1.25rem 2.5rem;
    min-height: auto;
    text-align: left;
  }
  .hero-inner { max-width: 100%; }
  .hero h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: 0.6rem;
  }
  .hero-sub {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }
  .hero-checklist {
    max-width: 100%;
    margin-bottom: 1.75rem;
    gap: 0.55rem;
  }
  .hero-checklist li { font-size: 0.9rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 0.65rem; margin-bottom: 0; }
  .hero-ctas .btn { text-align: center; width: 100%; justify-content: center; }

  /* ── Sections ── */
  .section { padding: 3rem 1rem; }
  .about-section { padding-top: 6rem; } /* clear fixed 60px nav */
  .section-inner { max-width: 100%; }
  .section-header { margin-bottom: 1.75rem; }
  .section-header h2 { font-size: 1.55rem; }
  .section-header p { font-size: 0.95rem; }

  /* ── Features ── */
  .features-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* ── Topics / What's Covered ── */
  .topic-row {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
  }
  .topic-row::after { display: none; }
  .topic-left { flex: 1; min-width: 0; }
  .badge { font-size: 0.7rem; }
  .topic-info h4 { font-size: 0.92rem; }
  .topic-info p  { font-size: 0.82rem; }
  .topic-num { font-size: 1.3rem; }

  /* ── Why built grid ── */
  .why-built-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* ── About — stack photo above text ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .about-name { font-size: 1.55rem; }
  .about-bio p { font-size: 0.94rem; }
  .about-photo {
    max-width: min(200px, 80vw);
    margin: 0 auto;
    display: block;
  }

  /* ── Pricing ── */
  .pricing-card { padding: 2rem 1.25rem; }
  .price-amount { font-size: 2.75rem; }
  .pricing-features li { font-size: 0.92rem; }
  .pricing-card .btn { width: 100%; justify-content: center; }

  /* ── Footer ── */
  .page-footer { padding: 1.5rem 1rem; margin-top: 2rem; }
  .footer-content { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-content > div:last-child { width: 100%; flex-direction: row !important; justify-content: flex-start; }

  /* ── Course sidebar ── */
  .sidebar-toggle-btn { display: block; }
  .course-header {
    padding: 0.7rem 1rem;
    gap: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
  }
  .course-header-left {
    flex: 1;
    min-width: 0;
  }
  .course-header-right {
    flex-shrink: 0;
  }
  .course-brand  { font-size: 0.9rem; }
  .course-body { flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Full-screen overlay sidebar on mobile */
  .sidebar {
    position: fixed;
    inset: 0;
    width: 100%;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: none;
    border-bottom: none;
    background: white;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 1rem 1rem 0.5rem;
    align-self: flex-start;
    flex-shrink: 0;
  }
  .sidebar-close-btn:hover { color: var(--text); }
  .sidebar > .progress-wrap,
  .sidebar-search {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
  .sidebar-search {
    position: sticky;
    top: 0;
    z-index: 2;
    background: white;
  }
  .course-main { padding: 1rem 1rem 1.5rem; min-height: auto; overflow-y: auto; }
  .subtopic-title-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .subtopic-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .set-all-rag {
    flex-wrap: wrap;
    flex: 1;
    padding: 0.4rem 0.55rem;
  }
  .subtopic-reset-btn {
    width: 44px;
    height: 44px;
  }

  /* ── Cards ── */
  .spec-card { border-radius: 14px; }
  .spec-header {
    padding: 0.9rem 1rem;
    gap: 0.65rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .spec-header:hover {
    padding-left: 1rem;
  }
  .spec-header-actions {
    width: 100%;
    margin-top: 0.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.45rem;
  }
  .spec-code-badge { font-size: 0.72rem; padding: 0.15rem 0.45rem; }
  .spec-text { font-size: 0.9rem; }
  .rag-btn {
    min-height: 44px;
    padding: 0.5rem 0.85rem;
  }
  .quiz-opt { font-size: 0.9rem; padding: 0.7rem 0.8rem; min-height: 48px; }
  .review-btn { width: 2.4rem; height: 2.4rem; font-size: 0.95rem; }
  .arrow-btn { width: 44px; height: 44px; }
  .paywall-panel { padding: 2rem 1.25rem; margin: 1rem; }
  .progress-wrap { margin: 0; padding: 0.75rem 1rem; }
  .practicals-body { padding: 1rem; gap: 1rem; }
  .corms-grid { grid-template-columns: repeat(3, 1fr); }

  /* ── Flowchart ── */
  .system-flowchart      { max-width: 100%; }
  .flowchart-step        { padding: 1.5rem 1.25rem; }
  .step-icon             { font-size: 2.5rem; margin: 0.5rem 0 0.75rem; }
  .flowchart-step h3     { font-size: 1rem; }
  .flowchart-step p      { font-size: 0.9rem; }
  .flowchart-arrow       { font-size: 1.25rem; margin: -6px 0; }

  /* ── Review page ── */
  .review-body           { padding: 1rem; }
  .review-controls       { gap: 0.75rem; margin-bottom: 1.25rem; }
  .review-filter         { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .review-filter select  { width: 100%; }
  .review-header         { padding: 0.75rem 1rem; }
  .review-header-title   { font-size: 1.05rem; }
  .trainer-card { padding: 1rem; }
  .trainer-header,
  .trainer-progress-row,
  .trainer-summary-top { flex-direction: column; }
  .trainer-header .btn,
  .trainer-summary-top .btn { width: 100%; justify-content: center; }
  .trainer-stats { grid-template-columns: 1fr; }
  .trainer-question-card { padding: 1rem; }
  .trainer-question { font-size: 0.98rem; }
  .trainer-actions { align-items: stretch; }
  .trainer-actions .btn,
  .trainer-actions .arrow-study { width: 100%; justify-content: center; }
  .trainer-summary-item { flex-direction: column; align-items: stretch; }
  .review-section        { padding: 1rem; margin-top: 1.5rem; }
  .review-section h3     { font-size: 1rem; }
  .review-section-subtitle { font-size: 0.8rem; }
  .section-toggle-btn    { width: 24px; height: 24px; }
  .review-item           { padding: 0.75rem; }
  .review-item-header    { flex-wrap: wrap; }
  .review-item-title     { flex-basis: 100%; margin-bottom: 0.5rem; }
  .review-item-actions   { gap: 0.45rem; width: 100%; flex-wrap: wrap; }
  .review-rag-btn {
    font-size: 1rem;
    min-height: 40px;
    min-width: 40px;
    padding: 0.3rem 0.45rem;
  }
  .arrow-btn { font-size: 0.85rem; min-height: 40px; }
  .btn-tiny              { font-size: 0.75rem; padding: 0.3rem 0.6rem; }

  /* ── Forms / modal / FAQ ── */
  .contact-form .btn { width: 100%; justify-content: center; }
  .form-control { font-size: 16px; }
  .auth-panel {
    width: 100%;
    max-width: 100%;
    padding: 1.2rem;
    border-radius: 16px;
  }
  .auth-panel h2 { font-size: 1.5rem; }
  .auth-actions { flex-direction: column; }
  .auth-actions .btn { width: 100%; }
  .about-page-hero .section-inner {
    padding-top: 2.75rem !important;
    padding-bottom: 2.25rem !important;
  }
  .about-page-hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem) !important; }
  .faq-question {
    padding: 1rem 0.9rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .faq-answer {
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .landing-nav { padding: 0 0.85rem; }
  .nav-logo { height: 30px; }
  .lead-magnet-banner { display: none; }
  .exam-countdown-banner { padding: 0.9rem 0.85rem; }
  .countdown-inner { flex-direction: column; gap: 0.85rem; align-items: stretch; }
  .countdown-content { order: 1; }
  .countdown-message { font-size: 0.82rem; margin-bottom: 0.6rem; }
  .countdown-timers { justify-content: flex-start; gap: 1.25rem; }
  .cnum { font-size: 1.45rem; }
  .countdown-separator { display: none; }
  .countdown-cta { width: 100%; justify-content: center; order: 2; }
  .hero { padding: 2rem 0.9rem 2.75rem; }
  .section { padding: 2.5rem 0.9rem; }
  .back-btn             { font-size: 0.8rem; }
  .subtopic-title       { font-size: 1.05rem; }
  .spec-header-actions  { gap: 0.25rem; }
  .topic-row { padding: 0.9rem; }
  .topic-left { gap: 0.75rem; }
  .price-amount { font-size: 2.35rem; }
  .pricing-card { padding: 1.6rem 1rem; }
  .course-main { padding-left: 0.85rem; padding-right: 0.85rem; }
  .subtopic-actions { flex-direction: column; align-items: stretch; }
  .set-all-rag { width: 100%; justify-content: center; }
  .subtopic-reset-btn { width: 100%; }
  .review-item-actions { justify-content: flex-start; }
  .corms-grid           { grid-template-columns: repeat(2, 1fr); }
  .practical-toggle     { padding: 0.85rem 1rem; }
  /* ── Review page ── */
  .review-item-header   { flex-wrap: wrap; }
  .review-item-title    { font-size: 0.82rem; }
  .review-item-actions  { gap: 0.3rem; flex-wrap: wrap; }
  .review-item-actions .arrow-study { flex: 1 1 100%; justify-content: center; min-width: 0; }
  .video-container { border-radius: 12px; }
}

/* ===== SYSTEM FLOWCHART ===== */
.system-flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.flowchart-step {
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  width: 100%;
  transition: all 0.2s;
  text-align: center;
}

.flowchart-step:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 191, 99, 0.12);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin: 0 auto 1rem;
}

.flowchart-result .step-number {
  display: none;
}

.step-icon {
  font-size: 3rem;
  margin: 0.5rem 0 1rem;
  display: block;
}

.flowchart-step h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.flowchart-step p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.flowchart-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}

.flowchart-result {
  background: linear-gradient(135deg, rgba(0, 191, 99, 0.08), rgba(22, 163, 74, 0.08));
  border: 2px solid #16a34a;
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  margin-top: 1rem;
}

.flowchart-result:hover {
  border-color: #16a34a;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.2);
}

.flowchart-result h3 {
  color: #16a34a;
  font-size: 1.25rem;
}

/* ===== CONFIRM MODAL ===== */
.confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.confirm-modal.open {
  display: flex;
}
.confirm-panel {
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.confirm-panel h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.confirm-panel p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}
.confirm-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
.confirm-cancel-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.confirm-cancel-btn:hover { background: var(--cream-dark); }
.confirm-ok-btn {
  background: #dc2626;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.confirm-ok-btn:hover { background: #b91c1c; }
