/* ==========================================================================
   knmpractice.nl — Dutch Heritage & Delft Blue Study Studio
   Palette: Royal Delft Blue (#2563eb), Dutch Orange (#ea580c), Alabaster (#f8fafc) & Midnight Slate (#0f172a)
   Typography: DM Sans (Ultra-Comfortable Reading) + Fraunces (Editorial Serif)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&display=swap');

:root {
  /* Primary Brand — Royal Delft Blue */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --primary-glow: rgba(37, 99, 235, 0.22);

  /* Secondary Study Focus — Calm Dutch Canal Teal (Bilingual Translation & Highlights) */
  --primary-teal: #096d63;
  --accent-blue: #096d63;
  --accent-blue-hover: #065951;
  --accent-blue-light: #f0fdfa;
  --accent-blue-border: #99f6e4;
  --accent-blue-glow: rgba(9, 109, 99, 0.16);

  /* 8 Official KNM Modules — Crisp Heritage Tints */
  --mod-1-bg: #eff6ff;
  --mod-1-border: #bfdbfe;
  --mod-1-text: #1d4ed8;

  --mod-2-bg: #f0fdf4;
  --mod-2-border: #bbf7d0;
  --mod-2-text: #15803d;

  --mod-3-bg: #eef2ff;
  --mod-3-border: #c7d2fe;
  --mod-3-text: #4338ca;

  --mod-4-bg: #fff7ed;
  --mod-4-border: #fed7aa;
  --mod-4-text: #c2410c;

  --mod-5-bg: #faf5ff;
  --mod-5-border: #e9d5ff;
  --mod-5-text: #7e22ce;

  --mod-6-bg: #f0f9ff;
  --mod-6-border: #bae6fd;
  --mod-6-text: #0369a1;

  --mod-7-bg: #fdf2f8;
  --mod-7-border: #fbcfe8;
  --mod-7-text: #be185d;

  --mod-8-bg: #f0fdfa;
  --mod-8-border: #99f6e4;
  --mod-8-text: #0f766e;

  /* Light Mode Canvas — Crisp Alabaster & Pure White Cards */
  --bg-body: #f8fafc;
  --bg-mesh:
    radial-gradient(at 10% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(13, 148, 136, 0.07) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(234, 88, 12, 0.06) 0px, transparent 55%);
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-muted: #f1f5f9;
  --bg-subtle: #f8fafc;

  /* Deep Navy Slate Ink (High-Clarity Reading Contrast) */
  --text-main: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Semantic Status Colors */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  /* Refined Shadows & Rounded Corners */
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 6px 20px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 14px 32px -8px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px -12px rgba(15, 23, 42, 0.12);

  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.45rem;
  --radius-xl: 1.85rem;
  --radius-pill: 999px;

  /* Layout & Dutch Orange Accent Tokens */
  --max-width: 1180px;
  --header-height: 74px;
  --bottom-nav-height: 68px;
  --accent-orange: #c2410c;
  --brand-orange: #c2410c;
  --brand-orange-light: #fed7aa;
  --accent-sage: var(--accent-blue);
  --bg-canvas: var(--bg-body);
  --opt-idx: 0;
}

/* Midnight Slate Dark Mode */
[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.20);
  --primary-light: rgba(59, 130, 246, 0.12);
  --primary-border: rgba(59, 130, 246, 0.34);
  --primary-glow: rgba(59, 130, 246, 0.28);

  --accent-blue: #2dd4bf;
  --accent-blue-hover: #5eead4;
  --accent-blue-light: rgba(45, 212, 191, 0.11);
  --accent-blue-border: rgba(45, 212, 191, 0.28);
  --accent-blue-glow: rgba(45, 212, 191, 0.20);

  --brand-orange: #fb923c;
  --brand-orange-light: rgba(251, 146, 60, 0.32);

  --mod-1-bg: rgba(59, 130, 246, 0.14);
  --mod-1-border: rgba(59, 130, 246, 0.28);
  --mod-1-text: #93c5fd;

  --mod-2-bg: rgba(74, 222, 128, 0.13);
  --mod-2-border: rgba(74, 222, 128, 0.28);
  --mod-2-text: #86efac;

  --mod-3-bg: rgba(129, 140, 248, 0.14);
  --mod-3-border: rgba(129, 140, 248, 0.28);
  --mod-3-text: #a5b4fc;

  --mod-4-bg: rgba(251, 146, 60, 0.14);
  --mod-4-border: rgba(251, 146, 60, 0.28);
  --mod-4-text: #fdba74;

  --mod-5-bg: rgba(192, 132, 252, 0.14);
  --mod-5-border: rgba(192, 132, 252, 0.28);
  --mod-5-text: #d8b4fe;

  --mod-6-bg: rgba(56, 189, 248, 0.14);
  --mod-6-border: rgba(56, 189, 248, 0.28);
  --mod-6-text: #7dd3fc;

  --mod-7-bg: rgba(244, 114, 182, 0.14);
  --mod-7-border: rgba(244, 114, 182, 0.28);
  --mod-7-text: #f9a8d4;

  --mod-8-bg: rgba(45, 212, 191, 0.14);
  --mod-8-border: rgba(45, 212, 191, 0.28);
  --mod-8-text: #5eead4;

  --bg-body: #0f172a;
  --bg-mesh:
    radial-gradient(at 10% 5%, rgba(59, 130, 246, 0.11) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(45, 212, 191, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(251, 146, 60, 0.06) 0px, transparent 55%);
  --bg-surface: #1e293b;
  --bg-surface-elevated: #263449;
  --bg-glass: rgba(15, 23, 42, 0.88);
  --bg-muted: #162032;
  --bg-subtle: #192438;

  --text-main: #cbd5e1;
  --text-heading: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --border-color: #334155;
  --border-strong: #475569;

  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.13);
  --success-border: rgba(74, 222, 128, 0.32);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.13);
  --danger-border: rgba(248, 113, 113, 0.32);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.13);

  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.52);
}

/* ==========================================================================
   Base Reset & Comfortable Reading Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.68;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}


@media (min-width: 860px) {
  body {
    padding-bottom: 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1, .section-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Soft Pill Header Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem 0.5rem 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: var(--text-heading);
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.brand-logo:hover {
  opacity: 0.92;
  transform: translateY(-0.5px);
}

.brand-badge {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  line-height: 1;
  user-select: none;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  line-height: 1;
}

.brand-name {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  color: var(--text-muted);
  line-height: 1;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--bg-muted);
  padding: 0.28rem;
  border-radius: var(--radius-pill);
}

@media (min-width: 860px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  color: #475569;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-pill);
  transition: all 0.18s ease;
}

[data-theme="dark"] .nav-link {
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--text-heading);
}

.nav-link.active {
  color: var(--text-heading);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-toggle {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
}

.btn-toggle:hover {
  border-color: var(--primary);
  color: var(--text-heading);
  background-color: var(--primary-light);
}

.btn-install {
  display: none;
  background-color: var(--bg-surface);
  color: var(--text-heading);
  border: 1px solid var(--border-color);
  padding: 0.42rem 0.78rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 0.38rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-install svg {
  flex-shrink: 0;
  color: var(--text-heading);
  transition: color 0.18s ease, transform 0.18s ease;
}

.btn-install:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-install:hover svg {
  color: var(--primary);
  transform: translateY(1px);
}

.btn-install.visible {
  display: inline-flex;
}

/* Slack-Style Always-Visible Header CTA */
.btn-header-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 14px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  filter: brightness(1.06);
}

.btn-header-cta .btn-arrow {
  transition: transform 0.18s ease;
}

.btn-header-cta:hover .btn-arrow {
  transform: translateX(3px);
}

@media (max-width: 680px) {
  .btn-header-cta {
    display: none;
  }
}

/* ==========================================================================
   Soft Pill Buttons & Pastel Badges (High Visual Contrast)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.78rem 1.45rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff !important;
  box-shadow: 0 8px 24px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--primary-glow);
  filter: brightness(1.05);
  color: #ffffff !important;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-heading);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--bg-muted);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-outline-orange {
  background-color: var(--accent-blue-light);
  color: var(--accent-blue);
  border-color: var(--accent-blue-border);
}

.btn-outline-orange:hover {
  background-color: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.btn-outline-danger {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-outline-danger:hover {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.95rem;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-orange {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
}

.badge-slate {
  background-color: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.badge-success {
  background-color: var(--success-bg);
  color: #15803d;
  border: 1px solid var(--success-border);
}

#daily-q-date-badge,
#daily-q-streak-indicator {
  color: #15803d;
}

[data-theme="dark"] .badge-success,
[data-theme="dark"] #daily-q-date-badge,
[data-theme="dark"] #daily-q-streak-indicator {
  color: var(--success);
}

/* ==========================================================================
/* ==========================================================================
   Apple-Inspired Hero Showcase & Interactive Preview (index.html)
   ========================================================================== */
.hero-section {
  padding: 1.25rem 0 1rem;
}

.apple-hero-layout {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.25rem 1.75rem;
  box-shadow: 0 18px 42px -16px rgba(74, 66, 61, 0.07);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}

@media (min-width: 960px) {
  .apple-hero-layout {
    grid-template-columns: 1.18fr 1fr;
    padding: 3.25rem 2.85rem;
    gap: 3rem;
  }
}

/* Ambient 3D Depth Canvas & Atmospheric Layers */
.hero-3d-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.42;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.orb-rose {
  width: 320px;
  height: 320px;
  top: -60px;
  right: 10%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  animation: orbDrift1 14s ease-in-out infinite alternate;
}

.orb-sage {
  width: 260px;
  height: 260px;
  bottom: -50px;
  left: 5%;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  animation: orbDrift2 16s ease-in-out infinite alternate;
}

.orb-honey {
  width: 200px;
  height: 200px;
  top: 35%;
  left: 45%;
  background: radial-gradient(circle, #dfb271 0%, transparent 70%);
  opacity: 0.35;
  animation: orbDrift3 20s ease-in-out infinite alternate;
}

[data-theme="dark"] .ambient-orb {
  opacity: 0.22;
  filter: blur(65px);
}

@keyframes orbDrift1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, 25px, 0) scale(1.08); }
  100% { transform: translate3d(-20px, 40px, 0) scale(0.94); }
}

@keyframes orbDrift2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-35px, -20px, 0) scale(1.12); }
  100% { transform: translate3d(25px, -15px, 0) scale(0.92); }
}

@keyframes orbDrift3 {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(20px, -30px, 0) scale(1.06); }
}

.ambient-mesh-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(74, 66, 61, 0.05) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  opacity: 0.75;
}

[data-theme="dark"] .ambient-mesh-grid {
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px);
}

.hero-content,
.hero-preview-wrapper {
  position: relative;
  z-index: 1;
}

.apple-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.95rem;
}

.apple-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  box-shadow: 0 0 0 2px var(--accent-blue-glow);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  margin: 0 0 1rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.hero-title span {
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.04rem;
  margin-bottom: 1.75rem;
  max-width: 540px;
  line-height: 1.72;
}

/* 2 Apple-Style Focused Action Buttons */
.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.btn-apple-hero {
  padding: 0.85rem 1.65rem;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-apple-hero svg {
  transition: transform 0.18s ease;
}

.btn-apple-hero:hover svg {
  transform: translateX(3px);
}

.hero-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-check {
  color: var(--accent-blue);
  font-weight: 800;
  font-size: 0.9rem;
}

/* Interactive Preview Footer Button */
.preview-footer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-soft);
  color: var(--primary-hover) !important;
  border: 1px solid var(--primary-border);
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.preview-footer-action-btn:hover {
  background: var(--primary);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* High-Converting Pre-Footer Conversion Card */
.prefooter-cta-card {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.prefooter-cta-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.prefooter-cta-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
}

.prefooter-cta-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.prefooter-cta-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.prefooter-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.prefooter-trust-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Apple-Inspired Practice Preview Card (Tactile, Frictionless First Look)
   ========================================================================== */
/* ==========================================================================
   Spatial 3D Tilt & Specular Glare (Apple Vision OS & Spatial UI inspired)
   ========================================================================== */
[data-tilt-3d],
.apple-preview-card,
.progress-hub-card,
.daily-q-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  position: relative;
}

.card-glare-effect {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  mix-blend-mode: overlay;
}

[data-theme="dark"] .card-glare-effect {
  mix-blend-mode: screen;
}

/* Spatial Z-Layering for Card Depth */
.apple-preview-card .preview-chrome,
.apple-preview-card .preview-module-chip,
.apple-preview-card .preview-scenario-label,
.module-card .module-icon,
.module-card .module-pin-tag,
.module-card .module-title-nl {
  transform: translateZ(14px);
  transform-style: preserve-3d;
}

.apple-preview-card .preview-opt {
  transform: translateZ(10px);
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s ease, border-color 0.18s ease;
}

.apple-preview-card .preview-opt:hover {
  transform: translateZ(20px) scale(1.015);
}

.hero-preview-wrapper {
  position: relative;
  width: 100%;
}

.apple-preview-card {
  background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 20px 42px -16px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.02);
  padding: 1.35rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .apple-preview-card {
  background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  box-shadow: 0 20px 42px -16px rgba(0, 0, 0, 0.5);
}

.apple-preview-card:hover {
  box-shadow: 0 26px 52px -12px rgba(15, 23, 42, 0.14);
}

.preview-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.preview-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.preview-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--border-strong);
  display: inline-block;
  opacity: 0.7;
}

.preview-dots span:nth-child(1) { background-color: #e58d84; opacity: 0.9; }
.preview-dots span:nth-child(2) { background-color: #dfb271; opacity: 0.9; }
.preview-dots span:nth-child(3) { background-color: #8cb399; opacity: 0.9; }

.preview-module-chip {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-heading);
  background-color: var(--mod-1-bg);
  border: 1px solid var(--mod-1-border);
  color: var(--mod-1-text);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-btn-toggle,
.preview-btn-audio {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.preview-btn-toggle:hover,
.preview-btn-audio:hover {
  color: var(--text-heading);
  border-color: var(--primary-border);
  background: var(--bg-muted);
}

.preview-scenario-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  margin-bottom: 0.4rem;
}

.preview-question-nl {
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.42;
  margin: 0 0 0.35rem;
}

.preview-question-en {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.45;
  margin: 0 0 1rem;
  transition: opacity 0.2s ease;
}

.preview-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.preview-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.18s ease;
}

.preview-opt:hover {
  border-color: var(--primary-border);
  background-color: var(--bg-muted);
  transform: translateX(2px);
}

.opt-key {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.opt-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.opt-nl {
  font-size: 0.88rem;
  color: var(--text-heading);
  font-weight: 600;
}

.opt-en {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 400;
}

.opt-indicator {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

.preview-opt.correct-selected {
  background-color: var(--accent-blue-light);
  border-color: var(--accent-blue);
}

.preview-opt.correct-selected .opt-key {
  background-color: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.preview-opt.correct-selected .opt-indicator::after {
  content: "✓";
  color: var(--accent-blue);
}

.preview-opt.incorrect-selected {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
}

.preview-opt.incorrect-selected .opt-key {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.preview-opt.incorrect-selected .opt-indicator::after {
  content: "✕";
  color: var(--danger);
}

.preview-feedback {
  margin-top: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  animation: feedbackSlideIn 0.22s ease-out;
}

@keyframes feedbackSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.preview-feedback.feedback-correct {
  background-color: var(--accent-blue-light);
  border: 1px solid var(--accent-blue-border);
  color: var(--accent-blue-hover);
}

.preview-feedback.feedback-incorrect {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.preview-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.76rem;
}

.preview-footer-note {
  color: var(--text-muted);
}

/* ==========================================================================
   Dedicated Personal Study Progress & Streaks Studio
   ========================================================================== */
.study-progress-section {
  margin: 1.75rem 0 2.25rem;
}

.progress-hub-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.85rem 1.65rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

@media (min-width: 768px) {
  .progress-hub-card {
    padding: 2.25rem;
  }
}

.progress-hub-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.progress-hub-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin: 0.4rem 0 0.25rem;
}

.progress-hub-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  max-width: 680px;
  line-height: 1.55;
}

.progress-hub-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-reset-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.btn-reset-subtle:hover {
  color: var(--danger);
}

/* Soft Bento Progress Metric Tiles */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.05rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:nth-child(1) { background-color: var(--mod-1-bg); border-color: var(--mod-1-border); }
.stat-box:nth-child(2) { background-color: var(--mod-2-bg); border-color: var(--mod-2-border); }
.stat-box:nth-child(3) { background-color: var(--mod-3-bg); border-color: var(--mod-3-border); }
.stat-box:nth-child(4) { background-color: var(--mod-4-bg); border-color: var(--mod-4-border); }

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.15;
}

.stat-box:nth-child(1) .stat-value { color: var(--mod-1-text); }
.stat-box:nth-child(2) .stat-value { color: var(--mod-2-text); }
.stat-box:nth-child(3) .stat-value { color: var(--mod-3-text); }
.stat-box:nth-child(4) .stat-value { color: var(--mod-4-text); }

.stat-label {
  font-size: 0.78rem;
  color: var(--text-main);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ==========================================================================
   8 Official KNM Modules — Soft Pastel Aesthetic Cards
   ========================================================================== */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1.35rem;
}

.section-title {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

@media (min-width: 600px) {
  .modules-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .modules-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.module-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* WCAG AA contrast compliance: Orange text on white cards (> 4.5:1) */
.module-card p {
  color: var(--accent-orange, #c2410c);
}

/* Soft Pastel Header Banner inside each Module Card */
.module-pin-cover {
  height: 92px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  background-color: var(--mod-1-bg);
  border-bottom: 1px solid var(--mod-1-border);
}

.module-card[data-mod-theme="1"] .module-pin-cover { background-color: var(--mod-1-bg); border-color: var(--mod-1-border); }
.module-card[data-mod-theme="2"] .module-pin-cover { background-color: var(--mod-2-bg); border-color: var(--mod-2-border); }
.module-card[data-mod-theme="3"] .module-pin-cover { background-color: var(--mod-3-bg); border-color: var(--mod-3-border); }
.module-card[data-mod-theme="4"] .module-pin-cover { background-color: var(--mod-4-bg); border-color: var(--mod-4-border); }
.module-card[data-mod-theme="5"] .module-pin-cover { background-color: var(--mod-5-bg); border-color: var(--mod-5-border); }
.module-card[data-mod-theme="6"] .module-pin-cover { background-color: var(--mod-6-bg); border-color: var(--mod-6-border); }
.module-card[data-mod-theme="7"] .module-pin-cover { background-color: var(--mod-7-bg); border-color: var(--mod-7-border); }
.module-card[data-mod-theme="8"] .module-pin-cover { background-color: var(--mod-8-bg); border-color: var(--mod-8-border); }

.module-pin-watermark {
  position: absolute;
  right: 12px;
  bottom: -14px;
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 4.2rem;
  font-weight: 400;
  line-height: 1;
  color: rgba(40, 34, 30, 0.06);
  pointer-events: none;
  user-select: none;
}

.module-pin-watermark::after {
  content: attr(data-watermark);
}

[data-theme="dark"] .module-pin-watermark {
  color: rgba(255, 255, 255, 0.06);
}

.module-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: var(--shadow-xs);
  z-index: 1;
}

.module-pin-tag {
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  z-index: 1;
}

.module-card-body {
  padding: 1.15rem 1.25rem 0.85rem;
  flex: 1;
}

.module-card-bottom {
  padding: 0 1.25rem 1.15rem;
}

.module-title-nl {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 0.15rem;
}

.module-title-en {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

.module-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.58;
}

.module-progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.module-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}

.module-card[data-mod-theme="1"] .module-progress-fill { background-color: var(--mod-1-text); }
.module-card[data-mod-theme="2"] .module-progress-fill { background-color: var(--mod-2-text); }
.module-card[data-mod-theme="3"] .module-progress-fill { background-color: var(--mod-3-text); }
.module-card[data-mod-theme="4"] .module-progress-fill { background-color: var(--mod-4-text); }
.module-card[data-mod-theme="5"] .module-progress-fill { background-color: var(--mod-5-text); }
.module-card[data-mod-theme="6"] .module-progress-fill { background-color: var(--mod-6-text); }
.module-card[data-mod-theme="7"] .module-progress-fill { background-color: var(--mod-7-text); }
.module-card[data-mod-theme="8"] .module-progress-fill { background-color: var(--mod-8-text); }

.module-title-link {
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.16s ease;
}

.module-title-link:hover {
  color: var(--primary);
}

.module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Feature Highlights Trio & Popular Study Guides Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 1.25rem 0;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: var(--bg-muted);
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
  flex-shrink: 0;
}

.feature-card:nth-child(1) .feature-card-icon { background-color: var(--mod-1-bg); }
.feature-card:nth-child(2) .feature-card-icon { background-color: var(--mod-2-bg); }
.feature-card:nth-child(3) .feature-card-icon { background-color: var(--mod-5-bg); }

.feature-card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.62;
  margin: 0;
}

.guides-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.guide-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.guide-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.guide-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.guide-card h3 {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.25;
}

.guide-card h3 a {
  color: var(--text-heading);
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: var(--primary);
}

.guide-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.52;
  margin: 0 0 0.35rem;
  flex: 1;
}

.guide-card-cta {
  align-self: flex-start;
}

.daily-completed-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.home-mcq-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   CLS-Safe Google AdSense Slot Containers (Zero-Height Until Filled)
   ========================================================================== */
.ad-wrapper {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
  min-height: 0;
}

.ad-wrapper .ad-label {
  display: none;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.ad-wrapper:has(ins.adsbygoogle[data-ad-status="filled"]) {
  margin: 1.5rem auto;
}

.ad-wrapper:has(ins.adsbygoogle[data-ad-status="filled"]) .ad-label {
  display: block;
}

.ad-wrapper:has(ins.adsbygoogle[data-ad-status="unfilled"]),
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

.ad-slot-banner,
.ad-slot-incontent {
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ==========================================================================
   Calm & Effortless Quiz Studio Layout (quiz.html)
   ========================================================================== */
.quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  margin: 1.15rem 0 2.5rem;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 960px) {
  .quiz-layout {
    grid-template-columns: 285px minmax(0, 1fr);
    align-items: start;
  }
}

.quiz-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}

.quiz-sidebar h3 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.mobile-module-select-wrap {
  display: none;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.filter-btn {
  width: 100%;
  text-align: left;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--text-main);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.16s ease;
}

.filter-btn:hover {
  background-color: var(--bg-muted);
}

.filter-btn.active {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-border);
  font-weight: 700;
}

.quiz-empty-state-box {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  margin: 0.5rem 0 0.25rem;
}

.quiz-empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--primary-soft);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
}

.quiz-empty-state-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.quiz-empty-state-desc {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 1.5rem;
  font-size: 0.94rem;
  line-height: 1.55;
}

.quiz-empty-state-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.quiz-main-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.65rem;
  box-shadow: var(--shadow-md);
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  .quiz-main-card {
    padding: 2.35rem;
  }
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.quiz-mode-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0.28rem;
  background-color: var(--bg-muted);
  padding: 0.28rem;
  border-radius: 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border-color);
}

.quiz-mode-tabs::-webkit-scrollbar {
  display: none;
}

.mode-tab {
  flex: 1 0 auto;
  white-space: nowrap;
  min-height: 38px;
  padding: 0.4rem 0.78rem;
  border-radius: 10px;
  border: none;
  background-color: transparent;
  color: var(--text-muted);
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  transition: all 0.16s ease;
}

.mode-tab:hover {
  color: var(--text-heading);
}

.mode-tab.active {
  background-color: var(--bg-surface);
  color: var(--text-heading);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.quiz-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.quiz-meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.quiz-counter-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-lang-pill {
  padding: 0.32rem 0.72rem;
  min-height: 34px;
  font-size: 0.78rem;
}

.quiz-progress-track {
  width: 100%;
  height: 7px;
  background-color: var(--bg-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-blue) 100%);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.question-scenario {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  padding: 0.9rem 1.05rem;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  color: var(--text-main);
  margin-bottom: 0.95rem;
  line-height: 1.55;
}

.question-text-nl {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.16rem, 2.1vw, 1.38rem);
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 0.6rem;
  line-height: 1.38;
}

/* Soft Matcha Sage Translation Box — Super Comfortable on the Eyes */
.question-text-en {
  font-size: 0.92rem;
  color: var(--accent-blue-hover);
  font-weight: 500;
  margin-bottom: 1.15rem;
  padding: 0.65rem 0.95rem;
  background-color: var(--accent-blue-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-blue-border);
  line-height: 1.5;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  margin: 1rem 0;
}

.option-btn {
  width: 100%;
  min-height: 56px;
  text-align: left;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.16s ease;
  color: var(--text-main);
  font-size: 0.96rem;
  box-shadow: var(--shadow-xs);
}

.option-btn:active:not(:disabled) {
  transform: scale(0.99);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.option-btn:hover:not(:disabled) .option-letter {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.option-letter {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  transition: all 0.16s ease;
}

.option-content {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  flex: 1;
}

.option-nl {
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.38;
}

.option-en {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.option-btn.correct {
  border-color: var(--success);
  background-color: var(--success-bg);
}

.option-btn.correct .option-letter {
  background-color: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.option-btn.incorrect {
  border-color: var(--danger);
  background-color: var(--danger-bg);
}

.option-btn.incorrect .option-letter {
  background-color: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.feedback-box {
  margin-top: 1.1rem;
  padding: 1.05rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  font-size: 0.93rem;
  line-height: 1.55;
}

.feedback-box.correct {
  background-color: var(--success-bg);
  border-color: var(--success-border);
}

.feedback-box.incorrect {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
}

.feedback-title {
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 0.35rem;
}

.quiz-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color);
}

.quiz-footer-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quiz-footer-primary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.quiz-footer-primary .btn {
  min-height: 44px;
  padding: 0.65rem 1.25rem;
}

.bookmark-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  min-height: 42px;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.16s ease;
}

.bookmark-btn:hover {
  border-color: var(--primary);
  color: var(--text-heading);
}

.bookmark-btn.bookmarked {
  background-color: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

/* Smooth Two-Sided Flip Flashcard Deck (CSS Grid Stacked — Never Clips Text) */
.flashcard-3d-scene {
  perspective: 1400px;
  margin: 0.85rem 0 1.25rem;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.flashcard-3d-card {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  min-height: 270px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.flashcard-3d-card.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-3d-face {
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  min-height: 270px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  padding: 1.65rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-surface);
  border: 1.5px solid var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.flashcard-3d-back {
  transform: rotateY(180deg);
  background-color: var(--success-bg);
  border-color: var(--success-border);
}

.streak-3d-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
}

.confetti-3d-particle {
  position: fixed;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 9999;
  transform-style: preserve-3d;
  animation: confettiBurst3D 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes confettiBurst3D {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--tx, 40px), var(--ty, -50px), var(--tz, 100px)) rotateX(360deg) rotateY(540deg) rotateZ(270deg) scale(0.15);
    opacity: 0;
  }
}

/* ==========================================================================
   Cozy Study Note Boards (modules.html) & Content Pages
   ========================================================================== */
.study-guide-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem 1.65rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .study-guide-section {
    padding: 2.35rem;
  }
}

/* Sticky Search & Single-Row Horizontal Quick-Jump Toolbar (modules.html & vocab list) */
.modules-sticky-toolbar {
  position: sticky;
  top: 66px;
  z-index: 90;
  background-color: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modules-search-row,
.vocab-search-wrap {
  width: 100%;
}

.modules-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-heading);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.modules-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.modules-jump-bar,
.vocab-category-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.modules-jump-bar::-webkit-scrollbar,
.vocab-category-strip::-webkit-scrollbar {
  display: none;
}

.vocab-toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vocab-category-strip .btn {
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 38px;
}

.module-jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: all 0.16s ease;
}

.module-jump-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.module-jump-chip.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.modules-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  margin: 1.25rem 0;
}

@media (min-width: 820px) {
  .modules-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.module-deep-dive {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 175px;
  display: flex;
  flex-direction: column;
}

.module-deep-dive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.module-deep-dive-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.module-deep-dive-footer {
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.module-deep-dive::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background-color: var(--mod-1-border);
}

.module-deep-dive[data-module-study-card="1"]::before { background-color: var(--mod-1-text); }
.module-deep-dive[data-module-study-card="2"]::before { background-color: var(--mod-2-text); }
.module-deep-dive[data-module-study-card="3"]::before { background-color: var(--mod-3-text); }
.module-deep-dive[data-module-study-card="4"]::before { background-color: var(--mod-4-text); }
.module-deep-dive[data-module-study-card="5"]::before { background-color: var(--mod-5-text); }
.module-deep-dive[data-module-study-card="6"]::before { background-color: var(--mod-6-text); }
.module-deep-dive[data-module-study-card="7"]::before { background-color: var(--mod-7-text); }
.module-deep-dive[data-module-study-card="8"]::before { background-color: var(--mod-8-text); }

.module-deep-dive.prose ul {
  list-style: none;
  margin: 0.9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.module-deep-dive.prose li {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .modules-sticky-toolbar {
    top: 58px;
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .module-deep-dive {
    padding: 1.15rem 1rem;
    border-radius: 18px;
    scroll-margin-top: 165px;
  }

  /* Remove nested card-in-card box around each bullet item on mobile for full reading width */
  .module-deep-dive.prose ul {
    gap: 0;
    margin-top: 0.5rem;
  }

  .module-deep-dive.prose li {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0.75rem 0;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .module-deep-dive-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .vocab-toolbar-card {
    padding: 0.85rem !important;
  }
}

.prose h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  margin-bottom: 0.65rem;
}

.prose h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  margin-top: 1rem;
  margin-bottom: 0.45rem;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 0.95rem;
  margin-bottom: 0.35rem;
}

.prose p {
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.prose ul, .prose ol {
  margin: 0.5rem 0 1rem 1.35rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.callout-box {
  background-color: var(--accent-blue-light);
  border-left: 4px solid var(--accent-blue);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0 2.5rem;
}

@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
  color: var(--text-heading);
}

.form-control {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.94rem;
  font-family: inherit;
  transition: all 0.18s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================================================
   Site Footer & Mobile Bottom Navigation
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0 1.85rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.65rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
}

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--bg-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
   gap: 0.2rem;
  padding: 0.3rem 0.45rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(40, 34, 30, 0.07);
}

@media (min-width: 860px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.35rem 0.25rem;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  gap: 0.22rem;
  position: relative;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.1;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

.bottom-nav-item.active {
  color: var(--primary-hover);
  background-color: var(--primary-soft);
  font-weight: 700;
}

.bottom-nav-item.active svg {
  stroke-width: 2.4;
  transform: translateY(-1px);
}

.saved-count-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==========================================================================
   Mobile Header Hamburger Button & Slide-In Drawer Navigation
   ========================================================================== */
.btn-mobile-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-heading);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-mobile-menu:hover,
.btn-mobile-menu:focus-visible {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 859px) {
  .btn-mobile-menu {
    display: inline-flex;
  }
}

.hamburger-box {
  width: 18px;
  height: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.btn-mobile-menu.active .hamburger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.btn-mobile-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.btn-mobile-menu.active .hamburger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Slide-In Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.25s ease;
}

.mobile-nav-drawer.open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(20, 16, 14, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-drawer.open .mobile-drawer-backdrop {
  opacity: 1;
}

.mobile-drawer-panel {
  position: relative;
  width: min(340px, 88vw);
  height: 100%;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.15rem 1.15rem calc(var(--bottom-nav-height) + 1.5rem);
}

.mobile-nav-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.btn-drawer-close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-drawer-close:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-drawer-search-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.85rem;
  transition: all 0.18s ease;
  text-align: left;
}

.mobile-drawer-search-btn:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--text-heading);
}

.mobile-drawer-prefs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}

.drawer-pref-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  min-height: 54px;
  padding: 0.6rem 0.85rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: 0.86rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.drawer-pref-btn:active {
  transform: scale(0.98);
  background-color: var(--primary-light);
}

.drawer-pref-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mobile-drawer-section {
  margin-bottom: 1.25rem;
}

.mobile-drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 0.4rem;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  padding: 0.68rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.16s ease;
}

.mobile-drawer-link:hover,
.mobile-drawer-link:focus-visible {
  background-color: var(--primary-light);
  color: var(--primary-hover);
}

.mobile-drawer-link.active {
  background-color: var(--primary-soft);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
}

.drawer-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}


@media (max-width: 959px) {
  .quiz-layout {
    gap: 0.65rem;
    margin: 0.65rem 0 1.5rem;
  }

  .quiz-sidebar {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
    width: 100%;
  }

  .quiz-sidebar.mode-global {
    display: none;
  }

  .quiz-sidebar h3 {
    display: none;
  }

  .filter-list {
    display: block;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .quiz-sidebar .filter-btn {
    display: none;
  }

  .mobile-module-select-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    box-shadow: var(--shadow-xs);
    width: 100%;
  }

  .mobile-module-select-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-module-select {
    flex: 1;
    min-width: 0;
    min-height: 38px;
    padding: 0.35rem 2rem 0.35rem 0.65rem;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-heading);
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b5e51' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 15px;
    text-overflow: ellipsis;
  }

  .mobile-module-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
  }
}

.btn-utility {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  min-height: 42px;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.16s ease;
}

.btn-utility:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background-color: var(--accent-blue-light);
}

.btn-utility.speaking {
  background-color: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
}

.summary-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
  text-align: left;
}

.summary-mod-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.95rem;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.missed-review-list {
  text-align: left;
  margin-top: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.missed-review-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--danger-border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}

.bento-history-strip {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   Google Rich Snippet FAQ Accordion Styles
   ========================================================================== */
.faq-section {
  margin: 2.75rem 0 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease;
}

.faq-item[open] {
  border-color: var(--primary-border);
}

.faq-summary {
  padding: 1.1rem 1.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background-color 0.15s ease;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary:hover {
  background-color: var(--bg-subtle);
}

.faq-summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
  content: "−";
}

.faq-content {
  padding: 0.85rem 1.35rem 1.25rem;
  color: var(--text-main);
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Viral "Share My Score" Component
   ========================================================================== */
.share-score-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  max-width: 520px;
  margin: 1.25rem auto 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.share-score-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

.share-btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s ease;
}

.btn-share-whatsapp {
  background-color: #25d366;
  color: #ffffff;
}

.btn-share-whatsapp:hover {
  background-color: #1ebe5d;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-share-telegram {
  background-color: #229ed9;
  color: #ffffff;
}

.btn-share-telegram:hover {
  background-color: #1d8bc0;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-share-linkedin {
  background-color: #0077b5;
  color: #ffffff;
}

.btn-share-linkedin:hover {
  background-color: #006399;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-share-copy {
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  border-color: var(--border-color);
}

.btn-share-copy:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

/* ==========================================================================
   Daily Study Streak & Daily KNM Question Widget
   ========================================================================== */
.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.streak-pill:hover {
  border-color: var(--brand-orange);
  transform: translateY(-1px);
}

.streak-pill.streak-active {
  border-color: var(--brand-orange);
  background: linear-gradient(135deg, rgba(194, 118, 110, 0.08) 0%, rgba(212, 163, 115, 0.12) 100%);
}

.streak-icon {
  font-size: 0.95rem;
  display: inline-block;
  transform-origin: center bottom;
  animation: flameFlicker 2.8s ease-in-out infinite;
}

@keyframes flameFlicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.12) rotate(-4deg); }
  50% { transform: scale(0.96) rotate(3deg); }
  75% { transform: scale(1.08) rotate(-2deg); }
}

.streak-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: linear-gradient(135deg, var(--bg-subtle) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.95rem;
  transition: border-color 0.2s ease;
}

.streak-banner-card:hover {
  border-color: var(--brand-orange-light);
}

.streak-banner-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.streak-banner-flame {
  font-size: 1.5rem;
}

.streak-banner-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
}

.streak-banner-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.streak-badge-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  background-color: var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
}

.streak-badge-chip.active {
  background-color: rgba(88, 123, 101, 0.15);
  color: var(--success);
  border: 1px solid rgba(88, 123, 101, 0.3);
}

.streak-badge-chip.pending {
  background-color: rgba(194, 118, 110, 0.14);
  color: var(--brand-orange);
  border: 1px solid rgba(194, 118, 110, 0.3);
}

/* Daily Question Card */
.daily-q-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

.btn-daily-reminder {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid var(--brand-orange);
  background-color: transparent;
  color: var(--brand-orange);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-daily-reminder:hover {
  background-color: var(--brand-orange);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-daily-reminder.active {
  background-color: rgba(88, 123, 101, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.daily-completed-banner {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  margin-top: 1rem;
}

.daily-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-subtle);
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-top: 0.65rem;
}

/* Floating Streak Toast */
.streak-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-heading);
  color: var(--bg-canvas);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.streak-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Experimental Navigation: Apple Spotlight & Spatial Command Palette (⌘K)
   ========================================================================== */

/* Header ⌘K Button */
.btn-cmd-palette {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.38rem 0.72rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-cmd-palette:hover {
  color: var(--text-heading);
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.cmd-icon-symbol {
  display: flex;
  align-items: center;
  color: var(--primary);
}

.cmd-kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cmd-kbd-badge kbd,
.cmd-key-hint kbd {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1rem 0.32rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Floating Desktop Quick Pill */
.floating-cmd-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 80;
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background-color: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 900px) {
  .floating-cmd-trigger {
    display: inline-flex;
  }
}

.floating-cmd-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  color: var(--text-heading);
}

.floating-cmd-dot {
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  animation: pulsePill 2.4s infinite ease-in-out;
}

/* Command Palette Modal Backdrop */
.cmd-palette-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 16, 14, 0.52);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.cmd-palette-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Command Palette Dialog */
.cmd-palette-dialog {
  width: 100%;
  max-width: 640px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 82vh;
}

.cmd-palette-backdrop.open .cmd-palette-dialog {
  transform: scale(1) translateY(0);
}

/* Search Header */
.cmd-search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: relative;
}

.cmd-search-icon {
  color: var(--primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cmd-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--text-heading);
  font-weight: 500;
}

.cmd-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.cmd-clear-btn {
  background: var(--bg-muted);
  border: none;
  color: var(--text-muted);
  font-size: 1.05rem;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: var(--radius-pill);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.cmd-clear-btn.visible {
  display: inline-flex;
}

.cmd-clear-btn:hover {
  color: var(--text-heading);
}

.cmd-close-btn {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  padding: 0.42rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.cmd-close-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
}

/* Category Filter Chips */
.cmd-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.cmd-filter-tabs::-webkit-scrollbar {
  display: none;
}

.cmd-filter-chip {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cmd-filter-chip:hover {
  color: var(--text-heading);
  background-color: var(--bg-subtle);
}

.cmd-filter-chip.active {
  background-color: var(--primary-soft);
  color: var(--primary-hover);
  border-color: var(--primary-border);
}

/* Results Container */
.cmd-results-list {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  overflow-y: auto;
  max-height: 52vh;
  overscroll-behavior: contain;
}

/* Individual Command Item */
.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.14s ease, transform 0.14s ease;
  user-select: none;
  position: relative;
}

.cmd-item:hover,
.cmd-item.active {
  background-color: var(--primary-light);
}

.cmd-item.active {
  outline: 1px solid var(--primary-border);
}

.cmd-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.cmd-item-info {
  flex: 1;
  min-width: 0;
}

.cmd-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cmd-item-title mark {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.cmd-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.12rem;
}

.cmd-item-action-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.cmd-item.active .cmd-item-action-badge {
  background-color: var(--primary-soft);
  color: var(--primary-hover);
  border-color: var(--primary-border);
}

/* Empty State */
.cmd-empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
}

.cmd-empty-state svg {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.cmd-empty-title {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-heading);
  margin-bottom: 0.35rem;
}

.cmd-empty-text {
  font-size: 0.84rem;
}

/* Vocabulary Quick Peek Box */
.cmd-vocab-preview {
  margin-top: 0.4rem;
  padding: 0.5rem 0.7rem;
  background-color: var(--bg-canvas);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cmd-vocab-definition {
  color: var(--text-main);
  line-height: 1.4;
}

.cmd-vocab-listen-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.cmd-vocab-listen-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

/* Footer Instructions */
.cmd-palette-footer {
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cmd-shortcuts-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cmd-key-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cmd-brand-tag {
  font-weight: 600;
  color: var(--primary);
}

@media (max-width: 640px) {
  .cmd-palette-backdrop {
    padding: 0.75rem 0.55rem;
    align-items: flex-start;
  }

  .cmd-palette-dialog {
    max-height: 85vh;
    border-radius: 18px;
  }

  .cmd-search-bar {
    padding: 0.75rem 0.85rem;
    gap: 0.55rem;
  }

  .cmd-filter-tabs {
    padding: 0.55rem 0.85rem;
  }

  .cmd-palette-footer {
    display: none;
  }
}

/* ==========================================================================
   Responsive Ergonomics for Mobile Viewports & Small Screens
   ========================================================================== */
@media (max-width: 859px) {
  /* Edge-to-edge native app top bar on mobile */
  .site-header {
    padding: 0;
    background-color: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(40, 34, 30, 0.04);
  }

  .site-header > .container {
    padding: 0;
    max-width: 100%;
  }

  .header-inner {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    min-height: 58px;
    padding: 0.45rem 0.95rem;
    gap: 0.5rem;
  }

  /* Remove redundant header buttons that live in the bottom nav bar or mobile menu */
  .header-actions .btn-header-cta,
  .header-actions .btn-cmd-palette,
  .header-actions .btn-install {
    display: none !important;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .streak-pill {
    min-height: 38px;
    padding: 0 0.7rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
  }

  /* Clean 40x40 icon-only theme button in mobile header */
  .header-actions .btn-toggle[data-action="toggle-theme"] {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .header-actions .btn-toggle[data-action="toggle-theme"] .theme-text {
    display: none;
  }

  .header-actions .btn-toggle[data-action="toggle-theme"] .theme-icon {
    font-size: 1.05rem;
    line-height: 1;
  }

  /* Keep floating streak toast above the fixed bottom tab bar */
  .streak-toast {
    bottom: calc(var(--bottom-nav-height) + 0.85rem);
    width: max-content;
    max-width: 92vw;
  }
}

@media (max-width: 768px) {
  .prose {
    font-size: 1rem;
    line-height: 1.7;
  }

  .study-guide-section {
    padding: 1.5rem 1.15rem;
  }
}

@media (max-width: 640px) {
  /* Homepage Hero: Eliminate outer card-in-card box so text & preview get 100% width */
  .hero-section {
    margin: 0.75rem 0 1.25rem;
  }

  .hero-card.apple-hero-layout {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0 0.35rem;
    border-radius: 0;
    gap: 1.35rem;
  }

  .hero-3d-backdrop {
    display: none;
  }

  .hero-trust-bar {
    gap: 0.55rem 0.9rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    font-size: 0.78rem;
  }

  /* Hide redundant second standalone MCQ card on mobile (Hero Preview + Daily Challenge + Bottom Quiz Tab remain) */
  #home-quick-practice-section {
    display: none;
  }

  /* Compact 8 Official KNM Modules cards on mobile — cuts vertical scroll by ~40% */
  .modules-grid {
    gap: 0.85rem;
  }

  .module-card[data-mod-theme] .module-pin-cover {
    height: auto;
    padding: 0.65rem 1rem;
  }

  .module-card[data-mod-theme] .module-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.15rem;
  }

  .module-card[data-mod-theme] .module-pin-watermark {
    font-size: 2.75rem;
    bottom: -8px;
  }

  .module-card[data-mod-theme] .module-card-body {
    padding: 0.85rem 1rem 0.55rem;
  }

  .module-card[data-mod-theme] .module-title-nl {
    font-size: 1.06rem;
    margin-bottom: 0.1rem;
  }

  .module-card[data-mod-theme] .module-title-en {
    margin-bottom: 0.35rem;
  }

  .module-card[data-mod-theme] .module-desc {
    font-size: 0.83rem;
    line-height: 1.48;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .module-card[data-mod-theme] .module-card-bottom {
    padding: 0 1rem 0.85rem;
  }

  .module-card[data-mod-theme] .module-progress-bar {
    margin-bottom: 0.6rem;
  }

  .module-card[data-mod-theme] .module-card-footer {
    padding-top: 0.6rem;
  }

  .module-card[data-mod-theme] .module-card-footer .btn {
    min-height: 38px;
    padding: 0.4rem 0.9rem;
  }

  /* Horizontal native-app layout for Feature Cards on mobile */
  .features-grid {
    gap: 0.75rem;
  }

  .feature-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 1.05rem 1rem;
  }

  .feature-card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    font-size: 1.25rem;
  }

  .feature-card h3 {
    font-size: 1.02rem;
    margin-bottom: 0.25rem;
  }

  .feature-card p {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  /* Compact Guide Cards with full-width thumb-friendly CTA on mobile */
  .guide-card {
    padding: 1.05rem 1rem;
  }

  .guide-card-cta {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  /* FAQ Accordion touch targets */
  .faq-summary {
    min-height: 52px;
    padding: 0.95rem 1.05rem;
    font-size: 0.94rem;
    gap: 0.75rem;
    line-height: 1.38;
  }

  .faq-content {
    padding: 0.8rem 1.05rem 1.05rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .brand-logo {
    gap: 0.45rem;
  }

  .brand-badge {
    font-size: 0.76rem;
    padding: 0.28rem 0.55rem;
  }

  .brand-name {
    font-size: 0.96rem;
  }

  .header-actions .btn-install.visible {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  /* Hero Typography & CTAs */
  .hero-title {
    font-size: 1.9rem;
    line-height: 1.15;
  }

  .hero-lead {
    font-size: 0.94rem;
    line-height: 1.58;
    margin-bottom: 1.15rem;
  }

  .hero-cta-group {
    width: 100%;
    flex-direction: column;
    gap: 0.65rem;
  }

  .btn-apple-hero {
    width: 100%;
    min-height: 50px;
    justify-content: center;
  }

  /* Interactive Preview Card on Mobile */
  .apple-preview-card {
    padding: 1.05rem 0.95rem;
    border-radius: 20px;
  }

  .preview-dots {
    display: none;
  }

  .preview-btn-toggle,
  .preview-btn-audio {
    min-height: 34px;
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
  }

  .preview-opt {
    min-height: 52px;
    padding: 0.8rem 0.9rem;
  }

  .preview-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .preview-footer-note {
    text-align: center;
  }

  .preview-footer-action-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 0.86rem;
  }

  /* Study Progress & Streaks Studio on Mobile */
  .study-progress-section {
    margin: 1.15rem 0 1.65rem;
  }

  .progress-hub-card {
    padding: 1.15rem 0.95rem;
    border-radius: 20px;
  }

  .progress-hub-header {
    margin-bottom: 1rem;
    gap: 0.65rem;
  }

  .streak-banner-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    gap: 0.55rem;
  }

  .streak-badge-chip {
    align-self: flex-start;
  }

  .stats-grid {
    gap: 0.6rem;
  }

  .stat-box {
    padding: 0.9rem 0.85rem;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .section-header {
    margin: 1.85rem 0 1rem;
    gap: 0.65rem;
  }

  .daily-completed-actions,
  .home-mcq-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .daily-completed-actions .btn,
  .home-mcq-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .prefooter-cta-card {
    padding: 1.85rem 1.1rem;
    border-radius: 22px;
  }

  .prefooter-cta-title {
    font-size: 1.6rem;
  }

  .prefooter-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .prefooter-cta-actions .btn {
    width: 100%;
  }

  /* Quiz on mobile — Clean card framing, 5-tab segmented bar & sticky thumb bar */
  #quiz-engine-root .quiz-main-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.9rem 0.85rem;
    border-radius: 18px;
  }

  .quiz-main-card {
    padding: 1rem 0.9rem;
    border-radius: 18px;
  }

  .quiz-toolbar {
    margin-bottom: 0.65rem;
  }

  .quiz-mode-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.24rem;
    overflow: visible;
    border-radius: 13px;
  }

  .mode-tab {
    flex-direction: column;
    gap: 0.14rem;
    min-height: 48px;
    padding: 0.34rem 0.12rem;
    font-size: 0.68rem;
    line-height: 1.15;
    border-radius: 9px;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mode-tab-icon {
    font-size: 0.95rem;
    line-height: 1;
  }

  .hide-xs {
    display: none;
  }

  #quiz-mistakes-tab-badge {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.6rem !important;
    padding: 0.04rem 0.3rem !important;
    margin-left: 0 !important;
    line-height: 1.1;
  }

  .quiz-empty-state-box {
    padding: 1.65rem 1rem;
    margin: 0.2rem 0;
  }

  .quiz-empty-state-icon {
    width: 54px;
    height: 54px;
    font-size: 1.55rem;
    margin-bottom: 0.75rem;
  }

  .quiz-empty-state-title {
    font-size: 1.18rem;
  }

  .quiz-empty-state-desc {
    font-size: 0.88rem;
    margin-bottom: 1.15rem;
  }

  .quiz-empty-state-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .quiz-empty-state-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .quiz-meta-bar {
    margin-bottom: 0.45rem;
    gap: 0.35rem;
  }

  .quiz-meta-bar .badge {
    font-size: 0.72rem;
    padding: 0.22rem 0.58rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quiz-progress-track {
    height: 5px;
    margin-bottom: 0.65rem;
  }

  .question-scenario {
    padding: 0.62rem 0.82rem;
    font-size: 0.85rem;
    line-height: 1.46;
    margin-bottom: 0.55rem;
  }

  .question-text-nl {
    font-size: 1.06rem;
    line-height: 1.34;
    margin-bottom: 0.4rem;
  }

  .question-text-en {
    font-size: 0.83rem;
    line-height: 1.42;
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.6rem;
  }

  .options-list {
    gap: 0.48rem;
    margin: 0.45rem 0;
  }

  .option-btn {
    padding: 0.72rem 0.85rem;
    font-size: 0.89rem;
    gap: 0.65rem;
    min-height: 48px;
    border-radius: 14px;
  }

  .option-en {
    font-size: 0.79rem;
    line-height: 1.32;
  }

  .option-letter {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
    border-radius: 8px;
  }

  .feedback-box {
    margin-top: 0.65rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.86rem;
  }

  .flashcard-3d-face {
    padding: 1.25rem 1rem;
    min-height: 230px;
    border-radius: 18px;
  }

  .quiz-footer-nav {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.48rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    position: sticky;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 6px);
    background-color: var(--bg-glass);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    z-index: 35;
  }

  .quiz-footer-primary {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 0.5rem;
    width: 100%;
  }

  .quiz-footer-primary .btn {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    justify-content: center;
  }

  .quiz-footer-secondary {
    display: flex;
    width: 100%;
    gap: 0.45rem;
  }

  .quiz-footer-secondary .bookmark-btn,
  .quiz-footer-secondary .btn-utility {
    flex: 1;
    min-height: 38px;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.85rem;
  }
}

/* ==========================================================================
   Magic Trick #5: Butter-Smooth Question Morphing & Reading Progress Bar
   ========================================================================== */
@keyframes quizMorphNext {
  0% {
    opacity: 0;
    transform: translate3d(18px, 0, 0) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes quizMorphPrev {
  0% {
    opacity: 0;
    transform: translate3d(-18px, 0, 0) scale(0.992);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes quizMorphMode {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes optionCascadeIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes feedbackGlideReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, -6px, 0) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.morph-next {
  animation: quizMorphNext 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.morph-prev {
  animation: quizMorphPrev 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.morph-mode {
  animation: quizMorphMode 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.morph-next .option-btn,
.morph-prev .option-btn,
.morph-mode .option-btn {
  animation: optionCascadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--opt-idx, 0) * 32ms);
}

.quiz-answered-state .option-btn {
  animation: none !important;
}

.feedback-box {
  animation: feedbackGlideReveal 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Top Laser Reading Progress Bar */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 2500;
  pointer-events: none;
  background: transparent;
}

.reading-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-blue) 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 10px var(--primary-glow);
  will-change: transform;
}

/* Floating Circular Scroll-Progress & Back-to-Top Pill */
.scroll-top-pill {
  position: fixed;
  right: 1.15rem;
  bottom: 1.35rem;
  z-index: 980;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 12px, 0) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease, background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.scroll-top-pill.visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
}

.scroll-top-pill:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
  transform: translate3d(0, -2px, 0) scale(1.03);
}

.scroll-top-pill:active {
  transform: scale(0.94);
}

.scroll-top-ring {
  position: absolute;
  inset: 1px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.scroll-top-ring-bg {
  stroke: var(--border-color);
  opacity: 0.45;
}

.scroll-top-ring-fg {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.scroll-top-arrow {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 859px) {
  .scroll-top-pill {
    right: 0.85rem;
    bottom: calc(var(--bottom-nav-height) + 0.85rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .morph-next,
  .morph-prev,
  .morph-mode,
  .morph-next .option-btn,
  .morph-prev .option-btn,
  .morph-mode .option-btn,
  .feedback-box {
    animation: none !important;
  }
}

/* ==========================================================================
   SEO Module Question Hub & High-CPC Expat Guide Styles
   ========================================================================== */
.seo-facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .seo-facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.seo-fact-item {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
}

.seo-fact-term {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.seo-fact-desc {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.55;
}

.seo-questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.seo-question-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.seo-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.seo-q-title-nl {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text-heading);
  line-height: 1.45;
  margin: 0 0 0.3rem;
}

.seo-q-title-en {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  line-height: 1.5;
}

.seo-q-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.seo-q-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-subtle);
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.seo-q-option:hover {
  border-color: var(--primary-border);
  background-color: var(--bg-muted);
}

.seo-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-heading);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.seo-opt-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.seo-opt-nl {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.4;
}

.seo-opt-en {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.seo-q-option.selected-correct {
  background-color: var(--success-bg);
  border-color: var(--success);
}

.seo-q-option.selected-correct .seo-opt-letter {
  background-color: var(--success);
  border-color: var(--success);
  color: #ffffff;
}

.seo-q-option.selected-wrong {
  background-color: var(--danger-bg);
  border-color: var(--danger);
}

.seo-q-option.selected-wrong .seo-opt-letter {
  background-color: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

.seo-q-answer-details {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
}

.seo-q-answer-summary {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0;
}

.seo-q-answer-box {
  margin-top: 0.6rem;
  padding: 0.9rem 1rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
}

.seo-q-correct-line {
  color: var(--success);
  margin-bottom: 0.45rem;
}

.seo-q-exp-nl {
  margin: 0 0 0.35rem;
  color: var(--text-heading);
}

.seo-q-exp-en {
  margin: 0;
  color: var(--text-muted);
}

.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.seo-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}

.seo-comparison-table th,
.seo-comparison-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  line-height: 1.5;
}

.seo-comparison-table th {
  background-color: var(--bg-subtle);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.seo-comparison-table tbody tr:last-child td {
  border-bottom: none;
}
