/*
 * Sputnik shared components — layout container, buttons, photo placeholder,
 * section base. Section-specific styles are appended below as sections are built.
 * Linked once in the theme head (keeps request count low — research R15).
 */

/* Layout container */
.sputnik-container {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Skip link (checklist C3 / WCAG 2.4.1): off-screen until focused, then a fixed
   high-contrast pill so keyboard users can jump straight to the content. Fixed
   navy/white so it stays visible over any section or accessibility scheme. */
.sputnik-skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  background: #012648;
  color: #ffffff;
  border-radius: var(--r-button);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease;
}
.sputnik-skip:focus { top: 12px; }

/* Headings use the serif display face */
.sputnik-h1,
.sputnik-h2,
.sputnik-h3 {
  font-family: var(--font-serif);
  color: var(--c-heading);
  line-height: var(--lh-heading);
  margin: 0;
}
.sputnik-h1 { font-size: 3em; }
.sputnik-h2 { font-size: 2.1em; }
.sputnik-h3 { font-size: 1.2em; }

/* Amber underline accent under a section heading (handoff §5) */
.sputnik-h2--accent::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 16px;
  background: var(--c-sun);
  border-radius: var(--r-pill);
}

/* Centered section head (Advantages, Achievements): center text + underline */
.sputnik-heading-center { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.sputnik-heading-center .sputnik-h2--accent::after { margin-inline: auto; }

/* Left section head with an "all →" link on the right (News, Gallery) */
.sputnik-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.sputnik-section-head__link { font-weight: 700; white-space: nowrap; }

/* Dark placeholder variant — portrait/map on navy sections */
.sputnik-ph--dark {
  background-color: var(--c-navy-2);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.06) 10px,
    rgba(255, 255, 255, 0.06) 12px
  );
  color: #9db9c9;
}

/* Buttons */
.sputnik-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-button);
  font-weight: 700;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}
.sputnik-btn--primary { background: var(--c-btn-bg); color: var(--c-btn-fg); }
.sputnik-btn--primary:hover { background: var(--c-btn-bg-hover); color: var(--c-btn-fg); text-decoration: none; }
.sputnik-btn--outline { background: transparent; color: var(--c-btn-line); border-color: var(--c-btn-line); }
.sputnik-btn--outline:hover { background: var(--c-btn-line); color: var(--c-btn-fg); text-decoration: none; }
.sputnik-btn--cta { background: var(--c-sun); color: #3a2400; }
.sputnik-btn--cta:hover { background: var(--c-sun-deep); color: #fff; text-decoration: none; }

/* Photo placeholder (Sputnik::PlaceholderHelper) */
.sputnik-ph {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  width: 100%;
  height: 100%;
  color: var(--c-soft);
  background-color: var(--c-bg-blue);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 9px,
    rgba(1, 38, 72, 0.07) 9px,
    rgba(1, 38, 72, 0.07) 11px
  );
  border-radius: var(--r-card);
}
.sputnik-ph__label {
  /* Centre the caption in the box regardless of the container's display: some
   * placeholders inherit an image utility class (e.g. .sputnik-hero__img) whose
   * display:block overrides .sputnik-ph's flex centering. Absolute centering is
   * immune to that. */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 24px);
  text-align: center;
  font-size: 0.85em;
  font-family: var(--font-sans);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--r-pill);
}

/* WYSIWYG-кадр фотографии в iframe page builder (спека 015). Элементы создаёт
   photo_frame_controller только в preview; на публичной странице этих классов
   нет. Слой выше editor-overlay Spree (1088–1090), иначе штатный оверлей ловит
   мышь раньше поверхности кадра. */
.sputnik-photo-frame-trigger {
  position: absolute;
  z-index: 1092;
  transform: translateX(-100%);
  padding: 7px 12px;
  border: 2px solid #fff;
  border-radius: var(--r-button);
  background: var(--c-navy);
  color: #fff;
  box-shadow: 0 3px 12px rgb(0 0 0 / 24%);
  font: 700 14px/1 var(--font-sans);
  cursor: pointer;
}
.sputnik-photo-frame-trigger:hover,
.sputnik-photo-frame-trigger:focus-visible { background: var(--c-teal-ink); color: #fff; }

.sputnik-photo-frame-editing .editor-overlay { pointer-events: none !important; }
.sputnik-photo-frame-surface {
  position: absolute;
  z-index: 1093;
  border: 3px solid var(--c-sun);
  border-radius: 4px;
  outline: 100vmax solid rgb(1 38 72 / 24%);
  outline-offset: -3px;
  cursor: grab;
  touch-action: none;
}
.sputnik-photo-frame-surface.is-dragging { cursor: grabbing; }
.sputnik-photo-frame-surface:focus-visible { border-color: #fff; box-shadow: 0 0 0 3px var(--c-sun); }

.sputnik-photo-frame-toolbar {
  position: absolute;
  z-index: 1094;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: min(620px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  background: #fff;
  color: var(--c-ink);
  box-shadow: 0 10px 30px rgb(1 38 72 / 22%);
  font: 14px/1.35 var(--font-sans);
}
.sputnik-photo-frame-toolbar__hint {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-weight: 700;
}
.sputnik-photo-frame-toolbar__zoom {
  display: grid;
  grid-template-columns: auto minmax(120px, 220px) 48px;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.sputnik-photo-frame-toolbar__zoom input { accent-color: var(--c-teal-ink); }
.sputnik-photo-frame-toolbar__zoom output { font-variant-numeric: tabular-nums; }
.sputnik-photo-frame-toolbar__actions { display: flex; gap: 8px; }
.sputnik-photo-frame-toolbar button {
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-button);
  background: var(--c-bg-soft);
  color: var(--c-heading);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sputnik-photo-frame-toolbar button:hover { border-color: var(--c-teal-ink); }
.sputnik-photo-frame-toolbar button:disabled { cursor: wait; opacity: .6; }
.sputnik-photo-frame-toolbar .sputnik-photo-frame-toolbar__save {
  border-color: var(--c-teal-ink);
  background: var(--c-teal-ink);
  color: #fff;
}
.sputnik-photo-frame-toolbar__status {
  flex-basis: 100%;
  min-height: 1.35em;
  color: #8b2c20;
  text-align: center;
}

@media (max-width: 600px) {
  .sputnik-photo-frame-toolbar__zoom {
    grid-template-columns: 1fr 48px;
    width: 100%;
  }
  .sputnik-photo-frame-toolbar__zoom span { grid-column: 1 / -1; }
  .sputnik-photo-frame-toolbar__zoom input { width: 100%; }
}

/* Section vertical rhythm */
.sputnik-section { padding-block: 64px; }
.sputnik-section--soft { background: var(--c-bg-soft); }
.sputnik-section--navy { background: var(--c-navy); color: var(--c-white); }
.sputnik-section--navy .sputnik-h2,
.sputnik-section--navy .sputnik-h3 { color: var(--c-white); }


/* ============================================================
 * Header (SputnikHeader) — announcement marquee, sticky bar,
 * desktop menu, mobile burger overlay. Breakpoints 1180 / 1024.
 * ============================================================ */
.sputnik-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-white);
  /* По той же колонке, что всё остальное: линия и тень шапки не должны уходить
     за края содержимого (решение владельца 2026-08-03). */
  max-width: var(--container);
  margin-inline: auto;
}

/* Announcement marquee */
/* Бегущая строка объявлений — под навбаром (US2). Движение считает
 * marquee_controller: скорость в px/сек, дубли набора, обёртка позиции. CSS
 * отвечает только за клип вьюпорта и зазоры.
 *
 * Зазор — padding-inline НА ЭЛЕМЕНТАХ, а не gap трека: gap ставится между
 * элементами, но не между последним и первым клоном, и на стыке цикла
 * появлялся бы разрыв в один зазор. */
.sputnik-announce {
  background: var(--c-navy-2);
  color: #eaf4f8;
  overflow: hidden;
  font-size: 0.82em;
  /* Строка живёт в той же колонке, что заголовки и меню (решение владельца
     2026-08-03): полоса не тянется от края до края, когда всё остальное на
     странице держит поля. */
  max-width: var(--container);
  margin-inline: auto;
}
.sputnik-announce__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  padding-block: 7px;
  will-change: transform;
}
.sputnik-announce__item {
  display: inline-block;
  padding-inline: 2rem;
  color: inherit;
  text-decoration: none;
}
a.sputnik-announce__item:hover,
a.sputnik-announce__item:focus { color: var(--c-sun); text-decoration: underline; }

/* «Уменьшить движение»: контроллер не запускает анимацию, а строка перестаёт
 * быть однострочной — иначе объявления, не влезшие во вьюпорт, были бы
 * обрезаны и недоступны. */

/* Sticky bar (prototype: border-bottom line + soft shadow, 10px padding) */
.sputnik-bar { box-shadow: var(--sh-header); border-bottom: 1px solid var(--c-line); }
.sputnik-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 10px;
}
.sputnik-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--c-heading); flex: none; min-width: 0; }
.sputnik-logo__mark { height: 44px; width: auto; flex: none; }
.sputnik-logo__word { display: block; line-height: 1.02; border-left: 1px solid var(--c-line); padding-left: 12px; }
.sputnik-logo__title { display: block; font-family: var(--font-serif); font-weight: 700; font-size: 1.1em; color: var(--c-heading); white-space: nowrap; }
.sputnik-logo__sub { display: block; font-size: 0.62em; letter-spacing: 0.13em; text-transform: uppercase; color: #76601f; white-space: nowrap; }
.sputnik-logo:hover { text-decoration: none; }

/* Desktop nav — right-aligned group (prototype: margin-left auto) */
.sputnik-nav { margin-left: auto; display: flex; align-items: center; gap: 0; }
.sputnik-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 9px 10px;
  color: var(--c-heading);
  font-weight: 700;
  font-size: 0.86em;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--r-button);
}
.sputnik-nav__link:hover { background: var(--c-bg-soft); color: var(--c-heading); text-decoration: none; }

/* Подменю раздела «Сведения об ОО» (14 подразделов, состав нормативный).
   Раскрытие — hover для мыши и :focus-within для клавиатуры: Tab на
   родительский пункт открывает список, следующий Tab уводит в него. Своего
   переключателя нет намеренно — меньше кода и работает без JS. */
.sputnik-nav__group { position: relative; }
.sputnik-nav__caret { margin-left: 5px; font-size: 0.8em; color: var(--c-teal); }
.sputnik-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 90;
  min-width: 320px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  box-shadow: 0 12px 32px rgba(1, 38, 72, 0.14);
  /* visibility, а не display: скрытый список остаётся в потоке для поиска и
     переходит по opacity без скачка */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.sputnik-nav__group:hover .sputnik-submenu,
.sputnik-nav__group:focus-within .sputnik-submenu { visibility: visible; opacity: 1; }
.sputnik-submenu__link {
  display: block;
  padding: 8px 12px;
  color: var(--c-heading);
  font-size: 0.86em;
  font-weight: 400;
  text-decoration: none;
  border-radius: var(--r-button);
}
.sputnik-submenu__link:hover,
.sputnik-submenu__link:focus { background: var(--c-bg-soft); text-decoration: none; }

/* Bar actions */
.sputnik-bar__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.sputnik-phone { font-family: var(--font-serif); font-weight: 700; font-size: 0.94em; color: var(--c-heading); text-decoration: none; white-space: nowrap; }
.sputnik-phone:hover { color: var(--c-teal-ink); text-decoration: none; }
.sputnik-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  background: var(--c-white); color: var(--c-heading);
  border: 1px solid var(--c-line); border-radius: var(--r-button); cursor: pointer;
}
.sputnik-iconbtn:hover { background: var(--c-bg-soft); }
.sputnik-burger { display: none; }

/* Mobile overlay */
.sputnik-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--c-navy); color: var(--c-white);
  display: flex; flex-direction: column;
  padding-block: 20px;
  overflow-y: auto;
}
.sputnik-overlay[hidden] { display: none; }
.sputnik-overlay__head { display: flex; align-items: center; justify-content: space-between; }
.sputnik-overlay__head .sputnik-logo__mark { height: 40px; }
.sputnik-overlay__nav { display: flex; flex-direction: column; gap: 6px; margin-top: 28px; }
.sputnik-overlay__link {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--c-white); font-weight: 700; font-size: 1.05em;
  padding: 15px 4px; border-bottom: 1px solid rgba(255,255,255,0.14); text-decoration: none;
}
.sputnik-overlay__link:hover { color: var(--c-sun); text-decoration: none; }
.sputnik-overlay__chev { color: var(--c-sun); }
.sputnik-overlay__nav .sputnik-btn { margin-top: 20px; }

/* Вложенный уровень «Сведений об ОО» в оверлее — нативный <details>. */
.sputnik-overlay__group > summary { cursor: pointer; list-style: none; }
.sputnik-overlay__group > summary::-webkit-details-marker { display: none; }
.sputnik-overlay__group[open] .sputnik-overlay__chev { transform: rotate(90deg); }
.sputnik-overlay__chev { display: inline-block; transition: transform 0.15s ease; }
.sputnik-overlay__sublink {
  display: block;
  padding: 11px 4px 11px 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sputnik-overlay__sublink:hover,
.sputnik-overlay__sublink:focus { color: var(--c-sun); text-decoration: none; }

/* The phone needs ~1340px to sit beside the full nav + CTA without overflow;
 * the 7 long RU nav labels (~710px) stop fitting below ~1200 and switch to the
 * burger there (prototype used 1024, too low for these label widths). The CTA
 * stays until 1024 (space allows) and hides only on phones. */
/* Пороги — по шкале проекта (design/etalon-tokens.md §Breakpoints: 768 / 1024 /
   1280 / 1720), а не произвольные числа под каждый случай.

   Почему меню ужато и телефон в шапке скрыт ниже 1720: шапка живёт в контейнере
   (1280, содержимому доступно 1240) независимо от ширины монитора. Полный набор —
   логотип, семь пунктов меню, телефон, кнопка — требует 1311 px, поэтому на любом
   экране до 1720 телефон уступает место, иначе блок с кнопкой «Записаться»
   выезжает за правый край шапки. Телефон при этом не теряется: он есть в подвале,
   в «Контактах» и в мобильном меню. */
.sputnik-nav__link { padding-inline: 8px; font-size: 0.84em; }


/* Enlarged accessibility font steps (data-fs) widen the nav/CTA past the bar, and
   media queries can't read --fs — so collapse the header to the burger whenever
   the font is enlarged (the nav then lives in the also-enlarged overlay). Without
   this the wider header forces horizontal scroll at font steps 2–3 (a11y-state.md
   requires the layout not to break at step 3). */
html[data-fs="2"] .sputnik-nav,
html[data-fs="3"] .sputnik-nav { display: none; }
html[data-fs="2"] .sputnik-burger,
html[data-fs="3"] .sputnik-burger { display: inline-flex; }
html[data-fs="2"] .sputnik-bar__cta,
html[data-fs="3"] .sputnik-bar__cta,
html[data-fs="2"] .sputnik-phone,
html[data-fs="3"] .sputnik-phone { display: none; }

/* At phone width the 200% text step makes the wordmark wider than the space
   left beside the two required controls. Keep the linked, labelled monogram;
   the full name remains available to assistive technology via aria-label. */
@media (max-width: 768px) {
  html[data-fs="2"] .sputnik-logo__word,
  html[data-fs="3"] .sputnik-logo__word { display: none; }
  html[data-fs="2"] .sputnik-bar__inner,
  html[data-fs="3"] .sputnik-bar__inner { gap: 8px; }
  html[data-fs="2"] .sputnik-bar__actions,
  html[data-fs="3"] .sputnik-bar__actions { margin-left: auto; gap: 6px; }
  /* Root text is still 200%; only the display-heading multiplier is capped so
     a long Russian word cannot become wider than the phone viewport. */
  html[data-fs="3"] .sputnik-h1 { font-size: 1.65em; overflow-wrap: anywhere; }
}

/* ============================================================
 * Footer (SputnikFooter) — navy, 4 columns → 2 → 1. Muted blue-grey text
 * per prototype (#cddde6 / #a9c6d3 / #bcd6e2 / #8fb0bf).
 * ============================================================ */
.sputnik-footer { background: var(--c-navy); color: #cddde6; }
.sputnik-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-block: 52px 28px;
}
.sputnik-footer__brandhead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sputnik-footer__logo { height: 42px; width: auto; display: block; }
.sputnik-footer__name { font-family: var(--font-serif); color: #fff; font-size: 1.12em; }
.sputnik-footer__desc { font-size: 0.92em; line-height: 1.65; margin: 0; color: #a9c6d3; }
.sputnik-footer__socials { margin-top: 18px; display: flex; gap: 10px; }
.sputnik-footer__social {
  width: 40px; height: 40px; border-radius: var(--r-button);
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; text-decoration: none;
}
.sputnik-footer__social:hover { background: var(--c-teal); color: #fff; text-decoration: none; }
.sputnik-footer__social .sputnik-icon { display: block; }

.sputnik-vk-profile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #07f;
  color: #fff;
  text-decoration: none;
}
.sputnik-vk-profile::before {
  content: "";
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: url("/assets/icons/brand-vk-a7eac21a.svg") center / contain no-repeat;
  mask: url("/assets/icons/brand-vk-a7eac21a.svg") center / contain no-repeat;
}
.sputnik-vk-profile:hover { color: #fff; background: #0066d6; text-decoration: none; }

.sputnik-footer__h { font-family: var(--font-serif); color: #fff; font-size: 1.02em; margin-bottom: 14px; }
.sputnik-footer__link { display: block; padding: 5px 0; font-size: 0.9em; color: #bcd6e2; text-decoration: none; }
.sputnik-footer__link:hover { color: #fff; text-decoration: none; }
.sputnik-footer__addr { font-size: 0.9em; line-height: 1.7; margin: 0 0 6px; color: #bcd6e2; }
.sputnik-footer__phone { display: block; font-family: var(--font-serif); font-size: 1.15em; color: #fff; margin: 6px 0; text-decoration: none; }
.sputnik-footer__phone:hover { color: var(--c-sun); text-decoration: none; }
.sputnik-footer__hours { font-size: 0.86em; color: #8fb0bf; margin: 10px 0 0; }

.sputnik-footer__bar { border-top: 1px solid rgba(255,255,255,0.12); }
.sputnik-footer__barinner {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding-block: 18px; font-size: 0.8em; color: #8fb0bf;
}
.sputnik-footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }
.sputnik-footer__legal a { color: #8fb0bf; text-decoration: none; }
.sputnik-footer__legal a:hover { color: #fff; }


/* ============================================================
 * Hero (SputnikHero) — split grid: text + mini-stats | photo with
 * asymmetric brand corner + floating card. Prototype "Главная" HERO block.
 * Gradient bg-soft → white; collapses to one column at ≤1024.
 * ============================================================ */
.sputnik-hero { background: linear-gradient(180deg, var(--c-bg-soft), var(--c-white)); }
.sputnik-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* Left column */
.sputnik-hero__kicker {
  display: inline-block;
  color: var(--c-teal-ink);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82em;
}
.sputnik-hero__title { margin-top: 14px; line-height: 1.12; text-wrap: balance; }
.sputnik-hero__accent { color: var(--c-teal); }
.sputnik-hero__rule {
  width: 64px;
  height: 4px;
  margin: 22px 0;
  background: var(--c-sun);
  border-radius: var(--r-pill);
}
.sputnik-hero__lead {
  font-size: 1.12em;
  color: var(--c-soft);
  max-width: 44ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}
.sputnik-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
/* Prototype hero buttons are a touch larger than the base button */
.sputnik-hero__cta .sputnik-btn { padding: 15px 28px; font-size: 1.02em; }
.sputnik-hero__stats { display: flex; gap: 32px; margin-top: 36px; flex-wrap: wrap; }
.sputnik-hero__stat { display: flex; flex-direction: column; }
.sputnik-hero__stat-value { font-family: var(--font-serif); font-size: 2em; font-weight: 700; color: var(--c-teal); }
.sputnik-hero__stat-label { font-size: 0.86em; color: var(--c-soft); }

/* Right column — photo + floating card */
.sputnik-hero__media { position: relative; }
.sputnik-hero__photo {
  aspect-ratio: 4 / 3.4;
  border-radius: var(--r-hero);
  overflow: hidden;
  box-shadow: var(--sh-hero);
}
.sputnik-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-hero__card {
  position: absolute;
  left: -24px;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--c-white);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(1, 38, 72, 0.18);
}
.sputnik-hero__card-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c-bg-blue);
  color: var(--c-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sputnik-hero__card-text { line-height: 1.2; }
.sputnik-hero__card-text strong { color: var(--c-heading); }
.sputnik-hero__card-text span { display: block; font-size: 0.85em; color: var(--c-soft); }


/* ============================================================
 * Nav banners (SputnikNavBanners) — row of dark navy link-cards under the
 * hero. auto-fit grid stays tidy for 2…6 cards; one column on narrow screens.
 * Prototype "Главная" lines 189–197.
 * ============================================================ */
.sputnik-nav-banners__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.sputnik-nav-banners__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 150px;
  padding: 26px;
  border-radius: var(--r-card);
  background: var(--c-navy);
  color: var(--c-white);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sputnik-nav-banners__card:hover {
  color: var(--c-white);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--sh-card-hover);
}
.sputnik-nav-banners__icon {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  color: rgba(255, 255, 255, 0.85);
}
.sputnik-nav-banners__title { font-family: var(--font-serif); font-size: 1.3em; font-weight: 700; color: var(--c-white); }
.sputnik-nav-banners__text { font-size: 0.9em; color: #bcd6e2; margin-top: 4px; }
.sputnik-nav-banners__arrow { color: var(--c-sun); }


/* ============================================================
 * Advantages (SputnikAdvantages) — centered head + light feature cards.
 * ============================================================ */
.sputnik-advantages__intro { color: var(--c-soft); margin: 16px 0 0; text-wrap: pretty; }
.sputnik-advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.sputnik-advantages__card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  padding: 28px 24px;
}
.sputnik-advantages__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--c-bg-soft);
  color: var(--c-teal-ink);
}
.sputnik-advantages__card-title { margin: 0 0 8px; }
.sputnik-advantages__card-text { font-size: 0.95em; color: var(--c-soft); margin: 0; text-wrap: pretty; }

/* ============================================================
 * Director's word (SputnikDirectorWord) — navy split: portrait + quote.
 * ============================================================ */
.sputnik-director { background: var(--c-navy); color: #eaf3f8; }
.sputnik-director__grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 52px;
  align-items: center;
}
.sputnik-director__portrait {
  aspect-ratio: 3 / 3.6;
  border-radius: var(--r-portrait);
  overflow: hidden;
}
.sputnik-director__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-director__kicker { color: var(--c-sun); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82em; }
.sputnik-director__quote {
  font-family: var(--font-serif);
  font-size: 1.7em;
  line-height: 1.4;
  color: #fff;
  margin: 16px 0 20px;
  text-wrap: pretty;
}
.sputnik-director__text { color: #bcd6e2; max-width: 60ch; margin: 0 0 20px; text-wrap: pretty; }
.sputnik-director__name { font-family: var(--font-serif); font-size: 1.1em; color: #fff; font-weight: 700; }
.sputnik-director__title { font-size: 0.9em; color: #9db9c9; }

/* ============================================================
 * News (SputnikNews) — head + "all news" link + 16:9 post cards.
 * ============================================================ */
.sputnik-news__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.sputnik-news__card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sputnik-news__card:hover { border-color: var(--c-teal); box-shadow: var(--sh-card-hover); transform: translateY(-3px); text-decoration: none; }
.sputnik-news__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.sputnik-news__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-news__chip {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--c-teal-ink);
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.sputnik-news__body { padding: 20px 22px 24px; }
.sputnik-news__date { color: var(--c-teal-ink); font-size: 0.8em; letter-spacing: 0.06em; font-weight: 700; }
.sputnik-news__title { margin: 8px 0 10px; font-size: 1.22em; line-height: 1.3; }
.sputnik-news__excerpt { font-size: 0.92em; color: var(--c-soft); margin: 0; text-wrap: pretty; }
.sputnik-news__empty { color: var(--c-soft); font-size: 1.05em; padding: 8px 0 0; }

/* ============================================================
 * Events calendar (SputnikEventsCalendar) — soft bg, intro + event rows.
 * ============================================================ */
.sputnik-events { background: var(--c-bg-soft); }
.sputnik-events__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}
.sputnik-events__lead { color: var(--c-soft); margin: 20px 0 22px; text-wrap: pretty; }
.sputnik-events__list { display: flex; flex-direction: column; gap: 14px; }
.sputnik-events__row {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 18px 22px;
}
.sputnik-events__date { flex: none; width: 64px; text-align: center; }
.sputnik-events__day { display: block; font-family: var(--font-serif); font-size: 1.9em; font-weight: 700; color: var(--c-teal); line-height: 1; }
.sputnik-events__month { display: block; font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-soft); margin-top: 4px; }
.sputnik-events__divider { width: 1px; align-self: stretch; background: var(--c-line); }
.sputnik-events__info { flex: 1; }
.sputnik-events__title { font-size: 1.15em; margin: 0 0 4px; }
.sputnik-events__meta { display: flex; align-items: center; gap: 6px; font-size: 0.88em; color: var(--c-soft); }
.sputnik-events__meta-icon { color: var(--c-teal); flex: none; }

/* ============================================================
 * Gallery (SputnikGallery) — mosaic; first photo spans two rows.
 * ============================================================ */
.sputnik-gallery__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 180px;
  gap: 14px;
}
.sputnik-gallery__cell {
  position: relative;
  margin: 0;
  border-radius: var(--r-card);
  overflow: hidden;
}
.sputnik-gallery__cell:first-child { grid-row: span 2; }
.sputnik-gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-size: 0.82em;
  color: #fff;
  background: linear-gradient(transparent, rgba(1, 38, 72, 0.6));
}

/* ============================================================
 * Achievements (SputnikAchievements) — navy, big amber numbers.
 * ============================================================ */
.sputnik-achievements { background: var(--c-navy); color: #eaf3f8; }
.sputnik-achievements .sputnik-h2 { color: #fff; }
.sputnik-achievements__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}
.sputnik-achievements__item { text-align: center; }
.sputnik-achievements__num { font-family: var(--font-serif); font-size: 3em; font-weight: 700; color: var(--c-sun); line-height: 1; }
.sputnik-achievements__label { color: #bcd6e2; margin-top: 10px; text-wrap: pretty; }

/* ============================================================
 * Contacts & map (SputnikContactsMap) — contact rows + consent-gated map.
 * ============================================================ */
.sputnik-contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: stretch;
}
.sputnik-contacts { scroll-margin-top: 96px; }
.sputnik-contacts__list { display: flex; flex-direction: column; gap: 20px; margin-top: 26px; }
.sputnik-contacts__row { display: flex; gap: 14px; }
.sputnik-contacts__icon { flex: none; color: var(--c-teal-ink); }
.sputnik-contacts__row strong { color: var(--c-heading); }
.sputnik-contacts__val { color: var(--c-soft); }
.sputnik-contacts__phone { font-family: var(--font-serif); font-size: 1.15em; }
.sputnik-contacts__map { min-height: 340px; }
.sputnik-contacts__map-ph { min-height: 340px; border-radius: var(--r-form); }
.sputnik-contacts__map-frame {
  display: block;
  width: 100%;
  min-height: 420px;
  height: 100%;
  border: 0;
  border-radius: var(--r-form);
}
.sputnik-contacts__map-placeholder { text-align: center; }
.sputnik-contacts__map-placeholder > p { color: var(--c-soft); margin: 16px auto 12px; max-width: 52ch; }
.sputnik-contacts__map-consent { margin-bottom: 12px; }
.sputnik-contacts__map-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }

/* ============================================================
 * Video section (Spree::PageSections::Video, спека 007, T022) — рамка 16/9,
 * тот же радиус, что у плейсхолдера карты выше (--r-form, 20px). Паттерна в
 * прототипе нет ни одного (spec.md, Assumptions): решение принято здесь, не
 * скопировано.
 * ============================================================ */
.sputnik-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-form);
  background: var(--c-bg-blue);
}
.sputnik-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.sputnik-video__frame .sputnik-ph { position: absolute; inset: 0; border-radius: var(--r-form); }
.sputnik-video__cta { margin-top: 16px; text-align: center; }
.sputnik-video__description { margin-top: 20px; }

/* Card grids collapse to one column on phones (contract: сетки ≤768 → 1 колонка) */

/* ============================================================
 * Enrollment form (SputnikEnrollmentForm) — soft bg, copy + enquiry form.
 * ============================================================ */
.sputnik-enroll { background: var(--c-bg-soft); }
.sputnik-enroll__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}
.sputnik-enroll__intro,
.sputnik-enroll__form { min-width: 0; }
.sputnik-enroll__kicker { color: var(--c-teal-ink); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82em; }
.sputnik-enroll__heading { margin-top: 12px; font-size: 2.4em; text-wrap: balance; }
.sputnik-enroll__lead { color: var(--c-soft); max-width: 46ch; margin: 0 0 24px; text-wrap: pretty; }
.sputnik-enroll__benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sputnik-enroll__benefits li { display: flex; gap: 12px; align-items: flex-start; }
.sputnik-enroll__diamond { flex: none; color: var(--c-teal); font-size: 1.2em; line-height: 1.3; }

/* The enquiry form (sputnik/enrollment_requests/_form) */
.sputnik-form {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-form);
  padding: 32px;
  box-shadow: var(--sh-form);
}
.sputnik-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sputnik-form__field { display: block; margin-top: 16px; }
.sputnik-form__grid .sputnik-form__field { margin-top: 0; }
.sputnik-form__label { display: block; font-size: 0.85em; font-weight: 700; color: var(--c-heading); margin-bottom: 6px; }
.sputnik-form__req { color: var(--c-teal-ink); }
.sputnik-form__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-button);
  font-size: 1em;
  font-family: inherit;
  background: var(--c-white);
  color: var(--c-ink);
}
.sputnik-form__input:focus-visible { border-color: var(--c-teal); }
.sputnik-form__input[aria-invalid="true"] { border-color: #c0392b; }
.sputnik-form__textarea { resize: vertical; }
.sputnik-form__error { display: block; margin-top: 6px; font-size: 0.82em; color: #c0392b; }
.sputnik-form__alert {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fdecea;
  border: 1px solid #c0392b;
  border-radius: var(--r-button);
  color: #7a1c12;
  font-weight: 700;
}
.sputnik-form__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 0.82em;
  color: var(--c-soft);
  cursor: pointer;
}
.sputnik-form__consent a { text-decoration: underline; text-underline-offset: 2px; }
.sputnik-form__checkbox { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.sputnik-form__submit {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border: none;
  border-radius: var(--r-button);
  background: var(--c-sun);
  color: #3a2400;
  font-family: inherit;
  font-size: 1.02em;
  font-weight: 700;
  cursor: pointer;
}
.sputnik-form__submit:hover { background: var(--c-sun-deep); color: #fff; }
.sputnik-form--success { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.sputnik-form__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-bg-blue);
  color: var(--c-teal-ink);
}
.sputnik-form__success-text { margin: 0; color: var(--c-teal-ink); font-weight: 700; font-size: 1.05em; }

/* ============================================================
 * Inner page head (SputnikPageHead, SputnikSvedenNav) — breadcrumb
 * bar and the heading block every page below the homepage opens with.
 * Handoff prototypes «Внутренняя страница» / «Приём» / «Сведения об ОО»,
 * lines 163–175: crumbs at .85em on the soft background, then the title
 * on a gradient with the 56×4 amber rule and an optional lead.
 * ============================================================ */
/* Фоновые полосы и градиенты держат ту же колонку, что заголовки (решение
   владельца 2026-08-03): полоса во всю ширину экрана при содержимом в контейнере
   выглядит чужой строкой поперёк страницы. */
.sputnik-crumbs {
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-line);
  font-size: 0.85em;
  color: var(--c-soft);
  max-width: var(--container);
  margin-inline: auto;
}
.sputnik-crumbs__inner { padding-block: 13px; }
.sputnik-crumbs__trail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sputnik-crumbs__trail li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--c-line);
}
.sputnik-crumbs__current {
  color: var(--c-heading);
  font-weight: 700;
}
.sputnik-crumbs__up { display: none; }

.sputnik-page-head {
  padding-block: 40px 44px;
  background: linear-gradient(180deg, var(--c-bg-soft), var(--c-bg));
  border-bottom: 1px solid var(--c-line);
  max-width: var(--container);
  margin-inline: auto;
}
/* Smaller than the shared .sputnik-h1 (3em): official titles run long —
   «Материально-техническое обеспечение… Доступная среда» wraps onto three
   lines at 3em even on a desktop. */
.sputnik-page-head__title {
  font-size: 2.6em;
  text-wrap: balance;
}
.sputnik-page-head__rule {
  width: 56px;
  height: 4px;
  margin-top: 18px;
  background: var(--c-sun);
  border-radius: var(--r-pill);
}
.sputnik-page-head__lead {
  max-width: 66ch;
  margin: 18px 0 0;
  font-size: 1.1em;
  color: var(--c-soft);
  text-wrap: pretty;
}


/* ============================================================
 * Prose column (Spree::PageSections::RichText retheme) — the narrow
 * reading column of an inner page: staff write headings and paragraphs
 * as rich text, the theme gives them our typography. Prototype
 * «Внутренняя страница», lines 177–184: 820px column, 1.05em body.
 * ============================================================ */
.sputnik-prose {
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: 20px;
  font-size: 1.05em;
  line-height: 1.75;
  color: var(--c-ink);
}
.sputnik-prose__heading {
  font-family: var(--font-serif);
  font-size: 1.6em;
  line-height: var(--lh-heading);
  color: var(--c-heading);
  margin: 34px 0 12px;
}
.sputnik-prose__anchor {
  display: block;
  height: 0;
  scroll-margin-top: 96px;
}
.sputnik-prose__heading:first-child { margin-top: 0; }
.sputnik-prose__anchor:first-child + .sputnik-prose__heading { margin-top: 0; }
.sputnik-prose p { margin: 0 0 14px; }
.sputnik-prose ul,
.sputnik-prose ol { margin: 0 0 14px; padding-left: 22px; }
.sputnik-prose li { margin-bottom: 6px; }
.sputnik-prose strong { color: var(--c-heading); }
/* Heading size is a block preference in the page builder, so all three sizes
   have to mean something visible. */
.sputnik-prose__heading--small { font-size: 1.2em; }
.sputnik-prose__heading--medium { font-size: 1.4em; }

/* ============================================================
 * Image + text (Spree::PageSections::ImageWithText retheme, T012/T015) —
 * composed from the `two-col` primitive (handoff prototype «Контакты»,
 * line 199: 1fr 1fr, gap 40px, collapses to one column below 1024px, see
 * the shared breakpoint below). Photo keeps its own aspect ratio and
 * radius (T012); text column reuses the site's serif-heading / soft-body
 * typography. Default image side is right (matches the vendor default and
 * its admin toggle); the `--image-left` modifier flips the two cells via
 * `order`.
 * ============================================================ */
.sputnik-image-with-text__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.sputnik-image-with-text__photo {
  order: 2;
  aspect-ratio: 6 / 7;
  border-radius: var(--r-card);
  overflow: hidden;
}
.sputnik-image-with-text__body { order: 1; }
.sputnik-image-with-text__grid--image-left .sputnik-image-with-text__photo { order: 1; }
.sputnik-image-with-text__grid--image-left .sputnik-image-with-text__body { order: 2; }
.sputnik-image-with-text__body--top { align-self: start; }
.sputnik-image-with-text__body--bottom { align-self: end; }
.sputnik-image-with-text__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-image-with-text__photo--landscape { aspect-ratio: 3 / 2; }
.sputnik-image-with-text__heading {
  font-family: var(--font-serif);
  color: var(--c-heading);
  font-size: 1.8em;
  line-height: var(--lh-heading);
  margin: 0 0 16px;
}
.sputnik-image-with-text__text {
  color: var(--c-ink);
  line-height: 1.75;
  margin-bottom: 16px;
}
.sputnik-image-with-text__text:last-child { margin-bottom: 0; }
.sputnik-image-with-text__buttons { margin-top: 8px; }

/* ============================================================
 * Image banner (Spree::PageSections::ImageBanner retheme, T013/T015) —
 * handoff prototype «Внутренняя страница», line 176: full-width photo,
 * aspect-ratio 16/5.5, radius 20px, contained to 1280px. Optional Heading/
 * Text/Buttons blocks (staff can still add them, T014a) sit in a centered
 * caption below the photo, not overlaid — no prototype shows overlaid
 * banner text, and the gem's overlay controls are gone (T014a).
 * ============================================================ */
.sputnik-image-banner__frame {
  aspect-ratio: 16 / 5.5;
  border-radius: 20px;
  overflow: hidden;
}
.sputnik-image-banner__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-image-banner__content { margin-top: 32px; }
.sputnik-image-banner__text { color: var(--c-soft); margin-top: 4px; }
.sputnik-image-banner__buttons { margin-top: 20px; }

/* ============================================================
 * Consent banner (feature 004, T037/T038 — FR-007a, FR-008, FR-013).
 *
 * ПАНЕЛЬ СНИЗУ — решение владельца 2026-08-03: так это устроено на всех сайтах,
 * и посетитель узнаёт запрос согласия с первого взгляда, не принимая его за
 * очередной блок страницы.
 *
 * FR-013 при этом не нарушается, но требует внимания: он запрещает ПЕРЕКРЫВАТЬ
 * содержимое. Панель фиксирована, поэтому содержимое из-под неё выводится
 * нижним отступом на <body> — ровно на высоту панели. Отступ ставит CSS через
 * `:has()`, без JavaScript: с отключённым JS панель остаётся на месте и
 * компенсация работает так же.
 *
 * Навигация от этого не страдает: меню сайта в шапке, наверху, — панель снизу
 * его не закрывает. На телефоне высота ограничена, а проза внутри прокручивается
 * (T043).
 *
 * Soft background rather than the navy bar: the banner is not a warning and
 * must not read as one — an alarming banner pressures the decision, and
 * ст. 9 ч. 1 requires it to be free.
 * ============================================================ */
.sputnik-consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  /* Ниже модального меню-оверлея (--z-overlay), но выше содержимого страницы:
     открытое меню обязано перекрывать панель, иначе кнопки согласия окажутся
     поверх навигации. */
  z-index: 60;
  /* Та же колонка, что у заголовков: панель не растягивается на весь экран, когда
     содержимое страницы держит поля (решение владельца 2026-08-03). */
  max-width: var(--container);
  margin-inline: auto;
  background: var(--c-bg-soft);
  border-block-start: 3px solid var(--c-gold);
  box-shadow: 0 -8px 24px rgb(0 0 0 / 12%);
  color: var(--c-ink);
  /* Ни max-height, ни overflow: панель ровно такой высоты, какой нужен тексту.
     Ограничение по высоте давало собственную полосу прокрутки внутри панели —
     лишний элемент управления там, где прокручивают колесом и пальцем, да и
     выглядит он как сломанный блок. Ограничение осталось только на телефоне,
     где панель иначе съедает пол-экрана. */
  /* Панель выезжает снизу, когда страница уже показана: посетитель сначала видит
     сайт, потом — запрос. Задержка небольшая: SC-010 не разрешает баннеру
     задерживать первую отрисовку, а трансформ вдобавок не двигает содержимое —
     отступ под панель уже стоит на <body>, поэтому вёрстка не прыгает. */
  animation: sputnik-consent-in 300ms ease-out 250ms both;
}
@keyframes sputnik-consent-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* «Уменьшить движение» — панель просто появляется. Пункт F чек-листа доступности:
   анимация не должна быть условием, чтобы что-то увидеть. */
.sputnik-consent__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 14px 20px 16px;
  /* Безопасная зона iPhone: без этого кнопки уезжают под системную полосу. */
  padding-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Компенсация высоты: содержимое страницы не должно оказаться под панелью
   (FR-013). Значение — с запасом на самый высокий вариант панели; лишний отступ
   внизу страницы безвреден, спрятанная под панелью строка — нет. */
body:has(#sputnik-consent-banner),
body:has(.sputnik-consent-status) { padding-block-end: 22rem; }
.sputnik-consent__title {
  font-family: var(--font-serif);
  font-size: 1.1em;
  line-height: var(--lh-heading);
  color: var(--c-heading);
  margin: 0 0 6px;
}
.sputnik-consent__text {
  margin: 0 0 8px;
  max-width: var(--container-text);
}
/* Цели — в строку, а не столбиком: список из двух пунктов в столбик добавлял
   панели полсотни пикселей высоты, а FR-013 и без того держит её в узде.
   Семантика остаётся списком, поэтому экранный диктор читает пункты по одному —
   меняется только раскладка (маркер рисуем сами, раз убрали list-style). */
.sputnik-consent__purposes {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 0 0 8px;
  padding-left: 0;
  list-style: none;
}
.sputnik-consent__purposes li { position: relative; padding-left: 14px; }
.sputnik-consent__purposes li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--c-gold);
}
.sputnik-consent__policy { margin: 0 0 12px; }
.sputnik-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
/* button_to wraps each button in its own form; without this the two forms
   stack as blocks and the buttons end up on separate lines. */
.sputnik-consent__form { margin: 0; }
.sputnik-consent__note {
  margin: 10px 0 0;
  font-size: 0.88em;
  color: var(--c-soft);
  max-width: var(--container-text);
}

/* Короткое подтверждение приходит Turbo-потоком после решения и занимает то же
   место, что освободила панель. Это отдельный компонент, а не общий Spree flash:
   общий контейнер закреплён сверху и визуально отрывает ответ от действия. */
.sputnik-consent-status {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 60;
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  color: var(--c-ink);
  background: var(--c-bg-soft);
  border-block-start: 3px solid var(--c-gold);
  box-shadow: 0 -8px 24px rgb(0 0 0 / 12%);
  transition: transform 200ms ease-in, opacity 200ms ease-in;
  animation: sputnik-consent-in 200ms ease-out both;
}
.sputnik-consent-status__text {
  max-width: var(--container-text);
  margin: 0;
  font-weight: 700;
}
.sputnik-consent-status--leaving {
  animation: none;
  transform: translateY(100%);
  opacity: 0;
}

/* Phone: the banner must not eat more than a third of the screen (T043). The
   cap is on the TEXT, not on the banner: clipping the buttons would leave the
   visitor unable to answer, so the prose scrolls and the actions stay put. */

/* ============================================================
 * Consent settings page (T040) — /soglasie, linked from the footer so
 * withdrawal is two actions from anywhere (SC-004, FR-010).
 * ============================================================ */
.sputnik-consent-page {
  padding-block: 40px 60px;
}
.sputnik-consent-page__inner {
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: 20px;
}
.sputnik-consent-page__state { margin: 18px 0 12px; font-size: 1.05em; }
.sputnik-consent-page__purposes { margin: 0 0 12px; padding-left: 22px; }
.sputnik-consent-page__purposes li { margin-bottom: 4px; }
.sputnik-consent-page__when { color: var(--c-soft); }
.sputnik-consent-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}
.sputnik-consent-page__form { margin: 0; }
.sputnik-consent-page__policy { color: var(--c-soft); }

/* ============================================================
 * Юридические страницы: политика обработки персональных данных
 * (Spree::Policy, вьюха themes/sputnik/spree/policies/show).
 *
 * Документ длинный и его читают не подряд, а ища нужный раздел, — отсюда
 * оглавление и якоря. Колонка узкая: юридический текст без ограничения ширины
 * растягивается на весь экран и перестаёт читаться.
 * ============================================================ */
.sputnik-policy { padding-block: 40px 64px; }
.sputnik-policy__inner {
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: 20px;
}
.sputnik-policy__head { margin-bottom: 28px; }
.sputnik-policy__updated {
  margin: 8px 0 0;
  color: var(--c-soft);
  font-size: 0.95em;
}

.sputnik-policy__toc {
  background: var(--c-bg-soft);
  border-inline-start: 3px solid var(--c-gold);
  padding: 18px 22px;
  margin-bottom: 32px;
}
.sputnik-policy__toc-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.05em;
  color: var(--c-heading);
}
.sputnik-policy__toc-list {
  margin: 0;
  padding-left: 20px;
}
.sputnik-policy__toc-list li { margin-bottom: 6px; }

/* Текст политики приходит из ActionText, где у элементов нет наших классов, —
   поэтому стили навешиваются на теги внутри контейнера. */
.sputnik-policy__body h2 {
  font-family: var(--font-serif);
  font-size: 1.45em;
  line-height: var(--lh-heading);
  color: var(--c-heading);
  margin: 36px 0 12px;
  /* Якорь не должен уезжать под липкую шапку при переходе из оглавления. */
  scroll-margin-block-start: 96px;
}
.sputnik-policy__body h2:first-child { margin-top: 0; }
.sputnik-policy__body h3 {
  font-family: var(--font-serif);
  font-size: 1.15em;
  color: var(--c-heading);
  margin: 24px 0 10px;
}
.sputnik-policy__body p { margin: 0 0 14px; }
.sputnik-policy__body ul,
.sputnik-policy__body ol { margin: 0 0 16px; padding-left: 24px; }
.sputnik-policy__body li { margin-bottom: 8px; }
.sputnik-policy__body strong { color: var(--c-heading); }

/* Таблица файлов браузера: на телефоне обычная таблица не помещается, поэтому
   она прокручивается по горизонтали внутри своей рамки, а не ломает страницу. */
.sputnik-policy__body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.95em;
}
.sputnik-policy__body th,
.sputnik-policy__body td {
  border: 1px solid var(--c-border);
  padding: 10px 12px;
  text-align: start;
  vertical-align: top;
}
.sputnik-policy__body th {
  background: var(--c-bg-soft);
  color: var(--c-heading);
  font-weight: 600;
}


/* ============================================================
 * Card grid (SputnikCardGrid) — карточки-анонсы программ, US2 (007). Форма
 * карточки как у News, но кнопка отдельна от карточки-ссылки: у карточки
 * может не быть ссылки вовсе (FR-006). Два auto-fit порога вместо жёсткого
 * числа колонок — иначе 2 карточки на широком экране жались бы в угол
 * 3-колоночной сетки с пустым местом справа (US2 AC2, а не repeat(N,1fr)).
 * --cols-2 — выбор сотрудника «2 колонки» (T029); обычная сетка — «3»
 * (умолчание). minmax(min(100%, …), 1fr) — защита от переполнения auto-fit:
 * голый px-минимум потребовал бы больше 100% ширины на узком телефоне и
 * дал бы горизонтальную прокрутку (FR-011). При такой паре минимумов сетка
 * САМА даёт 3 → 2 → 1 на 1280/768/390 без единого media query — числа
 * подобраны под контейнер 1280 (см. --container, tokens.css).
 * ============================================================ */
.sputnik-card-grid__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.sputnik-card-grid__grid--cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
}
.sputnik-card-grid__card {
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-card);
  overflow: hidden;
}
.sputnik-card-grid__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.sputnik-card-grid__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sputnik-card-grid__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 24px;
}
.sputnik-card-grid__title { margin: 0 0 10px; font-size: 1.22em; line-height: 1.3; }
.sputnik-card-grid__text { font-size: 0.92em; color: var(--c-soft); margin: 0 0 16px; text-wrap: pretty; }
/* Кнопка внизу карточки независимо от длины текста над ней (US2 AC3: карточки
 * одной высоты — .sputnik-card-grid__card растягивает всех соседей по ряду
 * до высоты самой высокой, margin-top:auto прибивает кнопку к низу внутри). */
.sputnik-card-grid__btn { margin-top: auto; align-self: flex-start; }
.sputnik-program-showcase__group + .sputnik-program-showcase__group { margin-top: 52px; }
.sputnik-program-showcase__group-heading { margin-bottom: 28px; }


/* ============================================================
 * Ширина полос и заливок — решение владельца 2026-08-03.
 *
 * Ни один блок с фоном не тянется от края до края экрана: заливка идёт по той же
 * колонке, что заголовки, меню и текст. На широком мониторе полоса во всю ширину
 * при содержимом в контейнере читается как чужая лента поперёк страницы.
 *
 * Правило собрано в одном месте намеренно: секции добавляются со временем, и
 * список здесь — то место, куда смотрят, когда новая секция «поехала». Точечные
 * max-width в описаниях самих секций пришлось бы искать по всему файлу.
 * ============================================================ */
.sputnik-section,
.sputnik-hero,
.sputnik-director,
.sputnik-events,
.sputnik-achievements,
.sputnik-enroll,
.sputnik-footer,
.sputnik-gallery,
.sputnik-card-grid,
.sputnik-news,
.sputnik-advantages,
.sputnik-nav-banners,
.sputnik-contacts,
.sputnik-image-with-text,
.sputnik-image-banner {
  max-width: var(--container);
  margin-inline: auto;
}

/* ============================================================
 * АДАПТИВ — все медиазапросы файла собраны здесь, по одному блоку на порог.
 *
 * Пороги — шкала проекта (design/etalon-tokens.md §Breakpoints):
 * 768 / 1024 / 1280 / 1720. Других значений в файле быть не должно: раньше их
 * было восемь вразнобой (560, 900, 1200, 1201, 1340), и понять, что где
 * переключается, можно было только чтением всего файла подряд.
 *
 * Порядок блоков — от широкого к узкому, чтобы каскад читался сверху вниз так
 * же, как срабатывает: правило узкого экрана перекрывает правило широкого.
 * ============================================================ */

@media (max-width: 1720px) {
  .sputnik-phone { display: none; }
}

@media (max-width: 1280px) {
  .sputnik-nav { display: none; }
  .sputnik-burger { display: inline-flex; }
}

@media (max-width: 1024px) {
  .sputnik-bar__cta { display: none; }
  .sputnik-footer__grid { grid-template-columns: 1fr 1fr; }
  .sputnik-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  /* Full-width media at ≤1024: pull the negative offset back to avoid overflow */
  .sputnik-hero__card { left: 0; }
  .sputnik-director__grid { grid-template-columns: 1fr; gap: 32px; }
  .sputnik-director__portrait { max-width: 340px; }
  .sputnik-events__grid { grid-template-columns: 1fr; gap: 32px; }
  .sputnik-contacts__grid { grid-template-columns: 1fr; gap: 28px; }
  .sputnik-enroll__grid { grid-template-columns: 1fr; gap: 32px; }
  .sputnik-image-with-text__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sputnik-section { padding-block: 44px; }
  .sputnik-h1 { font-size: 2.2em; }
  .sputnik-h2 { font-size: 1.7em; }
  .sputnik-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .sputnik-hero__cta .sputnik-btn { width: 100%; }
  .sputnik-nav-banners__grid { grid-template-columns: 1fr; }
  .sputnik-gallery__grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .sputnik-gallery__cell:first-child { grid-row: auto; }
  .sputnik-advantages__grid,
  .sputnik-news__grid,
  .sputnik-achievements__grid { grid-template-columns: 1fr; }
  .sputnik-enroll__heading { font-size: 2em; }
  .sputnik-form__grid { grid-template-columns: 1fr; }
  /* The trail does not fit — one step up instead (prototype .bc-mini) */
  .sputnik-crumbs__trail { display: none; }
  .sputnik-crumbs__up { display: inline-block; }
  .sputnik-page-head { padding-block: 28px 32px; }
  .sputnik-page-head__title { font-size: 2.1em; }
  /* Только на телефоне панель ограничена по высоте — иначе она съедает пол-экрана
     (Edge Cases). Полоса прокрутки при этом не рисуется: прокручивают пальцем, а
     видимый скроллбар внутри панели читается как сломанный блок. */
  .sputnik-consent {
    max-height: 46vh;
    overflow-y: auto;
    scrollbar-width: none;
  }
  .sputnik-consent::-webkit-scrollbar { display: none; }
  .sputnik-consent__inner {
    padding: 12px 16px 14px;
    padding-block-end: calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 0.94em;
  }
  .sputnik-consent__title { font-size: 1.02em; margin-bottom: 4px; }
  /* Абзац НЕ режется собственной прокруткой: обрезанная посередине строка выглядит
     сломанной вёрсткой, а не длинным текстом. Прокручивается вся панель целиком —
     на экранах обычной высоты она и так помещается без прокрутки. */
  .sputnik-consent__text { margin-bottom: 6px; }
  .sputnik-consent__purposes { margin-bottom: 6px; }
  .sputnik-consent__policy { margin-bottom: 10px; }
  .sputnik-consent__note { margin-top: 8px; font-size: 0.85em; }
  .sputnik-consent__actions { gap: 10px; }
  .sputnik-consent__actions .sputnik-btn { flex: 1 1 auto; }
}

@media (min-width: 1281px) {
  html:not([data-fs="2"]):not([data-fs="3"]) .sputnik-overlay { display: none !important; }
}

@media (min-width: 768px) {
  body:has(#sputnik-consent-banner),
  body:has(.sputnik-consent-status) { padding-block-end: 18rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sputnik-announce__track {
    flex-wrap: wrap;
    width: auto;
    white-space: normal;
  }
  .sputnik-consent,
  .sputnik-consent-status {
    animation: none;
    transition: none;
  }
}

@media print {
  .sputnik-policy__toc { break-inside: avoid; }
  .sputnik-policy__body h2 { break-after: avoid; }
}
