/* ==========================================================================
   «Первый заказ» — стили сайта.
   Цвета, радиусы, тени и отступы — в токенах ниже. Меняйте их здесь,
   компоненты берут значения только из переменных.
   ========================================================================== */

/* ---------- Токены: тёмная тема (по умолчанию) ---------- */
:root {
  color-scheme: dark;

  /* Фон: вертикальный градиент от насыщенного синего к почти чёрному */
  --bg-top: #1f4fe6;
  --bg-mid: #1336a8;
  --bg-deep: #0a1a5c;
  --bg-bottom: #040a1c;
  --glow-1: rgba(110, 150, 255, .22);
  --glow-2: rgba(150, 90, 255, .2);
  --header-glass: rgba(6, 18, 72, .34);
  --menu-bg: #10256f;

  /* Текст */
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, .9);
  --text-3: rgba(255, 255, 255, .84);
  --heading-from: #ffffff;
  --heading-to: rgba(222, 232, 255, .86);

  /* Стекло */
  --glass: rgba(255, 255, 255, .10);
  --glass-strong: rgba(255, 255, 255, .14);
  --glass-hover: rgba(255, 255, 255, .18);
  --glass-solid: rgba(16, 36, 110, .94); /* запасной вариант без blur */
  --stroke: rgba(255, 255, 255, .24);
  --stroke-strong: rgba(255, 255, 255, .42);
  --blur: 24px;

  /* Акценты */
  --accent: #ffffff;
  --link: #ffffff;
  --grad-from: #2b5cf0;
  --grad-to: #6a3ff0;
  --on-grad: #ffffff;
  --chip-on-bg: #ffffff;
  --chip-on-text: #0b1a4a;
  --danger: #ffd0d0;
  --danger-bg: rgba(255, 90, 90, .22);
  --ok: #c9f5d9;
  --ok-bg: rgba(60, 200, 120, .2);
  --warn-bg: rgba(255, 196, 64, .2);
  --warn-stroke: rgba(255, 210, 110, .7);
  --focus: #ffd84d;
  --field-bg: rgba(4, 12, 40, .38);
  --modal-backdrop: rgba(2, 6, 20, .66);

  /* Форма */
  --r-xs: 10px;
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 28px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow: 0 18px 50px rgba(0, 0, 20, .35);
  --shadow-sm: 0 8px 24px rgba(0, 0, 20, .25);

  /* Отступы */
  --gutter: clamp(16px, 4vw, 40px);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: clamp(56px, 8vw, 104px);
  --container: 1240px;
  --header-h: 72px;
  --tap: 44px;

  /* Шрифт */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  --fs-body: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --fs-small: .9375rem;
  --fs-h1: clamp(2.5rem, 1.4rem + 5.4vw, 6.25rem);
  --fs-h2: clamp(1.875rem, 1.2rem + 3vw, 3.5rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
  --fs-lead: clamp(1.125rem, 1rem + .6vw, 1.4rem);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .35s;
}

/* ---------- Светлая тема ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-top: #c3d4ff;
  --bg-mid: #dbe5ff;
  --bg-deep: #eaf0ff;
  --bg-bottom: #f5f7fd;
  --glow-1: rgba(80, 130, 255, .25);
  --header-glass: rgba(255, 255, 255, .58);
  --menu-bg: #f7f9ff;
  --glow-2: rgba(150, 100, 255, .16);
  --text: #0a1433;
  --text-2: #1f2b52;
  --text-3: #33406a;
  --heading-from: #0a1433;
  --heading-to: #253c91;
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-hover: rgba(255, 255, 255, .86);
  --glass-solid: rgba(250, 252, 255, .97);
  --stroke: rgba(255, 255, 255, .9);
  --stroke-strong: rgba(40, 70, 160, .35);
  --accent: #1d44c8;
  --link: #1a3db5;
  --chip-on-bg: #1d44c8;
  --chip-on-text: #ffffff;
  --danger: #9b1111;
  --danger-bg: rgba(220, 40, 40, .1);
  --ok: #0d5c2c;
  --ok-bg: rgba(30, 160, 80, .12);
  --warn-bg: rgba(255, 190, 40, .22);
  --warn-stroke: rgba(170, 110, 0, .55);
  --focus: #1238c9;
  --field-bg: rgba(255, 255, 255, .8);
  --modal-backdrop: rgba(20, 30, 70, .45);
  --shadow: 0 18px 50px rgba(30, 50, 120, .16);
  --shadow-sm: 0 8px 24px rgba(30, 50, 120, .12);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-bottom);
  background-image:
    radial-gradient(60rem 36rem at 85% -6rem, var(--glow-1), transparent 70%),
    radial-gradient(48rem 30rem at 0% 22rem, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0, var(--bg-mid) 30rem, var(--bg-deep) 62rem, var(--bg-bottom) 110rem);
  background-repeat: no-repeat;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
main { flex: 1 0 auto; display: block; }
img, svg { max-width: 100%; height: auto; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.01em; overflow-wrap: break-word; }
.display, .h2 { hyphens: auto; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--stroke); margin: var(--space-6) 0; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* Программный фокус на контейнерах (окно, заголовок шага, экран успеха) — без рамки; у кнопок и полей рамка остаётся */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

::selection { background: rgba(140, 170, 255, .45); color: inherit; }

/* ---------- Раскладка ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
@media (min-width: 2200px) {
  :root { --container: 1480px; }
  html { font-size: 112.5%; }
}
.section { padding-block: var(--space-8) 0; }
.section:last-child { padding-bottom: var(--space-8); }
.section-head { max-width: 46rem; margin-bottom: var(--space-6); }
.section-head p { color: var(--text-2); font-size: var(--fs-lead); }
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); }
.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0; }
.mt-0 { margin-top: 0; }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-small); }

/* ---------- Типографика ---------- */
.display {
  font-size: var(--fs-h1);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin-bottom: .35em;
}
.h2 { font-size: var(--fs-h2); font-weight: 300; letter-spacing: -.025em; }
.grad-text {
  background: linear-gradient(180deg, var(--heading-from) 20%, var(--heading-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@media (forced-colors: active) {
  .grad-text { color: CanvasText; -webkit-text-fill-color: CanvasText; background: none; }
}
.lead { font-size: var(--fs-lead); color: var(--text-2); max-width: 44rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2); margin-bottom: var(--space-3);
}

/* ---------- Стекло ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
}
.glass-strong { background: var(--glass-strong); }
.card { padding: clamp(20px, 3vw, 32px); }
.card > :last-child { margin-bottom: 0; }

/* Запасной вариант без размытия */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .folder, .folder::before, .site-header .header-bar, .modal, .toast, .notice, .pill-form, .main-nav {
    background: var(--glass-solid) !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .folder, .folder::before, .site-header .header-bar, .modal, .toast, .notice, .pill-form, .main-nav {
    background: var(--glass-solid) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* ---------- Папки ---------- */
.folder {
  --folder-bg: var(--glass);
  position: relative;
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-top: 18px;
  padding: 22px 20px 20px;
  min-height: 9.5rem;
  color: var(--text);
  text-decoration: none;
  background: var(--folder-bg);
  border: 1px solid var(--stroke);
  border-radius: 6px var(--r-md) var(--r-md) var(--r-md);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  transition: transform var(--dur) var(--ease), background var(--dur), border-color var(--dur);
}
.folder::before {
  content: "";
  position: absolute; left: -1px; top: -17px;
  width: 44%; height: 18px;
  background: var(--folder-bg);
  border: 1px solid var(--stroke);
  border-bottom: 0;
  border-radius: 14px 18px 0 0;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}
a.folder:hover, button.folder:hover { --folder-bg: var(--glass-hover); transform: translateY(-4px); }
.folder .folder-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--glass-strong); border: 1px solid var(--stroke);
}
.folder .folder-title { font-size: 1.15rem; font-weight: 600; }
.folder .folder-text { color: var(--text-2); font-size: var(--fs-small); }
.folder .folder-arrow { margin-top: auto; align-self: flex-end; opacity: .9; }
button.folder { font: inherit; text-align: left; width: 100%; cursor: pointer; }
button.folder[aria-pressed="true"] {
  --folder-bg: var(--glass-hover);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--text) inset;
}
.folder .check-mark {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  display: none; place-items: center;
  background: var(--chip-on-bg); color: var(--chip-on-text);
}
button.folder[aria-pressed="true"] .check-mark { display: grid; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); min-width: var(--tap);
  padding: 10px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  color: var(--text);
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: var(--on-grad);
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  box-shadow: 0 10px 28px rgba(80, 70, 240, .38), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(80, 70, 240, .5), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-glass {
  background: var(--glass-strong);
  border-color: var(--stroke);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.btn-glass:hover { background: var(--glass-hover); }
.btn-ghost { background: transparent; border-color: var(--stroke-strong); }
.btn-ghost:hover { background: var(--glass); }
.btn-danger { background: var(--danger-bg); border-color: var(--stroke); color: var(--text); }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: 1.0625rem; }
.btn-sm { padding: 8px 16px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}
.btn[aria-busy="true"] { cursor: progress; }
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}

.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap);
  min-width: var(--tap);
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--glass-strong);
  color: var(--text);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background .2s, transform .2s var(--ease), border-color .2s;
  text-decoration: none;
}
.icon-btn:hover { background: var(--glass-hover); transform: translateY(-1px); }
.icon-btn[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: transparent; }
.icon-btn.lg { width: 52px; height: 52px; }
.icon-btn svg { width: 20px; height: 20px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  padding: 0 4px;
  background: none; border: 0;
  color: var(--link); font-weight: 600;
  text-decoration: underline; text-underline-offset: .2em;
}

.btn svg, .link-btn svg, .chip svg { width: 20px; height: 20px; flex: none; }
.badge svg { width: 14px; height: 14px; flex: none; }
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.icon svg { width: 100%; height: 100%; display: block; }
[data-icon] { display: inline-grid; place-items: center; }
[data-icon] svg { width: 22px; height: 22px; }

/* ---------- Чипсы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--text);
  font-size: .9375rem; font-weight: 500;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.chip:hover { background: var(--glass-hover); }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: transparent; }
.chip[aria-pressed="true"]::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .8125rem; font-weight: 600; line-height: 1.4;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  color: var(--text);
}
.badge-example { background: var(--warn-bg); border-color: var(--warn-stroke); }
.badge-ok { background: var(--ok-bg); color: var(--text); }

/* ---------- Шапка ---------- */
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 1000;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--chip-on-bg); color: var(--chip-on-text); font-weight: 700;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 12px;
}
.header-bar {
  position: relative;
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 60px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-pill);
  background: var(--header-glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: var(--tap);
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em;
  white-space: nowrap;
}
.logo-mark { width: 34px; height: 34px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav a {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .9375rem;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--glass-strong); }
.main-nav a.btn-primary { color: var(--on-grad); }
.main-nav a.btn { justify-content: center; }
.main-nav a[aria-current="page"] { background: var(--chip-on-bg); color: var(--chip-on-text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-extra { display: none; }
.burger { display: inline-grid; }
.hide-sm { display: none !important; }
@media (min-width: 640px) {
  .hide-sm { display: inline-flex !important; }
}

/* Мобильное меню */
@media (max-width: 1279.98px) {
  .main-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    padding: 12px;
    border-radius: var(--r-lg);
    background: var(--menu-bg) !important;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    /* без backdrop-filter: вложенное размытие внутри стеклянной шапки Chromium рисует полупрозрачным */
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .main-nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .25s var(--ease); }
  .main-nav ul { flex-direction: column; }
  .main-nav a { display: flex; width: 100%; padding: 12px 16px; font-size: 1.0625rem; }
  .nav-extra { display: grid; gap: 10px; padding: 12px 4px 4px; border-top: 1px solid var(--stroke); margin-top: 8px; }
}
@media (min-width: 640px) and (max-width: 1279.98px) {
  .nav-extra { display: none; }
}
@media (min-width: 1280px) and (max-width: 1479.98px) {
  .site-header .logo { min-width: var(--tap); justify-content: center; }
  .site-header .logo span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .main-nav a { padding: 8px 10px; font-size: .9rem; }
  .header-actions .btn { padding-inline: 16px; }
}
@media (min-width: 1280px) {
  .burger { display: none; }
  .main-nav { margin-left: auto; }
  .header-actions { margin-left: 0; }
}

/* ---------- Герой ---------- */
.hero { padding-block: clamp(40px, 9vw, 120px) clamp(24px, 4vw, 48px); }
.hero .display { max-width: 15ch; }
.hero-greeting { font-size: var(--fs-lead); color: var(--text-2); margin-bottom: var(--space-3); }
.page-hero { padding-block: clamp(32px, 7vw, 96px) var(--space-4); }
.page-hero .display { font-size: clamp(2.25rem, 1.3rem + 4.4vw, 5rem); max-width: 18ch; }

.pill-form {
  display: flex; align-items: center; gap: 8px;
  max-width: 46rem;
  padding: 8px 8px 8px 22px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  animation: float 7s ease-in-out infinite;
}
.pill-form:focus-within { border-color: var(--stroke-strong); }
.pill-form input {
  flex: 1; min-width: 0;
  min-height: 48px;
  background: transparent; border: 0;
  font-size: 1.0625rem;
  color: var(--text);
}
.pill-form input::placeholder { color: var(--text-3); opacity: 1; }
.pill-form input:focus-visible { outline: none; }
.pill-form:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.pill-send { flex: none; width: 52px; height: 52px; border-radius: 50%; padding: 0; }
.pill-hint { margin: 10px 0 0 22px; color: var(--danger); font-weight: 600; min-height: 1.6em; }
:root[data-theme="light"] .pill-hint { color: var(--danger); }
.hero-chips { margin-top: var(--space-4); max-width: 52rem; }

/* ---------- Карточки ---------- */
.feature { display: flex; flex-direction: column; gap: var(--space-3); }
.feature .icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-strong); border: 1px solid var(--stroke);
}
.feature .icon-circle svg { width: 26px; height: 26px; }
.feature p { color: var(--text-2); }
.feature .btn { margin-top: auto; align-self: flex-start; }
.float-a { animation: float 8s ease-in-out infinite; }
.float-b { animation: float 9s ease-in-out -3s infinite; }
.float-c { animation: float 10s ease-in-out -6s infinite; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.steps.card { padding: clamp(20px, 3vw, 32px); }
.steps > li { counter-increment: step; position: relative; padding-left: 64px; min-height: 48px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  background: var(--glass-strong); border: 1px solid var(--stroke);
}
.steps h3 { margin-bottom: .25em; font-size: 1.15rem; }
.steps p { color: var(--text-2); margin: 0; }

.callout {
  display: flex; gap: var(--space-4); align-items: flex-start;
  padding: var(--space-5);
  border-radius: var(--r-md);
  border: 1px solid var(--warn-stroke);
  background: var(--warn-bg);
}
.callout > svg, .callout > [data-icon] { flex: none; margin-top: 2px; }
.callout p:last-child { margin-bottom: 0; }

.banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-stroke);
  font-weight: 600;
  margin-top: var(--space-4);
}
.banner p { margin: 0; }

.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-check li { position: relative; padding-left: 34px; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2334c26f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.list-no { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list-no li { position: relative; padding-left: 34px; }
.list-no li::before {
  content: "✕"; position: absolute; left: 0; top: .1em;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  background: var(--danger-bg); color: var(--text);
}

/* ---------- Аккордеон ---------- */
.accordion { display: grid; gap: var(--space-3); }
.acc-item { border-radius: var(--r-md); overflow: hidden; }
.acc-item h3 { margin: 0; font-size: inherit; }
.acc-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  width: 100%; min-height: 60px;
  padding: 16px 20px;
  background: transparent; border: 0;
  text-align: left; font-size: 1.0625rem; font-weight: 600; color: var(--text);
  border-radius: var(--r-md);
}
.acc-trigger:hover { background: var(--glass); }
.acc-trigger .chev { transition: transform var(--dur) var(--ease); flex: none; }
.acc-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc-panel { padding: 0 20px 20px; color: var(--text-2); }
.acc-panel > :last-child { margin-bottom: 0; }
.acc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }

/* ---------- Вкладки ---------- */
.tablist {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px;
  border-radius: var(--r-pill);
  width: fit-content; max-width: 100%;
  margin-bottom: var(--space-5);
}
.tab {
  min-height: var(--tap);
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: 0; background: transparent;
  color: var(--text); font-weight: 600;
}
.tab:hover { background: var(--glass-strong); }
.tab[aria-selected="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); }
.tabpanel:focus-visible { outline-offset: 6px; }
@media (max-width: 480px) {
  .tablist { border-radius: var(--r-md); width: 100%; }
  .tab { flex: 1 1 auto; }
}

/* ---------- Таймлайн «Как это работает» ---------- */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); counter-reset: tl; }
.timeline > li { counter-increment: tl; }
.tl-trigger {
  display: grid; grid-template-columns: 52px 1fr 28px; align-items: center; gap: var(--space-4);
  width: 100%; min-height: 76px;
  padding: 14px 20px;
  background: transparent; border: 0; text-align: left; color: var(--text);
  border-radius: var(--r-md);
}
.tl-trigger::before {
  content: counter(tl);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 700;
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  color: #fff;
}
.tl-trigger .tl-title { font-size: 1.15rem; font-weight: 600; display: block; }
.tl-trigger .tl-sub { color: var(--text-2); font-size: var(--fs-small); display: block; }
.tl-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.tl-trigger .chev { transition: transform var(--dur) var(--ease); }
.tl-panel { padding: 0 20px 20px calc(20px + 52px + var(--space-4)); color: var(--text-2); }
@media (max-width: 480px) { .tl-panel { padding-left: 20px; } }

/* ---------- Формы ---------- */
.form { display: grid; gap: var(--space-5); }
.form-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .label, fieldset > legend { font-weight: 600; }
.field .hint, fieldset .hint { color: var(--text-2); font-size: var(--fs-small); margin: 0; }
.req { color: var(--text); font-weight: 700; }
.req::after { content: " *"; }
.input, .select, .textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke-strong);
  background: var(--field-bg);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.select option { color: #0a1433; background: #fff; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-2); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 1px; border-radius: var(--r-sm);
}
[aria-invalid="true"] { border-color: #ff8a8a !important; box-shadow: 0 0 0 1px #ff8a8a; }
:root[data-theme="light"] [aria-invalid="true"] { border-color: #c01818 !important; box-shadow: 0 0 0 1px #c01818; }
.field-error {
  display: flex; gap: 6px; align-items: flex-start;
  margin: 0; color: var(--danger); font-weight: 600; font-size: var(--fs-small);
}
.field-error:empty { display: none; }
.field-error::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--danger-bg); color: var(--text); margin-top: 2px; }
.counter { justify-self: end; font-size: .875rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--text); font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
fieldset > legend { padding: 0; margin-bottom: 6px; }

.check, .radio {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--glass);
  cursor: pointer;
}
.check:hover, .radio:hover { background: var(--glass-strong); }
.check input, .radio input {
  flex: none;
  width: 22px; height: 22px; margin: 1px 0 0;
  accent-color: var(--grad-from);
  cursor: pointer;
}
.check:has(input:checked), .radio:has(input:checked) { border-color: var(--stroke-strong); background: var(--glass-strong); }
.check:has(input:focus-visible), .radio:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.check input:focus-visible, .radio input:focus-visible { outline: none; }
.options { display: grid; gap: 8px; }
.options.inline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.consents { display: grid; gap: 10px; }
.consents .check { font-size: var(--fs-small); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.form-status { margin: 0; font-weight: 600; color: var(--danger); }
.form-status:empty { display: none; }
.gate-hint { margin: 0; color: var(--text-2); font-size: var(--fs-small); }
.subblock { padding: var(--space-5); border-radius: var(--r-md); border: 1px solid var(--stroke); background: var(--glass); }
.subblock h3 { font-size: 1.1rem; }

.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--tap); padding: 8px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--stroke); background: var(--glass);
  cursor: pointer; font-weight: 600;
}
.switch input { width: 22px; height: 22px; accent-color: var(--grad-from); margin: 0; }
.switch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch input:focus-visible { outline: none; }

/* Шаги регистрации */
.stepper { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 var(--space-5); }
.stepper li {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  font-size: .875rem; font-weight: 600; color: var(--text-2);
}
.stepper li::before { content: ""; height: 6px; border-radius: 6px; background: var(--glass-strong); border: 1px solid var(--stroke); }
.stepper li.is-done::before, .stepper li.is-current::before { background: linear-gradient(90deg, var(--grad-from), var(--grad-to)); border-color: transparent; }
.stepper li.is-current { color: var(--text); }

.progress {
  height: 12px; border-radius: 12px; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--stroke);
}
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--grad-from), var(--grad-to)); transition: width .4s var(--ease); }

.success {
  display: grid; gap: var(--space-4); justify-items: start;
  padding: clamp(24px, 4vw, 40px);
}
.success .icon-circle {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-bg); border: 1px solid var(--stroke);
}

/* ---------- Заказы ---------- */
.search-bar { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 18px; border-radius: var(--r-pill); }
.search-bar svg { flex: none; }
.search-bar input {
  flex: 1; min-width: 0; min-height: 48px;
  border: 0; background: transparent; color: var(--text); font-size: 1.0625rem;
}
.search-bar input::placeholder { color: var(--text-3); opacity: 1; }
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-bar input:focus-visible { outline: none; }
.search-bar:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

.orders-layout { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
@media (min-width: 1024px) { .orders-layout { grid-template-columns: 300px 1fr; align-items: start; } }
.filters { padding: var(--space-5); display: grid; gap: var(--space-5); }
@media (min-width: 1024px) { .filters { position: sticky; top: calc(var(--header-h) + 24px); } }
.filters h2 { font-size: 1.25rem; font-weight: 600; margin: 0; }
.filters-toggle { display: inline-flex; }
@media (min-width: 1024px) { .filters-toggle { display: none; } }
@media (max-width: 1023.98px) { .filters:not(.is-open) .filters-body { display: none; } }
.filters-body { display: grid; gap: var(--space-5); }
.results-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.results-count { font-weight: 700; font-size: 1.125rem; margin: 0; }
.results-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.results-tools .select { min-height: var(--tap); width: auto; }
.view-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); }
.view-switch .icon-btn { border: 0; background: transparent; }
.view-switch .icon-btn[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); }

.orders { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.orders.is-list { grid-template-columns: 1fr; }
.order-card { display: flex; flex-direction: column; gap: var(--space-3); padding: 20px; height: 100%; }
.order-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.order-card h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.order-title {
  display: block; width: 100%;
  padding: 4px 0; min-height: var(--tap);
  border: 0; background: none; color: var(--text);
  font: inherit; font-weight: 650; text-align: left;
  text-decoration: underline; text-decoration-color: var(--stroke-strong); text-underline-offset: .22em;
}
.order-title:hover { text-decoration-color: currentColor; }
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--text-2); font-size: var(--fs-small); }
.order-meta div { display: flex; gap: 6px; align-items: center; }
.order-meta dt { font-weight: 600; color: var(--text); }
.order-meta dd { margin: 0; }
.order-card .excerpt { color: var(--text-2); margin: 0; font-size: var(--fs-small); }
.order-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.order-actions .btn { flex: 1 1 auto; }
.orders.is-list .order-card { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3) var(--space-5); }
.orders.is-list .order-card > * { grid-column: 1; }
.orders.is-list .order-actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; flex-direction: column; align-items: stretch; margin: 0; }
@media (max-width: 640px) {
  .orders.is-list .order-card { grid-template-columns: 1fr; }
  .orders.is-list .order-actions { grid-column: 1; grid-row: auto; flex-direction: row; }
}
.empty-state { padding: clamp(28px, 5vw, 56px); text-align: center; display: grid; justify-items: center; gap: var(--space-3); }
.show-more { display: flex; justify-content: center; margin-top: var(--space-5); }

.order-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 var(--space-4); }
.order-detail dt { font-weight: 600; }
.order-detail dd { margin: 0; color: var(--text-2); }
@media (max-width: 420px) { .order-detail dl { grid-template-columns: 1fr; } .order-detail dd { margin-bottom: 6px; } }

/* ---------- Модальные окна ---------- */
.modal-root {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: var(--modal-backdrop);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade .25s both;
}
.modal {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100dvh - 24px);
  display: flex; flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--glass-solid);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  animation: pop .3s var(--ease) both;
  overflow: hidden;
}
.modal.wide { width: min(780px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: var(--space-3); padding: 20px 20px 8px 26px; }
.modal-head h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); font-weight: 600; margin: 8px 0 0; flex: 1; }
.modal-body { padding: 8px 26px 26px; overflow-y: auto; overscroll-behavior: contain; }
.modal-body > :last-child { margin-bottom: 0; }
html.scroll-lock, html.scroll-lock body { overflow: hidden; }
@media (max-width: 520px) {
  .modal-root { place-items: end center; padding-bottom: 0; }
  .modal { border-bottom-left-radius: 0; border-bottom-right-radius: 0; max-height: calc(100dvh - 32px); animation-name: sheet; padding-bottom: env(safe-area-inset-bottom); }
  .modal-head { padding-left: 20px; }
  .modal-body { padding-inline: 20px; }
}

/* ---------- Тосты ---------- */
.toasts {
  position: fixed; z-index: 300;
  left: 50%; transform: translateX(-50%);
  top: max(16px, env(safe-area-inset-top));
  width: min(440px, calc(100% - 24px));
  display: grid; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 18px;
  border-radius: var(--r-md);
  background: var(--glass-solid);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  pointer-events: auto;
  animation: drop .3s var(--ease) both;
  font-weight: 600;
}
.toast p { margin: 0; flex: 1; }
.toast.is-leaving { animation: fade .25s reverse both; }

/* ---------- Плашка об уведомлении ---------- */
.notice {
  position: fixed; z-index: 90;
  left: 50%; transform: translateX(-50%);
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 24px));
  display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  padding: 14px 14px 14px 20px;
  border-radius: var(--r-lg);
  background: var(--glass-solid);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: rise .4s var(--ease) both;
}
.notice p { margin: 0; flex: 1 1 18rem; font-size: var(--fs-small); }
.notice .row { flex: none; }

/* ---------- Наверх ---------- */
.to-top {
  position: fixed; z-index: 80;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  box-shadow: var(--shadow-sm);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s var(--ease); }
body.has-notice .to-top { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 150px); }
@media (min-width: 800px) { body.has-notice .to-top { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 96px); } }

/* ---------- Подвал ---------- */
.site-footer { margin-top: var(--space-8); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.footer-card { padding: clamp(24px, 4vw, 44px); display: grid; gap: var(--space-6); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.footer-grid h2 { font-size: 1rem; font-weight: 700; margin-bottom: var(--space-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer-grid a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid .btn { justify-content: flex-start; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; align-items: center; color: var(--text-2); font-size: var(--fs-small); border-top: 1px solid var(--stroke); padding-top: var(--space-5); }
.footer-bottom p { margin: 0; }
.age-mark { display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 6px; border: 1.5px solid currentColor; border-radius: 8px; font-weight: 800; font-size: .8125rem; color: var(--text); }
.email-line { word-break: break-all; }

/* ---------- Юридические страницы ---------- */
.draft-banner {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 20px;
  border-radius: var(--r-md);
  background: var(--warn-bg); border: 1px solid var(--warn-stroke);
  font-weight: 700;
}
.legal-layout { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
@media (min-width: 1024px) { .legal-layout { grid-template-columns: 300px 1fr; align-items: start; } .toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100dvh - var(--header-h) - 48px); overflow-y: auto; } }
.toc { padding: var(--space-5); }
.toc h2 { font-size: 1.1rem; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: 2px; }
.toc a { display: inline-block; padding: 8px 0; min-height: var(--tap); color: var(--text); }
.legal-doc { padding: clamp(22px, 4vw, 48px); max-width: 52rem; }
.legal-doc h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 600; margin-top: 1.8em; }
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-doc section { scroll-margin-top: calc(var(--header-h) + 24px); }
.legal-doc p, .legal-doc li { color: var(--text-2); }
.legal-doc li + li { margin-top: .35em; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-2); font-size: var(--fs-small); margin-bottom: var(--space-4); }
.to-toc { margin-top: var(--space-3); }
.placeholder { background: var(--warn-bg); border-radius: 6px; padding: 0 4px; color: var(--text); font-weight: 600; }
.blank-form { margin-top: var(--space-6); }
.blank-line { display: block; border-bottom: 1px solid var(--stroke-strong); min-height: 2.2em; margin-bottom: .6em; }
.blank-row { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 12px; align-items: end; }
.blank-box { display: inline-block; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 4px; vertical-align: -3px; margin-right: 8px; }

/* Печатная памятка (видна только при печати) */
.print-area { display: none; }

/* ---------- 404 ---------- */
.notfound { min-height: 60svh; display: grid; place-content: center; text-align: center; justify-items: center; gap: var(--space-4); }
.notfound .display { font-size: clamp(5rem, 3rem + 14vw, 12rem); margin: 0; }

/* ---------- Анимации ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .pill-form, .float-a, .float-b, .float-c { animation: none; }
}

/* ---------- Альбомная ориентация телефона ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; }
  .hero { padding-top: 24px; }
  .modal { max-height: calc(100dvh - 16px); }
  .main-nav { max-height: calc(100dvh - 90px); }
}

/* ---------- Печать ---------- */
@media print {
  :root, :root[data-theme="light"] {
    --text: #000; --text-2: #222; --text-3: #333; --link: #000; --stroke: #999; --stroke-strong: #666;
    --glass: transparent; --glass-strong: transparent; --warn-bg: #f3f3f3; --warn-stroke: #999;
  }
  @page { margin: 18mm 16mm; }
  html { font-size: 11pt; }
  body { background: #fff !important; color: #000; display: block; min-height: 0 !important; }
  .section { padding: 0 !important; }
  body.print-form .legal-layout { margin: 0; }
  body.print-form .legal-doc section { margin: 0; }
  .site-header, .site-footer, .toasts, .notice, .to-top, .modal-root, .skip-link, .toc, .no-print, .doc-tools, .to-toc { display: none !important; }
  .glass, .folder { background: none !important; box-shadow: none !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .grad-text { color: #000 !important; -webkit-text-fill-color: #000 !important; background: none !important; }
  .container { width: 100%; }
  .legal-layout { display: block; }
  .legal-doc { padding: 0; max-width: none; }
  .legal-doc p, .legal-doc li { color: #000; }
  .page-hero { padding: 0 0 8pt; }
  .page-hero .display { font-size: 22pt; font-weight: 600; }
  .draft-banner { border: 1px solid #000; background: none; }
  h2, h3 { break-after: avoid; }
  section, li { break-inside: avoid-page; }
  a { color: #000; text-decoration: none; }
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .placeholder { background: none; border-bottom: 1px dashed #000; border-radius: 0; }
  .reveal { opacity: 1 !important; transform: none !important; }

  /* Режим печати памятки: только памятка */
  body.print-memo > *:not(.print-area) { display: none !important; }
  body.print-memo .print-area { display: block !important; }
  /* Режим печати бланка согласия: только бланк */
  body.print-form .page-hero, body.print-form .draft-banner { display: none !important; }
  body.print-form .legal-doc > *:not(#blank) { display: none !important; }
  body.print-form #blank { margin: 0; }
  .print-area h1 { font-size: 20pt; margin: 0 0 6pt; }
  .print-area h2 { font-size: 13pt; margin: 12pt 0 4pt; }
  .print-area ul { margin: 0; }
  .print-area .print-foot { margin-top: 14pt; font-size: 9pt; color: #333; }
}
