:root {
  --bg: #f0f4fc;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(99, 102, 241, 0.06);
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-2: #0ea5e9;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.45);
  --accent: #f43f5e;
  --accent-2: #fb923c;
  --accent-glow: rgba(244, 63, 94, 0.4);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(148, 163, 184, 0.35);
  --border-strong: rgba(99, 102, 241, 0.25);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(99, 102, 241, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-logo: "Nunito", "Outfit", system-ui, sans-serif;
  --header-h: 72px;
  --exam-bar-h: 68px;
  --header-bg: rgba(255, 255, 255, 0.65);
  --footer-bg: rgba(255, 255, 255, 0.5);
  --mesh-top: #f8fafc;
  --mesh-mid: var(--bg);
  --mesh-end: #eef2ff;
  --reading-texts-bg: linear-gradient(180deg, #fffef8 0%, #fff 100%);
  --reading-texts-title-bg: #fffef8;
  --input-bg: var(--surface-solid);
  --btn-outline-bg: rgba(255, 255, 255, 0.6);
  --alert-warn-bg: linear-gradient(90deg, #fffbeb, #fef3c7);
  --alert-warn-text: #92400e;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --bg-elevated: #131c31;
  --surface: rgba(19, 28, 49, 0.88);
  --surface-solid: #151d2e;
  --surface-2: rgba(129, 140, 248, 0.14);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #818cf8;
  --primary-2: #38bdf8;
  --primary-dark: #c7d2fe;
  --primary-glow: rgba(129, 140, 248, 0.35);
  --accent: #fb7185;
  --accent-2: #fdba74;
  --border: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(129, 140, 248, 0.35);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(15, 23, 42, 0.88);
  --footer-bg: rgba(15, 23, 42, 0.75);
  --mesh-top: #0f172a;
  --mesh-mid: var(--bg);
  --mesh-end: #1e1b4b;
  --reading-texts-bg: linear-gradient(180deg, #1a2234 0%, var(--surface-solid) 100%);
  --reading-texts-title-bg: #1a2234;
  --input-bg: #1e293b;
  --btn-outline-bg: rgba(30, 41, 59, 0.9);
  --alert-warn-bg: linear-gradient(90deg, rgba(120, 53, 15, 0.35), rgba(146, 64, 14, 0.25));
  --alert-warn-text: #fcd34d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(14, 165, 233, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(244, 63, 94, 0.08), transparent 55%),
    linear-gradient(180deg, var(--mesh-top) 0%, var(--mesh-mid) 40%, var(--mesh-end) 100%);
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Page enter animation */
.main-content.page-enter {
  animation: pageIn 0.55s var(--ease-out) both;
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header — glass */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
  padding: 0 1.75rem;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  transition: transform 0.35s var(--ease-spring);
}
.logo:hover { transform: none; }

.logo-mark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  padding: 0.55rem 0.72rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 0 4px 14px var(--primary-glow);
  animation: logoGlow 3s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 4px 14px var(--primary-glow); }
  50% { box-shadow: 0 4px 22px rgba(14, 165, 233, 0.5); }
}

.logo-wordmark {
  position: relative;
  display: block;
  height: 2.2rem;
  width: auto;
  aspect-ratio: 660 / 138;
  flex-shrink: 0;
  overflow: visible;
}

.logo-piece {
  position: absolute;
  inset: 0;
  display: block;
}

.logo-piece img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-piece img.logo-on-dark {
  display: none;
}

[data-theme="dark"] .logo-piece img.logo-on-light {
  display: none;
}

[data-theme="dark"] .logo-piece img.logo-on-dark {
  display: block;
}

.logo-piece-elsha {
  z-index: 1;
  clip-path: inset(0 41.8% 0 0);
  animation: logoElshaOut 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.15s both;
}

.logo-piece-q-old {
  z-index: 2;
  clip-path: inset(31.9% 27.4% 0 58.2%);
  animation: logoQReveal 0.35s ease 0.95s both;
}

.logo-piece-q {
  z-index: 3;
  inset: 31.9% 27.4% 0 58.2%;
  animation: logoQFall 1.35s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

.logo-piece-q img {
  object-fit: contain;
  object-position: center bottom;
}

.logo-piece-ar {
  z-index: 1;
  clip-path: inset(0 0 0 73.9%);
  animation: logoArOut 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.15s both;
}

.logo-piece-hat {
  z-index: 4;
  transform-origin: 65% 12%;
  clip-path: polygon(
    56.8% 0%,
    73.4% 0%,
    73.4% 31.9%,
    59.3% 31.9%,
    59.3% 47.8%,
    57.3% 47.8%,
    57.3% 31.9%,
    56.8% 31.9%
  );
  animation: logoHatFall 0.95s cubic-bezier(0.34, 1.2, 0.64, 1) 2s both;
}

@keyframes logoQFall {
  0% { transform: translateY(-130%) scale(0.86); opacity: 0; }
  48% { transform: translateY(6%) scale(1.05); opacity: 1; }
  62% { transform: translateY(-3%) scale(0.99); opacity: 1; }
  72% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}

@keyframes logoQReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes logoElshaOut {
  0% { transform: translateX(38%); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes logoArOut {
  0% { transform: translateX(-38%); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes logoHatFall {
  0% { transform: translateY(-160%) rotate(-16deg); opacity: 0; }
  60% { transform: translateY(7%) rotate(5deg); opacity: 1; }
  78% { transform: translateY(-4%) rotate(-2deg); }
  100% { transform: none; }
}

.footer-logo .logo-piece {
  animation: none;
  opacity: 1;
  transform: none;
}

.footer-logo .logo-piece-q {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .logo-piece {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .logo-piece-q {
    opacity: 0;
  }
}

.footer-logo .logo-wordmark {
  height: 1.95rem;
}

@media (max-width: 768px) {
  .logo-wordmark {
    height: 1.9rem;
  }
  .logo-mark {
    font-size: 0.76rem;
    padding: 0.48rem 0.62rem;
  }
}

.main-nav {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.25s, background 0.25s, transform 0.25s var(--ease-spring);
}
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 2px;
  transition: width 0.3s var(--ease-out), left 0.3s var(--ease-out);
}
.main-nav a:hover {
  color: var(--primary-dark);
  background: var(--surface-2);
}
.main-nav a:hover::after,
.main-nav a.active::after {
  width: 60%;
  left: 20%;
}
.main-nav a.active {
  color: var(--primary-dark);
  background: rgba(99, 102, 241, 0.1);
}

.main-nav a.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
}
.main-nav a.nav-icon::after {
  display: none;
}
.main-nav a.nav-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Nav dropdowns */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.active .nav-dropdown-toggle {
  color: var(--primary-dark);
  background: var(--surface-2);
}
.nav-dropdown-chevron {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.nav-dropdown.open .nav-dropdown-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 200px;
  padding: 0.4rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
}
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
  animation: dropdownIn 0.2s var(--ease-out) both;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-link {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: calc(var(--radius-sm) - 2px);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  color: var(--primary-dark);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
}
.nav-toggle:hover { transform: scale(1.05); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 4rem;
}

.boot-loading {
  margin: 4rem auto 0;
  max-width: 22rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.site-footer {
  padding: 2.5rem 1.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  backdrop-filter: blur(8px);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  max-width: 1140px;
  margin: 0 auto 2rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand .footer-logo { margin-bottom: 0.75rem; }
.footer-desc {
  margin: 0;
  line-height: 1.6;
  max-width: 32ch;
  font-size: 0.85rem;
}
.footer-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary); }
body.mock-only-mode .footer-col:nth-child(n+2) { display: none; }
.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { margin: 0; font-size: 0.78rem; }
.footer-disclaimer {
  margin-top: 0.4rem !important;
  font-size: 0.7rem !important;
  color: var(--text-muted);
  opacity: 0.78;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-spring);
}
.theme-toggle:hover {
  border-color: var(--border-strong);
  background: rgba(99, 102, 241, 0.12);
  transform: scale(1.05);
}
.theme-toggle-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.theme-toggle-sun { display: none; }
.theme-toggle-moon { display: block; }
[data-theme="dark"] .theme-toggle-sun { display: block; }
[data-theme="dark"] .theme-toggle-moon { display: none; }

/* Typography */
h1, h2, h3 { line-height: 1.2; margin-top: 0; letter-spacing: -0.02em; }
h1 {
  font-family: var(--font);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.12;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1 strong, .gradient-text {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: 1.4rem; font-weight: 700; }
.page-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 54ch;
  line-height: 1.65;
}

/* Hero */
.hero {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}
.hero h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2.35rem, 5.8vw, 3.55rem);
  letter-spacing: -0.042em;
  line-height: 1.05;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
.hero h1 .gradient-text {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.012em;
  background: linear-gradient(
    128deg,
    var(--primary) 0%,
    var(--primary-2) 42%,
    #8b5cf6 72%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (min-width: 768px) {
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; }
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #0c4a6e 100%);
  color: #fff;
  padding: 2.25rem;
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  animation: cardFloat 6s ease-in-out infinite;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 100%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.hero-card h2 { color: #fff; margin-bottom: 0.75rem; font-family: var(--font); font-weight: 700; }
.hero-card p { opacity: 0.9; margin: 0 0 1.5rem; position: relative; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.stat {
  background: var(--surface);
  backdrop-filter: blur(12px);
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s;
}
.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

.grid-2 { display: grid; gap: 1.35rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-4 { display: grid; gap: 1.15rem; }
@media (min-width: 768px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.practice-exam-page {
  min-width: 0;
}

.main-content:has(#practice-root) > p:first-child {
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.practice-exam-head {
  margin-bottom: 2rem;
}

.practice-exam-head h1 {
  margin: 0 0 0.6rem;
}

.practice-exam-head .page-lead {
  margin: 0 0 1.5rem;
  max-width: 46rem;
}

.practice-exam-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0;
}

.main-content:has(.practice-exam-page),
.main-content:has(.practice-exam-grid) {
  max-width: 1320px;
}

/* Practice hub */
.practice-hub {
  --practice-card-radius: 14px;
  --practice-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.045);
  --practice-card-hover-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  --practice-icon-listening: #c2410c;
  --practice-icon-listening-bg: #fff4ea;
  --practice-icon-reading: #047857;
  --practice-icon-reading-bg: #ecfdf5;
  --practice-icon-writing: #6d28d9;
  --practice-icon-writing-bg: #f5f3ff;
  --practice-icon-speaking: #be123c;
  --practice-icon-speaking-bg: #fff1f2;
  --practice-icon-spelling: #0f766e;
  --practice-icon-spelling-bg: #f0fdfa;
  --practice-icon-vocab: #4338ca;
  --practice-icon-vocab-bg: #eef2ff;
  --practice-icon-grammar: #6d28d9;
  --practice-icon-grammar-bg: #f5f3ff;
  --practice-icon-dose: #0369a1;
  --practice-icon-dose-bg: #f0f9ff;
  --practice-core-border: color-mix(in srgb, var(--primary) 22%, var(--border));
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.practice-hero {
  margin-bottom: 1.65rem;
  animation: practiceReveal 0.45s var(--ease-out) both;
}

.practice-hero h1 {
  margin-bottom: 0.28rem;
  font-family: var(--font);
  font-size: clamp(1.85rem, 3.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.12;
}

.practice-hero .page-lead {
  margin: 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.5;
}

.practice-paper-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.practice-paper-pill a {
  font-weight: 600;
}

.practice-block {
  margin-bottom: 1.85rem;
  animation: practiceReveal 0.5s var(--ease-out) both;
}

.practice-block:nth-of-type(1) { animation-delay: 0.04s; }
.practice-block:nth-of-type(2) { animation-delay: 0.08s; }
.practice-block:nth-of-type(3) { animation-delay: 0.12s; }
.practice-block:nth-of-type(4) { animation-delay: 0.16s; }

.practice-block-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding: 0 0 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  box-shadow: none;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.practice-block-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 88%, #4f46e5);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: none;
  letter-spacing: 0;
}

.practice-hub .practice-badge,
.practice-hub .members-only-badge,
.practice-hub .practice-skill-soon,
.practice-hub .practice-bank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.35rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.practice-hub .practice-badge--open {
  color: #0f766e;
  background: #f0fdfa;
  border-color: rgba(13, 148, 136, 0.22);
}

.practice-hub .practice-badge--soon,
.practice-hub .practice-skill-soon,
.practice-hub .practice-bank-badge {
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--border);
}

.practice-hub .practice-badge--members,
.practice-hub .members-only-badge {
  color: #be123c;
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.22);
}

.members-only-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(251, 146, 60, 0.1));
  border: 1px solid rgba(244, 63, 94, 0.28);
  font-size: 0.68rem;
  font-weight: 700;
  color: #be123c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.2;
}

.members-only-badge--card {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
}

.members-only-badge--skill {
  margin-top: 0.25rem;
}

.practice-hub .members-only-badge--skill {
  margin-top: 0;
}

.members-only-badge--title {
  vertical-align: middle;
  margin-left: 0.5rem;
  position: relative;
  top: -0.12em;
}

.members-only-badge--nav {
  margin-left: 0.35rem;
  padding: 0.12rem 0.4rem;
  font-size: 0.6rem;
  vertical-align: middle;
}

.home-overview-card--members {
  position: relative;
}

[data-theme="dark"] .members-only-badge {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.18), rgba(251, 146, 60, 0.12));
  border-color: rgba(251, 113, 133, 0.35);
  color: #fda4af;
}

/* Line icons */
.practice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  flex-shrink: 0;
  color: var(--primary);
  background: var(--surface-2);
  transition: transform 0.28s var(--ease-spring);
}

.practice-icon svg {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
}

.practice-icon--heading {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
}

.practice-icon--heading svg {
  width: 1.2rem;
  height: 1.2rem;
}

.practice-icon--listening { color: var(--practice-icon-listening); background: var(--practice-icon-listening-bg); }
.practice-icon--reading { color: var(--practice-icon-reading); background: var(--practice-icon-reading-bg); }
.practice-icon--writing { color: var(--practice-icon-writing); background: var(--practice-icon-writing-bg); }
.practice-icon--speaking { color: var(--practice-icon-speaking); background: var(--practice-icon-speaking-bg); }
.practice-icon--spelling { color: var(--practice-icon-spelling); background: var(--practice-icon-spelling-bg); }
.practice-icon--vocab { color: var(--practice-icon-vocab); background: var(--practice-icon-vocab-bg); }
.practice-icon--grammar { color: var(--practice-icon-grammar); background: var(--practice-icon-grammar-bg); }
.practice-icon--dose { color: var(--practice-icon-dose); background: var(--practice-icon-dose-bg); }

.practice-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.7rem;
}

.practice-card-top .practice-badge,
.practice-card-top .members-only-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
}

/* Shared card surface */
.practice-skill-card,
.practice-tool-card {
  --i: 0;
  --skill-border: var(--border-strong);
  --practice-card-glow: var(--primary-glow);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 100%;
  padding: 1rem 0.95rem 0.95rem;
  border-radius: var(--practice-card-radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  text-align: center;
  box-shadow: var(--practice-card-shadow);
  animation: practicePopIn 0.45s var(--ease-out) both;
  animation-delay: calc(0.06s + var(--i) * 0.05s);
  transition:
    transform 0.28s var(--ease-spring),
    border-color 0.22s ease,
    box-shadow 0.28s ease;
}

.main-content .practice-hub a.practice-skill-card,
.main-content .practice-hub a.practice-tool-card {
  color: inherit;
  font-weight: inherit;
}

a.practice-skill-card:hover,
a.practice-tool-card:hover,
.main-content .practice-hub a.practice-skill-card:hover,
.main-content .practice-hub a.practice-tool-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--skill-border);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 0 0 1px color-mix(in srgb, var(--skill-border) 70%, transparent),
    0 8px 22px var(--practice-card-glow),
    0 0 28px var(--practice-card-glow),
    0 0 52px color-mix(in srgb, var(--practice-card-glow) 75%, transparent);
  color: inherit;
}

a.practice-skill-card:hover .practice-icon,
a.practice-tool-card:hover .practice-icon {
  transform: scale(1.08) rotate(-4deg);
}

a.practice-bank-card:hover .practice-bank-part {
  transform: translateY(-2px) scale(1.04);
}

a.practice-skill-card:active,
a.practice-tool-card:active {
  transform: translateY(-1px);
}

/* Full exams */
.practice-skills {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .practice-skills {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.practice-skill-card--listening,
.practice-tool-card--listening {
  --skill-border: #f0b878;
  --practice-card-glow: rgba(245, 158, 11, 0.42);
}
.practice-skill-card--reading,
.practice-tool-card--reading {
  --skill-border: #8fd4a8;
  --practice-card-glow: rgba(16, 185, 129, 0.38);
}
.practice-skill-card--writing,
.practice-tool-card--writing,
.practice-tool-card--grammar {
  --skill-border: #c4a8e8;
  --practice-card-glow: rgba(139, 92, 246, 0.4);
}
.practice-skill-card--speaking,
.practice-tool-card--speaking {
  --skill-border: #e8a8a8;
  --practice-card-glow: rgba(244, 63, 94, 0.38);
}
.practice-tool-card--dose {
  --skill-border: #7dd3fc;
  --practice-card-glow: rgba(14, 165, 233, 0.4);
}
.practice-tool-card--spelling {
  --skill-border: #5eead4;
  --practice-card-glow: rgba(13, 148, 136, 0.38);
}
.practice-tool-card--vocab {
  --skill-border: #a5b4fc;
  --practice-card-glow: rgba(99, 102, 241, 0.4);
}

.practice-skills:not(.practice-skills--banks) > .practice-skill-card {
  min-height: 8.25rem;
}

.practice-skill-card--core {
  border-color: color-mix(in srgb, var(--skill-border) 75%, var(--border));
  box-shadow:
    var(--practice-card-shadow),
    0 0 0 1px color-mix(in srgb, var(--skill-border) 32%, transparent);
}

.practice-skill-card--core::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--skill-border);
}

a.practice-skill-card--core:hover {
  border-color: var(--skill-border);
}

.practice-skill-card--members {
  opacity: 1;
}

.practice-skill-label {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.practice-skill-desc {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.practice-skill-meta {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--text) 62%, var(--text-muted));
}

.practice-skill-card--soon,
.practice-tool-card--soon {
  opacity: 0.62;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

/* Question banks */
.practice-bank-group {
  margin-bottom: 1.15rem;
}

.practice-bank-group:last-child {
  margin-bottom: 0;
}

.practice-bank-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

@media (min-width: 720px) {
  .practice-skills--banks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.practice-bank-card .practice-skill-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  text-align: center;
}

.practice-bank-card .practice-skill-meta {
  width: 100%;
  text-align: center;
}

.practice-bank-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: fit-content;
  margin: 0.1rem auto 0.7rem;
  padding: 0.32rem 0.7rem;
  border-radius: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px rgba(15, 23, 42, 0.1),
    0 3px 8px rgba(15, 23, 42, 0.06);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease;
}

.practice-skills--banks > .practice-bank-card {
  min-height: 10.75rem;
}

.practice-skill-card--listening.practice-bank-card .practice-bank-part {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px rgba(194, 65, 12, 0.12),
    0 3px 8px rgba(15, 23, 42, 0.05);
}

.practice-skill-card--reading.practice-bank-card .practice-bank-part {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px rgba(4, 120, 87, 0.12),
    0 3px 8px rgba(15, 23, 42, 0.05);
}

/* Language tools */
.practice-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .practice-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.practice-tool-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  width: 100%;
}

.practice-tool-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.practice-tool-info span {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.practice-tool-card--grammar {
  opacity: 0.58;
}

.practice-tool-card--soon.practice-tool-card--grammar {
  opacity: 0.55;
}

@keyframes practiceReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes practicePopIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .practice-hero,
  .practice-block,
  .practice-skill-card,
  .practice-tool-card {
    animation: none !important;
  }
  .practice-skill-card,
  .practice-tool-card {
    transition: none !important;
  }
  a.practice-skill-card:hover,
  a.practice-tool-card:hover {
    transform: none;
  }
}

[data-theme="dark"] .practice-hub {
  --practice-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  --practice-card-hover-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  --practice-icon-listening-bg: #3f2a1c;
  --practice-icon-listening: #fdba74;
  --practice-icon-reading-bg: #14352c;
  --practice-icon-reading: #6ee7b7;
  --practice-icon-writing-bg: #2e2450;
  --practice-icon-writing: #c4b5fd;
  --practice-icon-speaking-bg: #3f1d2a;
  --practice-icon-speaking: #fda4af;
  --practice-icon-spelling-bg: #14352c;
  --practice-icon-spelling: #5eead4;
  --practice-icon-vocab-bg: #1e1b4b;
  --practice-icon-vocab: #a5b4fc;
  --practice-icon-grammar-bg: #2e2450;
  --practice-icon-grammar: #c4b5fd;
  --practice-icon-dose-bg: #0c2d48;
  --practice-icon-dose: #7dd3fc;
}

[data-theme="dark"] .practice-skill-card,
[data-theme="dark"] .practice-tool-card {
  background: var(--surface);
}

[data-theme="dark"] .practice-hub .practice-badge--open {
  color: #5eead4;
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.28);
}

[data-theme="dark"] .practice-hub .practice-badge--members,
[data-theme="dark"] .practice-hub .members-only-badge {
  color: #fda4af;
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.32);
}

[data-theme="dark"] .practice-bank-part {
  background: var(--surface-2);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.38),
    0 3px 8px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .main-content .practice-hub a.practice-skill-card:hover,
[data-theme="dark"] .main-content .practice-hub a.practice-tool-card:hover {
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 0 1px color-mix(in srgb, var(--skill-border) 80%, transparent),
    0 8px 24px var(--practice-card-glow),
    0 0 32px var(--practice-card-glow),
    0 0 56px color-mix(in srgb, var(--practice-card-glow) 80%, transparent);
}

/* Legacy practice split (kept for any other use) */
.practice-split {
  display: grid;
  gap: 1.35rem;
}
@media (min-width: 860px) {
  .practice-split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.practice-col {
  display: grid;
  gap: 1.35rem;
  align-content: start;
}

/* Cards */
.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.4s,
    border-color 0.3s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card:hover::before { opacity: 1; }
.card h3 { margin-bottom: 0.45rem; font-size: 1.12rem; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1.1rem; }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
  transition: transform 0.4s var(--ease-spring);
}
.card:hover .card-icon { transform: scale(1.08) rotate(-3deg); }
.card-icon.listening { background: linear-gradient(135deg, #dbeafe, #e0e7ff); }
.card-icon.reading { background: linear-gradient(135deg, #fce7f3, #fae8ff); }
.card-icon.writing { background: linear-gradient(135deg, #ffedd5, #fef3c7); }
.card-icon.speaking { background: linear-gradient(135deg, #d1fae5, #ccfbf1); }

/* ——— Buttons with animations ——— */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.25s var(--ease-spring),
    box-shadow 0.35s,
    color 0.2s,
    border-color 0.2s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 55%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease-out);
  z-index: 1;
  pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}
.btn > * { position: relative; z-index: 2; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
  box-shadow:
    0 8px 28px var(--primary-glow),
    0 0 22px var(--primary-glow),
    0 0 40px color-mix(in srgb, var(--primary-glow) 70%, transparent);
  animation: btnPulse 2s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% {
    box-shadow:
      0 8px 28px var(--primary-glow),
      0 0 22px var(--primary-glow);
  }
  50% {
    box-shadow:
      0 8px 36px rgba(14, 165, 233, 0.5),
      0 0 28px rgba(14, 165, 233, 0.4);
  }
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-accent:hover {
  box-shadow: 0 10px 32px var(--accent-glow);
}

.btn-outline {
  background: var(--btn-outline-bg);
  color: var(--primary-dark);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.btn-outline:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow:
    0 8px 24px var(--primary-glow),
    0 0 22px var(--primary-glow),
    0 0 38px color-mix(in srgb, var(--primary-glow) 70%, transparent);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-dark);
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  animation: none !important;
}
.btn:disabled::before { display: none; }

/* Exam bar buttons override */
.exam-bar .btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.exam-bar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.12));
  color: var(--primary-dark);
}
.badge.exam {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(251, 146, 60, 0.12));
  color: #be123c;
}

/* Course */
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s, padding-left 0.25s var(--ease-out);
}
.lesson-list li:hover {
  background: var(--surface-2);
  padding-left: 1.25rem;
}
.lesson-list li:last-child { border-bottom: none; }

.lesson-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.lesson-body { flex: 1; }
.lesson-body h4 { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 600; }
.lesson-body p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* Exam bar */
.exam-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #0c4a6e 100%);
  color: #fff;
  margin: -2.5rem -1.75rem 1.75rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

/* Full simulation: header hidden — fixed timer bar, content starts below it */
.main-content.exam-active {
  padding-top: calc(var(--exam-bar-h) + 1.25rem);
  max-width: none;
}

.main-content.exam-active .exam-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  border-radius: 0;
  z-index: 100;
  padding-left: clamp(1.5rem, 4vw, calc((100vw - 1140px) / 2 + 1.5rem));
  padding-right: clamp(1.5rem, 4vw, calc((100vw - 1140px) / 2 + 1.5rem));
}

.main-content.exam-active #exam-workspace {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.75rem 4rem;
}
.exam-bar .timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.4rem;
  font-weight: 700;
  color: #67e8f9;
  text-shadow: 0 0 20px rgba(103, 232, 249, 0.5);
}
.exam-bar .timer.warning { color: #fde047; }
.exam-bar .timer.critical {
  color: #fb7185;
  animation: timerPulse 0.8s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.03); }
}
.exam-bar .phase { flex: 1; font-size: 0.9rem; font-weight: 500; }
.exam-bar .progress-dots { display: flex; gap: 8px; }
.exam-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.3s var(--ease-spring), background 0.3s;
}
.exam-bar .dot.done {
  background: linear-gradient(135deg, #67e8f9, #6366f1);
  transform: scale(1.1);
}
.exam-bar .dot.active {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6);
  transform: scale(1.25);
  animation: dotPulse 1.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.25); }
}

.exam-panel {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow);
  animation: panelIn 0.45s var(--ease-out) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.exam-panel h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.instructions {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.05));
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.35rem;
  border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--primary), var(--primary-2)) 1;
}
.instructions ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

/* Listening */
.audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1.35rem;
  padding: 1.15rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.06));
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}
.audio-status { font-size: 0.88rem; color: var(--text-muted); font-weight: 500; }

.gap-fill-table { width: 100%; border-collapse: collapse; border-radius: var(--radius-sm); overflow: hidden; }
.gap-fill-table td, .gap-fill-table th {
  border: 1px solid var(--border);
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  font-size: 0.9rem;
}
.gap-fill-table th {
  background: var(--surface-2);
  text-align: left;
  font-weight: 600;
}
.gap-input {
  width: 100%;
  min-width: 120px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gap-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.gap-input:disabled { background: var(--surface-2); color: var(--text-muted); }

.mcq-group { margin-bottom: 1.35rem; }
.mcq-group legend { font-weight: 600; margin-bottom: 0.6rem; }
.mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color 0.25s,
    background 0.25s,
    transform 0.25s var(--ease-spring),
    box-shadow 0.25s;
}
.mcq-option:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  transform: translateX(4px);
}
.mcq-option--correct:hover,
.mcq-option--wrong:hover {
  transform: none;
}
.mcq-option--correct:hover {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}
.mcq-option--wrong:hover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}
.mcq-option:has(input:checked) {
  border-color: var(--primary);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.06));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}
.mcq-option input { margin-top: 0.25rem; accent-color: var(--primary); }
.mcq-option--correct,
.mcq-option--correct:has(input:checked) {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
  box-shadow: none;
  color: #166534;
}
.mcq-option--wrong,
.mcq-option--wrong:has(input:checked) {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  box-shadow: none;
  color: #b91c1c;
}
.mcq-option--correct input { accent-color: #16a34a; }
.mcq-option--wrong input { accent-color: #dc2626; }
.mcq-option--selected:not(.mcq-option--correct):not(.mcq-option--wrong) {
  border-color: var(--primary);
}

/* Reading Part B Bank */
.rpb-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  min-height: calc(100dvh - 11rem);
}
@media (max-width: 960px) {
  .rpb-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}
.rpb-index {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: calc(100dvh - 5.5rem - 1rem);
}
@media (max-width: 960px) {
  .rpb-index {
    position: static;
    height: auto;
    max-height: 18rem;
  }
}
.rpb-index-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.rpb-index-title { font-weight: 800; }
.rpb-index-sub { color: var(--text-muted); font-size: 0.9rem; }
.rpb-index-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  align-content: start;
}
@media (max-width: 960px) {
  .rpb-index-grid {
    flex: none;
    max-height: 14rem;
  }
}
.rpb-index-btn {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), border-color 0.15s, background 0.15s;
}
.rpb-flag-count { color: #b45309; font-weight: 800; }
.rpb-index-btn.is-flagged:not(.is-active) {
  border-color: rgba(245, 158, 11, 0.8);
  background: rgba(245, 158, 11, 0.12);
}
.rpb-index-btn.is-flagged::after {
  content: "⚑";
  position: absolute;
  inset: auto 6px 4px auto;
  font-size: 0.75rem;
  color: #b45309;
  opacity: 0.9;
}
.rpb-index-btn { position: relative; }

.rpb-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.rpb-flag-btn {
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease-spring);
}
.rpb-flag-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.9);
  background: rgba(245, 158, 11, 0.08);
}
.rpb-flag-btn.is-flagged {
  border-color: rgba(245, 158, 11, 0.95);
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}
.rpb-index-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}
.rpb-index-btn.is-correct:not(.is-active):hover {
  border-color: rgba(22, 163, 74, 0.85);
  background: rgba(22, 163, 74, 0.2);
}
.rpb-index-btn.is-wrong:not(.is-active):hover {
  border-color: rgba(220, 38, 38, 0.85);
  background: rgba(220, 38, 38, 0.18);
}
.rpb-index-btn.is-active {
  border-color: var(--primary);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.18), rgba(14, 165, 233, 0.10));
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.12);
}
.rpb-index-btn.is-correct:not(.is-active) {
  border-color: rgba(22, 163, 74, 0.65);
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}
.rpb-index-btn.is-wrong:not(.is-active) {
  border-color: rgba(220, 38, 38, 0.65);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}
.rpb-index-btn.is-correct.is-active {
  border-color: rgba(22, 163, 74, 0.85);
  background: rgba(22, 163, 74, 0.18);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.14);
}
.rpb-index-btn.is-wrong.is-active {
  border-color: rgba(220, 38, 38, 0.85);
  background: rgba(220, 38, 38, 0.16);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.12);
}

.rpb-index-btn.is-locked {
  opacity: 0.72;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}

.rpb-index-btn.is-locked:hover {
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.08);
}

.rpb-practice-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rpb-practice-header h2 { margin: 0.25rem 0; }
.rpb-topic {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.rpb-timer {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.rpb-timer--warn {
  color: #dc2626;
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}
.rpb-question-panel .reading-text.rpb-passage {
  max-height: none;
  overflow: visible;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  user-select: text;
  cursor: text;
}

.rpb-passage .oet-reading-bc-extract-title {
  margin: 0 0 0.75rem;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.rpb-passage .oet-reading-bc-extract-body {
  margin: 0 0 0.7rem;
  white-space: normal;
  overflow-wrap: break-word;
}
.rpb-passage .oet-reading-bc-extract-body:last-child {
  margin-bottom: 0;
}
.rpb-passage .oet-reading-hl,
.rpb-stem .oet-reading-hl {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  line-height: inherit;
  font: inherit;
  font-size: inherit;
  color: inherit;
  vertical-align: baseline;
  background: rgba(250, 204, 21, 0.55);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  cursor: text;
}
.rpb-passage ::selection,
.rpb-stem ::selection {
  background: rgba(250, 204, 21, 0.35);
}
.rpb-stem {
  margin: 1rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  user-select: text;
  cursor: text;
}
.rpb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.rpb-feedback {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
}
.rpb-feedback--correct {
  background: rgba(22, 163, 74, 0.08);
  border-color: #16a34a;
}
.rpb-feedback--wrong {
  background: rgba(220, 38, 38, 0.06);
  border-color: #dc2626;
}
.rpb-feedback-verdict { font-weight: 600; margin-bottom: 0.75rem; }
.rpb-feedback--correct .rpb-feedback-verdict { color: #166534; }
.rpb-feedback--wrong .rpb-feedback-verdict { color: #dc2626; }
.rpb-feedback-block h4 {
  font-size: 0.9rem;
  margin: 0.75rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.rpb-feedback-block p { margin: 0; line-height: 1.6; }
.rpb-wrong-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.6;
}
.rpb-section-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-height: 200px;
  overflow-y: auto;
}
.rpb-score {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 1rem 0;
}

/* Listening Part B Bank */
.lpb-audio {
  margin-bottom: 1rem;
  max-width: 420px;
  width: 100%;
}
.lpb-audio audio {
  display: none;
}
.lpb-audio-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.lpb-play-btn,
.lpb-skip-btn {
  appearance: none;
  border: 1px solid var(--border, #d1d5db);
  background: var(--surface, #fff);
  color: var(--text, #111827);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
}
.lpb-play-btn {
  background: var(--primary, #4f46e5);
  border-color: var(--primary, #4f46e5);
  color: #fff;
  min-width: 4.5rem;
}
.lpb-play-btn:hover,
.lpb-skip-btn:hover {
  filter: brightness(0.97);
}
.lpb-time {
  margin-left: auto;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #6b7280);
}
.lpb-seek {
  display: block;
  width: 100%;
  margin-bottom: 0.55rem;
  touch-action: none;
  cursor: pointer;
  user-select: none;
}
.lpb-seek-input {
  width: 100%;
  height: 1.35rem;
  accent-color: var(--primary, #4f46e5);
  cursor: pointer;
}
.lpb-speed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  max-width: 420px;
}
.lpb-speed-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.lpb-speed-btn {
  appearance: none;
  border: 1px solid var(--border, #d1d5db);
  background: var(--surface, #fff);
  color: var(--text, #111827);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
}
.lpb-speed-btn:hover {
  border-color: var(--border-strong, #9ca3af);
  background: var(--surface-2, #f3f4f6);
}
.lpb-speed-btn.is-active {
  border-color: var(--primary, #4f46e5);
  background: color-mix(in srgb, var(--primary, #4f46e5) 12%, transparent);
  color: var(--primary, #4f46e5);
}
.lpb-audio--pending,
.lpb-audio--error .lpb-audio-status {
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border, #d1d5db);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.02);
}
.audio-load-error,
.lpb-audio--error .lpb-audio-status.audio-load-error,
.lpa-audio--error .audio-load-error {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #f1c0c0;
  border-radius: var(--radius-sm, 6px);
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.9rem;
}
.lpb-prompt {
  margin-bottom: 1rem;
}
.lpb-context {
  margin: 0 0 0.5rem;
  line-height: 1.55;
}
.lpb-stem {
  margin: 0;
  line-height: 1.55;
}
.lpb-evidence {
  margin: 0;
  line-height: 1.65;
  white-space: pre-wrap;
}
.lpb-mark {
  border-radius: 2px;
  padding: 0 0.1em;
}
.lpb-mark--yellow {
  background: #fef08a;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.lpb-mark--green {
  background: #bbf7d0;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Listening Part A — transcript with highlighted answers (post-submit review) */
.lpa-review-split {
  display: grid;
  grid-template-columns: minmax(16rem, 0.92fr) minmax(22rem, 1.08fr);
  gap: 1.25rem;
  margin-top: 0;
  align-items: stretch;
}
.oet-listening-workspace--review .lpa-review-split {
  min-height: calc(100vh - 12rem);
}
.lpa-review-pane {
  min-width: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.lpa-review-pane-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}
.lpa-review-pane--transcript {
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 10rem);
  overflow: auto;
}
.lpa-review-pane--answers {
  max-height: calc(100vh - 10rem);
  overflow: auto;
}
.lpa-review-pane--answers .oet-listening-notes {
  margin: 0;
}
.lpa-review-pane--answers .oet-notes-line {
  line-height: 2.15;
}
.lpa-review-pane--answers .oet-gap-wrap {
  white-space: normal;
}
.lpa-notes-extract + .lpa-notes-extract {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.lpa-notes-extract-title {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
}
.lpa-gap-jump {
  cursor: pointer;
}
.lpa-gap-jump--active {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}
.lpa-review-answer-list {
  margin-top: 0;
  gap: 0.85rem;
}
.lpa-transcript {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.lpa-review-split + .lpa-review-split {
  margin-top: 1.25rem;
}
.lpa-transcript + .lpa-transcript {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}
.lpa-transcript-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.lpa-transcript-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}
.lpa-transcript-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.lpa-transcript-actions {
  flex-shrink: 0;
}
.lpa-audio {
  margin: 0.75rem 0 1rem;
  max-width: 420px;
  width: 100%;
}
.lpa-audio audio {
  display: none;
}
.lpa-speed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  max-width: 420px;
}
.lpa-speed-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.15rem;
}
.lpa-speed-btn {
  appearance: none;
  border: 1px solid var(--border, #d4d4d8);
  background: #fff;
  color: var(--text, #18181b);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
}
.lpa-speed-btn:hover {
  border-color: var(--accent, #0f766e);
}
.lpa-speed-btn.is-active {
  border-color: var(--accent, #0f766e);
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent, #0f766e);
  font-weight: 600;
}
.lpa-transcript-body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-wrap;
}
.lpa-speaker {
  font-weight: 700;
  color: var(--text, #0f172a);
}
.lpa-mark {
  background: #fef08a;
  border-radius: 2px;
  padding: 0 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.lpa-mark--flash {
  animation: lpaMarkFlash 1.2s ease;
}
@keyframes lpaMarkFlash {
  0%,
  100% {
    background: #fef08a;
    box-shadow: none;
  }
  30%,
  55% {
    background: #fde047;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.45);
  }
}
.lpa-goto-transcript {
  white-space: nowrap;
}
.answer-review-q[data-lpa-goto-q] {
  cursor: pointer;
}
.answer-review-q--active {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 1px;
}
@media (max-width: 960px) {
  .lpa-review-split {
    grid-template-columns: 1fr;
  }
  .oet-listening-workspace--review .lpa-review-split {
    min-height: 0;
  }
  .lpa-review-pane--transcript,
  .lpa-review-pane--answers {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* Reading */
.reading-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.75;
  padding: 1.35rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.03);
}

.reading-text .oet-reading-bc-extract-title {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  font-weight: 700;
}

.reading-text .oet-reading-bc-extract-body {
  margin: 0;
  white-space: pre-wrap;
}

/* Reading Part A — split panes */
.exam-panel--reading-a {
  padding: 1.25rem;
}
.reading-part-a-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.reading-part-a-header h3 { margin-bottom: 0.5rem; }
.reading-part-a-header .instructions { margin-bottom: 0; }
.part-a-timer-badge {
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.highlight-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.highlight-toolbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.hl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.55rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s, box-shadow 0.2s;
}
.hl-btn:hover { transform: scale(1.06); }
.hl-btn.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.hl-btn[data-hl-color="yellow"] { color: #ca8a04; font-size: 1.1rem; }
.hl-btn[data-hl-color="green"] { color: #059669; font-size: 1.1rem; }
.hl-btn[data-hl-color="pink"] { color: #db2777; font-size: 1.1rem; }
.hl-btn-eraser.active { background: rgba(239, 68, 68, 0.12); border-color: var(--danger); color: var(--danger); }
.hl-btn-clear { font-size: 0.75rem; color: var(--text-muted); }
.hl-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.15rem;
}
.highlight-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.reading-part-a-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  height: min(68vh, 620px);
  min-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
.reading-part-a-pane {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 1rem 1.15rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}
.reading-part-a-pane--texts {
  background: var(--reading-texts-bg);
  border-right: 1px solid var(--border);
}

.reading-part-a-split--pdf-booklet {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.reading-part-a-pane--pdf {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.reading-part-a-pane--pdf .pane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  margin: 0;
  padding: 0.5rem 0.75rem;
}

.reading-booklet-open {
  font-size: 0.8rem;
  font-weight: 500;
}

.reading-booklet-pdf {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.reading-booklet-pages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.35rem 0.5rem 0.75rem;
  background: var(--surface-2);
}

.reading-pdf-hl-toolbar {
  flex-shrink: 0;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.exam-panel--pdf-booklet .reading-part-a-split {
  min-height: calc(100vh - 280px);
}

.reading-part-a-pane--questions {
  background: var(--surface-solid);
}
.reading-part-a-pane.hl-mode-highlight { cursor: text; }
.reading-part-a-pane.hl-mode-highlight ::selection {
  background: rgba(250, 204, 21, 0.45);
}
.reading-part-a-pane.hl-mode-erase { cursor: cell; }
.reading-part-a-pane.hl-mode-erase mark.hl { cursor: pointer; outline: 2px dashed rgba(239, 68, 68, 0.5); }

.pane-title {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: inherit;
  border-bottom: 1px solid var(--border);
}
.reading-part-a-pane--texts .pane-title { background: var(--reading-texts-title-bg); }
.reading-part-a-pane--questions .pane-title { background: var(--surface-solid); }

.reading-passage {
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}
.reading-passage:last-child { border-bottom: none; margin-bottom: 0; }
.reading-passage-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.passage-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.reading-text-body {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  user-select: text;
}
mark.hl {
  padding: 0 2px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
mark.hl-yellow { background: rgba(250, 204, 21, 0.55); }
mark.hl-green { background: rgba(52, 211, 153, 0.5); }
mark.hl-pink { background: rgba(244, 114, 182, 0.45); }

.match-grid--scroll { display: block; }
.reading-part-a-footer {
  margin-top: 1rem;
  padding-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.match-row:hover { background: var(--surface-2); }
.match-row-label {
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: default;
}
.match-row select {
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  min-width: 72px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.match-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.match-row--gap { grid-template-columns: 1fr; gap: 0.5rem; }
.match-row .gap-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.match-row .gap-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.match-row .gap-input:disabled {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
}

.reading-part-c-section {
  padding: 1rem 0 1.25rem;
  border-bottom: 1px dashed var(--border);
}
.reading-part-c-section:last-of-type { border-bottom: none; }
.reading-part-c-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin: 0.25rem 0 0.85rem;
  color: var(--primary-dark);
}
.reading-part-c-rangelabel {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.reading-part-c-questions {
  margin-top: 1rem;
}

/* Exam landing — test picker */
.test-picker { padding: 1.25rem 1.35rem 1.4rem; }
.test-picker-head h3 { margin: 0 0 0.25rem; }
.test-picker-sub {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.test-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.test-card {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.test-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.test-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.05));
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.18);
}
.test-card input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}
.test-card-body { flex: 1; min-width: 0; }
.test-card-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}
.test-card-row strong { font-size: 1.02rem; }
.test-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
}
.test-card-desc {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.test-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .reading-part-a-split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    height: min(85vh, 780px);
  }
  .reading-part-a-pane--texts {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .highlight-hint {
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
  }
}

/* Writing */
.case-notes {
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.writing-area {
  width: 100%;
  min-height: 280px;
  padding: 1.1rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.65;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.writing-area:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.word-count { text-align: right; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; font-weight: 500; }
.word-count.over { color: var(--danger); font-weight: 700; }

/* Speaking */
.roleplay-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s;
}
.roleplay-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.roleplay-card.interlocutor {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.05));
}
.roleplay-card.candidate {
  border-color: rgba(244, 63, 94, 0.3);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.06), rgba(251, 146, 60, 0.05));
}
.roleplay-card h4 {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
}
.prep-timer {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 1rem;
}

/* Results */
.score-card {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.12) 0%, rgba(255, 255, 255, 0.9) 60%);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: scoreReveal 0.7s var(--ease-out) both;
}
@keyframes scoreReveal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.score-card .grade {
  font-size: 3.5rem;
  font-weight: 400;
  font-family: var(--font-serif);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reading-answer-review h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}
.reading-answer-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}
.reading-answer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.reading-answer-table th,
.reading-answer-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.reading-answer-table th {
  background: rgba(15, 23, 42, 0.04);
  font-weight: 600;
  white-space: nowrap;
}
.reading-answer-table tr:last-child td {
  border-bottom: none;
}
.reading-answer-row--correct td:nth-child(3) {
  color: #15803d;
}
.reading-answer-row--incorrect td:nth-child(3) {
  color: #b91c1c;
}
.reading-answer-row--incorrect td:nth-child(4) {
  font-weight: 600;
}

.answer-review-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.answer-review-q {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}
.answer-review-q--correct {
  border-color: rgba(22, 163, 74, 0.35);
}
.answer-review-q--incorrect {
  border-color: rgba(220, 38, 38, 0.35);
}
.answer-review-q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.answer-review-q-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.answer-review-verdict {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}
.answer-review-verdict--correct {
  color: #166534;
  background: rgba(22, 163, 74, 0.12);
}
.answer-review-verdict--incorrect {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
}
.answer-review-verdict--na {
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.06);
}
.answer-review-prompt {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.answer-review-extract {
  margin-bottom: 0.85rem;
}
.answer-review-q .mcq-group {
  margin: 0;
  border: none;
  padding: 0;
}
.answer-review-q .mcq-option {
  pointer-events: none;
  cursor: default;
}
.answer-review-gap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.03);
}
.answer-review-gap--correct {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}
.answer-review-gap--incorrect {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}
.answer-review-gap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}
.answer-review-gap-row--key {
  color: #166534;
  font-weight: 600;
}
.answer-review-gap-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.8;
  min-width: 7.5rem;
}
.answer-review-gap-value {
  flex: 1;
  min-width: 0;
}
.answer-review-na {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.15rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.25s var(--ease-spring);
}
.score-row:hover { transform: translateX(4px); }
.score-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex: 1;
  max-width: 200px;
  margin: 0 1rem;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--ease-out);
}

/* Official-style OET Statement of Results chart */
.oet-sor {
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  overflow-x: auto;
  margin: 0 0 1.75rem;
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: none;
}
.oet-sor-summary {
  background: #f2f3f5;
  padding: 1.05rem 1.15rem 1.2rem;
  margin: 0.35rem 0 1rem;
  color: #1a1a1a;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
.oet-sor-meta {
  margin: 0 0 0.85rem;
}
.oet-sor-meta-row {
  margin: 0 0 0.18rem;
  font-size: 0.98rem;
  line-height: 1.45;
}
.oet-sor-meta-label {
  color: #8a8a8a;
  font-weight: 400;
  margin-right: 0.35rem;
}
.oet-sor-meta-date {
  color: #1a9bb0;
  font-weight: 700;
}
.oet-sor-meta-test {
  color: #222;
  font-weight: 700;
}
.oet-sor-booking-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.72rem 1rem;
  appearance: none;
  background: #1a73c7;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  border: 1px solid #1665b0;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}
.oet-sor-booking-btn:hover {
  background: #1766b3;
  color: #fff;
}
.oet-sor-booking-btn:focus-visible {
  outline: 2px solid #0f4f8a;
  outline-offset: 2px;
}
.oet-sor-summary-divider {
  margin: 0.95rem 0 0.75rem;
  border: 0;
  border-top: 1px solid #e1e1e1;
}
.oet-sor-summary-heading {
  margin: 0 0 0.55rem;
  color: #8a8a8a;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
}
.oet-sor-summary-panel {
  background: #eaf2f5;
  padding: 1rem 0.6rem 1.1rem;
}
.oet-sor-summary-skills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: start;
}
.oet-sor-skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.oet-sor-skill-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #7a7a7a;
  line-height: 1.2;
}
.oet-sor-skill-grade {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.15rem;
  height: 4.15rem;
  margin: 0.5rem 0 0.4rem;
  border-radius: 50%;
  background: #fff;
  color: #1a9bb0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.oet-sor-skill-grade[data-grade-len="2"] {
  font-size: 1.2rem;
}
.oet-sor-skill-score {
  color: #1a1a1a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}
.oet-sor-skill--empty .oet-sor-skill-grade,
.oet-sor-skill--empty .oet-sor-skill-score {
  color: #9aa3ab;
}
.oet-sor-group {
  padding: 0.85rem 1rem 0;
}
.oet-sor-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #153a5c;
}
.oet-sor-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.55rem;
}
.oet-sor-part {
  background: #fff;
  border: 1px solid #d3dce6;
  border-radius: 4px;
  padding: 0.65rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.oet-sor-part-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6278;
}
.oet-sor-part-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #153a5c;
}
.oet-sor-totals {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.55rem;
  margin-top: 0.65rem;
}
.oet-sor-totals-scaled {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}
.oet-sor-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.65rem;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid #c5d0da;
  border-radius: 4px;
  font-size: 0.95rem;
}
.oet-sor-total-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4a6278;
}
.oet-sor-total strong {
  font-size: 1.15rem;
  color: #153a5c;
}
.oet-sor-total-grade {
  font-weight: 800;
  color: #0082c6;
}
.oet-sor-chart-scroll {
  background: #fff;
}
.oet-sor-chart {
  padding: 0.25rem 0.45rem 0.4rem;
  background: #fff;
  min-width: 0;
}
.oet-sor-svg {
  display: block;
  width: min(100%, 800px);
  height: auto;
  margin: 0 auto;
  background: #fff;
}
.oet-sor-axis {
  font-size: 11px;
  fill: #333;
  font-family: Arial, Helvetica, sans-serif;
}
.oet-sor-band-label {
  font-size: 12px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}
.oet-sor-col-label {
  font-size: 13px;
  font-weight: 700;
  fill: #111;
  font-family: Arial, Helvetica, sans-serif;
}
.oet-sor-bar-score {
  font-size: 10px;
  font-weight: 700;
  fill: #fff;
  font-family: Arial, Helvetica, sans-serif;
}
.oet-results-wrap {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.oet-results-wrap--in-exam {
  padding-bottom: 1rem;
}
.oet-results-wrap--in-exam h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}
.oet-results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.25rem 0 1.5rem;
}
.oet-sor-note {
  margin: 0;
  padding: 0.35rem 1rem 0.85rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #222;
}
@media (max-width: 720px) {
  .oet-sor-parts {
    grid-template-columns: 1fr 1fr;
  }
  .oet-sor-totals {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .oet-sor-summary-skills {
    gap: 0.7rem 0.35rem;
  }
  .oet-sor-skill-grade {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
  }
  .oet-sor-skill-name {
    font-size: 0.72rem;
  }
}
@media (max-width: 480px) {
  .oet-sor-parts {
    grid-template-columns: 1fr;
  }
  .oet-sor-totals-scaled {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 380px) {
  .oet-sor-summary-skills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.95rem;
  }
}
[data-theme="dark"] .oet-sor,
[data-theme="dark"] .oet-sor-summary {
  background: #fff;
  color: #1a1a1a;
  border-color: #d0d0d0;
}
[data-theme="dark"] .oet-sor-summary {
  background: #f2f3f5;
}

/* Modal & toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  background: var(--surface-solid);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalPop 0.4s var(--ease-spring) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal h3 { margin-bottom: 0.85rem; font-weight: 700; padding-right: 2.4rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.35rem; }
.subscribe-modal-message {
  margin: 0;
  color: var(--text-muted, #64748b);
  line-height: 1.55;
}
.subscribe-modal-hint {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
}

/* Report a problem */
.report-problem-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-solid, #fff);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.report-problem-btn:hover {
  color: #0f172a;
  border-color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
}
.report-problem-btn--compact {
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  opacity: 0.85;
}
.report-problem-btn--compact:hover {
  opacity: 1;
}
.report-problem-btn--flag {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border-radius: 999px;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.55;
}
.report-problem-btn--flag:hover {
  opacity: 1;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.85);
  background: rgba(245, 158, 11, 0.12);
}
.report-problem-flag {
  display: block;
  line-height: 1;
  transform: translateY(0.5px);
}
.spelling-word-actions .report-problem-btn--flag {
  flex-shrink: 0;
}
.report-problem-btn--inline {
  vertical-align: middle;
  margin-left: 0.25rem;
  flex-shrink: 0;
}
.oet-reading-match-row .report-problem-btn--inline {
  margin-top: 0.12rem;
}
.oet-gap-wrap .report-problem-btn--inline,
.oet-notes-line .report-problem-btn--inline {
  margin-left: 0.15rem;
  transform: translateY(2px);
}
.gap-answer-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.answer-review-q-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.rpb-feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.reports-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.report-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
.report-delete-btn:hover,
.report-delete-btn:focus-visible {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.report-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.attempts-table tr.report-row--resolved > td:not(.reports-row-actions) {
  text-decoration: line-through;
  color: var(--text-muted);
}
.attempts-table tr.report-row--resolved {
  opacity: 0.72;
}
.report-focus-target {
  outline: 2px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  animation: report-focus-pulse 1.1s ease 2;
}
@keyframes report-focus-pulse {
  0%, 100% { background: rgba(245, 158, 11, 0.12); }
  50% { background: rgba(245, 158, 11, 0.28); }
}
.report-problem-modal {
  max-width: 520px;
}
.report-problem-context {
  margin: 0 0 0.5rem;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}
.report-problem-preview {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
}
.report-problem-form {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.report-problem-label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
.report-problem-form select,
.report-problem-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-solid, #fff);
  color: inherit;
  font: inherit;
}
.report-problem-form textarea {
  resize: vertical;
  min-height: 6rem;
}
.report-problem-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}
.report-problem-form .modal-actions {
  margin-top: 0.85rem;
}

.toast {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  padding: 0.95rem 1.35rem;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 300;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.45s var(--ease-spring) both;
}
@keyframes toastIn {
  from { transform: translateY(24px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.section-title {
  margin: 2.5rem 0 1.15rem;
  font-weight: 700;
}

/* Listening mock tests — coming soon */
.mock-test-card--soon {
  opacity: 0.88;
}

.mock-test-card--compact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 1.3rem 1.2rem 1.25rem;
  min-width: 0;
  min-height: 100%;
}

.mock-test-card--compact:hover {
  transform: translateY(-5px);
}

.mock-exam-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem 0.85rem;
  margin: 0;
  padding: 0;
}

.mock-exam-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
  flex: 1;
  color: var(--text);
}

.mock-exam-card-num {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text);
}

.mock-exam-card-name {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--text-muted);
}

.mock-test-card--compact h3 {
  margin: 0;
  min-height: 0;
}

.mock-test-card--compact .mock-exam-score {
  position: static;
  margin: 0;
  flex-shrink: 0;
  flex-direction: row;
  align-items: center;
  padding: 0.32rem 0.5rem;
  gap: 0.35rem;
  z-index: 2;
}

.mock-test-card--compact .mock-exam-score-correct {
  font-size: 0.98rem;
}

.mock-test-card--compact .mock-exam-score-total {
  font-size: 0.84rem;
}

.mock-test-card--compact .mock-exam-score-reset {
  padding: 0.16rem 0.45rem !important;
  font-size: 0.68rem !important;
}

.mock-exam-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: auto;
}

.mock-exam-part-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.mock-exam-part-row .btn {
  width: 100%;
  min-width: 0;
  min-height: 2.2rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.74rem;
  border-radius: 10px;
}

.mock-exam-card-actions .mock-exam-start-btn {
  width: 100%;
  min-height: 2.3rem;
  padding: 0.48rem 0.65rem;
  font-size: 0.84rem;
  border-radius: 11px;
}

.mock-exam-part-row .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

.mock-exam-start-btn {
  margin-top: 0.1rem;
  transition:
    transform 0.25s var(--ease-spring),
    box-shadow 0.35s,
    background 0.28s ease;
}

.btn-primary.mock-exam-start-btn:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 32px var(--accent-glow);
  animation: none;
}

.btn-primary.mock-exam-start-btn--free-trial {
  background: linear-gradient(135deg, #16a34a 0%, #059669 100%);
  box-shadow: 0 4px 18px rgba(22, 163, 74, 0.38);
  color: #fff;
}

.btn-primary.mock-exam-start-btn--free-trial:hover {
  background: linear-gradient(135deg, #15803d 0%, #047857 100%);
  box-shadow: 0 10px 32px rgba(5, 150, 105, 0.45);
  animation: none;
}

.mock-test-card--free-trial {
  border-color: rgba(22, 163, 74, 0.42);
  box-shadow:
    0 10px 28px rgba(22, 163, 74, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .btn-primary.mock-exam-start-btn--free-trial {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.32);
}

[data-theme="dark"] .btn-primary.mock-exam-start-btn--free-trial:hover {
  background: linear-gradient(135deg, #16a34a 0%, #059669 100%);
  box-shadow: 0 10px 32px rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .mock-test-card--free-trial {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.14);
}

.mock-test-card--compact .mock-test-soon {
  margin-top: auto;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.7rem 0.75rem;
  gap: 0.5rem;
}

.mock-test-card--compact .mock-test-subscribe {
  margin-left: 0;
  width: 100%;
}

.mock-exam-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.mock-test-card > .mock-exam-card-top:first-child {
  margin-bottom: 0.35rem;
}

.mock-exam-score {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.04), rgba(14, 165, 233, 0.06));
  line-height: 1;
}

.mock-exam-score-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.mock-exam-score-correct {
  font-size: 1.05rem;
  color: var(--text);
}

.mock-exam-score-total {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.mock-exam-score--empty .mock-exam-score-correct {
  color: var(--text-muted);
}

.mock-exam-score--high {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.28);
}

.mock-exam-score--high .mock-exam-score-correct {
  color: #15803d;
}

.mock-exam-score--low {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.22);
}

.mock-exam-score--low .mock-exam-score-correct {
  color: #b91c1c;
}

.mock-exam-score-reset {
  padding: 0.2rem 0.55rem !important;
  font-size: 0.72rem !important;
  min-height: 0;
  color: var(--text-muted);
}

.mock-exam-score-reset:hover {
  color: var(--text);
}

[data-theme="dark"] .mock-exam-score {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(14, 165, 233, 0.08));
}

[data-theme="dark"] .mock-exam-score--high {
  background: rgba(22, 163, 74, 0.16);
}

[data-theme="dark"] .mock-exam-score--low {
  background: rgba(220, 38, 38, 0.14);
}

.mock-test-soon {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin-top: 0.25rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}

.mock-test-lock {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.mock-test-soon-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  flex: 1;
  min-width: 8rem;
}

.free-trial-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.free-trial-note {
  margin: 0.35rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-size: 0.92rem;
  font-weight: 600;
}

.spelling-row-locked {
  opacity: 0.78;
}

.spelling-lock-btn {
  gap: 0.35rem;
}

.mock-test-subscribe {
  margin-left: auto;
  white-space: nowrap;
}

.exclusive-exams-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0;
}

.exclusive-exams-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 14.5rem;
  max-width: none;
  padding: 0.72rem 1.35rem;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.exclusive-exams-btn.is-active {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px color-mix(in srgb, var(--primary) 75%, white),
    0 8px 22px color-mix(in srgb, var(--primary-glow) 80%, transparent);
}

.writing-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 760px;
}

.writing-category-card {
  border-width: 2px;
  border-style: solid;
  border-left-width: 6px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s,
    border-color 0.3s;
}

.writing-category-card:hover {
  transform: translateX(6px) translateY(0);
  box-shadow: var(--shadow-lg);
}

.writing-category-head {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.writing-category-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  transition: transform 0.35s var(--ease-spring);
}

.writing-category-card:hover .writing-category-icon {
  transform: scale(1.08);
}

.writing-category-body h3 {
  margin: 0 0 0.35rem;
}

.writing-category-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.writing-category-card .writing-letter-item {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.writing-category-card .writing-letter-item h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.writing-category-card .writing-letter-item p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.writing-category-card--locked {
  opacity: 0.92;
}

.writing-category-card--routine-referral {
  border-color: rgba(16, 185, 129, 0.55);
  border-left-color: #059669;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--routine-referral:hover {
  border-color: #10b981;
  border-left-color: #047857;
}
.writing-category-card--routine-referral .writing-category-icon {
  background: linear-gradient(135deg, #d1fae5, #6ee7b7);
  border-color: #34d399;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}

.writing-category-card--urgent-referral {
  border-color: rgba(249, 115, 22, 0.55);
  border-left-color: #ea580c;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--urgent-referral:hover {
  border-color: #f97316;
  border-left-color: #c2410c;
}
.writing-category-card--urgent-referral .writing-category-icon {
  background: linear-gradient(135deg, #ffedd5, #fdba74);
  border-color: #fb923c;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.28);
}

.writing-category-card--emergency {
  border-color: rgba(239, 68, 68, 0.55);
  border-left-color: #dc2626;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--emergency:hover {
  border-color: #ef4444;
  border-left-color: #b91c1c;
}
.writing-category-card--emergency .writing-category-icon {
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  border-color: #f87171;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.28);
}

.writing-category-card--discharge {
  border-color: rgba(59, 130, 246, 0.55);
  border-left-color: #2563eb;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--discharge:hover {
  border-color: #3b82f6;
  border-left-color: #1d4ed8;
}
.writing-category-card--discharge .writing-category-icon {
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  border-color: #60a5fa;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.28);
}

.writing-category-card--update {
  border-color: rgba(139, 92, 246, 0.55);
  border-left-color: #7c3aed;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--update:hover {
  border-color: #8b5cf6;
  border-left-color: #6d28d9;
}
.writing-category-card--update .writing-category-icon {
  background: linear-gradient(135deg, #ede9fe, #c4b5fd);
  border-color: #a78bfa;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
}

.writing-category-card--request {
  border-color: rgba(99, 102, 241, 0.55);
  border-left-color: #4f46e5;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--request:hover {
  border-color: #6366f1;
  border-left-color: #4338ca;
}
.writing-category-card--request .writing-category-icon {
  background: linear-gradient(135deg, #e0e7ff, #a5b4fc);
  border-color: #818cf8;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}

.writing-category-card--advice {
  border-color: rgba(236, 72, 153, 0.55);
  border-left-color: #db2777;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.12) 0%, var(--surface) 48%);
}
.writing-category-card--advice:hover {
  border-color: #ec4899;
  border-left-color: #be185d;
}
.writing-category-card--advice .writing-category-icon {
  background: linear-gradient(135deg, #fce7f3, #f9a8d4);
  border-color: #f472b6;
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.28);
}

[data-theme="dark"] .writing-category-card--routine-referral {
  border-color: rgba(52, 211, 153, 0.5);
  border-left-color: #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--routine-referral .writing-category-icon {
  background: linear-gradient(135deg, #064e3b, #047857);
  border-color: #34d399;
}

[data-theme="dark"] .writing-category-card--urgent-referral {
  border-color: rgba(251, 146, 60, 0.5);
  border-left-color: #f97316;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--urgent-referral .writing-category-icon {
  background: linear-gradient(135deg, #7c2d12, #c2410c);
  border-color: #fb923c;
}

[data-theme="dark"] .writing-category-card--emergency {
  border-color: rgba(248, 113, 113, 0.5);
  border-left-color: #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--emergency .writing-category-icon {
  background: linear-gradient(135deg, #7f1d1d, #b91c1c);
  border-color: #f87171;
}

[data-theme="dark"] .writing-category-card--discharge {
  border-color: rgba(96, 165, 250, 0.5);
  border-left-color: #3b82f6;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--discharge .writing-category-icon {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  border-color: #60a5fa;
}

[data-theme="dark"] .writing-category-card--update {
  border-color: rgba(167, 139, 250, 0.5);
  border-left-color: #8b5cf6;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--update .writing-category-icon {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  border-color: #a78bfa;
}

[data-theme="dark"] .writing-category-card--request {
  border-color: rgba(129, 140, 248, 0.5);
  border-left-color: #6366f1;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--request .writing-category-icon {
  background: linear-gradient(135deg, #312e81, #4338ca);
  border-color: #818cf8;
}

[data-theme="dark"] .writing-category-card--advice {
  border-color: rgba(244, 114, 182, 0.5);
  border-left-color: #ec4899;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.2) 0%, var(--surface) 50%);
}
[data-theme="dark"] .writing-category-card--advice .writing-category-icon {
  background: linear-gradient(135deg, #831843, #be185d);
  border-color: #f472b6;
}

/* Exam benefits — hover highlight cards */
.exam-benefits .page-lead {
  margin-bottom: 1.5rem;
}

.exam-benefits .benefit-card {
  cursor: pointer;
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.45s,
    border-color 0.35s,
    background 0.35s,
    opacity 0.35s;
  animation: cardStagger 0.55s var(--ease-out) both;
  animation-delay: calc(var(--card-i, 0) * 0.07s + 0.08s);
}

.exam-benefits .benefit-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  opacity: 0;
  transform: scaleY(0.35);
  transform-origin: center;
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.45s var(--ease-spring);
  pointer-events: none;
}

.exam-benefits .benefit-card:hover {
  border-color: var(--primary);
  background: var(--surface-solid);
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 22px 48px rgba(99, 102, 241, 0.24),
    0 0 0 1px rgba(99, 102, 241, 0.18);
}

.exam-benefits .benefit-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(14, 165, 233, 0.07) 55%, transparent 100%);
  animation: benefitGlow 1.8s ease-in-out infinite;
}

.exam-benefits .benefit-card:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

.exam-benefits .benefit-card h3 {
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}

.exam-benefits .benefit-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  transition: color 0.3s;
}

.exam-benefits .benefit-card:hover h3 {
  color: var(--primary-dark);
}

.exam-benefits .benefit-card:hover p {
  color: var(--text);
}

.benefit-icon {
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 0.45s var(--ease-spring);
}

.exam-benefits .benefit-card:hover .benefit-icon {
  transform: scale(1.3) rotate(-10deg);
}

.exam-benefits-grid:has(.benefit-card:hover) .benefit-card:not(:hover) {
  opacity: 0.68;
  transform: scale(0.985);
}

@keyframes benefitGlow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

[data-theme="dark"] .exam-benefits .benefit-card:hover {
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(129, 140, 248, 0.35);
}

[data-theme="dark"] .exam-benefits .benefit-card:hover::before {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.18) 0%, rgba(56, 189, 248, 0.1) 55%, transparent 100%);
}

.alert {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.15rem;
  font-weight: 500;
  animation: panelIn 0.4s var(--ease-out) both;
}
.alert-info {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.08));
  color: var(--primary-dark);
  border: 1px solid var(--border-strong);
}
.alert-warn {
  background: var(--alert-warn-bg);
  color: var(--alert-warn-text);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.alert-success {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.08));
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .alert-success {
  color: #6ee7b7;
}

[data-theme="dark"] .card-icon.listening { background: linear-gradient(135deg, #1e3a5f, #312e81); }
[data-theme="dark"] .card-icon.reading { background: linear-gradient(135deg, #4a1942, #581c87); }
[data-theme="dark"] .card-icon.writing { background: linear-gradient(135deg, #431407, #713f12); }
[data-theme="dark"] .card-icon.speaking { background: linear-gradient(135deg, #064e3b, #134e4a); }
[data-theme="dark"] .badge {
  background: rgba(129, 140, 248, 0.2);
  color: var(--primary-dark);
}
[data-theme="dark"] .case-notes,
[data-theme="dark"] .writing-area,
[data-theme="dark"] .spelling-input,
[data-theme="dark"] .spelling-select,
[data-theme="dark"] .gap-input {
  background: var(--input-bg);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .instructions {
  background: var(--surface-2);
  border-color: var(--border);
}
[data-theme="dark"] .score-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #0c4a6e 100%);
}
[data-theme="dark"] .spelling-session-card,
[data-theme="dark"] .test-card {
  background: var(--surface);
}
[data-theme="dark"] .test-card.selected {
  border-color: var(--primary);
  background: rgba(129, 140, 248, 0.1);
}

/* Stagger cards on grids (home) */
.grid-4 .card,
.grid-2 .card {
  animation: cardStagger 0.5s var(--ease-out) both;
}
.practice-exam-grid .card {
  --exam-card-glow: var(--primary-glow);
  overflow: visible;
  animation: cardStagger 0.5s var(--ease-out) backwards;
  transition:
    transform 0.32s var(--ease-spring),
    box-shadow 0.32s ease,
    border-color 0.22s ease;
}

.practice-exam-grid .card:hover {
  z-index: 2;
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
  box-shadow:
    0 14px 32px rgba(15, 23, 42, 0.12),
    0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent),
    0 8px 24px var(--exam-card-glow),
    0 0 28px var(--exam-card-glow),
    0 0 56px color-mix(in srgb, var(--exam-card-glow) 75%, transparent);
}

.practice-exam-grid .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at 50% 12%,
    color-mix(in srgb, var(--exam-card-glow) 42%, transparent),
    transparent 68%
  );
  transition: opacity 0.28s ease;
}

.practice-exam-grid .card:hover::after {
  opacity: 1;
  animation: examCardGlowPulse 1.55s ease-in-out infinite;
}

@keyframes examCardGlowPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

[data-theme="dark"] .practice-exam-grid .card:hover {
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in srgb, var(--primary) 70%, transparent),
    0 8px 28px var(--exam-card-glow),
    0 0 36px var(--exam-card-glow),
    0 0 64px color-mix(in srgb, var(--exam-card-glow) 85%, transparent);
}
.grid-4 .card:nth-child(1) { animation-delay: 0.05s; }
.grid-4 .card:nth-child(2) { animation-delay: 0.1s; }
.grid-4 .card:nth-child(3) { animation-delay: 0.15s; }
.grid-4 .card:nth-child(4) { animation-delay: 0.2s; }
.grid-2 .card:nth-child(1) { animation-delay: 0.08s; }
.grid-2 .card:nth-child(2) { animation-delay: 0.14s; }
@keyframes cardStagger {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .practice-exam-grid .card {
    animation: none;
    transition: none;
  }
  .practice-exam-grid .card:hover {
    transform: none;
  }
  .practice-exam-grid .card:hover::after {
    animation: none;
    opacity: 0.85;
  }
}

/* Links inside content */
.main-content a:not(.btn):not(.logo) {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.main-content a:not(.btn):not(.logo):hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; margin-left: auto; }

  .auth-slot {
    order: 4;
    margin-left: 0;
  }

  .auth-slot .auth-user {
    max-width: 8rem;
  }

  .auth-menu-toggle {
    max-width: 12rem;
    padding: 0.35rem 0.55rem;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.open { display: flex; }

  .main-nav a.nav-icon {
    width: auto;
    justify-content: flex-start;
    padding: 0.65rem 1rem;
  }

  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.65rem 1rem;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0.5rem 0.75rem;
    min-width: 0;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-link { padding: 0.5rem 0.85rem; }

  .btn:hover { transform: none; }
  .btn-primary:hover { animation: none; }
}

/* Spelling practice */
.spelling-nav-bar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.5rem;
  padding: 0.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.spelling-nav-btn {
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 auto;
  min-width: fit-content;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.spelling-nav-btn:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
}

.spelling-nav-btn.active {
  background: var(--surface-solid);
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.spelling-nav-btn.is-locked {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.72;
}

.spelling-nav-btn.is-locked:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
}

.spelling-nav-lock {
  font-size: 0.85em;
  line-height: 1;
}

.spelling-subscribe-cta {
  margin-top: 1rem;
}

/* Large spelling cards: skip glass hover — backdrop-filter + lift flashes in dark theme */
#spelling-root .card {
  background: var(--surface-solid);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#spelling-root .card:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--border);
}
#spelling-root .card:hover::before {
  opacity: 0;
}

[data-theme="dark"] .spelling-nav-btn.active {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface-solid));
  color: var(--primary-dark);
  box-shadow: 0 0 0 1px var(--border-strong);
}

@media (max-width: 640px) {
  .spelling-nav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .spelling-nav-bar::-webkit-scrollbar { display: none; }
  .spelling-nav-btn { flex: 0 0 auto; }
}

.spelling-category-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.spelling-category-card {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.spelling-category-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.spelling-category-card strong {
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.spelling-category-card span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.spelling-word-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.spelling-audio-actions {
  display: flex;
  flex-direction: row;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: nowrap;
}

.spelling-audio-col,
.spelling-audio-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  padding-left: 0.35rem !important;
  padding-right: 0.5rem !important;
}

.spelling-audio-actions .spelling-listen-sm {
  flex-shrink: 0;
}

.spelling-icons-col,
.spelling-icons-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.spelling-word-cell {
  min-width: 9rem;
  vertical-align: middle;
}

.spelling-word-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.spelling-word-text {
  font-weight: 700;
}

.spelling-double-letter {
  color: #c2410c;
  font-weight: 800;
}

[data-theme="dark"] .spelling-double-letter {
  color: #fdba74;
}

.spelling-ar-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--input-bg);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.spelling-ar-toggle:hover,
.spelling-ar-toggle.is-on {
  color: var(--primary-dark);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.spelling-arabic {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text);
  unicode-bidi: plaintext;
}

.spelling-check-label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.spelling-check-label input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  flex-shrink: 0;
}
.spelling-check-label input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
  background-size: 0.72rem;
  background-repeat: no-repeat;
  background-position: center;
}

.spelling-fav-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--input-bg);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  color: var(--text-muted);
  transition: opacity 0.2s, transform 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}

.spelling-fav-btn.is-fav {
  opacity: 1;
  color: #ca8a04;
  border-color: rgba(234, 179, 8, 0.85);
  background: rgba(250, 204, 21, 0.14);
}

.spelling-fav-btn:hover {
  opacity: 1;
  transform: scale(1.06);
  color: #ca8a04;
  border-color: rgba(234, 179, 8, 0.85);
  background: rgba(250, 204, 21, 0.12);
}

.spelling-listen-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.spelling-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.spelling-tab-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.spelling-tab-head h2 {
  margin: 0;
  font-size: 1.1rem;
  flex: 0 0 auto;
  align-self: center;
}

.spelling-tab-filters {
  margin: 0;
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9.5rem);
}

@media (min-width: 480px) {
  .spelling-tab-filters.spelling-options-simple {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9.5rem);
  }
}

@media (min-width: 720px) {
  .spelling-tab-filters.spelling-options-simple {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9.5rem);
  }
}

.spelling-tab-filters .spelling-label {
  min-width: 0;
}

.spelling-tab-filters .spelling-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.spelling-practice-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spelling-practice-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.spelling-practice-option--disabled {
  opacity: 0.65;
}

.spelling-practice-option--primary {
  border-color: var(--border-strong);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.06), rgba(244, 63, 94, 0.04));
}

.spelling-practice-option-main {
  flex: 1 1 12rem;
}

.spelling-practice-list-label {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.spelling-practice-option strong {
  display: block;
  margin-bottom: 0.15rem;
}

.spelling-practice-progress {
  margin: 0.5rem 0 0;
}

.spelling-practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.spelling-practice-jump {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.spelling-jump-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.spelling-jump-label {
  flex: 1 1 10rem;
  margin-bottom: 0;
}

.spelling-jump-input {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 12rem;
}

.spelling-word-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin: 0.35rem 0 1rem;
}

.spelling-word-nav .spelling-counter {
  margin: 0;
  min-width: 4.5rem;
}

.spelling-word-nav .btn {
  min-width: 6.5rem;
}

.spelling-session-report {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.spelling-word-nav + .spelling-jump-form,
.spelling-counter + .spelling-jump-form {
  justify-content: center;
  margin: 0 0 1rem;
}

.spelling-word-nav + .spelling-jump-form .spelling-jump-input,
.spelling-counter + .spelling-jump-form .spelling-jump-input {
  max-width: 8rem;
}

.spelling-example-cell {
  max-width: 28rem;
  line-height: 1.45;
}

.spelling-example-hint {
  margin: 0.75rem 0 0;
  line-height: 1.45;
  font-style: italic;
}

.spelling-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}

.spelling-search-label {
  flex: 1 1 14rem;
  margin-bottom: 0;
}

.spelling-search-input {
  margin-top: 0.35rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

.spelling-search-btn {
  flex: 0 0 auto;
}

.spelling-search-meta {
  margin: 0 0 0.75rem;
}

.spelling-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin: 0.75rem 0;
}

.spelling-pagination-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex: 1 1 100%;
  text-align: center;
}

.spelling-page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.spelling-page-num {
  appearance: none;
  -webkit-appearance: none;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.spelling-page-num:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.spelling-page-num.is-current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: default;
}

.spelling-page-ellipsis {
  padding: 0 0.15rem;
  color: var(--text-muted);
}

.spelling-voice-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.08));
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-strong);
}
.voice-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: voicePulse 2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.spelling-options {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.spelling-options-simple {
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .spelling-options-simple { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .spelling-options-simple { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 640px) {
  .spelling-options { grid-template-columns: repeat(3, 1fr); }
}
.spelling-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.spelling-select,
.spelling-input {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--input-bg);
  color-scheme: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.spelling-select option {
  background: var(--input-bg);
  color: var(--text);
}
.spelling-select:focus,
.spelling-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.spelling-visual-prompt {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface-muted, rgba(99, 102, 241, 0.06));
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  text-align: center;
}
.spelling-word-display {
  font-family: var(--font-display, inherit);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
  margin: 0;
}

.spelling-counter {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.spelling-live-score {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.spelling-final-score {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.spelling-final-score strong {
  font-weight: 700;
}

.spelling-wrong-list h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.word-list-preview {
  margin-top: 1.35rem;
  font-size: 0.9rem;
}
.word-list-preview summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 0.5rem 0;
}
.word-list-table-wrap {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
}
.word-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.word-list-table th,
.word-list-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.word-list-table th {
  background: var(--surface-2);
  position: sticky;
  top: 0;
}
[data-theme="dark"] .word-list-table th {
  background: var(--bg-elevated);
}

.word-list-num-col {
  width: 3rem;
  text-align: right;
  padding-right: 0.5rem !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.spelling-progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 1rem;
}
.spelling-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-out);
}

.spelling-session-card { margin-bottom: 1rem; }
.spelling-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.text-muted { color: var(--text-muted); font-size: 0.88rem; }

.spelling-audio-zone {
  text-align: center;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.08), rgba(244, 63, 94, 0.05));
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
}
.spelling-play-btn {
  min-width: 180px;
  font-size: 1rem;
}
.spelling-play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.spelling-play-row .spelling-play-btn {
  margin-bottom: 0;
}
.spelling-play-btn.is-playing {
  animation: btnPulse 1.2s ease-in-out infinite;
}
.spelling-play-btn .play-icon {
  display: inline-block;
  transition: transform 0.2s;
}
.spelling-play-btn.is-playing .play-icon {
  animation: playBounce 0.6s ease-in-out infinite;
}
@keyframes playBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.spelling-input {
  width: 100%;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 1rem;
}
.spelling-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.spell-feedback {
  margin-top: 1.25rem;
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  animation: panelIn 0.35s var(--ease-out) both;
}
.spell-result-perfect {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.spell-result-close {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(251, 191, 36, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.spell-result-wrong {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.spell-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.spell-grade-label { font-weight: 700; font-size: 1.05rem; }
.spell-points { font-weight: 700; color: var(--primary); }

.spell-diff {
  font-family: ui-monospace, monospace;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  padding: 0.65rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.spell-diff .spell-ok { color: var(--success); font-weight: 700; }
.spell-diff .spell-bad { color: var(--danger); font-weight: 700; text-decoration: underline; }
.spell-diff .spell-miss { color: var(--text-muted); }

.spelling-live-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.spell-review-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.spell-review-item {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.spell-review-item:last-child { border-bottom: none; }
.spell-review-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.spell-review-audio {
  margin-top: 0.55rem;
}
.spell-review-perfect strong { color: var(--success); }
.spell-review-close strong { color: var(--warning); }
.spell-review-incorrect strong,
.spell-review-wrong strong { color: var(--danger); }

#listening-workspace {
  margin-top: 1.5rem;
}

.listening-oet-embed {
  margin-top: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: min(72vh, 720px);
}

.listening-oet-embed .oet-practice {
  min-height: min(72vh, 720px);
}

/* Exam booking */
.exam-booking {
  margin-top: 1.5rem;
  padding: 1.35rem 1.4rem 1.5rem;
}

.exam-booking-calendar {
  margin-bottom: 1.75rem;
}

.exam-booking-month-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.exam-booking-month-label {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
}

.exam-booking-nav {
  min-width: 2.5rem;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.35rem 0.65rem;
}

.exam-booking-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.exam-booking-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.exam-booking-day {
  aspect-ratio: 1;
  min-height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: default;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.exam-booking-day.empty {
  border: none;
  background: transparent;
  pointer-events: none;
}

.exam-booking-day.selectable {
  cursor: pointer;
}

.exam-booking-day.selectable:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

.exam-booking-day.today:not(.selected) {
  border-color: var(--primary-2);
  box-shadow: inset 0 0 0 1px var(--primary-2);
}

.exam-booking-day.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}

.exam-booking-day.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.exam-booking-time-section h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.exam-booking-24h {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9em;
}

.exam-booking-time-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exam-booking-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.4rem;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.exam-booking-time {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0.45rem 0.35rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.exam-booking-time:hover {
  border-color: var(--primary);
}

.exam-booking-time.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}

.exam-booking-summary {
  margin: 1.25rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}

.exam-booking-summary p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.exam-booking-continue {
  margin-top: 0.5rem;
}

.exam-booking-contact {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.exam-booking-contact-lead {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.exam-booking-confirmed {
  margin-top: 1rem;
}

@media (max-width: 520px) {
  .exam-booking-day {
    min-height: 2.1rem;
    font-size: 0.82rem;
  }
  .exam-booking-times {
    grid-template-columns: repeat(4, 1fr);
    max-height: 14rem;
  }
}

/* Course recommendation quiz (#/recommend) */
.quiz-hero {
  margin-bottom: 1.5rem;
}

.recommend-card {
  max-width: 640px;
}

.recommend-progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.recommend-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: var(--radius-pill);
  transition: width 0.4s var(--ease-out);
}

.recommend-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin: 0 0 0.35rem;
}

.recommend-question {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.recommend-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.recommend-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.recommend-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease-spring);
}

.recommend-option:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.recommend-option.selected {
  border-color: var(--primary);
  background: var(--surface-2);
}

.recommend-check {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.recommend-option.selected .recommend-check {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}

.recommend-option[data-type="single"].selected .recommend-check {
  border-radius: 50%;
}

.recommend-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.recommend-nav .btn-primary {
  margin-left: auto;
}

.recommend-result-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0.5rem 0;
}

.recommend-result-desc {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.recommend-why-title {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.recommend-reasons {
  margin: 0 0 1.5rem;
  padding-left: 1.2rem;
}

.recommend-reasons li {
  margin-bottom: 0.5rem;
}

.recommend-cta {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .recommend-cta {
    flex-direction: row;
  }
  .recommend-cta .btn-block {
    flex: 1;
    width: auto;
  }
}

.recommend-alt {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}

.recommend-alt h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.recommend-alt-name {
  margin: 0;
  font-weight: 700;
}

.recommend-alt-desc {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Auth & dashboards */
.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.auth-menu {
  position: relative;
}

.auth-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 16rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.auth-menu-toggle:hover,
.auth-menu.open .auth-menu-toggle {
  border-color: var(--primary);
  background: var(--surface-2);
}

.auth-menu-chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.auth-menu.open .auth-menu-chevron {
  transform: rotate(180deg);
}

.auth-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 220;
}

.auth-menu.open .auth-menu-dropdown {
  display: block;
  animation: dropdownIn 0.2s var(--ease-out) both;
}

.auth-menu-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.auth-menu-item:hover {
  color: var(--primary-dark);
  background: var(--surface-2);
}

.auth-menu-item--danger:hover {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.08);
}

.dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.dashboard-head h1 {
  margin-bottom: 0.25rem;
}

.auth-user {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
}

.auth-user-expiry {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-user-expiry:empty {
  display: none;
}

.dashboard-sub-expiry {
  margin: 0.15rem 0 0;
}

.auth-page {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
}

.form-field textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.auth-forgot {
  margin: -0.4rem 0 0;
  text-align: right;
  font-size: 0.85rem;
}

.auth-form-error {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--danger);
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-switch .link-btn {
  font: inherit;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.text-muted-sm {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1rem;
}

.admin-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-dark);
  border-color: var(--border-strong);
}

.admin-details {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.admin-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
}

.assign-form,
.sub-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.assign-form select,
.sub-form select,
.assign-form input[type="date"],
.sub-form input[type="date"] {
  flex: 1;
  min-width: 8rem;
  font: inherit;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--input-bg);
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.exam-dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.exam-dashboard-card {
  padding: 1.35rem;
}

.exam-dashboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.exam-sections-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.exam-section-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.82rem;
}

.exam-section-chip strong {
  font-size: 0.85rem;
}

.exam-section-chip span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .dashboard-head {
    flex-direction: column;
    align-items: stretch;
  }

  .exam-dashboard-head {
    flex-direction: column;
  }
}

.attempts-tab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.attempt-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.attempt-filter select {
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
}

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

.attempts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.attempts-table th,
.attempts-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.attempts-table th {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.results-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.results-kpi-grid--compact {
  margin-bottom: 1.25rem;
}

.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 1rem 0 1.25rem;
}

.results-toolbar .form-field {
  margin: 0;
  min-width: 9rem;
}

.results-search {
  min-width: min(100%, 16rem);
  flex: 1;
}

.results-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.results-indicators {
  margin-bottom: 1.25rem;
}

.results-indicator-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.results-detail-drawer {
  margin-top: 1.5rem;
}

.results-detail-card {
  border: 1px solid var(--border-strong);
}

.score-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.78rem;
  font-weight: 700;
}

.score-badge--high {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.score-badge--low,
.badge.score-badge--low {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.perf-flag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
}

.perf-flag--low {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.perf-flag--up {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.perf-flag--down {
  background: rgba(234, 88, 12, 0.14);
  color: #c2410c;
}

.perf-flag--mixed {
  background: rgba(202, 138, 4, 0.14);
  color: #a16207;
}

.attempt-detail-row td {
  background: var(--surface-2);
}

.attempt-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.attempt-answer-log code {
  font-size: 0.8rem;
}

.attempt-score-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.score-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(99, 102, 241, 0.1);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.attempt-history-list .attempt-history-item + .attempt-history-item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.dashboard-score-menus {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0 2rem;
  max-width: none;
  width: 100%;
}

.dashboard-score-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  overflow: hidden;
}

.dashboard-score-menu > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1.35rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  min-height: 4.25rem;
}

.dashboard-score-menu > summary::-webkit-details-marker {
  display: none;
}

.dashboard-score-menu > summary::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2.5px solid var(--text-muted);
  border-bottom: 2.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.dashboard-score-menu[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 0.35rem;
}

.dashboard-score-menu-title {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.dashboard-score-menu-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.dashboard-score-menu-body {
  padding: 0 1.5rem 1.35rem;
  border-top: 1px solid var(--border);
}

.dashboard-score-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0;
}

.dashboard-score-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding: 1rem 0;
}

.dashboard-score-item + .dashboard-score-item {
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.dashboard-score-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.dashboard-score-item-main strong {
  font-size: 1.05rem;
}

.dashboard-score-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.dashboard-score-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.dashboard-score-pct {
  color: var(--primary-dark, var(--primary));
}

.dashboard-score-empty {
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
}

.dashboard-score-link {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.dashboard-q-solved {
  flex-basis: 100%;
  margin-top: 0.35rem;
}

.dashboard-q-solved-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-q-solved-legend {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dashboard-q-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-height: 11.5rem;
  overflow: auto;
  padding: 0.1rem 0.15rem 0.2rem 0;
}

.dashboard-q-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.55rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.04);
}

.dashboard-q-chip.is-correct {
  border-color: rgba(22, 163, 74, 0.65);
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.dashboard-q-chip.is-wrong {
  border-color: rgba(220, 38, 38, 0.65);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.attempt-history-item h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.attempt-history-item .badge {
  font-size: 0.72rem;
  font-weight: 600;
}

.attempt-answer-row {
  padding: 0.55rem 0;
}

.attempt-answer-row + .attempt-answer-row {
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.06));
}

.attempt-answer-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.attempt-answer-row.is-correct {
  border-left: 3px solid #16a34a;
  padding-left: 0.65rem;
}

.attempt-answer-row.is-wrong {
  border-left: 3px solid #dc2626;
  padding-left: 0.65rem;
}

.modal .attempt-answer-log {
  max-height: min(50vh, 420px);
  overflow: auto;
  margin-top: 0.75rem;
}

/* ——— Courses page & comparison table ——— */
.courses-page {
  max-width: 1100px;
  margin: 0 auto;
}

.courses-hero {
  margin-bottom: 2rem;
}

.courses-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.courses-find-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.courses-find-section .recommend-card {
  max-width: 100%;
}

.course-cards-grid {
  display: grid;
  gap: 1.35rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .course-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.course-offering-card {
  display: flex;
  flex-direction: column;
  animation: cardStagger 0.55s var(--ease-out) both;
  animation-delay: calc(var(--card-i, 0) * 0.08s + 0.05s);
}
.course-offering-card--capsule {
  border-color: rgba(249, 115, 22, 0.28);
  border-top: 4px solid #ea580c;
}
.course-offering-card--standard {
  border-color: rgba(16, 185, 129, 0.28);
  border-top: 4px solid #059669;
}
.course-offering-card--mega {
  border-color: rgba(139, 92, 246, 0.3);
  border-top: 4px solid #6d28d9;
}
.course-offering-card--featured {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.course-offering-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}
.course-offering-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 0.85rem;
  transition: transform 0.4s var(--ease-spring);
}
.course-offering-card:hover .course-offering-icon {
  transform: scale(1.08) rotate(-3deg);
}
.course-offering-icon--capsule {
  background: linear-gradient(165deg, rgba(255, 247, 237, 0.95) 0%, rgba(255, 237, 213, 0.9) 55%, rgba(254, 215, 170, 0.82) 100%);
  border: 1px solid rgba(249, 115, 22, 0.28);
}
.course-offering-icon--standard {
  background: linear-gradient(165deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.9) 55%, rgba(167, 243, 208, 0.82) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.course-offering-icon--mega {
  background: linear-gradient(165deg, rgba(245, 243, 255, 0.95) 0%, rgba(237, 233, 254, 0.9) 55%, rgba(221, 214, 254, 0.82) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
}
[data-theme="dark"] .course-offering-icon--capsule {
  background: linear-gradient(165deg, rgba(124, 45, 18, 0.55) 0%, rgba(154, 52, 18, 0.42) 100%);
  border-color: rgba(251, 146, 60, 0.28);
}
[data-theme="dark"] .course-offering-icon--standard {
  background: linear-gradient(165deg, rgba(6, 78, 59, 0.55) 0%, rgba(4, 120, 87, 0.42) 100%);
  border-color: rgba(52, 211, 153, 0.28);
}
[data-theme="dark"] .course-offering-icon--mega {
  background: linear-gradient(165deg, rgba(76, 29, 149, 0.55) 0%, rgba(91, 33, 182, 0.42) 100%);
  border-color: rgba(167, 139, 250, 0.3);
}
.course-offering-name {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.course-offering-tagline {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.course-offering-card--capsule .course-offering-tagline,
.course-offering-card--standard .course-offering-tagline,
.course-offering-card--mega .course-offering-tagline {
  color: var(--primary-dark);
}
[data-theme="dark"] .course-offering-card--capsule .course-offering-tagline {
  color: #fdba74;
}
[data-theme="dark"] .course-offering-card--standard .course-offering-tagline {
  color: #6ee7b7;
}
[data-theme="dark"] .course-offering-card--mega .course-offering-tagline {
  color: #c4b5fd;
}
.course-offering-desc {
  flex: 1;
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.course-offering-card .btn {
  align-self: flex-start;
}
[data-theme="dark"] .course-offering-card--capsule {
  border-color: rgba(251, 146, 60, 0.28);
  border-top-color: #ea580c;
}
[data-theme="dark"] .course-offering-card--standard {
  border-color: rgba(52, 211, 153, 0.28);
  border-top-color: #059669;
}
[data-theme="dark"] .course-offering-card--mega {
  border-color: rgba(167, 139, 250, 0.3);
  border-top-color: #6d28d9;
}
[data-theme="dark"] .course-offering-card--capsule .btn-outline {
  color: #fff;
}
[data-theme="dark"] .course-offering-card--capsule .btn-outline:hover {
  background: rgba(234, 88, 12, 0.22);
  border-color: #fb923c;
  color: #fff;
}
[data-theme="dark"] .course-offering-card--mega .btn-outline {
  color: #fff;
}
[data-theme="dark"] .course-offering-card--mega .btn-outline:hover {
  background: rgba(109, 40, 217, 0.22);
  border-color: #a78bfa;
  color: #fff;
}

/* Comparison section */
.course-comparison {
  margin-top: 0.5rem;
}

.cmp-enter {
  animation: cmpFadeUp 0.65s var(--ease-out) both;
}
.course-comparison.cmp-enter {
  animation-delay: 0.2s;
}
@keyframes cmpFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cmp-header {
  text-align: center;
  margin-bottom: 2rem;
}
.cmp-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cmp-subtitle {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 38rem;
  margin-inline: auto;
  line-height: 1.6;
}

.cmp-shell {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.cmp-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
  padding: 1.1rem 1rem 1.25rem;
}
.cmp-scroll:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.cmp-scroll::-webkit-scrollbar {
  height: 5px;
}
.cmp-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: var(--radius-pill);
}

.cmp-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 1.2rem 0.65rem;
  font-size: 0.94rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cmp-table col.cmp-col {
  width: 25%;
}

.cmp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 25%;
  min-height: 8.5rem;
  padding: 1.15rem 0.9rem;
  text-align: center;
  font-weight: 700;
  color: #fff;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 5px 16px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  vertical-align: middle;
  transition:
    filter 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}
.cmp-corner {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}
.cmp-corner-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.72;
}
.cmp-col-head {
  position: relative;
}
.cmp-col-head-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 7rem;
  width: 100%;
}
.cmp-col-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.cmp-col-emoji {
  display: block;
  font-size: 2.85rem;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.22));
  transform-origin: center bottom;
}
.cmp-col-emoji--capsule {
  animation: cmpEmojiFloat 3.2s ease-in-out infinite;
}
.cmp-col-emoji--standard {
  animation: cmpEmojiTilt 4s ease-in-out infinite;
}
.cmp-col-emoji--mega {
  animation: cmpEmojiGlow 2.8s ease-in-out infinite;
}
@keyframes cmpEmojiFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-7px) rotate(4deg);
  }
}
@keyframes cmpEmojiTilt {
  0%,
  100% {
    transform: rotate(-8deg) translateY(0);
  }
  50% {
    transform: rotate(8deg) translateY(-5px);
  }
}
@keyframes cmpEmojiGlow {
  0%,
  100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.22));
  }
  50% {
    transform: scale(1.08) translateY(-4px);
    filter: drop-shadow(0 4px 14px rgba(251, 191, 36, 0.45));
  }
}
@media (prefers-reduced-motion: reduce) {
  .cmp-col-emoji--capsule,
  .cmp-col-emoji--standard,
  .cmp-col-emoji--mega {
    animation: none;
  }
}
.cmp-col-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.1rem;
  text-align: center;
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}
/* — Capsule column: warm amber / coral — */
.cmp-col-head--capsule {
  background: linear-gradient(145deg, #ea580c 0%, #9a3412 100%);
  border-bottom: 3px solid #fb923c;
  box-shadow:
    0 5px 16px rgba(234, 88, 12, 0.18),
    inset 0 1px 0 rgba(255, 237, 213, 0.16);
}
.cmp-plan-accent--capsule {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.35rem);
  color: #fdba74;
  letter-spacing: 0.01em;
}

/* — Standard column: emerald / teal — */
.cmp-col-head--standard {
  background: linear-gradient(145deg, #059669 0%, #064e3b 100%);
  border-bottom: 3px solid #4ade80;
  box-shadow:
    0 5px 16px rgba(5, 150, 105, 0.18),
    inset 0 1px 0 rgba(209, 250, 229, 0.14);
}
.cmp-col-head--featured {
  box-shadow:
    0 7px 20px rgba(74, 222, 128, 0.16),
    inset 0 1px 0 rgba(209, 250, 229, 0.16);
}
.cmp-col-head--featured .cmp-col-head-inner {
  gap: 0.35rem;
  padding-top: 0.15rem;
}
.cmp-col-badge {
  position: static;
  align-self: center;
  flex-shrink: 0;
  order: -1;
  margin: 0 0 0.1rem;
  padding: 0.22rem 0.62rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.18);
  color: #ecfdf5;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(4px);
}

/* — MEGA column: violet / gold — */
.cmp-col-head--mega {
  background: linear-gradient(145deg, #6d28d9 0%, #3730a3 100%);
  border-bottom: 3px solid #fbbf24;
  box-shadow:
    0 5px 16px rgba(109, 40, 217, 0.18),
    inset 0 1px 0 rgba(237, 233, 254, 0.12);
}
.cmp-plan-sub {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}
.cmp-plan-accent {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.cmp-plan-accent--standard {
  font-weight: 700;
  color: #4ade80;
}
.cmp-plan-accent--mega {
  font-weight: 800;
  font-size: clamp(2.05rem, 3.4vw, 2.5rem);
  color: #fbbf24;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cmp-table tbody tr {
  animation: cmpRowIn 0.45s var(--ease-out) both;
  animation-delay: calc(var(--row-i, 0) * 0.035s + 0.12s);
}
@keyframes cmpRowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cmp-row--section-start td,
.cmp-row--section-start th {
  position: relative;
}
.cmp-row--section-start td::before,
.cmp-row--section-start th::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 0.5rem;
  right: 0.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  pointer-events: none;
}
.cmp-row--skills.cmp-row--section-start td::before,
.cmp-row--skills.cmp-row--section-start th::before {
  display: none;
}

.cmp-table tbody th,
.cmp-table tbody td {
  width: 25%;
  padding: 1rem 0.85rem;
  text-align: center;
  vertical-align: middle;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.32);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition:
    background 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    transform 0.22s var(--ease-out);
}
.cmp-table tbody th {
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--text);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(255, 255, 255, 0.28) 100%);
}
.cmp-table tbody td[data-col="capsule"] {
  background: linear-gradient(165deg, rgba(255, 247, 237, 0.48) 0%, rgba(255, 237, 213, 0.38) 55%, rgba(254, 215, 170, 0.32) 100%);
  border-color: rgba(249, 115, 22, 0.28);
  color: #7c2d12;
}
.cmp-table tbody td[data-col="standard"] {
  background: linear-gradient(165deg, rgba(236, 253, 245, 0.48) 0%, rgba(209, 250, 229, 0.38) 55%, rgba(167, 243, 208, 0.32) 100%);
  border-color: rgba(16, 185, 129, 0.28);
  color: #064e3b;
}
.cmp-table tbody td[data-col="mega"] {
  background: linear-gradient(165deg, rgba(245, 243, 255, 0.48) 0%, rgba(237, 233, 254, 0.38) 55%, rgba(221, 214, 254, 0.32) 100%);
  border-color: rgba(139, 92, 246, 0.3);
  color: #4c1d95;
}

[data-theme="dark"] .cmp-table tbody th,
[data-theme="dark"] .cmp-table tbody td {
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .cmp-table tbody th {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.08) 0%, rgba(19, 28, 49, 0.42) 100%);
  color: var(--text);
}
[data-theme="dark"] .cmp-table tbody td[data-col="capsule"] {
  background: linear-gradient(165deg, rgba(124, 45, 18, 0.32) 0%, rgba(154, 52, 18, 0.24) 100%);
  border-color: rgba(251, 146, 60, 0.28);
  color: #fed7aa;
}
[data-theme="dark"] .cmp-table tbody td[data-col="standard"] {
  background: linear-gradient(165deg, rgba(6, 78, 59, 0.34) 0%, rgba(4, 120, 87, 0.24) 100%);
  border-color: rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
}
[data-theme="dark"] .cmp-table tbody td[data-col="mega"] {
  background: linear-gradient(165deg, rgba(76, 29, 149, 0.34) 0%, rgba(91, 33, 182, 0.26) 100%);
  border-color: rgba(167, 139, 250, 0.3);
  color: #ddd6fe;
}

.cmp-table thead th.cmp-corner:hover {
  filter: brightness(1.06);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.cmp-table thead th[data-col="capsule"]:hover {
  filter: brightness(1.05);
  box-shadow:
    0 7px 18px rgba(234, 88, 12, 0.22),
    inset 0 1px 0 rgba(255, 237, 213, 0.18);
}
.cmp-table thead th[data-col="standard"]:hover {
  filter: brightness(1.05);
  box-shadow:
    0 7px 18px rgba(5, 150, 105, 0.22),
    inset 0 1px 0 rgba(209, 250, 229, 0.16);
}
.cmp-table thead th[data-col="mega"]:hover {
  filter: brightness(1.05);
  box-shadow:
    0 7px 18px rgba(109, 40, 217, 0.24),
    inset 0 1px 0 rgba(237, 233, 254, 0.14);
}

.cmp-table tbody th:hover {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12) 0%, rgba(255, 255, 255, 0.48) 100%) !important;
  border-color: var(--border-strong);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
  z-index: 1;
  position: relative;
}
.cmp-table tbody td[data-col="capsule"]:hover {
  background: linear-gradient(165deg, rgba(255, 237, 213, 0.62) 0%, rgba(254, 215, 170, 0.52) 55%, rgba(253, 186, 116, 0.44) 100%) !important;
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.16);
  transform: translateY(-1px);
  z-index: 1;
  position: relative;
}
.cmp-table tbody td[data-col="standard"]:hover {
  background: linear-gradient(165deg, rgba(209, 250, 229, 0.62) 0%, rgba(167, 243, 208, 0.52) 55%, rgba(110, 231, 183, 0.44) 100%) !important;
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.16);
  transform: translateY(-1px);
  z-index: 1;
  position: relative;
}
.cmp-table tbody td[data-col="mega"]:hover {
  background: linear-gradient(165deg, rgba(237, 233, 254, 0.62) 0%, rgba(221, 214, 254, 0.52) 55%, rgba(196, 181, 253, 0.44) 100%) !important;
  border-color: rgba(109, 40, 217, 0.45);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.18);
  transform: translateY(-1px);
  z-index: 1;
  position: relative;
}
[data-theme="dark"] .cmp-table tbody td[data-col="capsule"]:hover {
  background: linear-gradient(165deg, rgba(154, 52, 18, 0.65) 0%, rgba(194, 65, 12, 0.5) 100%) !important;
}
[data-theme="dark"] .cmp-table tbody td[data-col="standard"]:hover {
  background: linear-gradient(165deg, rgba(4, 120, 87, 0.65) 0%, rgba(5, 150, 105, 0.5) 100%) !important;
}
[data-theme="dark"] .cmp-table tbody td[data-col="mega"]:hover {
  background: linear-gradient(165deg, rgba(91, 33, 182, 0.65) 0%, rgba(109, 40, 217, 0.52) 100%) !important;
}

.cmp-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  line-height: 1.45;
  width: 100%;
  max-width: 100%;
}
.cmp-tag {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
.cmp-table tbody td[data-col="capsule"] .cmp-tag {
  color: #7c2d12;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(234, 88, 12, 0.28);
}
.cmp-table tbody td[data-col="standard"] .cmp-tag {
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(5, 150, 105, 0.28);
}
.cmp-table tbody td[data-col="mega"] .cmp-tag {
  color: #4c1d95;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(109, 40, 217, 0.3);
}
[data-theme="dark"] .cmp-table tbody td[data-col="capsule"] .cmp-tag {
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.2);
  border-color: rgba(251, 146, 60, 0.35);
}
[data-theme="dark"] .cmp-table tbody td[data-col="standard"] .cmp-tag {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.32);
}
[data-theme="dark"] .cmp-table tbody td[data-col="mega"] .cmp-tag {
  color: #ddd6fe;
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(167, 139, 250, 0.35);
}

.cmp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: transform 0.3s var(--ease-spring);
}
.cmp-icon-svg {
  width: 2.35rem;
  height: 2.35rem;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.14));
}
.cmp-icon--yes .cmp-icon-bg {
  fill: #10b981;
}
.cmp-icon--no .cmp-icon-bg {
  fill: #ef4444;
}
.cmp-table tbody td[data-col="capsule"] .cmp-icon--yes .cmp-icon-bg {
  fill: #ea580c;
}
.cmp-table tbody td[data-col="standard"] .cmp-icon--yes .cmp-icon-bg {
  fill: #059669;
}
.cmp-table tbody td[data-col="mega"] .cmp-icon--yes .cmp-icon-bg {
  fill: #7c3aed;
}
.cmp-emoji {
  font-size: 1.45rem;
  line-height: 1;
}
.cmp-icon--yes,
.cmp-icon--no {
  color: inherit;
  background: transparent;
  border: none;
  box-shadow: none;
}
.cmp-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
  animation: cmpFadeUp 0.6s var(--ease-out) 0.45s both;
}
.btn-lg {
  padding: 0.9rem 2.25rem;
  font-size: 1rem;
}
.cmp-enroll-btn {
  min-width: 14rem;
  animation: cmpCtaPulse 2.5s ease-in-out infinite;
}
@keyframes cmpCtaPulse {
  0%, 100% {
    box-shadow: 0 4px 18px var(--accent-glow);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 6px 24px rgba(251, 146, 60, 0.35);
    transform: translateY(-1px);
  }
}

@media (max-width: 640px) {
  .cmp-table {
    min-width: 640px;
    font-size: 0.88rem;
    border-spacing: 0.9rem 0.55rem;
  }
  .cmp-table tbody th {
    font-size: 0.88rem;
  }
  .cmp-tag {
    font-size: 0.82rem;
  }
  .cmp-table thead th,
  .cmp-table tbody th,
  .cmp-table tbody td {
    padding: 0.8rem 0.75rem;
  }
  .cmp-plan-accent,
  .cmp-plan-accent--capsule,
  .cmp-plan-accent--mega {
    font-size: 1.7rem;
  }
}

/* ---------------------------------------------------------------------------
   OET Vocabulary Bank
   --------------------------------------------------------------------------- */
.vocab-page-head {
  margin-bottom: 1rem;
}

.vocab-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
}

.vocab-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.vocab-nav-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

.vocab-nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.vocab-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(8rem, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.vocab-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vocab-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.vocab-results-meta,
.vocab-loading {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.vocab-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.vocab-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.05rem 1.1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 4%, transparent);
}

.vocab-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vocab-entry-line {
  margin: 0;
  line-height: 1.55;
  font-size: 0.96rem;
  color: var(--text);
}

.vocab-entry-title {
  font-size: 1.02rem;
}

.vocab-entry-num {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.vocab-entry-word {
  font-weight: 700;
}

.vocab-entry-sep {
  color: var(--text-muted);
}

.vocab-entry-def {
  font-weight: 400;
}

.vocab-entry-k {
  font-weight: 700;
  margin-inline-end: 0.3rem;
  color: var(--text);
}

.vocab-entry-meta {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.vocab-arabic {
  unicode-bidi: plaintext;
}

.vocab-entry-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.vocab-inline-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vocab-inline-btn:hover {
  color: var(--primary);
}

.vocab-fav-btn.is-fav,
.vocab-master-btn.is-mastered {
  color: var(--accent);
  text-decoration: none;
}

.vocab-details {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vocab-details.is-collapsed {
  display: none;
}

.vocab-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.vocab-pagination {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

.vocab-empty {
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.vocab-empty h2 {
  margin-bottom: 0.4rem;
}

.vocab-empty p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.vocab-daily-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.vocab-daily-date {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.vocab-daily-meta {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.vocab-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.vocab-history-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.vocab-history-item:hover strong {
  color: var(--primary);
}

.vocab-history-item span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .vocab-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .vocab-nav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .vocab-nav-btn {
    flex: 0 0 auto;
  }

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

[data-theme="dark"] .vocab-card,
[data-theme="dark"] .vocab-empty {
  background: var(--surface);
}

/* ── My NOTEBOOK ─────────────────────────────────────────────── */

.notebook-page {
  max-width: 52rem;
}

.notebook-exam-date-card {
  margin: 1.25rem 0 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.notebook-exam-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.notebook-exam-date-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notebook-exam-date-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.notebook-exam-date-clear:hover {
  color: var(--danger, #dc2626);
  text-decoration: underline;
}

.notebook-exam-date-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.notebook-exam-date-remaining {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}

.notebook-exam-date-empty {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.notebook-exam-date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.85rem;
}

.notebook-exam-date-input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.notebook-exam-date-input {
  min-width: 10.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg, var(--surface-solid));
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.notebook-exam-date-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.notebook-progress-card {
  display: block;
  width: 100%;
  margin: 1rem 0 2rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: default;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

button.notebook-progress-card {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

button.notebook-progress-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button.notebook-progress-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.notebook-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.notebook-progress-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notebook-progress-pct {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-display);
}

.notebook-progress-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.notebook-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: var(--radius-pill);
  transition: width 0.5s var(--ease-out);
}

.notebook-progress-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.notebook-progress-hint {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

.notebook-back-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
}

.notebook-back-link:hover {
  color: var(--primary);
}

.notebook-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
}

.notebook-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.notebook-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.notebook-nav-btn.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 600;
}

.notebook-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.notebook-section-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.notebook-section-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.notebook-section-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.notebook-section-card h3 {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

.notebook-section-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1;
}

.notebook-section-link {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

.notebook-placeholder {
  text-align: center;
  padding: 2rem 1.5rem;
}

.notebook-placeholder .notebook-section-icon {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
}

.listening-dose-todo-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.listening-dose-todo {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}

.listening-dose-todo:hover {
  border-color: var(--primary);
}

.listening-dose-todo.is-done {
  opacity: 0.72;
}

.listening-dose-todo-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  margin: 0;
  font-weight: 560;
  color: var(--text);
}

.listening-dose-todo-text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  flex: 1;
  min-width: 0;
}

.listening-dose-todo-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.listening-dose-todo.is-done .listening-dose-todo-label {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.listening-dose-todo.is-done .listening-dose-todo-text {
  text-decoration: line-through;
}

.listening-dose-todo-check {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}

.listening-dose-todo-link {
  color: inherit;
  text-decoration: none;
}

.listening-dose-todo-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.notebook-listening-dose {
  margin: 1.25rem 0 0;
}

.listening-dose-min-note {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-muted);
}

.listening-dose-progress-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.listening-dose-reset {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.listening-dose-reset:hover {
  color: var(--danger, #dc2626);
  text-decoration: underline;
}

.listening-dose-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.listening-dose-logo {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--primary) 35%, transparent));
}

.listening-dose-logo svg {
  display: block;
}

.notebook-dose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.notebook-notes-input {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 12rem;
}

.notebook-notes-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.notebook-notes-status {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .notebook-nav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  .notebook-nav-btn {
    flex: 0 0 auto;
  }

  .notebook-section-grid {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.gallery-featured-count {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-dark);
  white-space: nowrap;
}

.gallery-featured-count--full {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.gallery-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.gallery-selection-meta {
  margin: 0 0 1rem;
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.gallery-admin-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-admin-card.is-featured {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.gallery-admin-check {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.25rem;
  padding: 0.15rem;
  line-height: 0;
}

.gallery-admin-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}

.gallery-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-featured-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.gallery-admin-meta {
  padding: 0.65rem 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.gallery-admin-name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-order-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.gallery-order-field input {
  width: 4rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.gallery-pagination {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn::before { display: none; }
}

/* ═══════════════════════════════════════════
   Home Page
   ═══════════════════════════════════════════ */

.main-content.home-active {
  max-width: 1180px;
  padding-top: 2rem;
}

.home-page {
  --home-section-gap: 5rem;
  min-width: 0;
  overflow-x: clip;
}

.home-hero,
.home-feature-section,
.home-targeted,
.home-qbank,
.home-section {
  min-width: 0;
}

/* Hero */
.home-hero {
  display: grid;
  gap: 2.75rem;
  align-items: center;
  margin-bottom: var(--home-section-gap);
  padding: 1.5rem 0 0.5rem;
  min-width: 0;
}
@media (min-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.85fr); }
}

.home-eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.home-hero .home-eyebrow {
  margin: 0 0 1rem;
  padding: 0.55rem 1.25rem;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.home-hero h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(2.05rem, 4.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.038em;
  margin: 0 0 1.15rem;
  max-width: none;
  color: var(--text);
}
.home-hero-title-line {
  white-space: nowrap;
}
.home-hero h1 .gradient-text {
  font-family: inherit;
  font-weight: 700;
  font-style: normal;
  letter-spacing: inherit;
}

.home-hero-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.home-hero-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 46ch;
  margin: 0 0 1.5rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero visual */
.home-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 1.25rem 0.5rem 1.5rem;
  min-width: 0;
  width: 100%;
}

.home-hero-mock {
  width: 100%;
  max-width: 340px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.home-hero-mock-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
}
.home-hero-mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.home-hero-mock-bar span:first-child { background: #f87171; }
.home-hero-mock-bar span:nth-child(2) { background: #fbbf24; }
.home-hero-mock-bar span:nth-child(3) { background: #34d399; }

.home-hero-mock-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.home-hero-mock-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.home-hero-mock-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 4.5rem;
  flex-shrink: 0;
}
.home-hero-mock-bar-fill {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.home-hero-mock-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.home-hero-mock-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.home-hero-grade {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--success);
}
.home-hero-score {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.home-hero-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.home-hero-badge-icon {
  display: flex;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--primary);
}
.home-hero-badge-icon svg { width: 100%; height: 100%; }
.home-hero-badge--1 { top: 0; right: 0; }
.home-hero-badge--2 { bottom: 0; left: 0; }

/* Alerts */
.home-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.home-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}
.home-alert a { color: var(--primary); font-weight: 600; }

/* Sections */
.home-section {
  margin-bottom: var(--home-section-gap);
}
.home-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
}
.home-section-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.home-section-header p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Overview grid */
.home-overview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .home-overview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .home-overview-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .home-overview-grid { grid-template-columns: repeat(4, 1fr); } }

.home-overview-card {
  --overview-card-glow: var(--primary-glow);
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, border-color 0.3s;
}
.home-overview-card--soon {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}
.home-overview-card--listening { --overview-card-glow: rgba(245, 158, 11, 0.5); }
.home-overview-card--reading { --overview-card-glow: rgba(16, 185, 129, 0.48); }
.home-overview-card--spelling { --overview-card-glow: rgba(16, 185, 129, 0.48); }
.home-overview-card--bank,
.home-overview-card--mock-exam,
.home-overview-card--courses,
.home-overview-card--vocab { --overview-card-glow: rgba(99, 102, 241, 0.48); }
.home-overview-card--writing,
.home-overview-card--grammar { --overview-card-glow: rgba(139, 92, 246, 0.5); }
.home-overview-card--speaking { --overview-card-glow: rgba(244, 63, 94, 0.48); }
.home-overview-card--notebook,
.home-overview-card--dose { --overview-card-glow: rgba(14, 165, 233, 0.5); }
.home-overview-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--overview-card-glow) 70%, var(--border-strong));
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 8px 22px var(--overview-card-glow),
    0 0 28px var(--overview-card-glow),
    0 0 48px color-mix(in srgb, var(--overview-card-glow) 75%, transparent);
}
.home-overview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--primary);
  transition: transform 0.3s var(--ease-spring);
}
.home-overview-card:hover .home-overview-icon {
  transform: scale(1.06);
}
.home-overview-icon svg { width: 1.65rem; height: 1.65rem; }

.home-overview-icon--mock-exam {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(14, 165, 233, 0.14));
  color: var(--primary);
}
.home-overview-icon--listening {
  background: #ffd4a8;
  color: #b45309;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}
.home-overview-icon--reading {
  background: #c8ecd4;
  color: #047857;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.home-overview-icon--bank {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22);
}
.home-overview-icon--spelling {
  background: #b8f0d4;
  color: #047857;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.22);
}
.home-overview-icon--vocab {
  background: #c7d2fe;
  color: #4338ca;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.home-overview-icon--writing {
  background: #e4d4f7;
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}
.home-overview-icon--speaking {
  background: #f8d0d0;
  color: #be123c;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.22);
}
.home-overview-icon--notebook {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  color: #0369a1;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.22);
}
.home-overview-icon--courses {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(14, 165, 233, 0.12));
  color: var(--primary);
}
.home-overview-icon--dose {
  background: linear-gradient(135deg, #e0f2fe, #ddd6fe);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.22);
}
.home-overview-icon--grammar {
  background: #e4d4f7;
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.home-clinic-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.28));
}

.home-clinic-logo svg {
  display: block;
}

.home-qbank-logo,
.home-notebook-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.home-qbank-logo {
  filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.28));
}

.home-notebook-logo {
  filter: drop-shadow(0 2px 6px rgba(14, 165, 233, 0.28));
}

.home-qbank-logo svg,
.home-notebook-logo svg {
  display: block;
}

.home-overview-icon .home-qbank-logo svg,
.home-overview-icon .home-notebook-logo svg {
  width: 2rem;
  height: 2rem;
}

.home-feature-icon-wrap .home-notebook-logo svg {
  width: 56px;
  height: 56px;
}

.home-overview-icon--grammar .home-clinic-logo {
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.22));
}

.home-overview-icon .listening-dose-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--primary) 30%, transparent));
}

.home-overview-icon .listening-dose-logo svg {
  width: 2rem;
  height: 2rem;
}

.home-listening-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.28));
}

.home-listening-logo svg {
  display: block;
}

.home-feature-icon-wrap .home-listening-logo {
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.35));
}

.home-grade-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.25rem 0.4rem;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.14), rgba(14, 165, 233, 0.1));
  border: 1.5px solid var(--border-strong);
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.home-grade-logo-max {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-feature-icon-wrap--grade {
  width: 120px;
  height: 120px;
}

.home-feature-icon-wrap--grade .home-grade-logo {
  min-width: 4.5rem;
  min-height: 4.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 18px;
  border-width: 2px;
}

.home-feature-icon-wrap--grade .home-grade-logo-max {
  font-size: 1.65rem;
}

.home-feature-section--premium .home-grade-logo {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.home-feature-section--premium .home-grade-logo-max {
  background: linear-gradient(135deg, #a5f3fc, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-overview-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}
.home-overview-card p {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.home-overview-link {
  --overview-link-glow: var(--primary-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}
.home-overview-card:hover .home-overview-link:not(.home-overview-link--soon) {
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 6px 16px var(--overview-card-glow),
    0 0 20px var(--overview-card-glow),
    0 0 36px color-mix(in srgb, var(--overview-card-glow) 80%, transparent);
}
.home-overview-link--soon {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.home-overview-card--mock-exam:hover .home-overview-link { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.home-overview-card--listening:hover .home-overview-link { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.home-overview-card--reading:hover .home-overview-link { background: linear-gradient(135deg, #34d399, #059669); }
.home-overview-card--bank:hover .home-overview-link { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.home-overview-card--spelling:hover .home-overview-link { background: linear-gradient(135deg, #34d399, #059669); }
.home-overview-card--vocab:hover .home-overview-link { background: linear-gradient(135deg, #818cf8, #6366f1); }
.home-overview-card--writing:hover .home-overview-link { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.home-overview-card--speaking:hover .home-overview-link { background: linear-gradient(135deg, #fb7185, #e11d48); }
.home-overview-card--notebook:hover .home-overview-link { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.home-overview-card--courses:hover .home-overview-link { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.home-overview-card--dose:hover .home-overview-link { background: linear-gradient(135deg, #38bdf8, #818cf8); }
.home-overview-card--grammar:hover .home-overview-link { background: linear-gradient(135deg, #a78bfa, #7c3aed); }

/* Feature sections */
.home-feature-section {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: var(--home-section-gap);
  padding: 2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 800px) {
  .home-feature-section {
    grid-template-columns: 1.2fr 1fr;
    padding: 2.5rem;
  }
  .home-feature-section--reverse .home-feature-content { order: 2; }
  .home-feature-section--reverse .home-feature-visual { order: 1; }
}

.home-feature-section--premium {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #0c4a6e 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.home-feature-section--premium .home-eyebrow {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #a5f3fc;
}
.home-feature-section--premium h2 { color: #fff; }
.home-feature-section--premium .home-feature-desc,
.home-feature-section--premium .home-why-title { color: rgba(255,255,255,0.85); }
.home-feature-section--premium .home-benefits li { color: rgba(255,255,255,0.9); }
.home-feature-section--premium .home-benefit-check {
  background: rgba(255,255,255,0.15);
  color: #6ee7b7;
}
.home-feature-section--premium .home-feature-icon-wrap {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #a5f3fc;
}

.home-sor-preview {
  width: 100%;
  max-width: 340px;
  padding: 0.7rem 0.65rem 0.55rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  animation: homeSorFloat 5.5s ease-in-out infinite;
}
.home-feature-visual--mock {
  position: relative;
  overflow: visible;
  padding-top: 7rem;
}
.home-mock-ready {
  position: absolute;
  top: 0.85rem;
  left: 0;
  max-width: calc(100% - 9.5rem);
  z-index: 2;
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  animation: homeMockReadyFloat 5.5s ease-in-out infinite;
}
.home-mock-ready span {
  white-space: nowrap;
}
.home-feature-visual--mock .home-sor-grade {
  position: absolute;
  top: -1.25rem;
  right: -0.5rem;
  width: 140px;
  height: 140px;
  animation: homeSorFloat 5.5s ease-in-out infinite;
  animation-delay: 0.6s;
}
@media (min-width: 800px) {
  .home-feature-visual--mock {
    padding-top: 10.5rem;
  }
  .home-mock-ready {
    top: 1.6rem;
    max-width: calc(100% - 11rem);
    font-size: clamp(1.85rem, 2.8vw, 2.35rem);
  }
  .home-feature-visual--mock .home-sor-grade {
    top: 0;
    right: 0;
  }
}
.home-sor-report {
  position: absolute;
  bottom: -0.35rem;
  left: -0.15rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  animation: homeSorFloat 5.5s ease-in-out infinite;
  animation-delay: 1.1s;
}
.home-sor-report-icon {
  display: flex;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--primary);
}
.home-sor-report-icon svg {
  width: 100%;
  height: 100%;
}
.home-sor-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.home-sor-band {
  font-size: 9px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}
.home-sor-col {
  font-size: 8.5px;
  font-weight: 700;
  fill: #111;
  font-family: Arial, Helvetica, sans-serif;
}
.home-sor-score {
  font-size: 8px;
  font-weight: 700;
  fill: #fff;
  font-family: Arial, Helvetica, sans-serif;
}
.home-sor-marker {
  transform: translateY(var(--from, 120px));
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center bottom;
}
.home-sor-preview.is-animated .home-sor-marker {
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}
.home-sor-preview.is-animated .home-sor-markers .home-sor-marker:nth-child(2) { transition-delay: 0.12s; }
.home-sor-preview.is-animated .home-sor-markers .home-sor-marker:nth-child(3) { transition-delay: 0.24s; }
.home-sor-preview.is-animated .home-sor-markers .home-sor-marker:nth-child(4) { transition-delay: 0.36s; }
@keyframes homeSorFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes homeMockReadyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-sor-preview,
  .home-mock-ready,
  .home-feature-visual--mock .home-sor-grade,
  .home-sor-report { animation: none; }
  .home-sor-marker {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

.home-feature-content h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.home-feature-subtitle-window {
  display: inline-block;
  max-width: 100%;
  margin: -0.1rem 0 1.15rem;
  padding: 0.7rem 0.95rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.06);
}
.home-feature-section--premium .home-feature-subtitle-window {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}
[data-theme="dark"] .home-feature-subtitle-window {
  background: var(--surface-solid);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.42),
    0 2px 8px rgba(0, 0, 0, 0.28);
}
.home-feature-subtitle {
  margin: 0;
  font-family: var(--font);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(1.02rem, 2.1vw, 1.18rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--primary);
  background-image: linear-gradient(115deg, #6366f1 0%, #0ea5e9 48%, #f43f5e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-feature-subtitle + .home-feature-subtitle {
  margin-top: 0.28rem;
}
#mock-exam .home-feature-subtitle {
  background-image: linear-gradient(115deg, #67e8f9 0%, #fde68a 52%, #fda4af 100%);
}
#question-bank .home-feature-subtitle {
  background-image: linear-gradient(115deg, #6366f1 0%, #818cf8 50%, #c4b5fd 100%);
}
#listening .home-feature-subtitle {
  background-image: linear-gradient(115deg, #f59e0b 0%, #fb923c 55%, #f43f5e 100%);
}
#reading .home-feature-subtitle,
#full-exams .home-feature-subtitle {
  background-image: linear-gradient(115deg, #059669 0%, #10b981 50%, #0ea5e9 100%);
}
#spelling .home-feature-subtitle {
  background-image: linear-gradient(115deg, #047857 0%, #34d399 55%, #2dd4bf 100%);
}
#vocabulary-section .home-feature-subtitle {
  background-image: linear-gradient(115deg, #4f46e5 0%, #818cf8 50%, #c084fc 100%);
}
#writing .home-feature-subtitle {
  background-image: linear-gradient(115deg, #7c3aed 0%, #a78bfa 52%, #f472b6 100%);
}
#speaking .home-feature-subtitle {
  background-image: linear-gradient(115deg, #e11d48 0%, #fb7185 50%, #fb923c 100%);
}
#notebook .home-feature-subtitle {
  background-image: linear-gradient(115deg, #0284c7 0%, #38bdf8 52%, #6366f1 100%);
}
#dashboard-section .home-feature-subtitle {
  background-image: linear-gradient(115deg, #0f766e 0%, #14b8a6 48%, #6366f1 100%);
}
[data-theme="dark"] .home-feature-subtitle {
  background-image: linear-gradient(115deg, #a5b4fc 0%, #7dd3fc 48%, #fb7185 100%);
}
[data-theme="dark"] #question-bank .home-feature-subtitle {
  background-image: linear-gradient(115deg, #a5b4fc 0%, #c4b5fd 50%, #f0abfc 100%);
}
[data-theme="dark"] #listening .home-feature-subtitle {
  background-image: linear-gradient(115deg, #fbbf24 0%, #fdba74 55%, #fb7185 100%);
}
[data-theme="dark"] #reading .home-feature-subtitle,
[data-theme="dark"] #full-exams .home-feature-subtitle {
  background-image: linear-gradient(115deg, #34d399 0%, #6ee7b7 50%, #7dd3fc 100%);
}
[data-theme="dark"] #spelling .home-feature-subtitle {
  background-image: linear-gradient(115deg, #6ee7b7 0%, #5eead4 55%, #67e8f9 100%);
}
[data-theme="dark"] #vocabulary-section .home-feature-subtitle {
  background-image: linear-gradient(115deg, #a5b4fc 0%, #c4b5fd 50%, #e9d5ff 100%);
}
[data-theme="dark"] #writing .home-feature-subtitle {
  background-image: linear-gradient(115deg, #c4b5fd 0%, #e9d5ff 52%, #f9a8d4 100%);
}
[data-theme="dark"] #speaking .home-feature-subtitle {
  background-image: linear-gradient(115deg, #fb7185 0%, #fda4af 50%, #fdba74 100%);
}
[data-theme="dark"] #notebook .home-feature-subtitle {
  background-image: linear-gradient(115deg, #7dd3fc 0%, #67e8f9 52%, #a5b4fc 100%);
}
[data-theme="dark"] #dashboard-section .home-feature-subtitle {
  background-image: linear-gradient(115deg, #5eead4 0%, #67e8f9 48%, #a5b4fc 100%);
}
.home-feature-desc {
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}
.home-nowrap {
  white-space: nowrap;
}
.home-why-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.home-benefits {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.home-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.home-benefit-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.home-benefit-check svg { width: 0.75rem; height: 0.75rem; }

.home-feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-mini-exam-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
  max-width: 460px;
}
.home-feature-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-strong);
  color: var(--primary);
}
.home-feature-icon-wrap svg { width: 56px; height: 56px; }

.home-feature-dual-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.home-feature-dual-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-strong);
  color: var(--primary);
}

.home-feature-dual-logo--listening {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(251, 146, 60, 0.08));
  border-color: rgba(245, 158, 11, 0.35);
}

.home-feature-dual-logo--bank {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(129, 140, 248, 0.08));
  border-color: rgba(99, 102, 241, 0.32);
  color: var(--primary);
}

.home-feature-dual-logo--reading {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.06));
  border-color: rgba(16, 185, 129, 0.3);
  color: #059669;
}

.home-feature-dual-logo svg {
  width: 44px;
  height: 44px;
}

.home-feature-dual-logo .home-listening-logo svg {
  width: 44px;
  height: 44px;
}

.home-bank-picker {
  display: grid;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.home-bank-group-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.home-bank-buttons {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 560px) {
  .home-bank-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-bank-btn {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.home-bank-btn:hover {
  transform: translateY(-1px);
}

.home-bank-btn--listening {
  border-color: color-mix(in srgb, #f59e0b 35%, var(--border));
}

.home-bank-btn--listening:hover {
  border-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 8%, var(--surface-solid));
}

.home-bank-btn--reading {
  border-color: color-mix(in srgb, #10b981 35%, var(--border));
}

.home-bank-btn--reading:hover {
  border-color: #10b981;
  background: color-mix(in srgb, #10b981 8%, var(--surface-solid));
}

.home-bank-btn-part {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-bank-btn--listening .home-bank-btn-part { color: #d97706; }
.home-bank-btn--reading .home-bank-btn-part { color: #059669; }

.home-bank-btn-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.home-bank-btn-meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.home-bank-btn--soon {
  opacity: 0.72;
  cursor: default;
  position: relative;
}

.home-bank-btn-soon {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.home-cta { white-space: nowrap; }

/* How it works */
.home-how .home-section-header { margin-bottom: 2.5rem; }
.home-steps {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 700px) { .home-steps { grid-template-columns: repeat(3, 1fr); } }

.home-step {
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.home-step-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.home-step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary);
}
.home-step-icon svg { width: 1.5rem; height: 1.5rem; }
.home-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}
.home-step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Free section */
.home-free-inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
}
@media (min-width: 700px) { .home-free-inner { grid-template-columns: 1.2fr 1fr; } }
.home-free h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 0.65rem;
}
.home-free p {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.home-free-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.home-free-list .home-benefits { margin: 0; }

/* Final CTA */
.home-final-cta {
  text-align: center;
  padding: 3.25rem 2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}
.home-final-cta h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  margin-bottom: 0.65rem;
  letter-spacing: -0.03em;
}
.home-final-cta p {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
  line-height: 1.65;
}
.home-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* Stats */
.home-stats {
  margin-bottom: var(--home-section-gap);
}
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
@media (min-width: 900px) {
  .home-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.home-stat-card {
  min-width: 0;
  padding: 1.35rem 1.1rem 1.2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.home-stat-value {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-2) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-stat-label {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
}
.home-stat-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  line-height: 1.2;
}

/* UI chrome previews — no fake scores */
.home-ui-frame {
  width: 100%;
  max-width: 420px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.home-ui-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #1e293b;
  color: #e2e8f0;
}
.home-ui-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
}
.home-ui-bar span:first-child { background: #f87171; }
.home-ui-bar span:nth-child(2) { background: #fbbf24; }
.home-ui-bar span:nth-child(3) { background: #34d399; }
.home-ui-bar em {
  margin-left: 0.4rem;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.home-dash-preview-body {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0;
}
.home-dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.82rem 1.15rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
}
.home-dash-row:first-child { border-top: 0; }
.home-dash-row-mark {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.home-exam-preview {
  width: 100%;
  max-width: 460px;
  border: 1px solid #b8c4d4;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: #e8eef5;
  box-shadow: var(--shadow);
  min-width: 0;
}
.home-exam-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #4a7fc1;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}
.home-exam-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.95;
}
.home-exam-timer svg {
  width: 0.95rem;
  height: 0.95rem;
}
.home-exam-body {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  min-height: 11.5rem;
}
.home-exam-side {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.4rem;
  background: #d7e3f0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}
.home-exam-side span {
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
}
.home-exam-side .is-active {
  background: #fff;
  color: #1e3a5f;
}
.home-exam-paper {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
  background: #fff;
}
.home-exam-line {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #e2e8f0;
}
.home-exam-line--short { width: 42%; }
.home-exam-line--mid { width: 68%; }
.home-exam-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
.home-exam-options span {
  height: 22px;
  border-radius: 8px;
  border: 1px solid #dbe4ee;
  background: #f8fafc;
}

.home-exam-preview--listen .home-exam-top { background: #d97706; }
.home-exam-preview--listen .home-exam-side { background: #fde8c8; }
.home-exam-preview--listen .home-exam-side .is-active { color: #92400e; }
.home-exam-listen-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.15rem;
}
.home-exam-listen-strip .home-listen-play {
  flex-shrink: 0;
}
.home-exam-preview--read .home-exam-top { background: #059669; }
.home-exam-preview--write .home-exam-top { background: #7c3aed; }
.home-exam-preview--speak .home-exam-top { background: #e11d48; }

.home-listen-body,
.home-speak-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 0.95rem 1rem;
  background: #fff;
}
.home-listen-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
}
.home-listen-play {
  display: flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  flex-shrink: 0;
}
.home-listen-play svg { width: 1.15rem; height: 1.15rem; }
.home-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 2.2rem;
  flex: 1;
  min-width: 0;
}
.home-wave span {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 99px;
  background: linear-gradient(180deg, #fbbf24, #ea580c);
  opacity: 0.85;
}
.home-listen-extracts,
.home-speak-timers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
.home-speak-timers { grid-template-columns: 1fr 1fr; }
.home-listen-extracts span,
.home-speak-timers div {
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
  line-height: 1.25;
}
.home-listen-extracts .is-active,
.home-speak-timers .is-active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}
.home-speak-timers .is-active {
  background: #fff1f2;
  border-color: #fda4af;
  color: #9f1239;
}
.home-speak-timers em {
  display: block;
  font-style: normal;
  font-weight: 600;
  opacity: 0.75;
  margin-bottom: 0.12rem;
}
.home-speak-timers strong {
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.home-speak-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff;
}

.home-read-split,
.home-write-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 10.5rem;
  background: #fff;
}
.home-read-texts,
.home-write-notes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.8rem;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}
.home-read-questions,
.home-write-letter {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.8rem;
}
.home-read-tag {
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #059669;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}
.home-gap {
  height: 1.35rem;
  border-radius: 6px;
  border: 1px dashed #86efac;
  background: #f0fdf4;
}
.home-gap--short { width: 62%; }
.home-write-notes em,
.home-write-letter em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c3aed;
  margin-bottom: 0.15rem;
}

.home-note-preview-body {
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0 0.55rem;
}
.home-note-task {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
}
.home-note-task:first-child { border-top: 0; }
.home-note-check {
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  color: #fff;
}
.home-note-check svg { width: 0.75rem; height: 0.75rem; }
.home-note-task.is-done .home-note-check {
  background: #059669;
  border-color: #059669;
}
.home-note-task.is-done span:last-child {
  color: var(--text-muted);
  text-decoration: line-through;
}

.home-tools-previews {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: 420px;
}
.home-tool-preview-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 1.2rem;
}
.home-tool-preview-body--spell {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
}
.home-spell-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.home-spell-feature {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}
.home-spell-feature-icon {
  display: flex;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--primary);
}
.home-spell-feature-icon svg {
  width: 100%;
  height: 100%;
}
.home-tool-preview-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.home-accent-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.home-accent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
}
.home-accent-chip.is-active {
  border-color: var(--border-strong);
  background: #eef2ff;
  color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}
[data-theme="dark"] .home-accent-chip.is-active {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface-solid));
  color: var(--primary-dark);
}
.home-accent-flag {
  display: flex;
  width: 1.15rem;
  height: 0.78rem;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.home-accent-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}
.home-tool-preview-body--vocab {
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.home-vocab-field {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}
.home-vocab-field em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.home-vocab-field b {
  display: block;
  height: 0.72rem;
  border-radius: 999px;
  background: #dbeafe;
  font-weight: 400;
}
.home-vocab-field:nth-child(2) b { width: 78%; }
.home-vocab-field:nth-child(3) b { width: 92%; }
.home-vocab-field:nth-child(4) b { width: 64%; }
.home-tool-speaker {
  display: flex;
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffedd5;
  color: #c2410c;
  flex-shrink: 0;
}
.home-tool-speaker svg { width: 1.2rem; height: 1.2rem; }
.home-tool-input {
  flex: 1;
  height: 2.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.home-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.home-inline-actions + .home-eyebrow {
  margin: 1rem 0 0;
}

.home-targeted {
  margin-bottom: var(--home-section-gap);
  padding: 2rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.home-targeted-layout {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 800px) {
  .home-targeted-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
    gap: 2.25rem;
    align-items: start;
  }
}

.home-targeted-copy h2 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.home-targeted-copy .home-feature-desc {
  margin-bottom: 1.1rem;
}

.home-targeted-note {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.home-targeted-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface-solid));
  color: var(--primary);
}

.home-targeted-note-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.home-targeted-panels {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.home-targeted-panel {
  min-width: 0;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
}

.home-targeted-panel--reading {
  background: color-mix(in srgb, #10b981 7%, var(--surface-solid));
  border-color: color-mix(in srgb, #10b981 28%, var(--border));
}

.home-targeted-panel--listening {
  background: color-mix(in srgb, #f59e0b 8%, var(--surface-solid));
  border-color: color-mix(in srgb, #f59e0b 30%, var(--border));
}

.home-targeted-panel-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
}

.home-targeted-panel-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-targeted-panel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.home-targeted-panel--reading .home-targeted-panel-icon {
  color: #059669;
  border-color: color-mix(in srgb, #10b981 35%, var(--border));
}

.home-targeted-panel--listening .home-targeted-panel-icon {
  color: #d97706;
  border-color: color-mix(in srgb, #f59e0b 40%, var(--border));
}

.home-targeted-panel-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.home-targeted-parts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.home-targeted-part {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-targeted-part:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.home-targeted-part:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.home-targeted-part--reading:hover {
  border-color: #10b981;
}

.home-targeted-part--listening:hover {
  border-color: #f59e0b;
}

.home-targeted-part--soon {
  opacity: 0.78;
  cursor: default;
}

.home-targeted-part--soon:hover {
  transform: none;
  box-shadow: none;
}

.home-targeted-part-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.home-targeted-part--reading .home-targeted-part-letter {
  color: #047857;
  background: color-mix(in srgb, #10b981 16%, var(--surface-solid));
}

.home-targeted-part--listening .home-targeted-part-letter {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 18%, var(--surface-solid));
}

.home-targeted-part-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  flex: 1;
}

.home-targeted-part-name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-targeted-part-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.home-targeted-part-go {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.home-targeted-part:hover .home-targeted-part-go {
  color: var(--text);
}

.home-targeted-soon {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
}

.home-targeted-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.15rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--border);
}

.home-targeted-path li {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
}

.home-targeted-path li:not(:last-child)::after {
  content: "→";
  margin: 0 0.45rem;
  color: var(--primary);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .home-targeted-part,
  .home-targeted-part:hover {
    transform: none;
  }
}

.home-qbank {
  margin-bottom: var(--home-section-gap);
  padding: 2rem 1.35rem 2.15rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.home-qbank-copy h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.home-qbank-copy .home-feature-subtitle-window {
  max-width: none;
  width: max-content;
  white-space: nowrap;
}
.home-qbank-copy .home-feature-subtitle {
  white-space: nowrap;
}
.home-qbank-layout {
  display: grid;
  gap: 1.75rem;
  align-items: stretch;
  margin: 0 0 1.75rem;
}
@media (min-width: 800px) {
  .home-qbank-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2rem;
  }
}
.home-qbank-copy .home-feature-desc {
  margin-bottom: 1.1rem;
}
.home-qbank-copy .home-benefits {
  margin-bottom: 0;
}
.home-qbank-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}
.home-qbank-count {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.25rem 1.1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  min-height: 8.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.home-qbank-count:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.home-qbank-count strong {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.home-qbank-count span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
}
.home-qbank-count--reading {
  background: color-mix(in srgb, #10b981 8%, var(--surface-solid));
  border-color: color-mix(in srgb, #10b981 32%, var(--border));
}
.home-qbank-count--listening {
  background: color-mix(in srgb, #f59e0b 9%, var(--surface-solid));
  border-color: color-mix(in srgb, #f59e0b 34%, var(--border));
}

.home-tool-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}
.home-tool-stats--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 16rem;
}
.home-tool-stats > div {
  padding: 1rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  min-width: 0;
}
.home-tool-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.home-tool-stats > div > span,
.home-tool-stat-spell > span:first-of-type {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.home-tool-stat-spell .home-accent-row {
  margin-top: 0.75rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.home-tool-stats .home-accent-chip span {
  display: inline;
  margin: 0;
  font-size: 0.68rem;
  color: inherit;
}
.home-tool-stats .home-cta {
  grid-column: 2;
  justify-self: start;
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.home-access-inner {
  padding: 2.4rem 1.5rem;
  text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-sm);
}
.home-access h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.03em;
}
.home-access p {
  margin: 0 auto 1.35rem;
  max-width: 48ch;
  color: var(--text-muted);
  line-height: 1.65;
}
.home-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.home-testimonial-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 760px) {
  .home-testimonial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-testimonial-card {
  margin: 0;
  padding: 1.35rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.home-testimonial-card blockquote {
  margin: 0 0 1rem;
}
.home-testimonial-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}
.home-testimonial-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.home-testimonial-card strong { color: var(--text); }

.home-feature-visual .home-ui-frame,
.home-feature-visual .home-exam-preview,
.home-feature-visual .home-tools-previews,
.home-feature-visual .home-dash-preview {
  max-width: 100%;
}

.home-hero .home-ui-frame {
  max-width: 400px;
}
