/* ============================================================
   JELITAPROSTO - Design System
   Kompendium zdrowia jelit i trawienia | zdrowie/wellness
   Paleta: świeża zieleń (natura, zdrowie, jelita) + głęboka
   butelkowa zieleń (zaufanie medyczne) + bursztyn (ciepło,
   jedzenie, ostrzeżenia) na szałwiowym kremie.
   Typografia: Lora (display) + Karla (body).
   WCAG 2.1 AA: body 17px, kontrast min 4.5:1, focus-visible.
   ============================================================ */

/* --- CSS VARIABLES --- */
:root {
  /* Light - szałwiowy krem + butelkowa zieleń + bursztyn */
  --bg: #f3f6ef;
  --bg-surface: #fbfcf7;
  --bg-card: #ffffff;
  --bg-sidebar: #e9efe4;
  --text: #1c2b22;
  --text-secondary: #42544a;
  --text-muted: #5c6b62;
  --accent: #1d5c45;
  --accent-hover: #174a37;
  --accent-soft: #e2efe4;
  --accent-soft-border: #c4ddc8;
  --leaf: #2f7a52;
  --amber: #9a6a12;
  --amber-hover: #7d550e;
  --amber-btn-text: #ffffff;
  --amber-soft: #f6ecd6;
  --amber-soft-border: #e6d5a8;
  --warn-bg: #fdf0ec;
  --warn-border: #e8b4a5;
  --warn-text: #a33a2a;
  --border: #dbe3d6;
  --border-light: #e8ede2;
  --code-bg: #eef2e9;
  --header-bg: rgba(243, 246, 239, .88);
  --hero-bg: linear-gradient(140deg, #0f2e21 0%, #1d5c45 55%, #267054 100%);
  --hero-text: #f4f7f0;
  --hero-muted: #cfe0d2;
  --shadow-sm: 0 1px 2px rgba(23,36,27,.05);
  --shadow-md: 0 4px 20px rgba(23,36,27,.08);
  --shadow-lg: 0 14px 44px rgba(23,36,27,.14);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-full: 9999px;
  --nav-width: 310px;
  --header-height: 62px;
  --content-max: 780px;
  --font-body: 'Karla', 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Lora', Georgia, serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1410;
    --bg-surface: #121b15;
    --bg-card: #162219;
    --bg-sidebar: #101811;
    --text: #e6ece3;
    --text-secondary: #b7c4b9;
    --text-muted: #93a395;
    --accent: #5ecf9a;
    --accent-hover: #7bdcaa;
    --accent-soft: #122a1e;
    --accent-soft-border: #1f4634;
    --leaf: #6fd6a4;
    --amber: #e0b45c;
    --amber-hover: #ecc878;
    --amber-btn-text: #1d1502;
    --amber-soft: #2a2110;
    --amber-soft-border: #4a3a17;
    --warn-bg: #2a1612;
    --warn-border: #8f4a3c;
    --warn-text: #f0a090;
    --border: #24332a;
    --border-light: #1c2921;
    --code-bg: #18221b;
    --header-bg: rgba(13, 20, 16, .92);
    --hero-bg: linear-gradient(140deg, #08130c 0%, #0f2b1c 55%, #133726 100%);
    --hero-text: #eef1ea;
    --hero-muted: #a7b5a8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 14px 44px rgba(0,0,0,.5);
  }
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 620px 420px at 88% -6%, rgba(47,122,82,.10), transparent 62%),
    radial-gradient(ellipse 720px 520px at -8% 106%, rgba(154,106,18,.08), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); color: var(--text); }

/* --- SKIP LINK --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- HEADER --- */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-soft-border), transparent);
  opacity: .7;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark { font-size: 1.35rem; line-height: 1; filter: saturate(.9); }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.42rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
.brand-accent { color: var(--accent); }
@media (prefers-color-scheme: dark) { .brand-accent { color: var(--accent); } }

.mobile-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 1.2rem; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.mobile-menu-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.mobile-menu-btn:active { transform: scale(.96); }

.header-search { position: relative; margin-left: auto; width: min(340px, 42vw); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.05rem; pointer-events: none; }
#search-input {
  width: 100%; padding: 9px 14px 9px 36px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-card); color: var(--text);
  font-family: var(--font-body); font-size: .92rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
#search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#search-input::placeholder { color: var(--text-muted); }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 120;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 380px; overflow-y: auto;
}
.search-results a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: background .15s var(--ease);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--accent-soft); }
.search-results .sr-title { font-weight: 600; display: block; font-size: .9rem; }
.search-results .sr-excerpt {
  display: block; font-size: .78rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-results .sr-empty { padding: 12px; color: var(--text-muted); font-size: .9rem; }

/* --- SIDEBAR --- */
.sidebar {
  position: fixed; top: var(--header-height); left: 0; bottom: 0; z-index: 90;
  width: var(--nav-width); overflow-y: auto;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 18px 14px 40px;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none;
  font-size: .9rem; font-weight: 500; line-height: 1.4;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.sidebar-nav a .nav-icon { font-size: .95rem; flex: 0 0 auto; opacity: .9; }
.sidebar-nav a:hover { background: var(--accent-soft); color: var(--text); transform: translateX(2px); }
.sidebar-nav a.active {
  background: var(--accent); color: #fff; font-weight: 600;
}
.sidebar-nav a.active .nav-icon { opacity: 1; }
.nav-section {
  font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); padding: 16px 10px 5px;
}
.nav-section:first-child { margin-top: 4px; }
.nav-home { margin-bottom: 4px; }

/* --- MAIN LAYOUT --- */
.main-content {
  margin-left: var(--nav-width);
  padding: calc(var(--header-height) + 28px) 34px 60px;
  min-height: 100vh;
}
.page-wrap { max-width: var(--content-max); margin: 0 auto; }

/* --- PAGE TRANSITION --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-wrap > * { animation: fadeUp .28s var(--ease) both; }

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg);
  border-radius: var(--radius);
  padding: 52px 48px 40px;
  margin-bottom: 44px;
  color: var(--hero-text);
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: ''; position: absolute; top: -140px; right: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94,207,154,.22), transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--hero-muted); margin-bottom: 14px;
  border: 1px solid rgba(207,224,210,.35); border-radius: var(--radius-full);
  padding: 5px 14px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.7rem; line-height: 1.12; font-weight: 700;
  text-wrap: balance; letter-spacing: -.01em;
  margin-bottom: 14px; max-width: 640px;
}
.hero p.lead {
  font-size: 1.05rem; line-height: 1.65;
  color: var(--hero-muted); max-width: 560px; margin-bottom: 24px;
}
.hero-cta { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-full);
  font-family: var(--font-body); font-size: .92rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-gold { background: var(--amber); color: var(--amber-btn-text); box-shadow: 0 6px 22px rgba(154,106,18,.35); }
.btn-gold:hover { background: var(--amber-hover); box-shadow: 0 10px 28px rgba(154,106,18,.45); }
.btn-ghost { background: transparent; color: var(--hero-text); border: 1px solid rgba(244,247,240,.35); }
.btn-ghost:hover { background: rgba(244,247,240,.1); border-color: rgba(244,247,240,.6); }

/* Gut path - signature element (wędrująca kropka = treść pokarmowa) */
.gut-path { position: relative; margin-top: 34px; }
.gut-path svg { width: 100%; height: auto; display: block; }

/* --- HOME SECTIONS GRID --- */
.home-section { margin-bottom: 40px; }
.home-section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.home-section-head h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem; font-weight: 700; text-wrap: balance;
  color: var(--text);
}
.home-section-head h2::before { content: ''; display: inline-block; width: 14px; height: 6px; border-radius: 3px; background: var(--accent); margin: 0 10px 4px 0; }
.home-section-head .section-count {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); background: var(--accent-soft);
  border-radius: var(--radius-full); padding: 3px 11px;
}
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.home-card {
  position: relative;
  display: block; text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  color: var(--text);
  overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.home-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--leaf));
  opacity: 0; transition: opacity .2s var(--ease);
}
.home-card:hover, .home-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-soft-border);
  box-shadow: var(--shadow-md);
}
.home-card:hover::before { opacity: 1; }
.home-card .card-icon { font-size: 1.35rem; line-height: 1; display: block; margin-bottom: 10px; }
.home-card h3 { font-size: .95rem; font-weight: 700; line-height: 1.35; text-wrap: balance; margin-bottom: 6px; }
.home-card p {
  font-size: .85rem; line-height: 1.55; color: var(--text-muted); margin-bottom: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-card .card-arrow {
  position: absolute; right: 14px; top: 14px;
  opacity: 0; transform: translateX(-6px);
  color: var(--accent); font-size: 1.05rem; font-weight: 700;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.home-card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-head { margin-bottom: 28px; }
.article-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 10px;
}
.article-kicker .kicker-icon { font-size: .95rem; }
.article-head h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem; line-height: 1.15; font-weight: 700;
  text-wrap: balance; margin-bottom: 10px;
}
.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .8rem; color: var(--text-muted); margin-bottom: 14px;
}
.article-meta .dot { opacity: .5; }
.article-lead {
  font-size: 1.05rem; line-height: 1.65; color: var(--text-secondary);
  border-left: 3px solid var(--accent-soft-border);
  padding-left: 16px; margin-bottom: 0;
}

.content-article h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem; font-weight: 700; text-wrap: balance;
  margin: 34px 0 14px; padding-top: 6px;
  scroll-margin-top: calc(var(--header-height) + 18px);
}
.content-article h2::before {
  content: ''; display: inline-block; width: 22px; height: 4px;
  border-radius: 2px; background: var(--amber);
  margin: 0 10px 5px 0;
}
.content-article h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin: 24px 0 10px; text-wrap: balance; }
.content-article p { margin-bottom: 16px; }
.content-article strong { font-weight: 700; }
.content-article a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.content-article a:hover { color: var(--amber); }
.content-article ul, .content-article ol { margin: 0 0 18px 24px; }
.content-article li { margin-bottom: 7px; }
.content-article li::marker { color: var(--amber); }

/* TOC */
.toc {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 28px;
}
.toc-title {
  font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 6px; }
.toc li { margin: 0; counter-increment: toc; }
.toc a {
  display: inline-flex; gap: 9px; align-items: baseline;
  color: var(--text-secondary); text-decoration: none; font-size: .9rem;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-heading); font-weight: 700; color: var(--amber); font-size: .85rem; }
.toc a:hover { color: var(--accent); transform: translateX(2px); }

/* Tabele */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.cmp-table { width: 100%; border-collapse: collapse; background: var(--bg-card); font-size: .9rem; min-width: 460px; }
.cmp-table caption { text-align: left; font-weight: 700; padding: 12px 14px; background: var(--accent-soft); color: var(--text); border-bottom: 1px solid var(--border-light); font-size: .95rem; }
.cmp-table th {
  text-align: left; padding: 11px 14px; font-size: .78rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
.cmp-table td { padding: 11px 14px; border-bottom: 1px solid var(--border-light); vertical-align: top; line-height: 1.5; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:hover td { background: var(--bg-surface); }
.cmp-table .yes { color: var(--accent); font-weight: 700; }
.cmp-table .no { color: #b3261e; font-weight: 700; }
@media (prefers-color-scheme: dark) { .cmp-table .no { color: #f08a80; } }

/* Info box */
.info-box {
  background: var(--amber-soft); border: 1px solid var(--amber-soft-border);
  border-radius: var(--radius); padding: 15px 18px; margin: 0 0 20px;
  font-size: .93rem; line-height: 1.6; color: var(--text);
}
.info-box .info-title { display: block; font-weight: 800; color: var(--amber); margin-bottom: 4px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.info-box-green { background: var(--accent-soft); border-color: var(--accent-soft-border); }
.info-box-green .info-title { color: var(--accent); }

/* Warning box - objawy alarmowe (zdrowie!) */
.warning-box {
  background: var(--warn-bg); border: 1px solid var(--warn-border);
  border-left: 4px solid var(--warn-text);
  border-radius: var(--radius); padding: 15px 18px; margin: 0 0 20px;
  font-size: .93rem; line-height: 1.6; color: var(--text);
}
.warning-box .warning-title {
  display: block; font-weight: 800; color: var(--warn-text);
  margin-bottom: 4px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
}
.warning-box ul { margin: 8px 0 0 20px; }
.warning-box li { margin-bottom: 4px; }
.warning-box li::marker { color: var(--warn-text); }

/* FAQ */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; background: var(--bg-card);
}
.faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
.faq-item h3::before { content: 'Q: '; color: var(--accent); font-weight: 800; }
.faq-item p:last-child { margin-bottom: 0; }

/* Słownik */
.glossary { margin: 0 0 20px; }
.glossary dt {
  font-weight: 700; color: var(--text); margin-top: 16px; font-size: 1rem;
}
.glossary dt::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); margin: 0 10px 2px 0; }
.glossary dd { margin: 4px 0 0 18px; color: var(--text-secondary); font-size: .95rem; line-height: 1.6; }

/* Checklista */
.checklist { list-style: none; margin: 0 0 20px; }
.checklist li {
  position: relative; padding: 9px 12px 9px 44px; margin-bottom: 6px;
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); font-size: .95rem;
}
.checklist li::before {
  content: '✓'; position: absolute; left: 14px; top: 8px;
  color: var(--accent); font-weight: 700; font-size: 1rem;
}
.checklist li strong { font-weight: 700; }

/* Blockquote */
.content-article blockquote {
  border-left: 3px solid var(--amber); background: var(--bg-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px; margin: 0 0 20px; color: var(--text-secondary);
  font-style: italic;
}

/* Nawigacja po artykule */
.article-nav {
  display: flex; justify-content: space-between; gap: 14px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border);
}
.article-nav a {
  flex: 1; max-width: 46%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
  text-decoration: none; color: var(--text); font-size: .88rem;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.article-nav a:hover { transform: translateY(-2px); border-color: var(--accent-soft-border); box-shadow: var(--shadow-md); }
.article-nav .nav-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: 3px; }
.article-nav .nav-title { font-weight: 600; line-height: 1.35; }
.article-nav a.next { text-align: right; }

/* --- FOOTER --- */
.app-footer {
  margin-left: var(--nav-width);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 34px 34px 40px;
}
.footer-inner { max-width: var(--content-max); margin: 0 auto; }
.footer-brand { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.footer-note { font-size: .8rem; line-height: 1.6; color: var(--text-muted); margin-bottom: 8px; }
.footer-copy { font-size: .78rem; color: var(--text-muted); }

/* --- NOT FOUND --- */
.notfound { text-align: center; padding: 70px 20px; }
.notfound h1 { font-family: var(--font-heading); font-size: 2.2rem; margin-bottom: 12px; }
.notfound p { color: var(--text-muted); margin-bottom: 22px; }

/* --- SCROLLBAR (webkit) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar-track { background: transparent; }

/* --- FOCUS --- */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .28s var(--ease);
    width: min(320px, 86vw);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .sidebar-overlay {
    position: fixed; inset: var(--header-height) 0 0 0; z-index: 85;
    background: rgba(10, 14, 11, .55); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease);
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main-content { margin-left: 0; padding: calc(var(--header-height) + 20px) 18px 50px; }
  .app-footer { margin-left: 0; padding: 28px 18px 34px; }
  .mobile-menu-btn { display: inline-flex; }
  .hero { padding: 40px 26px 32px; }
}
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .app-header { padding: 0 12px; gap: 10px; }
  .brand-name { font-size: 1.18rem; }
  .header-search { width: 100%; position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; display: none; }
  .header-search.open { display: block; }
  .hero { padding: 34px 20px 28px; border-radius: var(--radius-sm); }
  .hero h1 { font-size: 1.9rem; }
  .hero p.lead { font-size: .98rem; }
  .home-grid { grid-template-columns: 1fr; }
  .article-nav { flex-direction: column; }
  .article-nav a { max-width: 100%; }
  .content-article h2 { font-size: 1.4rem; }
  .article-head h1 { font-size: 1.8rem; }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
