/* ============================================================
   Rodzic - design system
   Paleta: szałwiowa zieleń + pudrowy róż + krem
   (natura, czułość, ciepło rodzinne - świat pediatrii i dzieci)
   Typografia: Lora (display serif) + Nunito Sans (body)
   ============================================================ */

:root {
  /* Light - krem + szałwia + róż */
  --bg: #faf7f0;
  --bg-soft: #f2ecdf;
  --card: #fffdf8;
  --card-border: #e7dfcc;
  --ink: #2a3229;
  --text: #3a433b;
  --muted: #626d5f;
  --forest: #3d6b52;
  --forest-2: #2c5440;
  --leaf: #2e6b4a;
  --leaf-bright: #4e9e63;
  --rose: #c26d8b;
  --rose-bright: #d99ab0;
  --rose-strong: #994764;
  --gold: #c9a15a;
  --gold-bright: #e3c07a;
  --gold-ink: #8a6a2f;
  --accent-subtle: rgba(194, 109, 139, 0.22);
  --header-bg: rgba(250, 247, 240, 0.92);
  --shadow-card: 0 1px 2px rgba(42, 50, 41, 0.05), 0 4px 16px rgba(42, 50, 41, 0.07);
  --shadow-card-hover: 0 2px 4px rgba(42, 50, 41, 0.07), 0 10px 28px rgba(42, 50, 41, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease-out;
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101610;
    --bg-soft: #161f18;
    --card: #1d2820;
    --card-border: #2c3a30;
    --ink: #ece5d3;
    --text: #d9d2c0;
    --muted: #9aa492;
    --forest: #4a8b63;
    --forest-2: #5da37c;
    --leaf: #5da37c;
    --leaf-bright: #6ec284;
    --rose: #d992ac;
    --rose-bright: #e5abc1;
    --rose-strong: #e5abc1;
    --gold: #d4b06a;
    --gold-bright: #e3c07a;
    --gold-ink: #d4b06a;
    --accent-subtle: rgba(217, 146, 172, 0.18);
    --header-bg: rgba(16, 22, 16, 0.9);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.5);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at -10% -5%, var(--accent-subtle), transparent 60%),
    radial-gradient(ellipse 800px 480px at 110% 105%, var(--accent-subtle), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  text-wrap: balance;
}

a { color: var(--leaf); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--rose-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--forest);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ============ Header ============ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}
.app-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-subtle), transparent);
  opacity: 0.3;
  pointer-events: none;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--forest-2));
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(227, 192, 122, 0.4);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-name em {
  font-style: italic;
  color: var(--rose-strong);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(42, 50, 41, 0.04);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(46, 107, 74, 0.18);
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
  display: none;
  z-index: 120;
}
.search-results.open { display: block; }

.search-item {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--card-border);
  transition: background var(--transition);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-soft); text-decoration: none; }
.si-title { font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.si-section { font-size: 0.75rem; color: var(--muted); }
.search-empty { padding: 12px 14px; color: var(--muted); font-size: 0.9rem; }

.header-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============ Layout ============ */
.layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 20px 40px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 36px;
}

.sidebar {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 6px 12px 20px 0;
  scrollbar-width: thin;
  border-right: 1px solid var(--card-border);
  margin-right: 4px;
}

.side-group { margin-bottom: 18px; }

.side-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  padding: 0 10px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  border-left: 2px solid transparent;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.sidebar-link.active {
  background: rgba(61, 107, 82, 0.1);
  color: var(--leaf);
  border-left-color: var(--leaf);
  font-weight: 600;
}
.s-icon { font-size: 0.9rem; flex-shrink: 0; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 16, 0.5);
  z-index: 90;
}
.sidebar-overlay.show { display: block; }

.main-content { min-width: 0; }

.app-content {
  animation: fadeUp 0.25s ease-out;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Hero ============ */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 44px 40px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 500px 300px at 90% 0%, rgba(227, 192, 122, 0.18), transparent 65%),
    linear-gradient(135deg, var(--forest) 0%, var(--forest-2) 100%);
  color: var(--bg);
  overflow: hidden;
  margin-bottom: 40px;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(250, 247, 240, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.5;
}

.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  background: rgba(227, 192, 122, 0.14);
  border: 1px solid rgba(227, 192, 122, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.home-hero h1 {
  color: var(--bg);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.home-hero h1 em {
  font-style: italic;
  color: var(--rose-bright);
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(250, 247, 240, 0.88);
  max-width: 56ch;
  margin-bottom: 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }

.btn-primary {
  background: var(--gold-bright);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.btn-primary:hover { background: #eccf95; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }

.btn-ghost {
  background: rgba(250, 247, 240, 0.06);
  color: var(--bg);
  border: 1.5px solid rgba(250, 247, 240, 0.75);
}
.btn-ghost:hover { border-color: var(--bg); background: rgba(250, 247, 240, 0.14); }

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-stat .hs-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--rose-bright);
  line-height: 1.1;
}
.hero-stat .hs-label {
  font-size: 0.8rem;
  color: rgba(250, 247, 240, 0.75);
}

/* ============ Timeline signature (40 tygodni ciąży) ============ */
.hero-timeline-wrap {
  position: relative;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-timeline-wrap::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 192, 122, 0.26), transparent 70%);
  filter: blur(4px);
}

.hero-timeline {
  width: min(320px, 100%);
  height: auto;
  position: relative;
  color: var(--gold-bright);
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.4));
  animation: tlIn 0.7s ease-out;
}
@keyframes tlIn {
  from { opacity: 0; transform: scale(0.92) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.tl-base {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: drawBase 1.2s ease-out 0.15s forwards;
}
@keyframes drawBase {
  to { stroke-dashoffset: 0; }
}

.tl-band { opacity: 0; animation: bandIn 0.5s ease-out forwards; }
.tl-band-1 { fill: rgba(78, 158, 99, 0.5); animation-delay: 0.5s; }
.tl-band-2 { fill: rgba(217, 153, 176, 0.45); animation-delay: 0.62s; }
.tl-band-3 { fill: rgba(227, 192, 122, 0.4); animation-delay: 0.74s; }
@keyframes bandIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tl-dot {
  fill: var(--bg);
  stroke: var(--gold-bright);
  stroke-width: 1.6;
  opacity: 0;
  animation: dotIn 0.3s ease-out forwards;
}
@keyframes dotIn {
  from { opacity: 0; transform: scale(0); transform-origin: center; }
  to { opacity: 1; transform: scale(1); }
}
.tl-dot.hl { fill: var(--rose-bright); stroke: var(--rose-bright); }

.tl-heart {
  fill: var(--rose-bright);
  animation: heartPulse 2.4s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.tl-label {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: rgba(250, 247, 240, 0.85);
}
.tl-label-sub {
  font-size: 12px;
  font-weight: 600;
  fill: rgba(250, 247, 240, 0.6);
}

/* ============ Home sections ============ */
.home-section { margin-bottom: 44px; }

.home-section h2 {
  font-size: 1.7rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.sec-count {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-ink);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.sec-desc {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 70ch;
  margin-bottom: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 20px 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.home-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--rose));
  opacity: 0;
  transition: opacity var(--transition);
}
.home-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(61, 107, 82, 0.4);
  text-decoration: none;
}
.home-card:hover::before { opacity: 1; }

.hc-icon {
  font-size: 1.8rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 2px;
  transition: transform var(--transition), background var(--transition);
}
.home-card:hover .hc-icon { transform: scale(1.08) rotate(-4deg); background: rgba(61, 107, 82, 0.12); }

.home-card h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.home-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  flex-grow: 1;
}

.hc-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--leaf);
  display: flex;
  align-items: center;
  gap: 6px;
}
.arrow { transition: transform var(--transition); }
.home-card:hover .arrow { transform: translateX(4px); }

/* ============ Article ============ */
.article-header {
  padding: 8px 0 26px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 28px;
}

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--leaf); }
.breadcrumbs .sep { margin: 0 7px; color: var(--rose-strong); }

.article-header h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.article-excerpt {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 70ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}
.tag {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.article-body {
  max-width: 78ch;
  font-size: 17px;
  line-height: 1.7;
}
.article-body h2 {
  font-size: 1.55rem;
  font-weight: 600;
  margin: 38px 0 14px;
  padding-top: 8px;
}
.article-body h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 26px 0 10px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 6px; }
.article-body li::marker { color: var(--rose-strong); }
.article-body strong { color: var(--ink); }
.article-body blockquote {
  border-left: 3px solid var(--rose);
  background: var(--bg-soft);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 16px;
  color: var(--muted);
  font-style: italic;
}
.article-body code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--rose-strong);
}

/* TOC */
.article-toc {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 26px;
}
.article-toc summary {
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
}
.article-toc ol { margin: 12px 0 0 20px; }
.article-toc li { margin-bottom: 5px; font-size: 0.92rem; }
.article-toc a { color: var(--text); }
.article-toc a:hover { color: var(--leaf); }

/* Callout boxes */
.info-box {
  background: rgba(61, 107, 82, 0.08);
  border: 1px solid rgba(61, 107, 82, 0.3);
  border-left: 4px solid var(--leaf);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 0.96rem;
}
.info-box strong { color: var(--leaf); }

.tip-box {
  background: rgba(201, 161, 90, 0.1);
  border: 1px solid rgba(201, 161, 90, 0.35);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 0.96rem;
}
.tip-box strong { color: var(--gold-ink); }

.warning-box {
  background: rgba(153, 71, 100, 0.08);
  border: 1px solid rgba(153, 71, 100, 0.3);
  border-left: 4px solid var(--rose-strong);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 16px;
  font-size: 0.96rem;
}
.warning-box strong { color: var(--rose-strong); }

/* FAQ */
.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.faq-item p { margin-bottom: 0; font-size: 0.96rem; }

/* Glossary */
.article-body dl {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 16px;
}
.article-body dt {
  font-weight: 700;
  color: var(--leaf);
  padding: 12px 18px 2px;
  font-size: 1rem;
}
.article-body dd {
  padding: 0 18px 12px;
  margin: 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--card-border);
}
.article-body dd:last-child { border-bottom: none; }

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 0 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
}
.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--card);
}
.error-table th {
  background: var(--forest);
  color: var(--bg);
  text-align: left;
  padding: 11px 14px;
  font-weight: 600;
  white-space: nowrap;
}
.error-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--card-border);
  vertical-align: top;
}
.error-table tr:nth-child(even) td { background: var(--bg-soft); }
.error-table tr:hover td { background: rgba(61, 107, 82, 0.07); }

/* Article nav prev/next */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
}
.article-nav a {
  display: block;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.article-nav a:hover { border-color: var(--leaf); box-shadow: var(--shadow-card); text-decoration: none; }
.article-nav .next { text-align: right; }
.an-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.an-title { font-weight: 600; color: var(--ink); font-size: 0.95rem; line-height: 1.4; }

/* ============ Footer ============ */
.app-footer {
  border-top: 1px solid var(--card-border);
  margin-top: 30px;
  background: var(--bg-soft);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 20px;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-inner p { margin-bottom: 10px; max-width: 90ch; }
.footer-inner strong { color: var(--ink); }
.footer-note { font-size: 0.82rem; }
.footer-copy { font-size: 0.8rem; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 76px;
  }
  .menu-btn { display: flex; }
  .header-tagline { display: none; }
  .sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    width: min(320px, 86vw);
    background: var(--bg);
    border-right: 1px solid var(--card-border);
    padding: 18px 16px 30px;
    transform: translateX(-105%);
    transition: transform 0.25s ease-out;
    z-index: 95;
    max-height: none;
  }
  .sidebar.open { transform: translateX(0); }
  .home-hero {
    grid-template-columns: 1fr;
    padding: 34px 26px;
  }
  .hero-timeline { width: min(240px, 72%); }
  .hero-stats { gap: 20px; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .header-inner { padding: 0 14px; gap: 10px; }
  .search-wrap { max-width: none; }
  .layout { padding: 72px 14px 30px; gap: 0; }
  .home-hero { border-radius: 14px; padding: 28px 20px; }
  .home-hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 0.98rem; }
  .hero-cta .btn { width: 100%; text-align: center; }
  .card-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
  .footer-inner { padding: 26px 16px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
