/* ============================================================
   Sadhisu — Preview pages (quiz.html / notes.html)
   Matches existing site design system (index.html)
   Mobile-first: 320px base → 480px → 768px → 1024px
   ============================================================ */

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --text: #1E1B4B;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --highlight-bg: #FFFBEB;
  --highlight-border: #F59E0B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', 'Noto Sans Kannada', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Outfit', 'Noto Sans Kannada', sans-serif; }

/* Kannada mode: prefer Noto Sans Kannada, slightly relax line-height */
body.lang-kn,
body.lang-kn h1, body.lang-kn h2, body.lang-kn h3, body.lang-kn h4 {
  font-family: 'Noto Sans Kannada', 'DM Sans', sans-serif;
}
body.lang-kn { line-height: 1.7; }

/* ---------- Navigation (matches index.html) ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.4rem; color: var(--primary);
  text-decoration: none;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 0.9rem; font-weight: 500; transition: color 0.2s;
  display: inline-flex; align-items: center; min-height: 44px;
}
.nav-links a:hover { color: var(--primary); }

/* Language toggle button */
.lang-toggle {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  color: var(--primary);
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 50px;
  padding: 0.25rem 0.7rem;
  min-height: 32px; min-width: 32px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.lang-toggle:hover { background: var(--primary); color: #fff; }
.lang-toggle:active { transform: scale(0.97); }
.lang-toggle:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

/* ---------- Page header ---------- */
.page-header {
  padding: 6.5rem 1.25rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(79,70,229,0.05) 0%, transparent 100%);
}
.page-header h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.page-header p { color: var(--text-secondary); font-size: 0.95rem; }
.back-link {
  display: inline-flex; align-items: center;
  min-height: 44px;
  margin-top: 0.5rem;
  color: var(--primary); text-decoration: none;
  font-size: 0.88rem; font-weight: 600;
  transition: color 0.2s;
}
.back-link:hover { color: var(--primary-dark); }

/* ---------- Shared containers ---------- */
.preview-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

/* ============================================================
   CONTENT PROTECTION
   Deters casual copying of study content: blocks text selection,
   the iOS long-press callout, and image drag.

   This is a speed bump, NOT security — the content is public at
   preview.sadhisu.com, and devtools / view-source / JS-off all
   bypass it. Deliberately scoped to study content only: nav,
   footer, links and email addresses stay selectable so users can
   still copy the support address off any page.

   user-select does not affect screen readers, so the content
   remains accessible to assistive tech.
   ============================================================ */
.notes-title,
.notes-body,
.quiz-card,
.quiz-result,
.page-locked {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  /* Suppresses the iOS long-press "Copy / Look Up" callout */
  -webkit-touch-callout: none;
  /* Stops the blue flash on long-press in Android Chrome */
  -webkit-tap-highlight-color: transparent;
}

/* Buttons inside protected regions must stay interactive. */
.notes-body button,
.quiz-card button,
.quiz-result button,
.page-locked a {
  -webkit-touch-callout: default;
}

/* Images/diagrams: block the drag-to-save gesture. */
.notes-body img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.loading-msg, .error-msg {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}
.error-msg { color: var(--danger); }

/* ============================================================
   QUIZ
   ============================================================ */

/* Exam picker */
.exam-picker { padding: 0.5rem 0; }
.exam-picker-title {
  font-size: 1.2rem; font-weight: 800;
  text-align: center;
  margin-bottom: 1.25rem;
}
.exam-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.exam-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  min-height: 44px;
  padding: 1.4rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.exam-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.12);
}
.exam-card:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.exam-card:active { transform: translateY(-1px); }
.exam-icon { font-size: 1.8rem; line-height: 1; }
.exam-code {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem; font-weight: 800;
  color: var(--primary);
}
.exam-name { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

.quiz-badges { display: inline-flex; gap: 0.4rem; align-items: center; }
.quiz-exam-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
}

.quiz-progress-text {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.quiz-subject {
  display: inline-block;
  background: #EEF2FF;
  color: var(--primary);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 6px;
  transition: width 0.4s ease;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.quiz-question {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.quiz-year {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.quiz-options { display: grid; gap: 0.7rem; }

.quiz-option {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem; font-weight: 500;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.quiz-option .opt-letter {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-secondary);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--primary-light);
  background: #EEF2FF;
}
.quiz-option:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.quiz-option:disabled { cursor: default; opacity: 0.9; }

.quiz-option.correct {
  background: var(--success-bg);
  border-color: var(--success);
  color: #065F46;
  font-weight: 700;
}
.quiz-option.correct .opt-letter { background: var(--success); border-color: var(--success); color: #fff; }
.quiz-option.wrong {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: #991B1B;
  font-weight: 700;
}
.quiz-option.wrong .opt-letter { background: var(--danger); border-color: var(--danger); color: #fff; }

.quiz-feedback {
  margin-top: 1.1rem;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  animation: fadeInUp 0.3s ease;
}
.quiz-feedback.is-correct { background: var(--success-bg); border: 1px solid var(--success-border); }
.quiz-feedback.is-wrong { background: var(--danger-bg); border: 1px solid var(--danger-border); }
.quiz-feedback .feedback-verdict {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 800; font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.quiz-feedback.is-correct .feedback-verdict { color: #065F46; }
.quiz-feedback.is-wrong .feedback-verdict { color: #991B1B; }
.quiz-feedback .feedback-label { font-weight: 700; }

.quiz-actions { margin-top: 1.25rem; text-align: right; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--primary); color: #fff;
  min-height: 48px;
  padding: 0.75rem 1.8rem;
  border: none; border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79,70,229,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(79,70,229,0.35); }
.btn-primary:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--surface); color: var(--primary);
  min-height: 48px;
  padding: 0.75rem 1.8rem;
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn-outline:hover { background: #EEF2FF; transform: translateY(-2px); }
.btn-outline:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }

/* Final score screen */
.quiz-result { text-align: center; padding: 2rem 1rem; }
.quiz-result .score-circle {
  width: 120px; height: 120px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(79,70,229,0.3);
}
.quiz-result .score-num {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-size: 1.9rem; font-weight: 800; line-height: 1;
}
.quiz-result .score-label { font-size: 0.72rem; opacity: 0.85; margin-top: 0.3rem; }
.quiz-result h2 {
  font-size: 1.3rem; font-weight: 800; margin-bottom: 0.4rem;
}
.quiz-result .result-msg { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.5rem; }
.quiz-result .result-actions {
  display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch;
}
.result-cta {
  margin-top: 1.75rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  color: #fff;
}
.result-cta p { font-weight: 700; font-size: 1rem; margin-bottom: 0.9rem; }
.result-cta .btn-primary {
  background: #fff; color: var(--primary-dark);
  box-shadow: none;
}

/* ============================================================
   NOTES
   ============================================================ */

/* Subject picker — same card grid as the exam picker */
.subject-picker { padding: 0.5rem 0; }
.subject-picker-title {
  font-size: 1.2rem; font-weight: 800;
  text-align: center;
  margin-bottom: 1.25rem;
}
.subject-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.subject-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  min-height: 44px;
  padding: 1.4rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-family: inherit;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.subject-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.12);
}
.subject-card:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.subject-card:active { transform: translateY(-1px); }
.subject-icon { font-size: 1.8rem; line-height: 1; }
.subject-name {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-size: 1.02rem; font-weight: 800;
  color: var(--primary);
}
.subject-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

/* Topic list — one row per topic, with its page count */
.topic-list { padding: 0.5rem 0; }
.topic-card {
  display: flex; align-items: center; gap: 0.9rem;
  width: 100%;
  min-height: 44px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.7rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,70,229,0.12);
}
.topic-card:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.topic-number {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--primary-dark);
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 0.85rem;
}
.topic-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.15rem; }
.topic-name {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  line-height: 1.4;
}
.topic-pages { font-size: 0.78rem; color: var(--text-secondary); }
.topic-chevron { flex: 0 0 auto; font-size: 1.4rem; color: var(--text-secondary); line-height: 1; }

/* Toolbar above a loaded chapter */
.notes-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.6rem;
  margin-bottom: 1rem;
}
.btn-outline.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.error-actions { display: flex; justify-content: center; margin-top: 1rem; }
.notes-badges { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.subject-badge, .topic-badge {
  display: inline-block;
  background: #EEF2FF;
  color: var(--primary-dark);
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
}
.topic-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}

/* Page pager */
.notes-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}
.pager-btn {
  min-width: 44px; min-height: 44px;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--primary); background: #EEF2FF; }
.pager-btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-btn.is-locked:not(:disabled)::after { content: ' 🔒'; font-size: 0.8rem; }
.pager-count {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Locked page (page 2+ for non-app readers) */
.page-locked {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.page-locked-icon { font-size: 2.5rem; line-height: 1; margin-bottom: 0.75rem; }
.page-locked-title {
  font-size: 1.15rem; font-weight: 800;
  margin-bottom: 0.4rem;
}
.page-locked-msg {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* CTA at the end of a free page */
.notes-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
  text-align: center;
}
.notes-cta .fade-msg { margin-bottom: 0.9rem; }

.notes-title {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.notes-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.notes-body h2 {
  font-size: 1.25rem; font-weight: 800;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #EEF2FF;
}
.notes-body h3 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--primary-dark);
  margin: 1.4rem 0 0.6rem;
}
.notes-body h2:first-child, .notes-body h3:first-child { margin-top: 0; }

.notes-body p {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 0.9rem;
}
.notes-body strong { color: var(--primary-dark); font-weight: 700; }
.notes-body u { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* List blocks — one bordered card per item, as in the app */
.notes-list { list-style: none; margin: 1.1rem 0; }
.notes-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.notes-list li:last-child { margin-bottom: 0; }
ol.notes-list { counter-reset: notes-li; }
ol.notes-list li { counter-increment: notes-li; }
ol.notes-list li::before {
  content: counter(notes-li) '. ';
  font-weight: 700;
  color: var(--primary-dark);
}

/* Table blocks — scroll horizontally instead of breaking the page */
.notes-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.notes-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.85rem;
}
.notes-table th {
  background: var(--primary);
  color: #fff;
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 0.85rem;
}
.notes-table td {
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
  color: var(--text);
  vertical-align: top;
}
.notes-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }
.notes-table tr.is-header-row { background: #EEF2FF; font-weight: 600; }

/* Info cards — app schema: data.cards[] with icon, optional stat, colour */
.info-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin: 1.4rem 0;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--info-card-color, var(--primary));
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.info-card--blue   { --info-card-color: #3B82F6; }
.info-card--green  { --info-card-color: #16A34A; }
.info-card--purple { --info-card-color: #8B5CF6; }
.info-card--orange { --info-card-color: #F97316; }
.info-card--red    { --info-card-color: #EF4444; }

.info-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.info-card-icon { font-size: 1.65rem; line-height: 1; }
.info-card-stat { text-align: right; }
.info-card-stat .stat-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  color: var(--info-card-color, var(--primary));
}
.info-card-stat .stat-label { font-size: 0.7rem; opacity: 0.75; }

.info-card .info-card-title {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 700; font-size: 0.97rem;
  color: var(--info-card-color, var(--primary-dark));
  margin-bottom: 0.35rem;
}
.info-card .info-card-body {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

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

.fade-msg {
  font-family: 'Outfit', 'Noto Sans Kannada', sans-serif;
  font-weight: 700; font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
  padding: 0 1.25rem;
}

/* ---------- Footer (matches index.html) ---------- */
footer {
  padding: 2.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-links {
  display: flex; justify-content: center; gap: 1.25rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 0.85rem; font-weight: 500; transition: color 0.2s;
  display: inline-flex; align-items: center; min-height: 44px;
}
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.78rem; color: #9CA3AF; }

/* ---------- Animations ---------- */
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeIn 0.6s forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade-in { opacity: 1; transform: none; }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 480px) {
  nav { padding: 0.75rem 1.5rem; }
  .exam-grid, .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-card, .notes-body { padding: 1.75rem 1.5rem; }
  .quiz-result .result-actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 768px) {
  .preview-container { padding: 1.5rem 1.5rem 4rem; }
  .quiz-question { font-size: 1.2rem; }
  .quiz-card, .notes-body { padding: 2rem 2rem; }
  .notes-body p { font-size: 0.97rem; }
  .footer-links { gap: 2rem; }
}

@media (min-width: 1024px) {
  .preview-container { max-width: 720px; }
}
