/* ==========================================================================
   Na kółkach - design system
   Paleta: las + glina + papier zielony (karawaning, nie klinika i nie bank)
   ========================================================================== */

:root {
  /* Color - light */
  --paper: oklch(0.972 0.008 140);
  --paper-deep: oklch(0.948 0.012 140);
  --surface: oklch(1 0 0);
  --ink: oklch(0.245 0.020 155);
  --ink-soft: oklch(0.360 0.022 155);
  --muted: oklch(0.470 0.020 155);
  --line: oklch(0.888 0.012 148);
  --line-soft: oklch(0.928 0.010 148);
  --forest: oklch(0.335 0.058 157);
  --forest-deep: oklch(0.262 0.045 157);
  --moss: oklch(0.520 0.055 150);
  --clay: oklch(0.565 0.150 42);
  --clay-ink: oklch(0.505 0.145 40);
  --tint-warm: oklch(0.958 0.022 78);
  --tint-green: oklch(0.955 0.020 150);
  --tint-blue: oklch(0.958 0.014 235);
  --tint-red: oklch(0.955 0.022 25);
  --line-warm: oklch(0.885 0.030 78);
  --line-green: oklch(0.878 0.028 150);
  --line-blue: oklch(0.880 0.022 235);
  --line-red: oklch(0.878 0.030 25);

  /* Type */
  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --header-h: 68px;
  --sidebar-w: 320px;
  --measure: 72ch;
  --pad-x: 46px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-fast: 160ms;
  --t-mid: 220ms;

  /* Elevation (used sparingly) */
  --shadow-pop: 0 4px 8px oklch(0.20 0.02 155 / 0.10);

  --radius: 8px;
  --radius-sm: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(0.190 0.012 155);
    --paper-deep: oklch(0.225 0.014 155);
    --surface: oklch(0.235 0.014 155);
    --ink: oklch(0.935 0.008 140);
    --ink-soft: oklch(0.870 0.010 145);
    --muted: oklch(0.762 0.014 145);
    --line: oklch(0.320 0.016 155);
    --line-soft: oklch(0.278 0.014 155);
    --forest: oklch(0.775 0.070 155);
    --forest-deep: oklch(0.845 0.055 155);
    --moss: oklch(0.700 0.055 150);
    --clay: oklch(0.685 0.140 45);
    --clay-ink: oklch(0.765 0.125 48);
    --tint-warm: oklch(0.275 0.028 60);
    --tint-green: oklch(0.268 0.024 152);
    --tint-blue: oklch(0.268 0.020 240);
    --tint-red: oklch(0.272 0.030 25);
    --line-warm: oklch(0.372 0.035 60);
    --line-green: oklch(0.360 0.030 152);
    --line-blue: oklch(0.360 0.026 240);
    --line-red: oklch(0.368 0.036 25);
    --shadow-pop: 0 4px 8px oklch(0 0 0 / 0.35);
  }
}

/* --------------------------------------------------------------- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 100% 0%, oklch(0.520 0.055 150 / 0.09), transparent 70%),
    radial-gradient(46% 38% at 0% 100%, oklch(0.585 0.152 42 / 0.05), transparent 72%);
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(58% 42% at 100% 0%, oklch(0.520 0.080 150 / 0.12), transparent 70%),
      radial-gradient(46% 38% at 0% 100%, oklch(0.500 0.100 42 / 0.07), transparent 72%);
  }
}
img, svg { display: block; max-width: 100%; }
a { color: var(--clay-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 3px; }
::selection { background: oklch(0.585 0.152 42 / 0.22); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.9rem; text-decoration: none;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* -------------------------------------------------------------- Header --- */
.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest-deep);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--forest);
  color: var(--paper);
  border-radius: 9px;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  line-height: 1;
}
.search-box {
  position: relative;
  margin-left: auto;
  width: min(392px, 42vw);
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute; left: 13px;
  width: 17px; height: 17px;
  color: var(--muted);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
#searchInput::placeholder { color: var(--muted); opacity: 1; }
#searchInput:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--forest);
  box-shadow: 0 0 0 3px oklch(0.335 0.058 157 / 0.12);
}
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  max-height: min(62vh, 480px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  z-index: 120;
  padding: 6px;
  animation: popIn 140ms var(--ease-out);
}
.search-results a {
  display: block;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.search-results a:hover, .search-results a.is-active { background: var(--paper-deep); }
.search-results .sr-title { font-size: 0.95rem; font-weight: 600; line-height: 1.35; }
.search-results .sr-sec { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.search-results .sr-empty { padding: 14px 12px; font-size: 0.9rem; color: var(--muted); }
.search-results mark { background: oklch(0.585 0.152 42 / 0.22); color: inherit; padding: 0 1px; }

.menu-toggle, .search-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  padding: 0;
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.menu-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--ease-out), opacity var(--t-fast) var(--ease-out);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.search-toggle svg { width: 20px; height: 20px; }
.menu-toggle:active, .search-toggle:active { transform: scale(0.96); }
.sb-close {
  display: none;
  align-items: center; justify-content: center;
  width: 100%; min-height: 44px;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
}

/* --------------------------------------------------------------- Shell --- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  padding-top: var(--header-h);
  min-height: 100dvh;
}

/* ------------------------------------------------------------- Sidebar --- */
.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: var(--paper);
  scrollbar-width: thin;
}
.sidebar-inner { padding: 28px 20px 56px; }
.sb-top {
  padding: 0 6px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.sb-top .sb-kicker {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 4px;
}
.sb-top .sb-count {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.sb-group { margin-bottom: 0; padding-top: 20px; }
.sb-group + .sb-group { border-top: 1px solid var(--line-soft); margin-top: 14px; }
.sb-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0 6px;
  font-family: var(--font-body);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--forest);
}
.sb-group-n {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.sb-link {
  display: block;
  position: relative;
  padding: 7px 6px 7px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 4px;
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.sb-link::before {
  content: "";
  position: absolute;
  left: 5px; top: 0.86em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.sb-link:hover { color: var(--forest); background: var(--paper-deep); transform: translateX(1px); }
.sb-link.is-active { color: var(--forest-deep); font-weight: 600; background: var(--paper-deep); }
.sb-link.is-active::before { background: var(--clay); transform: scale(1.25); }

/* ---------------------------------------------------------------- Home --- */
.app { min-width: 0; }
.home-hero {
  position: relative;
  min-height: clamp(440px, 62vh, 580px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  isolation: isolate;
  background: var(--forest-deep);
}
.home-hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
  transform: scale(1.04);
  animation: heroSettle 1400ms var(--ease-out) forwards;
}
.home-hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(96deg, oklch(0.14 0.02 155 / 0.72) 0%, oklch(0.14 0.02 155 / 0.42) 42%, oklch(0.14 0.02 155 / 0.02) 74%),
    linear-gradient(178deg, oklch(0.14 0.02 155 / 0.52) 0%, oklch(0.14 0.02 155 / 0.18) 38%, oklch(0.14 0.02 155 / 0.06) 70%, oklch(0.14 0.02 155 / 0.38) 100%);
}
.home-hero-copy {
  position: relative; z-index: 2;
  padding: 56px var(--pad-x) 48px;
  max-width: 720px;
  color: oklch(0.985 0.004 140);
}
.hero-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.9rem, 5.2vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.hero-dot { color: var(--clay); }
.hero-promise {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.22rem, 1.8vw, 1.5rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
  margin: 0 0 10px;
  color: oklch(0.985 0.004 140);
  text-wrap: balance;
}
.hero-sentence {
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0 0 26px;
  max-width: 46ch;
  color: oklch(0.905 0.010 140);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  background: var(--clay);
  color: oklch(0.995 0 0);
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.btn-primary svg { width: 17px; height: 17px; transition: transform var(--t-fast) var(--ease-out); }
.btn-primary:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: oklch(0.545 0.155 42); transform: translateY(-1px); }
  .btn-primary:hover svg { transform: translateX(3px); }
}

.wrap { padding: 0 var(--pad-x); }
.home-body { padding-bottom: 56px; }
.home-intro { padding-top: 46px; }
.home-intro-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  margin-bottom: 4px;
}
.home-intro h2, .sec-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.62rem;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.home-intro-desc { color: var(--muted); font-size: 0.98rem; margin: 0 0 18px; max-width: 62ch; }
.featured-list { border-top: 1px solid var(--line); }
.featured-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 14px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease-out);
}
.featured-item h3 {
  font-family: var(--font-body);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 3px;
  color: var(--ink);
}
.featured-item p { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted); max-width: 70ch; }
.featured-item svg { width: 20px; height: 20px; color: var(--clay-ink); transition: transform var(--t-fast) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .featured-item:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
  .featured-item:hover svg { transform: translateX(4px); }
}

.home-sections { padding-top: 46px; }
.sec-block { margin-bottom: 44px; }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
}
.sec-head .sec-count { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.sec-desc { color: var(--muted); font-size: 0.94rem; margin: 10px 0 0; max-width: 68ch; }
.art-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  margin-top: 4px;
}
.art-item {
  display: block;
  padding: 14px 2px 15px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: var(--ink);
}
.art-item h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.38;
  margin: 0 0 3px;
  text-wrap: pretty;
}
.art-item p { margin: 0; font-size: 0.875rem; line-height: 1.48; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .art-item:hover h3 { color: var(--forest-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}
.home-note {
  margin-top: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line-green);
  background: var(--tint-green);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 78ch;
}
.home-note strong { color: var(--ink); }

/* ------------------------------------------------------------- Article --- */
.article { padding: 32px var(--pad-x) 60px; max-width: calc(var(--measure) + var(--pad-x) * 2); }
.breadcrumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--forest); text-decoration: underline; }
.breadcrumb .sep { opacity: 0.55; }
.article-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.02rem, 3.4vw, 2.66rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.article-meta {
  font-size: 0.84rem;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.article-head {
  padding-bottom: 22px;
  border-bottom: 1px dashed oklch(0.585 0.152 42 / 0.42);
  margin-bottom: 26px;
}
.toc {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 32px;
}
.toc-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 8px;
}
.toc ol { margin: 0; padding-left: 1.15em; }
.toc li { margin: 4px 0; font-size: 0.93rem; line-height: 1.45; }
.toc a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.toc a:hover { color: var(--clay-ink); text-decoration-color: currentColor; }

.prose { font-size: 1.015rem; line-height: 1.73; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.24;
  letter-spacing: -0.012em;
  margin: 2.1em 0 0.55em;
  scroll-margin-top: calc(var(--header-h) + 20px);
  text-wrap: balance;
}
.prose h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 1.7em 0 0.45em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.25em; }
.prose li { margin: 0.34em 0; }
.prose li::marker { color: var(--moss); }
.prose strong { font-weight: 700; }
.prose a { color: var(--clay-ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--moss);
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.table-responsive { overflow-x: auto; margin: 1.3em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table, table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; background: var(--surface); }
.prose th, .prose td, table.data th, table.data td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose thead th, table.data thead th { background: var(--paper-deep); font-weight: 700; font-size: 0.82rem; color: var(--ink-soft); }
.prose tbody tr:last-child td, table.data tbody tr:last-child td { border-bottom: 0; }
.prose table caption { caption-side: bottom; padding: 8px 12px; font-size: 0.8rem; color: var(--muted); text-align: left; }

.info-box, .tip-box, .warning-box, .key-takeaways {
  margin: 1.45em 0;
  padding: 15px 18px;
  border-radius: var(--radius);
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--ink);
}
.info-box { background: var(--tint-blue); border: 1px solid var(--line-blue); }
.tip-box { background: var(--tint-green); border: 1px solid var(--line-green); }
.warning-box { background: var(--tint-red); border: 1px solid var(--line-red); }
.key-takeaways { background: var(--tint-warm); border: 1px solid var(--line-warm); }
.info-box > *:first-child, .tip-box > *:first-child, .warning-box > *:first-child, .key-takeaways > *:first-child { margin-top: 0; }
.info-box > *:last-child, .tip-box > *:last-child, .warning-box > *:last-child, .key-takeaways > *:last-child { margin-bottom: 0; }
.info-box p, .tip-box p, .warning-box p, .key-takeaways p { margin: 0 0 0.6em; }
.info-box ul, .tip-box ul, .warning-box ul, .key-takeaways ul { margin: 0.3em 0 0.6em; }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq-item summary {
  cursor: pointer;
  padding: 13px 26px 13px 0;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.42;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 2px; top: 11px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--clay-ink);
  transition: transform var(--t-mid) var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--forest-deep); }
.faq-item .faq-answer { padding: 0 0 14px; font-size: 0.96rem; }
.faq-item .faq-answer p { margin: 0 0 0.6em; }

.prose dl { margin: 1.4em 0; border-top: 1px solid var(--line); }
.prose dt {
  padding-top: 16px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.prose dd {
  margin: 5px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

.article-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-foot .note { font-size: 0.86rem; color: var(--muted); margin: 0 0 22px; max-width: 66ch; }
.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.article-nav a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.article-nav .an-label { display: block; font-size: 0.76rem; color: var(--muted); margin-bottom: 4px; }
.article-nav .an-title { display: block; font-size: 0.95rem; font-weight: 600; line-height: 1.38; }
@media (hover: hover) and (pointer: fine) {
  .article-nav a:hover { border-color: var(--moss); transform: translateY(-1px); }
  .article-nav a:hover .an-title { color: var(--forest-deep); }
}
.article-nav .an-next { text-align: right; }

/* -------------------------------------------------------------- Footer --- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); margin-top: 20px; }
.footer-inner {
  padding: 34px var(--pad-x) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 40px;
  align-items: start;
}
.footer-brand .brand-text { font-size: 1.16rem; color: var(--forest-deep); }
.footer-brand p { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); max-width: 54ch; line-height: 1.55; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--forest-deep); text-decoration: underline; }
.footer-note { grid-column: 1 / -1; margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }

/* ----------------------------------------------------------- Overlay ----- */
.overlay {
  position: fixed; inset: 0;
  background: oklch(0.18 0.02 155 / 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease-out);
}
.overlay.is-visible { opacity: 1; }

/* ---------------------------------------------------------- Animation ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroSettle {
  from { transform: scale(1.045); }
  to { transform: scale(1); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.page-enter { animation: fadeUp 320ms var(--ease-out) both; }

/* --------------------------------------------------------- Responsive ---- */
@media (max-width: 1180px) {
  :root { --pad-x: 34px; --sidebar-w: 276px; }
  .art-list { column-gap: 28px; }
}

@media (max-width: 900px) {
  :root { --pad-x: 22px; --header-h: 60px; }
  .shell { display: block; }
  .menu-toggle { display: flex; }
  .search-toggle { display: inline-flex; margin-left: auto; }
  .sb-close { display: flex; }
  .brand-text { font-size: 1.18rem; }
  .brand-mark { width: 31px; height: 31px; border-radius: 8px; }
  .header-inner { gap: 12px; padding: 0 14px; }
  .search-box { display: none; }
  .app-header.search-open .search-box {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    animation: popIn 160ms var(--ease-out);
  }
  .app-header.search-open .search-results { left: 14px; right: 14px; width: auto; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    height: 100dvh;
    width: min(86vw, 342px);
    z-index: 130;
    background: var(--paper);
    border-right: 1px solid var(--line);
    transform: translateX(-102%);
    transition: transform 280ms var(--ease-in-out);
    box-shadow: 6px 0 24px oklch(0.18 0.02 155 / 0.12);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-inner { padding: max(18px, env(safe-area-inset-top)) 16px 60px; }
  .home-hero { min-height: 430px; }
  .home-hero-copy { padding: 36px var(--pad-x) 34px; }
  .hero-h1 { font-size: clamp(2.4rem, 9vw, 3.2rem); }
  .hero-promise { font-size: 1.12rem; }
  .hero-sentence { font-size: 0.98rem; max-width: 40ch; }
  .art-list { grid-template-columns: minmax(0, 1fr); }
  .article { padding-top: 24px; }
  .prose { font-size: 1.005rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .home-intro { padding-top: 34px; }
  .home-sections { padding-top: 34px; }
  .sec-block { margin-bottom: 34px; }
}

@media (max-width: 600px) {
  :root { --pad-x: 18px; }
  html { font-size: 17px; }
  .hero-h1 { font-size: clamp(2.15rem, 10.5vw, 2.7rem); }
  .hero-promise { font-size: 1.04rem; }
  .home-hero { min-height: 400px; }
  .home-hero-copy { padding-top: 30px; }
  .home-intro h2, .sec-head h2 { font-size: 1.4rem; }
  .prose h2 { font-size: 1.34rem; }
  .article-nav { grid-template-columns: minmax(0, 1fr); }
  .article-nav .an-next { text-align: left; }
  .featured-item { grid-template-columns: minmax(0, 1fr) 22px; }
  .sec-head { align-items: flex-start; flex-direction: column; gap: 2px; }
}

/* -------------------------------------------------------------- Motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .home-hero-media { animation: none; transform: none; }
  .page-enter { animation: none; }
}

/* ---------------------------------------------------------------- Print -- */
@media print {
  .app-header, .sidebar, .site-footer, .overlay, #vd-cookie-bar, .search-box { display: none !important; }
  .shell { display: block; padding-top: 0; }
  .article { padding: 0; max-width: none; }
  body { font-size: 11pt; }
}
