/* Акцентный / брендовый шрифт — ARCO (self-hosted). Один начертание, кириллица есть.
   Диапазон 100 900 — чтобы любой запрошенный вес брал это же начертание без faux-bold. */
@font-face {
  font-family: 'ARCO';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/arco.woff') format('woff');
}

/* ---------- Variables ---------- */
:root {
  --bg: #FFFDFA;
  /* Second shade of white — used where a section needs to read as visually distinct from --bg
     without reaching for an actual colour (was yellow in the header bar and "О центре"). */
  --bg-2: #F5F1E9;
  /* Was a beige (#FDF6EA) — swapped for a soft sage tied to the green brand colour */
  --bg-alt: #EEF4E6;
  --dark: #2B2420;
  --dark-2: #211B17;
  --text-muted: #5B5049;
  --text-faint: #8A8079;
  --white: #ffffff;
  --border: rgba(43, 36, 32, 0.08);
  --border-soft: rgba(43, 36, 32, 0.06);

  /* ---------- Colour semantics ----------
     Colour is navigation, not decoration: each swatch below means one specific thing everywhere
     it appears, so a reader can tell who a piece of content is for before reading a word of it.
       --red     CTAs, key actions, critical errors. Never a section/category colour.
       --green   children — development, lessons, anything aimed at the child.
       --teal    parents — care, guidance, anything about/for the accompanying parent.
       --purple  specialists — expertise, professional credentials.
       --yellow  attention/recommended/popular/new — a flag, not an audience.
     A second, subordinate layer colours the speech-therapy *directions* themselves (--coral for
     speech, --purple for cognitive, --green for body, --amber for emotions) — see their block
     below. That layer is deliberately secondary: audience colour is the primary read, direction
     colour is a detail once you're already in a children's-content context. */

  /* Red — CTAs, key actions, critical errors only. */
  --red: #F43447;
  --red-hover: #D8391F;
  --red-active: #B32A15;
  --red-badge-bg: #FDE4E4;
  --red-badge-text: #D8391F;

  /* Green — children's content (routes, directions, services, anything aimed at the child). */
  --green: #5E9D16;
  --green-bg: #F0F7E7;
  --green-text: #4C7F11;
  /* Generic neutral surfaces (timeline lines, dots, form fields) — were beige, which clashed
     against the green accents; sage-tinted instead, in the same family as --bg-alt/--green-bg. */
  --neutral-line: #DCE8D2;
  --neutral-soft: #F5F9F1;

  /* Purple — specialists: expertise, professional credentials. Softened one step lighter than the
     brand book's original #5B4B9E (now --purple-hover/--purple-badge-text) per request, while
     keeping the same hue so it still reads as the same colour, just a touch calmer as a large
     fill. */
  --purple: #6C5CA6;
  --purple-hover: #5B4B9E;
  --purple-badge-bg: #EAE6F4;
  --purple-badge-text: #5B4B9E;

  /* Teal — parents: care, guidance, anything about/for the accompanying parent. */
  --teal: #009995;
  --teal-hover: #007D7A;
  --teal-badge-bg: #E1F3F2;
  --teal-badge-text: #00726F;

  /* Yellow — attention/recommended/popular/new. A flag on top of content, not an audience or a
     category of its own. */
  --yellow: #FFC610;
  --yellow-badge-bg: #FFF6DC;
  --yellow-badge-text: #8A6100;

  /* Specialists reuse the purple tokens directly (same audience colour) — kept as their own
     --specialist-* names since so much of the specialist UI already reads var(--specialist...),
     but the values are just purple now, not a separate hue. */
  --specialist: var(--purple);
  --specialist-hover: var(--purple-hover);
  --specialist-badge-bg: var(--purple-badge-bg);
  --specialist-badge-text: var(--purple-badge-text);

  /* ---------- Direction colours (speech-therapy routes/categories) ----------
     A second-level system layered *within* children's (green) content — which kind of direction
     a route/category/article belongs to. Two genuinely new hues (coral, amber): both were asked
     for by name and neither already existed in the palette, but everything else in this file
     still reuses the five colours above. */
  --coral: #E8503A;          /* Речь — red-coral, kept visually distinct from --red (CTA) */
  --coral-hover: #CF4029;
  --coral-badge-bg: #FDE5E0;
  --coral-badge-text: #C23F1F;

  --amber: #F2A93B;          /* Эмоции — yellow-orange, warmer/deeper than --yellow (attention) */
  --amber-hover: #DB9224;
  --amber-badge-bg: #FFF0D6;
  --amber-badge-text: #A85D00;
  /* Когнитивные функции → --purple, Тело → --green (both already defined above). */

  --font-head: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-accent: 'ARCO', 'Montserrat', sans-serif;   /* только для цифр (крупные числовые витрины) */

  /* ============================================================
     DESIGN TOKENS — единая шкала. Новый код должен брать значения
     отсюда; старые точечные значения мигрируются постепенно.
     ============================================================ */

  /* ---------- Spacing (4px base) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;
  --space-12: 128px;

  /* ---------- Radius ---------- */
  --radius-xs: 8px;
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-pill: 100px;
  --radius-card: var(--radius-md);   /* единый радиус контентных карточек = 24 */

  /* ---------- Layout / grid ---------- */
  --container-width: 1240px;
  --container-narrow-width: 900px;
  --page-gutter: 32px;   /* горизонтальные поля страницы */
  --grid-gap: 16px;      /* колонки 12-grid */
  /* высота залипающей шапки — для scroll-margin / sticky top.
     На главной JS уточняет по живой высоте #site-topbar (+ плашка свёрнутого оффера). */
  --header-offset: 72px;

  /* ---------- Control heights ---------- */
  --h-control: 48px;     /* кнопки, инпуты, селекты */
  --h-control-sm: 40px;
  --h-control-lg: 56px;

  /* ---------- Type scale ---------- (size / line-height / weight) */
  --text-display: 700 clamp(44px, 7vw, 64px) / 1.08 var(--font-head);
  --fs-h1: 44px;   --lh-h1: 1.15;
  --fs-h2: 34px;   --lh-h2: 1.2;
  --fs-h3: 22px;   --lh-h3: 1.3;
  --fs-h4: 18px;   --lh-h4: 1.35;
  --fs-body-lg: 17px;  --lh-body-lg: 1.6;
  --fs-body: 15px;     --lh-body: 1.6;
  --fs-sm: 14px;       --lh-sm: 1.5;
  --fs-xs: 13px;       --lh-xs: 1.45;
  --fs-caption: 12px;  --lh-caption: 1.4;

  /* ---------- Shadows ---------- */
  --shadow-sm: 0 4px 14px rgba(43, 36, 32, 0.10);
  --shadow-md: 0 12px 28px rgba(43, 36, 32, 0.12);
  --shadow-lg: 0 22px 40px rgba(43, 36, 32, 0.14);
  --shadow-xl: 0 40px 90px -30px rgba(0, 0, 0, 0.5);

  /* ---------- Breakpoints (для справки; media-query их не читает) ----------
     xl ≤1240 · lg ≤960 · md ≤720 · sm ≤480 */

  /* ---------- Puzzle-piece motif ----------
     Jigsaw-piece silhouette (tile with one round tab) used for small content icons, as a mask
     image so any CSS colour still works and nothing needs a colour-per-variant copy of the SVG.
     Buttons use the matching pinched-edge pill shape too, but that one has to stay pixel-exact at
     both ends while the middle stretches with the label — no CSS mask/clip-path trick manages
     "fixed ends, elastic middle" on its own, so that shape is built at runtime by
     puzzlePillPath() in main.js instead of stored here. */
  --puzzle-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 414 300'%3E%3Cpath fill='%23fff' d='M378.261 113.62C366.271 113.62 358.679 119.63 349.932 128.853C344.312 133.213 337.477 134.918 328.732 135.16C306.327 135.369 300 107.891 300 95V205C300 193.109 306.327 164.631 328.732 164.842C337.477 165.085 344.442 166.79 350.062 171.15C358.809 180.372 366.271 186.383 378.261 186.383C397.999 186.383 414 170.094 414 150.001C414 129.909 397.999 113.62 378.261 113.62Z'/%3E%3Cpath fill='%23fff' d='M260 0C282.091 0 300 17.9086 300 40V98V260C300 282.091 282.091 300 260 300H40C17.9086 300 1.1276e-06 282.091 0 260V201.365V98.4551V40C0 17.9086 17.9086 1.12746e-06 40 0H260Z'/%3E%3C/svg%3E");
  /* Same tile, mirrored (tab on the left) — for the arrow chip half of a split puzzle button,
     whose tab has to point *into* the text piece's socket instead of away from it. Mirrored in
     the SVG itself via the <g transform>, not via a CSS transform on the element, so the arrow
     glyph inside stays right-way-round. */
  --puzzle-tile-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 414 300'%3E%3Cg transform='translate(414 0) scale(-1 1)'%3E%3Cpath fill='%23fff' d='M378.261 113.62C366.271 113.62 358.679 119.63 349.932 128.853C344.312 133.213 337.477 134.918 328.732 135.16C306.327 135.369 300 107.891 300 95V205C300 193.109 306.327 164.631 328.732 164.842C337.477 165.085 344.442 166.79 350.062 171.15C358.809 180.372 366.271 186.383 378.261 186.383C397.999 186.383 414 170.094 414 150.001C414 129.909 397.999 113.62 378.261 113.62Z'/%3E%3Cpath fill='%23fff' d='M260 0C282.091 0 300 17.9086 300 40V98V260C300 282.091 282.091 300 260 300H40C17.9086 300 1.1276e-06 282.091 0 260V201.365V98.4551V40C0 17.9086 17.9086 1.12746e-06 40 0H260Z'/%3E%3C/g%3E%3C/svg%3E");
  /* Standalone connector shapes for the puzzle chain (contacts actions) — plain rectangles with
     these two glued on via ::after/::before, not a real cut into the rectangle, which is what
     makes a 3-piece chain (as opposed to a single pill's two fixed ends) tractable without
     per-piece geometry math. */
  --puzzle-tab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 114 110'%3E%3Cpath fill='%23fff' d='M35.7389 18.6202C47.7287 18.6202 55.321 24.6304 64.0676 33.8526C69.6878 38.2127 76.5232 39.9183 85.2682 40.1604C107.673 40.3692 114 12.891 114 0V110C114 98.109 107.673 69.6308 85.2682 69.8425C76.5227 70.0845 69.5578 71.7898 63.9382 76.1503C55.1915 85.3724 47.7287 91.3828 35.7389 91.3828C16.0009 91.3828 0 75.0942 0 55.0014C0 34.9086 16.0009 18.6202 35.7389 18.6202Z'/%3E%3C/svg%3E");
  --puzzle-notch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 103'%3E%3Cpath fill='%23fff' d='M110 0C110 9.0917 108.241 19.2773 99.7529 24.2773C97.4403 25.2773 89.7069 26.9851 84.9092 22.5518C73.3173 10.3845 63.2551 3.45522 47.3652 3.45508C21.2066 3.45508 0 24.9455 0 51.4551C1.42424e-05 77.9647 21.2066 99.4551 47.3652 99.4551C63.255 99.4549 73.1455 92.5255 84.7373 80.3584C89.5344 75.9248 97.4397 77.6328 99.7529 78.6328C108.241 83.6328 110 93.8185 110 102.91V0Z'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-offset) + 12px); }
#contacts, #documents, #parent-care { scroll-margin-top: 90px; }

/* Пробовали здесь принудительный scroll-snap по шагам (scroll-snap-stop:always на
   невидимых сегментах внутри каждой закреплённой секции + armSnapSteps() в main.js) —
   убрано: ощущалось хуже обычного плавного скролла (либо не долистывало до шага, либо
   рывком тащило через него). Чувствительность степперов теперь снова держится только
   длиной дистанции на шаг (--results-steps/--process-steps × N vh у каждой секции ниже). */
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: body is a full-height column so <main> can grow to fill any leftover space —
     the footer always ends up flush with the bottom of the viewport on short pages instead of
     floating above a gap of plain background. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-family: var(--font-head); font-weight: 800; line-height: 1.25; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--dark-2); }
ul { padding: 0; margin: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
::selection { background: var(--neutral-line); }

/* Horizontal longhand only — never the `padding` shorthand. Many elements carry both `.container`
   and a layout class that sets its own vertical padding (.header-topbar-inner, .header-bottombar-inner…);
   the shorthand has equal specificity and would silently reset that vertical padding to 0. */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding-left: var(--page-gutter); padding-right: var(--page-gutter); }
.container-narrow { max-width: var(--container-narrow-width); }

/* ---------- Buttons ---------- */
/* Puzzle-pill outline: the real SVG socket shape (fillets and all — see puzzlePillPath() in
   main.js), not an approximation. CSS mask/clip-path can't stretch just the middle of a fixed
   silhouette and leave two fixed-size ends alone, so main.js measures each .btn on load/resize
   and writes an exact clip-path: path(...) sized to it. border-radius here is only the pre-JS/
   no-JS fallback look (plain rounded corners, no notch). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  color: var(--dark);
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-hover); color: var(--white); transform: translateY(-2px); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--dark-2); color: var(--white); }
.btn-white { background: var(--white); color: var(--dark); }
.btn-white:hover { background: var(--bg); }
.btn-ghost { background: transparent; border: 2px solid rgba(43, 36, 32, 0.15); color: var(--dark); padding: 11px 22px; }
.btn-ghost:hover { border-color: var(--dark); color: var(--dark); }
.btn-ghost-light { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.18); color: var(--white); }
.btn-lg { padding: 17px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Split puzzle button ----------
   Two plain rectangles pushed flush against each other (no gap, no real socket cut into either
   one) with a single solid white knob (--puzzle-tab) glued on top of the seam via ::after. Same
   technique as the puzzle chain below, and for the same reason: a real cut only reads as a socket
   when something visibly different shows through it, and a knob in a *fixed* colour reads clearly
   as a connector regardless of which two colours it happens to sit between — trying to match
   curve families between a mask-based tile and a hand-built clip-path socket (the previous
   version) never lined up cleanly. Both pieces live inside one <button>/<a>, so the whole control
   is one click target — no extra wiring needed for "both halves clickable". */
.btn-split {
  display: inline-flex;
  align-items: stretch;
  /* Proportions below (0.0521, 0.38 of --arrow-size) are lifted directly from the reference
     Group 348 SVG: gap = the square's left edge (x 1381.65) minus the pill's right edge (x
     1366.01) = 15.64, tab width = 114 — both as a fraction of the shape's 300-unit height. */
  gap: calc(var(--arrow-size, 20px) * 0.0521);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-head);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-split:hover { transform: translateY(-2px); }
.btn-split-text {
  display: flex;
  align-items: center;
  /* Right padding is deliberately generous — main.js cuts a real socket into this edge (see
     puzzleLeftPiecePath), and the label needs clearance past where that curve reaches in from
     the edge, not just past the flat corner. border-radius is only the pre-JS/no-JS fallback. */
  padding: 13px 20px 13px 24px;
  padding-right: 40px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  color: var(--white);
  background: var(--red);
}
/* A genuinely separate square (all 4 corners rounded, same as the text piece), not fused flush
   onto it — the gap between the two is deliberate, the same way the reference shows two distinct
   pieces with a visible seam, not one continuous outline. */
.btn-split-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* aspect-ratio doesn't reliably resolve into a square against a flex-stretched cross size —
     tried it two ways (bare, and with height:100%) and both left this either a tall sliver or
     shrunk to content size instead of matching the text piece's height. main.js sets an explicit
     --arrow-size (= that piece's real height) instead; width/height both read it below. */
  width: var(--arrow-size, 1em);
  height: var(--arrow-size, 1em);
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  background: var(--green);
  border-radius: 12px;
}
/* The knob: same colour as the square it's attached to (not a contrasting white). Its own right
   edge sits exactly flush with the square's left edge (zero overlap into the square — width and
   left offset are the same value), and it reaches left across the gap deep into the text piece's
   socket cavity, matching the reference exactly rather than an eyeballed overlap. */
.btn-split-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  /* Shifted right of the exact flush position (not widened — widening it changes the box's aspect
     ratio, which throws off how mask-size:contain fits the shape and made the gap worse instead
     of better). A pure rightward shift keeps the shape's own proportions intact. */
  left: calc(var(--arrow-size, 20px) * -0.38 + .1px);
  width: calc(var(--arrow-size, 20px) * 0.38);
  height: calc(var(--arrow-size, 20px) * 0.38);
  transform: translateY(-50%);
  background: inherit;
  -webkit-mask-image: var(--puzzle-tab);
  mask-image: var(--puzzle-tab);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.btn-split:hover .btn-split-text { background: var(--red-hover); }
.btn-split:hover .btn-split-arrow { background: #4C7F11; }
/* Parents' section: the arrow half goes teal (the parent colour) instead of the child-green. */
.parent-care-section .btn-split-arrow { background: var(--teal); }
.parent-care-section .btn-split:hover .btn-split-arrow { background: var(--teal-hover); }
/* Parents' section heading — teal (parent colour) so it reads as "this part is for the adults". */
.section-title--parents span { color: var(--teal); }
/* Dark variant of the split button — graphite instead of red/green (e.g. "Все статьи"). */
.btn-split--dark .btn-split-text { background: var(--dark); }
.btn-split--dark .btn-split-arrow { background: var(--dark); }
.btn-split--dark:hover .btn-split-text,
.btn-split--dark:hover .btn-split-arrow { background: var(--dark-2); }
/* Вариант для карточки на красном фоне (избранная акция): белые пиши, красная стрелка. */
.btn-split--onred .btn-split-text { background: var(--white); color: var(--dark); }
.btn-split--onred .btn-split-arrow { background: var(--white); color: var(--red); }
.btn-split--onred:hover .btn-split-text,
.btn-split--onred:hover .btn-split-arrow { background: #fff; }
.btn-split-lg .btn-split-text { padding: 17px 24px 17px 30px; padding-right: 44px; font-size: 16px; }
.btn-split-lg .btn-split-arrow { font-size: 20px; }

/* ---------- Puzzle chain (contacts actions, about-stats) ----------
   Same construction as the split button now, chained across 3 pieces: the first piece is the
   "square" role (plain rect, sends a tab right), the middle piece is both a "text" role on its
   left (real socket, receives) and a "square" role on its right (sends its own tab), the last
   piece is pure "text" role (real socket only). Same 0.0521/0.38-of-height proportions as the
   split button, read off --arrow-size set on this row (all pieces share one height).
   The knob between each pair is a real sibling element (.puzzle-chain-knob, built by main.js),
   not a ::after on the sending piece — a ::after lives inside its host's own box, and the middle
   piece already has a clip-path (for its own receiving socket); clip-path clips *everything*
   painted by that element, pseudo-content included, so a knob poking out past its box via ::after
   got clipped away right along with it, leaving the mid→end connector invisible. A sibling
   positioned against the row itself has no such ancestor clip-path to fight. */
.puzzle-chain-start, .puzzle-chain-mid, .puzzle-chain-end { position: relative; }
.puzzle-chain-start { z-index: 3; }
.puzzle-chain-mid { z-index: 2; }
.puzzle-chain-end { z-index: 1; }
.puzzle-chain-knob {
  content: '';
  position: absolute;
  top: 50%;
  z-index: 4;
  pointer-events: none;
  /* Flipped: the shape's round knob sits at its own low-x end natively (meant to attach via its
     flat right edge and point left) — mirrored here so the knob points right, out into the next
     piece, instead of back into its own. Fill colour is set inline per knob by main.js (matching
     whichever piece sends it), not a fixed white. */
  transform: translateY(-50%) scaleX(-1);
  -webkit-mask-image: var(--puzzle-tab);
  mask-image: var(--puzzle-tab);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ---------- Offer bar + header ---------- */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Its own height changes as the offer bar / second nav tier collapse on scroll. Without this,
     Chrome's scroll anchoring "corrects" the scroll position to compensate for that shift, which
     immediately triggers another scroll event and flips the state back — a jitter/shake loop. */
  overflow-anchor: none;
}
/* ---------- Offers showcase: full-viewport slides, standard carousel ----------
   One screen tall, sitting in normal page flow — vertical page scroll just scrolls past it like
   any other section, nothing hijacks that. The offers themselves scroll sideways only via their
   own native horizontal scroller (trackpad swipe, shift+wheel, touch drag, or the arrows/dots),
   with scroll-snap so it always settles on a whole slide. Content centred per slide, jigsaw-tile
   pieces drifting slowly in the open space around it (real elements, not decoration — see
   .offer-float* below, driven by main.js) so the empty margins do something instead of sitting
   blank. Three layouts on purpose (icon, price-stamp, plain checklist) so consecutive slides
   don't feel identical. */
/* 100svh alone ran past the bottom of the screen by the header's own height, since the header
   sits above this in normal flow (not overlaid) — --header-h (kept live by main.js) is subtracted
   so this section's bottom edge lands exactly on the viewport's bottom edge on load. */
.offers-showcase { position: relative; height: calc(100svh - var(--header-h, 0px)); height: calc(100dvh - var(--header-h, 0px)); overflow: hidden; }
.offers-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.offers-track::-webkit-scrollbar { display: none; }
.offer-full {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px;
  color: var(--white);
  text-align: center;
}
.offer-full--teal { background: linear-gradient(160deg, var(--teal), var(--teal-hover)); }
.offer-full--red { background: linear-gradient(160deg, var(--red), var(--red-hover)); }
.offer-full--teal-dark { background: linear-gradient(160deg, var(--teal-hover), #00544f); }
.offer-full--purple { background: linear-gradient(160deg, var(--purple), var(--purple-hover)); }
.offer-full--green { background: linear-gradient(160deg, var(--green), #4C7F11); }

/* Layout — photo slide: a real photo behind the same white content, with a dark gradient so
   the text/button stay readable. No floating puzzle tiles on these. `--offer-photo` is set inline. */
.offer-full--photo { background: #2b2420; }
.offer-full--photo .offer-full-floaters { display: none; }
.offer-full-photo-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(24, 17, 14, 0.35) 0%, rgba(24, 17, 14, 0.62) 55%, rgba(24, 17, 14, 0.82) 100%),
    var(--offer-photo);
  background-size: cover;
  background-position: center;
}

/* Layout 4 — trust block: a short checklist of reassurances plus a mandatory small-print line,
   used on the certificate/маткапитал offers where "is this actually legit" is the real objection. */
.offer-full-trust {
  list-style: none; margin: 0 0 16px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px;
  background: rgba(255, 255, 255, 0.12); border-radius: var(--radius-sm); text-align: left;
}
.offer-full-trust li { font-size: 13.5px; color: rgba(255, 255, 255, 0.95); }
.offer-full-footnote { font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.65); margin: 14px 0 0; }

/* The floating pieces: an absolutely-positioned wrapper per piece carries the scroll "kick"
   (a transform main.js sets and clears, eased by this element's own transition — see
   "Offer floaters" in main.js), while the piece inside it carries the slow continuous drift as a
   CSS animation. Two separate elements because a running CSS animation on `transform` always
   wins over an inline transform on the *same* element each frame, which would swallow the kick. */
.offer-full-floaters { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.offer-float-wrap {
  position: absolute;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.offer-float {
  display: block;
  animation-name: offerFloatDrift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
/* Two custom puzzle-piece silhouettes for the drifting offer decor (replaces the generic
   --puzzle-tile). All pieces are one soft white; --offer-piece-a is the wide 2-bump piece,
   --offer-piece-b the square one. */
:root {
  --offer-piece-a: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20558%20313'%3E%3Cpath%20fill='%23fff'%20d='M520.477%20119.296C508.051%20119.296%20500.183%20125.528%20491.118%20135.091C485.293%20139.612%20480.282%20141.381%20471.219%20141.632C448%20141.848%20441.442%20113.355%20441.442%2099.9883V214.05C441.442%20201.72%20448%20172.19%20471.219%20172.41C480.283%20172.661%20485.428%20174.429%20491.252%20178.951C500.317%20188.513%20508.051%20194.746%20520.477%20194.746C540.933%20194.746%20557.516%20177.856%20557.516%20157.021C557.516%20136.186%20540.933%20119.296%20520.477%20119.296Z'/%3E%3Cpath%20fill='%23fff'%20d='M83.0953%200C92.5388%200%20103.118%201.83277%20108.312%2010.6766C109.351%2013.0868%20111.125%2021.3234%20106.52%2026.3215C93.8817%2038.3991%2086.6842%2048.7042%2086.6841%2065.26C86.6841%2092.515%20109.006%20114.61%20136.541%20114.61C164.076%20114.61%20186.398%2092.5158%20186.398%2065.261C186.398%2048.7049%20179.201%2038.2202%20166.563%2026.1425C161.958%2021.1436%20163.732%2013.0861%20164.771%2010.6766C169.964%201.83274%20180.544%200%20189.987%200H252.309C261.752%200%20272.332%201.83277%20277.525%2010.6766C278.564%2013.0868%20280.338%2021.3234%20275.733%2026.3215C263.095%2038.3991%20255.898%2048.7042%20255.897%2065.26C255.897%2092.515%20278.219%20114.61%20305.755%20114.61C333.29%20114.61%20355.612%2092.5158%20355.612%2065.261C355.612%2048.7049%20348.414%2038.2202%20335.776%2026.1425C331.171%2021.1436%20332.945%2013.0861%20333.984%2010.6766C339.177%201.83274%20349.757%200%20359.201%200H399.896C422.842%200%20441.444%2018.6592%20441.444%2041.6765V270.897C441.444%20293.915%20422.842%20312.574%20399.896%20312.574H41.5477C18.6015%20312.574%201.17123e-06%20293.915%200%20270.897V41.6765C0%2018.6592%2018.6015%204.40516e-07%2041.5477%200H83.0953Z'/%3E%3C/svg%3E");
  --offer-piece-b: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20313%20313'%3E%3Cpath%20fill='%23fff'%20d='M271.267%200C294.315%200%20313%2018.6847%20313%2041.7333V102.247C313%20111.732%20311.165%20122.359%20302.309%20127.576C299.896%20128.619%20291.828%20130.401%20286.822%20125.776C274.728%20113.081%20264.229%20105.852%20247.651%20105.851C220.359%20105.851%20198.233%20128.273%20198.233%20155.931C198.233%20183.59%20220.359%20206.011%20247.651%20206.011C264.229%20206.011%20274.548%20198.782%20286.643%20186.087C291.648%20181.461%20299.895%20183.244%20302.309%20184.287C311.165%20189.504%20313%20200.131%20313%20209.616V271.267C313%20294.315%20294.315%20313%20271.267%20313H41.7333C18.6847%20313%201.17646e-06%20294.315%200%20271.267V210.091C0%20200.605%201.83527%20189.978%2010.6911%20184.762C13.1046%20183.718%2021.3524%20181.936%2026.3574%20186.562C38.4516%20199.257%2048.7713%20206.486%2065.35%20206.486C92.6419%20206.486%20114.767%20184.064%20114.767%20156.406C114.767%20128.748%2092.6419%20106.327%2065.35%20106.326C48.7713%20106.326%2038.2724%20113.556%2026.1781%20126.25C21.1725%20130.876%2013.1039%20129.094%2010.6911%20128.051C1.83524%20122.834%200%20112.207%200%20102.721V41.7333C0%2018.6847%2018.6847%201.17631e-06%2041.7333%200H271.267Z'/%3E%3C/svg%3E");
}
.offer-float.puzzle-tile {
  padding-right: 0 !important; border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  -webkit-mask-image: var(--offer-piece-b); mask-image: var(--offer-piece-b);
  -webkit-mask-size: contain; mask-size: contain;
}
.offer-float-wrap:nth-of-type(odd) .offer-float.puzzle-tile {
  -webkit-mask-image: var(--offer-piece-a); mask-image: var(--offer-piece-a);
}
@keyframes offerFloatDrift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(16px, -20px) rotate(8deg); }
}
/* The one floating piece that's a real CTA, not decoration — same puzzle-pill shape as any other
   .btn (main.js clips it the same way), just floating instead of sitting in the content card. */
.offer-float-pill {
  position: relative;
  pointer-events: auto;
  z-index: 1;
  white-space: nowrap;
  animation-name: offerFloatDrift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* Denser slides (trust checklist + small print) can outgrow a short viewport even at 100svh —
   scroll internally rather than silently clipping the footnote/button under .offer-full's own
   overflow:hidden. Invisible on a viewport tall enough to fit everything (the normal case). */
.offer-full-content { position: relative; z-index: 2; max-width: 560px; max-height: 100%; overflow-y: auto; }
/* Every slide's real job is to land in under a second of glancing, not reading — one big visual
   anchor (icon, %, price, or tier chips) has to carry the offer's actual point on its own, with
   the kicker/title/text underneath only confirming what that anchor already said. Bumped hard
   from the old 44px icon, which read as decoration, not the headline. */
.offer-full-icon { font-size: clamp(56px, 9vw, 84px); line-height: 1; margin-bottom: 14px; }
/* Was a multi-MB autotraced illustration; now a monoline doodle (<svg><use href="#d-…"/></svg>,
   sprite in base.html) on the same footprint. White so it reads on every coloured slide. */
.offer-full-icon--img { width: clamp(56px, 9vw, 84px); height: clamp(56px, 9vw, 84px); display: inline-block; color: #fff; }
/* The doodle PNGs carry their own ink; knock them to solid white so they read on every coloured slide. */
.offer-full-icon--img, .offer-fab-icon--img, .kicker-icon, .icon-gift-inline { filter: brightness(0) invert(1); }
.offers-popup-item-icon--img svg { width: 22px; height: 22px; color: var(--teal-badge-text); }
.offer-fab-icon--img { color: #fff; }
.offer-full-kicker {
  display: block; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.8); margin-bottom: 10px;
}
/* Inline SVG icons standing in for emoji glyphs — sized to the surrounding text. */
.kicker-icon { width: 1.9em; height: 1.9em; object-fit: contain; vertical-align: -0.7em; margin-right: 2px; }
.document-icon--img { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
/* Square puzzle piece (colour + knob on its right edge, like the split button's square half) that
   holds the document icon — used in the header "Лицензия и документы" pill and the О-нас doc list. */
.doc-piece {
  position: relative; flex-shrink: 0;
  width: var(--dp, 30px); height: var(--dp, 30px); border-radius: 9px;
  background: var(--purple);
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-piece img { width: 58%; height: 58%; object-fit: contain; filter: brightness(0) invert(1); }
.doc-piece .e-icon { width: 52%; height: 52%; max-width: 26px; max-height: 26px; color: #fff; }
.doc-piece::after {
  content: ''; position: absolute; left: 100%; top: 50%;
  /* 0.38 = 114/300 — та же доля, что у коннектора .btn-split и .proc-stat */
  width: calc(var(--dp, 30px) * 0.38); height: calc(var(--dp, 30px) * 0.38);
  transform: translate(-0.5px, -50%) scaleX(-1);
  background: var(--purple);
  -webkit-mask: var(--puzzle-tab) center / contain no-repeat;
  mask: var(--puzzle-tab) center / contain no-repeat;
}
.specialist-modal-heading .heading-icon { width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: -0.2em; }
.offer-full-title { font-family: var(--font-head); font-size: clamp(24px, 3.6vw, 36px); margin: 0 0 12px; line-height: 1.15; }
.offer-full-text { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.85); margin: 0 0 24px; max-width: 40ch; margin-left: auto; margin-right: auto; }
/* Layout 2 — stamp: a crossed-out price next to the real one, like a "sale" sticker. The struck
   price is deliberately a real number (not a word like "VIP") — a ₽ figure scans in the same
   half-second as the icon does elsewhere, a label doesn't. */
.offer-full-stamp { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin-bottom: 16px; }
.offer-full-stamp-old { font-size: 20px; color: rgba(255, 255, 255, 0.6); text-decoration: line-through; }
.offer-full-stamp-new { font-family: var(--font-accent); font-weight: 800; font-size: clamp(44px, 7vw, 64px); line-height: 1; }
/* Layout 3 — list: no icon/stamp at all, just a plain checklist of what's included. */
.offer-full-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.offer-full-list li { font-size: 14.5px; padding-left: 22px; position: relative; color: rgba(255, 255, 255, 0.92); }
.offer-full-list li::before { content: '✓'; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--white); }
/* Layout 4 — big number badge: for offers whose entire point IS a number (a percent, a count of
   free lessons) — showing "−25%" at headline size says more in zero seconds than a sentence does
   in five. */
.offer-full-badge { font-family: var(--font-accent); font-weight: 800; font-size: clamp(56px, 10vw, 96px); line-height: 1; margin-bottom: 8px; }
.offer-full-badge-caption { display: block; font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, 0.75); margin-bottom: 16px; }
.icon-gift-inline { width: 15px; height: 15px; object-fit: contain; vertical-align: -2px; }
/* Layout 5 — pick-one chips: replaces a "choose from: X, Y or Z" sentence (reads as a chore) with
   the actual options laid out as scannable icons — see which is which without parsing a list. */
.offer-full-picks { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.offer-full-pick {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.14);
  font-size: 12.5px; font-weight: 700; min-width: 84px;
}
.offer-full-pick-icon { font-size: 26px; }
/* Layout 6 — growing tiers: the family card's whole pitch is "the discount grows", which a
   paragraph buries — three chips with rising weight/contrast show growth at a glance instead. */
.offer-full-tiers { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.offer-full-tier { padding: 8px 16px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13px; background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.75); }
.offer-full-tier--mid { background: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.92); }
.offer-full-tier--top { background: var(--white); color: var(--purple); }
.offer-full-tier-arrow { opacity: 0.5; font-size: 13px; }

/* Standard carousel controls — same floating-white-disc language as every other arrow on this
   site (offer-bar-arrow before it, case-arrow, services-line-nav). */
.offers-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.92); color: var(--dark); font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(43, 36, 32, 0.18); transition: background 0.2s ease;
}
.offers-arrow:hover { background: var(--white); }
.offers-arrow--prev { left: 20px; }
.offers-arrow--next { right: 20px; }
.offers-dots { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; }

/* "Scroll on" cue at the bottom of the full-screen offers carousel — makes it obvious the page
   continues below the promo. */
.offers-scroll-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(0, 0, 0, 0.24); border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 12.5px;
  padding: 6px 7px 6px 15px; border-radius: var(--radius-pill); cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.offers-scroll-hint:hover { background: rgba(0, 0, 0, 0.36); }
.offers-scroll-hint-arrow {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--dark); font-size: 13px;
}
@media (prefers-reduced-motion: no-preference) {
  .offers-scroll-hint-arrow { animation: offers-hint-bob 1.8s ease-in-out infinite; }
}
@keyframes offers-hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.offers-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transition: background 0.2s ease, transform 0.2s ease; cursor: pointer; }
.offers-dot.active { background: var(--white); transform: scale(1.15); }

/* ---------- Offers popup: opened from the FAB once the showcase scrolls out of view ---------- */
.offers-popup-overlay {
  display: none; position: fixed; inset: 0; z-index: 200; background: rgba(43, 36, 32, 0.5);
  align-items: center; justify-content: center; padding: 20px;
}
.offers-popup-overlay.open { display: flex; }
.offers-popup {
  position: relative; background: var(--white); border-radius: 28px; max-width: 420px; width: 100%;
  padding: 32px; animation: pop 0.25s ease; max-height: 88vh; overflow-y: auto;
}
/* Full-carousel variant: the popup is just a rounded frame, the real #offers-showcase (moved in
   by main.js) fills it. */
.offers-popup--full {
  max-width: min(820px, 100%); padding: 0; overflow: hidden; background: none;
  border-radius: var(--radius-lg);
}
.offers-popup-slot { display: contents; }
.offers-popup--full .offers-showcase {
  height: min(86vh, 660px); border-radius: var(--radius-lg);
}
.offers-popup--full .offers-scroll-hint { display: none; }   /* no "листайте дальше" inside a popup */
.offers-popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 16px rgba(43, 36, 32, 0.18);
}
.offers-popup-title { font-size: 19px; margin: 0 0 18px; }
.offers-popup-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.offers-popup-item { display: flex; align-items: flex-start; gap: 12px; }
.offers-popup-item-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--teal-badge-bg);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.offers-popup-item-icon--img img { width: 20px; height: 20px; object-fit: contain; }
.offers-popup-item strong { display: block; font-size: 14px; margin-bottom: 2px; }
.offers-popup-item p { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

/* ---------- Offer reveal FAB: shown bottom-right once the showcase scrolls out of view ---------- */
/* Pill instead of a plain circle — there's a text label now (the current offer, mirrored from
   whichever slide is active) alongside the icon, not just the icon on its own. */
.offer-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: min(340px, calc(100vw - 48px));
  height: 56px;
  padding: 0 22px 0 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--green);
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(43, 36, 32, 0.22);
  transform: translateY(16px) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, background 0.2s ease;
}
.offer-fab.offer-fab-visible { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.offer-fab:hover { background: var(--green-text); }
.offer-fab-icon { flex-shrink: 0; }
.offer-fab-icon--img { width: 26px; height: 26px; object-fit: contain; }
.offer-fab-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.offer-fab-text:empty { display: none; }

/* ---------- Уведомление о cookie ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--dark); color: var(--white);
  box-shadow: 0 -8px 24px rgba(43, 36, 32, 0.18);
}
.cookie-banner-inner {
  max-width: var(--container-width); margin: 0 auto;
  padding: 16px var(--page-gutter);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cookie-banner-text { flex: 1 1 320px; margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.85); }
.cookie-banner-text a { color: var(--white); text-decoration: underline; }
.cookie-banner-btn { flex-shrink: 0; padding: 11px 24px; }
@media (max-width: 480px) {
  .cookie-banner-inner { padding: 14px var(--space-4); }
  .cookie-banner-btn { width: 100%; justify-content: center; }
}

.site-header {
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: relative;
  /* Explicit stacking layer so the mobile nav dropdown (nested inside, z-index: 50) reliably
     paints above the offer bar below it — both share the same nearest stacking ancestor
     (.site-topbar), and without this the offer bar was winning that comparison. */
  z-index: 2;
}
/* ---------- Top tier: logo, nav links, phone ---------- */
.header-topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
  position: relative;
  /* Шапка растянута на всю ширину экрана (не ограничена --container-width как остальной
     контент) — иначе на широких мониторах пунктам навигации не хватает места и «Контакты»
     переносятся на вторую строку. */
  max-width: none;
}
.logo { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex-shrink: 0; text-decoration: none; }
.logo-img { height: 34px; width: auto; }
.logo-tagline {
  display: inline-block; transform-origin: left center;
  font-family: var(--font-body); font-weight: 600; font-size: 10.5px; line-height: 1;
  letter-spacing: .015em; color: var(--text-muted); white-space: nowrap;
}
/* Plain wordmark instead of the image logo. */
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--red);
  white-space: nowrap;
}
.logo-footer .logo-text { color: #fff; }
.header-topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }

/* ---------- Bottom tier: license, full-width search, CTA ----------
   Постоянная утилитарная строка: поиск и «Записаться» — то, что нужно посетителю
   в любой момент, поэтому всегда на виду, без привязки к скроллу. */
.header-bottombar {
  background: var(--bg-2);
  border-top: 1px solid var(--border-soft);
}
.header-bottombar-inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; max-width: none; }

/* Свернуть/развернуть утилитарную строку (поиск + «Записаться») — только десктоп.
   Состояние держим в localStorage, класс .bottombar-collapsed вешаем на <header>. */
.bottombar-toggle { display: none; }
@media (min-width: 981px) {
  .bottombar-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--border-soft); border-radius: var(--radius-pill);
    padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 700;
    letter-spacing: .02em; text-transform: uppercase; color: var(--muted);
    cursor: pointer; transition: color .15s, border-color .15s;
  }
  .bottombar-toggle:hover { color: var(--dark); border-color: var(--dark); }
  .bottombar-toggle .nav-caret { font-size: 10px; transition: transform .2s; }
  .site-header.bottombar-collapsed .bottombar-toggle .nav-caret { transform: rotate(180deg); }
  .site-header.bottombar-collapsed .header-bottombar { display: none; }
}

.main-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; flex: 1; min-width: 0; }
.main-nav a, .main-nav .nav-link {
  font-weight: 600; font-size: 15px; color: var(--text-muted);
  font-family: inherit; background: none; border: none; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.main-nav a:hover, .main-nav a.active,
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--dark); }
/* «Специалисты» с подписью: сам пункт держит общий baseline с остальными пунктами меню,
   а подпись висит абсолютом под ним и на раскладку строки не влияет. */
.main-nav .nav-link--noted { position: relative; }
.main-nav .nav-link--noted .nav-link-note {
  position: absolute; top: 100%; left: 0; margin-top: 1px;
  font-size: 10px; font-weight: 700; line-height: 1; color: var(--green-text); white-space: nowrap;
}
.main-nav.open .nav-link--noted .nav-link-note { position: static; margin: 0 0 0 6px; }
/* Та же подпись под пунктом-выпадашкой («Полезные материалы» → лицензия): отдельная ссылка
   рядом с кнопкой — внутрь <button> ссылку не вложить. Выпадашка открывается ниже (100% + 18px). */
.main-nav .nav-item-note {
  position: absolute; top: 100%; left: 0; margin-top: 1px;
  font-size: 10px; font-weight: 700; line-height: 1; color: var(--green-text); white-space: nowrap; text-decoration: none;
}
.main-nav .nav-item-note:hover { color: var(--red); }
/* бургер: в одну строку с «Полезными материалами», как «15+ лет опыта» у «Специалистов»
   (кнопка-пункт там на всю ширину, поэтому подпись ставим поверх, сразу за текстом пункта) */
.main-nav.open .nav-item-note { top: 17px; left: 188px; margin: 0; }
/* в мобильном меню — просто «Лицензия» */
.main-nav.open .nav-item-note-tail { display: none; }
.main-nav a.nav-badge {
  background: var(--yellow-badge-bg); color: var(--yellow-badge-text);
  padding: 7px 14px; border-radius: var(--radius-pill); font-size: 14px; white-space: nowrap;
}
.main-nav a.nav-badge:hover { background: #FCE9AD; color: var(--yellow-badge-text); }
/* «Сведения об ОО» в бургер-меню (мобилка): отдельная тихая плашка под основными пунктами.
   На десктопе пункт скрыт — там он стоит во второй строке шапки рядом с «Лицензией». */
.main-nav .nav-link--sveden { display: none; }
.main-nav.open .nav-link--sveden {
  display: flex; gap: 8px; margin-top: 12px; padding: 12px 14px; white-space: normal;
  border: 1px solid rgba(43, 36, 32, 0.12); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted);
}
.main-nav.open .nav-link--sveden .e-icon { width: 16px; height: 16px; color: var(--purple); flex-shrink: 0; }

/* ---------- Two-level nav dropdowns ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-caret { font-size: 10px; transition: transform 0.2s ease; color: var(--text-faint); }
.nav-item.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translate(-50%, 6px);
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(43, 36, 32, 0.12);
  padding: 18px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.nav-item.open .nav-dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
.nav-dropdown-mega { width: min(720px, 90vw); left: 0; transform: translate(-8%, 6px); }
.nav-item.open .nav-dropdown-mega { transform: translate(-8%, 0); }
.nav-dropdown-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.nav-dropdown-col { min-width: 0; }
.nav-dropdown-heading {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px;
  color: var(--dark) !important; margin-bottom: 8px;
}
.nav-dropdown-heading span:not(.nav-dropdown-icon) { min-width: 0; }
.nav-dropdown-icon {
  width: 26px; height: 26px; --tile-w: 26px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.nav-dropdown-icon--img img { width: 14px; height: 14px; object-fit: contain; }
.nav-dropdown-list li a { display: block; padding: 5px 0; font-size: 13.5px; color: var(--text-muted) !important; font-weight: 500; }
.nav-dropdown-list li a:hover { color: var(--green-text) !important; }
.nav-dropdown-footer {
  display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft);
  font-weight: 700; font-size: 13.5px; color: var(--green-text) !important; text-align: right;
}
.nav-dropdown-simple { min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.nav-dropdown-simple a { padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-muted) !important; }
.nav-dropdown-simple a:hover, .nav-dropdown-simple a.active { background: var(--bg-alt); color: var(--dark) !important; }

/* "Услуги и цены" dropdown: just the main categories (icon + name), no nested service list */
.nav-dropdown-categories { min-width: 260px; }
.nav-dropdown-category-link { display: flex !important; align-items: center; gap: 10px; }

.header-phone { font-weight: 700; color: var(--dark); font-size: 14px; white-space: nowrap; }
/* Mobile-only stand-in for .header-phone once the full number is hidden — same breakpoints as
   .burger, sits right before it. */
.header-phone-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--white); flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(94, 157, 22, .4);
  transition: transform .15s ease, box-shadow .15s ease;
}
.header-phone-btn .e-icon { width: 17px; height: 17px; }
.header-phone-btn:active { transform: scale(.94); box-shadow: 0 2px 8px rgba(94, 157, 22, .4); }

/* ---------- Search (full-width bar in the bottom tier) ---------- */
.site-search-inline { position: relative; flex: 1; min-width: 0; }
/* Same two-piece puzzle construction as .btn-split: a real socket cut into the field's right edge
   (main.js treats .search-panel-field exactly like .btn-split-text) and a separate square button
   with a knob plugged into that socket, glued on via ::before the same way .btn-split-arrow is.
   The field piece keeps its own white/bordered look instead of the split-button's red, since this
   is neutral utility UI, not audience content — see the note below. */
.search-panel-form { display: flex; align-items: stretch; gap: calc(var(--arrow-size, 20px) * 0.0521); }
.search-panel-field {
  /* Fixed height (not just padding) at every width, not only under the old mobile-only rule —
     at the field's previous ~34px unpadded height the socket cut main.js carves into its right
     edge (proportional to this height) came out only a few pixels deep, and the button's knob
     sitting right in front of it hid that sliver completely: no visible connector at all. Taller
     reads clearly, and matches the "Записаться" button's height alongside it in the same row. */
  position: relative;
  height: 46px;
  display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px;
  /* Extra right clearance past the base padding — main.js cuts a real socket into this edge, and
     the input shouldn't visually run into that curve. */
  padding-right: 26px;
  /* No real border — a rect border can't trace the socket main.js clip-paths into the right edge.
     Instead: the field's own background IS the outline colour, clipped (by main.js, inline) to the
     full socket silhouette; a ::after white fill clipped to a 2px-smaller silhouette sits on top,
     leaving a 1px band of outline colour all the way round — straight edges and the notch alike. */
  border: none;
  --search-outline: rgba(43, 36, 32, 0.28);
  background: var(--search-outline);
  /* Rectangular with rounded corners, not a full stadium/pill — matches the other puzzle pieces
     (.btn-split-text, the about-stats tiles), all of which use this same 12px corner. Fallback
     only: main.js replaces this with an exact socket path. */
  border-radius: 12px;
  transition: background 0.2s ease;
  flex: 1; min-width: 0;
}
.search-panel-field::after {
  content: ''; position: absolute; inset: 1px; z-index: 0;
  background: var(--white);
  border-radius: 11px;
  /* Path is computed by main.js for this (w-2 × h-2) box, so it lands exactly 1px inside the
     field's own clip on every edge. */
  clip-path: var(--field-clip-inner, inset(0 round 11px));
}
/* Field content sits above the white fill. */
.search-panel-field > * { position: relative; z-index: 1; }
/* Search is generic utility UI, not audience content — kept neutral (graphite) rather than teal,
   so teal stays unambiguous as "this is for parents" wherever it actually appears. */
.search-panel-field:focus-within { --search-outline: var(--dark); }
.search-panel-icon { color: var(--text-faint); flex-shrink: 0; }
.search-panel-field input {
  /* 16px, not 14.5px — iOS Safari auto-zooms the whole page on focus for any input under 16px.
     Below 720px the search bar is the field people actually type into, so this matters there
     most, but it's kept at 16px everywhere to be consistent. */
  flex: 1; border: none; outline: none; font-family: inherit; font-size: 16px;
  color: var(--dark); background: none; min-width: 0;
}
.search-panel-submit {
  position: relative;
  /* aspect-ratio doesn't reliably resolve into a square against a flex-stretched cross size —
     main.js sets an explicit --arrow-size (= the field piece's real height) on the shared parent
     instead; width/height both read it, same as .btn-split-arrow. */
  width: var(--arrow-size, 32px); height: var(--arrow-size, 32px);
  border: none; background: var(--dark); color: var(--white);
  border-radius: 12px; cursor: pointer; font-size: 14px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center;
}
.search-panel-submit:hover { background: var(--dark-2); }
/* The knob: same colour as the button it's attached to, reaching left across the gap into the
   field's socket cavity — identical proportions to .btn-split-arrow::before. */
.search-panel-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(var(--arrow-size, 20px) * -0.38 + .1px);
  width: calc(var(--arrow-size, 20px) * 0.38);
  height: calc(var(--arrow-size, 20px) * 0.38);
  transform: translateY(-50%);
  background: inherit;
  -webkit-mask-image: var(--puzzle-tab);
  mask-image: var(--puzzle-tab);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
/* position:fixed, not absolute — the search bar lives in .header-bottombar, which needs
   overflow:hidden for its own collapse animation, and that was clipping the dropdown down to a
   sliver no matter how high its z-index went (overflow:hidden clips descendants outright,
   z-index never gets a say). Fixed positioning escapes that clipping entirely; main.js sets
   left/top/width to match the search bar's actual on-screen position, since fixed positioning
   is relative to the viewport, not the input, and needs to be told where that is. */
.search-suggest {
  position: fixed; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 20px 40px rgba(43, 36, 32, 0.14);
  padding: 8px; max-height: 340px; overflow-y: auto; z-index: 150;
}
.search-suggest-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 8px; border-radius: 10px; color: var(--dark) !important;
}
.search-suggest-item:hover { background: var(--bg-alt); }
.search-suggest-item-text { min-width: 0; }
.search-suggest-item-title { font-size: 13.5px; font-weight: 600; color: var(--dark); }
.search-suggest-item-sub { font-size: 12px; color: var(--text-faint); }
.search-suggest-item-type {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-faint); flex-shrink: 0; white-space: nowrap;
}
.search-suggest-empty, .search-suggest-loading { padding: 14px 8px; font-size: 13.5px; color: var(--text-faint); text-align: center; }
.search-suggest-more { display: block; text-align: center; padding: 9px 8px; font-size: 13px; font-weight: 700; color: var(--dark) !important; }

.search-page-form { display: flex; gap: 10px; max-width: 480px; margin: 20px auto 0; }
.search-page-form input {
  /* 16px, not 15px — same iOS Safari auto-zoom-on-focus issue as .search-panel-form input above. */
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 12px 20px;
  font-family: inherit; font-size: 16px; outline: none; background: var(--white);
}
.search-page-form input:focus { border-color: var(--dark); }
/* Компактная плашка «Лицензия» в шапке — простой чип, без пазл-обрезки. */
.header-doc-link {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--purple-badge-bg); color: var(--purple-badge-text) !important;
  font-weight: 700; font-size: 14px; line-height: 1;
  transition: background 0.2s ease;
}
.header-doc-link:hover { background: var(--neutral-line); }
.header-doc-link .e-icon { width: 17px; height: 17px; color: var(--purple); flex-shrink: 0; }
@media (max-width: 960px) { .header-doc-link { font-size: 13px; padding: 8px 13px; } }
@media (max-width: 720px) { .header-doc-link { display: none; } }
/* «Сведения об образовательной организации» — рядом с «Лицензией», но тише: без заливки,
   только тонкая рамка, чтобы отличаться от пунктов меню и не спорить с кнопкой «Записаться». */
.header-sveden-link {
  display: inline-flex; align-items: center; flex-shrink: 0; white-space: nowrap;
  margin-left: -8px; padding: 8px 15px; border-radius: var(--radius-pill);
  border: 1px solid rgba(43, 36, 32, 0.12); color: var(--text-muted) !important;
  font-weight: 600; font-size: 13.5px; line-height: 1;
  transition: color .15s, border-color .15s, background .15s;
}
.header-sveden-link:hover, .header-sveden-link.active {
  color: var(--dark) !important; border-color: transparent; background: var(--purple-badge-bg);
}
@media (max-width: 1240px) { .header-sveden-link { font-size: 13px; padding: 8px 13px; } }
.header-sveden-link .sveden-full { margin-left: .3em; }
.header-sveden-link .sveden-short { display: none; margin-left: .3em; }
@media (max-width: 960px) {
  .header-sveden-link .sveden-full { display: none; }
  .header-sveden-link .sveden-short { display: inline; }
}
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
}
.burger span { width: 22px; height: 2px; background: var(--dark); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0; overflow: clip; }
/* ЗАКОНСЕРВИРОВАНО: .hero-scroller/.hero-pin/.hero-puzzle/.hp-* — стили hero-пазла, разметка
   вынесена в main/templates/main/_hero_puzzle.html и на главной сейчас не подключена.
   Закрепление героя (на всех ширинах): подошёл к блоку → .hero-pin встаёт (sticky),
   вертикальный скролл внутри .hero-scroller собирает пазл (main.js: прогресс → --hpa),
   держит паузу, потом зажигает цифры, потом отпускает. */
.hero-scroller { position: relative; height: 230vh; padding: 0; }
.hero-pin {
  position: sticky; top: var(--header-offset);
  min-height: calc(100svh - var(--header-offset));
  min-height: calc(100dvh - var(--header-offset));
  display: flex; align-items: center;
  padding: 12px 0;
}
@media (max-width: 900px) {
  /* мобилка: скролл-сборка работает как на десктопе (пин + --hpa + .is-assembled),
     но заметно короче — пазл собирается за меньший скролл (было 340vh). */
  .hero-scroller { height: 200vh; }
  .hero-pin .hero-inner--centered { gap: 14px; }
  .hero-pin .hero-badge { margin-bottom: 4px; }
  /* порядок на телефоне: заголовок → пазл → кнопка */
  .hero-pin .hero-text--centered { display: contents; }
  .hero-pin .hero-badge    { order: 1; }
  .hero-pin .hero-title    { order: 2; margin-bottom: 0; }
  .hero-pin .hero-puzzle   { order: 3; }
  .hero-pin .hero-actions  { order: 4; }
  .hero-pin .hero-reassure { order: 5; }
  /* Пока детали разлетены (--dy у некоторых доходит до -300px), они наезжают на заголовок
     сверху — на узком экране под пазлом просто нет отдельного места, разлёт больше высоты
     виджета. Текст и кнопка — явные flex-item'ы (display:contents у обёртки их поднимает
     на этот уровень) с z-index выше пазла (у которого он и так =1), чтобы в момент наезда
     заголовок читался поверх, а не под деталями. */
  .hero-pin .hero-badge, .hero-pin .hero-title, .hero-pin .hero-actions, .hero-pin .hero-reassure {
    position: relative; z-index: 2;
  }
  /* Заголовок сам по себе без фона — под наехавшей деталью буквы читались бы вперемешку с
     пазлом впритык. Пробовали радиальный градиент как сплошной прямоугольный "ореол" за
     текстом (padding+background) — получалась чёткая обрезанная рамка, деталь ныряла под
     неё резким прямым краем, будто откушенная. Вместо коробки — svg-фон буквам:
     text-shadow привязан к форме самих глифов, у него нет рамки в принципе, только blur,
     тающий на расстоянии до нуля. Несколько слоёв (мельче + шире) — плотное свечение
     вплотную к буквам, размывающееся дальше, как будто текст сам светится и деталь под
     ним постепенно выходит из этого света, а не обрубается. */
  .hero-pin .hero-title {
    text-shadow:
      0 0 6px var(--bg), 0 0 6px var(--bg), 0 0 6px var(--bg),
      0 0 14px var(--bg), 0 0 14px var(--bg),
      0 0 26px var(--bg), 0 0 26px var(--bg),
      0 0 40px var(--bg);
  }
  /* Сам разлёт чуть скромнее — раньше детали разъезжались на всю величину --dx/--dy
     (пиксели вьюбокса), из-за чего перекрывали заголовок сильнее, чем нужно. */
  .hero-puzzle { --hp-scatter: 0.62; --hp-fade: 0.3; }
}
@media (min-width: 901px) {
  .hero-pin { padding: 32px 0; }
  /* Десктоп: текст слева, пазл справа — всё влезает в один экран. */
  .hero-pin .hero-inner--centered {
    display: grid; grid-template-columns: minmax(300px, 0.82fr) 1.18fr;
    gap: 40px; align-items: center; justify-content: initial;
    min-height: 0; text-align: left;
  }
  .hero-pin .hero-text--centered { order: 0; max-width: 460px; }
  .hero-pin .hero-title { margin-bottom: var(--space-3); }
  .hero-pin .hero-actions { align-items: flex-start; }
  .hero-pin .hero-reassure { text-align: left; }
  .hero-pin .hero-puzzle { order: 1; }
  .hero-pin .hero-puzzle-svg { max-width: 100%; }
}
@media (min-width: 1200px) {
  .hero-pin .hero-inner--centered { gap: 56px; }
}
.hero-inner--centered { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 700px; justify-content: center; text-align: center; }

/* ---------- Простой hero (вместо законсервированного пазла) ----------
   Бейдж → заголовок → подзаголовок → кнопка → 4 цифры. Без sticky и скролл-анимаций.
   ≤900px — одна колонка по центру, цифры сеткой 2×2 под кнопкой;
   ≥901px — текст слева, цифры 2×2 справа. Цвета плиток — те же, что у стат-деталей пазла. */
.hero--simple { padding: var(--space-8) 0 var(--space-9); }
.hero-simple { display: grid; gap: var(--space-6); align-items: center; }
.hero-simple-text { text-align: center; }
.hero-simple .hero-title { margin-bottom: var(--space-4); }
.hero-simple-lead {
  font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); color: var(--text-muted);
  max-width: 560px; margin: 0 auto var(--space-5);
}
.hero-simple .hero-actions { align-items: center; }
.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
}
.hero-stat {
  --sc: var(--green); --sb: var(--green-bg);
  background: var(--sb); border-radius: var(--radius-sm);
  padding: var(--space-4); display: flex; flex-direction: column; gap: 4px;
}
.hero-stat b {
  font-family: var(--font-accent); font-weight: 800; font-size: 34px; line-height: 1;
  letter-spacing: -0.02em; color: var(--sc); white-space: nowrap;
}
.hero-stat span { font-size: var(--fs-sm); line-height: 1.35; color: var(--dark); }
.hero-stat--purple { --sc: var(--purple); --sb: var(--purple-badge-bg); }
.hero-stat--teal   { --sc: var(--teal);   --sb: var(--teal-badge-bg); }
.hero-stat--green  { --sc: var(--green-text); --sb: var(--green-bg); }
.hero-stat--amber  { --sc: var(--amber-badge-text); --sb: var(--amber-badge-bg); }
@media (max-width: 900px) {
  .hero--simple { padding: var(--space-6) 0 var(--space-7); }
  .hero-simple .hero-badge { margin-bottom: var(--space-4); font-size: 12px; padding: 6px 12px; }
  .hero-simple .hero-title { font-size: clamp(26px, 7.4vw, 34px); }
  .hero-simple-lead { font-size: var(--fs-body); line-height: var(--lh-body); }
  .hero-stats { gap: 10px; }
  .hero-stat { padding: 14px; }
  .hero-stat b { font-size: 28px; }
  .hero-stat span { font-size: var(--fs-xs); }
}
@media (min-width: 901px) {
  .hero-simple { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-9); }
  .hero-simple-text { text-align: left; }
  .hero-simple-lead { margin-left: 0; }
  .hero-simple .hero-actions { align-items: flex-start; }
  .hero-stats { gap: var(--space-4); }
  .hero-stat { padding: var(--space-5); }
  .hero-stat b { font-size: 44px; }
}

/* Спокойный hero: заголовок без акцента, одна фраза, одна кнопка с ценой рядом, справа —
   два фото кандидатов наук и одна подпись. Фото — кнопки, открывают модалку специалиста. */
.hero--calm .hero-title { font-size: clamp(30px, 3.4vw, 46px); }
.hero--calm .hero-title .hero-title-kicker {
  display: block; background: none; padding: 0; margin: 0 0 var(--space-4);
  color: var(--text-muted); font-weight: 600; font-size: 14px;
}
.hero--calm .hero-title-kicker .hero-dot { display: none; }
.hero--calm .hero-simple-lead { max-width: 460px; margin-bottom: var(--space-6); }
.hero-cta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; justify-content: center; }
.hero-cta-price { font-family: var(--font-head); white-space: nowrap; display: inline-flex; align-items: baseline; gap: 8px; }
/* Цена диагностики на первом экране — крупно и в фирменном красном (по просьбе центра, 08.10.2026):
   старая цена зачёркнута тем же красным, новая — самым крупным элементом рядом с кнопкой. */
.hero-cta-price { gap: 12px; }
.hero-cta-price s {
  color: var(--text-muted); font-weight: 700; font-size: 22px;
  text-decoration-color: var(--red); text-decoration-thickness: 2px;
}
.hero-cta-price b { color: var(--red); font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.01em; }
.hero-cta-deadline {
  align-self: center; padding: 5px 10px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--red) 12%, var(--white)); color: var(--red);
  font-weight: 700; font-size: 14px; line-height: 1.2;
}
.hero-team-role { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--purple); }
.hero-team { margin: 0; }
.hero-team-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.hero-team-photo {
  position: relative;
  display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: none;
  border-radius: var(--radius-card); overflow: hidden; cursor: pointer; background: var(--bg-2);
}
.hero-team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.hero-team-photo:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.hero-team-caption { margin: 0 0 var(--space-3); font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted); }
/* Стаж — плашкой на фото (снизу слева), ФИО — под фото */
.hero-team-exp {
  position: absolute; left: 12px; bottom: 12px;
  background: var(--white); color: var(--purple);
  font-family: var(--font-head); font-weight: 800; font-size: 13px; line-height: 1;
  padding: 7px 12px; border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(43, 36, 32, .18);
}
.hero-team-name {
  margin: var(--space-3) 0 0; font-family: var(--font-head); font-weight: 700;
  font-size: 15px; line-height: 1.3; color: var(--dark);
}
@media (min-width: 901px) {
  .hero-cta { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .hero--calm .hero-title { font-size: clamp(26px, 7.4vw, 34px); }
  .hero--calm .hero-title .hero-title-kicker { font-size: 13px; margin: 0 auto var(--space-3); text-align: center; }
  .hero--calm .hero-simple-lead { margin-left: auto; margin-right: auto; }
  .hero-cta { flex-direction: column; gap: var(--space-3); }
  .hero-team { max-width: 420px; width: 100%; margin: 0 auto; }
  .hero-team-list { gap: var(--space-3); }
  .hero-team-caption { text-align: center; }
  .hero-team-name { font-size: 13.5px; }
  .hero-team-role { font-size: 12px; }
  .hero-cta-price { gap: 8px; }
  .hero-cta-price s { font-size: 17px; }
  .hero-cta-price b { font-size: 32px; }
  .hero-cta-deadline { font-size: 13px; padding: 4px 8px; }
  .hero-team-exp { left: 8px; bottom: 8px; font-size: 11.5px; padding: 6px 10px; }
}

/* Первый экран на время акции (10.10.2026): заголовок — главный, цена/скидка/факты/кнопка собраны
   в одну спокойную карточку предложения. Один красный акцент — цена; скидка плоской плашкой. */
.hero-promo { display: flex; flex-direction: column; gap: var(--space-5); }
.hero-promo .hero-title { margin: 0; }
.promo-card {
  width: 100%; max-width: 480px; margin: 0 auto; text-align: left;
  background: var(--white); border: 1px solid color-mix(in srgb, var(--dark) 8%, transparent);
  border-radius: var(--radius-card); padding: var(--space-5);
  box-shadow: 0 12px 32px rgba(43, 36, 32, .06);
}
.promo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.promo-card-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--dark); }
.promo-card-tag {
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--red-badge-bg); color: var(--red-badge-text);
  font-weight: 700; font-size: 13px; line-height: 1.3; white-space: nowrap;
}
.promo-card-price {
  margin: var(--space-3) 0 0; display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-head); line-height: 1;
}
.promo-card-price b { color: var(--red); font-weight: 800; font-size: 44px; letter-spacing: -.02em; white-space: nowrap; }
.promo-card-price s {
  color: var(--text-muted); font-weight: 600; font-size: 18px; white-space: nowrap;
  text-decoration-thickness: 1.5px;
}
.promo-card-facts {
  list-style: none; margin: var(--space-4) 0 0; padding: var(--space-4) 0 0;
  border-top: 1px solid color-mix(in srgb, var(--dark) 8%, transparent);
  display: grid; gap: 8px;
}
.promo-card-facts li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.4; color: var(--dark); }
.promo-card-facts li::before {
  content: ''; position: absolute; left: 0; top: .2em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.9' fill='none' stroke='%234C7F11' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.promo-card-btn { width: 100%; margin-top: var(--space-5); justify-content: center; }
@media (min-width: 901px) {
  .promo-card { margin: 0; }
}
@media (max-width: 900px) {
  .hero-promo { gap: var(--space-4); }
  .promo-card { padding: var(--space-4); }
  .promo-card-price b { font-size: 38px; }
  .promo-card-facts li { font-size: 14px; }
}

/* Small slogan line above a section title */
.section-kicker {
  display: block; font-weight: 700; font-size: 14px;
  color: var(--green-text); margin-bottom: 10px;
}
.section-kicker--center { text-align: center; }
.section-kicker--parents { color: var(--teal); }   /* бирюзовый — «для родителей» */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Sage instead of the old beige tile colour — same family as --bg-alt, and pairs with the
     green dot already inside it. */
  background: var(--green-bg);
  color: var(--green-text);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.hero-title { font-size: var(--fs-h1); line-height: var(--lh-h1); margin: 0 0 var(--space-5); }
.hero-title-accent { color: var(--green-text); }
/* Заголовок героя в две фразы: «боль» — во время сборки пазла, «ответ» — когда
   загораются цифры (JS ставит .is-hero-lit на .hero-scroller). Фразы сложены в грид
   (высота = по большей), поэтому подмена без сдвига макета. */
.hero-title--phased { display: grid; }
.hero-title--phased .hero-phase { grid-area: 1 / 1; transition: opacity .45s ease; }
.hero-title--phased .hero-phase--answer { opacity: 0; color: var(--dark); }
.hero-phase-hl { color: var(--red); font-weight: inherit; }
.hero-phase-hl--green { color: var(--green-text); }
.hero-scroller.is-hero-lit .hero-title--phased .hero-phase--ask { opacity: 0; }
.hero-scroller.is-hero-lit .hero-title--phased .hero-phase--answer { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-title--phased .hero-phase { transition: none; }
}
.hero-lead { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); max-width: 460px; }
.hero-lead.center { max-width: 600px; margin: 0 auto 1em; text-align: center; }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.hero-art { position: relative; display: flex; justify-content: center; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
.hero-art-img { width: 100%; max-width: 340px; height: auto; filter: drop-shadow(0 24px 40px rgba(43, 36, 32, 0.12)); animation: floaty 6s ease-in-out infinite; }
.process-results-cta { margin-top: 44px; }
/* Sits above the tag cloud (z-index) and keeps its own readable measure regardless of how wide
   the hero itself is. `order` (both this and the cloud below) only matters once the cloud drops
   out of absolute positioning on phones — see the 720px block — so text always comes first there. */
.hero-text--centered { position: relative; z-index: 2; max-width: 640px; order: 0; }

/* Reused by the "Кстати, вот кто воплощает результаты в жизнь" scroll-cue further down the page
   (.process-results-cta) — the hero itself no longer has one of these, the 4-step timeline's "?"
   link took over that job. */
.hero-scroll-cta {
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 40px auto 0;
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
}
.hero-scroll-cta:hover { color: var(--dark); }
.hero-scroll-cta-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  animation: heroArrowBounce 1.8s ease-in-out infinite;
}
@keyframes heroArrowBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.page-hero { padding: var(--space-9) 0 var(--space-5); text-align: center; }
.page-hero--doodled { position: relative; isolation: isolate; }
.page-hero h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }

/* ---------- Sections — вертикальный ритм ---------- */
.section { padding: var(--space-9) 0; }               /* 64 desktop */
.section-alt { background: var(--bg-alt); }
/* This one section wanted the soft green swapped for yellow specifically — not a global
   --bg-alt change, which would've also recoloured every other .section-alt on the site. */
.about-section { background: var(--bg-2); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-8); }
.section-title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.section-title.center { text-align: center; margin-bottom: var(--space-8); }
.section-lead { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); }
.section-lead.center { text-align: center; max-width: 600px; margin: 0 auto var(--space-7); }

/* ---------- Hero: пазл, собирающийся при скролле ----------
   Заголовок сверху, пазл под ним. Раздел закреплён (.hero-pin sticky) → main.js тянет
   --hpa 1→0 по прогрессу скролла: детали разлетены → собраны. Деталь = <g class="hp-shard">
   со своим --dx/--dy/--dr (пиксели вьюбокса). hp-shard--text — цвет по направлению
   (--speech/--cognitive/--emotion/--body), hp-shard--blank — серая без текста.
   Текст — HTML в <foreignObject>, font-size 90 в координатах вьюбокса высотой 1352 →
   ровно height*90/1352 в пикселях. ≤900px: SVG скрыт, .hero-puzzle-fallback — плашки. */
@property --hpa { syntax: '<number>'; inherits: true; initial-value: 1; }

.hero-puzzle {
  order: 1; z-index: 1; width: 100%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; --hpa: 1; --hp-scatter: 1;
}
.hero-puzzle-svg {
  width: 100%; max-width: 860px; height: auto;
  overflow: visible; display: block;
}
/* два разных пазла: горизонтальный на десктопе, вертикальный на мобилке */
.hero-puzzle-svg--mob { display: none; }
@media (max-width: 900px) {
  .hero-puzzle-svg--desk { display: none; }
  .hero-puzzle-svg--mob  { display: block; max-width: 400px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .hero-puzzle-svg--mob { max-width: 340px; }
}
.hp-shard {
  transform-box: fill-box; transform-origin: center;
  transform:
    translate(calc(var(--dx, 0px) * var(--hpa) * var(--hp-scatter, 1)), calc(var(--dy, 0px) * var(--hpa) * var(--hp-scatter, 1)))
    rotate(calc(var(--dr, 0deg) * var(--hpa) * var(--hp-scatter, 1)));
  /* Пока деталь разлетена (--hpa к 1), она может оказаться поверх заголовка (мобилка,
     z-index которого выше — см. media(max-width:900px) у .hero-puzzle) — лёгкая
     прозрачность в этот момент, чтобы просвечивающий текст было легче дочитать. К моменту
     сборки (--hpa к 0) деталь уже непрозрачна. --hp-fade — только на мобилке (ниже),
     на десктопе детали друг друга/текст не перекрывают, там 0 — без изменений. */
  opacity: calc(1 - var(--hpa) * var(--hp-fade, 0));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
/* ---- Пазл-сценарий: (1) детали разлетены, на них ПРОБЛЕМЫ; (2) при скролле собираются;
   (3) пауза — собранный пазл с проблемами держится ещё часть скролла; (4) JS вешает
   .is-assembled → на всех стат-деталях ОДНОВРЕМЕННО: проблема гаснет → деталь заливается
   цветом → «выпрыгивает» цифра, под ней подпись. Весь текст — Baloo 2. ---- */
.hp-shard { filter: drop-shadow(0 5px 14px rgba(43, 36, 32, 0.10)); }
.hp-shard--piece > path { fill: var(--white); stroke: none; }
.hp-shard--blank { filter: none; }
/* детали без текста — тоже в лёгких оттенках палитры, чтобы пазл был цветным целиком */
.hp-shard--blank > path { fill: #EFEBE6; }
.hp-blank-1 > path { fill: var(--purple-badge-bg); }
.hp-blank-2 > path { fill: var(--amber-badge-bg); }
.hp-blank-3 > path { fill: var(--teal-badge-bg); }
.hp-blank-4 > path { fill: var(--green-bg); }
.hp-blank-5 > path { fill: var(--red-badge-bg); }
.hp-blank-6 > path { fill: var(--purple-badge-bg); }

/* --sc — насыщенная заливка после сборки; --sb — бледный оттенок до; --stt — яркая
   версия цвета для текста проблемы поверх бледного оттенка */
.hp-shard--stat-years { --stat-i: 0; --sc: var(--purple); --sb: var(--purple-badge-bg); --stt: #6C5CA6; }
.hp-shard--stat-phd   { --stat-i: 1; --sc: var(--teal);   --sb: var(--teal-badge-bg);   --stt: #068783; }
.hp-shard--stat-team  { --stat-i: 2; --sc: var(--green);  --sb: var(--green-bg);        --stt: #56901A; }
.hp-shard--stat-metro { --stat-i: 3; --sc: var(--amber);  --sb: var(--amber-badge-bg);  --stt: #C1770B; }
.hp-shard--stat-price { --stat-i: 4; --sc: var(--red);    --sb: var(--red-badge-bg);    --stt: #E5303F; }
.hp-shard--stat-license { --stat-i: 5; --sc: var(--green); --sb: var(--green-bg);       --stt: #56901A; }
/* Цифры на всех стат-деталях зажигаются ОДНОВРЕМЕННО и быстро — без волны по очереди
   (--d держим на 0; переменная оставлена, вдруг снова захотим лёгкий стаггер). */
.hp-shard--stat { --d: 0s; }
.hp-shard--stat-license { --d: 0s; }
/* номер лицензии — длинная строка, кегль меньше обычной цифры (в юнитах viewBox) */
.hp-stat--license .hp-num { font-size: 52px; letter-spacing: 0; line-height: 1.05; white-space: nowrap; }
.hp-stat--license .hp-cap { font-size: 30px; line-height: 1.15; }

/* до сборки — деталь в лёгком оттенке своего цвета (проблема на нём читается),
   после .is-assembled — заливается насыщенным цветом */
.hp-shard--stat > path { fill: var(--sb); transition: fill 0.5s ease; }
.hero-puzzle.is-assembled .hp-shard--stat > path { fill: var(--sc); transition-delay: var(--d); }
.hero-puzzle.is-assembled .hp-shard--stat { filter: drop-shadow(0 14px 28px rgba(43, 36, 32, 0.16)); }

/* ПРОБЛЕМА — поверх детали, до своей волны видна, потом гаснет. Цвет — яркая версия
   цвета детали (--stt). */
.hp-label {
  box-sizing: border-box; height: 100%; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-head); font-weight: 800; font-size: 62px; line-height: 1.14;
  color: var(--stt);
  opacity: 1; transition: opacity 0.3s ease;
}
.hero-puzzle.is-assembled .hp-label { opacity: 0; transition-delay: var(--d); }

/* ЦИФРА + ПОДПИСЬ на одной детали, по центру тела (foreignObject подогнан под тело) */
.hp-stat {
  box-sizing: border-box; height: 100%; width: 100%; padding: 0 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 4px; font-family: var(--font-head); color: #fff;
}
.hp-num {
  /* ВНУТРИ <foreignObject> в iOS Safari нельзя: position:relative/absolute у потомков
     и scale()/rotate() в transform — такой элемент просто не рисуется (подписи .hp-cap
     без position/scale — рисуются). Поэтому: без position, без scale, line-height ≥ 1. */
  font-family: var(--font-accent);
  font-weight: 800; font-size: 118px; line-height: 1; letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.26s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
/* старую цену — обычной инлайн-строкой рядом (без position:absolute) */
.hp-num s {
  font-size: 0.36em; font-weight: 700; opacity: 0.72; margin-left: 0.3em; white-space: nowrap;
}
.hp-cap {
  font-weight: 700; font-size: 40px; line-height: 1.16; color: rgba(255, 255, 255, 0.92);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hero-puzzle.is-assembled .hp-num {
  opacity: 1; transform: none; transition-delay: calc(var(--d) + 0.1s);
}
.hero-puzzle.is-assembled .hp-cap {
  opacity: 1; transform: none; transition-delay: calc(var(--d) + 0.22s);
}

@media (prefers-reduced-motion: reduce) {
  .hero-puzzle { --hpa: 0; }
  .hp-shard { transition: none; }
  .hp-label { opacity: 0; }
  .hp-num, .hp-cap { opacity: 1; transform: none; transition: none; }
  .hp-cap { opacity: 0.92; }
}

/* ≤900px: вертикальный пазл (viewBox 1524×2090). Сборка/цифры/паузы — один в один как
   на десктопе (пин работает на всех ширинах). Детали этого пазла невысокие, поэтому
   кегль (в SVG-единицах) подобран так, чтобы цифра + короткая подпись помещались. */
@media (max-width: 900px) {
  .hp-label { font-size: 84px; }
  .hp-num   { font-size: 134px; }
  .hp-cap   { font-size: 53px; }
  .hp-stat--license .hp-num { font-size: 60px; }
  .hp-stat--license .hp-cap { font-size: 40px; }
}

/* Fallback list: visually hidden on desktop, kept in the a11y tree (SVG is aria-hidden);
   becomes the visible layout ≤900px (see media block far below). */
.hero-puzzle-fallback {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; list-style: none;
}



/* Three specialisations, each grouping a few roles under the problem they solve — same content
   as the printed banners, just laid out as cards instead of illustrated posters. */
.choice-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.choice-category {
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 28px; display: flex; flex-direction: column;
}
.choice-category-title { font-size: 17px; margin: 0 0 20px; }
.choice-category-items { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.choice-category-item { display: flex; gap: 14px; align-items: flex-start; }
.choice-category-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
}

/* Brand jigsaw-tile shape, dropped over whatever circle/square an icon element already was —
   mask keeps working with any background (solid, rgba, even the inline gradients some of these
   carry), so this is just added on top rather than rewritten per element. `contain` keeps the
   piece's true 414:300 proportions instead of squashing it into a square box.
   !important on border-radius: every element this lands on already had its own border-radius
   (50% for a circle, or a few px for a rounded square) declared later in the cascade than this
   rule, which was winning and leaving a rounded corner showing outside the masked silhouette —
   this has to beat that regardless of source order.
   padding-right: the shape's "body" is only the left ~72.5% of the box (414 of the 414+tab
   width) — the tab is a connector, not part of the piece — so centered content needs to be
   centered against that body, not the full box, or it reads as pushed right. Each caller sets
   --tile-w to its own pixel width so this can shift by a fixed fraction of it instead of a
   guessed padding. */
.puzzle-tile {
  border-radius: 0 !important;
  padding-right: calc(var(--tile-w, 0px) * 0.2754) !important;
  -webkit-mask-image: var(--puzzle-tile);
  mask-image: var(--puzzle-tile);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
/* Mirror of .puzzle-tile — tab (and so the padding compensating for it) on the left instead of
   the right. Used for the arrow chip of a split puzzle button, whose tab points into the text
   piece it's plugged into. */
.puzzle-tile-left {
  border-radius: 0 !important;
  padding-left: calc(var(--tile-w, 0px) * 0.2754) !important;
  -webkit-mask-image: var(--puzzle-tile-left);
  mask-image: var(--puzzle-tile-left);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.choice-category-icon--teal { background: var(--teal-badge-bg); }
.choice-category-icon--green { background: var(--green-bg); }
.choice-category-icon--yellow { background: var(--yellow-badge-bg); }
.choice-category-icon--purple { background: var(--purple-badge-bg); }
.choice-category-item h4 { font-size: 14.5px; margin: 0 0 3px; }
.choice-category-item p { font-size: 13px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.choice-category-tagline {
  margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border-soft);
  font-style: italic; font-weight: 600; font-size: 14px; color: var(--text-muted); text-align: center;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; margin-top: 8px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.center-cta { text-align: center; margin-top: 32px; }

/* ---------- Routes (готовые маршруты) — the most promoted offer ---------- */
.routes-intro { margin-top: 64px; text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.routes-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--green-bg); color: var(--green-text);
  font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: var(--radius-pill); margin-bottom: 12px;
}
.routes-title { font-family: var(--font-head); font-size: var(--fs-h2); line-height: var(--lh-h2); margin: 0 0 var(--space-3); }
.routes-lead { color: var(--text-muted); font-size: var(--fs-body); line-height: var(--lh-body); margin: 0; }

/* Cards back in their original grid (2 columns desktop, 1 on mobile) — the step-by-step feel
   isn't a horizontal card-by-card carousel, it's the page's own vertical scroll moving in fixed
   jumps while this section is in view (see the "routes paged scroll" block in main.js): one wheel
   flick/swipe advances exactly one grid row, like a Reels feed, then the grid goes back to normal
   page flow once you've scrolled past it. */
/* auto-fill: широкие экраны раскладывают 3 в ряд (карточки перестают быть полупустыми),
   средние — 2, узкие — 1. Ширину колонки держим ≥ 320px. */
.routes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-top: 32px; }
.route-card {
  position: relative; background: var(--white); border: 2px solid var(--route-color, var(--green));
  border-radius: var(--radius-md); padding: 28px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 16px 32px rgba(43, 36, 32, 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.route-card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px rgba(43, 36, 32, 0.12); }
.route-card-head { display: flex; align-items: center; justify-content: space-between; }
.route-letter {
  width: 44px; height: 44px; --tile-w: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--route-color, var(--green)); color: var(--white);
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
}
/* Route detail hero — same badge, blown up to fill the hero photo slot */
.service-hero-photo .route-letter { width: 120px; height: 120px; --tile-w: 120px; border-radius: var(--radius-md); font-size: 52px; }
.route-price {
  font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--route-color, var(--green));
  background: color-mix(in srgb, var(--route-color, var(--green)) 12%, transparent); padding: 6px 12px; border-radius: var(--radius-pill);
}
.route-title { font-family: var(--font-head); font-size: 22px; margin: 0; }
.route-intro { font-weight: 600; color: var(--dark); margin: 0; font-size: 14.5px; }
/* «Боли» заголовками-вопросами (главные строки карточки) + название маршрута под ними.
   Повёрнутые плашки .route-pain-float на главной больше не выводятся (стили ниже — для
   совместимости, если где-то ещё остались). */
.route-pains { display: flex; flex-direction: column; gap: 8px; }
.route-pain-q {
  margin: 0; padding-left: 12px; border-left: 3px solid var(--route-color, var(--green));
  font-family: var(--font-head); font-weight: 800; font-size: 19px; line-height: 1.25; color: var(--dark);
}
.route-card-head--named { justify-content: flex-start; gap: 10px; margin-top: 4px; }
.route-card-head--named .route-title {
  font-size: 16px; font-weight: 800; color: var(--route-color, var(--green));
}
.route-card-head--named .route-letter { width: 32px; height: 32px; --tile-w: 32px; border-radius: 9px; font-size: 14px; }
/* полоса сверху под повёрнутые плашки больше не нужна */
.js-armed .route-card { padding-top: 28px; }
/* «Боли» маршрута.
   Без JS — обычные чипы в карточке (fallback).
   С JS (#routes-scroller.js-armed) — повёрнутые плашки поверх карточек, выезжают:
   десктоп — раздел закрепляется, по одной карточке за шаг скролла;
   мобилка — когда карточка попадает в экран (IntersectionObserver). */
.route-pain-float { display: flex; flex-wrap: wrap; gap: 6px; }
.route-pain-pill {
  font-size: 12px; font-weight: 600; color: var(--route-color, var(--green));
  background: color-mix(in srgb, var(--route-color, var(--green)) 10%, transparent);
  padding: 5px 10px; border-radius: var(--radius-pill);
}

/* режим анимации: карточке добавляем полосу сверху, в ней — 2 повёрнутые плашки,
   контент карточки они не перекрывают */
.js-armed .route-card { overflow: visible; padding-top: 44px; }
.js-armed .route-pain-float {
  position: absolute; left: 0; right: 0; top: 0; height: 0;
  display: block; pointer-events: none; z-index: 6;
}
.js-armed .route-pain-float .route-pain-pill {
  position: absolute; max-width: min(230px, 62vw); white-space: normal; line-height: 1.2;
  font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--dark);
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--route-color, var(--green)) 35%, var(--border-soft));
  border-left: 3px solid var(--route-color, var(--green));
  padding: 6px 10px; border-radius: 7px;
  box-shadow: 0 12px 26px -10px rgba(43, 36, 32, .3);
  opacity: 0; transform: scale(.6) rotate(var(--rot, -4deg));
  transition: opacity .3s ease, transform .45s cubic-bezier(.34, 1.5, .64, 1);
}
.js-armed .route-pain-float .route-pain-pill:nth-child(1) { --rot: -5deg; top: -18px; left: -12px; }
.js-armed .route-pain-float .route-pain-pill:nth-child(2) { --rot: 4deg;  top: 4px;  right: -16px; left: auto; }
.js-armed .route-card.is-pain-shown .route-pain-float .route-pain-pill { opacity: 1; transform: scale(1) rotate(var(--rot, -4deg)); }
.js-armed .route-card.is-pain-shown .route-pain-float .route-pain-pill:nth-child(2) { transition-delay: .12s; }
.route-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.route-meta-item {
  font-size: 12.5px; font-weight: 600; color: var(--text-muted); background: var(--bg-alt);
  padding: 6px 10px; border-radius: var(--radius-pill);
}
.route-card .btn { margin-top: auto; }
.route-card-cta { border-style: dashed; background: var(--bg-alt); justify-content: center; }
.route-card-cta .route-letter { background: var(--dark); }
.route-card-cta .route-pain-q { border-left-color: var(--dark); }
.route-card-cta .route-card-head--named .route-title { color: var(--dark); }

.routes-scroller { position: relative; }
.routes-pin { position: sticky; top: var(--header-offset); }

/* ---------- Десктоп: закрепление, видна вся сетка, плашки накапливаются ---------- */
@media (min-width: 901px) {
  .routes-scroller { height: calc(var(--results-steps, 6) * 30vh + 55vh); }
  .routes-pin {
    min-height: calc(100vh - var(--header-offset));
    display: flex; flex-direction: column; justify-content: center;
    padding: 20px 0;
  }
  .routes-pin .routes-intro { margin: 0 auto 30px; }
  .routes-pin .routes-title { font-size: 20px; }
  .routes-pin .routes-lead { font-size: 13px; }
  .routes-pin .routes-grid { margin-top: 0; }
  /* компактнее — 6 карточек в закреплённый экран; сверху — полоса под плашки */
  .routes-pin .route-card { padding: 18px 18px 16px; gap: 6px; }
  .routes-pin .route-pain-q { font-size: 15.5px; }
  .routes-pin .route-pains { gap: 5px; }
  .routes-pin .route-title { font-size: 17px; }
  .routes-pin .route-intro { font-size: 12.5px; }
  .routes-pin .route-meta { margin: 2px 0 4px; }
  .routes-pin .route-meta-item { font-size: 11px; padding: 4px 8px; }
  .routes-pin .link-arrow { font-size: 12.5px; }
  .routes-pin .route-card .btn { display: none; }
  .routes-pin .route-card-cta .btn { display: inline-flex; width: 100%; margin-top: 10px; }
  .routes-pin .route-letter { width: 36px; height: 36px; --tile-w: 36px; font-size: 15px; }
  .routes-pin .route-card:hover { transform: none; }
  .js-armed .route-pain-float .route-pain-pill { font-size: 11.5px; max-width: 220px; }
}

/* ---------- Мобилка: закрепление, карточки по одной (текущая по центру, прошлые уехали
   вверх, следующие ждут снизу), у текущей выезжают плашки ---------- */
/* мобилка: карточки маршрутов листаются вертикально, как у специалистов — текущая
   вверху целиком, следующая выглядывает снизу (2 карточки на экране). */
@media (max-width: 900px) {
  /* +14vh (не +40vh) — хвост пина после последнего шага короткий, следующий раздел уже
     видно снизу на этом же экране. Но сам последний шаг (карточка-CTA) раньше занимал
     такую же долю скролла (62vh), как обычная карточка — после неё оставался пустой
     «мёртвый» отрезок скролла без видимых изменений, прежде чем секция отпускала. 62vh →
     50vh — короче каждый шаг, в том числе и это молчание после последней карточки. */
  .routes-scroller { position: relative; height: calc(var(--results-steps, 6) * 50vh + 4vh); }
  .routes-pin {
    height: calc(100svh - var(--header-offset));
    height: calc(100dvh - var(--header-offset));
    /* justify-content:center — заголовок и карточка центрируются как ГРУППА, не по
       отдельности. Раньше .container/.routes-grid были flex:1 1 auto (растягивались на
       весь остаток высоты пина) — сама карточка внутри центрировалась, но относительно
       этой растянутой на весь экран области, а не относительно заголовка, из-за чего
       между заголовком (у самого верха) и карточкой (в центре ОГРОМНОЙ области) оставался
       гигантский пустой разрыв. Тот же приём, что уже в «Отзывах» ниже. */
    display: flex; flex-direction: column; justify-content: center;
    padding: 10px 0 0; overflow: hidden;
  }
  /* .container между пином и сеткой ломает flex-цепочку — тянем и его, но по своему
     контенту (0 0 auto), не на весь остаток — иначе justify-content выше не сработает. */
  .routes-pin > .container { flex: 0 0 auto; display: flex; flex-direction: column; }
  .routes-pin .routes-intro { flex: 0 0 auto; margin: 0 auto 8px; position: relative; z-index: 3; background: var(--bg); }
  .routes-pin .routes-title { font-size: 18px; }
  .routes-pin .routes-lead { display: none; }
  .routes-pin .routes-grid {
    /* Высота ровно с одну карточку (--route-card-h, отдельная от --route-step переменная —
       см. комментарий у measureRouteStep в main.js, почему не одна и та же) — раньше
       растягивалась на весь остаток экрана, что и разносило заголовок с карточкой. */
    flex: 0 0 auto; height: var(--route-card-h, 360px); position: relative;
    display: block; grid-template-columns: none; gap: 0; margin: 0;
  }
  .routes-pin .route-card {
    position: absolute; left: 50%; top: 50%;
    width: min(92vw, 400px); padding: 20px 20px 18px; gap: 7px;
    /* Текущая карточка стоит по центру доступной области (как в «Отзывах» — там центр
       уже был, тут раньше было top:8px, т.е. прибито к верху окна). translateY(-50%) —
       центрирование, дальше + сдвиг = (индекс карточки − текущий шаг) × высота со стыком,
       который и уводит остальные карточки выше/ниже центра. Заодно решает и другую вещь:
       у последней карточки (CTA), которая короче обычных и без следующей, что выглядывала
       бы снизу, раньше весь остаток высоты повисал пустым куском под ней — теперь она,
       как и все, просто по центру, воздух распределён поровну. */
    transform: translateX(-50%) translateY(-50%)
               translateY(calc((var(--i, 0) - var(--route-slide, 0)) * var(--route-step, 360px)));
    opacity: .45;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
  }
  .routes-pin .route-card.is-route-current { opacity: 1; }
  /* карточка, ушедшая вверх, исчезает полностью (не висит полупрозрачной) */
  .routes-pin .route-card.is-route-past { opacity: 0; }
  /* плашки — обе в верхней полосе карточки, чуть свисают по бокам (вверх не торчат) */
  .js-armed .route-pain-float .route-pain-pill:nth-child(1) { top: 2px;  left: -8px; }
  .js-armed .route-pain-float .route-pain-pill:nth-child(2) { top: 20px; right: -10px; left: auto; }
}

/* ---------- Карточка маршрута «проблема → решение» (главная) ----------
   Верх — тонированная «деталь» с ситуацией словами родителя; её выступ (пазл, ::after)
   входит в белый низ — решение: маршрут, команда, нагрузка. Селекторы с .routes-scroller —
   чтобы перебить компактные правила .routes-pin/.js-armed выше (позиционирование пина
   на мобилке — position/transform/width — не трогаем). */
.routes-scroller .route-card.route-card--pv {
  padding: 0; gap: 0; overflow: visible;
  border: 1px solid color-mix(in srgb, var(--route-color) 22%, transparent);
  background: var(--white); box-shadow: 0 10px 24px -14px rgba(43, 36, 32, .25);
}
.routes-scroller .route-card--pv:hover { transform: none; }
.route-problem {
  position: relative; padding: 22px 24px 24px;
  background: color-mix(in srgb, var(--route-color) 15%, var(--white));
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
}
.route-problem::after {               /* выступ пазла — проблема «входит» в решение */
  content: ""; position: absolute; left: 24px; bottom: -13px;
  width: 30px; height: 14px; border-radius: 0 0 15px 15px;
  background: inherit;
}
.route-problem-q {
  margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--dark);
  text-wrap: pretty;
}
.route-problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.route-problem-list li {
  font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--dark);
}
.route-problem-list li + li {
  padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--route-color) 20%, transparent);
}
.route-solution { display: flex; flex-direction: column; gap: 4px; padding: 26px 24px 22px; flex: 1 1 auto; }
.route-solution-name {
  font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.2;
  color: var(--route-color); text-decoration: none; margin-bottom: 4px;
}
.route-solution-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.route-solution-team, .route-solution-load { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.route-solution-team { color: var(--dark); font-weight: 600; }
.route-solution-more {
  margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--route-color);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; width: fit-content;
}
.route-solution .btn { margin-top: 14px; }
.routes-scroller .route-card--pv.route-card-cta { border-style: solid; background: var(--white); }
.route-card-cta .route-problem { background: var(--bg-2); }
.route-card-cta .route-solution-name { color: var(--dark); }
@media (min-width: 901px) {
  /* в закреплённом экране на десктопе 6 карточек должны поместиться сразу */
  .routes-pin .route-problem { padding: 16px 20px 18px; }
  .routes-pin .route-problem::after { left: 20px; }
  .routes-pin .route-problem-list { gap: 7px; }
  .routes-pin .route-problem-list li { font-size: 15.5px; }
  .routes-pin .route-problem-q { font-size: 16px; }
  .routes-pin .route-problem-list li + li { padding-top: 7px; }
  .routes-pin .route-solution { padding: 20px 20px 16px; }
  .routes-pin .route-solution-name { font-size: 17px; }
  .routes-pin .route-solution-team, .routes-pin .route-solution-load { font-size: 13px; }
  .routes-pin .route-solution-more { margin-top: 8px; font-size: 13px; }
  .routes-pin .route-card--pv .btn { display: none; }
  .routes-pin .route-card--pv.route-card-cta .btn { display: inline-flex; margin-top: 10px; }
}
@media (max-width: 900px) {
  .routes-scroller .route-card.route-card--pv { padding: 0; }
  .route-problem { padding: 18px 20px 20px; }
  .route-problem::after { left: 20px; }
  .route-problem-list li { font-size: 16px; }
  .route-problem-q { font-size: 17px; }
  .route-solution { padding: 22px 20px 18px; }
}

/* ---------- «Четыре двери» (главная, вместо карточек маршрутов) ----------
   Та же карточка «проблема → решение» и тот же закреплённый скролл, но наполнение другое:
   сверху возраст, ситуация и боли; снизу — кто поможет (фото специалистов) и услуги. */
/* По 2 карточки в строку на любой ширине ≥901px (по просьбе центра, 10.10.2026; было 4). */
.routes-grid--doors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.door-num {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--white); color: var(--route-color); font-size: 12px; font-weight: 700; line-height: 1.2;
}
.route-card-cta .door-num { color: var(--dark); }
.door-promise { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--dark); }
.door-pains { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.door-pains li {
  padding: 5px 10px; border-radius: var(--radius-pill); line-height: 1.25;
  background: color-mix(in srgb, var(--white) 70%, transparent); font-size: 13px; font-weight: 600; color: var(--dark);
}
.door-label { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.door-team { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.door-specialist {
  display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none;
  font: inherit; text-align: left; cursor: pointer; color: var(--dark);
}
.door-specialist-photo {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--route-color) 15%, var(--white));
}
.door-specialist-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.door-specialist-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.door-specialist:hover .door-specialist-name { color: var(--route-color); text-decoration: underline; text-underline-offset: 3px; }
.door-services { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.door-service {
  padding: 5px 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; line-height: 1.25;
  border: 1px solid color-mix(in srgb, var(--route-color) 35%, transparent); color: var(--route-color);
  text-decoration: none;
}
.door-service:hover { background: color-mix(in srgb, var(--route-color) 10%, var(--white)); }
.routes-scroller .route-card--door .route-solution .btn { margin-top: auto; }
.route-card--door .route-solution { gap: 4px; }
.route-card--door .door-services, .route-card--door .route-solution-more { margin-bottom: 16px; }
@media (min-width: 901px) {
  /* в закреплённом экране у дверей кнопка остаётся — это главный шаг из карточки */
  .routes-pin .route-card--door .btn { display: inline-flex; margin-top: auto; }
  .routes-pin .route-card--door .route-problem-q { font-size: 16.5px; }
  /* в закреплённом экране всё должно влезть под шапку с плашкой акции */
  .routes-pin .routes-intro:has(+ .routes-grid--doors) { margin-bottom: 18px; }
  .routes-pin .routes-intro:has(+ .routes-grid--doors) .routes-lead { display: none; }
  .routes-pin .route-card--door .route-problem { padding: 14px 18px 16px; }
  .routes-pin .route-card--door .route-solution { padding: 18px 18px 16px; }
  .routes-pin .route-card--door .door-promise { font-size: 13px; margin-top: 6px; }
  .routes-pin .route-card--door .door-team { gap: 4px; }
  .routes-pin .route-card--door .door-specialist-photo { width: 30px; height: 30px; }
  .routes-pin .route-card--door .door-specialist-name { font-size: 13px; }
  .routes-pin .route-card--door .door-services, .routes-pin .route-card--door .route-solution-more { margin-bottom: 12px; }
  .routes-pin .route-card--door .door-services { margin-top: 10px; }
}
@media (max-width: 900px) {
  .routes-grid--doors { grid-template-columns: none; }
  .door-team { flex-direction: row; flex-wrap: wrap; gap: 8px 14px; }
  .door-specialist-photo { width: 30px; height: 30px; }
  .door-specialist-name { font-size: 13px; }
}

/* ---------- Подготовка к школе (главная, после специалистов) ---------- */
.school-prep-card {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 32px; align-items: center;
  padding: 36px 40px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--purple) 8%, var(--white));
}
.school-prep-kicker {
  display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--white); color: var(--purple); font-size: 13px; font-weight: 700;
}
.school-prep .section-title { margin: 0 0 10px; }
.school-prep-lead { margin: 0 0 16px; max-width: 560px; color: var(--text-muted); font-size: 16px; line-height: 1.5; }
.school-prep-skills { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.school-prep-skills li {
  padding: 7px 14px; border-radius: var(--radius-pill); background: var(--white);
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--dark);
}
.school-prep-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.school-prep-facts li { display: flex; flex-direction: column; gap: 2px; }
.school-prep-facts b { font-family: var(--font-head); font-size: 17px; color: var(--purple); }
.school-prep-facts span { font-size: 13px; color: var(--text-muted); line-height: 1.35; }
.school-prep-price {
  display: flex; flex-direction: column; gap: 4px; padding: 24px; border-radius: var(--radius-md);
  background: var(--white); box-shadow: 0 12px 28px -18px rgba(43, 36, 32, .35);
}
.school-prep-price-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(43, 36, 32, .08);
}
.school-prep-price-row span { font-size: 14px; color: var(--text-muted); }
.school-prep-price-row b { font-family: var(--font-head); font-size: 22px; color: var(--dark); white-space: nowrap; }
.school-prep-price .btn { margin-top: 16px; }
.school-prep-more {
  align-self: center; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--purple);
  text-decoration: underline; text-underline-offset: 3px;
}
@media (max-width: 900px) {
  .school-prep-card { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; }
  .school-prep-facts { grid-template-columns: 1fr; gap: 10px; }
  .school-prep-lead { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .js-armed .route-pain-float .route-pain-pill { transition: opacity .2s ease; transform: rotate(var(--rot, -4deg)); }
}

/* ---------- Services: a simple scrollable line + link to the full price list ---------- */
.services-price-intro { margin-top: 64px; text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }

.services-line-wrap { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.services-line-nav { flex-shrink: 0; }
.services-line {
  /* justify-content: center on an overflowing flex row is a known trap — browsers clip the
     scrollable range instead of letting you reach the first/last card, so scrolling looked
     "stuck" once there were enough cards to overflow. flex-start scrolls its full range. */
  flex: 1; display: flex; justify-content: flex-start; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px 2px 16px; scrollbar-width: none;
}
.services-line::-webkit-scrollbar { display: none; }
.service-line-card {
  scroll-snap-align: start; flex: 0 0 208px; background: var(--white); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-line-card:hover { transform: translateY(-3px); box-shadow: 0 14px 24px rgba(43, 36, 32, 0.08); }
.service-line-letter {
  width: 32px; height: 32px; --tile-w: 32px; border-radius: 9px; background: var(--service-color, var(--green)); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 14px;
}
.service-line-name { font-weight: 700; font-size: 14.5px; color: var(--dark) !important; }
.service-line-name:hover { color: var(--green-text) !important; }
.service-line-price { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.service-line-card .btn { margin-top: auto; }

/* ---------- "Как проходит работа": pinned scroll-timeline ----------
   The section pins in place and page-scroll steps through the numbers: the left column tracks
   progress (filled line + active circle), the right column crossfades a photo + caption per
   step. Mobile keeps the same pin/crossfade idea, but the numbers become a horizontally
   scrollable strip (JS brings the active one to the left edge) since a vertical column doesn't
   fit a narrow screen. */
.process-scroller { position: relative; height: calc(var(--process-steps, 4) * 75vh); margin-top: 12px; }
.process-pin {
  position: sticky; top: var(--header-h, 90px);
  height: calc(100svh - var(--header-h, 90px));
  height: calc(100dvh - var(--header-h, 90px));
  display: flex; align-items: center; overflow: hidden;
  touch-action: pan-y;
}
.process-pin-title { margin-bottom: 28px; }
.process { position: relative; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* Left column: numbers + titles only — fixed row height, nothing ever resizes, so nothing jumps.
   The viewport/track pair only becomes a real mask+slider on phones (720px block below) — here
   they're transparent pass-throughs so desktop renders exactly as if they weren't there. */
.process-timeline { position: relative; }
.process-timeline-viewport { display: contents; }
.process-timeline-track { display: contents; }
.process-step { display: flex; align-items: center; gap: 20px; position: relative; height: 76px; }
/* Puzzle badge: main.js clip-paths this to the real jigsaw silhouette (see puzzle-vchain-* in
   main.js) — a piece 300 units square with a 114-unit tab hanging off the bottom, so the box
   itself is taller than the visible 48px "body" (48 * 414/300 ≈ 66px) to give that tab somewhere
   to paint. It still fits inside this row's existing 76px height (flex-centered, ~5px above and
   below) without changing the row's own layout at all. The last piece (puzzle-vchain-end) has no
   tab in its geometry, so its box's own bottom ~18px simply clips to nothing — same box size
   everywhere, the shape is what differs. */
.process-num {
  position: relative; width: 48px; height: 66.24px; flex-shrink: 0;
  /* Idle state stays neutral on purpose — only passed/active steps below carry colour, so that
     colour still reads as "you've reached here" instead of every piece competing. */
  background: var(--neutral-soft); color: var(--text-faint);
  transition: background 0.35s ease, color 0.35s ease, margin 0.35s ease, clip-path 0.35s ease;
  /* Plain square by default (crops off the box's extra height, reserved for the tab it doesn't
     have yet) — --vchain-clip (the real jigsaw silhouette, set by main.js) only takes over once
     the piece is actually reached, below. Reads as each piece *becoming* a puzzle piece as you
     scroll to it, not the whole chain pre-assembled from the start. */
  border-radius: 12px;
  clip-path: inset(0 0 calc(100% - 48px) 0 round 12px);
}
.process-step.passed .process-num {
  border-radius: 0;
  clip-path: var(--vchain-clip, inset(0 0 calc(100% - 48px) 0 round 12px));
}
/* Two states, animated between by the margin transition above: sitting apart at a visible gap
   until the piece is actually reached, then pulled up into a real overlap — the tab tucking into
   the previous piece's socket — the moment it's marked .passed. That's what reads as the chain
   *assembling* as you scroll, instead of already being pre-connected top to bottom before you've
   scrolled anywhere. Only piece 0 (puzzle-vchain-start, nothing above it to plug into) never
   moves. */
.puzzle-vchain-mid, .puzzle-vchain-end { margin-top: 14px; }
/* --vchain-connected-margin is set per piece by main.js (refreshVchainMargins) — cumulative, not
   a flat value, since each already-connected piece ahead of this one has also moved, so the
   target this piece needs to reach keeps climbing the further down the chain it is. */
.process-step.passed .puzzle-vchain-mid,
.process-step.passed .puzzle-vchain-end { margin-top: var(--vchain-connected-margin, -51px); }
/* As the pieces climb into a connected stack, their titles ride up with them — and tuck in
   behind the piece (lower z-index) rather than sitting in an ever-growing gap below it. */
.process-num { z-index: 2; }
.process-step-title { position: relative; z-index: 1; transition: color 0.35s ease, margin 0.35s ease; }
/* Заголовок + подпись шага в одной колонке; подпись видна только у активного шага (без скачка
   высоты — место под неё зарезервировано всегда, анимируется только прозрачность). */
.process-step-text { position: relative; z-index: 1; display: flex; flex-direction: column; transition: margin-top 0.35s ease; }
.process-step-sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--text-faint); opacity: 0; transition: opacity 0.3s ease; }
.process-step.active .process-step-sub { opacity: 1; color: var(--text-muted); }
/* Заголовок+подпись «уезжают» вместе со своим пазл-звеном, когда цепочка собирается.
   Отступ вешаем ТОЛЬКО на обёртку (не на .process-step-title тоже — иначе удваивается и
   заголовки наезжают друг на друга). */
.process-step.passed:has(.puzzle-vchain-mid) .process-step-text,
.process-step.passed:has(.puzzle-vchain-end) .process-step-text { margin-top: var(--vchain-connected-margin, -51px); }
/* The digit/arrow is pinned to the top 48px only (the piece's actual body) — centering it against
   the *whole* taller box (tab included) would sink it visibly below the piece's true middle. */
.process-num-inner {
  position: absolute; inset: 0 0 auto 0; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 19px;
}
/* The bite only actually shows once the piece is .passed (see .process-num above — a plain
   square beforehand, nothing to clear yet) — so the digit only needs nudging down clear of it
   from that point on, not before. Centering it against the piece's full body put it right up
   against/inside that curve, cramped; the start piece has no bite ever, so it keeps top:0. */
.process-step.passed .puzzle-vchain-mid .process-num-inner,
.process-step.passed .puzzle-vchain-end .process-num-inner { top: 7px; }
.process-step.active .process-num,
.process-step.passed .process-num { background: var(--dark); color: var(--white); }
.process-step.active .process-num { transform: scale(1.08); transform-origin: top center; }
/* Each reached step lights up in its own colour instead of all-dark — the chain assembles as a
   multicolour puzzle. Idle pieces stay --neutral-soft (colour still means "reached here"). */
.process-step:nth-child(1).active .process-num,
.process-step:nth-child(1).passed .process-num { background: var(--teal); }
.process-step:nth-child(2).active .process-num,
.process-step:nth-child(2).passed .process-num { background: var(--purple); }
.process-step:nth-child(3).active .process-num,
.process-step:nth-child(3).passed .process-num { background: var(--green); }
.process-step:nth-child(4).active .process-num,
.process-step:nth-child(4).passed .process-num { background: var(--amber); }
.process-step:nth-child(5).active .process-num,
.process-step:nth-child(5).passed .process-num { background: var(--coral); }
.process-step:nth-child(6).active .process-num,
.process-step:nth-child(6).passed .process-num { background: var(--red); }
/* margin-top in the transition too — it animates up with its piece as the chain assembles; without
   it the text jumped instantly while the piece glided. Same 0.35s ease as .process-num. */
.process-step-title { font-size: 18px; margin: 0; color: var(--text-faint); transition: color 0.35s ease, margin-top 0.35s ease; }
.process-step.active .process-step-title,
.process-step.passed .process-step-title { color: var(--dark); }

/* Final step: a clickable down-arrow instead of a digit, jumps straight to the results block */
.process-num--arrow { display: block; text-decoration: none; cursor: pointer; transition: background 0.35s ease, color 0.35s ease, box-shadow 0.2s ease; }
.process-num--arrow .process-num-inner { font-size: 22px; }
.process-num--arrow:hover { box-shadow: 0 0 0 4px var(--neutral-soft); }
.process-step.active .process-num--arrow:hover { box-shadow: 0 0 0 4px var(--border-soft); }

/* Right panel: photo + caption crossfade — opacity only, no movement, so it never "jumps" */
.process-photo-rail { position: relative; }
.process-photo-sticky { position: relative; height: 490px; }
.process-photo {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 40px; opacity: 0; transition: opacity 0.5s ease;
  /* Все панели сложены стопкой; невидимые не должны перехватывать клики по кнопкам активной. */
  pointer-events: none;
}
.process-photo.active { opacity: 1; pointer-events: auto; }
.process-photo p { font-size: 15px; line-height: 1.6; margin: 0; }

/* Photo on top, caption underneath it (not overlaid on the image). Image box is a fixed
   horizontal 4:3 — any source ratio is cropped to fill via object-fit:cover. */
.process-section .process-photo { padding: 0; justify-content: flex-start; align-items: center; }
.process-section .process-photo-img {
  position: relative; flex: none; width: 100%; max-width: 480px; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt), var(--neutral-soft));
  color: var(--text-faint); font-size: 13px; font-weight: 600; text-align: center; padding: 16px;
  border-radius: var(--radius-lg); overflow: hidden;
}
.process-section .process-photo-img:not(.process-photo-img--route) img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* portrait sources cropped to 4:3 — bias up a little so faces aren't cut off */
  object-position: center 35%;
}
.process-section .process-photo-caption { position: relative; width: 100%; max-width: 480px; padding: 16px 4px 0; background: none; }
.process-section .process-photo-caption p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Skip-to-results shortcut — sits at the bottom of the pinned viewport itself (not after it), so
   it's visible the whole time the section is pinned, letting you jump straight to the results
   without scrolling/swiping through every step first. */
.process-skip {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 18px 6px 6px; border-radius: var(--radius-pill);
  background: var(--white); border: 1px solid var(--border-soft); color: var(--text-faint);
  box-shadow: 0 6px 16px rgba(43, 36, 32, 0.1); z-index: 3;
  transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.process-skip:hover { color: var(--dark); transform: translateX(-50%) translateY(3px); box-shadow: 0 8px 20px rgba(43, 36, 32, 0.16); }
.process-skip-arrow {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-soft); color: var(--dark);
}
.process-skip-label { font-family: var(--font-head); font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ---------- "О центре": fully expanded vertical timeline ----------
   Every point and its content sit in normal document flow, stacked top to bottom — no pinning,
   no scroll-driven step switching, everything visible at once. */
.about-vertical { max-width: 720px; margin: 0 auto; }
.about-vertical-item { display: flex; gap: 24px; }
.about-vertical-marker-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.about-vertical-marker {
  width: 44px; height: 44px; --tile-w: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--dark); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
}
/* Each step gets its own accent instead of one flat dark circle for all three — a quick visual
   cue for what kind of thing you're reading before you even read the title. */
.about-vertical-marker--purple { background: var(--purple); }
.about-vertical-marker--green { background: var(--green); }
/* Step 3 ("Комплексный подход") covers routes (green) *and* parent services (teal) at once, not
   one single audience — neutral rather than borrowing either colour, or the specialists' purple
   it used to (mis)use, since this step isn't really about specialists either. */
.about-vertical-marker--neutral { background: var(--dark); }
.about-vertical-line { width: 2px; flex: 1; background: var(--neutral-line); margin: 6px 0; }
.about-vertical-item--last .about-vertical-line { display: none; }
.about-vertical-body { flex: 1; min-width: 0; padding-bottom: 40px; }
.about-vertical-item--last .about-vertical-body { padding-bottom: 0; }
.about-vertical-title { font-family: var(--font-head); font-size: 22px; margin: 6px 0 18px; }
.about-vertical-body p { margin: 0 0 14px; }
.about-vertical-body p:last-child { margin-bottom: 0; }

/* ---------- Stat strip (specialists step) — three big numbers instead of a plain bullet list ---------- */
/* Gap is fixed (not scaled off the tall tile height) so the seam between stat tiles matches
   the seam between the .btn puzzle-chain pieces — same ~2.6px the CTA buttons end up with. */
.about-stats { position: relative; display: flex; gap: 2.6px; margin: 4px 0 20px; }
.about-stat {
  /* min-width: 0 lets these shrink below their text's natural width instead of overflowing —
     without it a long label (e.g. "групповых зала — один под АФК и сенсорную интеграцию") forces
     the row wider than its container. Never wraps to a new line: the puzzle connectors glued
     between them only make sense as one unbroken row, so narrow screens shrink text/padding
     instead (see @media below) rather than stacking. */
  flex: 1; min-width: 0; text-align: center; padding: 16px 8px; border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 2px;
}
/* Receiving pieces (puzzle-chain-mid/-end) get a real socket cut into their left edge — extra
   left padding so the centred number/label clears that curve instead of the text running right
   up against (or under) it. */
.about-stat.puzzle-chain-mid, .about-stat.puzzle-chain-end {
  /* Clear the socket curve (its depth ≈ height * 0.37). Scaled off --arrow-size but with a modest
     factor so the label doesn't wrap enough taller to chase its own tail. */
  padding-left: calc(8px + var(--arrow-size, 40px) * 0.34);
}
.about-stat-num { font-family: var(--font-accent); font-weight: 800; font-size: 26px; line-height: 1; }
.about-stat-label { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }
.about-stat--teal { background: var(--teal-badge-bg); --knob-color: var(--teal-badge-bg); --stat-bg: var(--teal-badge-bg); }
.about-stat--teal .about-stat-num { color: var(--teal-badge-text); }
.about-stat--green { background: var(--green-bg); --knob-color: var(--green-bg); --stat-bg: var(--green-bg); }
.about-stat--green .about-stat-num { color: var(--green-text); }
.about-stat--purple { background: var(--purple-badge-bg); --knob-color: var(--purple-badge-bg); --stat-bg: var(--purple-badge-bg); }
.about-stat--purple .about-stat-num { color: var(--purple-badge-text); }

/* «О центре»-контент, встроенный по шагам в правую часть таймлайна «Как всё устроено» */
.process-photo-caption .proc-stat-grid { margin-top: 14px; }
.proc-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 480px;
  /* Геометрия пазл-стыка (как на .btn-split): меньшая грань пазла = --pface (≈ высота
     кнопки), от неё пропорции из viewBox --puzzle-tab 114×110:
       коннектор (выступ)  = 114/300 · --pface
       паз (вырез)         = 110/300 · --pface
       зазор между гранями = 14/300 · --pface  */
  --pface: 44px;
  --p-conn: calc(var(--pface) * 114 / 300);
  --p-sock: calc(var(--pface) * 110 / 300);
  --p-gap: calc(var(--pface) * 14 / 300);
  /* скругление угла = 4/30 от меньшей грани элемента */
  --p-radius: calc(var(--pface) * 4 / 30);
  gap: var(--p-gap);
}
.proc-stat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 20px 14px; border-radius: var(--p-radius, 14px); overflow: visible; }
.proc-stat b { position: relative; z-index: 6; font-family: var(--font-accent); font-weight: 800; font-size: 34px; line-height: 1; margin-top: 10px; }
.proc-stat span { position: relative; z-index: 6; font-size: 11px; line-height: 1.3; color: var(--text-muted); }
/* три разных бренд-цвета */
/* --knob (цвет коннектора) = цвет самой карточки (светлый тон), не текстовый */
.proc-stat--purple { background: var(--purple-badge-bg); --knob: var(--purple-badge-bg); }
.proc-stat--purple b { color: var(--purple-badge-text); }
.proc-stat--teal { background: var(--teal-badge-bg); --knob: var(--teal-badge-bg); }
.proc-stat--teal b { color: var(--teal-badge-text); }
.proc-stat--green { background: var(--green-bg); --knob: var(--green-bg); }
.proc-stat--green b { color: var(--green-text); }
/* Пазл-стык между карточками — формы из макета:
   ВЫПУКЛОСТЬ (коннектор, «Union») = --puzzle-tab, отражённый scaleX(-1) → плоское ребро слева
     у правого края карточки, круглый бамп вправо. Цвет карточки. width = 114/300·pface.
   ВЫРЕЗ (паз, «Subtract») = --puzzle-notch, отражённый scaleX(-1) → плоское ребро слева, впадина
     вправо. Цвета фона, чуть крупнее (--p-pad), стоит ровно на месте коннектора (с учётом
     зазора: left: -gap) и на слой ниже — коннектор садится в него впритык. */
.proc-stat { --p-pad: 0px; }
.proc-stat:not(:last-child)::after,
.proc-stat + .proc-stat::before {
  content: ''; position: absolute; top: 50%;
  transform: translateY(-50%) scaleX(-1);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.proc-stat:not(:last-child)::after {   /* КОННЕКТОР (Union) */
  z-index: 5; right: calc(-1 * var(--p-conn));
  width: var(--p-conn); height: var(--p-sock);
  background: var(--knob, var(--dark));
  -webkit-mask-image: var(--puzzle-tab); mask-image: var(--puzzle-tab);
}
.proc-stat + .proc-stat::before {      /* ВЫРЕЗ (Subtract) — плоское ребро у левого края
                                           приходящей карточки: между коннектором и пазом
                                           тот же зазор --p-gap, что и между карточками */
  z-index: 4; left: calc(-1 * var(--p-pad));
  width: calc(var(--p-conn) + 2 * var(--p-pad));
  height: calc(var(--p-sock) + 2 * var(--p-pad));
  background: var(--bg, #fff);
  -webkit-mask-image: var(--puzzle-notch); mask-image: var(--puzzle-notch);
}
.proc-nums-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 700; font-size: 13px; color: var(--dark) !important; }
.proc-cta { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 14px; width: 100%; max-width: 480px; }
.proc-cta-btn { width: 100%; }
.proc-cta-note { font-size: 11.5px; color: var(--text-muted); text-align: center; }
.proc-cta--secondary { margin-top: 12px; align-items: flex-start; }
.proc-cta--secondary .btn { width: auto; }
.process-section .process-photo[data-process-photo="0"] .process-photo-img { aspect-ratio: auto; height: 190px; }

/* Шаг 2 — вся команда собрана в один пазл → один маршрут.
   Иллюстрация целиком — один SVG из макета (team-puzzle.svg): детали + рисованная линия. */
.process-section .process-photo-img--route {
  aspect-ratio: auto; height: auto; min-height: 0; background: none;
  padding: 8px 4px; overflow: visible; border-radius: 0;
}
.proc-route {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 100%; max-width: 520px; margin: 0 auto;
}
.proc-team-figure {
  position: static; inset: auto;
  display: block; width: 100%; height: auto; margin: 0 auto; object-fit: fill;
}
/* «Один маршрут для ребёнка» — кнопка-пазл во всю ширину, ведёт в раздел маршрутов */
.proc-route-goal-btn { width: 100%; text-decoration: none; margin-top: 10px; }
.proc-route-goal-btn .btn-split-text { flex: 1; justify-content: center; font-size: 16px; }
.proc-lic { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.45; }
.proc-lic a { font-weight: 700; white-space: nowrap; }
/* выделенная плашка «лицензия на образовательную деятельность» в шаге «Сначала диагностика» */
.proc-lic-badge {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 4px; padding: 10px 14px;
  background: color-mix(in srgb, var(--green) 9%, var(--white));
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--border-soft));
  border-left: 3px solid var(--green);
  border-radius: 9px;
  text-decoration: none; transition: background .2s ease, border-color .2s ease;
}
.proc-lic-badge:hover { background: color-mix(in srgb, var(--green) 16%, var(--white)); border-color: var(--green); }
.proc-lic-badge-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proc-lic-badge-text b {
  font-weight: 800; font-size: 15px; line-height: 1.2; color: var(--dark);
  letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.proc-lic-badge-text i { font-style: normal; font-size: 11px; line-height: 1.25; color: var(--text-muted); }
/* шаг «Сначала диагностика» на мобилке: лишний абзац убираем, чтобы вся секция
   («4 причины») помещалась на экран без лишней прокрутки */
@media (max-width: 720px) {
  .process-section .process-photo-caption p.proc-step1-lead { display: none; }
  .proc-lic-badge-text b { font-size: 13.5px; }
}
@media (max-width: 720px) {
  /* Мобильный: правый рейл — компактный слайдер фото+подпись; контент шагов — как на десктопе
     (список кабинетов, адрес, ссылка на специалистов показываются). */
  /* карточки-цифры: на всю ширину, но каждая тонкая — цифра слева, подпись справа от неё
     в строку (не по центру друг под другом, как раньше). Три карточки одна под другой,
     без пазл-стыка (декоративный шип/паз для такой узкой полосы только мешал). */
  .proc-stat-grid { grid-template-columns: 1fr; gap: 8px; max-width: 100%; margin-top: 8px; }
  .proc-stat {
    flex-direction: row; align-items: center; justify-content: flex-start;
    text-align: left; gap: 12px; padding: 10px 16px;
  }
  .proc-stat::after, .proc-stat::before { content: none !important; }
  .proc-stat b { font-size: 26px; }
  .proc-stat span { font-size: 12px; }
  /* компактнее — вертикальные зазоры вокруг раздела «4 причины» съедали высоту */
  .process-pin { padding: 14px 0 10px; }
  .process-pin-title { margin-bottom: 12px; }
  .process-section .process-photo-caption { padding-top: 8px; }
  .proc-nums-link { margin-top: 4px; }
  .proc-lic-badge { margin: 8px 0 2px; padding: 8px 12px; }
  .proc-cta { margin-top: 10px; }
  /* шаги 0–2: контент в потоке + подпись под ним, без тёмного оверлея как у фото-шагов */
  .process-section .process-photo[data-process-photo="0"] .process-photo-caption,
  .process-section .process-photo[data-process-photo="1"] .process-photo-caption,
  .process-section .process-photo[data-process-photo="2"] .process-photo-caption { position: static; padding: 9px 2px 0; }
  .process-section .process-photo[data-process-photo="0"] .process-photo-caption p,
  .process-section .process-photo[data-process-photo="1"] .process-photo-caption p,
  .process-section .process-photo[data-process-photo="2"] .process-photo-caption p {
    color: var(--text-muted); font-size: 11.5px; line-height: 1.35; -webkit-line-clamp: 3;
  }
  /* шаг 2: схема «дудл → маршрут» — тоже в потоке, без absolute-фото и скрима */
  .process-section .process-photo[data-process-photo="1"] .process-photo-img--route {
    position: static; height: auto; min-height: 0; padding: 4px 0 0; border-radius: 0;
  }
  .process-section .process-photo[data-process-photo="1"] .process-photo-img--route::after { display: none; }
  .process-section .process-photo[data-process-photo="1"] .proc-route { max-width: 380px; }
  .process-section .process-photo[data-process-photo="0"] .process-photo-img { height: auto; aspect-ratio: 4 / 3; }
  /* CTA внутри шага показываем (шаги 1 и 2), кроме вторичной на финальном шаге */
  .proc-cta--secondary { display: none; }
}

.about-detail-map { font-size: 13.5px; font-weight: 700; color: var(--dark) !important; margin-top: 8px; display: inline-block; }

/* Pillar 2: a real map of where the centre is, then placeholder photo tiles with captions —
   swapped in for the old generic "просторные кабинеты / удобное расположение" feature cards. */
.about-place-map {
  margin: 4px 0 6px; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border-soft); height: 240px;
}
.about-place-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.about-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 4px; }
.about-photo-ph { margin: 0; }
.about-photo-ph-img {
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: 120px; padding: 12px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--bg-alt), var(--neutral-soft));
  color: var(--text-faint); font-size: 12px; font-weight: 600;
}
.about-photo-ph figcaption { margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
@media (max-width: 720px) {
  .about-photo-grid { grid-template-columns: 1fr; }
  .about-place-map { height: 200px; }
}

.about-vertical-body .documents-list { margin-top: 0; }

/* ---------- Feature grid (centre-size step) ----------
   Three bold colour tiles, not six small white rows with a bare emoji-in-a-circle — fewer facts,
   each with more visual weight, instead of a checklist that reads as filler. */
.about-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 16px; }
.about-feature-card { border-radius: var(--radius-md); padding: 24px 20px; }
.about-feature-icon { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.about-feature-title { font-family: var(--font-head); font-weight: 800; font-size: 15.5px; margin-bottom: 4px; }
.about-feature-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.about-feature-card--teal { background: var(--teal-badge-bg); }
.about-feature-card--green { background: var(--green-bg); }
.about-feature-card--purple { background: var(--purple-badge-bg); }

/* «Кабинеты нашего центра» — descriptive list under the About pillar 2. */
.about-rooms { list-style: none; margin: 4px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.about-rooms li { font-size: 14px; line-height: 1.55; color: var(--text-muted); padding-left: 16px; position: relative; }
.about-rooms li::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 2px;
  background: var(--tag, var(--teal)); transform: rotate(45deg);
}
.about-rooms-tag { font-weight: 700; color: var(--tag, var(--dark)); }

.about-detail-routes-lead { font-size: 13.5px; font-weight: 600; color: var(--dark) !important; }
.about-detail-routes-lead--parents { margin-top: 24px; }
.about-detail-route-cards { display: flex; flex-direction: column; gap: 8px; }
.about-detail-route-cards--parents { margin-top: 10px; }
/* Two-piece puzzle, exactly like .btn-split — only mirrored: the letter tile is the standalone
   "square" piece sitting OUTSIDE the card on the left, and the card body is the "text" piece with
   a real socket (main.js clip-path, see .about-detail-route-body) cut into its left edge for the
   tile's knob to plug into. --rl-size (the tile's/body's shared height) is set per card by main.js. */
.about-detail-route-card {
  display: flex; align-items: stretch;
  gap: calc(var(--rl-size, 34px) * 0.0521);
  background: none; border-radius: 0; padding: 0;
}
.about-detail-route-letter {
  position: relative; flex-shrink: 0;
  width: var(--rl-size, 34px); align-self: stretch;
  border-radius: 8px; background: var(--route-color, var(--green)); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 13px;
}
/* The knob on the tile's right edge — same --puzzle-tab shape as .btn-split-arrow::before, just
   mirrored (scaleX(-1)) so it points right, out into the body's socket. */
.about-detail-route-letter::after {
  content: '';
  position: absolute; top: 50%; left: 100%;
  width: calc(var(--rl-size, 34px) * 0.38); height: calc(var(--rl-size, 34px) * 0.38);
  transform: translate(-0.5px, -50%) scaleX(-1);
  background: var(--route-color, var(--green));
  -webkit-mask-image: var(--puzzle-tab); mask-image: var(--puzzle-tab);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.about-detail-route-body {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  background: var(--white); border-radius: 8px;
  /* Left padding clears the socket curve (depth ≈ height * 0.37). */
  padding: 9px 12px 9px calc(12px + var(--rl-size, 34px) * 0.30);
  transition: background 0.2s ease;
}
.about-detail-route-card:hover .about-detail-route-body { background: var(--border-soft); }
.about-detail-route-name { flex: 1; font-weight: 700; font-size: 13px; color: var(--dark) !important; }
.about-detail-route-price { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ---------- Cases ---------- */
.case-card { background: var(--white); border-radius: var(--radius-md); padding: 28px; min-height: 200px; position: relative; }
.case-nav-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 18px; }
/* Arrows pinned to the sides of the block, status dots on their own row at the bottom. */
.case-arrow--side { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; }
/* Two-class selectors so these beat the base `.case-arrow:hover` (which lifts with translateY and
   was dropping the centred side arrows). Hover only darkens the background — no movement. */
.case-card > .case-arrow--side:hover,
.reviews-carousel > .case-arrow--side:hover { background: var(--border); transform: translateY(-50%); }
.case-card > .case-arrow--prev { left: -17px; }
.case-card > .case-arrow--next { right: -17px; }
.case-dots--bottom { justify-content: center; margin-top: 24px; }
.reviews-carousel > .case-arrow--prev { left: 8px; }
.reviews-carousel > .case-arrow--next { right: 8px; }
.reviews-carousel > .case-arrow--side { background: var(--white); box-shadow: 0 4px 14px rgba(43, 36, 32, 0.14); }
@media (max-width: 720px) {
  /* Not enough side room on a phone to float arrows outside the card without covering the text —
     drop them to a control row at the bottom with the dots between them. */
  .case-card { padding-bottom: 62px; }
  .case-card > .case-arrow--side { top: auto; bottom: 16px; transform: none; }
  .case-card > .case-arrow--side:hover { transform: none; background: var(--border); }
  .case-card > .case-arrow--prev { left: 16px; }
  .case-card > .case-arrow--next { right: 16px; }
  .case-dots--bottom { position: absolute; left: 0; right: 0; bottom: 24px; margin: 0; }
  /* Reviews cards run edge-to-edge on a phone, so side arrows would sit on the text — drop them,
     swipe + the dot row below are enough. */
  .reviews-carousel > .case-arrow--side { display: none; }
}
.case-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-soft);
  background: var(--bg-alt); color: var(--dark); font-size: 17px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.case-arrow:hover { background: var(--border); transform: translateY(-1px); }
.case-dots { display: flex; gap: 8px; margin-bottom: 0; }
.case-dot { width: 8px; height: 6px; border-radius: var(--radius-pill); border: none; cursor: pointer; background: var(--neutral-line); padding: 0; transition: width 0.2s ease; }
.case-dot.active { width: 28px; background: var(--green); }
/* Two columns: a full-height photo on one side (its own name/age chip overlaid on the image,
   not a separate row above it) and every bit of text plus the closing CTA on the other — instead
   of a small thumbnail sitting inline with the name and everything stacked in one column below. */
/* Кейсы теперь тоже горизонтальная лента (как отзывы): каждая карточка — колонка фикс. ширины,
   лента листается вбок стрелками/скроллом. */
.case-slide {
  flex: 0 0 min(440px, 82vw); scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: var(--space-5);
}
@media (min-width: 721px) {
  .results-pin .case-slide { flex-basis: 440px; }
}
.case-theme {
  font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--dark);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft);
}
.case-theme span { font-weight: 600; font-size: 13px; color: var(--text-faint); }
.case-slide.case-accent-green { --case-color: var(--green); --case-bg: var(--green-bg); --case-text: var(--green-text); }
.case-slide.case-accent-yellow { --case-color: var(--yellow-badge-text); --case-bg: var(--yellow-badge-bg); --case-text: var(--yellow-badge-text); }
.case-slide.case-accent-purple { --case-color: var(--purple-badge-text); --case-bg: var(--purple-badge-bg); --case-text: var(--purple-badge-text); }
/* Photo slot: a real one once uploaded in admin, a plain puzzle-piece placeholder otherwise — so
   the layout already reserves the space instead of jumping around once photos start getting
   added case by case. */
.case-photo-col { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-alt); min-height: 260px; }
.case-photo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.case-photo img { width: 100%; height: 100%; object-fit: cover; }
.case-photo-placeholder { font-size: 48px; opacity: 0.3; }
/* Overlaid on the photo, not a row above it — a solid light chip (not the accent colour) so the
   name stays legible over whatever the photo's own colours happen to be. */
.case-child {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.94); color: var(--dark);
  padding: 7px 16px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13px;
  box-shadow: 0 6px 16px rgba(43, 36, 32, 0.14);
}
.case-child-age { opacity: 0.6; font-weight: 600; }
.case-content-col { display: flex; flex-direction: column; }
.case-label { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.case-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; }
.case-result { background: var(--case-bg, var(--green-bg)); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.case-label-result { color: var(--case-color, var(--green)); margin-bottom: 5px; }
.case-result-text { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--dark); font-weight: 600; }
/* Closing CTA: the site's signature split puzzle button (.btn-split) — sends the reader on to the
   route that got this result, so it reads as the obvious next click. */
.case-route-cta { margin-top: auto; align-self: flex-start; color: var(--white) !important; }
.case-route-link {
  margin-top: auto; align-self: flex-start;
  font-weight: 700; font-size: 14px; color: var(--red);
  text-decoration: none;
}
.case-route-link:hover { text-decoration: underline; }

/* ---------- «Что говорят родители» — тизер: бумажки-кейсы на столе ----------
   Десктоп: раздел закрепляется, при скролле по очереди подсвечивается каждая бумажка.
   Текст по центру — простой, без плашки.
   ВАЖНО: overflow на самой секции НЕЛЬЗЯ — он ломает position:sticky у .cases-teaser-pin
   (секция становится скролл-контейнером). Обрезаем выступающие бумажки на самом пине. */
.cases-teaser { position: relative; }
.cases-teaser-scroller { position: relative; }
/* overflow — на ПИНЕ (он же sticky-элемент), а не на секции: клиппинг собственного
   содержимого стикшность не ломает, а overflow на секции-предке — ломает. */
.cases-teaser-pin { padding: 36px 0; overflow: hidden; }
.cases-teaser-stack {
  position: relative; min-height: 560px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cases-teaser-scatter { position: absolute; inset: 0; pointer-events: none; }

.cases-paper {
  position: absolute; width: 288px; padding: 16px 18px 18px;
  background: var(--white); border-radius: 10px;
  border: 1px solid rgba(43, 36, 32, .05);
  border-top: 3px solid var(--case-color, var(--green));
  box-shadow: 0 20px 40px -18px rgba(43, 36, 32, .22);
  opacity: .48;
  transition: opacity .4s ease, transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
}
.cases-paper-tag {
  display: block; font-family: var(--font-head); font-weight: 800;
  font-size: 13px; color: var(--case-color, var(--green)); margin-bottom: 8px;
}
.cases-paper-line { margin: 0 0 6px; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.cases-paper-line:last-child { margin-bottom: 0; }
.cases-paper-line b { color: var(--dark); font-weight: 700; }
.cases-paper-line--result b { color: var(--case-color, var(--green)); }

.cases-teaser-text { position: relative; z-index: 3; text-align: center; max-width: 480px; padding: 0 20px; }
.cases-teaser-title { font-family: var(--font-head); font-size: 30px; margin: 8px 0 12px; }
.cases-teaser-sub { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; margin: 0 auto 24px; max-width: 420px; }
.cases-teaser-cta { position: relative; z-index: 3; margin-top: 6px; }
.cases-teaser-btn { display: inline-flex; }

/* десктоп — «на столе» + пошаговая подсветка */
@media (min-width: 861px) {
  .cases-teaser-scroller { height: calc(var(--results-steps, 4) * 34vh + 55vh); }
  .cases-teaser-pin {
    position: sticky; top: var(--header-offset);
    min-height: calc(100vh - var(--header-offset));
    display: flex; align-items: center; padding: 30px 0;
  }
  .cases-teaser-stack { min-height: 640px; }
  /* десктоп — бумажки крупнее */
  .cases-paper { width: 366px; padding: 20px 22px 22px; }
  .cases-paper-tag { font-size: 14px; }
  .cases-paper-line { font-size: 13.5px; }
  .cases-teaser-text { z-index: 5; }   /* текст+кнопка всегда над бумажками, даже подсвеченной */
  .cases-paper--1 { top: 2%;    left: 2%;   transform: rotate(-7deg) scale(.94); }
  .cases-paper--2 { top: 1%;    right: 1.5%; transform: rotate(6deg) scale(.94); }
  .cases-paper--3 { bottom: 3%; left: 4%;   transform: rotate(5deg) scale(.94); }
  .cases-paper--4 { bottom: 1%; right: 3%;  transform: rotate(-6deg) scale(.94); }
  .cases-paper--5 { top: 38%;   left: -1%;  transform: rotate(-3deg) scale(.94); }
  .cases-paper.is-lit { opacity: 1; z-index: 4; box-shadow: 0 32px 64px -20px rgba(43, 36, 32, .38); }
  .cases-paper--1.is-lit { transform: rotate(-3deg) scale(1.08); }
  .cases-paper--2.is-lit { transform: rotate(3deg) scale(1.08); }
  .cases-paper--3.is-lit { transform: rotate(2deg) scale(1.08); }
  .cases-paper--4.is-lit { transform: rotate(-3deg) scale(1.08); }
  .cases-paper--5.is-lit { transform: rotate(-1deg) scale(1.08); }
}

/* мобилка: раздел тоже закрепляется — текст сверху, ниже по очереди подсвечивается
   (появляется по центру своей зоны) каждая бумажка. */
@media (max-width: 860px) {
  .cases-teaser-scroller { height: calc(var(--results-steps, 4) * 62vh + 40vh); }
  .cases-teaser-pin {
    position: sticky; top: var(--header-offset);
    height: calc(100svh - var(--header-offset));
    height: calc(100dvh - var(--header-offset));
    display: flex; flex-direction: column;
    padding: 22px 0 26px; overflow: hidden;
  }
  /* .container между пином и стеком ломает flex-цепочку — тянем и его */
  .cases-teaser-pin > .container { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  /* порядок: 1) текст  2) карточки  3) кнопка — всё по центру экрана с воздухом */
  .cases-teaser-stack {
    display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    justify-content: center; gap: 16px; position: relative;
  }
  .cases-teaser-text { order: 1; flex: 0 0 auto; position: relative; z-index: 5; max-width: 100%; padding: 0 16px; }
  .cases-teaser-title { font-size: 22px; margin: 6px 0 8px; }
  .cases-teaser-sub { font-size: 13px; margin-bottom: 0; }
  .cases-teaser-scatter { order: 2; flex: 1 1 auto; min-height: 230px; position: relative; }
  .cases-teaser-cta { order: 3; flex: 0 0 auto; margin: 0; padding: 0 16px; z-index: 5; }
  .cases-teaser-cta .cases-teaser-btn { display: flex; width: 100%; justify-content: center; }
  /* бумажки лежат стопкой внахлёст; активная — на верхний слой и крупнее */
  .cases-paper {
    position: absolute; left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(80vw, 320px);
    transform: translate(-50%, calc(-50% + var(--m-off, 0px))) rotate(var(--m-rot, -4deg)) scale(.84);
    opacity: .5;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease, box-shadow .35s ease;
  }
  .cases-paper--1 { --m-rot: -7deg; --m-off: -80px; z-index: 1; }
  .cases-paper--2 { --m-rot: 5deg;  --m-off: -27px; z-index: 2; }
  .cases-paper--3 { --m-rot: -5deg; --m-off: 27px;  z-index: 3; }
  .cases-paper--4 { --m-rot: 7deg;  --m-off: 80px;  z-index: 4; }
  .cases-paper--5 { --m-rot: -3deg; --m-off: 120px; z-index: 5; }
  .cases-paper:nth-child(n+6) { display: none; }
  .cases-paper.is-lit {
    opacity: 1; z-index: 20;
    transform: translate(-50%, -50%) rotate(-1deg) scale(1.04);
    box-shadow: 0 32px 60px -20px rgba(43, 36, 32, .42);
  }
}

/* ---------- Главная: «Истории наших детей» — сетка разного размера ----------
   Ряд 1: широкая + узкая, ряд 2: узкая + широкая. Цвет — цвет маршрута кейса.
   Вехи «Через N месяцев» — настоящая последовательность, поэтому таймлайн с точками. */
.cases-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-5); }
.case-story--wide   { grid-column: span 3; }
.case-story--narrow { grid-column: span 2; }
.case-story {
  display: flex; flex-direction: column; gap: var(--space-4);
  background: var(--white); border-radius: var(--radius-card); padding: var(--space-6);
  border-top: 4px solid var(--case-color);
}
.case-story-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.case-story-theme { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.2; color: var(--dark); }
.case-story--wide .case-story-theme { font-size: 24px; }
.case-story-age {
  flex-shrink: 0; font-weight: 700; font-size: 14px; color: var(--case-color);
  background: color-mix(in srgb, var(--case-color) 12%, var(--white));
  padding: 4px 12px; border-radius: var(--radius-pill);
}
.case-story-label { display: block; font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.case-story-before p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.case-story-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.case-story-steps li {
  position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 2px;
  font-size: 15px; line-height: 1.45; color: var(--dark);
}
.case-story-steps li::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--case-color);
}
.case-story-steps li + li::after {      /* линия между вехами */
  content: ""; position: absolute; left: 5px; top: calc(-1 * var(--space-4) + 2px); height: calc(var(--space-4) + 1px);
  width: 2px; background: color-mix(in srgb, var(--case-color) 35%, transparent);
}
.case-story-steps b { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--case-color); }
.case-story--wide .case-story-steps span { font-size: 17px; font-weight: 600; }
.case-story-route {
  margin-top: auto; padding-top: var(--space-2); width: fit-content;
  font-size: 14px; font-weight: 700; color: var(--case-color);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.cases-grid-section .center-cta { margin-top: var(--space-7); }
@media (max-width: 900px) {
  .cases-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .case-story--wide, .case-story--narrow { grid-column: auto; }
  .case-story { padding: var(--space-5); }
  .case-story--wide .case-story-theme { font-size: 21px; }
  .case-story--wide .case-story-steps span { font-size: 16px; }
}

/* ---------- Страница /rezultaty/ — все кейсы ---------- */
.cases-page-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cases-page-grid .case-slide { flex: none; }
@media (max-width: 760px) { .cases-page-grid { grid-template-columns: 1fr; } }
.cases-page-cta { text-align: center; margin-top: 44px; }
.cases-page-cta p { font-family: var(--font-head); font-size: 20px; margin: 0 0 16px; }

/* ---------- Reviews carousel ---------- */
.reviews-carousel { margin-top: 44px; width: 100%; overflow: hidden; position: relative; }
.reviews-carousel::before, .reviews-carousel::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.reviews-carousel::before { left: 0; background: linear-gradient(to right, var(--bg-alt), transparent); }
.reviews-carousel::after { right: 0; background: linear-gradient(to left, var(--bg-alt), transparent); }
.reviews-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 4px 20px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review-card { flex: 0 0 360px; scroll-snap-align: start; }
.reviews-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }

/* ---------- Specialists ---------- */
/* Specialists own --purple already (see the palette comment up top: "specialists — expertise,
   professional credentials") but it only showed up as small text before — a thin accent border
   plus a tinted photo backdrop and experience pill make that ownership actually read at a glance,
   not just on hover/click. */
#specialists .section-kicker { color: var(--specialist-hover); }
.specialist-card {
  position: relative;
  background: var(--white); border: 1px solid var(--border-soft);
  border-radius: var(--radius-md); overflow: visible; cursor: pointer;
}

/* ---------- Закреплённый раздел «Специалисты» ----------
   Заголовок стоит на месте, вертикальный скролл (initPinStage) листает карточки по одной.
   Карточки лежат стопкой в .specialists-stage (position:absolute), видно всегда одну:
   .is-active — по центру сцены; ещё не показанные ждут внизу (уменьшенные, прозрачные);
   .is-past — уехали вверх (уменьшенные, прозрачные). => «текущая улетает вверх уменьшаясь,
   следующая приходит снизу увеличиваясь». */
.specialists-pinned { position: relative; }
.specialists-carousel::before, .specialists-carousel::after { display: none !important; }
/* точки-статусбар раздела — строго по центру */
.specialists-pinned .case-dots { justify-content: center; margin-top: 20px; }
/* заголовок вплотную к сцене — большой .section-title margin-bottom тут не нужен */
.specialists-pinned .section-kicker { margin-bottom: 6px; }
.specialists-pinned .section-title.center { margin-bottom: 0; }

.specialists-stage { position: relative; width: 100%; margin-top: 12px; }
.specialists-stage > .specialist-card {
  position: absolute; left: 50%; top: 0;
  width: min(90vw, 380px); height: 100%;
  display: flex; flex-direction: column;
  transform: translate(-50%, 68%) scale(.8);
  opacity: 0; pointer-events: none;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .45s ease;
  box-shadow: 0 22px 46px -18px rgba(108, 92, 166, .38);
}
.specialists-stage > .specialist-card.is-active {
  transform: translate(-50%, 0) scale(1);
  opacity: 1; pointer-events: auto;
  border: 1px solid var(--purple);
  box-shadow: 0 24px 50px -16px rgba(108, 92, 166, .4);
}
.specialists-stage > .specialist-card.is-past {
  transform: translate(-50%, -68%) scale(.8);
  opacity: 0;
}
.specialists-stage > .specialist-card .specialist-photo { flex: 1; aspect-ratio: auto; min-height: 0; }
.specialists-stage > .specialist-card .specialist-body { flex: 0 0 auto; }
/* «Кандидат наук» — постоянно на карточках Подворной и Дикевич, лента-бейдж сверху,
   как «Рекомендуем» в блоке клуба бережного родительства. */

@media (min-width: 721px) {
  /* Десктоп: как «Что говорят родители» — раздел закреплён, вертикальный скролл листает
     карточки ВБОК (лента едет margin-left'ом на ровно --slide карточек). Активная по центру,
     соседние приглушены. Карточка ЗАПОЛНЯЕТ по высоте всё свободное место закреплённого
     экрана (с учётом шапки и отступов), фото тянется на остаток после текста. */
  .specialists-pinned.results-scroller { height: calc(var(--results-steps, 6) * 52vh + 48vh); }
  .specialists-pinned .results-pin {
    position: sticky; top: var(--header-offset);
    height: calc(100vh - var(--header-offset));
    display: flex; flex-direction: column;
    padding: 16px 0 34px;
  }
  .specialists-pinned .results-pin > .container { flex: 0 0 auto; }   /* заголовок + точки */
  .specialists-stage {
    --spec-w: 340px;
    flex: 1 1 auto; min-height: 0;
    display: flex; gap: 20px; align-items: stretch;
    overflow: visible;
    padding: 8px max(var(--page-gutter, 20px), calc((100% - var(--spec-w)) / 2)) 6px;
    margin-left: calc(var(--slide, 0) * -1 * (var(--spec-w) + 20px));
    transition: margin-left .5s cubic-bezier(.16, 1, .3, 1);
  }
  .specialists-stage > .specialist-card,
  .specialists-stage > .specialist-card.is-past {
    /* relative, НЕ static — иначе .specialist-phd (position:absolute) цепляется не за свою
       карточку, а за .specialists-stage, и плашка «Кандидат наук» уезжает на соседа. */
    position: relative; left: auto; top: auto; width: auto; height: auto;
    flex: 0 0 var(--spec-w);
    display: flex; flex-direction: column;      /* align-items:stretch родителя тянет по высоте */
    transform: none; opacity: .4; pointer-events: auto;
    box-shadow: 0 14px 30px -16px rgba(108, 92, 166, .3);
    transition: opacity .4s ease, box-shadow .3s ease;
  }
  .specialists-stage > .specialist-card.is-active {
    transform: none; opacity: 1;
    box-shadow: 0 22px 44px -18px rgba(108, 92, 166, .4);
  }
  .specialists-stage > .specialist-card .specialist-photo {
    flex: 1 1 auto; min-height: 90px; height: auto; aspect-ratio: auto;
  }
  .specialists-stage > .specialist-card .specialist-body { flex: 0 0 auto; padding: 16px 18px; }
  .specialists-stage > .specialist-card .specialist-body h3 { font-size: 16px; }
  .specialists-stage > .specialist-card .specialist-role { font-size: 12.5px; line-height: 1.35; }
  .specialists-stage > .specialist-card .specialist-exp { font-size: 11.5px; }
  .specialists-stage > .specialist-card .specialist-card-actions { margin-top: 10px; }
}

@media (max-width: 720px) {
  .specialists-pinned.results-scroller { position: relative; height: calc(var(--results-steps, 6) * 58vh + 42vh); }
  .specialists-pinned .results-pin {
    position: sticky; top: var(--header-offset);
    /* Раньше здесь была ещё и dvh-версия следом (переопределяла svh в браузерах, которые
       её понимают) — специально, чтобы подстраиваться под динамическую высоту окна. На
       практике в Safari на iOS адресная строка то прячется, то появляется при скролле, и
       вся сцена (карточка специалиста внутри неё — height:100% от этого блока) заметно
       меняла размер прямо во время чтения. svh — высота при полностью развёрнутом
       браузерном UI, не меняется, пока скроллишь, — только она. */
    height: calc(100svh - var(--header-offset));
    /* justify-content:center — заголовок+карточка+точки центрируются как группа, с
       воздухом сверху и снизу, а не карточка одна растянута на весь остаток экрана
       (см. .specialists-stage ниже — тот же приём, что у маршрутов/родителей). */
    display: flex; flex-direction: column; justify-content: center;
    padding: 12px 0 26px; overflow: hidden;
  }
  .specialists-pinned .results-pin > .container { flex: 0 0 auto; }
  .specialists-pinned .section-kicker { margin-bottom: 2px; font-size: 11px; }
  .specialists-pinned .section-title { font-size: 19px; margin: 0; }
  /* Раньше flex:1 1 auto растягивал сцену (а с ней и карточку, у которой height:100% от
     неё) на весь остаток экрана впритык к заголовку и точкам. Фиксированная высота —
     карточка ниже, с пространством сверху и снизу вместо касания краёв. */
  .specialists-stage { flex: 0 0 auto; height: min(70vh, 560px); margin-top: 20px; }

  /* карточка заполняет всю «сцену» по высоте; фото тянется на остаток после текста */
  .specialists-stage > .specialist-card {
    height: 100%; top: 50%;
    transform: translate(-50%, 60%) scale(.85);
  }
  .specialists-stage > .specialist-card.is-active { transform: translate(-50%, -50%) scale(1); }
  .specialists-stage > .specialist-card.is-past   { transform: translate(-50%, -160%) scale(.85); }
  .specialists-stage > .specialist-card .specialist-photo { flex: 1 1 auto; min-height: 120px; height: auto; }
  .specialists-stage > .specialist-card .specialist-body { flex: 0 0 auto; padding: 14px 16px; }
  .specialists-stage > .specialist-card .specialist-body h3 { font-size: 16px; }
  .specialists-stage > .specialist-card .specialist-role { font-size: 12.5px; }
  .specialists-stage > .specialist-card .specialist-exp { font-size: 11.5px; }
  .specialists-pinned .case-dots { flex: 0 0 auto; margin-top: 16px; }
}

.specialist-photo {
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--specialist-badge-bg); color: var(--specialist-hover); font-size: 13px; font-weight: 600;
  position: relative;
}
.specialist-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* «Кандидат наук» — лента-бейдж сверху карточки (как «Рекомендуем» в блоке клуба), фиолетовый */
.specialist-phd {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 3;
  background: var(--purple); color: var(--white);
  font-family: var(--font-head); font-size: 12px; font-weight: 800;
  padding: 4px 14px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(108, 92, 166, 0.35); white-space: nowrap;
}
.specialist-body { padding: 20px; }
.specialist-body h3 { font-size: 18px; margin-bottom: 4px; }
.specialist-role { font-size: 14px; color: var(--specialist); font-weight: 700; margin-bottom: 4px; }
.specialist-exp {
  display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--specialist-badge-text);
  background: var(--specialist-badge-bg); padding: 3px 10px; border-radius: var(--radius-pill);
}
.specialist-bio {
  font-size: 14px; line-height: 1.55; color: var(--text-muted);
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.specialist-more { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--specialist-hover); }

/* ---------- Specialist detail modal (click a card → full profile, same overlay pattern as booking) ----------
   One plain single column, same reading order top to bottom on every screen size: photo, name,
   bio, skills, then education and work experience as timelines. */
.specialist-overlay {
  position: fixed; inset: 0; background: rgba(43, 36, 32, 0.55); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.specialist-overlay.open { display: flex; }
.specialist-modal {
  position: relative; background: var(--white); border-radius: 28px; max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto; animation: pop 0.25s ease;
  /* Extra top padding — real clearance for the close button above the photo, instead of it
     overlapping the photo's corner with barely any breathing room. */
  padding: 64px 40px 40px;
}
.specialist-modal-grid { display: block; }

.specialist-modal-side { text-align: left; }
.specialist-modal-photo {
  width: 100%; aspect-ratio: 1 / 1; margin: 0 0 16px;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--specialist-badge-bg); color: var(--specialist-hover); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.specialist-modal-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.specialist-modal-name { font-size: 20px; margin: 0 0 4px; }
.specialist-modal-role { font-size: 14px; color: var(--specialist); font-weight: 700; margin-bottom: 4px; }
.specialist-modal-exp { font-size: 12.5px; color: var(--text-faint); }

.specialist-modal-section { margin-top: 24px; text-align: left; }
.specialist-modal-main .specialist-modal-section:first-child,
.specialist-modal-side .specialist-modal-section:first-child { margin-top: 20px; }
.specialist-modal-heading {
  display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 12.5px;
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-faint); margin: 0 0 12px;
}
.specialist-modal-bio { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; }
.specialist-modal-skills { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.specialist-modal-skills li { font-size: 13.5px; color: var(--dark); line-height: 1.4; padding-left: 16px; position: relative; }
.specialist-modal-skills li::before {
  content: ''; position: absolute; left: 1px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--specialist);
}

/* Documents: main ones (diploma, accreditation) flat and immediately visible; everything else
   (courses, misc scans) behind a plain <details> so a visitor sees "what matters" first without
   scrolling past a pile of certificates to reach the education/experience timelines below. */
.specialist-modal-docs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.specialist-modal-docs li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 12px; background: var(--specialist-badge-bg); border-radius: var(--radius-sm);
}
.specialist-modal-docs li a { font-size: 13.5px; font-weight: 700; color: var(--specialist-hover) !important; }
.specialist-modal-docs li span { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.specialist-modal-docs-more { margin-top: 10px; }
.specialist-modal-docs-more summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--specialist-hover);
  list-style: none;
}
.specialist-modal-docs-more summary::-webkit-details-marker { display: none; }
.specialist-modal-docs-more summary::before { content: '+ '; }
.specialist-modal-docs-more[open] summary::before { content: '– '; }
.specialist-modal-docs-group { margin-top: 14px; }
.specialist-modal-docs-group strong { display: block; font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; }
.specialist-modal-docs-group .specialist-modal-docs li a { color: var(--dark) !important; font-weight: 600; }

/* ---------- Document lightbox (specialist scans open here, not on their own page) ----------
   Same fixed-overlay-with-centered-box pattern as .specialist-overlay, stacked above it (this
   opens from inside that modal) rather than replacing it, so closing the lightbox lands back on
   the specialist's profile instead of the page behind everything. */
.doc-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(20, 16, 14, 0.86); z-index: 260;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.doc-lightbox-overlay.open { display: flex; }
.doc-lightbox-close {
  position: fixed; top: 20px; right: 20px; z-index: 2;
}
.doc-lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: var(--white); font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s ease;
}
.doc-lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.doc-lightbox-nav[hidden] { display: none; }
.doc-lightbox-prev { left: 16px; }
.doc-lightbox-next { right: 16px; }
.doc-lightbox-body {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: min(900px, 100%); max-height: 100%; animation: pop 0.25s ease;
}
.doc-lightbox-frame {
  max-width: 100%; max-height: 76vh; display: flex; align-items: center; justify-content: center;
  background: var(--white); border-radius: var(--radius-md); overflow: hidden;
}
.doc-lightbox-frame img { max-width: 100%; max-height: 76vh; display: block; }
.doc-lightbox-frame iframe { width: min(820px, 84vw); height: 76vh; border: none; background: var(--white); }
/* Shown instead of the frame when a file type the browser can't render inline (HEIC) fails to
   load — a dead grey box would be worse than just saying so and offering the direct link. */
.doc-lightbox-fallback {
  padding: 60px 40px; text-align: center; color: var(--text-muted); font-size: 14px; max-width: 320px;
}
.doc-lightbox-caption {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  color: var(--white); text-align: center;
}
.doc-lightbox-caption strong { font-size: 14.5px; font-weight: 700; }
.doc-lightbox-caption span { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }
.doc-lightbox-caption a { font-size: 12.5px; font-weight: 700; color: var(--specialist) !important; }
@media (max-width: 720px) {
  .doc-lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
  .doc-lightbox-prev { left: 8px; }
  .doc-lightbox-next { right: 8px; }
}

/* Timelines: a thin line down the left with a dot per entry — same visual idea as the process
   and about-section timelines elsewhere, just compact enough to sit in a modal column. */
.specialist-modal-timeline { position: relative; padding-left: 20px; }
.specialist-modal-timeline::before {
  content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 2px; background: var(--neutral-line);
}
.specialist-modal-timeline-item { position: relative; padding-bottom: 18px; }
.specialist-modal-timeline-item:last-child { padding-bottom: 0; }
.specialist-modal-timeline-item::before {
  content: ''; position: absolute; left: -20px; top: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--specialist); box-shadow: 0 0 0 3px var(--white);
}
.specialist-modal-timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.specialist-modal-timeline-head strong { font-size: 14.5px; font-weight: 700; color: var(--dark); }
.specialist-modal-timeline-head span { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; }
.specialist-modal-timeline-item p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

.specialist-modal-action-photo { margin-top: 24px; border-radius: var(--radius-md); overflow: hidden; }
.specialist-modal-action-photo img { width: 100%; display: block; }

.specialist-modal-cta { margin-top: 36px; }

/* ---------- About section ---------- */
/* Compact row, not a big centred square — same icon-left/text-right shape as .document-card
   below it in this same pinned panel, so 6 of them fit without needing a huge scroll. */
.additional-services { margin-top: 32px; }
.additional-services-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.additional-services-list { display: flex; flex-wrap: wrap; gap: 10px; }
.additional-services-list--center { justify-content: center; }
.additional-service-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--border-soft); font-size: 13px;
  font-family: inherit; text-decoration: none; cursor: pointer;
  font-weight: 600; color: var(--dark) !important;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.additional-service-pill:hover { background: var(--bg-alt); transform: translateY(-1px); }
.additional-service-pill-price { color: var(--text-muted); font-weight: 600; }
/* The one actual "book me" button in the row — same pill size as the linked tags around it, but
   filled, so it still reads as the primary action among a row of links to the price list. */
.additional-service-pill--cta {
  background: var(--red); border-color: var(--red); color: var(--white) !important;
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.additional-service-pill--cta:hover { background: var(--red-hover); border-color: var(--red-hover); transform: none; }
.additional-service-pill--cta .additional-service-pill-price { color: var(--white); }
/* ---------- Parent care ("пока ребёнок на занятии") ---------- */
.parent-care-grid { margin-top: 8px; }
.parent-care-card {
  position: relative;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.parent-care-card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(43, 36, 32, 0.08); }
/* Visually calls out one recommended card among the rest — a floating ribbon badge + a coloured
   border/tint, in the parents section colour (purple) rather than the red CTA accent. */
/* Parents get teal (their audience colour), not purple — this whole section is parent-facing
   content, so it should read that way at a glance, not borrow the specialists' colour. */
.parent-care-card--highlight { border: 2px solid var(--teal); background: var(--teal-badge-bg); }
.parent-care-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--white); font-family: var(--font-head); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 14px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(0, 153, 149, 0.3); white-space: nowrap;
}
.parent-care-icon {
  width: 46px; height: 46px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal); font-size: 26px;
}
.parent-care-title { font-size: 16px; margin: 0; }
.parent-care-text { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.parent-care-price {
  margin-top: 6px; font-weight: 700; font-size: 13px; color: var(--teal-badge-text);
  background: var(--teal-badge-bg); padding: 5px 12px; border-radius: var(--radius-pill);
}

/* ---------- Documents ---------- */
.documents-list { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
/* Icon square on the left + a plain rounded card body. (Was a JS-clipped puzzle-socket lockup
   sized off --rl-size = body height — that formed a 2D feedback loop with the text wrapping and
   blew the piece up to ~1000px; fixed sizes here, no --rl-size, no clip.) */
.document-card {
  display: flex; align-items: stretch; gap: 10px;
  background: none; border: none; padding: 0; border-radius: 0;
}
.document-card .doc-piece {
  --dp: 52px; width: 52px; flex-shrink: 0; align-self: stretch; height: auto;
  border-radius: var(--radius-sm); clip-path: none;
  -webkit-mask: none; mask: none;
}
.document-card .doc-piece::after { display: none; }
.document-card-body {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 16px 22px; clip-path: none;
  transition: border-color 0.3s ease;
}
.document-icon { font-size: 22px; flex-shrink: 0; }
.document-title { flex: 1; min-width: 0; overflow-wrap: break-word; font-weight: 700; font-size: 15px; }
@media (max-width: 720px) {
  .document-card-body { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Reviews ---------- */
/* «Что говорят родители» закрепляется, вертикальный скролл листает кейсы → отзывы → отпускает.
   Мобилка (≤720): без закрепления, обе секции просто друг под другом.
   Десктоп/планшет (>720): каждая секция (кейсы, затем отзывы) закрепляется по очереди —
   подошёл к кейсам → раздел встал → вертикальный скролл листает кейсы вбок → отпустило →
   обычный скролл до отзывов → раздел встал → скролл листает отзывы вбок → отпустило. */
.results-scroller { position: relative; }
@media (min-width: 721px) {
  /* высота секции = запас вертикального скролла: на каждую карточку ровно 60vh,
     поэтому шаг «одна карточка за примерно пол-экрана скролла» — предсказуемый. */
  .results-scroller { height: calc(var(--results-steps, 4) * 60vh + 40vh); }
  .results-pin {
    position: sticky; top: var(--header-offset);
    min-height: calc(100vh - var(--header-offset) - var(--space-4));
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--space-4) 0;
  }
  .results-stage { display: block; }
  /* компактный ритм внутри закреплённого блока */
  .results-pin .section-lead.center,
  .results-pin .reviews-subhead { margin-bottom: var(--space-5); }
  .results-pin .reviews-carousel { margin-top: var(--space-5); }
  .results-pin .reviews-controls { margin-top: var(--space-5); }

  /* Закреплённая карусель — БЕЗ нативного скролла: лента двигается transform-ом на
     ровно --slide карточек, скроллом управляет пин. Активная карточка по центру. */
  .results-pin .cases-carousel .reviews-track { --card-w: 440px; }
  .results-pin .reviews-carousel:not(.cases-carousel) .reviews-track { --card-w: 360px; }
  .results-pin .reviews-track {
    overflow: visible;
    scroll-snap-type: none;
    padding: var(--space-1) max(var(--page-gutter), calc((100% - var(--card-w)) / 2)) var(--space-3);
    /* лента двигается отрицательным margin-left на ровно --slide карточек (шаг = ширина
       карточки + gap 20px); чётко и одинаково в обе стороны, скроллом управляет пин */
    margin-left: calc((var(--slide, 0) + var(--slide-base, 0)) * -1 * (var(--card-w) + 20px));
    transition: margin-left .45s cubic-bezier(.16, 1, .3, 1);
  }
  /* стрелки прячем — на десктопе листает вертикальный скролл */
  .results-pin .reviews-carousel > .case-arrow--side { display: none; }

  /* «Взрослым — тоже»: раздел закрепляется, вертикальный скролл по очереди
     подсвечивает каждую карточку. Слово «Рекомендуем» остаётся только на
     последней карточке; пока идёт проход — её постоянная подсветка гасится,
     активна всегда ровно одна карточка. */
  .parent-care-section.results-scroller {
    height: calc(var(--results-steps, 4) * 55vh + 45vh);
  }
  .parent-care-section .results-pin {
    position: sticky; top: var(--header-offset);
    min-height: calc(100vh - var(--header-offset) - var(--space-4));
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--space-4) 0;
  }
  .parent-care-section .parent-care-card {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  }
  .parent-care-section .parent-care-card.is-active {
    border: 2px solid var(--teal); background: var(--teal-badge-bg);
    box-shadow: 0 16px 28px rgba(43, 36, 32, 0.10); transform: translateY(-4px);
  }
  .parent-care-section.is-walking .parent-care-card--highlight:not(.is-active) {
    border: 1px solid var(--border-soft); background: var(--white);
  }
}

/* мобилка: «Услуги для родителей» листаются вертикально — как в маршрутах:
   текущая карточка целиком вверху, следующая выглядывает снизу (2 на экране). */
@media (max-width: 720px) {
  .parent-care-section.results-scroller {
    position: relative; height: calc(var(--results-steps, 4) * 62vh + 40vh);
  }
  .parent-care-section .results-pin {
    position: sticky; top: var(--header-offset);
    height: calc(100svh - var(--header-offset));
    height: calc(100dvh - var(--header-offset));
    display: flex; flex-direction: column; padding: 12px 0 0; overflow: hidden;
  }
  .parent-care-section .results-pin > .container {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  }
  .parent-care-section .section-head { flex: 0 0 auto; margin: 0 auto 10px; position: relative; z-index: 3; background: var(--bg); }
  .parent-care-section .section-title--parents { font-size: 18px; }
  .parent-care-section .section-lead { display: none; }
  .parent-care-section .parent-care-grid {
    flex: 1 1 auto; min-height: 0; position: relative;
    display: block; grid-template-columns: none; gap: 0; margin: 0;
  }
  .parent-care-section .parent-care-card {
    position: absolute; left: 50%; top: 50%;
    width: min(92vw, 400px); margin: 0;
    /* Центр доступной области вместо top:8px (было прибито к верху) — тот же приём, что
       у маршрутов и уже был у специалистов/отзывов: текущая карточка по центру, соседние
       уезжают выше/ниже через тот же сдвиг. */
    transform: translateX(-50%) translateY(-50%)
               translateY(calc((var(--i, 0) - var(--pc-slide, 0)) * var(--pc-step, 340px)));
    opacity: .45;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease,
                box-shadow .35s ease, border-color .35s ease, background .35s ease;
  }
  .parent-care-section .parent-care-card.is-pc-current {
    opacity: 1;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px var(--teal), 0 16px 30px -12px rgba(0, 153, 149, .28);
  }
  .parent-care-section .parent-care-card:hover { transform: translateX(-50%) translateY(-50%)
               translateY(calc((var(--i, 0) - var(--pc-slide, 0)) * var(--pc-step, 340px))); }
  .parent-care-section .center-cta { flex: 0 0 auto; margin: 10px 0 4px; }
}

.reviews-heading { font-family: var(--font-head); font-size: 22px; margin: 0 0 4px; text-align: center; }
.reviews-subhead { font-size: 13px; color: var(--text-muted); margin: 0; text-align: center; }

/* мобилка: отзывы тоже закрепляются — вертикальный скролл листает карточки ВБОК
   (тот же механизм --slide + margin-left, что и на десктопе; нативный скролл выключаем). */
@media (max-width: 720px) {
  #results-reviews.results-scroller { height: calc(var(--results-steps, 4) * 62vh + 40vh); }
  #results-reviews .results-pin {
    position: sticky; top: var(--header-offset);
    height: calc(100svh - var(--header-offset));
    height: calc(100dvh - var(--header-offset));
    display: flex; flex-direction: column; justify-content: center;
    padding: 12px 0; overflow: hidden;
  }
  #results-reviews .reviews-carousel::before,
  #results-reviews .reviews-carousel::after { display: none; }
  #results-reviews .reviews-track {
    --card-w: min(82vw, 340px);
    overflow: visible; scroll-snap-type: none; -webkit-overflow-scrolling: auto;
    padding: 4px max(16px, calc((100% - var(--card-w)) / 2)) 12px;
    margin-left: calc((var(--slide, 0) + var(--slide-base, 0)) * -1 * (var(--card-w) + 20px));
    transition: margin-left .45s cubic-bezier(.16, 1, .3, 1);
  }
  #results-reviews .review-card { flex: 0 0 var(--card-w); }
  #results-reviews .reviews-carousel > .case-arrow--side { display: none; }
}

.review-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 24px; text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
/* центральный отзыв — красная обводка (не по наведению, а по позиции: см. IntersectionObserver в main.js) */
.reviews-track .review-card.is-centered {
  border-color: var(--red);
  box-shadow: 0 0 0 2px var(--red), 0 16px 34px -10px rgba(244, 52, 71, .22);
}
a.review-card:hover { box-shadow: 0 8px 20px rgba(43, 36, 32, .10); }   /* без подъёма */
.review-stars { display: inline-flex; align-items: center; gap: 3px; margin-bottom: 12px; }
.review-star { width: 17px; height: 17px; flex: 0 0 auto; }
.review-text { font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.review-author { font-weight: 700; font-size: 14px; }
.review-go { margin-top: auto; padding-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--red); }
.review-source { font-weight: 500; color: var(--text-faint); }

/* ---------- Contacts ---------- */
.contacts-box { background: var(--dark); border-radius: var(--radius-lg); padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.contacts-info { align-self: center; }
.contacts-info h2 { color: var(--white); font-size: 32px; margin-bottom: 18px; }
.contacts-detail { display: flex; flex-direction: column; gap: 4px; margin-bottom: 26px; }
.contacts-label { color: rgba(255, 255, 255, 0.55); font-size: 13px; margin-top: 8px; }
.contacts-value { color: var(--white); font-weight: 600; font-size: 16px; }
.contacts-value a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.contacts-value a:hover { border-bottom-color: rgba(255, 255, 255, 0.7); }
/* Кнопки в контактах соединены пазл-стыком по тому же принципу, что карточки-цифры в
   «Как всё устроено»: выступ (Union) цвета кнопки + вырез (Subtract) цвета тёмного фона.
   ВАЖНО про порядок наложения: у самих .contact-piece НЕТ z-index (только auto) — если его
   поставить (как было раньше), кусок превращается в свой собственный стек-контекст, и тогда
   ДВА соседних «не последних» куска с ОДИНАКОВЫМ z-index рисуются по DOM-порядку — второй
   поверх выступа первого, и красный шип у «Записаться» выглядел просто тёмным кружком поверх
   него. Без z-index на самом .contact-piece псевдоэлементы (z-index у ::after/::before) сами
   всплывают в стек-контекст .contacts-actions и там уже совершенно однозначно перекрывают
   любой соседний кусок (у него z-index:auto = всегда ниже любого положительного z-index),
   независимо от DOM-порядка — ровно как это работает у .proc-stat. */
.contacts-actions {
  position: relative; display: flex; flex-wrap: wrap;
  --pface: 46px;
  --p-conn: calc(var(--pface) * 114 / 300);
  --p-sock: calc(var(--pface) * 110 / 300);
  --p-gap: calc(var(--pface) * 14 / 300);
  gap: var(--p-gap);
}
/* Один в один как у .proc-stat: --p-pad, ВЫСТУП = --puzzle-tab, ВЫРЕЗ = --puzzle-notch. */
.contact-piece { position: relative; overflow: visible; --p-pad: 0px; }
.contact-piece:not(:last-child)::after,
.contact-piece + .contact-piece::before {
  content: ''; position: absolute; top: 50%;
  transform: translateY(-50%) scaleX(-1);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.contact-piece:not(:last-child)::after {   /* ВЫСТУП (Union) — цвет кнопки, за правым краем */
  z-index: 5; right: calc(-1 * var(--p-conn));
  width: var(--p-conn); height: var(--p-sock);
  background: var(--cp-knob, rgba(255, 255, 255, .12));
  -webkit-mask-image: var(--puzzle-tab); mask-image: var(--puzzle-tab);
}
.contact-piece.btn-primary { --cp-knob: var(--red); }
.contact-piece + .contact-piece::before {  /* ВЫРЕЗ (Subtract) — цвет тёмного фона, слоем ниже */
  z-index: 4; left: calc(-1 * var(--p-pad));
  width: calc(var(--p-conn) + 2 * var(--p-pad));
  height: calc(var(--p-sock) + 2 * var(--p-pad));
  background: var(--dark);
  -webkit-mask-image: var(--puzzle-notch); mask-image: var(--puzzle-notch);
}
@media (max-width: 720px) {
  /* На мобильной ширине декоративный пазл-стык между кнопками резался криво (текст
     "Записаться"/"Позвонить" наезжал на вырез) — на маленьких кнопках он не нужен,
     просто ровные кнопки в ряд. */
  .contacts-actions { gap: 10px; }
  .contact-piece::after, .contact-piece::before { content: none !important; }
}
.contacts-map { border-radius: 24px; overflow: hidden; align-self: stretch; min-height: 260px; }
.contacts-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--dark); color: var(--white); border-radius: var(--radius-lg); padding: 44px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
/* Teal, not green: this band is a CTA (book a consultation), and per the palette semantics above
   red/CTA colour would clash with the primary red buttons already inside it, so it takes the next
   most fitting audience colour — teal (parents: the ones actually doing the booking). */
.cta-band-teal { background: var(--teal); }
.cta-band-dark { background: var(--dark); }
.cta-band h2 { color: var(--white); font-size: 24px; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0; }

/* ---------- Directions page ---------- */
.category-section { padding: 36px 0; }
.category-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.category-letter {
  width: 48px; height: 48px; --tile-w: 48px; border-radius: 14px; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 19px; flex-shrink: 0;
}
.category-head-titles { display: flex; flex-direction: column; gap: 4px; }
.category-head h2 { font-size: 28px; margin: 0; }
.category-pro-title { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.service-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-5); display: flex; flex-direction: column; gap: 10px; }
.service-card h3 { font-size: 17px; margin: 0; }
.service-card p { font-size: 14px; margin: 0; flex: 1; }
.service-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.price-tag { font-family: var(--font-head); font-weight: 700; }
.link-arrow { font-weight: 700; font-size: 13px; }

/* Small teal tag on an otherwise-unchanged card — adult services stay in their real category
   (Тело, Эмоции…) instead of a separate section, this just flags which few of them are for the
   parent, not the child. Teal because that's already the site's colour for parents/adults. */
.badge-adults {
  display: inline-block; vertical-align: middle; font-family: var(--font-body);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--teal-badge-text); background: var(--teal-badge-bg);
  padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap;
}

/* ---------- Service detail page ---------- */
.breadcrumb { padding: 16px 32px 0; font-size: 13px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-faint); }
.breadcrumb span { color: var(--dark); }
.service-hero { padding: 32px 0 8px; }
.service-hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
/* Нет фото (media/services_photos/<slug>/ пусто) — не тянем пустой блок-плейсхолдер, просто
   одна колонка текста вместо текст+фото. */
.service-hero-inner--no-photo { grid-template-columns: 1fr; }
.service-hero-inner--no-photo > div:first-child { max-width: 640px; }
.service-hero h1 { font-size: 38px; margin: 0 0 14px; }
.badge-pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: 16px; }
.service-price-row { display: flex; gap: 14px; align-items: center; }
.service-price { font-family: var(--font-head); font-size: 24px; font-weight: 800; }
.service-price-note { color: var(--text-faint); font-size: 14px; }
.service-hero-photo { width: 100%; height: 260px; border-radius: var(--radius-md); overflow: hidden; }
.service-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-symptom-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 20px; font-size: 14px; line-height: 1.5; }

/* ---------- Service detail: subscription-package pricing table ---------- */
/* Small "this can be paid with maternity capital / ПФДО certificate" note — a full sentence next
   to the big prices on detail pages, a compact badge next to the small price tags on cards
   (a full sentence on every card in a grid would be more clutter than information). */
.pay-note { display: block; font-size: 13px; color: var(--text-faint); margin-top: 4px; }
.pay-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
  color: var(--teal-badge-text); background: var(--teal-badge-bg); padding: 2px 7px;
  border-radius: var(--radius-pill); white-space: nowrap; margin-left: 6px; vertical-align: middle;
}
.pricing-tiers-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pricing-tier-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 14px 22px;
}
.pricing-tier-row--single { background: var(--bg-alt); }
.pricing-tier-label { font-weight: 700; flex: 1; }
.pricing-tier-per { font-size: 13px; color: var(--text-muted); }
.pricing-tier-total { font-family: var(--font-head); font-weight: 800; color: var(--dark); min-width: 90px; text-align: right; }
.pricing-tiers-note { margin: 10px 0 0; font-size: 13px; color: var(--text-faint); }
.mini-step-num {
  width: 36px; height: 36px; --tile-w: 36px; border-radius: 50%; background: var(--neutral-soft); color: var(--dark);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 15px; margin-bottom: 10px;
}
.mini-step-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.mini-step-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Legal / prose document (политика конфиденциальности) ---------- */
.legal-doc { max-width: 760px; margin: 0 auto; font-size: 15px; line-height: 1.7; color: var(--dark); }
.legal-doc h2 { font-size: 20px; margin: 32px 0 10px; }
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul { margin: 0 0 14px; padding-left: 22px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc a { color: var(--green-text); text-decoration: underline; }

/* ---------- Materials page ---------- */
.filters-section { padding: 24px 0 0; }
.filters-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.filter-pill {
  border: none; padding: 9px 18px; border-radius: var(--radius-pill); font-weight: 700; font-size: 14px;
  cursor: pointer; background: var(--white); color: var(--text-muted); border: 1px solid var(--border-soft);
}
.filter-pill.active { background: var(--dark); color: var(--white); border-color: var(--dark); }
.article-card { background: var(--white); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: var(--space-5); display: block; color: var(--dark); }
.article-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); margin-bottom: 14px; }
/* Article categories follow the direction system (Речь/Когнитивные/Эмоции), not the top-level
   audience colours — a subordinate layer of colour, one step down from child/parent/specialist.
   "Документы" isn't a direction; it's parent-facing admin info, so it gets teal instead. */
.tag-speech { background: var(--coral-badge-bg); color: var(--coral-badge-text); }
.tag-learning { background: var(--purple-badge-bg); color: var(--purple-badge-text); }
.tag-behavior { background: var(--amber-badge-bg); color: var(--amber-badge-text); }
.tag-documents { background: var(--teal-badge-bg); color: var(--teal-badge-text); }
.article-card h3 { font-size: 18px; margin: 0 0 8px; line-height: 1.3; }
.article-card p { font-size: 14px; margin: 0 0 14px; }
.article-meta { font-size: 13px; color: var(--text-faint); }
.empty-note { grid-column: 1 / -1; text-align: center; color: var(--text-faint); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-2); padding: 36px 0; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; }
.logo-footer { flex-shrink: 0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.footer-links a:hover { color: var(--white); }
.footer-copy { color: rgba(255, 255, 255, 0.35); font-size: 13px; }

/* Реквизиты + политика — отдельная строка под основным рядом футера. */
.footer-legal {
  width: 100%; margin-top: 8px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-legal-org { margin: 0; color: rgba(255, 255, 255, 0.35); font-size: 12.5px; line-height: 1.5; }
/* .btn base gives it the puzzle-socket clip (main.js); these just set the footer's muted skin. */
.footer-legal-pill {
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75);
  font-size: 12px; font-weight: 700; padding: 9px 18px; white-space: nowrap;
}
.footer-legal-pill:hover { background: rgba(255, 255, 255, 0.14); color: var(--white); }
@media (max-width: 720px) {
  .footer-legal { justify-content: center; text-align: center; }
}

/* ---------- Alerts ---------- */
.alert { margin: 16px 0; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 700; background: var(--green-bg); color: var(--green-text); }

/* ---------- Booking modal ---------- */
.booking-overlay {
  position: fixed; inset: 0; background: rgba(43, 36, 32, 0.55); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.booking-overlay.open { display: flex; }
.booking-modal {
  background: var(--white); border-radius: 28px; max-width: 560px; width: 100%; max-height: 88vh;
  overflow-y: auto; padding: 36px; animation: pop 0.25s ease;
}
.booking-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.booking-slogan {
  margin: 0 0 20px; text-align: center; font-weight: 600;
  font-size: 13px; color: var(--green-text); letter-spacing: .015em;
}
.booking-dots { display: flex; gap: 8px; }
.booking-dot { width: 28px; height: 6px; border-radius: var(--radius-pill); background: var(--neutral-line); }
.booking-dot.done { background: var(--green); }
.booking-close { background: #F5F0E8; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--text-muted); flex-shrink: 0; }
/* In the specialist modal it isn't part of a flex header row like the booking modal's dots — sits
   above the photo instead, in its own dedicated top padding (see .specialist-modal) so it never
   overlaps the photo's corner. */
.specialist-modal .booking-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 16px rgba(43, 36, 32, 0.16);
}
.booking-title { font-size: 22px; margin: 0 0 6px; }
.booking-sub { color: var(--text-faint); font-size: 14px; margin: 0 0 20px; }
.booking-list { display: flex; flex-direction: column; gap: 10px; }
.booking-item {
  text-align: left; background: var(--neutral-soft); border: 2px solid transparent; border-radius: 16px;
  padding: 16px 18px; cursor: pointer; font-family: var(--font-body); display: flex; justify-content: space-between; align-items: center;
  width: 100%;
}
.booking-item:hover { border-color: var(--green); }
.booking-item-title { font-weight: 700; font-size: 15px; display: block; }
.booking-item-sub { font-size: 13px; color: var(--text-faint); display: block; margin-top: 2px; }
.booking-item-big { flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px 18px; }
.booking-item-big .booking-item-sub { margin-top: 2px; }
.booking-item-any { background: var(--neutral-soft); border-color: transparent; }
.booking-item-any:hover { border-color: var(--dark); }
.booking-back {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 6px;
  background: #F5F0E8; border: none; color: var(--dark); font-size: 14px; font-weight: 700;
  cursor: pointer; padding: 10px 16px; border-radius: var(--radius-pill); transition: background 0.2s ease;
}
.booking-back:hover { background: var(--neutral-line); }

/* Filters accordion (shop-style filters: choose direction/service, then specialist, then time) */
.booking-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.booking-filter[hidden] { display: none; }
.booking-filter { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: opacity 0.2s ease; }
/* Reassurance line where the date/time picker used to be (and under the contact form). */
.booking-note {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 4px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--teal-badge-bg); color: var(--teal-badge-text);
  font-size: 13px; line-height: 1.45; font-weight: 600;
}
.booking-note--soft { background: var(--neutral-soft); color: var(--text-muted); font-weight: 500; margin-top: 12px; }
.booking-consent { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--text-faint); text-align: center; }
.booking-consent a { color: inherit; text-decoration: underline; }
.booking-consent a:hover { color: var(--dark); }
.booking-filter.is-locked { opacity: 0.5; }
.booking-filter-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; background: var(--white); border: none; cursor: pointer; text-align: left; font-family: inherit;
}
.booking-filter-head:disabled { cursor: not-allowed; }
.booking-filter-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.booking-filter-label { font-weight: 700; font-size: 14.5px; color: var(--dark); }
.booking-filter-value { font-size: 13px; color: var(--text-faint); }
.booking-filter.is-done .booking-filter-value { color: var(--green-text); font-weight: 600; }
.booking-filter-caret { font-size: 12px; color: var(--text-faint); transition: transform 0.2s ease; flex-shrink: 0; }
.booking-filter.open .booking-filter-caret { transform: rotate(180deg); }
.booking-filter-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; background: var(--bg-alt); }
.booking-filter.open .booking-filter-body { max-height: 380px; overflow-y: auto; }
.booking-filter-body .booking-list { padding: 12px; margin: 0; }
.booking-filter-body .booking-calendar { margin: 12px 12px 0; }
.booking-filter-body .booking-slots { margin: 0 12px 12px; }

/* Calendar */
.booking-calendar { background: var(--neutral-soft); border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.booking-calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.booking-cal-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.booking-cal-nav {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--white);
  color: var(--dark); font-size: 16px; font-weight: 700; cursor: pointer; line-height: 1;
}
.booking-cal-nav:disabled { opacity: 0.35; cursor: default; }
.booking-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; color: var(--text-faint); text-align: center; text-transform: uppercase;
}
.booking-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.booking-cal-cell {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 10px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--dark);
  display: flex; align-items: center; justify-content: center;
}
.booking-cal-cell:not(.is-disabled):not(.booking-cal-empty):hover { background: var(--green-bg); }
.booking-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--dark); }
.booking-cal-cell.active { background: var(--green); color: var(--white); }
.booking-cal-cell.is-disabled { color: var(--text-faint); opacity: 0.35; cursor: default; }
.booking-cal-empty { cursor: default; }

.booking-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.booking-slot {
  border: 2px solid var(--neutral-line); background: var(--neutral-soft); color: var(--dark); border-radius: 12px;
  padding: 10px 14px; font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer;
}
.booking-slot.active { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.booking-confirm { margin-top: 16px; }
.booking-confirm:disabled { opacity: 0.4; cursor: default; transform: none; }
.booking-summary { background: var(--neutral-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.booking-form { display: flex; flex-direction: column; gap: 12px; }
.booking-form input {
  border: 1px solid rgba(43, 36, 32, 0.15); border-radius: 12px; padding: 14px 16px; font-size: 16px; font-family: var(--font-body);
}
.booking-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.booking-done { text-align: center; padding: 20px 0; }
.booking-done-icon {
  width: 64px; height: 64px; --tile-w: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green);
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin: 0 auto 16px;
}

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ---------- Staggered card reveal ---------- */
[data-reveal-item] {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal-item].revealed { opacity: 1; transform: translateY(0) scale(1); }
[data-reveal-item]:nth-child(1) { --reveal-delay: 0ms; }
[data-reveal-item]:nth-child(2) { --reveal-delay: 70ms; }
[data-reveal-item]:nth-child(3) { --reveal-delay: 140ms; }
[data-reveal-item]:nth-child(4) { --reveal-delay: 210ms; }
[data-reveal-item]:nth-child(5) { --reveal-delay: 280ms; }
[data-reveal-item]:nth-child(6) { --reveal-delay: 350ms; }
[data-reveal-item]:nth-child(7) { --reveal-delay: 420ms; }
[data-reveal-item]:nth-child(8) { --reveal-delay: 490ms; }
[data-reveal-item]:nth-child(9) { --reveal-delay: 560ms; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-item] { transition: none; opacity: 1; transform: none; }
}

/* ---------- Card hover lift ---------- */
.service-card, .article-card, .review-card, .document-card, .need-block {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
/* .review-card НЕ поднимаем на hover (подсветка центрального отзыва — по позиции, см. .is-centered) */
.service-card:hover, .article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(43, 36, 32, 0.08);
}
.document-card:hover .document-card-body { border-color: var(--green); }

/* ---------- Responsive ---------- */
/* Header content is wider than the viewport well before the layout breakpoints below kick in
   (nav stays visible down to 720px, but its natural width needs close to the full 1240px
   container) — tighten it across the whole sub-container range so laptop-width viewports
   (~961–1239px) don't overflow. */
@media (max-width: 1240px) {
  .logo-img { height: 32px; }
  .logo-text { font-size: 22px; }
  .header-phone { display: none; }
  .main-nav { gap: 20px; }
  .main-nav a, .main-nav .nav-link { font-size: 14px; }
  .header-bottombar-inner .btn-primary { padding: 11px 16px; font-size: 14px; }
  .header-license-pill-body { font-size: 13px; }
}

@media (max-width: 960px) {
  .logo-img { height: 30px; }
  .logo-text { font-size: 21px; }
  .main-nav { gap: 14px; }
  .main-nav a, .main-nav .nav-link { font-size: 13px; }
  .nav-dropdown-mega { width: min(600px, 86vw); }
  .nav-dropdown-grid { grid-template-columns: repeat(2, 1fr); }
  .header-bottombar-inner .btn-primary { padding: 10px 14px; font-size: 13px; }
  .header-license-pill-body { font-size: 12.5px; }
  .hero-inner--centered { min-height: 520px; }
  .hero-art-img { max-width: 260px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
  #specialists .grid-3 > .specialist-card { flex-basis: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); }
  .service-line-card { flex-basis: 180px; }
  .contacts-box { grid-template-columns: 1fr; padding: 36px; }
  .contacts-map { align-self: auto; min-height: 0; height: 240px; }
  .service-hero-inner { grid-template-columns: 1fr; }
  .service-hero-photo { height: 200px; }
  .about-vertical-item { gap: 14px; }
  .about-vertical-marker { width: 36px; height: 36px; font-size: 15px; }
  .about-vertical-title { font-size: 19px; }
  .about-feature-grid { grid-template-columns: 1fr; }
  .about-stat { padding: 13px 6px; }
  .about-stat-num { font-size: 22px; }
  .about-stat-label { font-size: 10.5px; }
  .specialist-card { border-radius: var(--radius-md); }
  .specialist-photo { overflow: hidden; }
}

@media (max-width: 720px) {
  /* Big desktop corner radii read as oversized on a narrow screen — scale them down everywhere.
     --radius-pill is untouched on purpose: pills/single-line badges and buttons should stay
     fully rounded (semicircle ends) regardless of screen size. */
  :root {
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
  }
  .logo-img { height: 28px; }
  .logo-text { font-size: 19px; }
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-phone { display: none; }
  .header-phone-btn { display: flex; }
  .header-topbar-inner { padding-top: 15px; padding-bottom: 15px; gap: 10px; }
  /* Keep the tap target, but pull the icon back out so it lines up with the right edge of
     "Записаться" / the search bar below instead of sitting 8px inside them */
  .burger { padding: 8px; margin-right: -10px; }
  .burger span { width: 22px; }
  /* Мобилка: вторую строку шапки убираем совсем (занимает место), поиск и
     «Записаться» main.js переносит в верх бургер-меню. */
  .header-bottombar { display: none; }
  .main-nav.open > #site-search {
    display: block; flex: 0 0 auto; width: 100%; margin: 0 0 10px; padding: 0;
  }
  .main-nav.open > #site-search .search-panel-form { max-width: none; }
  .main-nav.open > .header-book-btn {
    flex: 0 0 auto; width: 100%; margin: 2px 0 14px; justify-content: center;
    padding-top: 13px; padding-bottom: 13px; font-size: 15px;
  }
  /* Narrow screens: plain stacked tiles, no puzzle connectors — just a clean rounded-card column. */
  .about-stats { flex-direction: column; gap: 8px; overflow: visible; }
  .about-stat { position: relative; padding: 13px 10px; overflow: visible; border-radius: 12px; }
  .about-stat-num { font-size: 19px; }
  .about-stat-label { font-size: 10px; line-height: 1.25; }
  .about-stats .puzzle-chain-knob { display: none; }
  .about-stats .about-stat.puzzle-chain-mid,
  .about-stats .about-stat.puzzle-chain-end {
    clip-path: none !important;
    padding-left: 10px;
  }
  .about-stats .about-stat::before,
  .about-stats .about-stat::after { content: none; }
  /* Кнопки в «Контактах» — тоже плоские, без пазл-коннекторов на телефоне. */
  .contacts-actions { gap: 10px; }
  .contacts-actions .puzzle-chain-knob { display: none; }
  .contacts-actions .puzzle-chain-start,
  .contacts-actions .puzzle-chain-mid,
  .contacts-actions .puzzle-chain-end {
    clip-path: none !important;
    border-radius: 12px;
  }
  .contacts-actions .puzzle-chain-start::before,
  .contacts-actions .puzzle-chain-start::after,
  .contacts-actions .puzzle-chain-mid::before,
  .contacts-actions .puzzle-chain-mid::after,
  .contacts-actions .puzzle-chain-end::before,
  .contacts-actions .puzzle-chain-end::after { content: none; }
  /* extra bottom padding so the offer's CTA never ends up hidden behind the dots + "листайте
     дальше" cue that sit along the bottom edge on a short phone screen */
  .offer-full { padding: 46px 18px 104px; }
  /* arrows drop to the bottom band (out of the headline) — swipe + dots are the primary nav here */
  .offers-arrow { width: 40px; height: 40px; font-size: 20px; top: auto; bottom: 90px; transform: none; }
  .offers-arrow--prev { left: 14px; }
  .offers-arrow--next { right: 14px; }
  .offer-float-pill { font-size: 13px; padding: 11px 18px; }
  /* On a narrow screen the centered text column takes up nearly the full slide width, so this
     label-carrying piece (positioned by percentage like the others) drifts straight across the
     kicker/title instead of past them — the plain unlabeled squares stay since crossing text is
     fine for those, this is the one with its own readable caption. */
  .offer-float-wrap--pill { display: none; }
  /* Extra side margin, not just smaller padding — the box's own background otherwise reaches
     the same width as the surrounding text and crosses under the prev/next arrows, which sit
     just outside .offer-full-content's padding. Plain text wrapping there is fine to graze past;
     a solid background box behind it reads as broken. */
  .offer-full-trust { margin-left: 22px; margin-right: 22px; padding: 10px 14px; gap: 6px; }
  .offer-full-trust li { font-size: 12px; }
  /* Pieces sized for a wide screen would crowd a narrow one — scale the *wrapper* (holds the
     scroll-kick transform, not the drift animation) down instead of the piece itself, since a
     running CSS animation on transform would just override a plain scale set on that same
     element every frame. */
  .offer-float-wrap { scale: 0.65; }
  /* Same pill-with-label treatment as desktop, just a touch smaller for the narrower screen —
     was pinned to a fixed 46x46 circle before, which left no room for the offer's text label. */
  .offer-fab { right: 12px; bottom: 12px; height: 42px; padding: 0 14px 0 11px; font-size: 16px; gap: 7px; max-width: min(230px, calc(100vw - 24px)); }
  .offer-fab-text { font-size: 11px; }
  .offer-fab-icon--img { width: 20px; height: 20px; }
  .offers-popup { padding: 24px 20px; }
  .hero { padding: 28px 0; }
  .hero-title { font-size: 26px; margin-bottom: 16px; }
  .hero-lead { font-size: 15px; }
  .hero-art-img { max-width: 170px; }
  .hero-scroll-cta { margin-top: 20px; }
  /* Long button labels (e.g. "Записаться на бесплатную диагностику") must wrap instead of
     forcing the button — and the page — wider than the screen */
  .btn { white-space: normal; text-align: center; }
  .btn-block, .hero-actions .btn, .route-card .btn { width: 100%; }
  .section { padding: var(--space-8) 0; }
  .section-title { font-size: 24px; }
  .section-title.center { margin-bottom: var(--space-6); }
  .section-lead { font-size: 14.5px; }
  /* Hero-пазл на телефоне показываем (см. блок @media (max-width: 900px)), заголовок над ним. */
  .hero-inner--centered { min-height: 0; justify-content: flex-start; gap: 20px; }
  .choice-categories { grid-template-columns: 1fr; gap: 16px; }
  .routes-title { font-size: 24px; }
  /* Two side-by-side columns don't fit a phone screen — stack the photo above the text instead,
     shorter than its desktop min-height since it's no longer stretching to match a tall column. */
  .case-slide { flex-basis: 84vw; padding: 20px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  #specialists .grid-3 > .specialist-card { flex-basis: 100%; max-width: 100%; }
  .grid-4, .grid-3, .grid-2, .routes-grid { gap: 14px; }
  .routes-grid { grid-template-columns: 1fr; }
  .route-card-head { flex-wrap: wrap; gap: 8px; }
  .route-card, .service-card, .article-card { padding: 20px; }
  .service-line-card { flex-basis: 168px; }
  .review-card { flex-basis: 280px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .booking-overlay { padding: 0; align-items: flex-end; }
  .booking-modal { max-width: 100%; max-height: 92vh; padding: 24px 20px; border-radius: 24px 24px 0 0; }
  .specialist-overlay { padding: 0; align-items: flex-end; }
  .specialist-modal { max-width: 100%; max-height: 92vh; padding: 64px 20px 24px; border-radius: 24px 24px 0 0; }
  .booking-slots { grid-template-columns: repeat(2, 1fr); }

  /* "Как проходит работа" on phones: same pin/crossfade idea as desktop (still pinned under the
     header), and now the same vertical column of numbers too — just windowed down to a short
     strip instead of the full-height list desktop has room for. .process-timeline-viewport masks
     it to a fixed height; .process-timeline-track holds the real (taller) list and JS slides it
     up with a transform so the active step sits at the top edge, same "bring the active one to
     the leading edge" idea the old horizontal strip used, just running top-to-bottom now. That
     also means normal page scrolling alone drives it — no separate swipe gesture needed any more,
     since the strip's axis finally matches the page's. */
  .process-scroller { height: calc(var(--process-steps, 4) * 105vh); margin-top: 0; }
  /* The pin sticks flush under the header the moment the section scrolls into view, so the
     section's own top padding never actually shows above the title — this padding-top on the
     pin itself is what creates that gap, since it sits inside the sticky box. */
  .process-pin { position: sticky; height: auto; overflow: visible; display: block; padding: 24px 0 20px; }
  .process { display: block; }
  .process-timeline { position: relative; }
  /* Окно фиксированной высоты — видно активный шаг + хвостик уже пройденной цепочки над
     ним; JS (slideTrackToActive) двигает .process-timeline-track так, что активный шаг
     всегда стоит у нижнего края окна на одном месте, а не ползёт вниз по мере роста
     цепочки. Ещё не пройденные шаги просто уезжают за нижний край, не видны заранее. */
  /* Small horizontal buffer so the active step's scaled-up puzzle number (transform: scale(1.08))
     doesn't get clipped by the viewport's own left edge; negative margin keeps the visible
     content flush with the rest of the section. */
  .process-timeline-viewport { display: block; overflow: hidden; height: 168px; padding: 0 6px; margin: 0 -6px; }
  .process-timeline-track {
    display: flex; flex-direction: column;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  }
  .process-step { order: 3; }
  .process-step.passed { order: 1; }
  .process-photo-rail { margin: 16px 0 0; }
  /* Text only on the steps already reached; the ones still ahead are just numbers. */
  .process-step:not(.passed) .process-step-title { display: none; }
  .process-step:not(.passed) { height: 54px; }
  .process-step { height: 64px; gap: 14px; align-items: flex-start; }
  .process-step.passed { height: 52px; }
  .process-step.passed:first-child { height: 58px; }
  /* Title rides up with its number as the chain assembles — same --vchain-connected-margin the
     piece uses (flat -26px on mobile), same 0.35s transition, so they move together instead of
     the number sliding out from under stationary text. */
  .process-step.passed:has(.puzzle-vchain-mid) .process-step-text,
  .process-step.passed:has(.puzzle-vchain-end) .process-step-text { margin-top: var(--vchain-connected-margin, -16px); }
  .process-step-title { font-size: 14px; line-height: 1.25; padding-top: 11px; }
  /* Подпись активного шага — только десктоп; на телефоне левая колонка компактная */
  .process-step-sub { display: none; }
  /* Keep the desktop crossfade on phones too — the photos stay stacked (absolute) and fade
     between each other instead of an instant display:none swap that read as a jump. */
  /* Стартовое значение — JS (syncStickyHeight в initPinTimeline) сразу подгоняет под
     реальную высоту контента активного шага, разную для карты/пазла/цифр-диагностики. */
  /* Разным шагам (карта, пазл-маршрут, цифры-диагностика) нужна разная высота под
     crossfade-контент — одно число на все либо обрезало длинные шаги, либо держало
     лишнюю пустую высоту на коротких, из-за чего весь блок «4 причины» не помещался
     на экран. CSS :has() выбирает высоту по тому, какой .process-photo сейчас .active —
     без JS-измерений на каждый кадр скролла (это шатало layout залипающего .process-pin
     и подвешивало вкладку). */
  .process-photo-sticky { height: 320px; aspect-ratio: auto; max-height: none; }
  .process-photo-sticky:has(.process-photo[data-process-photo="0"].active) { height: 358px; }
  .process-photo-sticky:has(.process-photo[data-process-photo="1"].active) { height: 278px; }
  .process-photo-sticky:has(.process-photo[data-process-photo="2"].active) { height: 300px; }
  /* Тоньше и на всю ширину строки — цифра слева, текст занимает весь остаток. */
  .process-step { width: 100%; }
  .process-step-text { flex: 1 1 auto; min-width: 0; }
  .process-num { width: 40px; height: 55.2px; }
  .process-num-inner { height: 40px; font-size: 16px; }
  /* The apart/connected margins and the bite-clearance nudge above are all sized off the desktop
     48px piece — scaled down here by the same ratio as the piece itself (40/48), or the fixed
     desktop pixel values overlap or space out disproportionately on the smaller piece. */
  .puzzle-vchain-mid, .puzzle-vchain-end { margin-top: 12px; }
  /* Connected-state margin-top comes from --vchain-connected-margin (set per piece by
     refreshVchainMargins, already mobile-aware) via the desktop rule above — no separate
     override needed here. */
  .puzzle-vchain-mid .process-num-inner, .puzzle-vchain-end .process-num-inner { top: 6px; }
  .process-num--arrow .process-num-inner { font-size: 19px; }
  /* Phone: the caption sits over the bottom of the photo on a dark scrim, not in a row below it. */
  .process-photo { padding: 0; display: block; }
  .process-section .process-photo { padding: 0; }
  .process-section .process-photo-img {
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; padding: 0;
    border-radius: var(--radius-lg);
  }
  .process-section .process-photo-img::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; border-radius: inherit;
    background: linear-gradient(to top, rgba(23, 18, 15, 0.82) 12%, rgba(23, 18, 15, 0.45) 45%, transparent);
  }
  .process-section .process-photo-caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 14px 16px 16px; background: none;
  }
  .process-section .process-photo-caption p {
    color: #fff; font-size: 12.5px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
  }
  /* .process-pin has no fixed height here (it's content-driven, not viewport-filling like on
     desktop), so the shortcut just sits in normal flow after the photo instead of being pinned
     to a "bottom" that doesn't really exist. */
  /* A flex container is block-level by default, so without an explicit width it was stretching
     to the full container width once taken out of absolute positioning here — width: fit-content
     keeps it hugging its own label+arrow instead. */
  .process-skip { position: static; transform: none; width: fit-content; margin: 16px auto 0; }
  /* It's no longer absolutely centred here, so the desktop hover transform's translateX(-50%)
     — meant to re-center after a translateY nudge — instead shoved it sideways on tap/hover. */
  .process-skip:hover { transform: translateY(3px); }
}

@media (max-width: 400px) {
  /* icon-only so the FAB stops covering card text on the smallest screens */
  .offer-fab { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .offer-fab .offer-fab-text { display: none; }

  /* ---- compact pass: everything a notch smaller so it fits a narrow phone ---- */
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .section { padding: var(--space-7) 0; }
  .section-title { font-size: 22px; }
  .section-title.center { margin-bottom: var(--space-5); }
  .section-lead { font-size: 13.5px; }
  .section-kicker { font-size: 11px; }
  .routes-intro, .services-price-intro { margin-top: 40px; }
  .routes-title { font-size: 20px; }
  .routes-lead { font-size: 13px; }

  .btn, .btn-primary, .btn-ghost, .btn-dark, .btn-white { padding: 11px 16px; font-size: 13.5px; }
  .btn-lg { padding: 13px 18px; font-size: 14px; }
  /* Keep btn-split on one line at a size that fits — wrapping made the arrow square (its height =
     the text piece's height, set by main.js) balloon into a huge block. Only the long route-name
     CTA in the cases is allowed to wrap (and it's full-width there, so the square stays sane). */
  .btn-split-text { padding: 10px 15px 10px 19px; padding-right: 32px; font-size: 13px; white-space: nowrap; }
  .btn-split-lg .btn-split-text { padding: 12px 16px 12px 20px; padding-right: 34px; font-size: 13.5px; }
  .btn-split-lg .btn-split-arrow { font-size: 17px; }
  .case-route-cta .btn-split-text { white-space: normal; }

  .route-card, .service-card, .article-card, .parent-care-card { padding: 16px; }
  .route-title { font-size: 16px; }
  .route-intro, .route-meta-item { font-size: 12.5px; }
  .grid, .routes-grid { gap: 12px; }

  .case-card { padding: 16px; padding-bottom: 58px; }
  .case-theme { font-size: 17px; margin-bottom: 10px; padding-bottom: 10px; }
  .case-label { font-size: 11px; }
  .case-text, .case-result-text { font-size: 13.5px; line-height: 1.45; }
  .case-result { padding: 12px 14px; margin-bottom: 14px; }
  .case-route-cta { align-self: stretch; }
  .case-route-cta .btn-split-text { flex: 1; justify-content: center; }

  .specialist-modal-name { font-size: 18px; }
  .specialist-modal-bio, .specialist-modal-skills li { font-size: 13px; }

  /* modal / popup safety — never wider than the screen, stray children clipped not scrolling */
  .booking-modal, .specialist-modal, .offers-popup, .main-nav.open {
    max-width: 100vw; overflow-x: hidden;
  }
  .booking-modal, .specialist-modal { padding-left: 16px; padding-right: 16px; }
  .offers-popup-overlay { padding: 12px; }
  .offers-popup { padding: 22px 18px; }
}

.main-nav.open {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;   /* иначе при фикс. высоте пункты сворачиваются в колонки → меню уезжает вбок */
  align-items: stretch;
  text-align: left;
  overflow-x: clip;
  /* Fixed to the viewport (not absolute within the header) so it can never end up stacked
     underneath the offer bar or anything else living in the same sticky header. */
  position: fixed;
  top: var(--header-h, 90px);
  left: 0;
  right: 0;
  background: var(--bg);
  padding: 18px 20px 28px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(43, 36, 32, 0.06);
  gap: 4px;
  z-index: 500;
  max-height: calc(100svh - var(--header-h, 90px));
  max-height: calc(100dvh - var(--header-h, 90px));
  overflow-y: auto;
}

/* Mobile menu: two-level accordion instead of floating mega-menu, everything left-aligned.
   Both link types share one font-size rule so plain items ("Специалисты") and dropdown toggles
   ("Услуги и цены") read as the same size — they used to disagree (13px vs a forced 15px). */
.main-nav.open .nav-item { flex-direction: column; align-items: stretch; width: 100%; }
.main-nav.open .nav-link,
.main-nav.open .nav-toggle {
  font-size: 15px;
  text-align: left;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.main-nav.open .nav-toggle { width: 100%; justify-content: space-between; }
.main-nav.open .nav-dropdown {
  position: static;
  display: none;
  width: 100%;
  max-width: none;
  left: auto; top: auto; transform: none;
  opacity: 1; visibility: visible; pointer-events: auto;
  box-shadow: none;
  border: none;
  background: none;
  margin: 0;
  padding: 0;
}
.main-nav.open .nav-item.open .nav-dropdown { display: block; }
.main-nav.open .nav-dropdown-mega,
.main-nav.open .nav-dropdown-simple { width: 100%; }

/* "Полезные материалы" — was a plain flow of <a> tags wrapping like tags inside a tall beige
   box (the boxed .nav-dropdown background + display:block above broke its own flex column
   layout). Now a plain list of rows, same shape as the top-level menu items. */
.main-nav.open .nav-item.open .nav-dropdown-simple { display: flex; flex-direction: column; gap: 0; }
.main-nav.open .nav-dropdown-simple a {
  display: block;
  padding: 10px 4px 10px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
}
.main-nav.open .nav-dropdown-simple a:last-child { border-bottom: none; }

/* "Услуги и цены" — same idea: each category becomes one compact row instead of a padded card */
.main-nav.open .nav-dropdown-grid { grid-template-columns: 1fr; gap: 0; }
.main-nav.open .nav-dropdown-col { padding: 10px 4px 10px 18px; border-bottom: 1px solid var(--border-soft); }
.main-nav.open .nav-dropdown-col:last-child { border-bottom: none; }
.main-nav.open .nav-dropdown-heading { margin-bottom: 6px; }
.main-nav.open .nav-dropdown-list li a { padding: 4px 0; }
.main-nav.open .nav-dropdown-footer { text-align: left; margin-top: 10px; padding: 10px 4px 0 18px; border-top: 1px solid var(--border-soft); }

/* ---------- Kid-drawn doodles ----------
   Sprite lives in base.html. These are the emotional layer — warmth, play, "a child was here" —
   as opposed to the puzzle motif, which is the structural layer (things fit together). Rules that
   keep them from tipping into "перебор":
     - one per screen, placed in a section's margin, never on a button/link/field;
     - never overlapping a puzzle piece;
     - always aria-hidden + pointer-events:none (set on <use> callers in the markup);
     - colour via currentColor (each placement sets it to one palette token), tilt via --doodle-rot.
   Only a handful of sections are made position:relative for these — not every .section — to avoid
   disturbing the pinned process timeline and the about-section's own absolutely-placed rules. */
.hero, #choice, #specialists, #results,
.process-section, .parent-care-section, .materials-teaser, .contacts-section {
  position: relative;
  isolation: isolate;   /* always a stacking context, so the doodle's z-index:-1 is predictable
                            (independent of whether the reveal transform is currently applied) */
}
body { overflow-x: clip; }   /* guard: a stray doodle can never add horizontal scroll */

.doodle {
  position: absolute;
  display: block;
  width: var(--doodle-size, 58px);
  height: var(--doodle-size, 58px);
  color: var(--green);
  opacity: 0.85;
  pointer-events: none;
  /* Each home section is [data-reveal] → gets a transform after its reveal animation → is its
     own stacking context. z-index:-1 then paints the doodle above that section's background fill
     but behind all its in-flow content, so a doodle can never sit on top of text or a control. */
  z-index: -1;
  --doodle-rot: -6deg;
  transform: rotate(var(--doodle-rot)) translateY(0);
  animation: doodle-bob 7s ease-in-out infinite;
  /* PNG doodles bring their own colour (набор 03.09.2026 — цветной, не лайн-арт).
     Мягкая тень — только для лёгкого объёма. */
  filter: drop-shadow(0 3px 5px rgba(43, 36, 32, 0.14));
}
@keyframes doodle-bob {
  0%, 100% { transform: rotate(var(--doodle-rot)) translateY(0); }
  50%      { transform: rotate(var(--doodle-rot)) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) { .doodle { animation: none; } }
@media (max-width: 720px) {
  .doodle { width: calc(var(--doodle-size, 58px) * 0.66); opacity: 0.6; }
  .doodle--hide-mobile { display: none; }   /* only the hero + process doodles — those sections are busy on phones */
}

/* ---------- Emoji replacements ----------
   Every Apple emoji on the site is swapped for a monoline glyph from the sprite (see base.html).
   .e-icon scales with the surrounding font-size and inherits its colour. DB-stored emoji
   (ParentService.icon) go through the `doodle` template filter which emits the same markup. */
.e-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.16em;
  color: currentColor;
  flex-shrink: 0;
}
.specialist-modal-heading .e-icon { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }
.pay-badge .e-icon { width: 13px; height: 13px; }
.about-detail-map .e-icon { width: 1.25em; height: 1.25em; }
.case-photo-placeholder .e-icon { width: 100%; height: 100%; }
.parent-care-icon .e-icon { width: 100%; height: 100%; color: var(--teal); }
.nav-dropdown-icon .e-icon { width: 15px; height: 15px; }
.offer-full-trust .e-icon { color: #fff; }

/* ---------- Puzzle seam ----------
   Decorative jigsaw-edge divider dropped between two sections — the structural motif at the
   scale of the whole page: sections literally interlocking. Pure CSS, no JS. The strip paints in
   --seam-color (match the section *below* the seam) and is knocked out to a row of puzzle tabs by
   a repeating mask. Sits flush, no margin — put it as the last child of the upper section or the
   first child of the lower one. */
.puzzle-seam {
  height: 20px;
  border: 0;
  margin: 0;
  background: var(--seam-color, var(--bg-alt));
  -webkit-mask: var(--puzzle-edge) repeat-x center bottom / 132px 100%;
  mask: var(--puzzle-edge) repeat-x center bottom / 132px 100%;
}
:root {
  --puzzle-edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 20'%3E%3Cpath fill='%23fff' d='M0 20V9h48c-1-3-2-5 2-7 3-1 7-1 10 0 4 2 3 4 2 7h48v11Z'/%3E%3C/svg%3E");
}

/* ---------- Строка-анонс (promo bar над шапкой) ---------- */
.promo-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; background: var(--dark); color: #fff;
  font-size: 13px; font-weight: 600; text-decoration: none;
  line-height: 1.3;
}
.promo-bar-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); flex: none;
  box-shadow: 0 0 0 0 rgba(255, 198, 16, .5); animation: promo-pulse 2.6s infinite;
}
@keyframes promo-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 198, 16, .5); }
  70% { box-shadow: 0 0 0 9px rgba(255, 198, 16, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 198, 16, 0); }
}
@media (prefers-reduced-motion: reduce) { .promo-bar-dot { animation: none; } }
.promo-bar-text { flex: 1 1 auto; }
.promo-bar-cta { color: var(--yellow); font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.promo-bar:hover .promo-bar-cta { text-decoration: underline; }
/* строка-анонс теперь <button> — сброс стилей кнопки */
.promo-bar { border: 0; width: 100%; font-family: inherit; text-align: left; cursor: pointer; }
/* такая же строка-анонс, зафиксированная внизу экрана (только на главной) */
.promo-bar--bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  box-shadow: 0 -6px 24px -12px rgba(0, 0, 0, .45);
}

/* Попап «Бесплатная диагностика» — центрированное модальное окно с фото */
.diag-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.diag-modal.is-open { opacity: 1; pointer-events: auto; }
.diag-modal-backdrop { position: absolute; inset: 0; background: rgba(20, 15, 12, .55); }
.diag-modal-card {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: 92vh; overflow: auto;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--red), var(--red-hover)); color: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55);
  transform: translateY(14px); transition: transform .2s ease;
}
.diag-modal.is-open .diag-modal-card { transform: none; }
.diag-modal-photo { aspect-ratio: 16 / 8; overflow: hidden; }
.diag-modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.diag-modal-body { padding: 22px 26px 28px; display: flex; flex-direction: column; gap: 11px; align-items: flex-start; }
.diag-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; border: 0;
  background: rgba(0, 0, 0, .3); color: #fff; width: 34px; height: 34px; border-radius: 50%;
  font-size: 16px; cursor: pointer; line-height: 1;
}
.diag-modal-close:hover { background: rgba(0, 0, 0, .45); }
.diag-panel-stage { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .82); }
.diag-panel-title { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.2; }
.diag-panel-teaser { font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .92); margin: 0; }
.diag-panel-cta { margin-top: 6px; }
body.diag-modal-open, body.modal-open { overflow: hidden; }
/* Якорь цены: обычная стоимость перечёркнута → бесплатно */
.diag-price { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-top: 2px; }
.diag-price s { font-size: 15px; opacity: .6; text-decoration-thickness: 1.5px; }
.diag-price b { font-family: var(--font-head); font-weight: 800; font-size: 24px; line-height: 1; }
.diag-price span { font-size: 12px; opacity: .82; }
@media (max-width: 560px) {
  .diag-modal { padding: 12px; }
  .diag-panel-title { font-size: 19px; }
  .diag-modal-body { padding: 18px 18px 22px; }
  .diag-modal-photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .promo-bar { font-size: 12px; padding: 7px 12px; gap: 8px; }
}

/* ---------- Акции (/akcii/) ---------- */
.akcii-hero .akcii-deadline {
  display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--red-badge-bg); color: var(--red-badge-text); font-weight: 700; font-size: 13px;
}
.akcii-hero .btn { margin-top: 22px; }

.akcii-list { display: flex; flex-direction: column; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.akcia {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 26px 28px; position: relative; overflow: hidden;
}
.akcia::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--akcia-color, var(--red)); }
.akcia--red { --akcia-color: var(--red); }
.akcia--green { --akcia-color: var(--green); }
.akcia--teal { --akcia-color: var(--teal); }
.akcia--amber { --akcia-color: var(--amber); }
.akcia--purple { --akcia-color: var(--purple); }
.akcia--featured { border-color: var(--akcia-color); box-shadow: 0 20px 46px -22px rgba(244, 52, 71, .35); }
.akcia-stage {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--akcia-color, var(--red)); margin-bottom: 8px;
}
.akcia-title { font-size: 20px; line-height: 1.25; margin: 0 0 10px; }
.akcia--featured .akcia-title { font-size: 24px; }
.akcia-lede { margin: 0 0 14px; color: var(--dark); }
.akcia-terms { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.akcia-terms li { font-size: 14px; line-height: 1.45; color: var(--text-muted); padding-left: 18px; position: relative; }
.akcia-terms li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 2px;
  background: var(--akcia-color, var(--red)); transform: rotate(45deg);
}

.akcii-faq { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.akcii-faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 18px; }
.akcii-faq-item summary { cursor: pointer; padding: 15px 0; font-weight: 700; font-family: var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.akcii-faq-item summary::-webkit-details-marker { display: none; }
.akcii-faq-item summary::after { content: "+"; color: var(--red); font-weight: 700; flex: none; }
.akcii-faq-item[open] summary::after { content: "\2013"; }
.akcii-faq-item p { margin: 0 0 16px; color: var(--text-muted); line-height: 1.55; }

.akcii-cta-section { text-align: center; }
.akcii-cta-section .btn { margin-top: 18px; }

@media (max-width: 720px) {
  .akcia { padding: 20px 18px; }
  .akcia-title { font-size: 18px; }
  .akcia--featured .akcia-title { font-size: 20px; }
}

/* ---------- Hero: reassurance line ---------- */
.hero-reassure { margin: 14px 0 0; font-size: 13px; color: var(--text-muted); }   /* faint на кремовом не дотягивал по контрасту */

/* ---------- Свёрнутый оффер: компактная строка под шапкой (после прокрутки #offers) ----------
   UX: одна строка ~44px, читается за секунду; слева суть + цена, справа CTA-чип.
   Кликается вся строка — открывает попап «Бесплатная диагностика». */
.offer-recall {
  position: fixed; left: 0; right: 0; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 8px max(var(--page-gutter, 16px), 16px);
  border: none; background: var(--red); color: var(--white);
  font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(244, 52, 71, .5);
  transform: translateY(-101%);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.offer-recall.is-shown { transform: none; }
/* Карусель акций снята — строка видна сразу: стоит в потоке под шапкой (ничего не
   перекрывает) и прилипает к шапке при прокрутке. top ставит main.js по живой высоте шапки. */
.offer-recall--always { position: sticky; top: var(--header-h, 72px); width: 100%; transform: none; transition: none; }
.offer-recall-icon { font-size: 15px; flex-shrink: 0; line-height: 1; }
.offer-recall-text {
  font-weight: 700; font-size: 14px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.offer-recall-price {
  flex-shrink: 0; display: inline-flex; align-items: baseline; gap: 6px;
  padding-left: 12px; margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, .3);
}
.offer-recall-price s { font-size: 12px; opacity: .65; }
.offer-recall-price b { font-family: var(--font-head); font-weight: 800; font-size: 15px; }
.offer-recall-cta {
  flex-shrink: 0; margin-left: auto;
  font-family: var(--font-head); font-weight: 800; font-size: 12.5px;
  letter-spacing: .01em; white-space: nowrap;
  background: rgba(255, 255, 255, .18); padding: 6px 14px; border-radius: var(--radius-pill);
  transition: background .15s ease;
}
.offer-recall:hover .offer-recall-cta,
.offer-recall:focus-visible .offer-recall-cta { background: rgba(255, 255, 255, .32); }

@media (max-width: 700px) {
  .offer-recall { gap: 9px; padding: 7px 12px; }
  .offer-recall-text-extra { display: none; }          /* «Бесплатная диагностика» — и хватит */
  .offer-recall-price { padding-left: 9px; }
  .offer-recall-price s { display: none; }              /* только 0 ₽ */
  .offer-recall-cta {
    padding: 0; background: none; font-size: 0;         /* превращаем в стрелку-иконку */
  }
  .offer-recall-cta::after { content: "→"; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .offer-recall { transition: none; }
}

/* ---------- Блок акций на главной (#offers) ---------- */
/* Карусель featured-акций: .home-offers-viewport маскирует .home-offers-track (флекс-лента,
   каждый слайд — 100% ширины), стрелки лежат в viewport абсолютно, точки — обычной строкой
   под ним. Листает initOffersCarousel в main.js (стрелки/точки + автопрокрутка). */
.home-offers-carousel { position: relative; }
/* Стрелки живут здесь, а не в .home-offers-viewport (overflow:hidden режет всё за её пределами) —
   так top:50% центрирует их по высоте самой карточки, а не карточки вместе с точками под ней. */
.home-offers-stage { position: relative; }
.home-offers-viewport { position: relative; overflow: hidden; border-radius: var(--radius-md); }
.home-offers-track {
  display: flex;
  align-items: flex-start;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.home-offers-track > .home-offer { flex: 0 0 100%; min-width: 0; }
/* Высоту вьюпорта задаёт JS (initOffersCarousel в main.js) — под текущий слайд, а не под самый
   высокий из всех (иначе у более короткой акции внизу карточки остаётся пустое место). */
.home-offers-viewport { transition: height .3s cubic-bezier(.16, 1, .3, 1); }
@media (prefers-reduced-motion: reduce) { .home-offers-track { transition: none; } }

.home-offers-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255, 255, 255, .92); box-shadow: 0 4px 14px rgba(43, 36, 32, .2);
}
.home-offers-arrow:hover { background: #fff; transform: translateY(-50%); }
.home-offers-arrow--prev { left: 14px; }
.home-offers-arrow--next { right: 14px; }
/* Десктоп: стрелки — сбоку от карточки целиком, наполовину за её краем (тот же приём, что у
   .case-arrow--side в других каруселях), а не поверх текста или на стыке текста/фото внутри неё. */
@media (min-width: 761px) {
  .home-offers-arrow--prev { left: -17px; }
  .home-offers-arrow--next { right: -17px; }
}
.home-offers-dots { justify-content: center; margin-top: 14px; }
/* На узких экранах карточка сильно вытягивается по высоте (текст под фото), и top:50%
   от всей карточки роняет стрелки прямо на середину текста. Фото там наверху и его высота
   зафиксирована (.home-offer-featured-photo min-height), поэтому центрируем стрелки по
   нему, а не по всей карточке. */
@media (max-width: 760px) {
  .home-offers-arrow { top: 75px; width: 30px; height: 30px; font-size: 15px; }
}

/* Подсказка «на первом экране есть что-то ниже»: кнопка-скролл под верхним оффером */
.offers-scroll-cue-wrap { display: flex; justify-content: center; margin-top: 22px; }
.offers-scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: 1px solid var(--border-soft); border-radius: var(--radius-pill);
  background: var(--white); color: var(--text-muted);
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.offers-scroll-cue:hover { color: var(--dark); border-color: var(--dark); }
.offers-scroll-cue-arrow { display: inline-block; animation: cueBounce 1.6s ease-in-out infinite; }
@keyframes cueBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .offers-scroll-cue-arrow { animation: none; } }

/* Небольшая строка плашек с остальными акциями под верхним оффером + ссылка на /akcii/ —
   заменяет прежний отдельный блок «Акции центра» внизу главной (перегружал страницу). */
.home-offers-mini { padding: 14px 0 6px; }
.home-offers-mini-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
}
.home-offer-mini {
  --ho-color: var(--red);
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--white); color: var(--dark);
  font-weight: 700; font-size: 12.5px; text-decoration: none; line-height: 1.2;
  border-left: 3px solid var(--ho-color);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.home-offer-mini:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(43, 36, 32, .3); border-color: var(--ho-color); }
.home-offer-mini--red { --ho-color: var(--red); }
.home-offer-mini--green { --ho-color: var(--green); }
.home-offer-mini--teal { --ho-color: var(--teal); }
.home-offer-mini--amber { --ho-color: var(--amber); }
.home-offer-mini--purple { --ho-color: var(--purple); }
.home-offer-mini-more {
  display: inline-flex; align-items: center; padding: 8px 4px; color: var(--text-muted);
  font-weight: 700; font-size: 12.5px; text-decoration: none; transition: color .15s ease;
}
.home-offer-mini-more:hover { color: var(--dark); }
@media (max-width: 720px) {
  /* Раньше была горизонтальная лента (overflow-x: auto) — на узком экране половина плашек
     терялась за краем и не была видна без скролла вбок. Просто переносим строки: плашки
     мельче ссылок в контенте, при wrap они естественно складываются в 2-3 ряда. */
  .home-offers-mini-row { justify-content: center; gap: 8px; }
  .home-offer-mini { padding: 7px 13px; font-size: 12px; }
}
.home-offer {
  --ho-color: var(--red);
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 20px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--ho-color);
  text-decoration: none; color: var(--dark); font: inherit; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.home-offer:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -18px rgba(43, 36, 32, .3); }
.home-offer--red { --ho-color: var(--red); --ho-hover: var(--red-hover); }
.home-offer--green { --ho-color: var(--green); --ho-hover: color-mix(in srgb, var(--green) 82%, black); }
.home-offer--teal { --ho-color: var(--teal); --ho-hover: var(--teal-hover); }
.home-offer--amber { --ho-color: var(--amber); --ho-hover: var(--amber-hover); }
.home-offer--purple { --ho-color: var(--purple); --ho-hover: var(--purple-hover); }
.home-offer-stage {
  font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ho-color);
}
.home-offer-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.25; }
.home-offer-teaser { font-size: 13px; line-height: 1.45; color: var(--text-muted); flex: 1 1 auto; }
.home-offer-go { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--red); }

.home-offer--featured {
  /* Раньше фон был жёстко red — вторая featured-акция (другой accent) всё равно
     красилась в красный градиент. Теперь берём цвет из --ho-color/--ho-hover,
     который ставит модификатор .home-offer--{{ accent }} выше. */
  background: linear-gradient(150deg, var(--ho-color), var(--ho-hover, var(--ho-color)));
  border: 0; color: var(--white);
  padding: 26px 28px; gap: 8px; cursor: default;
}
.home-offer--featured:hover { transform: none; box-shadow: var(--shadow, 0 12px 30px -14px rgba(43,36,32,.2)); }
.home-offer--featured .home-offer-stage { color: rgba(255, 255, 255, .8); }
.home-offer--featured .home-offer-title { font-size: 22px; }
.home-offer--featured .home-offer-teaser { color: rgba(255, 255, 255, .88); font-size: 14px; flex: 0 0 auto; }
.home-offer-btn { align-self: flex-start; margin-top: 14px; }
/* держим оффер-кнопку стандартного размера: текст в одну строку, стрелка-квадрат не раздувается */
.home-offer-btn .btn-split-text { padding: 12px 32px 12px 20px; font-size: 14px; white-space: nowrap; flex: 0 0 auto; }
.home-offer-btn .btn-split-arrow { --arrow-size: 44px !important; }

/* Оффер: всё в один столбец — заголовок, цена, 3 пункта, крупный таймер, кнопка, ссылка внизу */
.home-offer--has-photo .home-offer-featured-body {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 14px; padding: 30px 32px;
}
.home-offer--featured .diag-price { margin: 0; align-items: baseline; gap: 10px; }
.home-offer--featured .diag-price s { font-size: 16px; opacity: .5; }
.home-offer--featured .diag-price b { font-size: 34px; }
.diag-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.diag-points li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .95); }
.diag-points li::before { content: '✓'; position: absolute; left: 0; top: 0; font-weight: 800; font-size: 13px; opacity: .9; }
/* Крупный таймер — без плашки/обёртки (специфичность выше .promo-timer, чтобы перебить фон) */
.home-offer--featured .promo-timer--big {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px;
  background: none; padding: 0; margin: 4px 0; border-radius: 0; color: #fff;
}
.home-offer--featured .promo-timer--big .promo-timer-label {
  flex: 1 1 100%; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; opacity: .8; margin: 0 0 2px;
}
.home-offer--featured .promo-timer--big .promo-timer-unit { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: auto; }
.home-offer--featured .promo-timer--big .promo-timer-unit b {
  font-family: var(--font-accent); font-weight: 800; font-size: 40px; line-height: 1;
}
.home-offer--featured .promo-timer--big .promo-timer-unit i { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.home-offer-btn { align-self: flex-start; margin-top: 6px; }
.home-offer-more-link { align-self: flex-start; margin-top: 10px; }
.home-offer-go--onred { color: #fff !important; }

/* Оффер «Диагностика»: «Записаться» + «Позвонить» тем же пазл-стыком, что в блоке «Контакты»
   (.contacts-actions/.contact-piece) — только вырез подогнан под цветной фон карточки
   (--ho-color), а не тёмный фон футера, и «выступ» первого куска — под белую кнопку. */
.home-offer-actions .contact-piece.btn-white { --cp-knob: var(--white); }
.home-offer-actions .contact-piece + .contact-piece::before { background: var(--ho-color); }

/* Карточка «Бесплатная диагностика» с фотографией — текст слева, фото справа */
.home-offer--has-photo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 38%); gap: 0;
  padding: 0; overflow: hidden;
}
.home-offer-featured-photo { position: relative; min-height: 200px; }
.home-offer-featured-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .home-offer--has-photo { grid-template-columns: 1fr; }
  .home-offer-featured-photo { min-height: 150px; order: -1; }
  .home-offer--has-photo .home-offer-featured-body { padding: 22px 20px; gap: 13px; }
  .home-offer-btn { align-self: flex-start; }
  .home-offer-btn .btn-split-text { flex: 0 0 auto; justify-content: center; white-space: nowrap; padding: 11px 30px 11px 18px; font-size: 13.5px; }
  .home-offer--featured .promo-timer--big .promo-timer-unit b { font-size: 32px; }
}
/* Карточка-кнопка «Бесплатная диагностика» в нижнем блоке акций */
button.home-offer { width: 100%; font-family: inherit; }
.home-offer-more-link {
  align-self: flex-start; margin-top: 10px;
  font-size: 12.5px; font-weight: 700; text-decoration: underline;
  color: rgba(255, 255, 255, .85);
}
.home-offer-more-link:hover { color: #fff; }

@media (max-width: 560px) {
  .home-offer--featured { padding: 22px 20px; }
  .home-offer--featured .home-offer-title { font-size: 19px; }
}
/* Карточка с фото на телефоне: колонкой, без внутреннего 2-col грида (иначе тело вылезает
   за карточку на узких экранах). */
@media (max-width: 700px) {
  .home-offer--has-photo {
    display: flex; flex-direction: column; grid-template-columns: none; padding: 0;
  }
  .home-offer--has-photo .home-offer-featured-body { padding: 20px 18px; width: 100%; }
  .home-offer--has-photo .home-offer-featured-photo { width: 100%; min-height: 150px; order: -1; }
}

/* ---------- Contextual offer band (страницы услуг и маршрутов) ---------- */
.section--tight { padding-top: 12px; padding-bottom: 0; }
.ctx-offer {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--border);
  border-left: 4px solid var(--ctx-color, var(--amber));
  text-decoration: none; color: var(--dark);
  transition: box-shadow .15s ease;
}
.ctx-offer:hover { box-shadow: 0 12px 30px -16px rgba(43, 36, 32, .28); }
.ctx-offer--amber { --ctx-color: var(--amber); }
.ctx-offer--red { --ctx-color: var(--red); }
.ctx-offer--green { --ctx-color: var(--green); }
button.ctx-offer { font: inherit; cursor: pointer; width: 100%; }
.ctx-offer-badge {
  flex: none; min-width: 46px; height: 34px; padding: 0 10px;
  display: grid; place-items: center; border-radius: 9px;
  background: var(--ctx-color, var(--amber)); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
}
.ctx-offer-badge--icon { min-width: 34px; }
.ctx-offer-badge--icon .e-icon { width: 17px; height: 17px; filter: brightness(0) invert(1); }
.ctx-offer-body { flex: 1 1 auto; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.ctx-offer-body b { color: var(--dark); }
.ctx-offer-go { flex: none; font-weight: 700; font-size: 13px; color: var(--red); white-space: nowrap; }
@media (max-width: 620px) {
  .ctx-offer { flex-wrap: wrap; gap: 10px; }
  .ctx-offer-go { width: 100%; }
}

/* ---------- Booking modal: «приведи друга» на экране «Заявка принята» ---------- */
.booking-referral {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  margin: 6px 0 18px; padding: 14px 16px;
  background: var(--green-bg); border-radius: 12px;
}
.booking-referral-badge {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; background: var(--green); color: #fff;
  font-family: var(--font-head); font-weight: 800; font-size: 14px;
}
.booking-referral p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--green-text); }
.booking-referral a { color: var(--green-text); font-weight: 700; }

/* ---------- Карточка специалиста: кнопка «Записаться» во всю ширину ---------- */
.specialist-card-actions {
  display: block;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft);
}
.specialist-book { display: flex; width: 100%; }
.specialist-book .btn-split-text { flex: 1; justify-content: center; padding: 11px 16px; font-size: 14px; }
/* «зелёную» часть (стрелку) — в фиолетовый, текст остаётся красным */
.specialist-book .btn-split-arrow { background: var(--purple); }
.specialist-book:hover .btn-split-arrow { background: var(--purple-hover); }
@media (max-width: 360px) {
  .specialist-card-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Таймер набора в блоке «Акции центра» ---------- */
.promo-timer {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 9px;
  margin-top: 16px; padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--red-badge-bg); color: var(--red-badge-text);
}
.promo-timer-label { font-size: 13px; font-weight: 700; }
.promo-timer-unit { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; min-width: 34px; }
.promo-timer-unit b { font-family: var(--font-accent); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.promo-timer-unit i { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; opacity: .72; margin-top: 3px; }
.promo-timer--done { font-weight: 700; font-size: 13px; padding: 9px 16px; }
/* Таймер на красном фоне — в карточке «Бесплатная диагностика» и в фикс-панели */
/* Таймер на красном фоне (карточка «Бесплатная диагностика» + попап) — без плашки, крупные цифры */
.promo-timer--on-red {
  background: none; color: #fff; padding: 0; margin-top: 14px;
  gap: 6px 18px; align-items: baseline;
}
.promo-timer--on-red .promo-timer-label { flex: 1 1 100%; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-bottom: 2px; }
.promo-timer--on-red .promo-timer-unit { min-width: auto; }
.promo-timer--on-red .promo-timer-unit b { font-size: 34px; }
.promo-timer--on-red .promo-timer-unit i { opacity: .78; font-size: 10px; margin-top: 4px; }
@media (max-width: 560px) {
  .promo-timer--on-red .promo-timer-unit b { font-size: 27px; }
}
@media (max-width: 480px) {
  .promo-timer { gap: 6px; padding: 9px 12px; }
  .promo-timer-unit { min-width: 30px; }
  .promo-timer-unit b { font-size: 17px; }
  .specialist-card-actions { flex-wrap: wrap; }
}

/* ---------- Фикс-баннер бесплатной диагностики (главная) ---------- */
.diag-banner {
  position: fixed; left: 50%; bottom: 16px; z-index: 90;
  width: min(660px, calc(100% - 24px));
  transform: translateX(-50%) translateY(160%);
  transition: transform .42s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.diag-banner.is-visible { transform: translateX(-50%) translateY(0); }
.diag-banner.is-visible .diag-banner__card,
.diag-banner.is-visible .diag-banner__fab { pointer-events: auto; }

.diag-banner__card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  box-shadow: 0 -2px 10px rgba(43, 36, 32, .06), 0 22px 48px -18px rgba(43, 36, 32, .32);
}
.diag-banner.is-collapsed .diag-banner__card { display: none; }

.diag-banner__photo {
  width: 62px; height: 62px; border-radius: 14px; flex: none;
  object-fit: cover; object-position: center;
}
.diag-banner__body { flex: 1 1 auto; min-width: 0; }
.diag-banner__kicker {
  display: flex; align-items: center; gap: 5px;
  margin: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--red-badge-text);
}
.diag-banner__kicker .e-icon { width: 12px; height: 12px; }
.diag-banner__title {
  margin: 3px 0 7px; font-family: var(--font-head); font-weight: 700;
  font-size: 14px; line-height: 1.22; color: var(--dark);
}
.diag-banner__timer.promo-timer--compact {
  margin: 0; padding: 4px 10px; gap: 7px;
}
.promo-timer--compact .promo-timer-unit { min-width: 22px; }
.promo-timer--compact .promo-timer-unit b { font-size: 14px; }
.promo-timer--compact .promo-timer-unit i { font-size: 8px; margin-top: 1px; }

.diag-banner__cta { flex: none; }
.diag-banner__cta .btn-split-text { padding: 10px 14px 10px 18px; padding-right: 30px; font-size: 13px; }

.diag-banner__close {
  position: absolute; top: -11px; right: -11px; width: 26px; height: 26px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: var(--dark); color: #fff; font-size: 12px; line-height: 1;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.diag-banner__close:hover { background: var(--dark-2); }

/* Свёрнутое состояние — маленькая кнопка снизу справа */
.diag-banner__fab {
  display: none; align-items: center; gap: 8px; margin-left: auto;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  padding: 12px 18px; border-radius: var(--radius-pill);
  box-shadow: 0 12px 28px -8px rgba(244, 52, 71, .55);
}
.diag-banner__fab:hover { background: var(--red-hover); }
.diag-banner__fab .e-icon { width: 15px; height: 15px; }
.diag-banner.is-collapsed { left: auto; right: 16px; width: auto; transform: translateY(160%); }
.diag-banner.is-collapsed.is-visible { transform: translateY(0); }
.diag-banner.is-collapsed .diag-banner__fab { display: inline-flex; }

@media (max-width: 600px) {
  .diag-banner { bottom: 10px; width: calc(100% - 16px); }
  .diag-banner__card { flex-wrap: wrap; padding: 14px 14px 12px; gap: 10px 12px; }
  .diag-banner__photo { width: 48px; height: 48px; }
  .diag-banner__body { flex: 1 1 60%; }
  .diag-banner__cta { flex: 1 1 100%; }
  .diag-banner__cta .btn-split { width: 100%; }
  .diag-banner__cta .btn-split-text { flex: 1; justify-content: center; }
  .diag-banner.is-collapsed { right: 10px; bottom: 10px; }
  .diag-banner__fab-text { display: none; }
  .diag-banner__fab { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .diag-banner { transition: none; } }

/* ============================================================================
   МОБИЛКА: убираем поэтапный (закреплённый) скролл с разделов главной.
   На телефоне «Маршруты», «Специалисты», «Что говорят родители», «Отзывы»,
   «Пока ребёнок на занятии» просто стоят в обычном потоке — все карточки
   видны сразу, страница скроллится как обычно.
   Исключения (оставлены закреплёнными/поэтапными на мобиле):
     • герой-пазл — собирается при скролле (высота .hero-scroller правится выше);
     • «4 причины» (#process-scroller) — по просьбе клиента вернули как было.
   Блок идёт последним в файле, поэтому перебивает все настройки пина выше.
   ========================================================================== */
@media (max-width: 900px) {
  /* 1. Снимаем сам пин и «лишнюю» высоту скролл-контейнеров.
     Как только .position != sticky, JS-степпер (initPinStage) сам уходит в
     простой режим (isPinActive() → false). */
  .routes-scroller,
  .specialists-pinned.results-scroller,
  #specialists.results-scroller,
  .cases-teaser-scroller,
  #results-reviews.results-scroller,
  #parent-care.results-scroller {
    height: auto !important;
    min-height: 0 !important;
  }
  .routes-pin,
  .specialists-pinned .results-pin,
  .cases-teaser-pin,
  #results-reviews .results-pin,
  #parent-care .results-pin {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  /* Разделы, которые мы «распинили», — показываем сразу, без reveal-затухания:
     контейнер стал в разы выше экрана, из-за чего IntersectionObserver отдавал
     .revealed только после того, как в него уже глубоко проскроллишь. */
  #choice[data-reveal],
  #specialists[data-reveal],
  #results[data-reveal],
  #results-reviews[data-reveal],
  #parent-care[data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* 2. «Маршруты» — карточки в столбик, все видны. */
  .routes-pin .routes-lead { display: block !important; }
  .routes-pin .routes-grid {
    position: static !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px !important;
  }
  .routes-pin .route-card,
  .routes-pin .route-card.is-route-current,
  .routes-pin .route-card.is-route-past {
    /* relative, НЕ static — .js-armed .route-pain-float (position:absolute) якорится на
       ближайшего позиционированного предка; со static им становится .routes-grid, и обе
       плашки-«боли» всех карточек съезжаются в одну точку наверху раздела. */
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    width: auto !important;
    transition: none !important;
  }
  .routes-pin .route-card .btn { display: inline-flex !important; }
  /* Плашки-«боли»: были совсем скрыты на мобиле — теперь появляются анимацией по одной
     карточке, когда та въезжает в экран (IntersectionObserver, main.js), тем же способом
     и той же CSS (.is-pain-shown), что и пошаговый пин на десктопе. Тут только чиним то,
     что реально ломает раскладку в потоке: .js-armed .route-card резервирует 44px сверху
     под плашки при любой ширине, но в потоковом списке сам .routes-grid тоже не должен
     тянуться под них — плашки лежат в своей же карточке. */
  .routes-pin .routes-grid { overflow: visible !important; }

  /* 3. «Специалисты» — карточки в столбик, все видны, точки-статусбар не нужны.
     .specialists-stage лежит вне .container (в потоке — под своим заголовком),
     поэтому боковые отступы от края экрана задаём здесь сами. */
  .specialists-stage {
    position: static !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    margin: 18px 0 0 !important;
    padding: 0 16px !important;   /* совпадает с .container на мобиле (≤720 там 16px) */
    overflow: visible !important;
  }
  .specialists-stage > .specialist-card,
  .specialists-stage > .specialist-card.is-active,
  .specialists-stage > .specialist-card.is-past {
    /* relative, НЕ static — иначе .specialist-phd (position:absolute) цепляется не за свою
       карточку, а за первого позиционированного предка выше, и плашка «Кандидат наук»
       уезжает не на ту карточку (см. тот же комментарий у десктопной раскладки выше). */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    pointer-events: auto !important;
    transition: none !important;
  }
  .specialists-stage > .specialist-card .specialist-photo {
    flex: 0 0 auto !important;
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    height: auto !important;
  }
  .specialists-pinned .case-dots { display: none !important; }

  /* 4. «Что говорят родители» — записки-веер + текст + кнопка, всё в потоке. */
  .cases-teaser-pin { overflow: visible !important; }
  .cases-teaser-stack { position: static !important; height: auto !important; }
  .cases-teaser-scatter {
    position: static !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }
  .cases-teaser-scatter .cases-paper,
  .cases-teaser-scatter .cases-paper[data-case-paper] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: 420px;
    margin: 0 auto !important;
    transition: none !important;
  }

  /* 5. «Пока ребёнок на занятии» — карточки в столбик, все видны. Раньше тут не было
     фикса вообще: .results-pin выше сняли со sticky, initPinStage перестал звать
     onStep → .is-pc-current никогда не проставляется → карточки так и висят в своём
     ≤720-состоянии по умолчанию (position:absolute, opacity:.45, раскиданы через
     --pc-slide/--pc-step без JS) — снаружи это выглядело как «карточек не видно». */
  .parent-care-section .parent-care-grid {
    position: static !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px !important;
  }
  .parent-care-section .parent-care-card {
    /* relative, НЕ static — .parent-care-badge «Рекомендуем» (position:absolute) должен
       цепляться за свою карточку, а не за .parent-care-grid (см. тот же баг и комментарий
       у .specialist-card / .route-card выше). */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    width: auto !important;
    margin: 0 !important;
    transition: none !important;
  }
  .parent-care-section .parent-care-card:hover { transform: none !important; }

  /* 6. «Отзывы» — снимаем растяжку под пин; карусель дальше работает своим обычным кодом
     (нативный горизонтальный скролл, не завязана на initPinStage). */
  #results-reviews .results-pin > .container,
  #parent-care .results-pin > .container { min-height: 0 !important; }
}

/* «Сведения об образовательной организации»: подраздел оформлен как статья (sveden/layout.html). */
/* legal-doc даёт типографику, но ширина — как у текста статьи (container-narrow). */
.container-narrow.sveden-content { max-width: var(--container-narrow-width); }
.sveden-content > h2:first-child { margin-top: 0; }
.sveden-props { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); margin: 0 0 24px; border-top: 1px solid rgba(43, 36, 32, 0.12); }
.sveden-props dt, .sveden-props dd { margin: 0; padding: 12px 0; border-bottom: 1px solid rgba(43, 36, 32, 0.12); }
.sveden-props dt { font-weight: 600; padding-right: 20px; }
.sveden-docs a { text-decoration: underline; }
.sveden-pending { opacity: 0.55; font-size: 13px; }
@media (max-width: 900px) {
  .sveden-props { grid-template-columns: 1fr; }
  .sveden-props dt { border-bottom: 0; padding-bottom: 2px; }
  .sveden-props dd { padding-top: 0; }
}
.contacts-sveden-btn { margin-top: 14px; }

/* ---------- Блок доверия на посадочных (main/_trust.html) ---------- */
.trust-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.trust-card { background: var(--white); border-radius: 20px; padding: 20px; }
.trust-lead { display: flex; gap: 16px; align-items: center; }
.trust-lead-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 96px; }
.trust-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--green-text); font-weight: 700; }
.trust-lead-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.25; margin: 4px 0 6px; }
.trust-lead-badge { display: inline-block; background: var(--red-badge-bg); color: var(--red-badge-text); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 6px; }
.trust-lead-role { font-size: 14px; line-height: 1.45; opacity: .8; }
.trust-facts { display: grid; gap: 12px; }
.trust-fact { display: block; color: inherit; text-decoration: none; }
.trust-fact b { display: block; font-family: var(--font-head); font-size: 17px; }
.trust-fact span { font-size: 13px; opacity: .75; }
a.trust-fact:hover b { color: var(--red); }
.trust-reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.trust-review { margin: 0; background: var(--white); border-radius: 20px; padding: 18px 20px; }
.trust-review-stars { color: var(--yellow); letter-spacing: 2px; font-size: 15px; }
.trust-review blockquote { margin: 8px 0 10px; font-size: 14px; line-height: 1.55; }
.trust-review figcaption { font-size: 13px; font-weight: 600; opacity: .7; }
@media (max-width: 900px) {
  .trust-grid, .trust-reviews { grid-template-columns: 1fr; }
  .trust-lead-photo { width: 72px; height: 72px; flex-basis: 72px; }
}

/* ---------- Мессенджеры в форме записи ---------- */
.booking-messengers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; font-size: 14px; }
.booking-messengers span { opacity: .7; }
.booking-messengers a { padding: 7px 14px; border-radius: 999px; background: var(--green-bg); color: var(--green-text); font-weight: 600; text-decoration: none; }
.booking-messengers a:hover { background: var(--green); color: var(--white); }

/* ---------- Закреплённая нижняя панель на телефоне ---------- */
.mobile-cta-bar { display: none; }
@media (max-width: 720px) {
  .mobile-cta-bar {
    display: flex; gap: 8px; align-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 140;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white); box-shadow: 0 -6px 20px rgba(43, 36, 32, .12);
  }
  .mobile-cta-main { flex: 1 1 auto; min-height: 48px; padding: 0 14px; font-size: 15px; }
  .mobile-cta-icon {
    flex: 0 0 auto; min-width: 48px; height: 48px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--green); color: var(--white); text-decoration: none;
  }
  .mobile-cta-icon .e-icon { width: 20px; height: 20px; }
  .mobile-cta-msg { padding: 0 14px; font-weight: 700; font-size: 14px; background: var(--dark); }
  .modal-open .mobile-cta-bar, .diag-modal-open .mobile-cta-bar { display: none; }

  /* Cookie-баннер: компактная строка над панелью, а не 20% экрана поверх кнопки записи */
  .cookie-banner { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .cookie-banner-inner { padding: 10px 12px; gap: 10px; flex-wrap: nowrap; }
  .cookie-banner-text { flex: 1 1 auto; font-size: 11.5px; line-height: 1.4; }
  .cookie-banner-btn { width: auto; padding: 8px 14px; font-size: 13px; }
}

/* Шаг «имя + телефон»: без слогана и точек шагов — только суть */
[data-step="contacts"] .booking-slogan { display: none; }
[data-step="contacts"] .booking-dots { visibility: hidden; }
.booking-chosen { display: inline-block; margin: -4px 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--green-bg); color: var(--green-text); font-size: 13px; font-weight: 600; }
.booking-chosen[hidden] { display: none; }
.booking-change { margin-top: 12px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--text-faint); text-decoration: underline; cursor: pointer; }
.booking-change:hover { color: var(--dark); }
[data-step="contacts"] .booking-consent { font-size: 11.5px; }

/* Длинные слова в заголовках («Нейропсихологическая», «Материально-техническое») на телефоне
   шире экрана: без переносов страница уезжала вбок (ширина 518px при экране 375px). */
@media (max-width: 720px) {
  h1, h2, h3, .hero-lead, .service-price-row { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
  /* В заголовке hero длинных слов нет — переносы там только рвали «со-ставим», «раз-вития» */
  .hero-simple .hero-title { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
}

/* ==========================================================================
   Главная, 30.09.2026: бейдж-сущность внутри H1, оффер под кнопкой hero,
   горизонтальная лента специалистов с цифрами доверия.
   ========================================================================== */
/* Бейдж теперь часть H1 («Детский логопед… в Санкт-Петербурге») — отдельной строкой над
   крупной фразой, с обычным шрифтом бейджа, а не заголовочным. */
.hero-title .hero-title-kicker {
  display: flex; width: fit-content; max-width: 100%;
  font-family: var(--font-body, inherit); font-size: 13px; line-height: 1.3; letter-spacing: 0;
  text-align: left; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal;
}
.hero-title .hero-title-kicker .hero-dot { flex: 0 0 8px; }
@media (max-width: 900px) {
  .hero-simple .hero-title .hero-title-kicker { margin-left: auto; margin-right: auto; font-size: 12px; padding: 6px 12px; }
}

/* Цена + что получите + срок — сразу под кнопкой записи */
.hero-offer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; justify-content: center;
}
.hero-offer-price { white-space: nowrap; font-family: var(--font-head); }
.hero-offer-price s { color: var(--text-faint); font-weight: 600; font-size: 15px; margin-right: 4px; }
.hero-offer-price b { color: var(--red); font-weight: 800; font-size: 24px; }
.hero-offer-points { font-size: 14px; line-height: 1.4; color: var(--dark); max-width: 380px; text-align: left; }
.hero-offer-deadline { color: var(--red); font-weight: 700; white-space: nowrap; }
@media (min-width: 901px) { .hero-offer { justify-content: flex-start; } }
@media (max-width: 900px) { .hero-offer-points { text-align: center; font-size: 13px; } }

/* Специалисты: цифры доверия над лентой */
.specialists-strip { position: relative; }
.specialists-lead { margin-bottom: var(--space-6); }
/* «Наши супергерои»: три цифры команды в ряд, разделены тонкими линиями, без карточек */
.team-numbers {
  list-style: none; margin: var(--space-5) auto var(--space-4); padding: 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.team-numbers li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 var(--space-4); text-align: center; }
.team-numbers li + li { border-left: 1px solid rgba(43, 36, 32, .12); }
.team-numbers b {
  font-family: var(--font-accent); font-weight: 800; font-size: 56px; line-height: 1;
  color: var(--purple); letter-spacing: -0.02em;
}
.team-numbers span { font-size: 15px; line-height: 1.35; color: var(--text-muted); max-width: 200px; }
.specialists-hint { text-align: center; font-size: 14px; color: var(--text-muted); margin: 0 0 var(--space-6); }
@media (max-width: 720px) {
  .team-numbers { margin-top: var(--space-4); }
  .team-numbers li { padding: 0 var(--space-2); }
  .team-numbers b { font-size: 36px; }
  .team-numbers span { font-size: 12.5px; }
}
.specialists-facts {
  list-style: none; margin: var(--space-5) auto 0; padding: 0; max-width: 920px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.specialists-fact {
  --sc: var(--green-text); --sb: var(--green-bg);
  background: var(--sb); border-radius: var(--radius-sm); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.specialists-fact b { font-family: var(--font-accent); font-weight: 800; font-size: 24px; line-height: 1.1; color: var(--sc); }
.specialists-fact span { font-size: var(--fs-sm); line-height: 1.35; color: var(--dark); }
.specialists-fact--purple { --sc: var(--purple); --sb: var(--purple-badge-bg); }
.specialists-fact--teal   { --sc: var(--teal);   --sb: var(--teal-badge-bg); }
@media (max-width: 720px) {
  .specialists-facts { grid-template-columns: 1fr; gap: 8px; }
  .specialists-fact { gap: 2px; padding: 10px 14px; }
  .specialists-fact b { font-size: 18px; }
  .specialists-fact span { font-size: var(--fs-xs); }
}

/* Специалисты: горизонтальная лента со свайпом и стрелками (как лента услуг) */
.specialists-line-wrap { display: flex; align-items: center; gap: 10px; margin-top: var(--space-5); }
/* Лента — во всю ширину экрана, а не в ширину контейнера (по просьбе центра, 10.10.2026):
   стрелки прижаты к краям окна, карточек видно больше. */
.container.specialists-line-wrap { max-width: none; }
.specialists-line-nav { flex-shrink: 0; }
.specialists-line {
  flex: 1; min-width: 0; display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 18px 2px 18px;   /* сверху — место под плашку «Кандидат наук» (top:-12px) */
}
.specialists-line::-webkit-scrollbar { display: none; }
.specialists-line > .specialist-card {
  flex: 0 0 280px; scroll-snap-align: start;
  display: flex; flex-direction: column;
  box-shadow: 0 14px 30px -18px rgba(108, 92, 166, .35);
}
.specialists-line > .specialist-card .specialist-photo { aspect-ratio: 4 / 5; }
.specialists-line > .specialist-card .specialist-body { flex: 1; display: flex; flex-direction: column; padding: 16px 18px; }
.specialists-line > .specialist-card .specialist-body h3 { font-size: 16px; }
.specialists-line > .specialist-card .specialist-role {
  font-size: 12.5px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.specialists-line > .specialist-card .specialist-exp { font-size: 11.5px; }
.specialists-line > .specialist-card .specialist-card-actions { margin-top: auto; padding-top: 10px; }
@media (max-width: 720px) {
  .specialists-line-nav { display: none; }       /* на телефоне — свайп */
  .specialists-line-wrap { padding-right: 0; }
  .specialists-line { gap: 12px; scroll-padding-left: 2px; }
  .specialists-line > .specialist-card { flex-basis: 78%; }   /* край следующей карточки виден — понятно, что листается */
}

/* Маршруты на главной (30.09.2026): слоган маршрута убран, «боли» — крупными плашками
   сверху карточки (фон цвета маршрута), под ними — название маршрута. */
.route-pains { gap: 8px; align-items: flex-start; }
.route-pain-q,
.routes-pin .route-pain-q {
  padding: 10px 14px; border-left: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--route-color, var(--green)) 13%, var(--white));
  font-size: 20px; line-height: 1.22;
}
.route-card-cta .route-pain-q { background: color-mix(in srgb, var(--dark) 8%, var(--white)); }
@media (min-width: 901px) {
  .routes-pin .route-pain-q { font-size: 18px; padding: 9px 13px; }
  .routes-pin .route-pains { gap: 7px; }
}
@media (max-width: 720px) {
  .route-pain-q, .routes-pin .route-pain-q { font-size: 19px; }
}

/* ==========================================================================
   «4 причины выбрать» (01.10.2026): одна вёрстка на все 4 карточки вместо закреплённого
   таймлайна с разными «фото»-панелями. Номер → заголовок → текст → 3 факта.
   Десктоп 2×2, телефон — столбик. Цвет карточки — акцент номера и цифр фактов.
   ========================================================================== */
.reasons-head { text-align: center; margin-bottom: var(--space-6); }
.reasons-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.reason-card {
  --rc: var(--green-text); --rb: var(--green-bg);
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--white); border: 1px solid var(--border-soft);
  border-top: 4px solid var(--rc);
  border-radius: var(--radius-md); padding: 26px 26px 22px;
  box-shadow: 0 16px 32px -20px rgba(43, 36, 32, .22);
}
.reason-card--red    { --rc: var(--red);    --rb: var(--red-badge-bg); }
.reason-card--purple { --rc: var(--purple); --rb: var(--purple-badge-bg); }
.reason-card--teal   { --rc: var(--teal);   --rb: var(--teal-badge-bg); }
.reason-card--green  { --rc: var(--green-text); --rb: var(--green-bg); }
.reason-num {
  width: 40px; height: 40px; --tile-w: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rc); color: var(--white);
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
}
.reason-title { margin: 2px 0 0; font-size: 21px; line-height: 1.25; }
.reason-text { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.reason-facts {
  list-style: none; margin: auto 0 0; padding: 16px 0 0;
  border-top: 1px dashed var(--border-soft);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.reason-facts li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.reason-facts b {
  font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1.1;
  color: var(--rc); white-space: nowrap;
}
.reason-facts span { font-size: 12.5px; line-height: 1.3; color: var(--dark); }

.reasons-cta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 14px 22px; margin-top: var(--space-6);
}
.reasons-cta-note { font-size: 15px; color: var(--dark); white-space: nowrap; }
.reasons-cta-note s { color: var(--text-faint); margin-right: 2px; }
.reasons-cta-note b { color: var(--red); font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.reasons-license {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none;
  padding: 7px 12px; border-radius: var(--radius-pill); background: var(--bg-alt);
}
.reasons-license .e-icon { width: 16px; height: 16px; }
.reasons-license:hover { color: var(--dark); }

@media (max-width: 720px) {
  .reasons-grid { grid-template-columns: 1fr; gap: 14px; }
  .reason-card { padding: 20px 18px 18px; gap: 10px; }
  .reason-num { width: 34px; height: 34px; --tile-w: 34px; font-size: 16px; }
  .reason-title { font-size: 18px; }
  .reason-text { font-size: 14px; }
  .reason-facts { gap: 8px; padding-top: 12px; }
  .reason-facts b { font-size: 17px; }
  .reason-facts span { font-size: 11.5px; }
  .reasons-cta { flex-direction: column; gap: 10px; }
}

/* ==========================================================================
   «4 причины» — пазл-таймлайн с ЕДИНОЙ панелью справа (01.10.2026).
   Каждая панель: «Причина N из 4» → 3 плитки-пазла (цифра + подпись) → текст шага.
   Перебивает старые правила по индексам ([data-process-photo="0..2"], фото-оверлей
   на телефоне), из-за которых шаги выглядели по-разному.
   ========================================================================== */
.process-section--uniform .process-photo-sticky { height: 400px; }
.process-section--uniform .process-photo.proc-panel {
  padding: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 16px; max-width: 520px;
}
.proc-panel-kicker {
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-faint);
}
.process-section--uniform .proc-panel .proc-stat-grid { margin: 0; max-width: 520px; }
.process-section--uniform .proc-panel .proc-stat { padding: 18px 12px 16px; min-height: 118px; }
.process-section--uniform .proc-panel .proc-stat b { font-size: 32px; margin-top: 4px; white-space: nowrap; }
.process-section--uniform .proc-panel .proc-stat span { font-size: 12px; color: var(--dark); }
.process-section--uniform .proc-panel .proc-panel-text {
  margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); max-width: 500px;
}
.process-section--uniform .proc-panel-cta { margin-top: 4px; }

@media (max-width: 720px) {
  .process-section--uniform .process-photo-sticky,
  .process-section--uniform .process-photo-sticky:has(.process-photo.active) { height: 330px; }
  .process-section--uniform .process-photo.proc-panel {
    position: absolute; inset: 0; display: flex; gap: 10px; justify-content: flex-start; max-width: none;
  }
  .process-section--uniform .proc-panel .proc-stat-grid { grid-template-columns: 1fr; gap: 6px; max-width: none; width: 100%; }
  .process-section--uniform .proc-panel .proc-stat { min-height: 0; padding: 9px 14px; flex-direction: row; justify-content: flex-start; text-align: left; gap: 12px; }
  .process-section--uniform .proc-panel .proc-stat b { font-size: 24px; margin: 0; min-width: 66px; }
  .process-section--uniform .proc-panel .proc-stat span { font-size: 12px; }
  .process-section--uniform .proc-panel .proc-panel-text {
    font-size: 13px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  }
  .process-section--uniform .proc-panel-cta { display: none; }   /* на телефоне есть нижняя панель записи */
}

/* ==========================================================================
   Телефон (01.10.2026): нижняя панель «Диагностика −50%» снята — вместо неё красная строка
   оффера сверху, в том же виде, что на десктопе: текст + «от кандидата наук», цена со
   старой зачёркнутой, кнопка «Записаться». Текст может уйти в 2 строки.
   ========================================================================== */
@media (max-width: 720px) {
  .mobile-cta-bar { display: none !important; }
  .cookie-banner { bottom: 0; }
}
@media (max-width: 700px) {
  .offer-recall { gap: 8px; padding: 7px 10px 7px 12px; }
  .offer-recall-text { white-space: normal; font-size: 12.5px; line-height: 1.2; overflow: visible; min-width: 0; }
  .offer-recall-text-extra { display: inline; }
  .offer-recall-price { flex-direction: column; align-items: flex-start; gap: 0; padding-left: 8px; margin-left: 0; line-height: 1.1; }
  .offer-recall-price s { display: inline; font-size: 11px; }
  .offer-recall-price b { font-size: 14px; white-space: nowrap; }
  .offer-recall-cta {
    padding: 6px 10px; background: rgba(255, 255, 255, .18); font-size: 12px;
  }
  .offer-recall-cta::after { content: none; }
}
@media (max-width: 360px) {
  .offer-recall-text-extra { display: none; }
}

/* Форма записи: неверный телефон подсвечиваем (main.js ставит aria-invalid) */
.booking-form input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 15%, transparent); }
