/* Лонгрид «Со скольки лет ребенок может гулять один».
   Основа — система n-e-n.ru (рваная бумага, зерно, коллаж, контурные номера), переведенная в светлую тему:
   фон — бумага, текст — чернила, акцент — оранжевый, сиреневый — редкий второй акцент. */

:root {
  --ink: #0c0b0a;
  --ink-2: #3a352d;
  --paper: #efe4cf;
  --paper-2: #e2d3b6;
  --paper-3: #f7f0e1;
  --orange: #fb6326;
  --orange-deep: #d9461a;
  --lilac: #b9a5ef;
  --muted: rgba(12, 11, 10, .62);
  --gutter: 16px;
  --wrap: min(1200px, calc(100% - var(--gutter) * 2));
  --font: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
/* Тема только светлая: и при системной темной, и при data-theme="dark" остается бумага */
:root[data-theme="dark"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
/* clip, а не hidden: пятна и коллаж выходят за край, но не дают горизонтальной прокрутки и не ломают sticky */
html { -webkit-text-size-adjust: 100%; background: var(--paper); overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 768px) { body { font-size: 20px; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
::selection { background: var(--orange); color: var(--ink); }
.wrap { width: var(--wrap); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Зерно, пятна фона, помеха ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background: url("img/grain.png"); opacity: .06; mix-blend-mode: multiply;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); } 67% { transform: translate(8%, 2%); } 83% { transform: translate(-7%, -4%); }
  100% { transform: translate(2%, 6%); }
}
.vignette { position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 60%, rgba(120, 90, 50, .16) 100%); }

/* Растровые пятна: оранжевые круги в точку, как на коллажах */
.dots {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--orange) 34%, transparent 36%);
  background-size: 9px 9px; opacity: .55;
}
.blob {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 36% 30%, #ff8a52, var(--orange) 55%, var(--orange-deep));
}
.blob--lilac { background: radial-gradient(circle at 36% 30%, #d4c6fa, var(--lilac) 60%, #9e88dc); }

/* ---------- Шапка ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .3s, backdrop-filter .3s;
}
.topbar.is-solid { background: rgba(239, 228, 207, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.01em; text-decoration: none; }
.brand b { color: var(--orange); }
.topbar__meta { font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; background: var(--orange); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Кнопка из рваной бумаги ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 12px;
  min-height: 62px; padding: 16px 34px 15px 28px;
  color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  rotate: -2deg; filter: drop-shadow(0 8px 10px rgba(80, 50, 20, .28));
  transition: rotate .25s, scale .15s;
}
.btn__paper { position: absolute; inset: 0; z-index: -1; background-color: var(--orange); background-image: url("img/grain.png"); background-blend-mode: soft-light; }
.btn::before { content: ""; position: absolute; top: -11px; left: 50%; width: 76px; height: 24px; translate: -50% 0; rotate: 4deg; background: rgba(255, 250, 238, .7); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.btn svg { width: 20px; height: 20px; flex: none; }
/* Наведение только поворачивает бумажку на месте: цель не смещается, курсор не слетает */
.btn:hover { rotate: 0deg; }
.btn:active { scale: .96; }
.btn:focus-visible { outline: 3px dashed var(--ink); outline-offset: 6px; }

/* ---------- Первый экран ---------- */
.hero { position: relative; padding: 104px 0 10px; overflow: hidden; isolation: isolate; }
@media (min-width: 768px) { .hero { padding-top: 132px; } }
.edge-label {
  position: absolute; left: calc(var(--gutter) / 2 - 2px); top: 128px; z-index: 5;
  writing-mode: vertical-rl; rotate: 180deg;
  color: var(--orange-deep); font-weight: 700; font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
}
@media (max-width: 767px) { .edge-label { display: none; } }
.hero__text { position: relative; z-index: 3; }
.title {
  margin: 0 0 .25em;
  font-weight: 800; font-size: clamp(34px, 10.4vw, 138px); line-height: .88; letter-spacing: -.02em; text-transform: uppercase;
}
@media (min-width: 900px) { .title { font-size: min(8.6vw, 138px); } }
/* Маска строки с запасом снизу: у «Д», «Щ», «Ц» выносные элементы, при .04em их срезало */
.title__line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.1em; }
/* строка заголовка не переносится («ЛЕТ» уезжало на свою строку в широком Safari); размер подгоняет fitTitle() */
.title__line > span { display: inline-block; white-space: nowrap; }
.title__accent { color: var(--orange); }
.subtitle { max-width: 24ch; margin-bottom: 24px; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.3; font-weight: 500; }
.stage { position: relative; }
.stage__copy { position: relative; z-index: 4; width: var(--wrap); margin: 0 auto; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 15px; color: var(--muted); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; filter: grayscale(1); border: 2px solid var(--paper-3); }
.byline b { color: var(--ink); font-weight: 700; }
.stage__board { position: relative; z-index: 1; width: 100%; aspect-ratio: 375 / 470; margin-top: 18px; }
@media (min-width: 900px) {
  .stage { aspect-ratio: 13 / 6; max-width: 1800px; margin: -2.4vw auto 0; }
  .stage__copy { position: absolute; left: 0; right: 0; top: 4%; }
  .stage__board { position: absolute; inset: 0; margin: 0; aspect-ratio: auto; }
}
.stage__board > * {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  rotate: calc(var(--r, 0deg) + var(--sr, 0deg));
}
@media (max-width: 899px) { .stage__board > * { left: var(--mx, var(--x)); top: var(--my, var(--y)); width: var(--mw, var(--w)); } }
.deco { pointer-events: none; }
.deco--moon { --x: 52%; --y: 2%; --w: 30%; --mx: 22%; --my: 0%; --mw: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ff8a52, var(--orange) 55%, var(--orange-deep)); }
.deco--lilac { --x: 80%; --y: 4%; --w: 8%; --mx: 76%; --my: 2%; --mw: 18%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #d4c6fa, var(--lilac) 60%, #9e88dc); }
.deco--dots { --x: 36%; --y: 58%; --w: 20%; --mx: 4%; --my: 70%; --mw: 40%; aspect-ratio: 1; border-radius: 50%;
  background-image: radial-gradient(circle, var(--orange) 34%, transparent 36%); background-size: 10px 10px; opacity: .6; }
/* зерно на полосах мягко (soft-light): в multiply бумага выглядела асфальтом */
.deco--strip-a, .deco--strip-b { background-color: var(--paper-2); background-image: url("img/grain.png"); background-blend-mode: soft-light; box-shadow: 0 6px 14px rgba(80, 50, 20, .12); }
.deco--strip-a { --x: -3%; --y: 55%; --w: 106%; --r: -2deg; --my: 50%; height: 10%; }
.deco--strip-b { --x: 30%; --y: 88%; --w: 78%; --r: 1.5deg; --mx: -4%; --my: 92%; --mw: 108%; height: 13%; }
.piece { display: block; padding: 7px; background: var(--paper-3);
  filter: drop-shadow(0 10px 14px rgba(80, 50, 20, .3)); }
.piece img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.piece--a { --x: 44%; --y: 8%; --w: 40%; --r: 2deg; --mx: 6%; --my: 6%; --mw: 86%; z-index: 2; }
.piece--b { --x: 33%; --y: 46%; --w: 22%; --r: -4deg; --mx: 2%; --my: 44%; --mw: 52%; z-index: 3; }
.piece--c { --x: 74%; --y: 44%; --w: 22%; --r: 4deg; --mx: 46%; --my: 52%; --mw: 52%; z-index: 3; }
.piece--d { --x: 56%; --y: 62%; --w: 19%; --r: -2deg; --mx: 24%; --my: 74%; --mw: 50%; z-index: 4; }
.tape { position: absolute; width: 74px; height: 22px; background: rgba(255, 250, 238, .72); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); z-index: 2; }
.piece .tape { top: -10px; left: 50%; translate: -50% 0; rotate: -5deg; }
.stage__credits { position: relative; z-index: 2; width: var(--wrap); margin: 16px auto 0; color: var(--muted); font-size: 12px; }
@media (min-width: 900px) { .stage__credits { position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0 auto; } }

/* ---------- Бумажные полосы ---------- */
.paper { position: relative; background: var(--paper-2); color: var(--ink); }
.paper::before { content: ""; position: absolute; inset: 0; background: url("img/grain.png"); mix-blend-mode: soft-light; opacity: .5; pointer-events: none; }
.paper--light { background: var(--paper-3); }
.lead-wrap { position: relative; z-index: 3; margin-top: -10px; }
.lead { padding: clamp(64px, 9vw, 128px) 0 clamp(64px, 8vw, 116px); }
.lead__grid { position: relative; display: grid; gap: 32px; }
@media (min-width: 960px) { .lead__grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.lead__intro { font-size: 18px; line-height: 1.6; }
.lead__main { font-size: clamp(26px, 3.3vw, 44px); line-height: 1.18; font-weight: 500; letter-spacing: -.01em; }
[data-scrub] .w { color: rgba(12, 11, 10, .14); filter: blur(1.5px); transition: color .3s, filter .3s; }
[data-scrub] .w.is-lit { color: var(--ink); filter: none; }
[data-scrub] .hot .w.is-lit { color: var(--orange-deep); }

/* ---------- Цифры ---------- */
.facts { position: relative; padding: clamp(64px, 8vw, 110px) 0 clamp(30px, 4vw, 60px); }
.facts__grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
/* minmax(0, …): колонки не подстраиваются под ширину счетчика, иначе соседи прыгают во время отсчета */
@media (min-width: 640px) { .facts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .facts__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact { position: relative; padding: 26px 22px 22px; background: var(--paper-3); rotate: var(--tilt, 0deg); filter: drop-shadow(0 8px 12px rgba(80, 50, 20, .18)); }
.fact__num { display: block; font-weight: 800; font-size: clamp(40px, 4.4vw, 60px); line-height: 1; letter-spacing: -.02em; color: var(--orange); white-space: nowrap; }
.fact__num small { font-size: .5em; }
.fact__txt { display: block; margin-top: 10px; font-size: 16px; line-height: 1.4; }

/* ---------- Автор ---------- */
.person { display: grid; gap: 28px; align-items: center; padding: clamp(56px, 8vw, 110px) 0; }
@media (min-width: 860px) { .person { grid-template-columns: 4fr 7fr; gap: 64px; } }
.photo { position: relative; margin: 0; width: min(70%, 300px); padding: 10px; background: var(--paper-3); rotate: var(--tilt, 0deg); justify-self: center;
  filter: drop-shadow(0 12px 18px rgba(80, 50, 20, .25)); }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) invert(var(--neg, 0)) brightness(var(--dev, 1)) contrast(1.08); }
.photo .tape { top: -10px; left: 30%; rotate: -8deg; }
.person__body p { font-size: 19px; line-height: 1.6; }
.person__body p + p { margin-top: 14px; }
.person__body strong { font-weight: 700; }
.sign { margin-top: 18px; color: var(--orange-deep); font-weight: 700; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Главы ---------- */
.chapters { position: relative; padding: clamp(30px, 5vw, 70px) 0 clamp(40px, 6vw, 80px); }
.section-title { margin: 0 0 clamp(40px, 6vw, 80px); font-weight: 800; font-size: clamp(54px, 12vw, 190px); line-height: .85; letter-spacing: -.03em; text-transform: uppercase; }
.ch { position: relative; scroll-margin-top: 80px; display: grid; gap: 28px; align-items: center; margin-bottom: clamp(72px, 10vw, 140px); }
@media (min-width: 900px) {
  /* minmax(0, …): правая колонка не растет вслед за счетчиком штрафа и не сжимает текст (прыжки абзацев, 06.11) */
  .ch { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; }
  .ch--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .ch--flip .ch__cover { order: -1; }
}
.ch__body { position: relative; }
.ch__ghost {
  position: absolute; right: 0; top: -.42em; z-index: -1;
  font-weight: 800; font-size: clamp(120px, 18vw, 260px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(12, 11, 10, .14);
  translate: 0 var(--gy, 0px); pointer-events: none; user-select: none;
}
.ch__title { margin: 0 0 20px; font-weight: 800; font-size: clamp(32px, 4.4vw, 60px); line-height: .95; letter-spacing: -.015em; text-transform: uppercase; }
.ch__title em { font-style: normal; color: var(--orange); }
.ch__text p { font-size: 18px; line-height: 1.62; color: var(--ink-2); }
@media (min-width: 768px) { .ch__text p { font-size: 20px; } }
.ch__text p + p, .ch__text p + ul, .ch__text ul + p { margin-top: 14px; }
.ch__text ul { margin: 14px 0 0; padding-left: 0; list-style: none; }
.ch__text li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.ch__text li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 6px; background: var(--orange); rotate: -8deg; }
.ch__text b, .ch__text strong { color: var(--ink); }
.ch__cover {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy2: 50%;
  position: relative; margin: 0; padding: 10px; background: var(--paper-3);
  transform: perspective(1000px) rotate(var(--tilt, 0deg)) rotateX(var(--rx)) rotateY(var(--ry));
  translate: 0 var(--sy, 0px); scale: var(--ss, 1); rotate: var(--srot, 0deg);
  filter: drop-shadow(0 16px 22px rgba(80, 50, 20, .28));
  will-change: transform;
}
.ch__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ch__cover .tape { top: -11px; right: 18%; rotate: 6deg; }
.ch__cover figcaption { margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.ch__cover.is-flicker img { animation: frame-flash 1.3s steps(1); }
@keyframes frame-flash { 0% { filter: brightness(1.6) contrast(.7); } 12% { filter: brightness(.55); } 24% { filter: brightness(1.3); } 36% { filter: brightness(.8); } 48%, 100% { filter: none; } }

/* Регионы и ступени — карточки из бумаги */
.cards { display: grid; gap: 14px; margin-top: 22px; }
.card { position: relative; padding: 16px 18px; background: var(--paper-3); border-left: 5px solid var(--orange); rotate: var(--tilt, 0deg); font-size: 17px; line-height: 1.45; color: var(--ink-2); filter: drop-shadow(0 6px 9px rgba(80, 50, 20, .14)); }
.card b { display: block; color: var(--ink); font-size: 19px; margin-bottom: 2px; }
.card--lilac { border-left-color: var(--lilac); }

.ladder { display: grid; gap: 12px; margin-top: 22px; counter-reset: step; }
.ladder li { counter-increment: step; position: relative; padding: 16px 18px 16px 70px; background: var(--paper-3); list-style: none; font-size: 17px; line-height: 1.45; color: var(--ink-2); margin-left: calc(var(--k, 0) * 18px); filter: drop-shadow(0 6px 9px rgba(80, 50, 20, .14)); }
.ladder li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 16px; top: 10px; font-weight: 800; font-size: 34px; line-height: 1; color: var(--orange); }
.ladder b { color: var(--ink); }
@media (max-width: 640px) { .ladder li { margin-left: 0; } }

.check { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.check li { position: relative; padding: 12px 14px 12px 52px; background: var(--paper-3); font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.check li svg { position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; }
.check li svg path { fill: none; stroke: var(--orange-deep); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* Таблица велосипеда */
.bike { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--paper-3); font-size: 16px; }
.bike th { text-align: left; padding: 12px 14px; background: var(--ink); color: var(--paper); font-weight: 700; letter-spacing: .04em; }
.bike td { padding: 12px 14px; border-top: 1px dashed rgba(12, 11, 10, .25); vertical-align: top; line-height: 1.45; color: var(--ink-2); }
.bike td:first-child { font-weight: 800; color: var(--orange-deep); white-space: nowrap; font-size: 18px; }

/* Часы: стрелки дорисовываются к 22:00 */
.clock { width: clamp(150px, 22vw, 230px); margin: 26px 0 0; }
.clock .face { fill: var(--paper-3); stroke: var(--ink); stroke-width: 4; }
.clock .tick { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.clock .hand { stroke: var(--ink); stroke-linecap: round; }
.clock .hand--h { stroke-width: 7; }
.clock .hand--m { stroke-width: 4.5; stroke: var(--orange-deep); }
.clock .pin { fill: var(--orange); }
.clock-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.clock-row p { flex: 1 1 220px; font-size: 18px; color: var(--ink-2); }

/* ---------- Мнение: бумажная плашка со скотчем ---------- */
.plaque {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  max-width: 820px; margin: clamp(30px, 5vw, 60px) auto; padding: 30px 28px 26px;
  background: var(--paper-3); rotate: var(--tilt, -1.2deg);
  filter: drop-shadow(0 14px 20px rgba(80, 50, 20, .22));
}
.plaque::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; translate: -50% 0; rotate: -3deg; background: rgba(185, 165, 239, .55); }
.plaque__ava { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.1); border: 3px solid var(--orange); }
.plaque__text p { font-size: clamp(19px, 2vw, 24px); line-height: 1.45; font-weight: 500; }
.plaque__text p + p { margin-top: 10px; }
.plaque .sign { margin-top: 14px; font-size: 13px; }
.plaque__mark { position: absolute; right: 18px; top: -26px; font-weight: 800; font-size: 110px; line-height: 1; color: var(--orange); opacity: .9; }
@media (max-width: 560px) { .plaque { grid-template-columns: 1fr; } .plaque__ava { width: 56px; height: 56px; } }

/* ---------- FAQ и источники ---------- */
.faq { padding: clamp(60px, 8vw, 110px) 0; }
.faq__title { margin: 0 0 30px; font-weight: 800; font-size: clamp(40px, 7vw, 96px); line-height: .9; letter-spacing: -.02em; text-transform: uppercase; }
.qa { border-top: 2px solid var(--ink); }
.qa:last-of-type { border-bottom: 2px solid var(--ink); }
.qa summary { display: flex; justify-content: space-between; gap: 18px; padding: 20px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: clamp(19px, 2vw, 24px); line-height: 1.3; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 800; transition: rotate .25s; }
.qa[open] summary::after { rotate: 45deg; }
.qa summary:focus-visible { outline: 2px dashed var(--orange); outline-offset: 4px; }
.qa p { padding: 0 0 22px; max-width: 70ch; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.qa[open] p { animation: unfold .35s ease-out; }
@keyframes unfold { from { opacity: 0; translate: 0 -8px; } }

.finale { position: relative; padding: clamp(60px, 8vw, 110px) 0 clamp(70px, 9vw, 120px); overflow: hidden; }
.finale__grid { display: grid; gap: 34px; align-items: center; }
@media (min-width: 900px) { .finale__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 60px; } }
.finale__text { font-size: clamp(22px, 2.5vw, 32px); line-height: 1.3; font-weight: 500; }

.reads { margin-top: 30px; }
.reads summary { display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.reads summary::-webkit-details-marker { display: none; }
.reads summary span { color: var(--muted); font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: 15px; }
.reads ol { margin: 10px 0 0; padding: 16px 18px 16px 36px; border-left: 2px solid var(--orange); background: rgba(12, 11, 10, .04); }
.reads li { font-size: 15px; line-height: 1.45; margin-bottom: 8px; color: var(--ink-2); }

.footer { padding: 34px 0 120px; font-size: 14px; color: var(--muted); }

/* ---------- Таб-бар глав ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(247, 240, 225, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(12, 11, 10, .12);
  translate: 0 110%; transition: translate .35s cubic-bezier(.2, .8, .2, 1);
}
.tabbar.is-on { translate: 0 0; }
.tab { display: flex; align-items: center; gap: 8px; padding: 6px; text-decoration: none; border-radius: 6px; min-width: 0; }
.tab img { width: 40px; height: 40px; object-fit: cover; flex: none; border: 2px solid var(--paper-3); }
.tab span { display: grid; min-width: 0; font-size: 13px; line-height: 1.2; }
.tab span b { color: var(--orange-deep); font-weight: 800; letter-spacing: .1em; font-size: 12px; }
.tab span i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab.is-active { background: rgba(251, 99, 38, .14); }
@media (max-width: 899px) { .tab span i { display: none; } .tab { justify-content: center; } .tab img { width: 34px; height: 34px; } }
@media (max-width: 480px) { .tab img { display: none; } .tab span { justify-items: center; } }

/* ---------- Появление ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); }
[data-reveal].is-in { animation: flicker-in 1.45s ease-out forwards; }
@keyframes flicker-in { 0% { opacity: 0; transform: translateY(18px); } 12% { opacity: .55; } 18% { opacity: .08; } 30% { opacity: .8; } 36% { opacity: .25; } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-reveal].is-in { animation: none; }
}

/* ---------- Печать (PDF): все видно, без фиксированных слоев ---------- */
html.is-print .grain, html.is-print .vignette, html.is-print .tabbar, html.is-print .progress { display: none; }
html.is-print .topbar { position: absolute; }
html.is-print [data-reveal] { opacity: 1; transform: none; animation: none; }
html.is-print [data-scrub] .w { color: inherit; filter: none; }
html.is-print [data-scrub] .hot .w { color: var(--orange-deep); }
@media print {
  @page { size: A4; margin: 0; }
  body { font-size: 16px; }
  .ch, .plaque, .fact, .card, .ladder li, .check li, .qa, .ch__cover, table, tr { page-break-inside: avoid; break-inside: avoid; }
  .ch { margin-bottom: 60px; }
  .section-title, .ch__title, .faq__title { page-break-after: avoid; break-after: avoid; }
}

/* ---------- Вырезки ножницами: фигуры с бумажной каймой (PNG с альфой, кайма в самой картинке) ---------- */
.cut { display: block; filter: drop-shadow(0 10px 12px rgba(80, 50, 20, .32)); }
.cut img { width: 100%; height: auto; }
.cut--mom     { --x: 83%; --y: 12%; --w: 11%; --r: 2deg;  --mx: 74%; --my: 18%; --mw: 24%; z-index: 5; }
.cut--boy     { --x: 26%; --y: 30%; --w: 10%; --r: -4deg; --mx: 0%;  --my: 30%; --mw: 25%; z-index: 6; }
.cut--teen    { --x: 66%; --y: 30%; --w: 9%;  --r: 3deg;  --mx: 52%; --my: 34%; --mw: 22%; z-index: 6; }
.cut--bike    { --x: 76%; --y: 70%; --w: 17%; --r: -3deg; --mx: 58%; --my: 78%; --mw: 40%; z-index: 7; }
.cut--clock   { --x: 46%; --y: 4%;  --w: 9%;  --r: 8deg;  --mx: 34%; --my: 2%;  --mw: 22%; z-index: 4; }
.cut--toddler { --x: 18%; --y: 62%; --w: 8%;  --r: -2deg; --mx: 6%;  --my: 66%; --mw: 18%; z-index: 7; }
@media (max-width: 899px) { .cut--teen, .piece--d { display: none; } }

/* Интерактив как у n-e-n: деталь приподнимается и выпрямляется, снизу всплывает ярлык главы.
   Масштаб растет только вверх (1.07), ярлык абсолютный — раскладка и цель под курсором не двигаются. */
.piece, .cut { transition: rotate .35s cubic-bezier(.2, .8, .2, 1), scale .35s cubic-bezier(.2, .8, .2, 1), filter .35s; -webkit-tap-highlight-color: transparent; }
.piece:hover, .piece:focus-visible, .cut:hover, .cut:focus-visible { z-index: 9; scale: 1.07; rotate: var(--sr, 0deg); filter: drop-shadow(0 22px 26px rgba(80, 50, 20, .42)); }
.piece:focus-visible, .cut:focus-visible { outline: 2px dashed var(--orange); outline-offset: 6px; }
.piece__tag {
  position: absolute; left: 50%; top: 100%; translate: -50% 4px; rotate: -2deg;
  padding: 6px 10px 5px; background: var(--ink); color: var(--paper-3);
  font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  opacity: 0; transition: opacity .2s, translate .25s; pointer-events: none; z-index: 3;
}
.piece__tag b { margin-right: 6px; color: var(--orange); font-weight: 800; }
.piece:hover .piece__tag, .piece:focus-visible .piece__tag, .cut:hover .piece__tag, .cut:focus-visible .piece__tag { opacity: 1; translate: -50% 12px; }
@media (hover: none) { .piece__tag { display: none; } }

/* Снимок рвется пополам при прокрутке */
[data-rip] { position: relative; }
[data-rip] .half { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
[data-rip] .half--l {
  clip-path: polygon(0 0, 51% 0, 48% 9%, 52% 17%, 47% 26%, 51% 34%, 46% 43%, 50% 51%, 47% 60%, 52% 68%, 48% 77%, 51% 86%, 47% 93%, 50% 100%, 0 100%);
  translate: calc(var(--tear, 0) * -26px) calc(var(--tear, 0) * 8px); rotate: calc(var(--tear, 0) * -6deg); transform-origin: 10% 100%;
}
[data-rip] .half--r {
  position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px);
  clip-path: polygon(51% 0, 100% 0, 100% 100%, 50% 100%, 47% 93%, 51% 86%, 48% 77%, 52% 68%, 47% 60%, 50% 51%, 46% 43%, 51% 34%, 47% 26%, 52% 17%, 48% 9%);
  translate: calc(var(--tear, 0) * 26px) calc(var(--tear, 0) * -6px); rotate: calc(var(--tear, 0) * 7deg); transform-origin: 90% 100%;
}

/* Штраф: было и стало */
.fines { display: grid; gap: 18px; align-content: center; }
.fine { padding: 22px 24px; background: var(--paper-3); filter: drop-shadow(0 10px 14px rgba(80, 50, 20, .2)); }
/* только подпись карточки; цифры счетчика внутри <b> — тоже span, им block нельзя (сумма рассыпалась по строкам) */
.fine > span, .fine > .tilt > span { display: block; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fine b { display: block; font-weight: 800; font-size: clamp(32px, 3.7vw, 58px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.fine--old { rotate: -2deg; width: fit-content; max-width: 100%; }
/* перечеркивание полосой поверх всей суммы: text-decoration не проходит в inline-block цифры счетчика */
.fine--old b { position: relative; display: inline-block; color: rgba(12, 11, 10, .35); }
.fine--old b::after { content: ""; position: absolute; left: -4%; right: -4%; top: 52%; height: 6px; margin-top: -3px;
  background: var(--orange); border-radius: 3px; rotate: -3deg; }
.fine--new { rotate: 1.5deg; justify-self: end; width: fit-content; max-width: 100%; background: var(--orange); }
.fine--new > span, .fine--new > .tilt > span { color: rgba(12, 11, 10, .7); }

/* PDF: страница печатается как сторителлинг на бумажном фоне; первый экран без разлета коллажа */
@media print {
  html, body { background: var(--paper); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero { padding-top: 70px; }
  .topbar { display: none; }
  .ch__cover { translate: none; scale: 1; rotate: var(--tilt, 0deg); }
  .footer { padding-bottom: 30px; }
}
@media print { .finale .blob, .facts .blob { display: none; } }

/* Счетчики: цифры одной ширины, место под итоговое число резервирует скрипт (min-width) */
[data-count] { display: inline-block; font-variant-numeric: tabular-nums; text-align: right; }
.fact__num, .fine b { font-variant-numeric: tabular-nums; }

/* ---------- 3D-наклон и подсветка под курсором (владелец 06.11.2026) ----------
   Наклоняется только внутренний слой .tilt; внешний элемент — цель наведения — стоит на месте,
   поэтому курсор не слетает и соседи не двигаются. Подсветка — радиальное пятно с мягким краем. */
.tilt {
  position: relative;
  transform: perspective(900px) rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)) scale(var(--tsc, 1));
  transform-style: preserve-3d;
  will-change: transform;
}
.glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 246, 225, .42) 0%, rgba(255, 240, 210, .2) 18%, rgba(255, 236, 200, .06) 34%, transparent 52%);
  mix-blend-mode: screen;
}
.is-tilt > .tilt > .glare { opacity: 1; }
/* у вырезок свет только по силуэту фигуры с каймой */
.cut .glare { -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat; }
/* разорванный снимок: правая половина теперь внутри .tilt без внутреннего отступа */
[data-rip] .tilt .half--r { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }

/* обертка .tilt внутри плашки должна держать ту же раскладку «фото + текст» */
.plaque > .tilt { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
@media (max-width: 560px) { .plaque > .tilt { grid-template-columns: 1fr; } }
.plaque:has(> .tilt) { display: block; }
/* кавычка в углу плашки не наезжает на конец первой строки */
.plaque { padding-right: 56px; }
.plaque__mark { top: -44px; right: 14px; }

/* Фото коллажа лежат поверх текста первого экрана (владелец 06.11.2026: «фото должны быть над»).
   Пустые места доски пропускают клики к кнопке «Читать»; ловят курсор только сами фото и вырезки. */
.stage__board { z-index: 5; pointer-events: none; }
.stage__board .piece, .stage__board .cut { pointer-events: auto; }
/* Мальчик лежит поверх подписи автора, но не закрывает ее: подпись фиксированной ширины (~194px), а доска
   тянется с экраном — на 960 и от 1500px он наезжал на 40–98px. Сдвиг подобран замером _raw/boy_gap.mjs. */
@media (min-width: 900px) and (max-width: 1199px) { .cut--boy { --x: 30%; } }
@media (min-width: 1500px) { .cut--boy { --x: 30%; } }
@media (min-width: 1800px) { .cut--boy { --x: 31%; } }
