/* Публичные страницы Aura: главная, вход, документы.

   Тот же язык, что в кабинете: плоские поверхности, тонкие сиреневые линии,
   свет только у главного объекта страницы. Onest — текст, Unbounded —
   заголовки и крупные цифры. Оба шрифта лежат у нас. */

@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fronted/static/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fronted/static/fonts/onest-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fronted/static/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url('/fronted/static/fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url('/fronted/static/fonts/unbounded-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url('/fronted/static/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --s-ground: #0a0510;
  --s-raised: #120a18;
  --s-raised-2: #1a1021;
  --s-line: rgba(205, 160, 217, 0.11);
  --s-line-hi: rgba(205, 160, 217, 0.28);
  --s-plum: #7c2e8a;
  --s-plum-hi: #8f369f;
  --s-wash: rgba(124, 46, 138, 0.16);
  --s-lilac: #cda0d9;
  --s-text: #f5f0f4;
  --s-soft: #d2c7d6;
  --s-muted: #928697;
  --s-ok: #7dd3a8;
  --s-bad: #f87171;
  --s-display: 'Unbounded', 'Onest', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --s-body: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Основа ---------- */
.s-page, .s-page * { box-sizing: border-box; }
body.s-page {
  margin: 0;
  background: var(--s-ground);
  color: var(--s-text);
  font-family: var(--s-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Сброс — через :where, с нулевой силой: на странице входа живы правила
   security.css, и любое из них должно перебивать этот сброс. */
:where(.s-page) :where(h1, h2, h3, h4, p) { margin: 0; }
:where(.s-page) :where(a) { color: inherit; text-decoration: none; }
:where(.s-page) :where(img) { display: block; }
.s-logo svg, .s-mock svg, .s-power svg { display: block; }
:where(.s-page) :focus-visible { outline: 2px solid var(--s-lilac); outline-offset: 3px; }
.s-num { font-variant-numeric: tabular-nums; }

.s-wrap { width: min(1120px, 100% - 64px); margin: 0 auto; }
@media (max-width: 700px) { .s-wrap { width: calc(100% - 32px); } }

/* ---------- Кнопки ---------- */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 0; border-radius: 12px;
  background: var(--s-plum); color: #fff !important;
  font: 600 15px/1.2 var(--s-body); white-space: nowrap; cursor: pointer;
  transition: background .15s;
}
.s-btn:hover { background: var(--s-plum-hi); }
.s-btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--s-line-hi); }
.s-btn.ghost:hover { background: rgba(255,255,255,.04); }
.s-btn.big { padding: 15px 26px; font-size: 16px; }
.s-btn.full { width: 100%; }
.s-link { color: var(--s-lilac) !important; font-weight: 500; }
.s-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Логотип и шапка ---------- */
.s-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--s-display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.s-logo svg { width: 30px; height: 30px; }

.s-nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 5, 16, 0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--s-line); }
.s-nav .s-wrap { display: flex; align-items: center; gap: 40px; height: 72px; }
.s-nav-links { display: flex; gap: 28px; flex: 1; margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--s-muted); }
.s-nav-links a:hover { color: var(--s-text); }
.s-nav-cta { display: flex; gap: 10px; }
.s-nav-cta .s-btn { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.s-burger { display: none; width: 40px; height: 40px; margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--s-text); cursor: pointer; }
.s-burger span { display: block; width: 20px; height: 2px; margin: 5px auto; border-radius: 1px; background: currentColor; transition: transform .2s, opacity .2s; }
.s-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.s-burger.active span:nth-child(2) { opacity: 0; }
.s-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Меню на телефоне: в шапке только логотип и бургер, всё остальное —
   в экране под шапкой (.s-sheet). */
.s-sheet { display: none; }

@media (max-width: 760px) {
  .s-nav .s-wrap { height: 60px; gap: 12px; }
  .s-burger { display: block; }
  .s-nav-cta .ghost { display: none; }
  .s-nav.has-sheet .s-nav-links,
  .s-nav.has-sheet .s-nav-cta { display: none; }

  .s-sheet {
    position: fixed; top: 61px; left: 0; right: 0; bottom: 0; z-index: 49;
    display: flex; flex-direction: column;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    background: var(--s-ground); overflow-y: auto;
    animation: s-sheet-in .2s ease-out;
  }
  .s-sheet[hidden] { display: none; }
  .s-sheet-links { margin: 0; padding: 0; list-style: none; }
  .s-sheet-links a {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 2px; border-bottom: 1px solid var(--s-line);
    font-family: var(--s-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--s-text);
  }
  .s-sheet-links a span { flex: 1; min-width: 0; }
  .s-sheet-links small {
    display: block; margin-top: 6px;
    font-family: var(--s-body); font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--s-muted);
  }
  .s-sheet-links svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--s-muted); }
  .s-sheet-links a:active svg { color: var(--s-text); }
  .s-sheet-cta { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; gap: 10px; }
  .s-sheet-cta .s-btn { width: 100%; padding: 15px 20px; font-size: 16px; }
  .s-sheet-help { align-self: center; margin-top: 8px; padding: 6px; font-size: 14px; color: var(--s-muted); }
  html.s-locked, html.s-locked body { overflow: hidden; }
}
@keyframes s-sheet-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .s-sheet { animation: none; } }

/* ---------- Разделы ---------- */
.s-sec { padding: 110px 0 0; }
.s-sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.s-sec-head p { max-width: 40ch; color: var(--s-muted); }
.s-h2 { font-family: var(--s-display); font-weight: 600; font-size: 34px; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
.s-lead { max-width: 52ch; font-size: 17px; color: var(--s-soft); }
@media (max-width: 700px) {
  .s-sec { padding-top: 72px; }
  .s-sec-head { flex-direction: column; align-items: start; gap: 12px; margin-bottom: 22px; }
  .s-h2 { font-size: 25px; }
  .s-lead { font-size: 15.5px; }
}

/* Аура — мягкий свет за главным объектом страницы */
.s-aura { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; filter: blur(60px);
  background: radial-gradient(circle, rgba(205,160,217,.45) 0%, rgba(124,46,138,.45) 45%, transparent 70%);
  animation: s-breathe 7s ease-in-out infinite; }
@keyframes s-breathe { 50% { transform: scale(.92); opacity: .8; } }

/* ---------- Первый экран ---------- */
.s-hero { position: relative; overflow: hidden; padding: 76px 0 70px; border-bottom: 1px solid var(--s-line); }
.s-hero .s-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.s-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 6px 12px; border-radius: 999px; background: var(--s-wash); font-size: 14px; color: var(--s-soft); }
.s-tag b { color: var(--s-lilac); font-weight: 600; }
.s-hero h1 { margin-bottom: 22px; font-family: var(--s-display); font-weight: 600; font-size: 56px; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.s-hero .s-lead { margin-bottom: 34px; }
.s-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.s-trust { display: flex; gap: 40px; margin-top: 44px; }
.s-trust b { display: block; font-family: var(--s-display); font-weight: 600; font-size: 24px; line-height: 1.2; }
.s-trust span { font-size: 13.5px; color: var(--s-muted); }

.s-device { position: relative; justify-self: center; width: 280px; height: 570px; }
.s-device .s-aura { width: 560px; height: 560px; left: 50%; top: 50%; margin: -280px 0 0 -280px; transition: opacity .8s; }
.s-device.off .s-aura { opacity: .15; animation-play-state: paused; }
.s-mock { position: relative; z-index: 1; height: 100%; padding: 10px; border-radius: 44px; background: #1b1121; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.s-mock-in { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 24px 18px 18px; border-radius: 35px; background: var(--s-ground); }
.s-mock-top { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 13px; color: var(--s-muted); }
.s-mock-top .s-logo { font-size: 14px; gap: 7px; }
.s-mock-top .s-logo svg { width: 18px; height: 18px; }
.s-power { display: grid; place-items: center; width: 132px; height: 132px; margin: 64px 0 24px; border: 0; border-radius: 50%; background: var(--s-plum); cursor: pointer; transition: background .4s, box-shadow .4s; box-shadow: 0 0 0 10px rgba(124,46,138,.2), 0 0 0 22px rgba(124,46,138,.08); }
.s-power svg { width: 44px; height: 44px; color: #fff; }
/* Без синей вспышки и рамки после нажатия пальцем; рамка — только с клавиатуры */
.s-power { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; outline: none; }
.s-power:focus-visible { outline: 2px solid var(--s-lilac); outline-offset: 26px; }
.s-device.off .s-power { background: #221828; box-shadow: 0 0 0 10px rgba(255,255,255,.03), 0 0 0 22px rgba(255,255,255,.015); }
.s-m-state { font-size: 18px; font-weight: 600; text-align: center; }
.s-m-sub { width: 100%; margin-top: 2px; font-size: 13px; color: var(--s-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-m-card { width: 100%; margin-top: auto; border-radius: 16px; background: var(--s-raised); border: 1px solid var(--s-line); }
.s-m-card > div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; }
.s-m-card > div + div { border-top: 1px solid var(--s-line); }
.s-m-card .grow { flex: 1; }
.s-m-card small { font-size: 13px; color: var(--s-muted); }
.s-m-bar { flex: 1; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.08); }
.s-m-bar i { display: block; width: 76%; height: 100%; border-radius: 2px; background: var(--s-lilac); }

@media (max-width: 860px) {
  .s-hero { padding: 32px 0 48px; }
  .s-hero .s-wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .s-hero h1 { font-size: 32px; margin-bottom: 16px; }
  .s-tag { margin-bottom: 18px; font-size: 13px; }
  .s-hero .s-lead { margin-bottom: 26px; }
  .s-hero-cta .s-btn { flex: 1; }
  .s-trust { justify-content: space-between; gap: 0; margin-top: 32px; }
  .s-trust b { font-size: 20px; }
  .s-trust span { font-size: 12.5px; }
  .s-device { width: 240px; height: 490px; }
  .s-device .s-aura { width: 420px; height: 420px; margin: -210px 0 0 -210px; }
  .s-power { width: 110px; height: 110px; margin: 44px 0 20px; }
  .s-mock-in { padding: 24px 12px 14px; }
  .s-m-sub { font-size: 12px; }
}

/* Флаги стран — полосками, без картинок */
.s-flag { flex: none; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.s-flag.fi { background: linear-gradient(#fff 0 38%, #1f4fa3 38% 62%, #fff 62%); }
.s-flag.de { background: linear-gradient(#141414 0 33%, #d00 33% 66%, #ffce00 66%); }
.s-flag.se { background: linear-gradient(#0a5eb0 0 38%, #fecc02 38% 62%, #0a5eb0 62%); }
.s-flag.nl { background: linear-gradient(#ae1c28 0 33%, #fff 33% 66%, #21468b 66%); }

.s-servers { padding: 22px 0; border-bottom: 1px solid var(--s-line); }
.s-servers .s-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; font-size: 14.5px; }
.s-servers .s-wrap > span:first-child { color: var(--s-muted); }
.s-servers .s { display: inline-flex; align-items: center; gap: 9px; }
@media (max-width: 700px) { .s-servers .s-wrap { gap: 14px 20px; } .s-servers .s-wrap > span:first-child { width: 100%; } }

/* ---------- Возможности ---------- */
.s-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.s-panel { display: flex; flex-direction: column; padding: 26px; border-radius: 20px; background: var(--s-raised); border: 1px solid var(--s-line); }
.s-panel h3 { margin-bottom: 6px; font-size: 18px; font-weight: 600; }
.s-panel p { max-width: 46ch; color: var(--s-muted); }
.s-viz { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--s-line); }
.s-bars { display: grid; gap: 10px; font-size: 13.5px; color: var(--s-soft); }
.s-bars div { display: grid; grid-template-columns: 70px minmax(0, 1fr) 64px; align-items: center; gap: 12px; }
.s-bars em { font-style: normal; text-align: right; color: var(--s-muted); }
.s-bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.06); }
.s-bar i { display: block; height: 100%; border-radius: 4px; background: var(--s-lilac); }
.s-bar.base i { background: rgba(255,255,255,.3); }
.s-ip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.s-ip code { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--s-line); font: 14px var(--s-body); color: var(--s-muted); text-decoration: line-through; }
.s-ip code.hid { text-decoration: none; color: var(--s-lilac); border-color: var(--s-line-hi); background: var(--s-wash); }
.s-ip svg { width: 16px; height: 16px; color: var(--s-muted); }
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.s-chips span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--s-line-hi); font-size: 13.5px; color: var(--s-soft); }
.s-sig-row { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--s-soft); }
.s-sig { display: flex; align-items: end; gap: 5px; height: 26px; }
.s-sig i { width: 7px; border-radius: 2px; background: var(--s-lilac); }
@media (max-width: 700px) { .s-feat { grid-template-columns: minmax(0, 1fr); gap: 10px; } .s-panel { padding: 22px 20px; } }

/* ---------- Шаги: настоящая последовательность, поэтому номера ---------- */
.s-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.s-step { padding: 24px; border-radius: 20px; border: 1px solid var(--s-line); }
.s-step .n { display: block; margin-bottom: 18px; font-family: var(--s-display); font-weight: 600; font-size: 28px; color: var(--s-lilac); }
.s-step h3 { margin-bottom: 4px; font-size: 17px; font-weight: 600; }
.s-step p { font-size: 14.5px; color: var(--s-muted); }
@media (max-width: 700px) {
  .s-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .s-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 18px; }
  .s-step .n { grid-row: span 2; margin: 0; font-size: 22px; }
}

/* ---------- Тарифы ---------- */
.s-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.s-plan { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 18px; padding: 26px 24px 24px; border-radius: 22px; border: 1px solid var(--s-line); background: var(--s-raised); }
.s-plan.best { border-color: var(--s-line-hi); background: linear-gradient(180deg, rgba(124,46,138,.28), var(--s-raised) 60%); }
.s-plan.best::before { content: ''; position: absolute; z-index: -1; width: 280px; height: 280px; left: 50%; top: 0; translate: -50% -55%; border-radius: 50%; background: radial-gradient(circle, rgba(205,160,217,.4), rgba(124,46,138,.3) 45%, transparent 70%); filter: blur(40px); }
.s-plan-name { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 600; }
.s-plan-name span { padding: 2px 10px; border-radius: 999px; background: var(--s-lilac); color: var(--s-ground); font-size: 12px; font-weight: 600; }
.s-plan-big { display: flex; align-items: baseline; gap: 10px; }
.s-plan-big b { font-family: var(--s-display); font-weight: 700; font-size: 72px; line-height: .85; }
.s-plan-big span { font-size: 15px; color: var(--s-soft); }
.s-plan-price { font-family: var(--s-display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.s-plan-price small { font-family: var(--s-body); font-size: 14px; font-weight: 400; color: var(--s-muted); }
.s-plan ul { display: grid; gap: 8px; margin: 0; padding: 16px 0 0; list-style: none; border-top: 1px solid var(--s-line); font-size: 14px; color: var(--s-soft); }
.s-plan li { display: flex; align-items: center; gap: 10px; }
.s-plan li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--s-lilac); }
.s-plan .s-btn { margin-top: auto; }
.s-plan:not(.best) .s-btn { background: transparent; box-shadow: inset 0 0 0 1px var(--s-line-hi); }
.s-plan:not(.best) .s-btn:hover { background: rgba(255,255,255,.04); }
.s-plans-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding: 18px 22px; border-radius: 18px; border: 1px dashed var(--s-line-hi); font-size: 14.5px; color: var(--s-soft); }
.s-plans-note b { color: var(--s-text); }
.s-plans-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--s-muted); }

/* ---------- Вопросы (разметку открывает security.js) ---------- */
.s-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 56px; align-items: start; }
.s-help { margin-top: 24px; padding: 22px; border-radius: 20px; background: var(--s-raised); border: 1px solid var(--s-line); }
.s-help b { display: block; margin-bottom: 4px; font-size: 16px; }
.s-help p { margin-bottom: 16px; font-size: 14px; color: var(--s-muted); }
.s-page .faq-item { border-top: 1px solid var(--s-line); }
.s-page .faq-item:last-child { border-bottom: 1px solid var(--s-line); }
.s-page .faq-question { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; }
.s-page .faq-question h4 { font-size: 17px; font-weight: 500; }
.s-page .faq-question::after { content: '+'; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s-wash); color: var(--s-lilac); font-size: 18px; }
.s-page .faq-item.open .faq-question::after { content: '−'; }
.s-page .faq-answer p { max-width: 60ch; padding: 0 0 22px; color: var(--s-muted); }
@media (max-width: 700px) { .s-faq { grid-template-columns: minmax(0, 1fr); gap: 20px; } .s-page .faq-question { padding: 18px 0; } .s-page .faq-question h4 { font-size: 16px; } }

/* ---------- Финальный призыв и подвал ---------- */
.s-final { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 110px; padding: 56px; border-radius: 28px; background: var(--s-raised); border: 1px solid var(--s-line-hi); }
.s-final .s-aura { width: 520px; height: 420px; right: -120px; top: 50%; margin-top: -210px; opacity: .8; }
/* :not(.s-aura) обязателен: без него пятно света становилось обычным
   блоком в 520px и выталкивало текст на середину плашки. */
.s-final > div:not(.s-aura), .s-final > a { position: relative; z-index: 1; }
.s-final p { margin-top: 8px; color: var(--s-soft); }
.s-final-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.s-final-points li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--s-line-hi); font-size: 13.5px; color: var(--s-soft); }
@media (max-width: 700px) { .s-final { flex-direction: column; align-items: stretch; margin-top: 72px; padding: 32px 22px; border-radius: 22px; } .s-final .s-aura { right: -200px; } }

.s-foot { margin-top: 72px; padding: 40px 0; border-top: 1px solid var(--s-line); font-size: 14px; }
.s-foot .s-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.s-foot h4, .s-foot p { font-size: 14px; font-weight: 400; color: var(--s-muted); }
.s-foot p { margin-top: 10px; }
.s-foot h4 { margin-bottom: 10px; }
.s-foot ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--s-soft); }
.s-foot a:hover { color: var(--s-text); }
.s-foot .copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--s-line); font-size: 13px; color: var(--s-muted); }
@media (max-width: 700px) { .s-foot .s-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .s-foot .s-wrap > :first-child { grid-column: 1 / -1; } }
/* На телефоне — одной колонкой: иначе почта не влезает в половину ширины */
@media (max-width: 480px) { .s-foot .s-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.s-foot a { overflow-wrap: anywhere; }

/* ---------- Документы ---------- */
.s-legal { max-width: 760px; margin: 0 auto; padding: 64px 0 24px; }
.s-legal h1 { margin-bottom: 10px; font-family: var(--s-display); font-weight: 600; font-size: 38px; line-height: 1.12; letter-spacing: -.015em; }
.s-legal .last-updated { margin-bottom: 40px; font-size: 14.5px; color: var(--s-muted); }
.s-legal h2 { margin: 44px 0 14px; font-size: 21px; font-weight: 600; }
.s-legal p { margin-bottom: 14px; line-height: 1.75; color: var(--s-soft); }
.s-legal strong { color: var(--s-text); }
.s-legal ul { margin: 16px 0; padding-left: 22px; color: var(--s-soft); }
.s-legal li { margin-bottom: 9px; line-height: 1.75; }
.s-legal a { color: var(--s-lilac); }
.s-legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.s-legal .legal-note { margin: 24px 0; padding: 18px 22px; border-radius: 16px; border: 1px solid var(--s-line-hi); background: var(--s-wash); }
.s-legal .legal-note p:last-child { margin-bottom: 0; }
@media (max-width: 700px) { .s-legal { padding-top: 40px; } .s-legal h1 { font-size: 27px; } .s-legal h2 { font-size: 18px; } }

/* ---------- Уведомления и окно подтверждения (landing.js) ---------- */
.s-page .toast-container { position: fixed; top: 84px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.s-page .toast { display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 13px 16px; border-radius: 14px; background: var(--s-raised-2); border: 1px solid var(--s-line-hi); color: var(--s-text); font-size: 14.5px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.8); animation: s-toast-in .25s ease-out; }
.s-page .toast.error i { color: var(--s-bad); }
.s-page .toast.success i { color: var(--s-ok); }
.s-page .toast.warning i { color: #fbbf24; }
.s-page .toast.hiding { animation: s-toast-out .25s ease-in forwards; }
@keyframes s-toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes s-toast-out { to { opacity: 0; transform: translateY(-8px); } }
.s-page .confirm-overlay { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 2, 8, 0.8); backdrop-filter: blur(4px); }
.s-page .confirm-box { width: 100%; max-width: 400px; padding: 24px; border-radius: 20px; background: var(--s-raised); border: 1px solid var(--s-line-hi); }
.s-page .confirm-box p { margin-bottom: 20px; line-height: 1.5; }
.s-page .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.s-page .confirm-btn-cancel, .s-page .confirm-btn-ok { padding: 11px 18px; border: 0; border-radius: 12px; font: 600 14.5px var(--s-body); cursor: pointer; }
.s-page .confirm-btn-cancel { background: transparent; color: var(--s-text); box-shadow: inset 0 0 0 1px var(--s-line-hi); }
.s-page .confirm-btn-ok { background: var(--s-plum); color: #fff; }
@media (max-width: 600px) { .s-page .toast-container { left: 16px; right: 16px; top: 72px; } .s-page .toast { max-width: none; } }

@media (prefers-reduced-motion: reduce) {
  .s-page *, .s-page *::before { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ======================================================================
   Страница входа. Разметку форм и их скрипты не трогаем: слой ниже только
   перекрашивает правила security.css под новое оформление. Поэтому здесь
   всё начинается с .s-auth — чтобы быть сильнее старых селекторов.
   ====================================================================== */
.s-page button, .s-page input, .s-page select, .s-page textarea { font-family: inherit; }

.s-auth .auth-container {
  min-height: calc(100vh - 72px - 90px);
  padding: 56px 32px 72px;
  gap: 80px;
}
.s-auth .auth-container::before { display: none; }
/* Одна аура — за формой: это главный объект страницы */
.s-auth .auth-container::after {
  width: 520px; height: 520px; right: 4%; bottom: auto; top: 50%; margin-top: -260px;
  background: radial-gradient(circle, rgba(205,160,217,.45) 0%, rgba(124,46,138,.45) 45%, transparent 70%);
  filter: blur(60px); opacity: .55;
}

.s-doors-title { margin-bottom: 18px; font-family: var(--s-display); font-weight: 600; font-size: 46px; line-height: 1.08; letter-spacing: -.02em; }
.s-doors .s-lead { max-width: 44ch; }
.s-door-list { display: grid; gap: 10px; max-width: 400px; margin-top: 32px; }
.s-door-list span { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--s-line); background: var(--s-raised); font-size: 15px; font-weight: 500; }
.s-door-list i { width: 20px; text-align: center; color: var(--s-lilac); }
.s-door-list em { margin-left: auto; font-style: normal; font-size: 13.5px; font-weight: 400; color: var(--s-muted); }
.s-auth-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--s-muted); }
.s-auth-steps li { display: flex; align-items: center; gap: 8px; }
.s-auth-steps span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--s-wash); color: var(--s-lilac); font-family: var(--s-display); font-size: 11px; }

.s-auth .auth-box {
  padding: 32px;
  border-radius: 22px;
  border: 1px solid var(--s-line-hi);
  background: var(--s-raised);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.s-auth .auth-box::before { display: none; }
.s-auth .panel-step { margin-bottom: 14px; font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--s-muted); }

.s-auth .auth-tabs { gap: 3px; padding: 3px; margin-bottom: 24px; border-radius: 12px; background: var(--s-ground); border: 1px solid var(--s-line); }
.s-auth .auth-tab { border-radius: 9px; padding: 10px; font-size: 14.5px; font-weight: 600; color: var(--s-muted); background: transparent; box-shadow: none; }
.s-auth .auth-tab.active { background: var(--s-plum); color: #fff; }
.s-auth .auth-tab i { display: none; }

.s-auth .auth-form h2 { margin-bottom: 20px; font-family: var(--s-display); font-weight: 600; font-size: 22px; background: none; -webkit-text-fill-color: currentColor; color: var(--s-text); }
.s-auth .form-group { margin-bottom: 16px; }
.s-auth .form-group label { font-size: 13.5px; font-weight: 500; color: var(--s-soft); }
.s-auth .form-group input:not([type="checkbox"]), .s-input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--s-line-hi); background: var(--s-ground);
  color: var(--s-text); font: 15px var(--s-body); outline: none; box-shadow: none;
  transition: border-color .15s;
}
.s-auth .form-group input:not([type="checkbox"]):focus, .s-input:focus { border-color: var(--s-lilac); box-shadow: 0 0 0 3px rgba(205,160,217,.12); }
.s-auth .form-check input[type="checkbox"] { accent-color: var(--s-plum); }
.s-auth .toggle-password { color: var(--s-muted); }

.s-auth .btn { border-radius: 12px; font-family: var(--s-body); font-weight: 600; }
.s-auth .btn-primary { background: var(--s-plum); box-shadow: none; color: #fff; }
.s-auth .btn-primary:hover { background: var(--s-plum-hi); transform: none; box-shadow: none; }
.s-auth .btn-primary i { display: none; }

.s-auth .form-help { color: var(--s-muted); }
.s-auth .form-help a, .s-auth .form-check a { color: var(--s-lilac); }

.s-auth .oauth-divider { color: var(--s-muted); }
.s-auth .oauth-divider::before, .s-auth .oauth-divider::after { background: var(--s-line); }
.s-auth .oauth-btn { border-radius: 12px; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--s-line-hi); color: var(--s-text); font-weight: 500; }
.s-auth .oauth-btn:hover { background: rgba(255,255,255,.04); transform: none; }

.s-auth .code-cells input { border-radius: 12px; border: 1px solid var(--s-line-hi); background: var(--s-ground); color: var(--s-text); font-family: var(--s-display); }
.s-auth .code-cells input:focus, .s-auth .code-cells input.filled { border-color: var(--s-lilac); }
.s-auth .success-message .success-icon i { color: var(--s-ok); }

/* Окно «Забыли пароль» */
.s-modal-box { position: relative; width: 100%; max-width: 400px; padding: 28px; border-radius: 20px; background: var(--s-raised); border: 1px solid var(--s-line-hi); }
.s-modal-title { margin-bottom: 20px; font-family: var(--s-display); font-size: 19px; font-weight: 600; color: var(--s-text); }

/* Узкий подвал для страниц с формой */
.s-foot-slim { margin-top: 0; padding: 24px 0 28px; }
.s-foot-slim .s-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--s-muted); }
.s-foot-slim nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.s-foot-slim a:hover { color: var(--s-text); }

@media (max-width: 1024px) {
  .s-auth .auth-container { padding: 32px 20px 48px; }
  .s-auth .auth-container::after { right: 50%; margin-right: -260px; }
}
@media (max-width: 480px) {
  .s-auth .auth-box { padding: 24px 18px; }
  .s-auth .auth-container { padding: 20px 14px 40px; }
}

/* [hidden] должен прятать и блоки со своим display */
.s-page [hidden] { display: none !important; }
.s-m-card small { white-space: nowrap; }
