/* ─── FreePTE — Design System ────────────────────────────────────────────────── */
:root {
  --primary:      #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light:#dbeafe;
  --success:      #16a34a;
  --warning:      #b45309;
  --danger:       #dc2626;

  --bg:           #f9fafb;
  --bg-card:      #ffffff;
  --bg-sidebar:   #f3f4f6;
  --bg-hover:     #f3f4f6;
  --surface:      #ffffff;
  --surface-2:    #f9fafb;

  --text:         #111827;
  --text-2:       #6b7280;
  --text-3:       #9ca3af;
  --border:       #e5e7eb;
  --border-2:     #d1d5db;

  --radius:       8px;
  --radius-sm:    6px;
  --radius-lg:    12px;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.05);
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.10);

  --header-height: 60px;
  --sidebar-width: 256px;
  --font: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg:           #111827;
  --bg-card:      #1f2937;
  --bg-sidebar:   #1f2937;
  --bg-hover:     #374151;
  --surface:      #1f2937;
  --surface-2:    #111827;
  --text:         #f9fafb;
  --text-2:       #9ca3af;
  --text-3:       #6b7280;
  --border:       #374151;
  --border-2:     #4b5563;
  --primary-light:#1e3a8a;
  --shadow:       0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ─── Container ──────────────────────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; line-height: 1;
  transition: all .15s; cursor: pointer; white-space: nowrap; min-height: 38px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-white { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow); }
.btn-white:hover { background: #f0f9ff; }
.btn-outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-lg { padding: 12px 24px; font-size: 15px; font-weight: 600; min-height: 44px; }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 32px; }
.btn-icon { padding: 8px; width: 38px; height: 38px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  height: 38px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}
.footer-logo-img {
  height: 32px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}
.logo-dark { display: none; }
.logo-light { display: block; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.logo-mark.small { width: 22px; height: 22px; font-size: 12px; border-radius: 5px; }
.logo-text { letter-spacing: -.01em; }
.logo-text strong { color: var(--primary); }
.logo-badge {
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  background: #dcfce7; color: #15803d;
  border-radius: 20px; letter-spacing: .2px;
}
[data-theme="dark"] .logo-badge { background: #14532d; color: #86efac; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 450; color: var(--text-2);
  transition: all .12s;
}
.nav-link:hover { color: var(--text); background: var(--bg-hover); }
.nav-link.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all .15s;
}
.mobile-menu-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ─── Mobile Nav ─────────────────────────────────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; top: var(--header-height); left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  z-index: 99; flex-direction: column; padding: 8px;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; color: var(--text);
  min-height: 44px; display: flex; align-items: center;
}
.mobile-nav a:hover { background: var(--bg-hover); }

/* ─── Pages ──────────────────────────────────────────────────────────────────── */
.page { display: none; flex: 1; }
.page.active { display: block; }
#app { flex: 1; display: flex; flex-direction: column; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr 420px;
  align-items: center; gap: 64px;
  max-width: 1120px; margin: 0 auto;
  padding: 72px 24px 80px;
  min-height: calc(100vh - var(--header-height));
}
.hero-label {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--primary); background: var(--primary-light);
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .3px; margin-bottom: 20px;
}
[data-theme="dark"] .hero-label { background: #1e3a8a; color: #93c5fd; }
.hero-title {
  font-size: clamp(32px, 4.5vw, 52px); font-weight: 800;
  line-height: 1.15; letter-spacing: -.03em;
  margin-bottom: 18px; color: var(--text);
}
.hero-subtitle {
  font-size: 17px; color: var(--text-2); line-height: 1.75;
  max-width: 480px; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: flex; align-items: center; gap: 0;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.hero-stat { padding: 0 24px; }
.hero-stat:first-child { padding-left: 0; }
.stat-num { display: block; font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { display: block; font-size: 11px; color: var(--text-3); margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; }
.hero-divider { width: 1px; height: 32px; background: var(--border); flex-shrink: 0; }

/* Score card */
.score-card-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.score-card-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px;
  text-align: center; margin-bottom: 18px;
}
.score-ring-wrap { position: relative; width: 130px; margin: 0 auto 20px; }
.score-ring { width: 100%; }
.score-ring-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px;
}
.score-num { font-size: 32px; font-weight: 800; color: var(--primary); line-height: 1; }
.score-max { font-size: 13px; color: var(--text-3); }
.score-breakdown { display: flex; flex-direction: column; gap: 10px; }
.score-item {
  display: grid; grid-template-columns: 64px 1fr 28px;
  align-items: center; gap: 10px;
}
.score-section-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.score-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.score-bar div { height: 100%; background: var(--primary); border-radius: 2px; }
.score-val { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: right; }
.score-card-footer {
  font-size: 11px; color: var(--text-3); text-align: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}

/* ─── Section Overview ────────────────────────────────────────────────────────── */
.sections-overview { padding: 80px 0; border-top: 1px solid var(--border); }
.section-header { margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.section-header p { font-size: 15px; color: var(--text-2); max-width: 480px; }
.section-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.section-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: box-shadow .2s, border-color .2s; cursor: pointer;
}
.section-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.card-icon { display: none !important; }
.section-card-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--primary); margin-bottom: 10px;
}
.section-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.section-card p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.6; }
.type-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.type-pill {
  font-size: 10px; font-weight: 600; padding: 3px 9px;
  background: var(--bg-hover); border-radius: 20px;
  color: var(--text-3); letter-spacing: .2px;
}
.card-link { font-size: 13px; font-weight: 600; color: var(--primary); }

/* ─── Features ────────────────────────────────────────────────────────────────── */
.why-section { padding: 80px 0; background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.feature-icon-wrap {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
[data-theme="dark"] .feature-icon-wrap { background: #1e3a8a; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ─── CTA ─────────────────────────────────────────────────────────────────────── */
.cta-section { padding: 80px 0; }
.cta-card {
  background: var(--primary); border-radius: var(--radius-lg); padding: 48px 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-inner h2 { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 6px; }
.cta-inner p { font-size: 15px; color: rgba(255,255,255,.8); }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ─── Practice Layout ─────────────────────────────────────────────────────────── */
.practice-layout {
  display: grid; grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - var(--header-height));
}
.practice-sidebar {
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  overflow-y: auto; position: sticky; top: var(--header-height);
  height: calc(100vh - var(--header-height));
}
.sidebar-header { padding: 20px 16px 14px; border-bottom: 1px solid var(--border); }
.sidebar-header h2 { font-size: 14px; font-weight: 700; }
.sidebar-header p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.sidebar-sections { padding: 10px 8px; }
.sidebar-section { margin-bottom: 4px; }
.sidebar-section-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 11px; font-weight: 700;
  color: #475569; text-transform: uppercase; letter-spacing: .6px;
  transition: background .12s;
}
[data-theme="dark"] .sidebar-section-header { color: #94a3b8; }
.sidebar-section-header:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-types { padding: 2px 0 6px 12px; }
.sidebar-type-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: #0f172a;
  text-align: left; transition: all .12s; cursor: pointer; min-height: 38px;
}
[data-theme="dark"] .sidebar-type-btn { color: #cbd5e1; }
.sidebar-type-btn:hover { background: var(--bg-hover); color: #0f172a; }
[data-theme="dark"] .sidebar-type-btn:hover { color: #ffffff; }
.sidebar-type-btn.active {
  background: var(--primary) !important; color: #ffffff !important; font-weight: 700;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
[data-theme="dark"] .sidebar-type-btn.active {
  background: var(--primary) !important; color: #ffffff !important;
}
.sidebar-type-btn .type-count {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  background: #e2e8f0; border-radius: 20px; color: #475569;
}
[data-theme="dark"] .sidebar-type-btn .type-count { background: #334155; color: #94a3b8; }
.sidebar-type-btn.active .type-count { background: #ffffff !important; color: var(--primary) !important; }

/* Mobile Practice Quick Bar & Drawer */
.mobile-practice-bar {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky; top: var(--header-height);
  z-index: 80;
}
.mobile-practice-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--text);
}
.mobile-sidebar-drawer {
  display: none; position: fixed; inset: 0; z-index: 1050;
  background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(4px);
}
.mobile-sidebar-drawer.open { display: block; }
.mobile-drawer-content,
.drawer-content {
  position: absolute; left: 0; top: 0; bottom: 0; width: 320px; max-width: 85vw;
  background: #ffffff !important; box-shadow: 6px 0 32px rgba(0,0,0,0.25);
  overflow-y: auto; display: flex; flex-direction: column;
  z-index: 1060;
}
[data-theme="dark"] .mobile-drawer-content,
[data-theme="dark"] .drawer-content {
  background: #0f172a !important;
  box-shadow: 6px 0 32px rgba(0,0,0,0.6);
}
.mobile-drawer-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: #ffffff;
}
[data-theme="dark"] .mobile-drawer-header { background: #0f172a; }
.mobile-drawer-header h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.mobile-drawer-close { padding: 6px; color: var(--text-2); border-radius: var(--radius-sm); }

/* ─── Practice Main ──────────────────────────────────────────────────────────── */
.practice-main { padding: 28px 32px; overflow-y: auto; }

/* Type Selector */
.type-selector {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-height) - 56px);
}
.type-selector-inner { max-width: 680px; width: 100%; }
.type-selector-eyebrow {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px;
}
.type-selector-inner h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.type-selector-inner p { font-size: 14px; color: var(--text-2); margin-bottom: 28px; }
.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.type-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 14px;
  text-align: center; cursor: pointer; transition: all .15s;
}
.type-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
[data-theme="dark"] .type-card:hover { box-shadow: 0 0 0 3px #1e3a8a; }
.type-card .tc-abbr { font-size: 16px; font-weight: 800; color: var(--primary); margin-bottom: 5px; }
.type-card .tc-name { font-size: 11px; color: var(--text-2); font-weight: 500; line-height: 1.4; }
.type-card .tc-skills { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 8px; }
.type-card .tc-skill {
  font-size: 9px; padding: 2px 6px; background: var(--bg-hover);
  border-radius: 10px; color: var(--text-3); font-weight: 500;
}

/* ─── Question Area ──────────────────────────────────────────────────────────── */
.question-area { max-width: 800px; margin: 0 auto; width: 100%; }
.question-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.question-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.q-badge {
  font-size: 10px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; letter-spacing: .2px; text-transform: uppercase;
  background: var(--bg-hover); color: var(--text-2);
}
.q-badge.q-type { background: var(--primary-light); color: var(--primary); }
[data-theme="dark"] .q-badge.q-type { background: #1e3a8a; }
.q-badge.q-difficulty { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .q-badge.q-difficulty { background: #451a03; color: #fcd34d; }
.q-badge.q-freq { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .q-badge.q-freq { background: #14532d; color: #86efac; }
.question-nav { display: flex; gap: 6px; }

/* Instructions */
.question-instructions {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm); padding: 14px 16px;
  font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.65;
}
.question-instructions strong {
  display: block; margin-bottom: 4px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px; color: var(--primary);
}

/* Question Body */
.question-body {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  font-size: 16px; line-height: 1.85; color: var(--text);
}

/* Exam Image Frame (for Describe Image) */
.exam-image-frame {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
[data-theme="dark"] .exam-image-frame {
  background: #1e293b;
}
.exam-image-frame svg {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
}
.exam-image-frame img {
  width: 100%;
  max-width: 580px;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

/* Interactive Audio Recorder (Speaking Tasks) */
.exam-audio-recorder {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.recorder-status-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.recorder-phase-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 4px 10px; border-radius: 20px;
}
.recorder-phase-prep { background: #fef3c7; color: #92400e; }
.recorder-phase-rec { background: #fee2e2; color: #dc2626; animation: pulse 1.2s infinite; }
.recorder-phase-done { background: #dcfce7; color: #16a34a; }
.recorder-visualizer-canvas {
  width: 100%; height: 44px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); display: block;
}
.recorder-controls {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; flex-wrap: wrap;
}
.recorder-info-text {
  font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.5;
}

/* Audio Player (Listening Tasks) */
.exam-audio-player {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.audio-player-row {
  display: flex; align-items: center; gap: 14px;
}
.audio-play-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s;
}
.audio-play-btn:hover { background: var(--primary-dark); }
.audio-play-btn svg { width: 16px; height: 16px; fill: currentColor; }
.audio-progress-bar {
  flex: 1; height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden; position: relative;
}
.audio-progress-fill {
  height: 100%; width: 0%; background: var(--primary);
  transition: width 0.1s linear;
}
.audio-time-label {
  font-size: 12px; color: var(--text-2); font-weight: 600;
  min-width: 44px; text-align: right;
}

/* Writing Live Metrics Toolbar */
.writing-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; flex-wrap: wrap; gap: 8px;
}
.writing-tools { display: flex; gap: 6px; }
.writing-tool-btn {
  font-size: 11px; font-weight: 500; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 4px; cursor: pointer; min-height: 28px;
}
.writing-tool-btn:hover { background: var(--bg-hover); color: var(--text); }
.writing-metric-badge {
  font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 4px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-2);
}
.writing-metric-badge.valid { color: var(--success); border-color: var(--success); background: #dcfce7; }
.writing-metric-badge.invalid { color: var(--danger); border-color: var(--danger); background: #fee2e2; }

/* Answer textarea */
.answer-textarea {
  width: 100%; min-height: 120px; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: var(--radius); font-size: 16px; line-height: 1.65;
  color: var(--text); resize: vertical; transition: border-color .15s, box-shadow .15s;
  outline: none; margin-bottom: 8px;
}
.answer-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
[data-theme="dark"] .answer-textarea:focus { box-shadow: 0 0 0 3px #1e3a8a; }

/* MCQ */
.mcq-options { display: flex; flex-direction: column; gap: 8px; }
.mcq-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  cursor: pointer; transition: all .12s; font-size: 14px; min-height: 48px;
}
.mcq-option:hover { border-color: var(--primary); background: var(--primary-light); }
[data-theme="dark"] .mcq-option:hover { background: #1e3a8a; }
.mcq-option.selected { border-color: var(--primary); background: var(--primary-light); }
[data-theme="dark"] .mcq-option.selected { background: #1e3a8a; }
.mcq-option.strikethrough { opacity: 0.45; text-decoration: line-through; }
.mcq-option.correct { border-color: var(--success); background: #dcfce7; }
.mcq-option.wrong { border-color: var(--danger); background: #fee2e2; }
.mcq-letter {
  font-size: 12px; font-weight: 700; width: 24px; height: 24px; min-width: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--border); color: var(--text-2); margin-top: 2px;
}
.mcq-option.selected .mcq-letter { background: var(--primary); color: #fff; }
.mcq-strike-btn {
  margin-left: auto; color: var(--text-3); font-size: 11px; padding: 2px 6px;
  border-radius: 3px; border: 1px solid var(--border); opacity: 0.7;
}
.mcq-strike-btn:hover { opacity: 1; color: var(--danger); }

/* Fill in Blanks */
.fib-container { line-height: 2.6; font-size: 15px; }
.fib-input {
  display: inline-block; min-width: 120px; padding: 5px 10px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text); background: var(--bg-card);
  outline: none; transition: border-color .15s, box-shadow .15s; margin: 0 4px;
}
.fib-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.word-bank-area {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-top: 14px;
}
.word-bank-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}
.word-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chip {
  padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .12s; color: var(--text); user-select: none;
  min-height: 38px; display: inline-flex; align-items: center;
}
.word-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.word-chip.used { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* Reorder Paragraphs */
.rop-container { display: flex; flex-direction: column; gap: 8px; }
.rop-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: grab; transition: border-color .15s;
}
.rop-item:hover { border-color: var(--primary); }
.rop-item.dragging { opacity: .45; border-style: dashed; }
.rop-handle {
  color: var(--text-3); cursor: grab; user-select: none; margin-top: 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.rop-handle span {
  display: block; width: 14px; height: 2px; background: currentColor;
  border-radius: 1px;
}
.rop-letter {
  font-size: 12px; font-weight: 700; width: 26px; height: 26px; min-width: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--primary-light); color: var(--primary);
  margin-top: 2px;
}
[data-theme="dark"] .rop-letter { background: #1e3a8a; }
.rop-text { font-size: 14px; line-height: 1.65; flex: 1; }
.rop-arrows { display: flex; flex-direction: column; gap: 4px; }
.rop-arrow {
  padding: 6px 10px; background: var(--bg-hover); border-radius: 4px;
  font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text-2);
  transition: all .12s; min-height: 30px; display: flex; align-items: center; justify-content: center;
}
.rop-arrow:hover { background: var(--primary); color: #fff; }

/* Timer */
.timer-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px;
}
.timer-label-text { font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.timer-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.timer-fill {
  height: 100%; width: 100%; border-radius: 2px;
  background: var(--primary); transition: width .5s linear, background .5s;
}
.timer-fill.urgent { background: var(--danger); }
.timer-label { font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 40px; text-align: right; }

/* Submit */
.submit-area { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }

/* Feedback */
.feedback-area {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-top: 4px;
}
.feedback-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.feedback-header h3 { font-size: 16px; font-weight: 700; }
.feedback-score {
  font-size: 20px; font-weight: 800; color: var(--primary);
  background: var(--primary-light); padding: 5px 14px;
  border-radius: var(--radius-sm);
}
[data-theme="dark"] .feedback-score { background: #1e3a8a; }
.feedback-section { margin-bottom: 18px; }
.feedback-section h4 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-3); margin-bottom: 8px;
}
.feedback-text { font-size: 14px; color: var(--text); line-height: 1.75; }
.feedback-list { display: flex; flex-direction: column; gap: 5px; }
.feedback-item {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
.feedback-item .fi-icon {
  flex-shrink: 0; margin-top: 1px; font-size: 13px;
  width: 16px; text-align: center;
}
.score-breakdown-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.score-breakdown-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; text-align: center;
}
.sbi-label {
  font-size: 10px; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .4px; margin-bottom: 5px; font-weight: 600;
}
.sbi-val { font-size: 20px; font-weight: 800; color: var(--primary); }
.sbi-max { font-size: 11px; color: var(--text-3); }
.feedback-actions {
  display: flex; gap: 10px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}

/* HIW */
.hiw-container { font-size: 15px; line-height: 2.3; }
.hiw-word {
  cursor: pointer; padding: 2px 5px; border-radius: 3px;
  display: inline; transition: background .12s, box-shadow .12s;
  color: var(--text);
}
.hiw-word:hover { background: #fef08a; color: #000; }
.hiw-word.selected {
  background: #fde047 !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border-radius: 3px;
  box-shadow: 0 0 0 2px #ca8a04 !important;
  text-decoration: none !important;
}
[data-theme="dark"] .hiw-word.selected {
  background: #facc15 !important;
  color: #000000 !important;
  box-shadow: 0 0 0 2px #eab308 !important;
}
.hiw-word.correct { background: #dcfce7; color: var(--success); font-weight: 700; }
.hiw-word.wrong { background: #fee2e2; color: var(--danger); text-decoration: line-through; }

/* Audio Playback Preview */
.audio-preview-wrap {
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 8px;
}
.audio-preview-label {
  font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px;
}
.audio-preview-wrap audio {
  width: 100%; height: 36px; border-radius: 4px;
}

/* Recording indicator */
.recording-indicator {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #fee2e2;
  border: 1px solid #fca5a5; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--danger); margin-bottom: 14px;
}
[data-theme="dark"] .recording-indicator { background: #450a0a; border-color: #7f1d1d; }
.recording-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex-shrink: 0;
  animation: pulse 1.2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Spinner */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .65s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }

/* ─── Mock Test Page ─────────────────────────────────────────────────────────── */
.mock-header { padding: 48px 0 32px; }
.mock-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.mock-header p { font-size: 15px; color: var(--text-2); }
.mock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 32px; }
.mock-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.mock-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.mock-card-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--primary); margin-bottom: 8px;
}
.mock-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.mock-card p { font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.65; }
.mock-card-meta { display: flex; gap: 8px; margin-bottom: 20px; }
.mock-card-meta span {
  font-size: 11px; font-weight: 500; color: var(--text-3);
  background: var(--bg-hover); padding: 3px 9px; border-radius: 20px;
}
.mock-full { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mock-tips {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 48px;
}
.mock-tips h3 { font-size: 13px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-2); }
.mock-tips li {
  padding: 6px 0; font-size: 13px; color: var(--text-2);
  padding-left: 16px; position: relative;
  border-bottom: 1px solid var(--border);
}
.mock-tips li:last-child { border: none; }
.mock-tips li::before { content: ''; position: absolute; left: 0; top: 14px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }

/* ─── Tips Page ──────────────────────────────────────────────────────────────── */
.tips-header { padding: 48px 0 24px; }
.tips-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.tips-header p { font-size: 15px; color: var(--text-2); }
.tips-nav { display: flex; gap: 6px; margin-bottom: 32px; flex-wrap: wrap; }
.tip-nav-btn {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all .12s; cursor: pointer; min-height: 38px;
}
.tip-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.tip-nav-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tips-content { display: none; }
.tips-content.active { display: block; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; padding-bottom: 48px; }
.tip-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.tip-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tip-label {
  font-size: 10px; font-weight: 800; padding: 3px 8px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 4px; letter-spacing: .3px;
}
[data-theme="dark"] .tip-label { background: #1e3a8a; }
.tip-card h3 { font-size: 14px; font-weight: 700; }
.tip-card li {
  padding: 7px 0; font-size: 13px; color: var(--text-2);
  padding-left: 14px; position: relative; line-height: 1.55;
  border-bottom: 1px solid var(--border);
}
.tip-card li:last-child { border: none; padding-bottom: 0; }
.tip-card li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
}

/* ─── About Page ─────────────────────────────────────────────────────────────── */
.about-content { padding: 48px 0; }
.about-content h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 36px; }
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; }
.about-text p { font-size: 15px; color: var(--text-2); line-height: 1.8; margin-bottom: 14px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-text li {
  padding: 5px 0; font-size: 14px; color: var(--text-2);
  padding-left: 16px; position: relative;
}
.about-text li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--primary);
}
.about-tech h3 {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-3); margin: 24px 0 12px;
}
.about-tech h3:first-child { margin-top: 0; }
.tech-stack { display: flex; flex-direction: column; gap: 8px; }
.tech-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px;
}
.tech-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
  flex-shrink: 0; margin-top: 4px;
}
.tech-item strong { display: block; font-weight: 600; margin-bottom: 2px; }
.tech-item span { color: var(--text-3); font-size: 12px; }
.coverage-list { display: flex; flex-direction: column; gap: 6px; }
.coverage-item {
  font-size: 13px; color: var(--text-2);
  padding-left: 16px; position: relative;
}
.coverage-item::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
}
.coverage-item.done::before { background: var(--success); }
.coverage-item.upcoming::before { background: var(--border-2); }
.coverage-item.done { color: var(--text); }
.coverage-item.upcoming { color: var(--text-3); }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--surface-2); border-top: 1px solid var(--border);
  padding: 32px 0; margin-top: auto;
}
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.footer-name { color: var(--text); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-2); transition: color .12s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { padding-top: 16px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 12px; color: var(--text-3); }

/* ─── AI Notice ──────────────────────────────────────────────────────────────── */
.ai-notice {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-lg); max-width: 340px; z-index: 200;
}
.ai-notice-inner { display: flex; gap: 12px; align-items: flex-start; }
.ai-notice-text { font-size: 12px; color: var(--text-2); line-height: 1.6; flex: 1; }
.ai-notice-text strong { color: var(--text); }
.ai-notice-text code {
  font-size: 11px; background: var(--bg-hover); padding: 1px 5px;
  border-radius: 3px; color: var(--primary); font-family: monospace;
}
.ai-notice-close { color: var(--text-3); padding: 2px; flex-shrink: 0; transition: color .12s; }
.ai-notice-close:hover { color: var(--text); }

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Responsive & Mobile Styles ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px 48px; min-height: auto; }
  .hero-visual { display: none; }
  .practice-layout { grid-template-columns: 1fr; }
  .practice-sidebar { display: none; }
  .mobile-practice-bar { display: block; }
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-actions .btn-primary { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .mock-full { flex-direction: column; align-items: flex-start; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .practice-main { padding: 20px 16px 80px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { padding: 0 16px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { flex-wrap: wrap; gap: 12px; }
  .hero-divider { display: none; }
  .hero-stat { padding: 0; min-width: 70px; }
  .stat-num { font-size: 20px; }
  .section-cards { grid-template-columns: 1fr; }
  .feedback-area { padding: 16px; }
  .score-breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .submit-area { flex-direction: column; width: 100%; }
  .submit-area .btn { width: 100%; }
  .feedback-actions { flex-direction: column; width: 100%; }
  .feedback-actions .btn { width: 100%; }
  .timer-bar { padding: 8px 12px; }
  .question-body { padding: 16px; font-size: 15px; }
  .fib-input { min-width: 90px; font-size: 14px; }
  .rop-item { padding: 12px; }
  .ai-notice { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .logo-img { height: 32px; max-width: 130px; }
}

/* ─── Audio Loading & Animations ─────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin-icon {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.audio-loading-pulse {
  display: inline-block;
  color: var(--primary);
  font-size: 11px;
  animation: pulseGlow 1s infinite;
  margin-right: 4px;
}

/* ─── Inline Answer Highlights ───────────────────────────────────────────────── */
.blank-is-correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 1px #10b981;
}
.blank-is-incorrect {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
  text-decoration: line-through !important;
  font-weight: 600 !important;
  box-shadow: 0 0 0 1px #ef4444;
}
.inline-correct-answer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  background: #dcfce7;
  color: #166534;
  border: 1.5px solid #22c55e;
  margin-left: 6px;
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease;
}
.blank-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
  margin-right: 4px;
  vertical-align: middle;
}
.blank-status-badge.correct {
  background: #10b981;
  color: #ffffff;
}

[data-theme="dark"] .blank-is-correct {
  background: #064e3b !important;
  border-color: #059669 !important;
  color: #6ee7b7 !important;
  box-shadow: 0 0 0 1px #059669;
}
[data-theme="dark"] .blank-is-incorrect {
  background: #7f1d1d !important;
  border-color: #dc2626 !important;
  color: #fca5a5 !important;
  box-shadow: 0 0 0 1px #dc2626;
}
[data-theme="dark"] .inline-correct-answer {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #059669;
}

/* MCQ Answer Highlights */
.mcq-option.mcq-is-correct-selected {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  font-weight: 600;
}
.mcq-option.mcq-is-incorrect-selected {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #b91c1c !important;
}
.mcq-option.mcq-is-correct-missed {
  border-color: #10b981 !important;
  border-style: dashed !important;
  border-width: 2px !important;
  background: rgba(16, 185, 129, 0.05) !important;
}
.answer-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}
.answer-badge.correct {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.answer-badge.incorrect {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
[data-theme="dark"] .answer-badge.correct {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #059669;
}
[data-theme="dark"] .answer-badge.incorrect {
  background: #7f1d1d;
  color: #fca5a5;
  border-color: #991b1b;
}

/* HIW Word Highlights */
.hiw-word.hiw-confirmed-correct {
  background: #10b981 !important;
  color: #ffffff !important;
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 700;
}
.hiw-word.hiw-false-alarm {
  background: #ef4444 !important;
  color: #ffffff !important;
  text-decoration: line-through;
  border-radius: 4px;
  padding: 2px 6px;
}
.hiw-word.hiw-missed-word {
  outline: 2px dashed #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 4px;
}

/* ROP Solution Box */
.rop-solution-box {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
}
.rop-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  border-radius: 4px;
  margin: 2px 4px;
}

/* WFD Word Analysis Box */
.wfd-analysis-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 12px;
  line-height: 2;
}
.wfd-word-match {
  display: inline-block;
  color: #15803d;
  font-weight: 700;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 3px;
  border: 1px solid #86efac;
}
.wfd-word-missed {
  display: inline-block;
  color: #b91c1c;
  background: #fee2e2;
  text-decoration: line-through;
  padding: 2px 8px;
  border-radius: 4px;
  margin: 3px;
  border: 1px solid #fca5a5;
}
.wfd-word-extra {
  display: inline-block;
  color: var(--text-3);
  background: var(--surface);
  border: 1px dashed var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 3px;
}
[data-theme="dark"] .wfd-word-match {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #059669;
}
[data-theme="dark"] .wfd-word-missed {
  background: #7f1d1d;
  color: #fca5a5;
  border-color: #991b1b;
}

/* About Features Grid */
.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .about-cards { grid-template-columns: 1fr; }
}
.about-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.about-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.about-feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.about-feature-card p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

