/* Modern Editorial Design - PYQ Wovrix */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  --hero-bg: radial-gradient(circle at 75% 45%, #f5f5f4 0%, #fcfcfb 65%);
  --bg: #fcfcfb;
  --surface: #ffffff;
  --text: #18181b;
  --text-muted: #52525b;
  --text-muted-faint: #71717a;
  --border: #e4e4e7;
  --border-light: #f4f4f5;
  --primary: #18181b;
  --primary-hover: #27272a;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card: 0 4px 12px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
  --surface-alt: #f4f4f5;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 251, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-logo-icon {
  display: block;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.brand-name {
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 3px;
}

.brand-slash {
  color: #a1a1aa;
  font-weight: 400;
}

.brand-sub {
  color: var(--accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-highlight {
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.nav-highlight:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
}

.nav-cta-pill {
  background: var(--primary);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-cta-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ======================================================== */
/* Full Screen Hero Viewport with 3D Interactive Canvas */
/* ======================================================== */
.landing-main {
  width: 100%;
}

.hero-fullscreen-viewport {
  position: relative;
  min-height: calc(92vh - 68px);
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--hero-bg);
  background-color: var(--bg);
}

/* 3D Canvas Background */
.hero-3d-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Clean Left Column Content sitting above 3D scene */
.hero-content-left {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-left: max(24px, calc((100vw - 1360px) / 2 + 24px));
  padding: 48px 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.hero-big-type {
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-italic-serif {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
}

.hero-editorial-lead {
  font-size: 16.5px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 2px solid var(--text);
}

.hero-editorial-lead strong {
  color: var(--text);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-dark-pill {
  background: var(--primary);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: 9999px;
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-dark-pill:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn-outline-pill {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  color: var(--accent);
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  padding: 12px 22px;
  border-radius: 9999px;
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline-pill:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

.btn-ghost-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 14px;
  transition: color 0.15s ease;
}

.btn-ghost-link:hover {
  color: var(--text);
}

/* ======================================================== */
/* Telemetry Status Bar */
/* ======================================================== */
.telemetry-status-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}

.status-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.status-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: 2px;
}

.status-title {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted-faint);
  text-transform: uppercase;
}

.status-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ======================================================== */
/* Chapters Directory Section */
/* ======================================================== */
.chapters-directory-section {
  max-width: 1360px;
  margin: 64px auto;
  padding: 0 24px;
}

.section-lead-header {
  margin-bottom: 40px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.section-heading {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.subject-column {
  display: flex;
  flex-direction: column;
}

.subject-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 16px;
}

.subject-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subj-badge {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
}

.chapter-card:hover {
  border-color: #a1a1aa;
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.ch-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.ch-info {
  display: flex;
  flex-direction: column;
}

.ch-info h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ch-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ======================================================== */
/* Massive Modern Editorial Footer */
/* ======================================================== */
.site-footer {
  background: #111113;
  color: #a1a1aa;
  border-top: 1px solid #27272a;
  padding: 64px 24px 24px;
  margin-top: 80px;
  overflow: hidden;
}

.footer-top-grid {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid #27272a;
}

.footer-brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #71717a;
  max-width: 320px;
}

.footer-col-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list li a {
  font-size: 13px;
  color: #a1a1aa;
  transition: color 0.15s ease;
}

.footer-links-list li a:hover {
  color: #ffffff;
}

.footer-legal-bar {
  max-width: 1360px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-legal-bar .disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #52525b;
}

.footer-copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #71717a;
  padding-top: 16px;
  border-top: 1px solid #1f1f23;
}

.footer-massive-wovrix {
  max-width: 1400px;
  margin: 40px auto 0;
  text-align: center;
  border-top: 1px solid #222226;
  padding-top: 24px;
}

.footer-massive-wovrix span {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(72px, 16vw, 220px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.82;
  color: #1c1c20;
  text-transform: uppercase;
  user-select: none;
  transition: color 0.3s ease;
}

.footer-massive-wovrix span:hover {
  color: #27272e;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .directory-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .hero-fullscreen-viewport {
    min-height: auto;
    padding: 24px 0 32px;
  }
  .hero-content-left {
    margin-left: 0;
    max-width: 100%;
    background: rgba(252, 252, 251, 0.94);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 24px 18px;
    margin: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  }
}

@media (max-width: 640px) {
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  .footer-copy-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .nav-links .nav-link {
    display: none;
  }
}

/* Unified Multi-Exam Switcher */
.exam-switcher-bar {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px;
  margin-top: 20px;
  box-shadow: var(--shadow-subtle);
}

.exam-tab-btn {
  border: none;
  background: transparent;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.exam-tab-btn:hover {
  color: var(--text);
}

.exam-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* NEET Grid Cards */
.neet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.neet-subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.neet-subject-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.neet-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.neet-card-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.neet-count-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.neet-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.neet-topics-preview {
  font-size: 12.5px;
  color: #71717a;
  background: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  flex-grow: 1;
}

.neet-topics-preview .topic-label {
  font-weight: 700;
  color: var(--text);
}

.neet-action-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  transition: color 0.15s ease;
  align-self: flex-start;
}

.neet-action-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .neet-grid {
    grid-template-columns: 1fr;
  }
  .exam-switcher-bar {
    width: 100%;
    flex-direction: column;
    border-radius: 12px;
  }
  .exam-tab-btn {
    border-radius: 8px;
    width: 100%;
    text-align: center;
  }
}


/* ======================================================== */
/* Core Page Layout & Breadcrumbs */
/* ======================================================== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--accent);
  transition: opacity 0.15s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--text);
  font-weight: 600;
}

/* ======================================================== */
/* Chapter Header Box */
/* ======================================================== */
.chapter-header-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.sub-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.chapter-title {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.chapter-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ======================================================== */
/* Question Cards & Lists */
/* ======================================================== */
.questions-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-title-bar h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-card, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.question-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.tag, .tag-marks {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tag-marks {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.2);
}

.tag-primary {
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
}

.repeat-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #fafaf9;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.repeat-pill-gold {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
  font-weight: 700;
}

.question-text, .math-content {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
}

.card-action, .card-footer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #f4f4f5;
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.card-link, .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #ffffff;
  background: #18181b;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.card-link:hover, .action-btn:hover {
  background: #27272a;
}

.card-link-subtle {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: background 0.15s ease;
}

.card-link-subtle:hover {
  background: rgba(37, 99, 235, 0.1);
}

.report-link-small, .report-link {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #a1a1aa;
  transition: color 0.15s ease;
}

.report-link-small:hover, .report-link:hover {
  color: #ef4444;
}

/* ======================================================== */
/* Question Detail Card (/q/* pages) */
/* ======================================================== */
.question-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.question-header .tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.repeat-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #f4f4f5;
  padding: 6px 12px;
  border-radius: 6px;
}

.repeat-badge strong {
  color: var(--text);
}

.question-body {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 28px;
}

/* ======================================================== */
/* Mobile Bottom Navigation Dock */
/* ======================================================== */
.mobile-bottom-dock {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(252, 252, 251, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 56px;
    min-height: 44px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
  }

  .mobile-dock-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
  }

  .mobile-dock-item.active, .mobile-dock-item:hover {
    color: var(--accent);
  }

  body {
    padding-bottom: 70px;
  }

  .hero-fullscreen-viewport {
    min-height: auto;
    padding: 24px 0 16px;
  }

  .hero-content-left {
    margin-left: 0;
    padding: 20px 16px;
    max-width: 100%;
  }

  .hero-big-type {
    font-size: clamp(2rem, 7.5vw, 2.75rem);
  }

  .hero-3d-container {
    opacity: 0.25;
  }

  .status-bar-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .nav-links .nav-link {
    display: none;
  }

  .nav-cta-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .directory-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .chapter-header-box {
    padding: 20px 16px;
  }

  .question-card {
    padding: 18px 16px;
  }

  .card-action {
    flex-direction: column;
    align-items: stretch;
  }

  .report-link-small, .report-link {
    margin-left: 0;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .status-bar-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ======================================================== */
/* Print Stylesheet for Paper Maker & A4 Output */
/* ======================================================== */
@media print {
  .site-header, .site-footer, .mobile-bottom-dock, .card-action, .report-link, .btn-no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 11pt !important;
  }
  .page-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .paper-print-page {
    page-break-after: always;
    padding: 20mm 15mm;
  }
  .question-card {
    border: none !important;
    border-bottom: 1px dashed #ccc !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 0 !important;
    page-break-inside: avoid;
  }
}

/* Dark Mode Tokens & Overrides */
[data-theme="dark"] {
  --accent-light: rgba(37, 99, 235, 0.22);
  --hero-bg: radial-gradient(circle at 75% 45%, #18181b 0%, #090d16 65%);
  --bg: #090d16;
  --surface: #111827;
  --surface-alt: #1f2937;
  --border: #374151;
  --border-light: #1f2937;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --text-accent: #60a5fa;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-elevated: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] body {
  background-color: var(--bg);
  color: var(--text);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
  color: #f9fafb;
}

[data-theme="dark"] p {
  color: #cbd5e1;
}

/* Hero Viewport in Dark Mode (High Contrast & Zero Washout) */
[data-theme="dark"] .hero-fullscreen-viewport {
  background: radial-gradient(circle at 75% 45%, #18181b 0%, #090d16 65%) !important;
  background-color: #090d16 !important;
  border-bottom-color: #1f2937;
}

[data-theme="dark"] .hero-content-left {
  background: transparent;
}

[data-theme="dark"] .hero-big-type {
  color: #f9fafb !important;
}

[data-theme="dark"] .hero-eyebrow {
  background: rgba(30, 41, 59, 0.85);
  border-color: #3b82f6;
  color: #93c5fd !important;
}

[data-theme="dark"] .hero-editorial-lead {
  background: rgba(17, 24, 39, 0.85) !important;
  border-left-color: #3b82f6 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .hero-editorial-lead strong {
  color: #f9fafb !important;
}

[data-theme="dark"] .btn-outline-pill {
  background: rgba(31, 41, 55, 0.85);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
}

[data-theme="dark"] .btn-outline-pill:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: #60a5fa;
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.85);
  border-bottom-color: #1f2937;
}

[data-theme="dark"] .site-footer {
  background: #0b0f19;
  border-top-color: #1f2937;
}

[data-theme="dark"] .footer-brand-desc,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-links-list a,
[data-theme="dark"] .footer-bottom {
  color: #9ca3af;
}

[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-links-list a:hover {
  color: #60a5fa;
}

[data-theme="dark"] .mobile-bottom-dock {
  background: rgba(17, 24, 39, 0.95);
  border-top-color: #374151;
}

[data-theme="dark"] .brand-logo-icon rect {
  fill: #3b82f6;
}

[data-theme="dark"] .question-card,
[data-theme="dark"] .chapter-card,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .neet-card,
[data-theme="dark"] .chapter-header-box,
[data-theme="dark"] .question-detail-card,
[data-theme="dark"] .hub-control-panel,
[data-theme="dark"] .filter-box,
[data-theme="dark"] .faq-item {
  background: #111827;
  border-color: #1f2937;
  color: #f9fafb;
}

[data-theme="dark"] .q-body-text,
[data-theme="dark"] .math-content {
  color: #f9fafb;
}

[data-theme="dark"] .katex {
  color: #f9fafb !important;
}

[data-theme="dark"] .q-source-pill,
[data-theme="dark"] .tag {
  background: #1f2937;
  color: #9ca3af;
  border-color: #374151;
}

[data-theme="dark"] .q-marks-pill,
[data-theme="dark"] .tag-marks {
  background: #1e3a8a33;
  color: #93c5fd;
  border-color: #1d4ed8;
}

[data-theme="dark"] .telemetry-status-bar {
  background: #111827;
  border-color: #1f2937;
}

[data-theme="dark"] .status-title {
  color: #9ca3af;
}

[data-theme="dark"] .status-value {
  color: #f9fafb;
}

[data-theme="dark"] .neet-meta,
[data-theme="dark"] .chapter-desc,
[data-theme="dark"] .section-desc,
[data-theme="dark"] .hero-editorial-lead {
  color: #9ca3af;
}

/* Practice hub controls in dark mode */
[data-theme="dark"] .filter-select,
[data-theme="dark"] .search-input,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

[data-theme="dark"] .sec-pill {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}
[data-theme="dark"] .sec-pill:hover,
[data-theme="dark"] .sec-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

[data-theme="dark"] .exam-tab-btn {
  background: #111827;
  border-color: #1f2937;
  color: #9ca3af;
}
[data-theme="dark"] .exam-tab-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}

/* NEET Options buttons in dark mode */
[data-theme="dark"] .neet-opt-btn {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}
[data-theme="dark"] .neet-opt-btn:hover {
  background: #374151;
  border-color: #60a5fa;
}
[data-theme="dark"] .neet-opt-btn.correct {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}
[data-theme="dark"] .neet-opt-btn.correct .opt-text,
[data-theme="dark"] .neet-opt-btn.correct .katex,
[data-theme="dark"] .neet-opt-btn.correct span {
  color: #a7f3d0 !important;
}
[data-theme="dark"] .neet-opt-btn.correct .opt-label {
  background: #065f46 !important;
  border-color: #10b981 !important;
  color: #ecfdf5 !important;
}
[data-theme="dark"] .neet-opt-btn.incorrect {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .neet-opt-btn.incorrect .opt-text,
[data-theme="dark"] .neet-opt-btn.incorrect .katex,
[data-theme="dark"] .neet-opt-btn.incorrect span {
  color: #fca5a5 !important;
}
[data-theme="dark"] .neet-opt-btn.incorrect .opt-label {
  background: #991b1b !important;
  border-color: #ef4444 !important;
  color: #fee2e2 !important;
}

/* Solution Box & Drawers in dark mode */
[data-theme="dark"] .solution-box {
  background: #111827 !important;
  border-color: #1f2937 !important;
  border-left-color: #3b82f6 !important;
}
[data-theme="dark"] .sol-drawer-inner {
  color: #f9fafb;
}
[data-theme="dark"] .sol-rubric-card {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}
[data-theme="dark"] .sol-rubric-desc {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .sol-step-text {
  color: #f3f4f6 !important;
}
[data-theme="dark"] .sol-action-btn {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}
[data-theme="dark"] .sol-action-btn:hover {
  background: #374151;
  color: #ffffff;
}
[data-theme="dark"] .btn-step-rubric {
  background: #1e3a8a33;
  border-color: #1d4ed8;
  color: #93c5fd;
}
[data-theme="dark"] .btn-step-rubric.has-cached {
  background: #064e3b33;
  border-color: #059669;
  color: #6ee7b7;
}

/* Breadcrumbs in dark mode */
[data-theme="dark"] .breadcrumbs,
[data-theme="dark"] .breadcrumbs a {
  color: #9ca3af;
}
[data-theme="dark"] .breadcrumbs span {
  color: #f9fafb;
}

[data-theme="dark"] .report-modal-card {
  background: #111827;
  border-color: #374151;
  color: #f9fafb;
}

[data-theme="dark"] .report-modal-title {
  color: #f9fafb;
}

[data-theme="dark"] .report-issue-label {
  background: #1f2937;
  border-color: #374151;
  color: #e5e7eb;
}

[data-theme="dark"] .report-notes-textarea {
  background: #090d16;
  border-color: #374151;
  color: #f9fafb;
}


/* Repeat Frequency Tier Badges (High Contrast Light/Dark) */
.q-repeat-pill.badge-tier-5 {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-weight: 800;
}
[data-theme="dark"] .q-repeat-pill.badge-tier-5 {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}
.q-repeat-pill.badge-tier-4 {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
  font-weight: 800;
}
[data-theme="dark"] .q-repeat-pill.badge-tier-4 {
  background: rgba(249, 115, 22, 0.2) !important;
  color: #fdba74 !important;
  border-color: rgba(249, 115, 22, 0.4) !important;
}
.q-repeat-pill.badge-tier-3 {
  background: #fefce8;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.25);
  font-weight: 800;
}
[data-theme="dark"] .q-repeat-pill.badge-tier-3 {
  background: rgba(234, 179, 8, 0.2) !important;
  color: #fde047 !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}
.q-repeat-pill.badge-tier-2 {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-weight: 800;
}
[data-theme="dark"] .q-repeat-pill.badge-tier-2 {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.4) !important;
}

/* Base NEET Options Grid & Button */
.neet-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
@media (max-width: 640px) {
  .neet-options-grid {
    grid-template-columns: 1fr;
  }
}
.neet-opt-btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
}
.neet-opt-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
}
:root:not([data-theme="dark"]) .neet-opt-btn.correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  font-weight: 600;
}
:root:not([data-theme="dark"]) .neet-opt-btn.incorrect {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}
.opt-label {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
}
[data-theme="dark"] .opt-label {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #9ca3af !important;
}
.opt-text {
  flex: 1;
}


/* Goal Switcher in Header */
.goal-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.goal-switcher-btn:hover {
  border-color: var(--accent);
  background: var(--surface-alt, #f4f4f5);
}
[data-theme="dark"] .goal-switcher-btn {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

/* Workspace Tabs Bar */
.workspace-tabs-bar {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px 0;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 10px;
  overflow-x: auto;
}
.ws-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ws-tab-btn:hover {
  color: var(--text);
  background: var(--surface);
}
.ws-tab-btn.active {
  color: var(--accent);
  background: var(--accent-light);
  border-bottom: 2px solid var(--accent);
}
[data-theme="dark"] .ws-tab-btn {
  color: #9ca3af;
}
[data-theme="dark"] .ws-tab-btn:hover {
  color: #ffffff;
  background: #1f2937;
}
[data-theme="dark"] .ws-tab-btn.active {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border-bottom-color: #60a5fa !important;
}

/* 2-Step Onboarding Modal */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.onboarding-overlay.open {
  display: flex;
}
.onboarding-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  position: relative;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .onboarding-modal-card {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}
@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.onboarding-step-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}
[data-theme="dark"] .onboarding-step-badge {
  color: #60a5fa !important;
}
.onboarding-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px 0;
}
[data-theme="dark"] .onboarding-title {
  color: #f9fafb !important;
}
.onboarding-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}
[data-theme="dark"] .onboarding-subtitle {
  color: #9ca3af !important;
}
.onboarding-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 560px) {
  .onboarding-cards-grid {
    grid-template-columns: 1fr;
  }
}
.onboarding-opt-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.onboarding-opt-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.onboarding-opt-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
[data-theme="dark"] .onboarding-opt-card {
  background: #1f2937 !important;
  border-color: #374151 !important;
}
[data-theme="dark"] .onboarding-opt-card:hover {
  border-color: #60a5fa !important;
}
[data-theme="dark"] .onboarding-opt-card.selected {
  background: rgba(59, 130, 246, 0.25) !important;
  border-color: #60a5fa !important;
}
.onboarding-opt-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
[data-theme="dark"] .onboarding-opt-title {
  color: #ffffff !important;
}
.onboarding-opt-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
[data-theme="dark"] .onboarding-opt-desc {
  color: #cbd5e1 !important;
}
.onboarding-subjects-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.onboarding-subj-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}
.onboarding-subj-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-1px);
}
[data-theme="dark"] .onboarding-subj-btn {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}
[data-theme="dark"] .onboarding-subj-btn:hover {
  background: #374151 !important;
  border-color: #60a5fa !important;
}
.onboarding-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
}
.onboarding-close-btn:hover {
  background: var(--border-light);
  color: var(--text);
}
[data-theme="dark"] .onboarding-close-btn {
  color: #9ca3af;
}
[data-theme="dark"] .onboarding-close-btn:hover {
  color: #ffffff;
}

/* Theme Switcher Button */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.15s ease;
}
.btn-theme-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

/* Bookmark Action Button */
.btn-bookmark-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-bookmark-action:hover {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}
.btn-bookmark-action.bookmarked {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

/* Mark as Done State */
.question-card.is-done {
  opacity: 0.6;
  border-left: 4px solid #10b981;
}

/* Timed Practice Mode & Floating Timer */
.timed-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  animation: pulse-soft 2s infinite ease-in-out;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.floating-timer-bar {
  display: none;
  position: fixed;
  top: 70px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
  z-index: 1000;
  align-items: center;
  gap: 12px;
}

.floating-timer-bar.active {
  display: flex;
}

.btn-timer-ctrl {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

/* FAQ Section Accordion Styles */
.faq-section {
  max-width: 900px;
  margin: 50px auto;
  padding: 0 20px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--surface-alt);
}

.faq-answer {
  display: none;
  padding: 0 20px 16px 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.2s ease;
  font-size: 12px;
  color: var(--text-muted);
}


/* UNIVERSAL HIGH-CONTRAST DARK MODE OVERRIDES */
[data-theme="dark"] {
  --bg: #090d16 !important;
  --surface: #111827 !important;
  --surface-alt: #1f2937 !important;
  --border: #374151 !important;
  --border-light: #1f2937 !important;
  --text: #f9fafb !important;
  --text-muted: #9ca3af !important;
}

[data-theme="dark"] body {
  background-color: #090d16 !important;
  color: #f9fafb !important;
}

[data-theme="dark"] .question-card,
[data-theme="dark"] .chapter-card,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .neet-card,
[data-theme="dark"] .chapter-header-box,
[data-theme="dark"] .hub-control-panel,
[data-theme="dark"] .filter-box,
[data-theme="dark"] .slider-control-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .solution-box {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

[data-theme="dark"] .filter-select,
[data-theme="dark"] #btnRepeatToggle {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

[data-theme="dark"] .sec-pill,
[data-theme="dark"] .subj-pill,
[data-theme="dark"] .exam-nav-btn {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #9ca3af !important;
}

[data-theme="dark"] .sec-pill:hover,
[data-theme="dark"] .subj-pill:hover,
[data-theme="dark"] .sec-pill.active,
[data-theme="dark"] .subj-pill.active,
[data-theme="dark"] .exam-nav-btn.active {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .q-body-text,
[data-theme="dark"] .math-content,
[data-theme="dark"] .katex {
  color: #f9fafb !important;
}

[data-theme="dark"] .q-source-pill,
[data-theme="dark"] .stream-count-badge {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
  border-color: #374151 !important;
}

[data-theme="dark"] .sol-rubric-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .sol-verified-card {
  background: #064e3b33 !important;
  border-color: #065f46 !important;
  color: #ecfdf5 !important;
}

[data-theme="dark"] .gateway-card {
  background: #111827 !important;
  border-color: #374151 !important;
}
[data-theme="dark"] .gateway-card.active {
  border-color: #3b82f6 !important;
  background: #111827 !important;
}
[data-theme="dark"] .gateway-subj-chip {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}
[data-theme="dark"] .gateway-subj-chip:hover {
  background: #374151 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

/* ==============================================================================
   UNIVERSAL GOAL SWITCHER, MOBILE DRAWER & 4-PILLAR PORTAL HUB
   ============================================================================== */

/* Goal Switcher Pill in Header */
.goal-switcher-container {
  position: relative;
  display: inline-block;
}

.goal-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.goal-switcher-btn:hover {
  border-color: var(--accent);
  background: var(--surface-alt);
}

.goal-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 200;
  padding: 6px;
  animation: dropdownFadeIn 0.15s ease-out;
}

.goal-dropdown-menu.show {
  display: block;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.goal-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

.goal-dropdown-item:hover,
.goal-dropdown-item.active {
  background: var(--surface-alt);
  color: var(--accent);
}

/* Nav Bookmark Badge */
.nav-bookmark-pill {
  display: none !important;
}

.nav-bookmark-pill:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.nav-bookmark-count {
  display: none;
  background: #f59e0b;
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 9999px;
  min-width: 18px;
  height: 18px;
  text-align: center;
  line-height: 16px;
}

/* Universal Menu Hamburger Button (Both Desktop & Mobile) */
.btn-hamburger {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-hamburger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

/* Ensure goal switcher and horizontal nav are never displayed in the site header */
.site-header .goal-switcher-container,
.nav-links .nav-link,
.nav-links .nav-link-desktop,
.nav-links .nav-bookmark-pill,
.nav-links .nav-cta-pill {
  display: none !important;
}

/* Universal Slide-Out Side Navigation Drawer (Desktop & Mobile) */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.active {
  display: block;
  opacity: 1;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: min(360px, 90vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 35px rgba(0,0,0,0.3);
  padding: 24px;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.btn-drawer-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.drawer-goal-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 20px;
}

.drawer-goal-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.drawer-goal-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.drawer-goal-btn {
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.drawer-goal-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease;
  background: var(--surface);
  border: 1px solid var(--border);
}

.drawer-nav-item:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

.drawer-nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.drawer-nav-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

/* 4-PILLAR PORTAL HUB GRID ON HOMEPAGE */
.portal-hub-section {
  max-width: 1280px;
  margin: 0 auto 60px auto;
  padding: 0 24px;
}

.portal-hub-header {
  text-align: center;
  margin-bottom: 40px;
}

.portal-hub-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--surface-alt);
  padding: 5px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.portal-hub-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 12px;
}

.portal-hub-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.workspace-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 840px) {
  .workspace-portal-grid {
    grid-template-columns: 1fr;
  }
}

.portal-pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.portal-pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 35px rgba(0,0,0,0.08);
}

.portal-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 18px;
  width: fit-content;
}

.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-emerald { background: #d1fae5; color: #065f46; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

[data-theme="dark"] .badge-blue { background: #1e3a8a; color: #93c5fd; }
[data-theme="dark"] .badge-amber { background: #78350f; color: #fde68a; }
[data-theme="dark"] .badge-emerald { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-purple { background: #4c1d95; color: #c4b5fd; }

.portal-card-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-card-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.portal-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.portal-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.portal-action-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: var(--text);
  color: var(--surface);
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
}

.portal-pillar-card:hover .portal-action-btn {
  background: var(--accent);
  color: #ffffff;
}

/* ==============================================================================
   RECURRENCE INTELLIGENCE LEADERBOARD BENTO
   ============================================================================== */
.recurrence-bento-section {
  max-width: 1280px;
  margin: 50px auto;
  padding: 0 24px;
}

.bento-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.bento-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 8px;
}

[data-theme="dark"] .bento-eyebrow {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

.bento-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px 0;
}

.bento-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

.bento-header-center {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 36px auto;
}

.bento-track-switcher-centered {
  display: inline-flex;
  gap: 8px;
  background: var(--surface-alt);
  padding: 5px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

.bento-track-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 9px 20px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bento-track-btn:hover {
  color: var(--text);
}

.bento-track-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.track-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--border-light);
  color: var(--text-muted);
}

.bento-track-btn.active .track-badge {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

[data-theme="dark"] .bento-track-btn.active {
  background: #1f2937;
  color: #f9fafb;
}

[data-theme="dark"] .bento-track-btn.active .track-badge {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

.bento-repeat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.bento-repeat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.bento-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bento-freq-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.bento-freq-badge.blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .bento-freq-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .bento-freq-badge.blue {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.4);
}

.bento-subj-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.bento-concept-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.bento-question-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  background: var(--surface-alt);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
}

.bento-years-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.bento-years-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 2px;
}

.bento-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="dark"] .bento-chip {
  background: #1f2937;
  border-color: #374151;
  color: #e2e8f0;
}

.bento-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.bento-card-action:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.card-action-bar-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-card-action.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .btn-card-action .btn-action-label {
    display: none;
  }
  .btn-card-action {
    padding: 8px 10px;
    font-size: 14px;
  }
}


[data-theme="dark"] .card-action-bar-compact {
  border-top-color: #1f2937 !important;
}

[data-theme="dark"] .btn-card-action {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f3f4f6 !important;
}

[data-theme="dark"] .btn-card-action:hover {
  background: #374151 !important;
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .btn-card-action.active {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
