/* Edara-EG Modern Industrial Engineering Knowledge Platform */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --primary: #0f3d5e;
  --primary-light: #e0f2fe;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --crimson: #b91c1c;
  --emerald: #047857;
  --amber: #b45309;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-alt: #1e293b;
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-light: rgba(56, 189, 248, 0.14);
  --accent: #0ea5e9;
  --accent-hover: #38bdf8;
  --crimson: #f87171;
  --emerald: #34d399;
  --amber: #fbbf24;
  --border: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16.5px;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #10b981);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* Top Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f3d5e, #0284c7);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-alt);
}

.mobile-menu-btn {
  display: none;
}

/* Mobile Drawer */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 940;
}

.mobile-backdrop.open {
  display: block;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -310px;
  width: 295px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 950;
  padding: 20px;
  overflow-y: auto;
  transition: right 0.28s ease;
  box-shadow: var(--shadow-lg);
}

.mobile-drawer.open {
  right: 0;
}

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

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-nav a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.drawer-nav a:hover, .drawer-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Hero Banner (Homepage) */
.hero-section {
  background: linear-gradient(135deg, #0b2942 0%, #134e78 55%, #0e7490 100%);
  color: #ffffff;
  padding: 52px 0 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 32px;
  align-items: center;
}

.quran-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.88rem;
  color: #e0f2fe;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 14px;
}

.hero-lead {
  font-size: 1.06rem;
  color: #e2e8f0;
  margin: 0 0 24px;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #0f3d5e;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}

.btn-primary:hover {
  background: #f0f9ff;
  color: #0a2a42;
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.hero-quran-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 26px;
  backdrop-filter: blur(8px);
}

.hero-quran-card .bismillah {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fde68a;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.hero-quran-card .ayah {
  font-size: 1.08rem;
  line-height: 1.95;
  color: #ffffff;
  margin: 0 0 10px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #7dd3fc;
}

.stat-lbl {
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* Section Headings & Cards */
.section-block {
  padding: 44px 0;
}

.section-header {
  margin-bottom: 26px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--ink);
}

.section-header p {
  margin: 0;
  color: var(--ink-muted);
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.track-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.track-icon {
  font-size: 1.65rem;
}

.track-count {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 999px;
}

.track-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 8px;
}

.track-card h3 a {
  color: var(--ink);
}

.track-card h3 a:hover {
  color: var(--accent);
}

.track-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 16px;
  line-height: 1.65;
}

.track-links {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-links li a {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-links li a::before {
  content: "←";
  color: var(--accent);
  font-weight: 700;
}

.track-links li a:hover {
  color: var(--accent);
}

/* Concepts Grid (18 Core Topics) */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.concept-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.93rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.concept-chip:hover {
  border-color: var(--accent);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
}

.concept-num {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Breadcrumbs & Article Page Layout */
.page-wrapper {
  padding: 26px 0 56px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.breadcrumbs a {
  color: var(--ink-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.article-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 38px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--ink);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.meta-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Article Typography & Sanitized Content */
.article-body {
  color: var(--ink-secondary);
  font-size: 1.03rem;
  line-height: 1.92;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: 86px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 24px 0 10px;
  scroll-margin-top: 86px;
}

.article-body p {
  margin: 0 0 15px;
}

.article-body p.bullet-item {
  padding-right: 6px;
}

.bullet-glyph {
  color: var(--accent);
  font-weight: 700;
}

.accent-crimson {
  color: var(--crimson);
  font-weight: 600;
}

.accent-emerald {
  color: var(--emerald);
  font-weight: 600;
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

.article-body blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: var(--surface-alt);
  border-right: 4px solid var(--accent);
  border-radius: var(--radius-sm);
}

.article-body ul, .article-body ol {
  margin: 0 0 18px;
  padding-right: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Diagram Figures & Lightbox */
.diagram-figure {
  margin: 26px auto;
  padding: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.diagram-figure img {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 6px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diagram-figure img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-md);
}

.diagram-figure figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Topic Pills Grid (e.g. Tweets Jump Grid) */
.topic-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
  padding: 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.topic-pill {
  display: inline-block;
  padding: 6px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none !important;
}

.topic-pill:hover {
  border-color: var(--accent);
  background: var(--primary-light);
  color: var(--primary);
}

/* Empty Notice Card */
.empty-notice-card {
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
}

.empty-notice-card .notice-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

/* Prev / Next Lesson Footer */
.lesson-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.lesson-nav-card {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.lesson-nav-card:hover {
  border-color: var(--accent);
  background: var(--primary-light);
}

.lesson-nav-card.next {
  text-align: left;
}

.lesson-nav-dir {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.lesson-nav-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink);
}

/* Sticky Sidebar */
.article-sidebar {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.sidebar-list li a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.sidebar-list li a:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.sidebar-list li a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

/* Author Card */
.author-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Calculators UI */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.calc-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: var(--primary);
  border: 0;
  padding: 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink-secondary);
}

.form-group input {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.96rem;
}

.calc-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.96rem;
}

/* Modals (Search & Lightbox) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1100;
  padding: 24px 16px;
  overflow-y: auto;
}

.modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.search-box-modal {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 40px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.search-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 12px;
}

.search-item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border: 1px solid transparent;
}

.search-item:hover {
  background: var(--surface-alt);
  border-color: var(--border);
}

.search-item-cat {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
}

.search-item-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.98rem;
}

.search-item-snippet {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-top: 3px;
}

.lightbox-content {
  position: relative;
  max-width: 94vw;
  margin: auto;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-content img {
  display: block;
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #0f172a;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 0 28px;
  margin-top: 40px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.83rem;
}

/* Responsive Breakpoints */
@media (max-width: 1060px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .article-main {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }
  .lesson-nav {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hide-mobile {
    display: none;
  }
}

@media print {
  .site-header, .article-sidebar, .lesson-nav, .site-footer, #reading-progress, .no-print {
    display: none !important;
  }
  .article-layout {
    display: block;
  }
  .article-main {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
}
