/* Оформление сайта eidos.fund (задание S2): журнальный, контрастный вид. Цвета, шрифты и размеры — только из
   tokens.css, шрифты — fonts.css. Тёмные разделы (главный экран, проект, контакты, подвал) чередуются со светлыми
   на тёплой бумаге (миссия, принципы, о фонде). Красный — скупо: линии, цифры, ссылки, кнопка. Ни скруглённых
   карточек с тенями, ни градиентных кнопок. Встроенных style="" нет — CSP. */

/* ---------------------------------------------------------------- основа */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--ink-950); }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-text); font-size: var(--fs-text); line-height: 1.65; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-wrap: break-word; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
a, summary { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--on-dark); }
section[id] { scroll-margin-top: var(--header); }

/* Фокус с клавиатуры: красный, на светлом и тёмном — свой оттенок. */
:root { --focus: var(--accent-on-paper); }
.dark, .hero, .project, .contacts, .site-header, .site-footer, .nf-page { --focus: var(--accent-on-dark); }
:where(a, summary, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }

.container { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.icon { width: 22px; height: 22px; flex: none; display: block; }

h1, h2, h3, h4, .display, .quote { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -.015em; }
h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.01em; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: 1.4rem; line-height: 1.25; }
p { text-wrap: pretty; }

/* Надзаголовок: прописные с разрядкой, перед ним — короткая красная черта. */
.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: var(--fs-kicker); font-weight: 600; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-on-paper); }
.kicker::before { content: ""; flex: none; width: 32px; height: 2px; background: var(--accent); }
.hero .kicker, .project .kicker, .contacts .kicker, .pp-hero .kicker, .dark .kicker { color: var(--on-dark-soft); }

.lead { max-width: 30em; font-size: var(--fs-lead); line-height: 1.55; }

.section { position: relative; padding-block: var(--section); }
.paper { background: var(--paper); color: var(--text); }
.paper-2 { background: var(--paper-2); color: var(--text); }

/* Узор сети — бледной «молекулой» в углу раздела (миссия; контакты без фотографии — светлым на тёмном). */
.mission, .contacts--network { overflow: hidden; isolation: isolate; }
.mission::before, .contacts--network::before { content: ""; position: absolute; z-index: -1; pointer-events: none; background: url(/assets/network.svg) no-repeat center / contain; }
.mission::before { width: clamp(420px, 52vw, 820px); aspect-ratio: 1; top: -12%; right: -14%; opacity: .07; }
.contacts--network::before { width: clamp(480px, 60vw, 960px); aspect-ratio: 1; bottom: -30%; left: -18%; opacity: .1; filter: invert(1); }

/* ---------------------------------------------------------------- переход к содержимому */
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; background: var(--on-dark); color: var(--ink-950); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- шапка */
/* Поверх главного экрана. Без JS — сразу полупрозрачный тёмный фон; с JS (html.js) у верха страницы — прозрачная,
   при прокрутке site.js ставит .is-scrolled: тёмный фон с размытием и волосяная линия снизу. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--on-dark); background: rgb(var(--veil) / .9); border-bottom: 1px solid var(--line-dark); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.js .site-header:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-row { position: relative; height: var(--header); display: flex; align-items: center; gap: 36px; }
.brand { flex: none; display: inline-flex; align-items: center; }
.brand .emblem { width: auto; height: 42px; }
.desktop-nav { display: flex; gap: 32px; margin-left: auto; font-size: .9375rem; }
.desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark-soft); text-decoration: none; white-space: nowrap; background: linear-gradient(var(--accent), var(--accent)) no-repeat left calc(100% - 8px) / 0 1px; transition: color var(--speed) var(--ease), background-size var(--speed) var(--ease); }
.desktop-nav a:hover { color: var(--on-dark); background-size: 100% 1px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-nav { display: none; }

/* Список языков: кнопка — название текущего языка и шеврон; список — под кнопкой по её правому краю. */
.lang-menu { position: relative; flex: none; }
.lang-menu > summary { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 14px; border: 1px solid var(--line-dark); color: var(--on-dark-soft); font-size: .875rem; letter-spacing: .02em; white-space: nowrap; transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--on-dark); border-color: rgba(255, 255, 255, .4); }
.lang-menu > summary > .icon { width: 16px; height: 16px; transition: transform var(--speed) var(--ease); }
.lang-menu[open] > summary > .icon { transform: rotate(180deg); }
.lang-menu__list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: flex; flex-direction: column; min-width: 190px; padding: 6px 0; border: 1px solid var(--line-dark); background: var(--ink-900); }
.lang-menu__list a { display: flex; align-items: center; min-height: 46px; padding: 8px 18px; color: var(--on-dark-soft); font-size: .9375rem; text-decoration: none; transition: color var(--speed) var(--ease), background var(--speed) var(--ease); }
.lang-menu__list a:hover { color: var(--on-dark); background: rgba(255, 255, 255, .05); }
.lang-menu__list a[aria-current] { color: var(--on-dark); box-shadow: inset 2px 0 0 var(--accent); }

/* ---------------------------------------------------------------- кнопки */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 14px 28px; border: 1px solid transparent; font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: .01em; text-align: center; text-decoration: none; transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease); }
.button--primary { background: var(--button); color: var(--on-dark); }
.button--primary:hover { background: var(--button-hover); }
.button--ghost { border-color: rgba(244, 241, 234, .45); color: var(--on-dark); }
.button--ghost:hover { border-color: var(--on-dark); background: rgba(244, 241, 234, .08); }

/* ---------------------------------------------------------------- главный экран */
.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; background: var(--ink-950); color: var(--on-dark); overflow: hidden; }
.hero__veil { position: absolute; inset: 0; }
/* Королева — вертикальный кадр на глухом чёрном: справа, во всю высоту экрана (чуть выше — отражение уходит под
   факты). Чёрный кадра поднят в tools/images.cjs до чистого, а screen слоя над фоном --ink-950 даёт этот же фон —
   границы кадра нет (смешивание — у самого слоя: он создаёт контекст наложения, и screen у <img> внутри смешал бы
   кадр с пустотой); мягкая маска по краям — запас на остаточный шум. */
.hero__media { position: absolute; z-index: -2; mix-blend-mode: screen; top: 0; right: max(0px, (100% - var(--max)) / 2 - 2vw); height: 106%; aspect-ratio: 2 / 3; max-width: 70%; }
.hero__media picture, .hero__media img { width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: 50% 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 72%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 72%, transparent 96%);
  mask-composite: intersect; }
/* Вуаль: снизу — под полосу фактов, сверху — под шапку; слева текст и так на чистом тёмном. */
.hero__veil { z-index: -1; background:
  linear-gradient(90deg, rgb(var(--veil) / 1) 0%, rgb(var(--veil) / .85) 34%, rgb(var(--veil) / 0) 58%),
  linear-gradient(0deg, rgb(var(--veil) / .95) 0%, rgb(var(--veil) / .4) 14%, rgb(var(--veil) / 0) 30%),
  linear-gradient(180deg, rgb(var(--veil) / .5) 0%, rgb(var(--veil) / 0) 140px); }
.hero__inner { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; padding-top: calc(var(--header) + 40px); }
.hero__copy { max-width: 44rem; margin-block: auto; padding-block: 32px 56px; }
.hero h1 { max-width: 14ch; }
.hero__lead { max-width: 34em; margin-top: 28px; color: var(--on-dark-soft); font-size: var(--fs-lead); line-height: 1.55; }

/* Полоса фактов: значение — Playfair, подпись — мелко; между фактами — волосяные линии. */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-dark); }
.fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: 26px 28px 36px; border-left: 1px solid var(--line-dark); }
.fact:first-child { padding-left: 0; border-left: 0; }
.fact dd { font-family: var(--font-display); font-size: clamp(2.2rem, 1.6rem + 1.4vw, 3rem); font-weight: 500; line-height: 1; white-space: nowrap; color: var(--on-dark); }
.fact dt { max-width: 22ch; color: var(--on-dark-muted); font-size: var(--fs-small); line-height: 1.45; }

/* ---------------------------------------------------------------- миссия */
.mission__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "photo head" "photo body"; grid-template-rows: auto 1fr; column-gap: clamp(48px, 7vw, 112px); }
.mission__head { grid-area: head; }
.mission__photo { grid-area: photo; position: relative; align-self: start; margin: 0 24px 24px 0; }
.mission__photo::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 1px solid var(--accent); z-index: 0; }
.mission__photo picture { position: relative; z-index: 1; aspect-ratio: 4 / 5; background: var(--paper-2); }
.mission__photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--sprout-focus, 50% 50%); }
.mission__body { grid-area: body; max-width: var(--measure); }
.mission__body p + p { margin-top: 1.1em; }

/* Цитата: курсив Playfair, перед ней — большая красная кавычка украшением. */
.quote, .epigraph blockquote { position: relative; font-family: var(--font-display); font-style: italic; font-weight: 500; }
.quote { margin: 8px 0 40px; padding-top: .55em; font-size: var(--fs-quote); line-height: 1.16; letter-spacing: -.005em; }
.quote::before, .epigraph blockquote::before { content: "\201C"; position: absolute; left: -.04em; top: 0; font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 2.6em; line-height: .8; color: var(--accent); pointer-events: none; }
.quote::before { top: -.18em; font-size: 2.4em; }
.sign { display: flex; align-items: center; gap: 14px; margin-top: 2em !important; font-family: var(--font-display); font-style: italic; font-size: 1.35rem; }
.sign img { width: 34px; height: 34px; }

/* ---------------------------------------------------------------- проект */
.project { background: var(--ink-950); color: var(--on-dark); }
.project__cover { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 72vh; min-height: 72svh; overflow: hidden; }
.project__cover > picture { position: absolute; inset: 0; z-index: -2; }
.project__cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.project__veil { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgb(var(--veil) / 0) 0%, rgb(var(--veil) / .06) 30%, rgb(var(--veil) / .62) 58%, rgb(var(--veil) / .94) 80%, rgb(var(--veil) / 1) 100%); }
.project__head { padding-block: calc(var(--header) + 48px) clamp(40px, 5vw, 72px); }
.display { font-size: var(--fs-display); font-weight: 600; line-height: .98; letter-spacing: -.02em; }
.project__body { padding-block: clamp(8px, 1.5vw, 24px) var(--section); }
.project__body > .lead { color: var(--on-dark-soft); }

/* «Почему сейчас» и цитата Королевы — две колонки между вводным абзацем и целями. */
.project__why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(48px, 7vw, 112px); align-items: start; margin: clamp(64px, 8vw, 112px) 0; padding-top: clamp(48px, 5vw, 72px); border-top: 1px solid var(--line-dark); }
.why { max-width: 36em; }
.why h3 { color: var(--on-dark); }
.why p { margin-top: 16px; color: var(--on-dark-soft); }
.epigraph blockquote { padding-top: .7em; font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.5rem); line-height: 1.24; }
.epigraph blockquote::before { left: -.04em; top: -.12em; }
.epigraph figcaption { display: flex; align-items: center; gap: 14px; margin-top: 28px; color: var(--on-dark-muted); font-size: var(--fs-small); letter-spacing: .02em; }
.epigraph figcaption::before { content: ""; flex: none; width: 32px; height: 1px; background: var(--accent); }
.epigraph cite { font-style: normal; }

.label { font-size: var(--fs-h3); font-weight: 500; color: var(--on-dark); }
.goals { counter-reset: goal; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 36px; }
.goal { counter-increment: goal; position: relative; padding: 32px 32px 8px; border-left: 1px solid var(--line-dark); border-top: 2px solid var(--accent); transition: background var(--speed) var(--ease); }
.goal:first-child { padding-left: 0; border-left: 0; }
.goal::before { content: counter(goal, decimal-leading-zero); display: block; margin-bottom: 20px; font-family: var(--font-display); font-size: clamp(2.8rem, 2rem + 2vw, 4rem); font-weight: 500; line-height: 1; color: var(--accent); }
.goal h4 { color: var(--on-dark); }
.goal p { margin-top: 14px; color: var(--on-dark-muted); }

/* ---------------------------------------------------------------- принципы */
.principles__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.principle { padding: 36px 36px 0; border-left: 1px solid var(--line); }
.principle:first-child { padding-left: 0; border-left: 0; }
.principle h3 { font-weight: 600; }
.principle p { margin-top: 16px; color: var(--text-muted); }

/* ---------------------------------------------------------------- полоса-разделитель */
.band { position: relative; height: clamp(260px, 45vh, 520px); background: var(--ink-950); overflow: hidden; }
.band picture, .band img { width: 100%; height: 100%; }
.band img { object-fit: cover; object-position: var(--band-focus, 50% 50%); }
.band__veil { position: absolute; inset: 0; background: rgb(var(--veil) / .22); }

/* ---------------------------------------------------------------- о фонде */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 112px); align-items: start; }
.about__aside { position: sticky; top: calc(var(--header) + 32px); }
.about__aside .lead { margin-top: 28px; color: var(--text); }
.about__main { max-width: var(--measure); padding-top: 8px; }
.about__main h3 { margin: 48px 0 14px; }
.gov { margin-top: 56px; padding: 4px 0 4px 32px; border-left: 2px solid var(--accent); }
.about__main .gov h3 { margin-top: 0; }
.gov p { margin-top: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------- контакты */
.contacts { position: relative; isolation: isolate; padding-block: var(--section); background: var(--ink-950); color: var(--on-dark); overflow: hidden; }
.contacts > picture { position: absolute; inset: 0; z-index: -2; }
.contacts > picture img { width: 100%; height: 100%; object-fit: cover; object-position: var(--board-focus, 50% 50%); }
.contacts--photo .contacts__veil { position: absolute; inset: 0; z-index: -1; background: rgb(var(--veil) / .88); }
.contacts__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(48px, 7vw, 112px); align-items: start; }
.contacts__main .lead { margin-top: 24px; color: var(--on-dark-soft); }
.mail { display: inline-block; margin-top: 40px; font-family: var(--font-display); font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem); font-weight: 500; line-height: 1.15; color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; overflow-wrap: anywhere; transition: color var(--speed) var(--ease); }
.mail:hover { color: var(--accent-on-dark); }
/* Телефон и значки мессенджеров у номера. Цвета значков — фирменные (Telegram #229ed9, Viber #7360f2): так их узнают. */
.phone { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.phone__label { color: var(--on-dark-muted); font-size: var(--fs-small); letter-spacing: .02em; }
.phone__number { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 500; line-height: 1.2; color: var(--on-dark); text-decoration: none; white-space: nowrap; }
.phone__number:hover { color: var(--accent-on-dark); }
.messengers { display: inline-flex; gap: 12px; }
.messenger { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; transition: transform .16s ease, filter .16s ease; }
.messenger:hover { transform: translateY(-2px); filter: brightness(1.12); }
/* Контур Telegram — диск с вырезанным самолётиком: белый кружок под ним делает самолётик белым. */
.messenger--telegram { background: radial-gradient(circle, #fff 0 84%, transparent 85%); }
.messenger--telegram .brand-icon { width: 46px; height: 46px; fill: #229ed9; }
.messenger--viber { background: #7360f2; }
.messenger--viber .brand-icon { width: 26px; height: 26px; fill: #fff; }
.contacts__req h3 { padding-bottom: 18px; color: var(--on-dark); }
.requisites { border-top: 1px solid var(--line-dark); }
.requisites > div { padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
.requisites dt { color: var(--on-dark-muted); font-size: .8125rem; letter-spacing: .02em; }
.requisites dd { margin-top: 2px; color: var(--on-dark); font-size: 1rem; }
.requisites a { color: var(--accent-on-dark); text-underline-offset: 3px; }

/* ---------------------------------------------------------------- подвал */
.site-footer { background: var(--ink-900); color: var(--on-dark-muted); border-top: 1px solid var(--line-dark); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-block: 40px; }
.brand--footer .emblem { height: 34px; }
.footer-text { font-size: var(--fs-small); }
.footer-photos { margin-top: 6px; font-size: .75rem; color: var(--on-dark-muted); opacity: .85; }

/* ---------------------------------------------------------------- 404 */
.nf-page { min-height: 100vh; min-height: 100svh; background: var(--ink-950); color: var(--on-dark); }
.nf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(48px, 7vw, 88px); min-height: 100vh; min-height: 100svh; padding: 64px var(--gutter); text-align: center; }
.brand--nf .emblem { height: 56px; }
.nf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(var(--max), 100%); border-top: 1px solid var(--line-dark); }
.nf-block { padding: 36px 28px 8px; border-left: 1px solid var(--line-dark); }
.nf-block:first-child { border-left: 0; }
.nf-block h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1.15; }
.nf-block p { margin-top: 12px; color: var(--on-dark-muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; color: var(--accent-on-dark); text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- движение */
/* Появление при прокрутке — только где есть animation-timeline: view() (без JS и без мерцания); при
   prefers-reduced-motion — без анимаций. */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .mission__photo, .mission__body, .epigraph, .goal, .principle, .gov, .contacts__req {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- адаптивность */
/* Планшет и узкий ноутбук: разделы шапки — в меню ☰; сетки — уже. */
@media (max-width: 999px) {
  /* Королева уходит вправо за край, под текстом — плотная вуаль: фигура не спорит с вводным абзацем. */
  .hero__media { right: -22%; }
  .hero__copy { max-width: 60%; }
  .hero__veil { background:
    linear-gradient(90deg, rgb(var(--veil) / 1) 0%, rgb(var(--veil) / .9) 48%, rgb(var(--veil) / .3) 66%, rgb(var(--veil) / 0) 80%),
    linear-gradient(0deg, rgb(var(--veil) / .95) 0%, rgb(var(--veil) / .4) 14%, rgb(var(--veil) / 0) 30%),
    linear-gradient(180deg, rgb(var(--veil) / .5) 0%, rgb(var(--veil) / 0) 140px); }
  .desktop-nav { display: none; }
  .header-actions { margin-left: auto; }
  .mobile-nav { display: block; }
  .mobile-nav > summary { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-dark); color: var(--on-dark); }
  .mobile-nav > summary > .icon:last-child, .mobile-nav[open] > summary > .icon:first-child { display: none; }
  .mobile-nav[open] > summary > .icon:last-child { display: block; }
  .mobile-nav nav { position: absolute; left: 0; right: 0; top: calc(100% + 1px); display: flex; flex-direction: column; padding: 8px 24px 16px; border: 1px solid var(--line-dark); background: var(--ink-900); }
  .mobile-nav nav > a { display: flex; align-items: center; min-height: 54px; border-bottom: 1px solid var(--line-dark); font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; }
  .mobile-nav nav > a:last-child { border-bottom: 0; }
  .goals { grid-template-columns: 1fr; }
  .goal, .goal:first-child { padding: 28px 0 32px; border-left: 0; }
  .goal::before { margin-bottom: 14px; }
}

@media (max-width: 859px) {
  .mission__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "photo" "body"; }
  .mission__photo { max-width: 520px; margin: 0 24px 64px 0; }
  .about__grid, .contacts__grid { grid-template-columns: minmax(0, 1fr); }
  .about__aside { position: static; }
  .about__main { padding-top: 32px; }
  .contacts__req { margin-top: 72px; }
  .project__why { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .principles__grid { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .principle, .principle:first-child { padding: 28px 0 32px; border-left: 0; border-top: 1px solid var(--line); }
  .nf-grid { grid-template-columns: minmax(0, 1fr); }
  .nf-block { border-left: 0; border-top: 1px solid var(--line-dark); padding: 28px 0 4px; }
  .nf-block:first-child { border-top: 0; }
}

/* Телефон: фотография главного экрана — сверху (вертикальная обрезка), текст — под ней на тёмном. */
@media (max-width: 719px) {
  .header-row { gap: 12px; }
  .brand .emblem { height: 34px; }
  .lang-menu > summary { padding: 0 8px 0 12px; }
  .hero__media { top: calc(var(--header) - 8px); right: 50%; transform: translateX(50%); height: 44svh; max-width: none; }
  .hero__veil { background:
    linear-gradient(180deg, rgb(var(--veil) / .5) 0%, rgb(var(--veil) / 0) 12%, rgb(var(--veil) / 0) 38%, rgb(var(--veil) / .9) 50%, rgb(var(--veil) / 1) 56%); }
  .contacts--photo .contacts__veil { background: rgb(var(--veil) / .9); }
  .hero__inner { padding-top: calc(var(--header) + 38svh); }
  .hero__copy { max-width: none; margin-block: 0 auto; padding-block: 0 48px; }
  .hero__lead { margin-top: 20px; }
  .actions { flex-direction: column; margin-top: 32px; }
  .button { width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
  .fact, .fact:first-child { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 18px; padding: 16px 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .fact:first-child { border-top: 0; }
  .fact dd { order: -1; min-width: 4.2ch; font-size: 1.9rem; }
  .fact dt { max-width: none; }
  .project__cover { min-height: 62svh; }
  .gov { padding-left: 22px; }
  .epigraph blockquote { padding-top: .9em; }
  .footer-row { padding-block: 32px; }
}

/* ================================================================ страница проекта (S3) */
/* Длинное чтение в том же издании: те же токены, надзаголовки, линии и чередование тёмного и светлого; главная
   забота — удобно читать: колонка текста до ~68 знаков, абзацы 1.125rem / 1.7, воздух между разделами. */
.project__more { margin-top: 48px; }
.dark { background: var(--ink-950); color: var(--on-dark); }
.dark h2 { color: var(--on-dark); }
.narrow { max-width: 860px; }
.prose p { max-width: var(--measure); font-size: 1.125rem; line-height: 1.7; }
.prose p + p { margin-top: 1.1em; }
.pp h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.pp h2::after { content: ""; display: block; width: 48px; height: 2px; margin-top: 22px; background: var(--accent); }

/* Ссылка на главную — мелко, со стрелкой, над надзаголовком. */
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 28px; color: var(--on-dark-soft); font-size: var(--fs-small); text-decoration: none; transition: color var(--speed) var(--ease); }
.back .icon { width: 18px; height: 18px; transition: transform var(--speed) var(--ease); }
.back:hover { color: var(--on-dark); }
.back:hover .icon { transform: translateX(-3px); }

/* Главный экран: шахматные фигуры под вуалью, текст слева на чистом тёмном. */
.pp-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 78vh; min-height: 78svh; background: var(--ink-950); color: var(--on-dark); overflow: hidden; }
.pp-hero > picture { position: absolute; inset: 0; z-index: -2; }
.pp-hero > picture img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.pp-hero__veil { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgb(var(--veil) / 1) 0%, rgb(var(--veil) / .92) 36%, rgb(var(--veil) / .45) 70%, rgb(var(--veil) / .25) 100%),
  linear-gradient(0deg, rgb(var(--veil) / .9) 0%, rgb(var(--veil) / 0) 40%),
  linear-gradient(180deg, rgb(var(--veil) / .6) 0%, rgb(var(--veil) / 0) 160px); }
.pp-hero__inner { padding-block: calc(var(--header) + 56px) clamp(56px, 8vw, 112px); }
.pp-hero h1 { font-size: var(--fs-display); line-height: .98; letter-spacing: -.02em; }
.pp-hero__slogan { max-width: 22em; margin-top: 28px; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); line-height: 1.2; color: var(--on-dark); }
.pp-hero__lead { max-width: 36em; margin-top: 28px; color: var(--on-dark-soft); font-size: var(--fs-lead); line-height: 1.6; }

/* Липкий заголовок слева, текст справа — как «О фонде» на главной. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(48px, 7vw, 112px); align-items: start; }
.split__aside { position: sticky; top: calc(var(--header) + 32px); }

/* Что мы предлагаем: вводный абзац, абзац, обещание учителю — отдельной крупной фразой с красной линией слева. */
.pp-offer .lead { max-width: none; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.65rem); line-height: 1.5; color: var(--on-dark); }
.pp-offer__p2 { max-width: var(--measure); margin-top: 28px; font-size: 1.125rem; line-height: 1.7; color: var(--on-dark-soft); }
.promise { margin-top: clamp(48px, 6vw, 80px); padding: 6px 0 6px clamp(24px, 3vw, 40px); border-left: 3px solid var(--accent); font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.5rem); line-height: 1.25; color: var(--on-dark); }

/* Слово важнее суммы: сбоку большая красная кавычка украшением. */
.pp-word__inner { position: relative; padding-left: clamp(0px, 9vw, 140px); }
.pp-word__inner::before { content: "\201C"; position: absolute; left: 0; top: -.12em; font-family: var(--font-display); font-weight: 700; font-size: clamp(7rem, 5rem + 6vw, 12rem); line-height: 1; color: var(--accent); pointer-events: none; }

/* Кто благодарит — карточки, как цели на главной, четыре в ряд. */
.goal h3 { font-size: 1.4rem; line-height: 1.25; color: var(--on-dark); }
.goals--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: goal; }
.goals--4 .goal { padding-right: 24px; padding-left: 24px; }
.goals--4 .goal:first-child { padding-left: 0; }

/* Как у лучших университетов: фотография полосой, под ней текст на бумаге. */
.pp-uni__band { height: clamp(260px, 46vh, 540px); }
.pp-uni__band img { object-position: 50% 40%; }
.pp-uni__band .band__veil { background: rgb(var(--veil) / .08); }

/* Цепочки благодарности: текст и схема — узлы в духе эмблемы, связи со стрелками. */
.pp-chain__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: clamp(40px, 6vw, 96px); align-items: center; }
.chain { display: grid; grid-template-columns: auto 72px auto 72px auto; align-items: center; justify-content: center; margin: 0; padding: 40px 0; }
.chain svg { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chain__arrow { width: 72px; height: 18px; }
.chain__fork { width: 72px; height: 150px; }
.chain__down, .chain__fork-down { display: none; }
.chain__ends { display: grid; row-gap: 46px; }
.chain__node { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; text-align: center; }
.chain__dot { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--text); }
.chain__node--big .chain__dot { width: 40px; height: 40px; }
.chain__node--you .chain__dot { width: 40px; height: 40px; background: var(--accent); }
.chain__label { max-width: 9em; font-family: var(--font-display); font-size: 1.1rem; line-height: 1.2; }

/* Что из этого вырастет: библиотека под плотной вуалью; три тезиса крупно, четвёртый абзац — приглушённо. */
.pp-grow { isolation: isolate; overflow: hidden; }
.pp-grow > picture { position: absolute; inset: 0; z-index: -2; }
.pp-grow > picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.pp-grow__veil { position: absolute; inset: 0; z-index: -1; background: rgb(var(--veil) / .86); }
.theses { counter-reset: thesis; border-top: 1px solid var(--line-dark); }
.theses li { counter-increment: thesis; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 28px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--font-display); font-size: clamp(1.3rem, 1.05rem + 1vw, 1.85rem); line-height: 1.35; color: var(--on-dark); }
.theses li::before { content: counter(thesis, decimal-leading-zero); padding-top: .3em; font-size: 1.1rem; color: var(--accent-on-dark); }
.pp-grow__note { max-width: var(--measure); margin-top: 32px; color: var(--on-dark-muted); font-size: 1.0625rem; line-height: 1.7; }

/* Если поддержка пришла к вам: вводная фраза, абзац, самая крупная фраза раздела — курсивом с красной чертой сверху. */
.pp-got .lead { max-width: none; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.65rem); }
.pp-got__p1 { max-width: var(--measure); margin-top: 24px; font-size: 1.125rem; line-height: 1.7; }
.punch { margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 2px solid var(--accent); max-width: 24em; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.2rem); line-height: 1.18; }

/* Почему «Чёрная королева»: справа силуэт королевы, как на главном экране, поменьше. */
.pp-name { isolation: isolate; overflow: hidden; }
.pp-name__media { position: absolute; z-index: -1; top: 0; bottom: 0; right: max(0px, (100% - var(--max)) / 2); aspect-ratio: 2 / 3; height: 100%; max-width: 46%; mix-blend-mode: screen; }
.pp-name__media picture, .pp-name__media img { width: 100%; height: 100%; }
.pp-name__media img { object-fit: cover; object-position: 50% 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, transparent 0, #000 8%, #000 70%, transparent 96%);
  mask-composite: intersect; }
.pp-name__inner > * { max-width: 40rem; }
.pp-name .epigraph { margin-top: 8px; }
.pp-name__p1 { margin-top: 40px; font-size: 1.125rem; line-height: 1.7; color: var(--on-dark-soft); }
.pp-name .why { margin-top: clamp(48px, 6vw, 72px); padding-top: 36px; border-top: 1px solid var(--line-dark); }

/* Как это будет устроено: десять правил в две колонки; правила 5–8 — одна мысль, общий фон и красная линия слева. */
.rules { counter-reset: rule; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); }
.rules--5 { counter-reset: rule 4; }
.rules--9 { counter-reset: rule 8; }
.rule { counter-increment: rule; position: relative; padding: 26px 0 28px 52px; border-top: 1px solid var(--line); }
.rule::before { content: counter(rule, decimal-leading-zero); position: absolute; left: 0; top: 30px; font-family: var(--font-display); font-size: 1.05rem; color: var(--accent-on-paper); }
.rule h3 { font-size: 1.35rem; }
.rule p { max-width: var(--measure); margin-top: 8px; color: var(--text-muted); font-size: 1.0625rem; line-height: 1.65; }
.rules-group { margin: 0 calc(-1 * clamp(16px, 2.5vw, 32px)); padding: 0 clamp(16px, 2.5vw, 32px); background: var(--paper-2); box-shadow: inset 3px 0 0 var(--accent); }
.rules-group .rule:nth-child(-n+2) { border-top-color: transparent; }
.rules-group + .rules .rule:nth-child(-n+2) { border-top-color: transparent; }

/* Что делает фонд и где мы сейчас — две колонки. */
.pp-fund__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(48px, 7vw, 112px); align-items: start; }

/* Призыв — по центру. */
.pp-cta { text-align: center; }
.pp-cta h2::after { margin-inline: auto; }
.pp-cta .lead { margin-inline: auto; color: var(--on-dark-soft); }
.pp-cta .actions { justify-content: center; }

/* «Мы ничего не выдумали»: таблица доводов, а не витрина — пары «принцип проекта — где он уже работает» без коробок,
   между парами волосяные линии; слева принцип крупно с красным номером, справа пример; цифра (если есть) — над
   названием примера, подпись рядом (справа от текста цифры вроде «40,6 млн грн» не помещались). На телефоне пара — столбиком, пример с отступом и тонкой линией слева. */
.pp-ex .lead { max-width: 36em; color: var(--text); }
.pairs__cols, .pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 6vw, 96px); }
.pairs__cols { margin-top: clamp(40px, 5vw, 64px); padding-bottom: 14px; font-size: var(--fs-kicker); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.pairs__cols > span:first-child { padding-left: 44px; }
.pairs__arrow { display: none; }
.pairs { counter-reset: pair; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--text); }
.pair { counter-increment: pair; align-items: start; padding: clamp(28px, 3.5vw, 44px) 0; border-bottom: 1px solid var(--line); }
.pair__take { position: relative; padding-left: 44px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.25rem + .8vw, 2rem); line-height: 1.2; text-wrap: balance; }
.pair__take::before { content: counter(pair, decimal-leading-zero); position: absolute; left: 0; top: .5em; font-size: .95rem; line-height: 1; color: var(--accent-on-paper); }
.pair__ex--fig { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "where" "fig" "name" "text" "source"; }
.pair__ex--fig > .pair__where { grid-area: where; }
.pair__ex--fig > .pair__name { grid-area: name; }
.pair__ex--fig > .pair__text { grid-area: text; }
.pair__ex--fig > .pair__source { grid-area: source; }
.pair__fig { grid-area: fig; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 14px 0 8px; }
.pair__fig-num { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.5rem, 2rem + 1.6vw, 3.5rem); line-height: 1; color: var(--accent); white-space: nowrap; }
.pair__fig-note { max-width: 16em; font-size: .8125rem; line-height: 1.4; color: var(--text-muted); }
.pair__where { display: flex; align-items: center; gap: 12px; padding-top: .45em; font-size: var(--fs-kicker); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.pair__where::before { content: ""; flex: none; width: 24px; height: 2px; background: var(--accent); }
.pair__name { margin-top: 12px; font-size: 1.35rem; line-height: 1.25; }
.pair__text { max-width: var(--measure); margin-top: 10px; font-size: 1.0625rem; line-height: 1.65; }
.pair__source { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px; color: var(--accent-on-paper); font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 3px; }
.pair__source:hover { color: var(--text); }
.pp-ex__note { max-width: var(--measure); margin-top: 28px; color: var(--text-muted); font-size: var(--fs-small); font-style: italic; }
@media (max-width: 859px) {
  .pairs__cols { display: flex; align-items: center; gap: 10px; }
  .pairs__cols > span:first-child { padding-left: 0; }
  .pairs__arrow { display: inline; color: var(--accent-on-paper); letter-spacing: 0; }
  .pair { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .pair__ex { margin-left: 44px; padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 719px) {
  .pair__ex { margin-left: 0; }
  .pair__take { padding-left: 36px; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .split__main, .promise, .pair, .goals--4 .goal, .chain, .theses li, .punch, .rule, .pp-fund__grid > * {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
  }
}

@media (max-width: 999px) {
  .goals--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goals--4 .goal, .goals--4 .goal:first-child { padding: 28px 24px 32px 0; border-left: 0; }
  .pp-chain__grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
}

@media (max-width: 859px) {
  .split, .pp-fund__grid { grid-template-columns: minmax(0, 1fr); }
  .split__aside { position: static; }
  .pp-fund__grid { row-gap: 56px; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules-group .rule:nth-child(2) { border-top-color: var(--line); }
  .rules-group + .rules .rule:nth-child(2) { border-top-color: var(--line); }
  .pp-name__media { bottom: auto; height: min(520px, 70svh); max-width: none; right: -34%; opacity: .26; }
}

@media (max-width: 719px) {
  .pp-hero { min-height: 82svh; }
  .pp-hero > picture img { object-position: 55% 50%; }
  .pp-hero__veil { background: linear-gradient(180deg, rgb(var(--veil) / .7) 0%, rgb(var(--veil) / .55) 35%, rgb(var(--veil) / .92) 62%, rgb(var(--veil) / 1) 100%); }
  .goals--4 { grid-template-columns: minmax(0, 1fr); }
  .pp-word__inner { padding-left: 0; padding-top: 72px; }
  .pp-word__inner::before { top: -.25em; font-size: 8rem; }
  .theses li { grid-template-columns: 40px minmax(0, 1fr); }
  .chain { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 6px; padding: 16px 0 8px; }
  .chain__arrow, .chain__fork { display: none; }
  .chain__down { display: block; width: 24px; height: 48px; }
  .chain__fork-down { display: block; width: 260px; height: 64px; }
  .chain__ends { grid-template-columns: repeat(2, 120px); justify-content: center; column-gap: 20px; }
  .rule { padding-left: 44px; }
}
