/* Лендинг GoInFlow. Отдельный файл: гостю не нужны 93 КБ стилей
   приложения, а первый экран рекламного трафика должен открываться сразу.

   Правила оформления: один акцентный цвет (фирменный синий), никаких
   рамок и градиентов — поверхности отделяются фоном и воздухом. Шрифт —
   Onest (SIL OFL 1.1, assets/fonts/OFL.txt), цифры моноширинные (tnum),
   чтобы суммы не прыгали. Анимации конечные: в покое страница ничего
   не пересчитывает. */

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-cyrillic.woff2?v=1) 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: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-latin.woff2?v=1) 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: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/onest-ruble.woff2?v=1) format("woff2");
  unicode-range: U+20BD;
}

/* Палитра — та же, что у приложения (блок палитры в style.css, роли
   --p-* из _private/DESIGN_STANDARD.md). Файлы раздельные, поэтому значения
   повторены здесь; менять их нужно в обоих местах сразу. */
:root {
  color-scheme: light;
  --bg: #f1f4fa;
  --alt: #e8eef8;
  --surface: #ffffff;
  --ink: #0f1b33;
  --muted: #4f5f7a;
  --accent: #1d50c8;
  --accent-hover: #173fa3;
  --accent-ink: #ffffff;
  --button-bg: #1f5eea;
  --button-hover: #1a51cf;
  --button-ink: #ffffff;
  --accent-soft: #e6eeff;
  --hair: rgba(15, 27, 51, .09);
  --invert-bg: #0e1830;
  --invert-ink: #f1f5ff;
  --invert-muted: #a8b6d1;
  --shadow: 0 30px 60px -28px rgba(15, 27, 51, .28);
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060c1a;
  --alt: #0a1224;
  --surface: #0e1830;
  --ink: #f1f5ff;
  --muted: #a8b6d1;
  --accent: #7fb2ff;
  --accent-hover: #a9cbff;
  --accent-ink: #04112b;
  --button-bg: #2c66f8;
  --button-hover: #4a7cff;
  --accent-soft: #152a52;
  --hair: rgba(241, 245, 255, .1);
  --invert-bg: #f1f5ff;
  --invert-ink: #0f1b33;
  --invert-muted: #4f5f7a;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.lp {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.lp-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.lp-skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); text-decoration: none; }
.lp-skip:focus { top: 12px; }

/* --- Кнопки ---------------------------------------------------------- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.lp-btn:hover { background: var(--button-hover); }
.lp-btn:active { transform: scale(.97); }
.lp-btn-small { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.lp-btn-large { min-height: 64px; padding: 0 36px; font-size: 1.25rem; }
.lp-link { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--hair); transition: text-decoration-color .2s; }
.lp-link:hover { text-decoration-color: currentColor; }

/* --- Шапка ----------------------------------------------------------- */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.lp-header.is-scrolled, body.lp-menu-open .lp-header { background: var(--bg); box-shadow: 0 1px 0 var(--hair); }
.lp-header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.lp-logo img { width: 32px; height: 32px; }
.lp-nav { display: flex; gap: 4px; margin-left: auto; }
.lp-nav a { padding: 10px 14px; border-radius: 999px; color: var(--muted); font-size: 1rem; font-weight: 500; text-decoration: none; transition: color .2s, background-color .2s; }
.lp-nav a:hover { color: var(--ink); background: var(--alt); }
.lp-header-cta { margin-left: 8px; }
.lp-theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--alt);
  color: var(--ink);
  cursor: pointer;
}
.lp-theme-toggle:hover { background: var(--surface); }
.lp-theme-toggle svg { width: 22px; height: 22px; }
.lp-theme-sun { display: none; }
:root[data-theme="dark"] .lp-theme-sun { display: block; }
:root[data-theme="dark"] .lp-theme-moon { display: none; }
.lp-burger { display: none; }

@media (max-width: 399px) {
  .lp-header-row { gap: 8px; }
  .lp-header-row .lp-logo span { display: none; }
}

@media (max-width: 859px) {
  .lp-header-cta { margin-left: auto; }
  .lp-burger {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--alt);
    color: var(--ink);
    cursor: pointer;
  }
  .lp-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease); }
  body.lp-menu-open .lp-burger span:first-child { transform: translateY(4px) rotate(45deg); }
  body.lp-menu-open .lp-burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .lp-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--hair), 0 24px 40px -24px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  body.lp-menu-open .lp-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .lp-nav a { padding: 14px 0; border-radius: 0; color: var(--ink); font-size: 1.25rem; font-weight: 600; }
  .lp-nav a:hover { background: none; color: var(--accent); }
}

/* --- Первый экран ------------------------------------------------------ */
.lp-hero { padding-block: clamp(32px, 6vw, 88px) clamp(64px, 9vw, 128px); overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.lp-kicker { margin-bottom: 20px; color: var(--accent); font-size: 1rem; font-weight: 600; }
.lp-hero h1 { font-size: clamp(2.6rem, 1.3rem + 4.6vw, 5rem); font-weight: 650; line-height: 1.02; letter-spacing: -.035em; }
.lp-lead { max-width: 34ch; margin-top: 24px; color: var(--muted); font-size: clamp(1.2rem, 1.05rem + .5vw, 1.4rem); line-height: 1.5; }
.lp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.lp-note { margin-top: 20px; color: var(--muted); font-size: 1rem; }

.lp-demo { position: relative; max-width: 440px; justify-self: end; width: 100%; }
.lp-demo-card {
  padding: 32px 28px 24px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.lp-demo-label { display: block; color: var(--muted); font-size: 1rem; }
.lp-demo-sum { display: block; margin-top: 6px; font-size: clamp(2.8rem, 2rem + 3vw, 3.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; white-space: nowrap; }
.lp-demo-bar { display: block; height: 10px; margin-top: 24px; border-radius: 999px; background: var(--alt); overflow: hidden; }
.lp-demo-bar i { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: lpBar 1.3s .45s var(--ease) both; }
.lp-demo-bar-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .95rem; }
.lp-demo-list { display: grid; gap: 2px; margin: 24px 0 0; padding: 0; list-style: none; }
.lp-demo-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  animation: lpRise .6s var(--ease) both;
}
.lp-demo-list li:nth-child(1) { animation-delay: 1s; }
.lp-demo-list li:nth-child(2) { animation-delay: 1.12s; }
.lp-demo-list li:nth-child(3) { animation-delay: 1.24s; }
.lp-demo-list span { font-weight: 500; }
.lp-demo-list b { font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.lp-demo-list small { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }

.lp-demo-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 340px;
  margin: -18px 0 0 -28px;
  padding: 14px 20px 14px 14px;
  border-radius: 24px;
  background: var(--invert-bg);
  color: var(--invert-ink);
  font-size: 1rem;
  line-height: 1.4;
  position: relative;
  animation: lpPop .7s 1.6s var(--ease) both;
}
.lp-mascot { flex: none; display: block; width: 56px; height: 56px; }
.lp-mascot .m-body { transform-origin: 50% 92%; animation: lpHop .9s 2.1s var(--ease) 2; }

@media (max-width: 859px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-demo { justify-self: center; max-width: 460px; }
  .lp-demo-hint { margin: -18px 0 0 12px; }
}
@media (max-width: 420px) {
  .lp-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .lp-demo-card { padding: 26px 20px 18px; border-radius: 26px; }
  .lp-demo-hint { margin-left: 0; }
}

/* Ёжик: цвета из приложения (style.css), чтобы он был тем же персонажем. */
.mascot-art { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot-art * { transform-box: fill-box; transform-origin: center; }
.mascot-art .m-quills-back { fill: #b07a4e; stroke: #b07a4e; stroke-width: 2.6; stroke-linejoin: round; }
.mascot-art .m-quills-tips { fill: none; stroke: #e1b98f; stroke-width: 1.1; stroke-linecap: round; }
.mascot-art .m-head { fill: #fff1de; stroke: #d8ab7f; stroke-width: 1.1; }
.mascot-art .m-ear-out { fill: #fbe1c3; stroke: #d8ab7f; stroke-width: 1; }
.mascot-art .m-ear-in { fill: #f3a99a; }
.mascot-art .m-gloss { fill: #fff; opacity: .7; }
.mascot-art .m-cheek { fill: #ff8f8f; opacity: .45; }
.mascot-art .m-eye ellipse, .mascot-art .m-nose { fill: #2b1d24; }
.mascot-art .m-glint { fill: #fff; }
.mascot-art .m-mouth { fill: none; stroke: #2b1d24; stroke-width: 1.5; stroke-linecap: round; }
.mascot-art .m-foot { fill: #8c5c38; }
.mascot-art .m-halo, .mascot-art .m-sweat, .mascot-art .m-sparkles, .mascot-art .m-eyes-happy, .mascot-art .m-brows { display: none; }

/* --- Секции ------------------------------------------------------------ */
.lp-section { padding-block: clamp(72px, 10vw, 136px); }
.lp-section-alt { background: var(--alt); }
.lp-h2 { max-width: 20ch; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.08; letter-spacing: -.035em; }
.lp-section-lead { max-width: 40ch; margin-top: 20px; color: var(--muted); font-size: 1.25rem; }

.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px); margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; list-style: none; }
.lp-step-num { display: block; margin-bottom: 20px; color: var(--accent); font-size: clamp(3rem, 2rem + 3vw, 4.5rem); font-weight: 700; line-height: 1; letter-spacing: -.05em; }
.lp-steps h3, .lp-feature h3 { font-size: 1.5rem; line-height: 1.2; }
.lp-steps p, .lp-feature p { margin-top: 10px; color: var(--muted); }

.lp-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 6vw, 72px); }
.lp-feature { padding: clamp(28px, 3.5vw, 44px); border-radius: 28px; background: var(--surface); }

.lp-goal .lp-h2 { max-width: 22ch; }
.lp-goal-lead { max-width: 44ch; margin-top: 28px; color: var(--muted); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); line-height: 1.45; }
.lp-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; list-style: none; }
.lp-principles li { padding-top: 20px; border-top: 3px solid var(--ink); }
.lp-principles b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.lp-principles span { display: block; margin-top: 8px; color: var(--muted); }

.lp-plans { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.lp-plan { display: flex; flex-direction: column; gap: 12px; padding: clamp(28px, 3.5vw, 44px); border-radius: 28px; background: var(--surface); }
.lp-plan h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.lp-plan > p:not(.lp-price) { color: var(--muted); }
.lp-price { font-size: 1.5rem; font-weight: 600; line-height: 1; }
.lp-price b { font-size: clamp(3.5rem, 2.5rem + 3vw, 5rem); font-weight: 700; letter-spacing: -.05em; }
.lp-price small { display: block; margin-top: 10px; font-size: 1rem; font-weight: 400; letter-spacing: 0; }
.lp-plan-main { background: var(--invert-bg); color: var(--invert-ink); }
.lp-plan-main > p:not(.lp-price), .lp-plan-main .lp-price small { color: var(--invert-muted); }
.lp-plan-alt { margin-top: auto; padding-top: 8px; }

.lp-final { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(48px, 7vw, 88px); }
.lp-final p { max-width: 24ch; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }

@media (max-width: 859px) {
  .lp-steps, .lp-principles { grid-template-columns: 1fr; }
  .lp-features, .lp-plans { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lp-final .lp-btn { width: 100%; }
}

/* --- Подвал ------------------------------------------------------------ */
.lp-footer { padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 1rem; }
.lp-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.lp-footer-brand p { max-width: 28ch; margin-top: 12px; color: var(--muted); }
.lp-footer-links, .lp-footer-legal { display: grid; gap: 10px; align-content: start; color: var(--muted); }
.lp-footer-links a, .lp-footer-legal a { text-decoration: none; }
.lp-footer-links a:hover, .lp-footer-legal a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 859px) { .lp-footer-grid { grid-template-columns: 1fr; } }

/* --- Справка о cookie -------------------------------------------------- */
.cookie-notice {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  width: min(640px, calc(100% - 24px));
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--invert-bg);
  color: var(--invert-ink);
  font-size: 1rem;
  line-height: 1.45;
  transform: translateX(-50%);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .45);
  animation: lpNotice .4s var(--ease) both;
}
.cookie-notice p { flex: 1 1 280px; }
.cookie-notice a { color: inherit; }
.cookie-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-notice button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--invert-ink); color: var(--invert-bg); font: inherit; font-weight: 600; cursor: pointer; }
.cookie-notice .cookie-notice-secondary { background: transparent; color: var(--invert-ink); text-decoration: underline; text-underline-offset: 4px; }
.cookie-notice.is-leaving { opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }

/* --- Движение ---------------------------------------------------------- */
.lp-rise { animation: lpRise .8s var(--ease) both; }
.lp-hero-copy .lp-rise:nth-child(2) { animation-delay: .06s; }
.lp-hero-copy .lp-rise:nth-child(3) { animation-delay: .14s; }
.lp-hero-copy .lp-rise:nth-child(4) { animation-delay: .22s; }
.lp-hero-copy .lp-rise:nth-child(5) { animation-delay: .3s; }
.lp-demo.lp-rise { animation-delay: .2s; }

.js .lp-reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .lp-reveal.is-in { opacity: 1; transform: none; }
.lp-steps .lp-reveal:nth-child(2), .lp-features .lp-reveal:nth-child(2), .lp-principles .lp-reveal:nth-child(2), .lp-plans .lp-reveal:nth-child(2) { transition-delay: .1s; }
.lp-steps .lp-reveal:nth-child(3), .lp-features .lp-reveal:nth-child(3), .lp-principles .lp-reveal:nth-child(3) { transition-delay: .2s; }
.lp-features .lp-reveal:nth-child(4) { transition-delay: .3s; }

@keyframes lpRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes lpBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lpPop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes lpHop { 0%, 100% { transform: none; } 40% { transform: translateY(-5px) rotate(-4deg); } 70% { transform: translateY(0) rotate(2deg); } }
@keyframes lpNotice { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .lp-reveal { opacity: 1; transform: none; }
}

/* ======================================================================
   Страница входа (/?auth=…). Разметка — в index.php, логика вкладок,
   паролей и отпечатка — во встроенном скрипте там же. Здесь только вид:
   те же поверхности, шрифт и акцент, что у лендинга.
   ====================================================================== */
.lp-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lp-auth .lp-header { background: var(--bg); }
.lp-auth-back { margin-left: auto; color: var(--muted); font-size: 1rem; font-weight: 500; text-decoration: none; }
.lp-auth-back:hover { color: var(--ink); }

.lp-auth main.login { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(16px, 4vw, 56px) var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px)); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(40px, 7vw, 96px); align-items: start; }

.auth-hero { position: relative; padding-top: 24px; animation: lpRise .7s var(--ease) both; }
.auth-hero .brand, .auth-mobile-brand { display: none; }
.auth-mascot { display: block; width: 88px; height: 88px; margin-bottom: 28px; }
.auth-hero h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.75rem); line-height: 1.05; letter-spacing: -.035em; }
.auth-hero > p { max-width: 30ch; margin-top: 20px; color: var(--muted); font-size: 1.25rem; }
.auth-pricing { margin-top: 36px; }
.auth-trial { font-size: 1.125rem; }
.auth-trial b { font-weight: 650; }
.auth-pricing-more { margin-top: 12px; }
.auth-pricing-more summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; }
.auth-pricing-more summary::-webkit-details-marker { display: none; }
.auth-pricing-more summary::after { content: ""; width: 8px; height: 8px; margin-left: 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.auth-pricing-more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.auth-pricing-more dl { display: grid; gap: 14px; margin: 12px 0 0; }
.auth-pricing-more dl div { display: grid; gap: 2px; }
.auth-pricing-more dt { font-weight: 600; }
.auth-pricing-more dd { margin: 0; color: var(--muted); }
.auth-pricing-tiers { padding-top: 14px; border-top: 1px solid var(--hair); }
.auth-pricing-note { margin-top: 14px; color: var(--muted); }

.auth-card { padding: clamp(24px, 4vw, 40px); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); animation: lpRise .7s .08s var(--ease) both; }

.auth-tab-buttons { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--alt); }
.auth-tab-button { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.auth-tab-button:hover { color: var(--ink); }
.auth-tab-button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.auth-panels { margin-top: 28px; }

.lp-auth .form { display: grid; gap: 20px; }
.auth-panel.active { animation: lpRise .35s var(--ease) both; }
.auth-panel h2 { font-size: 1.875rem; line-height: 1.15; }
.auth-panel h2 + .muted { margin-top: -10px; }
.lp-auth .muted { color: var(--muted); }
.lp-auth label { display: grid; gap: 8px; font-size: 1rem; font-weight: 600; }
.lp-auth input:not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--alt);
  color: var(--ink);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.lp-auth input::placeholder { color: var(--muted); opacity: .7; }
.lp-auth input:not([type="checkbox"]):focus { outline: none; border-color: var(--accent); background: var(--surface); }
.lp-auth input[aria-invalid="true"] { border-color: #c2413a; }
.password-field { position: relative; display: block; }
.lp-auth .password-field input { padding-right: 60px; }
.password-toggle { position: absolute; top: 50%; right: 7px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { color: var(--ink); }
.field-hint { color: var(--muted); font-size: .95rem; font-weight: 400; }
.auth-field-error { color: #c2413a; font-size: .95rem; font-weight: 500; }
:root[data-theme="dark"] .auth-field-error { color: #ff8a80; }

.lp-auth .btn-primary {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-ink);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.lp-auth .btn-primary:hover { background: var(--button-hover); }
.lp-auth .btn-primary:active { transform: scale(.98); }
.linklike { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; }
.auth-forgot { justify-self: end; min-height: 44px; margin-block: -14px -6px; padding-inline: 4px; }
.auth-biometric { min-height: 54px; border: 0; border-radius: 999px; background: var(--alt); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.auth-reset-back { justify-self: center; color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-totp-cancel { margin-top: 16px; text-align: center; }
.lp-auth .totp-code-input { font-size: 1.75rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

.lp-auth .legal-consent { display: flex; align-items: flex-start; gap: 12px; font-size: 1rem; font-weight: 400; line-height: 1.45; }
.legal-consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.legal-consent a { color: var(--accent); text-decoration: none; font-weight: 500; }
.legal-consent a:hover { text-decoration: underline; }
.legal-consent .auth-field-error { display: block; margin-top: 4px; }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; padding: 14px 18px; border-radius: 16px; font-size: 1rem; }
.notice > span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: .85rem; font-weight: 700; }
.notice.danger { background: #fbe6e4; color: #7a1f19; }
.notice.danger > span { background: #c2413a; }
.notice.good { background: #e2f1e7; color: #1b5231; }
.notice.good > span { background: #2e8a52; }
:root[data-theme="dark"] .notice.danger { background: #3a1d1b; color: #ffc9c4; }
:root[data-theme="dark"] .notice.good { background: #16301f; color: #bfe8cc; }
.notice:focus { outline: none; }

.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: .95rem; }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 859px) {
  .auth-shell { grid-template-columns: 1fr; gap: 24px; }
  .auth-card { order: -1; }
  .auth-hero { padding-top: 8px; }
  .auth-mascot { display: none; }
  .auth-hero h1 { font-size: 1.75rem; }
  .auth-hero > p { font-size: 1.125rem; margin-top: 10px; }
  .auth-pricing { margin-top: 20px; }
}
@media (max-width: 420px) {
  .lp-auth main.login { padding-inline: 12px; }
  .auth-card { padding: 22px 18px; border-radius: 26px; }
  .auth-tab-button { padding: 0 6px; font-size: .95rem; }
}
/* На 320px три вкладки не помещались: страница расширялась до 335px, и
   телефон уменьшал масштаб всей формы. */
@media (max-width: 360px) {
  .auth-tab-buttons { gap: 2px; padding: 3px; }
  .auth-tab-button { padding: 0 2px; font-size: .85rem; }
  .auth-card { padding-inline: 14px; }
}

/* Заставка при запуске установленного приложения: без неё PWA мигала
   белым. Простой логотип на фоне страницы, уходит после загрузки. */
.app-splash { position: fixed; z-index: 100; inset: 0; display: none; place-content: center; justify-items: center; gap: 14px; background: var(--bg); }
.app-splash-mark img { width: 72px; height: 72px; border-radius: 20px; }
.app-splash-word { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.app-splash-track { display: none; }
@media (display-mode: standalone) { body.app-booting .app-splash { display: grid; } }

/* Индикатор «потянуть, чтобы обновить» — управляет скрипт страницы. */
/* --- Обновление жестом «потянуть вниз»: монета ---------------------------
   Монета с рублём выезжает сверху и поворачивается вслед за пальцем
   (--pull-progress от 0 до 1 и --pull-rotation ставит скрипт жеста). На
   пороге — вспышка кольца и искры; после отпускания монета крутится, пока
   страница перезагружается. Движутся только transform и opacity, и только
   пока идёт жест или загрузка: в покое индикатор скрыт и ничего не считает.
   Этот же блок дословно повторён в landing.css — экран входа грузится без
   стилей приложения; цвета берутся из палитры того файла, в котором блок. */
.refresh-indicator {
  --pull-y: -72px; --pull-rotation: 0deg; --pull-progress: 0;
  --coin-hi: #9cc0ff; --coin-mid: var(--p-blue, var(--button-bg, #2c66f8)); --coin-lo: #1a41bd; --coin-edge: #14339a;
  position: fixed; z-index: 120; left: 50%; top: max(10px, env(safe-area-inset-top, 0px));
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0; padding: 0;
  border: 0; border-radius: 50%; background: none; box-shadow: none;
  opacity: 0; pointer-events: none; perspective: 360px;
  transform: translate(-50%, var(--pull-y));
  transition: opacity 160ms ease, transform 240ms cubic-bezier(.2, .8, .2, 1);
}
.refresh-coin {
  position: relative; display: block; width: 44px; height: 44px; transform-style: preserve-3d;
  transform: scale(calc(.62 + .38 * var(--pull-progress)));
}
.coin-glow {
  position: absolute; inset: -14px; border-radius: 50%; opacity: calc(.75 * var(--pull-progress));
  background: radial-gradient(circle, color-mix(in oklab, var(--coin-mid) 62%, transparent) 0, transparent 68%);
}
.coin-ring { position: absolute; inset: -5px; border: 1.5px solid color-mix(in oklab, var(--coin-mid) 65%, var(--coin-hi)); border-radius: 50%; opacity: 0; }
.coin-body {
  position: absolute; inset: 0; display: block; border-radius: 50%; transform-style: preserve-3d;
  transform: rotateY(calc(var(--pull-rotation) * 1.4));
}
/* Толщина монеты: три тёмных диска между лицевой и обратной стороной. */
.coin-body::before, .coin-body::after, .coin-rim { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--coin-edge); }
.coin-body::before { transform: translateZ(1.4px); }
.coin-body::after { transform: translateZ(-1.4px); }
.coin-face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: radial-gradient(circle at 32% 26%, var(--coin-hi) 0, var(--coin-mid) 46%, var(--coin-lo) 100%);
  box-shadow: inset 0 0 0 2px var(--coin-hi), inset 0 0 0 3.5px var(--coin-lo);
  transform: translateZ(2.8px);
}
.coin-face.coin-back {
  background: radial-gradient(circle at 68% 26%, var(--coin-hi) 0, var(--coin-mid) 40%, var(--coin-lo) 100%);
  transform: rotateY(180deg) translateZ(2.8px);
}
.coin-face svg { display: block; width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.coin-spark {
  position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: color-mix(in oklab, var(--coin-mid) 65%, var(--coin-hi)); opacity: 0;
  transform: rotate(var(--a, 0deg)) translateY(-14px) scale(.4);
}
.coin-spark:nth-of-type(odd) { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; background: var(--coin-hi); }

body.pull-active .refresh-indicator, body.pull-ready .refresh-indicator { opacity: 1; transition: opacity 120ms ease; }
body.page-loading .refresh-indicator, body.app-booting .refresh-indicator { opacity: 0; }
body.pull-refreshing .refresh-indicator, body.swipe-leaving .refresh-indicator { --pull-y: 14px; --pull-progress: 1; opacity: 1; }
/* Порог пройден: монета подпрыгивает, кольцо расходится, искры разлетаются. */
body.pull-ready .refresh-coin { animation: coinPop 340ms cubic-bezier(.3, 1.6, .5, 1) both; }
body.pull-ready .coin-ring { animation: coinRing 560ms ease-out both; }
body.pull-ready .coin-spark { animation: coinSpark 620ms ease-out both; }
/* Загрузка: монета крутится, свечение дышит, искры идут по кругу. */
body:is(.pull-refreshing, .swipe-leaving) .coin-body { animation: coinFlip 760ms linear infinite; }
body:is(.pull-refreshing, .swipe-leaving) .coin-glow { animation: coinGlow 760ms ease-in-out infinite alternate; }
body:is(.pull-refreshing, .swipe-leaving) .coin-ring { animation: coinRing 760ms ease-out infinite; }
body:is(.pull-refreshing, .swipe-leaving) .coin-spark { animation: coinSpark 760ms ease-out infinite; animation-delay: calc(var(--i, 0) * 95ms); }
@keyframes coinFlip { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes coinPop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes coinRing { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes coinGlow { from { opacity: .45; transform: scale(.9); } to { opacity: .95; transform: scale(1.15); } }
@keyframes coinSpark {
  0% { opacity: 0; transform: rotate(var(--a, 0deg)) translateY(-14px) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a, 0deg)) translateY(-38px) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .refresh-indicator { transition: opacity 160ms ease; }
  .refresh-coin, .coin-body, .coin-glow, .coin-ring, .coin-spark { animation: none !important; }
  .coin-body { transform: none; }
}
