/* ЖукЛаб — лаборатория электроники и кода
   Шрифты: Geologica (текст и заголовки), Caveat (рукописные заметки). Лицензия SIL OFL. */

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geologica-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geologica-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD, U+20BD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(../fonts/caveat-600-cyrillic.woff2) format('woff2');
  unicode-range: U+0401, U+0410-044F, U+0451;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(../fonts/caveat-600-punct.woff2) format('woff2');
  unicode-range: U+0020-0040, U+00A0, U+00AB, U+00BB, U+2013-2014, U+2026;
}

:root {
  --navy: #000734;
  --text: #232D5C;
  --muted: #586285;
  --green: #00B11A;
  --green-hover: #00C21D;
  --green-ink: #007F12;
  --blue: #0096E6;
  --blue-ink: #006DB3;
  --sky: #EEF7FD;
  --sky-2: #DCEFFB;
  --line: #DCE5EF;
  --paper: #FFFFFF;
  --hole: #C9D5E3;

  /* цвет направления = цвет провода на макетной плате */
  --c-robot: #00B11A;
  --c-electro: #E5484D;
  --c-prog: #0096E6;
  --c-applied: #5B5BD6;
  --c-oge: #F2A20C;
  --c-ege: #F76B15;
  --c-indiv: #000734;

  --font: 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 24px 48px -28px rgba(0, 7, 52, .45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; color: var(--navy); overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
p, li, dd, dt, label, legend, figcaption { overflow-wrap: break-word; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.only-sm { display: inline; }
.only-lg { display: none; }
@media (min-width: 900px) { .only-sm { display: none; } .only-lg { display: inline; } }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.icon {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 120px); }

.h2 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.sub {
  margin: 16px 0 0;
  max-width: 34em;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.45;
  color: var(--muted);
}
.sec-head { margin-bottom: clamp(32px, 5vw, 56px); }

.hand {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.05;
  color: var(--blue-ink);
}

.link {
  font-weight: 600;
  color: var(--blue-ink);
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 20px; height: 20px; }
.btn--green { background: var(--green); color: var(--navy); }
.btn--green:hover { background: var(--green-hover); }
.btn--green:active { background: #00A317; }
.btn--line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--line:hover { background: var(--navy); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--ghost:hover { border-color: #fff; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { height: 100%; display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; flex: none; text-decoration: none; }
.logo__bug { width: 44px; height: auto; }
.logo__word { width: 104px; height: auto; }

.nav { margin-left: auto; }
.nav__list { display: none; }
.nav__extra { display: none; }

.top__phone {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--navy); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.top__phone span { display: none; }
.top__phone .icon { width: 22px; height: 22px; }
.top__cta { display: none; }

.burger {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-right: -8px;
  background: none; border: 0; border-radius: 12px; color: var(--navy);
}
.burger .icon { width: 26px; height: 26px; }

/* мобильное меню */
.nav.is-open {
  display: block;
  position: absolute; top: 100%; left: 0; right: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: #fff;
  overflow-y: auto;
}
.nav.is-open .nav__list { display: block; }
.nav.is-open .nav__list a {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--navy); font-size: 24px; font-weight: 700; text-decoration: none;
}
.nav.is-open .nav__extra { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; }
.nav__phone { flex-basis: 100%; color: var(--navy); font-size: 26px; font-weight: 800; text-decoration: none; }
.nav__social { font-weight: 600; }
body.menu-open { overflow: hidden; }

@media (min-width: 560px) {
  .top__phone span { display: inline; }
  .top__phone .icon { width: 18px; height: 18px; }
}
@media (min-width: 760px) {
  .top__cta { display: inline-flex; }
}
@media (min-width: 1120px) {
  :root { --header-h: 72px; }
  .burger { display: none; }
  .nav { display: block; margin-left: 20px; }
  .nav__list { display: flex; gap: 2px; }
  .nav__list a {
    display: block; padding: 8px 11px; border-radius: 999px;
    color: var(--navy); font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap;
  }
  .nav__list a:hover { background: var(--sky); }
  .nav__list a.is-current { background: var(--sky-2); }
  .logo__bug { width: 48px; }
  .logo__word { width: 116px; }
  .top__phone span { display: none; }
}
@media (min-width: 1200px) {
  .top__phone span { display: inline; }
}
@media (min-width: 1300px) {
  .nav { margin-left: 32px; }
  .nav__list { gap: 4px; }
}

/* ---------- главный экран ---------- */
.hero { padding-block: 20px clamp(56px, 8vw, 104px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.hero__title {
  font-size: clamp(34px, 11vw, 92px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero__lead {
  margin: 22px 0 0;
  max-width: 33em;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text);
}
@media (max-width: 559px) { .hero__poem { display: none; } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__addr {
  display: inline-flex; align-items: flex-start; gap: 8px;
  margin-top: 22px;
  color: var(--muted); font-size: 16px; text-decoration: none;
}
.hero__addr .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--green-ink); }
.hero__addr:hover span { text-decoration: underline; text-underline-offset: .2em; }

.hero__media {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.reel {
  position: relative; margin: 0;
  grid-column: 1; grid-row: 1 / span 2;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--sky-2);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.reel__video { width: 100%; height: 100%; object-fit: cover; }
.reel__toggle {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 7, 52, .55); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.reel__toggle .icon { width: 18px; height: 18px; }
.reel__sound {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--navy);
  font-size: 15px; font-weight: 600;
}
.reel__sound .icon { width: 20px; height: 20px; }

.mascot {
  grid-column: 2; grid-row: 1;
  justify-self: center; align-self: end;
  width: min(100%, 150px);
  padding: 0; border: 0; background: none;
  -webkit-tap-highlight-color: transparent;
}
.mascot__svg { width: 100%; height: auto; overflow: visible; }
.mascot__body { transform-origin: 50% 60%; transform-box: fill-box; }
.mascot .eye { transform-box: fill-box; transform-origin: center; transition: transform .08s ease-in; }
.mascot.is-blink .eye { transform: scaleY(.12); }
.mascot .pupil { transition: transform .12s ease-out; }
.mascot .led { opacity: 0; transition: opacity .25s; }
.mascot.is-lit .led { opacity: 1; }
.mascot.is-buzz .mascot__body { animation: buzz .5s ease-in-out 2; }
@keyframes buzz {
  0%, 100% { transform: rotate(0) translateY(0); }
  20% { transform: rotate(-5deg) translateY(-4%); }
  45% { transform: rotate(4deg) translateY(-7%); }
  70% { transform: rotate(-2deg) translateY(-3%); }
}

.hero__note {
  grid-column: 2; grid-row: 2;
  margin: 0; align-self: start;
  max-width: 210px;
  font-size: 21px;
  transform: rotate(-3deg);
}
.hero__arrow { display: none; }

@media (min-width: 560px) and (max-width: 899px) {
  .hero__media { grid-template-columns: 270px minmax(0, 1fr); max-width: 620px; gap: 20px; }
  .mascot { width: 170px; }
  .hero__note { font-size: 24px; }
}
@media (min-width: 900px) {
  .hero { padding-top: clamp(32px, 4vw, 56px); }
  .hero__title { font-size: clamp(52px, 6.3vw, 92px); }
  .hero__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; }
  .hero__media { display: block; justify-self: end; width: min(100%, 420px); padding-left: 90px; }
  .reel { width: 100%; max-height: calc(100vh - var(--header-h) - 80px); max-height: calc(100svh - var(--header-h) - 80px); }
  .mascot { position: absolute; left: -12px; top: 9%; width: 150px; z-index: 2; }
  .hero__note { position: absolute; left: -96px; bottom: 15%; width: 190px; font-size: 24px; z-index: 2; }
  .hero__arrow {
    display: block; position: absolute; left: 40px; bottom: 9%; width: 84px; z-index: 2;
    fill: none; stroke: var(--blue-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  }
}
@media (min-width: 900px) and (max-width: 1239px) {
  .hero__note, .hero__arrow { display: none; }
}
@media (min-width: 1200px) {
  .hero__media { width: 440px; padding-left: 100px; }
}

/* ---------- возраст: макетная плата ---------- */
.age { background: var(--sky); }
.age__head { margin-bottom: 32px; }

.age__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label num" "slider slider";
  align-items: center;
  gap: 8px 20px;
  max-width: 640px;
  margin-bottom: 24px;
}
@media (min-width: 760px) {
  .age__control { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "label label" "num slider"; gap: 4px 20px; }
}
.age__label { grid-area: label; font-size: 15px; font-weight: 600; color: var(--muted); }
.age__readout { grid-area: num; color: var(--navy); white-space: nowrap; font-size: 22px; font-weight: 600; }
.age__readout b { font-size: 56px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.age__slider { grid-area: slider; display: flex; align-items: center; gap: 10px; }

.round {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--navy); border-radius: 50%;
  background: #fff; color: var(--navy);
  font-size: 24px; font-weight: 600; line-height: 1;
}
.round:hover { background: var(--navy); color: #fff; }

.range {
  --fill: 33%;
  flex: 1 1 auto; width: 0; min-width: 0;
  height: 44px; margin: 0;
  background: transparent;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 8px;
  background: linear-gradient(var(--navy), var(--navy)) 0 / var(--fill) 100% no-repeat, #C9D5E3;
}
.range::-moz-range-track { height: 8px; border-radius: 8px; background: #C9D5E3; }
.range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--navy); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -11px;
  border-radius: 50%; border: 3px solid var(--navy);
  background: radial-gradient(circle, var(--green) 0 5px, #fff 6px);
  box-shadow: 0 4px 10px rgba(0, 7, 52, .25);
}
.range::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%; border: 3px solid var(--navy);
  background: radial-gradient(circle, var(--green) 0 5px, #fff 6px);
}
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--blue); outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 3px solid var(--blue); outline-offset: 3px; }

.board {
  --cols: 13;
  position: relative;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -30px rgba(0, 7, 52, .35);
}
.board__rail {
  position: relative; height: 18px; margin-inline: 4px;
  display: flex; align-items: center; justify-content: space-between;
}
.board__rail::before, .board__rail::after {
  content: ""; position: absolute; left: 22px; right: 22px; height: 2px; border-radius: 2px;
}
.board__rail::before { top: 4px; background: #E5484D; }
.board__rail::after { bottom: 4px; background: var(--blue); }
.board__rail i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1; width: 14px; text-align: center; }

.board__scale { display: grid; grid-template-columns: 1fr; margin-top: 6px; }
.board__corner { display: none; }
.board__ages { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.board__ages button {
  width: 100%; height: 30px; padding: 0; white-space: nowrap; letter-spacing: -.02em;
  border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.board__ages button:hover { color: var(--navy); background: var(--sky); }
@media (max-width: 399px) { .board__ages button { font-size: 11px; letter-spacing: -.04em; } }
.board__ages button.is-current { background: var(--navy); color: #fff; }

.board__rows { margin: 6px 0 8px; }
.wire { padding: 8px 0 4px; }
.wire + .wire { border-top: 1px dashed #E3EAF2; }
.wire__label { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 2px; }
.wire__led {
  flex: none; width: 12px; height: 12px; border-radius: 50%;
  background: #D2DAE5; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
  transition: background-color .25s, box-shadow .25s;
}
.wire__name { font-size: 15px; font-weight: 600; color: var(--muted); line-height: 1.2; transition: color .25s; }
.wire__age { margin-left: auto; padding-left: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }

.wire__track {
  position: relative; display: block; height: 30px;
  background-image:
    radial-gradient(circle, var(--hole) 0 2px, transparent 2.6px),
    radial-gradient(circle, var(--hole) 0 2px, transparent 2.6px);
  background-size: calc(100% / var(--cols)) 10px, calc(100% / var(--cols)) 10px;
  background-position: 0 3px, 0 calc(100% - 3px);
  background-repeat: repeat-x;
}
.wire__track::before {
  content: ""; position: absolute; top: -6px; bottom: -6px;
  left: calc((var(--age) - 5) * 100% / var(--cols));
  width: calc(100% / var(--cols));
  border-radius: 8px;
  background: rgba(0, 150, 230, .12);
  transition: left .2s ease;
}
.wire__line {
  position: absolute; top: 50%; height: 10px; margin-top: -5px;
  left: calc((var(--from) - 5) * 100% / var(--cols) + 100% / var(--cols) / 2 - 3px);
  width: calc((var(--to) - var(--from)) * 100% / var(--cols) + 6px);
  min-width: 14px;
  border-radius: 6px;
  background: #CBD4E0;
  box-shadow: inset 0 -3px 0 rgba(0, 7, 52, .14);
  transition: background-color .25s, opacity .25s;
}
.wire__line::before, .wire__line::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 2px; background: #9AA6B5; box-shadow: 0 0 0 2px #fff;
}
.wire__line::before { left: -5px; }
.wire__line::after { right: -5px; }
.wire[data-to="17"] .wire__line::after { display: none; }
.wire[data-to="17"] .wire__line { border-top-right-radius: 2px; border-bottom-right-radius: 2px; width: calc((var(--to) - var(--from) + 1) * 100% / var(--cols) - 100% / var(--cols) / 2 + 3px); }

.wire.is-on .wire__line { background: var(--c); }
.wire.is-on .wire__led { background: var(--c); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 5px var(--c), 0 0 16px 2px var(--c); }
.wire.is-on .wire__name { color: var(--navy); }

@media (min-width: 760px) {
  .board { padding: 14px 22px; }
  .board__scale { grid-template-columns: 240px 1fr; }
  .board__corner { display: block; }
  .wire { display: grid; grid-template-columns: 240px 1fr; align-items: center; padding: 7px 0; }
  .wire__label {
    display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; align-items: center;
    padding-right: 16px;
  }
  .wire__name { font-size: 16px; }
  .wire__age { grid-column: 2; margin: 1px 0 0; padding: 0; }
  .wire__track { height: 36px; }
  .board__ages button { font-size: 14px; }
}
@media (min-width: 1100px) {
  .board__scale, .wire { grid-template-columns: 290px 1fr; }
}

.match {
  margin-top: 28px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  background: var(--navy);
  color: #E9F2FB;
}
.match__title { color: #fff; font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.015em; }
.match__list { display: grid; gap: 2px; margin: 18px 0 22px; }
.match__item {
  display: grid; grid-template-columns: 12px 1fr; gap: 4px 14px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.match__item::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 12px var(--c); transform: translateY(1px);
}
.match__name { font-weight: 700; color: #fff; font-size: 18px; }
.match__info { grid-column: 2; font-size: 15px; color: #B9C6DE; }
.match__more {
  grid-column: 2; justify-self: start;
  padding: 0; border: 0; background: none;
  color: #8FD3FF; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: .2em;
}
.match__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.match__note { margin: 0; color: #B9C6DE; font-size: 15px; max-width: 30em; }

@media (min-width: 760px) {
  .match__list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .match__item { grid-template-columns: 12px 1fr auto; }
  .match__info { grid-column: 2; }
  .match__more { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* ---------- направления ---------- */
.dirs__tabs {
  display: flex; gap: 6px;
  margin: 0 calc(-1 * var(--gutter)) 28px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.dirs__tabs::-webkit-scrollbar { display: none; }
.dtab {
  position: relative; flex: none; scroll-snap-align: start;
  display: grid; gap: 2px; text-align: left;
  padding: 12px 16px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff;
}
.dtab::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 8px; height: 4px; border-radius: 4px;
  background: var(--c); opacity: .28;
}
.dtab__name { color: var(--navy); font-weight: 700; font-size: 16px; line-height: 1.2; white-space: nowrap; }
.dtab__age { color: var(--muted); font-size: 14px; }
.dtab:hover { border-color: #BFCBDA; }
.dtab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); }
.dtab[aria-selected="true"] .dtab__name { color: #fff; }
.dtab[aria-selected="true"] .dtab__age { color: #B9C6DE; }
.dtab[aria-selected="true"]::after { opacity: 1; }

@media (min-width: 900px) {
  .dirs__tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 32px; padding: 0; overflow: visible; }
  .dtab { padding: 16px 18px 20px; }
  .dtab__name { white-space: normal; }
}

.dir { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.dir[hidden] { display: none; }
.dir__media {
  display: block; position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--sky);
  aspect-ratio: 4 / 3;
}
.dir__media img { width: 100%; height: 100%; object-fit: cover; }
.dir__icon { width: 48px; height: 48px; fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.dir__title { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.dir__tagline { margin: 10px 0 18px; font-size: 20px; font-weight: 600; color: var(--navy); }
.dir__body > p:not(.dir__tagline) { max-width: 36em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.tags li {
  padding: 5px 12px; border-radius: 999px;
  background: var(--sky); color: var(--navy);
  font-size: 14px; font-weight: 500;
}
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 28px; border-top: 1px solid var(--line);
}
.facts div { padding: 14px 12px 0 0; }
.facts div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { font-size: clamp(19px, 2vw, 24px); font-weight: 800; color: var(--navy); letter-spacing: -.01em; white-space: nowrap; }
.facts dd small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.dir__body .btn { white-space: normal; }

@media (min-width: 900px) {
  .dir { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
  .dir__media { aspect-ratio: 4 / 5; }
}

/* разминка ОГЭ/ЕГЭ */
.quiz {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(22px, 4vw, 40px);
  background: var(--navy); color: #E9F2FB;
  aspect-ratio: auto;
}
.quiz__label { margin: 0 0 16px; font-weight: 600; color: #fff; font-size: 18px; }
.quiz__code {
  margin: 0 0 22px; padding: 18px 20px;
  border-radius: var(--r-md);
  background: #0D1752;
  font-family: var(--mono); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6;
  color: #E9F2FB; overflow-x: auto;
}
.quiz__code .kw { color: #FF9F6B; }
.quiz__code .f { color: #8FD3FF; }
.quiz__code .n { color: #7EE787; }
.quiz__code .k { color: #E9F2FB; }
.quiz__form { display: flex; gap: 10px; }
.quiz__input {
  width: 120px; min-height: 44px; padding: 0 14px;
  border: 2px solid rgba(255, 255, 255, .35); border-radius: 12px;
  background: transparent; color: #fff; font-size: 18px; font-weight: 600;
}
.quiz__input::placeholder { color: #8D9BBA; }
.quiz__input:focus { outline: none; border-color: var(--blue); }
.quiz__result { margin: 14px 0 0; min-height: 1.5em; font-size: 16px; color: #B9C6DE; }
.quiz__result.is-ok { color: #7EE787; }
@media (min-width: 900px) { .dir--exam .dir__media { aspect-ratio: auto; min-height: 460px; } }

/* ---------- мини-игра ---------- */
.game-sec { background: var(--sky); }
.game__intro { margin-bottom: 32px; }
.game__stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.game__field {
  padding: 14px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -30px rgba(0, 7, 52, .35);
}
.game__grid {
  --gc: 6; --gr: 5;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--gc), minmax(0, 1fr));
  gap: 6px;
}
.cell {
  position: relative; aspect-ratio: 1 / 1;
  border-radius: 10px;
  background:
    radial-gradient(circle, var(--hole) 0 2px, transparent 2.6px) 0 0 / 33.33% 33.33%,
    #F6F9FC;
}
.cell--chip { background: #F6F9FC; }
.cell--chip::before {
  content: ""; position: absolute; inset: 22% 14%;
  border-radius: 6px; background: var(--navy);
  box-shadow: -5px 0 0 -2px #9AA6B5, 5px 0 0 -2px #9AA6B5;
}
.cell--chip::after {
  content: ""; position: absolute; left: 22%; top: 30%; width: 7px; height: 7px; border-radius: 50%; background: #3B4775;
}
.cell--goal::before {
  content: ""; position: absolute; inset: 24%;
  border-radius: 50% 50% 46% 46%;
  background: #E8EDF3; border: 3px solid #AEB9C8;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.cell--goal::after {
  content: ""; position: absolute; left: 38%; right: 38%; bottom: 14%; height: 12%;
  border-radius: 0 0 4px 4px; background: #9AA6B5;
}
.cell--goal.is-lit::before { background: #FFE066; border-color: #F2A20C; box-shadow: 0 0 0 6px rgba(255, 212, 59, .35), 0 0 28px 8px rgba(255, 212, 59, .8); }
.cell--start { background: radial-gradient(circle, var(--hole) 0 2px, transparent 2.6px) 0 0 / 33.33% 33.33%, #E3F4FF; }
.cell--trail { background: radial-gradient(circle, var(--hole) 0 2px, transparent 2.6px) 0 0 / 33.33% 33.33%, #DDF5E1; }
.cell--bump { animation: bump .4s; }
@keyframes bump { 0%, 100% { box-shadow: none; } 50% { box-shadow: inset 0 0 0 3px #E5484D; } }

.bug {
  position: absolute; left: 0; top: 0;
  pointer-events: none;
  transition: transform .34s cubic-bezier(.4, .1, .3, 1);
  will-change: transform;
}
.bug img { width: 100%; height: 100%; padding: 8%; }

.game__panel { display: flex; flex-direction: column; gap: 16px; }
.game__level { margin: 0; font-weight: 600; color: var(--muted); }
.game__level b { color: var(--navy); }
.game__palette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cmd {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 64px; padding: 6px 8px;
  border: 0; border-radius: 10px;
  color: var(--navy); font-weight: 700; font-size: 15px;
  box-shadow: inset 0 -3px 0 rgba(0, 7, 52, .14);
}
@media (min-width: 480px) {
  .game__palette { display: flex; flex-wrap: wrap; }
  .cmd { flex-direction: row; gap: 8px; min-height: 48px; padding: 0 18px 0 14px; font-size: 16px; }
}
.cmd .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.cmd--fwd { background: #B8E3FB; }
.cmd--left, .cmd--right { background: #BDEFC6; }
.cmd:hover { filter: brightness(.96); }
.cmd:active { transform: translateY(1px); }
.cmd[disabled] { opacity: .45; cursor: not-allowed; }

.game__prog {
  padding: 14px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--line);
  min-height: 116px;
}
.game__prog-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.game__program { display: flex; flex-wrap: wrap; gap: 6px; counter-reset: step; }
.game__program li { counter-increment: step; }
.pblock {
  display: inline-flex; align-items: center; gap: 4px;
  height: 38px; padding: 0 10px 0 8px;
  border: 0; border-radius: 8px;
  color: var(--navy); font-size: 14px; font-weight: 700;
  box-shadow: inset 0 -3px 0 rgba(0, 7, 52, .14);
}
.pblock::before { content: counter(step); font-size: 11px; font-weight: 600; color: rgba(0, 7, 52, .55); margin-right: 2px; }
.pblock .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.pblock--F { background: #B8E3FB; }
.pblock--L, .pblock--R { background: #BDEFC6; }
.pblock.is-active { outline: 3px solid var(--navy); outline-offset: 1px; }
.pblock.is-error { outline: 3px solid #E5484D; outline-offset: 1px; }
.game__empty { margin: 0; color: var(--muted); font-size: 15px; }
.game__controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.game__controls .btn { min-width: 0; padding: 0 10px; gap: 6px; white-space: normal; }
@media (min-width: 480px) { .game__controls { display: flex; flex-wrap: wrap; } .game__controls .btn { padding: 0 26px; } }
.game__status { margin: 0; min-height: 1.55em; font-weight: 600; color: var(--navy); }
.game__status.is-ok { color: var(--green-ink); }
.game__status.is-bad { color: #C2272D; }
.game__next { align-self: flex-start; }

@media (min-width: 900px) {
  .game__stage { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; align-items: start; }
  .game__field { padding: 18px; }
  .game__grid { gap: 8px; }
}

/* ---------- цены ---------- */
.prices { border-top: 1px solid var(--line); }
.price {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas: "dial what" "dial sum";
  gap: 4px 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
/* кружок = абонемент: 4 дуги = 4 занятия, длина дуги = длительность (четверть круга = 2 часа) */
.dial { grid-area: dial; position: relative; width: 56px; height: 56px; align-self: start; }
.dial svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.dial__bg { fill: none; stroke: #E6ECF3; stroke-width: 6; stroke-dasharray: 22 3; stroke-dashoffset: -1.5; }
.dial__fg { fill: none; stroke: var(--c); stroke-width: 6; stroke-dashoffset: -1.5; }
.dial b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; letter-spacing: -.01em;
}
.dial b.dial__min { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; font-size: 14px; }
.dial b.dial__min small { font-size: 9px; font-weight: 600; margin-top: 1px; }
.dial--count .dial__bg { stroke: var(--c); stroke-width: 3; }
.dial--count b { font-size: 12px; }
.dial--mk .dial__bg { stroke: var(--navy); stroke-width: 2; stroke-dasharray: 2 4; stroke-dashoffset: 0; }
.dial__icon {
  position: absolute; left: 50%; top: 50%; width: 24px !important; height: 24px !important; margin: -12px 0 0 -12px;
  transform: none !important; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.price__what { grid-area: what; }
.price__what h3 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.price__what p { margin: 4px 0 0; color: var(--muted); font-size: 16px; max-width: 34em; }
.price__sum { grid-area: sum; margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.price__sum b { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; white-space: nowrap; }
.price__sum span { font-size: 14px; color: var(--muted); white-space: nowrap; }

@media (min-width: 760px) {
  .price {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas: "dial what sum";
    align-items: center;
    gap: 0 28px;
    padding: 24px 0;
  }
  .dial, .dial svg { width: 64px; height: 64px; }
  .dial b { font-size: 14px; }
  .price__sum { margin: 0; flex-direction: column; align-items: flex-end; gap: 0; text-align: right; }
  .price__sum b { font-size: 30px; }
}

/* ---------- особые дети ---------- */
.special { padding-top: 0; }
.special__in {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px;
  padding: clamp(32px, 6vw, 72px) clamp(22px, 5vw, 64px);
  background: var(--sky);
  border-radius: var(--r-xl);
}
.special__lead { margin: 18px 0 12px; font-size: clamp(20px, 2vw, 24px); font-weight: 600; color: var(--navy); max-width: 26em; }
.special__text > p:not(.special__lead) { max-width: 34em; }
.special__price { font-weight: 600; color: var(--navy); }
.special__art { display: grid; place-items: center; }
.special__art img { width: min(60%, 280px); transform: rotate(-8deg); }
@media (min-width: 640px) {
  .special__in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; }
  .special__art img { width: min(100%, 300px); }
}

/* ---------- мастер-классы ---------- */
.masters { background: var(--navy); color: #D6E1F2; }
.masters .h2 { color: #fff; }
.masters__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: clamp(36px, 5vw, 64px); }
.masters__lead { margin: 20px 0 14px; font-size: clamp(19px, 1.8vw, 22px); color: #fff; line-height: 1.45; max-width: 30em; }
.masters__text > p:not(.masters__lead) { max-width: 34em; }
.masters__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.masters__video {
  position: relative; display: block;
  width: min(64%, 260px); justify-self: start;
  padding: 0; border: 0; border-radius: var(--r-xl);
  overflow: hidden; background: #0D1752;
  aspect-ratio: 9 / 16;
}
.masters__video img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.masters__video:hover img { transform: scale(1.03); }
.masters__play {
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--green); color: var(--navy);
  box-shadow: 0 0 0 10px rgba(0, 177, 26, .25);
}
.masters__play .icon { width: 30px; height: 30px; margin-left: 4px; }
.masters__dur {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 7, 52, .7); color: #fff; font-size: 14px; font-weight: 500;
}
@media (min-width: 640px) {
  .masters__top { grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 40px; }
  .masters__video { justify-self: end; width: 100%; }
}
@media (min-width: 900px) {
  .masters__top { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; }
  .masters__video { width: min(100%, 320px); }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 10px;
}
.gallery__item { border-radius: var(--r-md); overflow: hidden; background: #0D1752; }
.gallery__item a { display: block; height: 100%; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery__item a:hover img { transform: scale(1.035); }
.gallery__item--big { grid-column: span 2; grid-row: span 2; }
.gallery__item--tall { grid-row: span 2; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 14px; }
}
@media (min-width: 1100px) {
  .gallery { grid-auto-rows: 210px; }
}

/* ---------- отзывы ---------- */
.reviews { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.review {
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--r-xl);
  background: var(--sky);
}
.review__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.stars { display: inline-flex; gap: 2px; color: #F2A20C; }
.star { width: 20px; height: 20px; }
.review__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--navy);
}
.review__tag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px #fff; }
.review__text { margin: 0; flex: 1; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--navy); }
.review__text p { margin: 0; }
.review__who { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0; padding-top: 14px; border-top: 1px solid var(--sky-2); color: var(--muted); font-size: 15px; }
.review__who b { color: var(--navy); }
.reviews-more {
  display: grid; gap: 12px 24px; align-items: center;
  margin-top: 24px; padding: 20px 0 0;
}
.reviews-more p { margin: 0; color: var(--text); }
.reviews-more__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reviews-more .send-status { grid-column: 1 / -1; }
@media (min-width: 900px) { .reviews-more { grid-template-columns: minmax(0, 1fr) auto; } }

.send-status { margin: 0; font-size: 15px; font-weight: 600; color: var(--navy); }
.send-status:empty { display: none; }
.send-status.is-ok { padding: 12px 14px; border-radius: var(--r-sm); background: #E3F7E7; color: var(--green-ink); }
.send-status.is-bad { padding: 12px 14px; border-radius: var(--r-sm); background: #FDECEC; color: #B4232A; }
.linkbtn {
  padding: 0; border: 0; background: none;
  color: var(--blue-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .18em;
}

/* ---------- запись и контакты ---------- */
.enroll { background: var(--sky); }
.enroll__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.steps { display: grid; gap: 12px; margin: 28px 0; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: grid; grid-template-columns: 36px 1fr; gap: 0 12px; align-items: baseline;
}
.steps li::before {
  content: counter(s);
  grid-row: span 2;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: 16px;
}
.steps b { color: var(--navy); font-size: 17px; }
.steps span { color: var(--muted); font-size: 15px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

.composer {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: 0 30px 60px -40px rgba(0, 7, 52, .35);
}
.composer legend, .field label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--navy); }
.field__opt { font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--navy); font-size: 15px; font-weight: 500;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover span { border-color: #AFC0D3; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.composer__row { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .composer__row { grid-template-columns: 160px minmax(0, 1fr); } }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--navy); font-size: 17px;
}
.field textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.field select {
  -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000734' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 12px center / 20px no-repeat;
  padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 150, 230, .2); }
.field input::placeholder, .field textarea::placeholder { color: #6B7591; }

.composer__preview-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--navy); }
.composer__msg {
  margin: 0; padding: 14px 16px;
  border-radius: 18px 18px 18px 6px;
  background: #E3F7E7; color: var(--navy);
  font-size: 16px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}
.composer__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.composer__actions .btn { flex: 1 1 220px; }
.composer__hint { margin: 0; color: var(--muted); font-size: 14px; }

.enroll__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.contacts { padding: clamp(20px, 5vw, 26px); border-radius: var(--r-xl); background: #fff; }
.contacts__phone { display: inline-block; color: var(--navy); font-size: clamp(24px, 7vw, 32px); font-weight: 800; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.contacts__addr { display: flex; gap: 10px; margin: 14px 0 18px; color: var(--text); }
.contacts__addr .icon { margin-top: 3px; color: var(--green-ink); }
.contacts__links { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts__links a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--sky); color: var(--navy); font-weight: 600; text-decoration: none;
}
.contacts__links a:hover { background: var(--sky-2); }
.contacts__links a.contacts__main { background: var(--green); color: var(--navy); }
.contacts__links a.contacts__main:hover { background: var(--green-hover); }
.contacts__links .icon { width: 18px; height: 18px; }

.map { border-radius: var(--r-xl); overflow: hidden; background: #fff; }
.map__cover { position: relative; height: 220px; display: grid; place-items: end center; padding-bottom: 18px; background: #E6F1F8; }
.map__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__road { fill: none; stroke: #fff; stroke-width: 14; stroke-linecap: round; }
.map__road--thin { stroke-width: 7; }
.map__dot { fill: var(--green); stroke: #fff; stroke-width: 4; }
.map__cover .btn { position: relative; background: #fff; }
.map__cover .btn:hover { background: var(--navy); }
.map iframe { display: block; width: 100%; height: 300px; border: 0; }
.map__links { margin: 0; padding: 14px 20px; }

.lab { margin: 0; }
.lab__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab__photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); aspect-ratio: 1 / 1; }
.lab__photos img:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
.lab figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

@media (min-width: 1000px) {
  .enroll__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .enroll__side { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* ---------- подвал ---------- */
.foot { position: relative; padding-bottom: calc(28px + env(safe-area-inset-bottom)); background: #fff; }
.foot__city { width: 100%; height: clamp(80px, 10vw, 150px); margin-top: -1px; }
@media (max-width: 759px) { .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
.foot__b { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foot__t { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.foot__in { display: grid; gap: 24px; padding-top: 28px; grid-template-columns: minmax(0, 1fr); }
.foot__brand img { width: 190px; }
.foot__brand p { margin: 8px 0 0; color: var(--muted); }
.foot__slogan { font-size: 28px; margin-top: 10px !important; color: var(--green-ink) !important; }
.foot__phone { color: var(--navy); font-size: 22px; font-weight: 800; text-decoration: none; }
.foot__col p { margin: 6px 0 0; color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot__links a { color: var(--navy); font-weight: 500; }
.foot__copy { margin: 0; color: var(--muted); font-size: 14px; }
.foot__legal { padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.foot__legal p { margin: 0 0 4px; }
.foot__legal a { color: var(--muted); margin-right: 18px; }
.foot__legal a:hover { color: var(--navy); }
@media (min-width: 900px) {
  .foot__in { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
  .foot__links { flex-direction: column; }
  .foot__legal, .foot__copy { grid-column: 1 / -1; }
}

/* ---------- нижняя панель (телефон) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .3s ease;
}
.dock .btn { min-width: 0; min-height: 50px; padding: 0 10px; gap: 8px; }
.dock.is-visible { transform: none; }
@media (min-width: 760px) { .dock { display: none; } }

/* ---------- модальные окна ---------- */
.modal {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
}
.modal::backdrop { background: rgba(0, 4, 30, .88); }
.modal[open] { display: grid; place-items: center; }
.modal__box { position: relative; height: min(88vh, 900px); height: min(88svh, 900px); aspect-ratio: 9 / 16; max-width: 92vw; }
.modal__video { width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: var(--r-lg); }
.modal__close {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 2;
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: #fff; color: var(--navy);
}
.lightbox { margin: 0; max-width: 92vw; display: grid; justify-items: center; gap: 12px; }
.lightbox__img { max-width: 92vw; max-height: 80vh; max-height: 80svh; width: auto; height: auto; border-radius: var(--r-md); object-fit: contain; }
.lightbox__cap { color: #D6E1F2; font-size: 15px; text-align: center; max-width: 40em; }
.lightbox__nav {
  position: fixed; top: 50%; z-index: 2;
  width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy);
}
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
@media (max-width: 640px) {
  .lightbox__nav { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; }
  .lightbox__nav--prev { left: calc(50% - 64px); }
  .lightbox__nav--next { right: calc(50% - 64px); }
}

/* ---------- уменьшенная анимация ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
