/* Шапка, меню «Предметы», крошки и подвал на всех страницах сайта (base.html),
   и страница 404 (public/404.html). Макеты — _lab/24-pages/chrome:
   шапка — вариант 4 (тёмная пилюля), меню — 3 (колонки), крошки — 3 (внутри
   шапки страницы, соседние темы рядом), подвал — 2 (тёмный), 404 — 3 (мозаика).
   Правила шапки, меню, крошек и подвала из site.css перенесены сюда. */

:root {
  --hd-bg: #15172e;
  --hd-gap: 16px;   /* отступ пилюли от верха окна */
  --hd-pill: 68px;  /* высота пилюли */
  --hd-h: calc(var(--hd-gap) + var(--hd-pill));
  --ch-grad: linear-gradient(95deg, #1f7bff 0%, #17bfe0 55%, #2ee59d 100%);
  --hd-ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 700px) { :root { --hd-gap: 12px; --hd-pill: 60px; } }

/* ═════════ шапка: тёмная пилюля ═════════ */

/* Наверху страницы шапка — тёмная полоса во всю ширину, при прокрутке
   плавно сжимается в пилюлю. Двигается только тёмная подложка .hd-bg:
   она всегда во всю ширину, а форму ей задаёт clip-path — так анимация
   идёт без пересчёта раскладки и без рывков. Содержимое шапки стоит на
   месте (лишь чуть сдвигается по высоте к середине полосы). Класс hd-flat
   ставит base.html до отрисовки и снимает chrome.js; высота шапки в обоих
   видах одна (--hd-h), поэтому страница под ней не прыгает. */
.hd {
  --hd-side: clamp(16px, 4vw, 48px);
  /* отступ пилюли от краёв окна: поля страницы, на широком — по колонке 1360 */
  --hd-out: max(var(--hd-side), calc((100% - 1360px) / 2 + var(--hd-side)));
  position: sticky; top: 0; z-index: 40;
  height: var(--hd-h); padding-top: var(--hd-gap);
  pointer-events: none;
}
.hd-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  filter: drop-shadow(0 18px 24px rgba(21, 23, 46, .3));
  transition: filter .7s var(--hd-ease);
}
.hd-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(260px 120px at calc(100% - var(--hd-out) - 300px) var(--hd-gap), rgba(23, 191, 224, .28), transparent 70%),
    radial-gradient(240px 120px at calc(100% - var(--hd-out) - 30px) 100%, rgba(46, 229, 157, .2), transparent 70%),
    var(--hd-bg);
  clip-path: inset(var(--hd-gap) var(--hd-out) 0 var(--hd-out) round calc(var(--hd-pill) / 2));
  transition: clip-path .7s var(--hd-ease);
}
.hd-flat .hd-bg { filter: drop-shadow(0 18px 24px rgba(21, 23, 46, 0)); }
.hd-flat .hd-bg::before { clip-path: inset(0 0 0 0 round 0); }
.hd-in {
  position: relative; z-index: 1; top: 0;
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 2 * var(--hd-out)); height: var(--hd-pill); margin: 0 auto;
  padding: 0 10px 0 24px;
  color: #fff; pointer-events: auto;
  transition: top .7s var(--hd-ease);
}
/* в полосе содержимое — по её середине (сдвиг через top, не transform:
   transform сломал бы position: fixed у листа меню на телефоне) */
.hd-flat .hd-in { top: calc(var(--hd-gap) / -2); }
@media (prefers-reduced-motion: reduce) { .hd-bg, .hd-bg::before, .hd-in { transition: none; } }
.hd .logo { display: inline-flex; flex: none; }
.hd .logo img { display: block; height: 32px; width: auto; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 30px; }
.nav > a, .menu summary {
  flex: none; padding: 9px 14px; border-radius: 12px;
  font-size: 15px; font-weight: 600; line-height: 1.6; text-decoration: none;
  color: rgba(255, 255, 255, .78);
  transition: background .15s, color .15s;
}
.nav > a:hover, .menu summary:hover, .menu[open] summary { color: #fff; background: rgba(255, 255, 255, .1); }
.nav > a:focus-visible, .menu summary:focus-visible { outline: 2px solid #17bfe0; outline-offset: 1px; }

.hd-offer { display: flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; color: rgba(255, 255, 255, .7); }
.hd-offer b { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--ch-grad); }
.hd-actions { display: flex; gap: 8px; margin-left: 14px; }
.hd .btn-sm { min-height: 46px; padding: 0 20px; font-size: 15px; }
.hd-login, .hd-login:hover { color: #fff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); }
.hd-login:hover { background: rgba(255, 255, 255, .14); }

/* меню «Предметы» — <details> */
.menu { flex: none; }
.menu summary { display: block; list-style: none; cursor: pointer; user-select: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after {
  content: ""; display: inline-block; margin-left: 8px; width: 6px; height: 6px;
  border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform .15s;
}
.menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }

/* бургер и лист меню на телефоне — тоже <details> */
.hd-m { display: none; }
.hd-burger {
  position: relative; display: block; width: 44px; height: 44px; border-radius: 50%;
  list-style: none; cursor: pointer; background: rgba(255, 255, 255, .1);
}
.hd-burger::-webkit-details-marker { display: none; }
.hd-burger::before, .hd-burger::after, .hd-burger i {
  content: ""; position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .2s, opacity .2s;
}
.hd-burger::before { top: 15px; }
.hd-burger i { top: 21px; }
.hd-burger::after { top: 27px; }
.hd-m[open] .hd-burger::before { transform: translateY(6px) rotate(45deg); }
.hd-m[open] .hd-burger::after { transform: translateY(-6px) rotate(-45deg); }
.hd-m[open] .hd-burger i { opacity: 0; }
.hd-burger:focus-visible { outline: 2px solid #17bfe0; outline-offset: 2px; }

/* Лист закрывает окно целиком, пилюля шапки остаётся сверху (она выше по z-index):
   её логотип и крестик — «шапка» листа. */
.hd-sheet {
  position: fixed; inset: 0; z-index: -1;
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--hd-h) + 12px) clamp(16px, 4vw, 48px) 28px;
  color: #fff; background: var(--hd-bg);
}
.hd-sheet > * { max-width: 560px; margin-inline: auto; }
.hd-sheet-ttl { margin: 14px auto 8px; padding: 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.hd-sheet-live { list-style: none; padding: 0; margin-bottom: 0; }
.hd-sheet-live li { margin: 0 0 6px; }
.hd-sheet-live a, .hd-sheet .mn-dot { color: #fff; }
.hd-sheet-live a {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 12px 8px 10px; border-radius: 16px; text-decoration: none; background: rgba(255, 255, 255, .05);
}
.hd-sheet-live a::after { content: "›"; font-size: 20px; color: rgba(255, 255, 255, .4); }
.hd-sheet-live img { width: 44px; height: 44px; object-fit: contain; }
.hd-sheet-live b { display: block; font-size: 16px; line-height: 1.25; }
.hd-sheet-live small { font-size: 14px; color: rgba(255, 255, 255, .72); }
  display: flex; align-items: center; gap: 8px; padding: 12px 0; list-style: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .85);
}
.hd-sheet-links { display: block; margin-bottom: 8px; }
.hd-sheet-links a:first-child { border-top: 0; }
.hd-sheet-links a:last-child { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.hd-sheet-links a { display: flex; justify-content: space-between; padding: 14px 10px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 17px; font-weight: 700; color: #fff; text-decoration: none; }
.hd-sheet-links a::after { content: "→"; font-weight: 500; color: rgba(255, 255, 255, .4); }
.hd-sheet-promo {
  display: grid; gap: 10px; margin-top: 10px; padding: 18px; border-radius: 22px;
  background: radial-gradient(220px 150px at 100% 0, rgba(23, 191, 224, .3), transparent 70%), radial-gradient(200px 140px at 0 100%, rgba(46, 229, 157, .16), transparent 70%), rgba(255, 255, 255, .05);
}
.hd-sheet-promo p { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .82); }
.hd-sheet-promo .hd-sheet-promo-h { font-size: 18px; font-weight: 800; color: #fff; }
.hd-sheet-promo .btn { width: 100%; min-height: 52px; font-size: 16px; }
.hd-sheet-promo .btn-go { margin-top: 4px; }
html.hd-lock { overflow: hidden; }

@media (max-width: 1180px) {
  .hd-offer { display: none; }
  .hd-actions { margin-left: auto; }
}
@media (max-width: 1000px) {
  .nav, .hd-actions .hd-login { display: none; }
  .hd-m { display: block; }
  .hd-in { padding-right: 8px; }
}
@media (max-width: 700px) {
  /* справа воздуха как слева: бургер не прижат к краю пилюли */
  .hd-in { padding-left: 18px; padding-right: 12px; }
  .hd-burger { width: 40px; height: 40px; }
  .hd-burger::before { top: 13px; }
  .hd-burger i { top: 19px; }
  .hd-burger::after { top: 25px; }
  .hd .logo img { height: 26px; }
  .hd .btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .hd-in:has(.hd-m[open]) .hd-try { visibility: hidden; }
}
/* Узкие телефоны (360 у многих Android): кнопка «Попробовать» остаётся —
   логотип и кнопка ужимаются, прячется она только совсем без места. */
@media (max-width: 380px) {
  .hd-in { gap: 6px; padding-left: 14px; padding-right: 10px; }
  .hd .logo img { height: 22px; }
  .hd .btn-sm { min-height: 38px; padding: 0 12px; font-size: 13.5px; }
  .hd-actions { margin-left: auto; }
}
@media (max-width: 329px) { .hd-try { display: none; } }

/* Главная и «Для родителей» (body.is-glass): пилюля плавает над мозаикой
   первого экрана — первый экран заходит под шапку. */
.is-glass .hero { margin-top: calc(-1 * var(--hd-h)); padding-top: calc(var(--hd-h) + clamp(36px, 6vw, 84px)); }

/* ═════════ меню «Предметы»: три колонки ═════════ */

.menu-panel {
  position: absolute; z-index: 30; top: calc(100% + 12px); left: 0; right: 0;
  max-height: calc(100vh - var(--hd-h) - 24px); overflow: auto; overscroll-behavior: contain;
  border-radius: 30px; color: var(--ink); background: var(--surface);
  box-shadow: 0 0 0 1px rgba(21, 26, 45, .05), 0 50px 90px -30px rgba(21, 26, 45, .38);
}
.mn { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr) minmax(240px, 290px); padding: 10px; }
.mn-col { padding: 18px 18px 14px; }
.mn-ttl { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9a9cb5; }
.mn-ttl em { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-style: normal; letter-spacing: 0; text-transform: none; color: #0b8b60; background: #e8fbf3; }
.mn-live { list-style: none; margin: 0; padding: 0; }
.mn-live li { margin: 0; }
.mn-live a { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 14px; margin: 0 -12px; padding: 9px 12px; border-radius: 16px; color: var(--ink); text-decoration: none; transition: background .15s; }
.mn-live a:hover, .mn-live a:focus-visible { background: var(--page); color: var(--ink); }
.mn-live img { width: 52px; height: 52px; object-fit: contain; }
.mn-live b { display: block; font-size: 16.5px; line-height: 1.2; }
.mn-live small { font-size: 13px; color: var(--muted); }
.mn-dot { display: block; width: 14px; height: 14px; margin: auto; border-radius: 50%; background: var(--sub); }
.mn-mid { border-inline: 1px solid var(--border-2); }
.mn-groups { columns: 2; column-gap: 28px; }
.mn-grp { break-inside: avoid; margin-bottom: 16px; }
.mn-grp h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--ink-2); }
.mn-grp ul { list-style: none; margin: 0; padding: 0; }
.mn-grp li { display: flex; align-items: center; gap: 9px; margin: 0; padding: 3px 0; font-size: 14px; line-height: 1.3; color: #8a8da6; }
.mn-grp li img { flex: none; width: 22px; height: 22px; object-fit: contain; filter: grayscale(1); opacity: .5; }
.mn-grp li i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; }
.mn-grp li i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c9cbdc; }
.mn-promo {
  display: flex; flex-direction: column; margin: 8px; padding: 22px; border-radius: 22px; color: #fff;
  background: radial-gradient(220px 160px at 100% 0, rgba(23, 191, 224, .35), transparent 70%), radial-gradient(200px 160px at 0 100%, rgba(46, 229, 157, .22), transparent 70%), var(--hd-bg);
}
.mn-promo img { width: 100%; height: 150px; object-fit: cover; border-radius: 16px; margin-bottom: 16px; }
.mn-promo p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .7); }
.mn-promo .mn-promo-h { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.mn-promo .btn { margin-top: auto; }
.mn-promo p + .btn { margin-top: 22px; }
.mn-all { margin-top: 12px; text-align: center; font-size: 14px; font-weight: 700; text-decoration: none; color: rgba(255, 255, 255, .85); }
.mn-all:hover { color: #fff; }
@media (max-width: 1180px) {
  .mn { grid-template-columns: 300px minmax(0, 1fr) 250px; }
  .mn-groups { column-gap: 20px; }
  .mn-grp li { font-size: 13.5px; }
  .mn-promo img { height: 120px; }
}

/* ═════════ крошки: внутри шапки страницы, соседние темы рядом ═════════ */

.crumbs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
main > .crumbs-bar { margin: 22px 0 18px; }
.crumbs { min-width: 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 0; padding: 0; }
.crumbs-bar .crumbs li {
  display: inline-flex; align-items: center; margin: 0;
  font-size: 13px; font-weight: 800; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase;
  color: var(--crumbs-c, #2a52cc);
}
.crumbs-bar .crumbs li + li::before { content: "/"; margin: 0 9px; opacity: .35; }
.crumbs-bar .crumbs li a { color: inherit; font-weight: inherit; text-decoration: none; }
.crumbs-bar .crumbs li a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }
.crumbs-bar .crumbs li[aria-current] > span { opacity: .6; }
/* сама страница — в разметке для schema.org, на экране её заменяет h1 */
.crumbs-bar .crumbs li.crumbs-cur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* класс — пилюля со стрелкой ▾: классы того же предмета */
.crumbs-bar .crumbs li.crumbs-g { position: relative; }
.crumbs-g > a, .crumbs-g > span[itemprop] { padding: 4px 0 4px 10px; margin: -4px 0; border-radius: 999px 0 0 999px; background: var(--crumbs-pill, rgba(255, 255, 255, .75)); }
.crumbs-bar .crumbs li.crumbs-g[aria-current] > span { opacity: 1; }
.crumbs-dd { position: static; }
.crumbs-dd summary {
  display: grid; place-items: center; width: 26px; height: 27px; margin: -4px 0; border-radius: 0 999px 999px 0;
  list-style: none; cursor: pointer; background: var(--crumbs-pill, rgba(255, 255, 255, .75));
}
.crumbs-dd summary::-webkit-details-marker { display: none; }
.crumbs-dd summary::after { content: ""; width: 5px; height: 5px; margin: 0 4px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.crumbs-dd[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.crumbs-dd summary:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.crumbs-dd-panel {
  position: absolute; z-index: 25; top: calc(100% + 10px); left: 0;
  width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 12px; border-radius: 18px;
  text-transform: none; letter-spacing: 0; color: var(--ink); background: var(--surface);
  box-shadow: 0 0 0 1px rgba(21, 26, 45, .06), 0 24px 50px -20px rgba(21, 26, 45, .35);
}
.crumbs-dd-panel small { display: block; margin: 0 2px 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.crumbs-dd-panel span { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs-dd-panel a { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 12px; font-size: 15px; font-weight: 700; text-decoration: none; color: var(--ink-2); background: var(--page); }
.crumbs-dd-panel a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.crumbs-dd-panel a.on { color: #fff; background: linear-gradient(135deg, #4d97ff, #33d0ec); }

/* соседние темы */
.cnb { display: flex; gap: 8px; min-width: 0; }
.cnb a {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px;
  width: 270px; max-width: 100%; padding: 10px 14px 10px 10px; border-radius: 18px;
  text-decoration: none; color: var(--cnb-c, var(--ink));
  background: var(--cnb-bg, rgba(255, 255, 255, .78)); box-shadow: 0 0 0 1px var(--cnb-line, rgba(77, 151, 255, .14));
  transition: box-shadow .15s, transform .15s;
}
.cnb a:hover { color: var(--cnb-c, var(--ink)); box-shadow: 0 0 0 1px var(--cnb-line, rgba(77, 151, 255, .14)), 0 14px 26px -16px rgba(25, 30, 80, .4); transform: translateY(-1px); }
.cnb i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-style: normal; font-weight: 700; line-height: 1; color: var(--cnb-ic, #2a52cc); background: var(--cnb-ic-bg, #eef3ff); }
.cnb .cnb-next i { color: #fff; background: linear-gradient(135deg, #4d97ff, #33d0ec); }
.cnb small { display: block; font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--cnb-muted, var(--muted)); }
.cnb b { display: block; overflow: hidden; font-size: 14.5px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }

/* Тёмная шапка страницы: те же крошки светлыми. Страница со своей тёмной
   шапкой задаёт эти переменные у себя; тема (.tt-hd) — здесь. */
.tt-hd {
  --crumbs-c: rgba(255, 255, 255, .66); --crumbs-pill: rgba(255, 255, 255, .1);
  --cnb-bg: rgba(255, 255, 255, .07); --cnb-line: rgba(255, 255, 255, .14); --cnb-c: #fff;
  --cnb-muted: rgba(255, 255, 255, .55); --cnb-ic: #fff; --cnb-ic-bg: rgba(255, 255, 255, .1);
}
.tt-hd .crumbs-g { --crumbs-c: #fff; }

@media (max-width: 700px) {
  .crumbs-bar .crumbs li { font-size: 12px; }
  .cnb { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .cnb a { width: auto; grid-template-columns: 1fr; align-content: start; gap: 6px; padding: 12px; }
  .cnb a:only-child { grid-column: 1 / -1; }
  .cnb b { font-size: 14px; white-space: normal; }
}

/* ═════════ подвал: тёмный, со скруглённым верхом ═════════ */

.ft {
  position: relative; overflow: hidden; margin-top: 96px;
  font-size: 15px; color: #fff; border-radius: 40px 40px 0 0;
  background: radial-gradient(500px 260px at 92% 0, rgba(23, 191, 224, .18), transparent 70%), radial-gradient(420px 260px at 0 100%, rgba(46, 229, 157, .1), transparent 70%), var(--hd-bg);
}
.ft-in { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.ft-top { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 46px 0 34px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ft .logo img { display: block; height: 32px; width: auto; }
.ft-tag { max-width: 340px; margin: 0; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .78); }
.ft-btns { display: flex; gap: 10px; margin-left: auto; }
.ft-cols { display: grid; grid-template-columns: 1.2fr 1fr .9fr 1.5fr; gap: 34px; padding: 38px 0 30px; }
.ft-h { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.ft-h a { color: inherit; text-decoration: none; }
.ft-h a:hover { color: #fff; }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li { margin: 0 0 10px; }
.ft-cols li a { font-size: 15px; line-height: 1.4; text-decoration: none; color: rgba(255, 255, 255, .85); }
.ft-cols li a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ft-si { display: inline-flex; align-items: center; gap: 10px; }
.ft-si img { flex: none; width: 28px; height: 28px; object-fit: contain; }
/* классы — в строку с названием и без переноса: «7–11» не рвётся по тире */
.ft-si small { margin-left: 2px; font-size: 13.5px; white-space: nowrap; color: rgba(255, 255, 255, .45); }
.ft-gr { display: grid; grid-template-columns: repeat(6, 40px); gap: 6px; }
.ft-gr a { display: grid; place-items: center; height: 40px; border-radius: 12px; font-weight: 700; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); transition: background .15s; }
.ft-gr a:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.ft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 22px 0 30px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: rgba(255, 255, 255, .5); }
.ft-bar a { text-decoration: none; color: rgba(255, 255, 255, .8); }
.ft-bar a:hover { color: #fff; }
.ft-bar .ft-mail { font-weight: 700; color: #fff; }
.ft-up { margin-left: auto; }
.ft-req { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .62); }
@media (max-width: 1000px) {
  .ft-cols { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
}
@media (max-width: 700px) {
  .ft { margin-top: 64px; border-radius: 28px 28px 0 0; }
  .ft-top { padding: 40px 0 26px; }
  .ft .logo img { height: 26px; }
  .ft-btns { width: 100%; margin-left: 0; }
  .ft-btns .btn { flex: 1; min-height: 50px; padding: 0 16px; font-size: 15px; white-space: nowrap; }
  .ft-btns .hd-login { flex: 0 1 126px; }
  .ft-cols { grid-template-columns: 1fr; gap: 28px; padding: 30px 0 24px; }
  .ft-up { margin-left: 0; flex-basis: 100%; }
}

/* ═════════ 404: мозаика и стеклянная карточка ═════════ */

.nf-body { display: flex; flex-direction: column; min-height: 100vh; }
.nf-body main.wrap { flex: 1; display: flex; flex-direction: column; max-width: none; padding: 0; }
.nf { flex: 1; position: relative; isolation: isolate; overflow: clip; margin-top: calc(-1 * var(--hd-h)); padding: calc(var(--hd-h) + 50px) clamp(16px, 4vw, 48px) 40px; }
.nf-mos { position: absolute; inset: -120px -160px; z-index: -2; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; transform: rotate(-8deg); }
.nf-mos img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 24px -14px rgba(30, 30, 90, .5); }
.nf::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 480px at 50% 46%, rgba(246, 247, 251, .96), rgba(246, 247, 251, .6) 70%, rgba(246, 247, 251, .35)); }
.nf-card {
  max-width: 760px; margin: 0 auto; padding: 44px 48px 40px; border-radius: 34px; text-align: center;
  background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(21, 26, 45, .05), 0 30px 60px -30px rgba(25, 30, 80, .28), 0 2px 6px rgba(25, 30, 80, .05);
}
.nf-big { margin: 0; font-size: 150px; font-weight: 800; line-height: .9; letter-spacing: -.06em; color: transparent; background: var(--ch-grad); -webkit-background-clip: text; background-clip: text; }
.nf-card h1 { margin: 18px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.nf-lead { max-width: 520px; margin: 12px auto 0; font-size: 18px; line-height: 1.55; color: var(--muted); }
.nf-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.nf-subj { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--border); }
.nf-subj li { margin: 0; }
.nf-subj a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 6px; border-radius: 999px; font-size: 14.5px; font-weight: 700; text-decoration: none; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--border); transition: box-shadow .15s; }
.nf-subj a:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px #b9c6ee; }
.nf-subj img { width: 32px; height: 32px; object-fit: contain; }
.nf-subj small { font-weight: 500; color: var(--muted); }
.nf-ft { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; max-width: 1264px; margin: 40px auto 0; padding: 16px 28px; border-radius: 999px; font-size: 14px; color: var(--muted); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 0 0 1px rgba(21, 26, 45, .05); }
.nf-ft a { color: var(--ink-2); text-decoration: none; }
@media (max-width: 700px) {
  .nf { padding: calc(var(--hd-h) + 26px) 16px 16px; }
  .nf-mos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; inset: -60px -100px; }
  .nf-card { padding: 28px 18px 24px; border-radius: 26px; }
  .nf-big { font-size: 100px; }
  .nf-card h1 { font-size: 30px; }
  .nf-lead { font-size: 16px; }
  .nf-btns .btn { width: 100%; }
  .nf-subj { flex-direction: column; align-items: center; }
  .nf-ft { margin-top: 16px; border-radius: 22px; padding: 14px 18px; flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
  .nf-mos { animation: nf-drift 60s linear infinite alternate; }
  @keyframes nf-drift { to { transform: rotate(-8deg) translateY(-60px); } }
}

/* Плашка про cookie (base.html, #ck): уведомление внизу экрана. Видна с
   первой отрисовки — стили здесь, в шапочном файле, скрипт встроен в разметку. */
.ck { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 18px;
  background: #151a2d; color: rgba(255, 255, 255, .86); font-size: 14px; line-height: 1.45;
  box-shadow: 0 18px 40px -18px rgba(21, 26, 45, .55); }
.ck[hidden] { display: none; }
.ck p { margin: 0; flex: 1; }
.ck a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.ck-ok { flex: none; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; color: #151a2d; background: #fff; }
.ck-ok:hover { background: #eaf0ff; }
.ck-ok:focus-visible { outline: 2px solid #8fb0ff; outline-offset: 2px; }
@media (max-width: 520px) { .ck { left: 10px; right: 10px; bottom: 10px; flex-wrap: wrap; padding: 14px; } .ck-ok { width: 100%; } }
