/* ============ Фруктопедия — дизайн-система ============ */

:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --bg: #FCF7EE;
  --bg-soft: #F6EEDF;
  --surface: #FFFFFF;
  --surface-2: #FBF4E7;
  --ink: #1B2A21;
  --ink-soft: #3B4A40;
  --muted: #5F6E64;
  --line: #E8DCC7;
  --line-strong: #D8C7A8;
  --accent: #D9542B;
  --accent-soft: #FBE7DD;
  --leaf: #2E6B4F;
  --leaf-soft: #E3F0E8;
  --gold: #E8A33D;
  --shadow-sm: 0 1px 2px rgba(27, 42, 33, .06), 0 1px 1px rgba(27, 42, 33, .04);
  --shadow-md: 0 8px 24px -12px rgba(27, 42, 33, .22), 0 2px 6px rgba(27, 42, 33, .05);
  --shadow-lg: 0 24px 60px -30px rgba(27, 42, 33, .35);
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1140px;
  --header-h: 66px;
}

html[data-theme="dark"] {
  --bg: #10140F;
  --bg-soft: #171D15;
  --surface: #1A211A;
  --surface-2: #20281F;
  --ink: #F3EEE4;
  --ink-soft: #DCD6C9;
  --muted: #A4AFA3;
  --line: #2C3529;
  --line-strong: #3B4636;
  --accent: #F07A4E;
  --accent-soft: #33211A;
  --leaf: #86C4A1;
  --leaf-soft: #1D2E24;
  --gold: #F0B45C;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 10px 28px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -40px rgba(0, 0, 0, .9);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 500px at 88% -8%, rgba(232, 163, 61, .13), transparent 62%),
    radial-gradient(900px 460px at -6% 4%, rgba(46, 107, 79, .10), transparent 60%);
  background-repeat: no-repeat;
}

img, svg { max-width: 100%; height: auto; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); color: var(--ink); }
a { color: var(--leaf); text-decoration-color: color-mix(in srgb, var(--leaf) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  transition: top .18s ease;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(100% - 28px, var(--wrap)); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-family: var(--font-display);
  font-size: 20px; letter-spacing: -.01em; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--gold));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), var(--shadow-sm);
  flex: none;
}
.brand-mark svg { width: 18px; height: 18px; display: block; }
.brand span b { font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 500;
  padding: 8px 11px; border-radius: 9px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search { position: relative; }
.search input {
  width: 210px; height: 38px; padding: 0 12px 0 34px;
  font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: width .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none; width: 250px; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.search .search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.search-results {
  position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 6px; display: none; z-index: 120;
}
.search-results.is-open { display: block; }
.search-results a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-size: 14.5px;
}
.search-results a:hover, .search-results a.is-active { background: var(--surface-2); }
.search-results .sr-emoji { width: 26px; text-align: center; font-size: 17px; }
.search-results .sr-cat { margin-left: auto; font-size: 12px; color: var(--muted); }
.search-results .sr-empty { padding: 12px; color: var(--muted); font-size: 14px; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .search input { width: 170px; }
  .search input:focus { width: 190px; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: grid; }
  .header-inner { gap: 10px; }
  .search input { width: 150px; }
  .search input:focus { width: 170px; }
}
@media (max-width: 520px) {
  .search { display: none; }
}

/* ---------- mobile drawer ---------- */
.drawer {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid var(--line);
  display: none; padding: 10px 0 16px; box-shadow: var(--shadow-md);
}
.drawer.is-open { display: block; }
.drawer a {
  display: block; padding: 12px 20px; color: var(--ink); text-decoration: none; font-size: 16px;
}
.drawer a:hover { background: var(--surface-2); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 58px 0 10px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  color: var(--leaf); background: var(--leaf-soft); border: 1px solid color-mix(in srgb, var(--leaf) 22%, transparent);
  padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.7rem, 6.2vw, 4.6rem); line-height: 1.02;
  letter-spacing: -.025em; margin: 18px 0 0;
}
.hero .lead {
  font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--ink-soft);
  max-width: 58ch; margin: 16px 0 0;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 13.5px; color: var(--ink-soft); box-shadow: var(--shadow-sm);
}
.chip b { color: var(--ink); font-weight: 600; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.hero-art { position: absolute; right: 0; top: 20px; width: 380px; height: 380px; pointer-events: none; opacity: .9; }
.hero-art .orb { position: absolute; border-radius: 50%; filter: blur(0.5px); }
.hero-art .orb-1 { width: 210px; height: 210px; right: 40px; top: 30px; background: radial-gradient(circle at 32% 28%, #FFD9A8, #F0913F 62%, #D9542B); box-shadow: 0 30px 60px -30px rgba(217,84,43,.6); }
.hero-art .orb-2 { width: 120px; height: 120px; right: 210px; top: 180px; background: radial-gradient(circle at 30% 25%, #E7F2C8, #A9C85C 58%, #6F9838); opacity: .85; }
.hero-art .orb-3 { width: 74px; height: 74px; right: 20px; top: 230px; background: radial-gradient(circle at 30% 25%, #FFE7B0, #F2C14E 60%, #D9941F); opacity: .9; }
.hero-art .leaf { position: absolute; width: 130px; height: 90px; right: 150px; top: 4px; background: var(--leaf); border-radius: 0 100% 0 100%; transform: rotate(-18deg); opacity: .16; }
@media (max-width: 900px) { .hero-art { display: none; } }

/* ---------- layout ---------- */
.page { padding: 34px 0 70px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 54px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 30px; } }

.prose > h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  letter-spacing: -.015em; line-height: 1.2;
  margin: 2.4em 0 .55em; padding-top: .1em; scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose > h2:first-child { margin-top: 0; }
.prose > h2 .h2-num {
  display: inline-block; font-family: var(--font-mono); font-size: .62em; font-weight: 500;
  color: var(--accent); vertical-align: .28em; margin-right: .55em; letter-spacing: 0;
}
.prose h3 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; margin: 1.8em 0 .4em; }
.prose p { margin: 0 0 1.05em; max-width: 68ch; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.35em; max-width: 66ch; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose em { color: var(--ink-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.anchor-link {
  opacity: 0; margin-left: .35em; font-size: .62em; color: var(--accent);
  text-decoration: none; vertical-align: .15em; transition: opacity .15s;
}
h2:hover .anchor-link, h3:hover .anchor-link { opacity: 1; }

/* ---------- infobox ---------- */
.infobox {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-md); margin: 0 0 30px;
}
.infobox-title {
  font-family: var(--font-display); font-size: 1.16rem; margin: 0 0 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.infobox-art {
  height: 150px; border-radius: 14px; margin-bottom: 16px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(140deg, #F6C177, #E4713B 58%, #C4452A);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.infobox-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 78% 82%, rgba(0,0,0,.18), transparent 60%);
}
.infobox-art svg { width: 84px; height: 84px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.18)); position: relative; z-index: 1; }
.infobox dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14.2px; }
.infobox dt { color: var(--muted); white-space: nowrap; }
.infobox dd { margin: 0; color: var(--ink); }
.infobox dd a { color: var(--leaf); }

/* ---------- TOC ---------- */
.toc {
  position: sticky; top: calc(var(--header-h) + 22px);
  font-size: 14.2px; border-left: 1px solid var(--line); padding-left: 18px;
}
.toc-title {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: block; padding: 5px 0 5px 0; color: var(--muted); text-decoration: none;
  line-height: 1.35; border-left: 2px solid transparent; margin-left: -19px; padding-left: 17px;
}
.toc a::before { content: counter(toc) ". "; font-family: var(--font-mono); font-size: 11.5px; color: color-mix(in srgb, var(--muted) 70%, transparent); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.toc .toc-extra { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.toc .toc-extra a { border-left: 0; margin-left: 0; padding-left: 0; color: var(--leaf); font-weight: 500; }
@media (max-width: 1000px) { .toc { position: static; border-left: 0; padding: 0; } }

/* ---------- cards & grids ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  min-height: 88px;
}
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-tile {
  width: 54px; height: 54px; flex: none; border-radius: 13px; display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.6), transparent 58%), var(--tint, var(--surface-2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), var(--shadow-sm);
  color: #2B1B10; font-family: var(--font-display); font-weight: 600; font-size: 22px;
}
.card-tile.is-emoji { font-size: 26px; font-family: var(--font-body); }
.card-body { min-width: 0; }
.card-title { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.card-desc { display: block; font-size: 13.4px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.card-tag { display: inline-block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--leaf); font-weight: 600; margin-top: 6px; }

/* category cards */
.cat-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-card .cat-top { display: flex; align-items: center; gap: 12px; }
.cat-card .cat-emoji { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.cat-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.cat-card p { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.cat-card .cat-count { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* ---------- callouts ---------- */
.callout {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  margin: 1.5em 0; font-size: 15px; color: var(--ink-soft);
}
.callout .co-icon { flex: none; width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.callout.green { border-left-color: var(--leaf); }
.callout.green .co-icon { color: var(--leaf); }
.callout.orange { border-left-color: var(--accent); }
.callout.orange .co-icon { color: var(--accent); }
.callout p { margin: 0; max-width: none; }
.callout strong { color: var(--ink); }

/* ---------- nutrition ---------- */
.nutri { display: grid; gap: 14px; margin: 1.6em 0; }
.nutri-row { display: grid; grid-template-columns: 118px 1fr 74px; align-items: center; gap: 14px; font-size: 14.5px; }
.nutri-row .n-label { color: var(--ink-soft); }
.nutri-row .n-bar { height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.nutri-row .n-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--accent)); }
.nutri-row .n-val { font-family: var(--font-mono); font-size: 13px; color: var(--ink); text-align: right; }
.nutri-total { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.nutri-total b { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); }
.nutri-total span { color: var(--muted); font-size: 14px; }

/* ---------- chips list ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 1em 0 1.4em; }
.chips span {
  font-size: 13px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 1.4em 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.6px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td .arrow { color: var(--accent); font-weight: 600; margin: 0 6px; }
td code { font-family: var(--font-mono); font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ---------- gallery / fruit grid ---------- */
.fruit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.fruit-card {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.fruit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fruit-card .fc-art {
  height: 104px; display: grid; place-items: center; font-size: 44px;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), transparent 60%),
    var(--tint, var(--surface-2));
}
.fruit-card .fc-art.is-glyph { font-family: var(--font-display); font-weight: 600; font-size: 38px; color: rgba(43,27,16,.72); }
.fruit-card .fc-name { padding: 10px 12px 12px; font-size: 14.2px; font-weight: 500; line-height: 1.3; }
.fruit-card .fc-name small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filter-btn {
  font: inherit; font-size: 14px; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-btn .cnt { font-family: var(--font-mono); font-size: 11.5px; opacity: .7; margin-left: 5px; }

.catalog-search { position: relative; margin: 0 0 18px; max-width: 420px; }
.catalog-search input {
  width: 100%; height: 46px; padding: 0 14px 0 42px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
}
.catalog-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.catalog-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.catalog-count { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); display: none; }
.empty-state.is-open { display: block; }

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: 13.2px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }

/* ---------- article hero (fruit page) ---------- */
.article-head { display: flex; gap: 24px; align-items: center; margin-bottom: 8px; }
.article-head .ah-tile {
  width: 92px; height: 92px; flex: none; border-radius: 24px; display: grid; place-items: center;
  font-size: 46px; background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.6), transparent 58%), var(--tint);
  box-shadow: var(--shadow-md);
}
.article-head .ah-tile.is-glyph { font-family: var(--font-display); font-weight: 600; font-size: 42px; color: rgba(43,27,16,.7); }
.article-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.article-head .ah-cat { margin-top: 8px; }
@media (max-width: 560px) {
  .article-head { gap: 16px; }
  .article-head .ah-tile { width: 68px; height: 68px; font-size: 34px; border-radius: 18px; }
}

.lede { font-size: 1.16rem; line-height: 1.6; color: var(--ink-soft); margin: 22px 0 26px; max-width: 62ch; }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0 0; }
.prevnext a {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; background: var(--surface); box-shadow: var(--shadow-sm);
}
.prevnext a:hover { border-color: var(--accent); }
.prevnext .pn-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.prevnext .pn-name { display: block; font-weight: 600; color: var(--ink); margin-top: 3px; font-size: 15px; }
.prevnext .pn-next { text-align: right; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--bg-soft));
  padding: 42px 0 34px; margin-top: 20px; font-size: 14px; color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.site-footer .f-brand { font-family: var(--font-display); font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.site-footer h4 { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- misc ---------- */
.pill-link {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 14.5px; font-weight: 500; color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); padding-bottom: 2px;
}
.pill-link:hover { border-color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 26px 0 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; color: var(--ink); }
.stat span { font-size: 12.5px; color: var(--muted); display: block; margin-top: 5px; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; background: var(--leaf-soft); color: var(--leaf); }

@media (max-width: 700px) {
  body { font-size: 16.2px; }
  .hero { padding-top: 34px; }
  .page { padding-top: 24px; }
}

/* print */
@media print {
  .site-header, .toc, .site-footer, .prevnext, .filters { display: none !important; }
  body { background: #fff; }
  .layout { grid-template-columns: 1fr; }
}
