/* ==========================================================================
   Agykutatás & Olvasás - Modern Dinamikus Olvasási Felület Stylesheet
   Tudományos, letisztult, elegáns megjelenés (Emoji-mentes)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --- CSS Variables & Theme Definitions --- */
:root {
  /* Color Palette - Light Theme (Warm Editorial / Papír) */
  --bg-primary: #FDFBF7;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F8F5EE;
  --bg-subtle: #F1ECE1;
  --border-color: #E6DFD3;
  --border-color-hover: #CBD5E1;

  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-accent: #0284C7;

  --brand-primary: #0F172A;
  --brand-accent: #1D4ED8;
  --brand-accent-light: #EFF6FF;
  --brand-gradient: linear-gradient(135deg, #0F172A 0%, #1D4ED8 100%);
  
  --highlight-bg: #FEF08A;
  --highlight-text: #854D0E;
  
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --glass-bg: rgba(253, 251, 247, 0.92);

  /* Typography Defaults */
  --font-body: 'Lora', Georgia, serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  --base-font-size: 1.125rem; /* 18px */
  --line-height-body: 1.85;
  --content-max-width: 820px;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sepia Theme (E-Könyv / Nosztalgia) */
[data-theme="sepia"] {
  --bg-primary: #F4ECD8;
  --bg-surface: #FAF4E8;
  --bg-surface-elevated: #EDE3CD;
  --bg-subtle: #E2D5BB;
  --border-color: #D8C7A5;
  --border-color-hover: #BCA984;

  --text-primary: #372E21;
  --text-secondary: #5C4D38;
  --text-muted: #7D6B52;
  --text-accent: #9A3412;

  --brand-primary: #432818;
  --brand-accent: #C2410C;
  --brand-accent-light: #FBF0EA;
  --brand-gradient: linear-gradient(135deg, #432818 0%, #EA580C 100%);
  
  --highlight-bg: #FDE047;
  --highlight-text: #713F12;
  
  --card-shadow: 0 4px 20px -2px rgba(67, 40, 24, 0.07);
  --card-shadow-hover: 0 12px 30px -4px rgba(67, 40, 24, 0.12);
  --glass-bg: rgba(244, 236, 216, 0.92);
}

/* Dark Theme (Modern Éjszakai) */
[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-surface: #1E293B;
  --bg-surface-elevated: #334155;
  --bg-subtle: #1E293B;
  --border-color: #334155;
  --border-color-hover: #475569;

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-accent: #38BDF8;

  --brand-primary: #38BDF8;
  --brand-accent: #38BDF8;
  --brand-accent-light: rgba(56, 189, 248, 0.12);
  --brand-gradient: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
  
  --highlight-bg: #854D0E;
  --highlight-text: #FEF08A;
  
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(15, 23, 42, 0.92);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--base-font-size);
  line-height: var(--line-height-body);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Reading Progress Bar --- */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1000;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brand-accent);
  transition: width 0.1s ease-out;
}

/* --- Top Header Navigation Bar --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--brand-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

/* View Switcher Pills */
.view-switcher {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.view-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.view-btn:hover {
  color: var(--text-primary);
}

.view-btn.active {
  background: var(--bg-surface);
  color: var(--brand-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Controls (Theme, Font size, Font type) */
.controls-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.control-btn {
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.control-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.theme-options {
  display: flex;
  gap: 3px;
  background: var(--bg-surface-elevated);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.theme-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: transform var(--transition-fast);
}

.theme-btn[data-set-theme="light"] { background: #FDFBF7; color: #1E293B; border: 1px solid #E6DFD3; }
.theme-btn[data-set-theme="sepia"] { background: #F4ECD8; color: #432818; border: 1px solid #D8C7A5; }
.theme-btn[data-set-theme="dark"] { background: #0F172A; color: #F8FAFC; border: 1px solid #334155; }

.theme-btn:hover { transform: scale(1.08); }
.theme-btn.active { outline: 2px solid var(--brand-accent); }

/* --- Hero Section --- */
.hero-header {
  padding: 3.5rem 1.5rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--brand-accent-light);
  color: var(--brand-accent);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  line-height: 1.15;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: var(--base-font-size);
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 2rem;
  font-weight: 400;
  font-style: italic;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-left: 3px solid var(--brand-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--card-shadow);
  text-align: left;
}

.meta-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  flex-wrap: wrap;
}

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

/* --- Container & Main Layout --- */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}

/* View Mode 1: Continuous Linear View */
.linear-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

@media (max-width: 992px) {
  .linear-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Floating Table of Contents Sidebar */
.toc-sidebar {
  position: sticky;
  top: 5.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.toc-link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: all var(--transition-fast);
}

.toc-link:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.toc-link.active {
  background: var(--brand-accent-light);
  color: var(--brand-accent);
  font-weight: 600;
  border-left: 3px solid var(--brand-accent);
}

/* Main Content Column */
.article-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.topic-section {
  margin-bottom: 4rem;
  scroll-margin-top: 6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.topic-section:hover {
  box-shadow: var(--card-shadow-hover);
}

.topic-header {
  margin-bottom: 1.5rem;
}

.topic-number {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
  display: inline-block;
}

.topic-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Key Takeaway Box */
.takeaway-box {
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--brand-accent);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2rem;
  font-family: var(--font-ui);
  font-size: calc(var(--base-font-size) * 0.92);
  line-height: 1.6;
  color: var(--text-secondary);
}

.takeaway-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
  margin-bottom: 0.3rem;
}

/* Topic Image Container */
.topic-media-wrapper {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.topic-media-wrapper img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.topic-media-wrapper:hover img {
  transform: scale(1.02);
}

.media-zoom-hint {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.topic-media-wrapper:hover .media-zoom-hint {
  opacity: 1;
}

/* Paragraphs & Text Content */
.paragraph-text {
  margin-bottom: 1.5rem;
  font-size: var(--base-font-size);
  line-height: var(--line-height-body);
  color: var(--text-primary);
}

.paragraph-text:last-of-type {
  margin-bottom: 2rem;
}

/* Interactive Glossary Terms */
.glossary-term {
  border-bottom: 1.5px dashed var(--brand-accent);
  color: var(--text-primary);
  font-weight: 600;
  cursor: help;
  position: relative;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  padding: 0 2px;
  border-radius: 2px;
}

.glossary-term:hover {
  background-color: var(--brand-accent-light);
  color: var(--brand-accent);
}

/* Academic Citations Footer inside section */
.citations-box {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-ui);
  font-size: 0.825rem;
  color: var(--text-muted);
}

.citations-heading {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.citation-item {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.citation-link {
  display: inline-block;
  font-weight: 600;
  margin-left: 0.3rem;
  padding: 0.1rem 0.4rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
}

/* --- View Mode 2: Cards / Topic Focus Mode --- */
.cards-layout {
  display: none;
  max-width: 920px;
  margin: 0 auto;
}

.cards-layout.active-view {
  display: block;
}

.linear-layout.hidden-view {
  display: none;
}

.cards-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-step-indicator {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-accent);
}

.card-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.card-nav-btn {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.card-nav-btn:hover:not(:disabled) {
  background: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}

.card-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Topic Select Pills */
.topic-pills-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}

.topic-pill {
  flex: 0 0 auto;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.topic-pill.active {
  background: var(--brand-accent);
  color: #ffffff;
  border-color: var(--brand-accent);
}

/* --- View Mode 3: Interactive Cognitive Matrix / Mindmap --- */
.matrix-layout {
  display: none;
  max-width: 1050px;
  margin: 0 auto;
}

.matrix-layout.active-view {
  display: block;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.matrix-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.matrix-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.matrix-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.matrix-badge-num {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--brand-accent-light);
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--font-ui);
}

.matrix-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.matrix-card-body {
  font-size: calc(var(--base-font-size) * 0.9);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.matrix-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.matrix-tag {
  font-family: var(--font-ui);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

/* --- Structured Lexicon Section (Kislexikon) --- */
.lexicon-container {
  max-width: var(--content-max-width);
  margin: 4.5rem auto 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  scroll-margin-top: 6rem;
}

.lexicon-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.lexicon-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--brand-accent-light);
  color: var(--brand-accent);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
}

.lexicon-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.lexicon-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.lexicon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.lexicon-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  transition: border-color var(--transition-fast);
}

.lexicon-item:hover {
  border-color: var(--border-color-hover);
}

.lexicon-term-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
}

.lexicon-term-desc {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --- Lightbox Modal --- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  color: #F8FAFC;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
}

/* --- Popover Glossary Modal/Tooltip --- */
.glossary-popover {
  position: absolute;
  z-index: 1100;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--card-shadow-hover);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.glossary-popover.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.glossary-popover-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 0.35rem;
}

.glossary-popover-desc {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* --- Footer --- */
.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  background: var(--bg-surface);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* --- Utility Classes & Animations --- */
.font-sans-mode {
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif !important;
}

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

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Print Optimization */
@media print {
  .site-header, #progress-container, .view-switcher, .controls-group, .media-zoom-hint, .lexicon-container {
    display: none !important;
  }
  .linear-layout {
    display: block !important;
  }
  .topic-section {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
