/*
 * Токены оформления «Ценовода» — стиль «Садовод» (BTPR-942).
 *
 * ЕДИНСТВЕННОЕ место, где живут цвета, шрифт и радиусы. Tailwind
 * (`tailwind.config.js`) ссылается на эти переменные по имени, компоненты —
 * только на классы Tailwind. Сайт cenovod.ru и приложение Android берут ровно
 * этот набор: меняется оттенок — меняется здесь, во всех местах сразу.
 *
 * Тема (светлая или тёмная) приходит из Telegram (`theme.ts` ставит класс
 * `.dark` по `colorScheme`), а ЦВЕТА — наши. Цвета темы Telegram (`themeParams`)
 * мы больше не читаем: на них держался серый вид приложения, и они разные у
 * каждого клиента Telegram. Шапку и фон самого Telegram `theme.ts` красит в
 * `--c-page`, чтобы окно не было двухцветным.
 *
 * Правила палитры (утверждены владельцем 05.10.2026 вместе с макетами):
 * - серого нет: вторичный текст и подложки — тона зелёного;
 * - зелёное = выгодно, красное = только рост цены; кнопки, тумблеры, вкладки,
 *   предупреждения и пауза не красные;
 * - абрикос — только целевая цена;
 * - точка непрочитанных — красная в обеих темах.
 */

:root {
  color-scheme: light;
  /* Поверхности */
  --c-page: #faf7ef; /* фон экрана */
  --c-surface: #ffffff; /* карточки, шторки */
  --c-product-photo: #ffffff; /* подложка фото товара в обеих темах */
  --c-soft: #e4f5e9; /* подложки, плитки, неактивные чипы, дорожка прогресса */
  --c-soft-2: #d2ecdb; /* нажатое состояние подложки */
  --c-line: #dcede2; /* разделители */
  --c-shadow: rgba(31, 122, 77, 0.08);
  --c-overlay: rgba(18, 24, 20, 0.45);

  /* Текст */
  --c-ink: #1f2a24; /* основной */
  --c-muted: #4e7262; /* вторичный: зелёный, не серый (5,4:1 на белом, 4,7:1 на подложке) */

  /* Бренд */
  --c-primary: #1f7a4d; /* главные кнопки, белый текст 5,3:1 */
  --c-on-primary: #ffffff;
  --c-accent: #1f7a4d; /* активная вкладка, выбранный магазин, чипы, тумблеры, ссылки */
  --c-on-accent: #ffffff;
  /* Фирменная кнопка Telegram в формах сайта (DES-010, вариант Б). */
  --c-telegram-login: #2f6ea5;
  --c-telegram-login-ink: #ffffff;

  /* Направление цены */
  --c-drop-bg: #4ade80; /* плашка падения: ярче кнопки и другой формы */
  --c-drop-ink: #0b3d24; /* 7:1 на #4ade80 */
  --c-rise-bg: #c53030; /* плашка роста */
  --c-rise-ink: #ffffff; /* 5,5:1 */
  --c-down: #1f7a4d; /* цвет снижения в тексте и на графике */
  --c-up: #c53030; /* цвет роста в тексте и на графике */
  --c-chart-flat: #a9c4b4; /* «цена держалась» и «не проверяли» на графике */

  /* Целевая цена — единственное место абрикоса */
  --c-target: #ff9f43;
  --c-target-ink: #1f2a24; /* текст на абрикосе */
  --c-target-soft: #ffe8d1; /* строка «Сообщить, когда цена дойдёт до» */

  /* Пауза: песок, не прозрачность */
  --c-pause-bg: #f6ecd2;
  --c-pause-ink: #6b5523;
  --c-pause-badge: #6b5523; /* плашка «На паузе» */
  --c-on-pause-badge: #f6ecd2;

  /* Предупреждения и ошибки ввода — тёмный янтарь, не красный */
  --c-warn: #9a4a12;
  --c-warn-soft: #fbe8d6;

  /* Точка непрочитанных */
  --c-dot: #e5484d;

  /* Ручка тумблера — белая в обеих темах */
  --c-knob: #ffffff;

  /* Иконки видов уведомлений: кружок и знак на нём */
  --c-kind-drop: #1f7a4d;
  --c-kind-up: #c53030;
  --c-kind-stock: #f0e2bd;
  --c-on-kind-stock: #6b5523;

  /* Тёмно-зелёная полоса сайта: первый экран на телефоне, призыв внизу страницы */
  --c-deep: #0b3d24;
  --c-on-deep: #f4f0e6; /* 11:1 */
  --c-deep-muted: #a9c4b3; /* 6,6:1 */

  /* Шрифт и радиусы */
  --font-sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-card: 16px;
  --radius-control: 14px;
  /* Шкала радиусов сайта по утверждённому макету (BTPR-902); card и control — общие
     с приложением (tailwind rounded-2xl / rounded-xl). Круг и пилюля (50 %, 999px) —
     геометрия, а не токен. */
  --radius-2xs: 6px; /* хвост пузыря, код в статье */
  --radius-xs: 8px; /* мелкие плашки в окне приложения */
  --radius-sm: 12px; /* малые кнопки, знак */
  --radius-lg: 20px; /* окно приложения, плашка цели, оглавление */
  --radius-xl: 28px; /* крупные карточки: цены, документ, статья */
  --radius-2xl: 36px; /* призыв, доска, фон первого экрана */
}

:root.dark {
  color-scheme: dark;
  --c-page: #121814;
  --c-surface: #1b231e;
  --c-soft: #24302a;
  --c-soft-2: #2c3a32;
  --c-line: #2c3a32;
  --c-shadow: rgba(0, 0, 0, 0.25);
  --c-overlay: rgba(0, 0, 0, 0.6);

  --c-ink: #ecf1ec;
  --c-muted: #a3bbad; /* 7,9:1 на карточке #1b231e */

  /* Главная кнопка остаётся тёмно-зелёной с белым текстом; яркий зелёный —
     для активной вкладки, выбранного магазина, чипов и переключателей. */
  --c-primary: #1f7a4d;
  --c-on-primary: #ffffff;
  --c-accent: #5fbf8a;
  --c-on-accent: #0e2a1b;

  --c-drop-bg: #4ade80;
  --c-drop-ink: #0b3d24;
  /* Белый на #f87171 — 2,8:1, читать трудно; тёмный — 6,1:1. */
  --c-rise-bg: #f87171;
  --c-rise-ink: #3b0b0b;
  --c-down: #5fbf8a;
  --c-up: #f87171;
  --c-chart-flat: #55705f;

  --c-target: #ff9f43;
  --c-target-ink: #1f2a24;
  --c-target-soft: #3d2a17;

  --c-pause-bg: #2e2818;
  --c-pause-ink: #e8d3a8;
  --c-pause-badge: #4a3d27;
  --c-on-pause-badge: #e8d3a8;

  --c-warn: #f2b27a;
  --c-warn-soft: #3a2a1a;

  --c-dot: #ef5350;

  --c-kind-drop: #1f7a4d;
  --c-kind-up: #b83a3a;
  --c-kind-stock: #4a3d27;
  --c-on-kind-stock: #e8d3a8;

  --c-deep: #0b3d24;
  --c-on-deep: #e8efea;
  --c-deep-muted: #8fae9b;
}

/*
 * Nunito (лицензия SIL OFL 1.1, текст — `assets/fonts/OFL.txt`), переменная
 * толщина 200–1000. Поднаборы: кириллица, латиница, расширенная латиница
 * и отдельно знак рубля U+20BD (BTPR-1125). Браузер качает файл, только когда на экране есть
 * символ из его диапазона, — внешних запросов нет.
 */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(../assets/fonts/nunito-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(../assets/fonts/nunito-latin-ext-wght-normal.woff2) format("woff2-variations");
  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-20BC, U+20BE-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(../assets/fonts/nunito-ruble-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+20BD;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url(../assets/fonts/nunito-latin-wght-normal.woff2) format("woff2-variations");
  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;
}


/* Public web entry and service presentation (BTPR-1180). */
[data-web-entry][hidden], [data-web-fallback][hidden] { display: none !important; }
.site-header .header-row { gap: 1rem 2rem; }
.site-header .nav { --site-nav-link-spacing: 1.5rem; gap: .25rem 0; flex-wrap: wrap; }
.site-header .nav > a:not(:last-child) { margin-right: var(--site-nav-link-spacing); }
.site-header .home-header-panel .nav { --site-nav-link-spacing: 0px; }
.site-header .header-actions { display: flex; gap: .75rem; align-items: center; }
.site-header .header-actions .btn { white-space: normal; }


@media (max-width: 1000px) {
  .site-header .header-row { column-gap: 1rem; }
  .site-header .nav { --site-nav-link-spacing: 1rem; }
}
@media (max-width: 759px) {
  .site-header .header-row { justify-content: space-between; gap: .25rem .5rem; padding: .5rem 0; }
  .site-header .brand { font-size: 1.25rem; gap: .375rem; }
  .site-header .brand .mark { width: 1.75rem; height: 1.75rem; }
  .site-header .nav { --site-nav-link-spacing: 1.125rem; order: 3; width: 100%; margin: 0; justify-content: flex-start; row-gap: .125rem; font-size: .875rem; }
  .site-header .nav a { padding: .375rem 0; }
  .site-header .header-actions { display: flex; margin-left: auto; }
  .site-header .header-actions .btn { padding: .5rem .875rem; font-size: .875rem; min-height: 44px; }
  .site-header .header-telegram { display: none; }
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  --gut: 24px;
  --lift: 0 30px 60px -30px var(--c-overlay), 0 2px 8px var(--c-shadow);
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  /* Длинное слово при крупном шрифте на узком экране переносится, а не вылезает за край. */
  overflow-wrap: break-word;
}

a {
  color: var(--c-accent);
}

img {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.wrap {
  width: min(1200px, 100% - 2 * var(--gut));
  margin: 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.875rem, 1.1rem + 2.6vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.625rem, 1rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  font-weight: 800;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin: 0;
}

.lead {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--c-muted);
}

.small,
.note {
  font-size: 0.9375rem;
  color: var(--c-muted);
}

.note {
  margin-top: 16px;
}

.num {
  font-variant-numeric: tabular-nums;
}

.ic {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Знак ──────────────────────────────────────────────────────────────── */
.mark {
  flex: none;
}

/* Знак стоит на светлой плашке (как на макетах): так он читается и на тёмно-зелёной полосе. */
.brand .mark {
  background: var(--c-page);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.mark-loop {
  fill: none;
  stroke: var(--c-primary);
  stroke-width: 2;
  stroke-linecap: round;
}

.mark-tag {
  fill: var(--c-primary);
  fill-rule: evenodd;
}

.mark-line {
  fill: none;
  stroke: var(--c-on-primary);
  stroke-width: 4.2;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
}

.mark-head {
  fill: var(--c-on-primary);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Микроанимации BTPR-1249: текст статьи не скрывается и не ждёт эффектов. */
.site-motion .btn, .site-motion .reading-card, .site-motion .acard { position: relative; }
.site-motion .btn::after, .site-motion .reading-card::after, .site-motion .acard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--c-accent), 0 0 16px var(--c-soft);
  opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .site-motion button, .site-motion .btn, .site-motion .auth-tabs a,
  .site-motion .reading-card, .site-motion .acard { transition: transform 180ms ease; }
  .site-motion .btn::after, .site-motion .reading-card::after, .site-motion .acard::after { transition: opacity 180ms ease; }
  .site-motion input, .site-motion textarea, .site-motion select { transition: box-shadow 220ms ease, border-color 180ms ease; }
  .site-motion input:focus, .site-motion textarea:focus, .site-motion select:focus {
    box-shadow: 0 0 0 3px var(--c-soft), 0 0 18px var(--c-soft); border-color: var(--c-accent);
  }
  .site-motion button:not(:disabled):active, .site-motion .btn:not(:disabled):active, .site-motion .auth-tabs a:active { transform: scale(.98); }
  .site-motion .auth-card .auth-msg, .site-motion .site-motion-reveal > .reading-card,
  .site-motion .site-motion-reveal > .card, .site-motion .site-motion-reveal > li > .acard,
  .site-motion details[open] > :not(summary) { animation: site-motion-enter 180ms ease backwards; }
  .site-motion .site-motion-reveal > :nth-child(2), .site-motion .site-motion-reveal > li:nth-child(2) > .acard { animation-delay: 24ms; }
  .site-motion .site-motion-reveal > :nth-child(3), .site-motion .site-motion-reveal > li:nth-child(3) > .acard { animation-delay: 48ms; }
  .site-motion .site-motion-reveal > :nth-child(n+4), .site-motion .site-motion-reveal > li:nth-child(n+4) > .acard { animation-delay: 72ms; }
  @media (hover: hover) {
    :root.site-motion .btn:not(:disabled):hover { filter: none; }
    :root.site-motion .btn-ghost:hover, :root.site-motion .reading-card:hover { border-color: var(--c-line); }
    .site-motion .btn:not(:disabled):hover::after, .site-motion .reading-card:hover::after,
    .site-motion .acard:hover::after { opacity: 1; }
    .site-motion .reading-card:hover, .site-motion .acard:hover { transform: translateY(-2px); }
  }
  .site-motion .reading-card:active, .site-motion .acard:active { transform: scale(.99); }
}

/* Auth shares the same layer; its first useful frame stays static. */
.site-motion .auth-card .btn { box-shadow: none; }
@keyframes site-motion-enter { from { transform: translateY(6px); } to { transform: translateY(0); } }
:root.site-motion-paused *, :root.site-motion-paused *::before, :root.site-motion-paused *::after { animation-play-state: paused !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  :root.site-motion *, :root.site-motion *::before, :root.site-motion *::after { animation: none !important; transition: none !important; }
  :root.site-motion button:active, :root.site-motion .btn:active, :root.site-motion .auth-tabs a:active,
  :root.site-motion .reading-card:hover, :root.site-motion .reading-card:active,
  :root.site-motion .acard:hover, :root.site-motion .acard:active { transform: none; }
}

/* ── Кнопки и метки ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 3.375rem;
  padding: 0.5rem 1.75rem;
  border-radius: var(--radius-control);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn-sm {
  min-height: 2.75rem;
  padding: 0.375rem 1.125rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
}

.btn-xl {
  min-height: 4rem;
  width: 100%;
  max-width: 28rem;
  font-size: 1.1875rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--c-primary);
  color: var(--c-on-primary);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border: 1.5px solid var(--c-line);
  color: var(--c-ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--c-accent);
}

.btn-light {
  background: var(--c-on-deep);
  color: var(--c-deep);
}


/* ── Шапка ─────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 2;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Старый Chrome не применяет ширину .wrap с min(). */
  width: calc(100% - 2 * var(--gut));
  max-width: 1200px;
  gap: 16px 48px;
  min-height: 88px;
}

.nav {
  display: flex;
  gap: 4px 30px;
  font-size: 1rem;
  font-weight: 600;
}

.nav a {
  color: var(--c-muted);
  text-decoration: none;
  padding: 10px 0;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--c-accent);
}

.header-actions {
  margin-left: auto;
}


@media (max-width: 759px) {
  body {
    --gut: 16px;
    font-size: 1rem;
  }

  .header-row {
    min-height: 64px;
    gap: 8px 16px;
  }

  .brand {
    font-size: 1.375rem;
  }

  /* Крупный шрифт на узком экране: заголовки не растут шире экрана — иначе слово
     «Отслеживание» рвётся посередине. */
  h1,
  .hero h1 {
    font-size: min(2rem, 9.5vw);
  }

  h2 {
    font-size: min(1.75rem, 8vw);
  }

  /* Та же причина, что у `h1` и `h2`: без предела заголовок карточки при крупном шрифте
     перерастает заголовок раздела (BTPR-967). */
  h3 {
    font-size: min(1.375rem, 7vw);
  }

  .brand .mark {
    width: 34px;
    height: 34px;
  }

  .nav-how,
  .header-actions {
    display: none;
  }

  .nav {
    margin-left: auto;
    gap: 4px 18px;
    font-size: 0.9375rem;
  }
}


.auth-main {
  display: flex;
  justify-content: center;
  padding: 8px var(--gut) 48px;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  padding: 32px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  box-shadow: var(--lift);
  /* Длинные слова («зарегистрироваться») при крупном шрифте на узком экране
   * переносятся по-русски с дефисом: язык страницы — `lang="ru"`, а в шаблонах
   * у этих слов стоят мягкие переносы на случай браузера без словаря. */
  hyphens: auto;
}

.auth-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  white-space: normal;
  margin-bottom: 16px;
}

.auth-lead {
  margin: 0 0 16px;
  color: var(--c-muted);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius-control);
  background: var(--c-soft);
}

.auth-tabs a {
  flex: 1 1 0;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--c-muted);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.auth-tabs a[aria-current="page"] {
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: 0 1px 3px var(--c-shadow);
}

.auth-msg {
  margin: 0 0 16px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--c-soft);
  color: var(--c-ink);
}

.auth-msg-error {
  background: var(--c-warn-soft);
  color: var(--c-warn);
  font-weight: 600;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.auth-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.auth-field input {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-control);
  background: var(--c-page);
  color: var(--c-ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
}

.auth-field input:focus {
  border-color: var(--c-accent);
  outline: none;
}

.auth-code {
  letter-spacing: 0.3em;
  font-variant-numeric: tabular-nums;
}

.auth-code-cells:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  direction: ltr;
}

.auth-code-cells input {
  min-width: 0;
  padding-inline: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  caret-color: var(--c-accent);
}

html:not(.dark) .auth-code-cells input:not(:focus):not([aria-invalid="true"]) {
  border-color: var(--c-muted);
}

.auth-code-cells input[aria-invalid="true"] {
  border-color: var(--c-warn);
}

.auth-code-cells input:focus {
  border-color: var(--c-accent);
  outline: 2px solid var(--c-accent);
  outline-offset: -2px;
}

@media (max-width: 359px) {
  .auth-code-cells:not([hidden]) {
    /* Шесть зон по 44px остаются в карточке даже на 320px. */
    margin-inline: -12px;
    gap: 2px;
  }
}

.auth-submit {
  width: 100%;
  padding-inline: 1rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.auth-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.auth-form > .auth-link {
  justify-self: start;
}

.auth-inline {
  margin-top: 12px;
}

/* Переход с заполненной почтой — кнопка формы в строке сообщения. */
.auth-msg-form {
  display: inline;
}

.auth-msg-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.auth-msg-link span {
  text-decoration: underline;
}

.auth-consent {
  margin: 12px 0 0;
  color: var(--c-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.auth-alt {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
}

.auth-alt-label {
  color: var(--c-muted);
  font-size: 0.9375rem;
  text-align: center;
}

.auth-alt-with-telegram { gap: 0; }
.auth-alt-with-telegram > .auth-alt-label { margin-bottom: 10px; }
.auth-alt-with-telegram > .auth-yandex { margin-bottom: 12px; }

.auth-yandex {
  align-self: center;
  display: block;
  max-width: 100%;
  line-height: 0;
  border-radius: 999px;
}

.auth-telegram-form {
  text-align: center;
}

.auth-telegram {
  display: flex;
  gap: 0;
  width: 228px;
  max-width: 100%;
  min-height: 44px;
  margin: 0 auto;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  font: 700 1rem/1.18 var(--font-sans);
  text-align: left;
  color: var(--c-telegram-login-ink);
  background: var(--c-telegram-login);
  cursor: pointer;
}

.auth-telegram svg { flex: none; margin-right: 8px; }
.auth-telegram span { min-width: 0; overflow-wrap: break-word; }

.auth-telegram:focus {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}

.auth-telegram:focus:not(:focus-visible) { outline: none; }

.auth-telegram:disabled {
  cursor: progress;
}

/* Официальный файл кнопки — пропорции не меняем, только ширину при узком экране. */
.auth-yandex-img {
  display: block;
  width: 228px;
  max-width: 100%;
  height: auto;
}

/* Тёмный вариант основной кнопки Яндекса: белый фон и чёрные буквы,
 * красный круг и белая «Я» остаются прежними (BTPR-1031, вариант Y2). */
.dark .auth-yandex-bg {
  fill: white;
}

.dark .auth-yandex-text {
  fill: black;
}

/* Ссылка переносится целиком на следующую строку, без разрыва слова. */
.auth-switch a {
  display: inline-block;
  white-space: nowrap;
  hyphens: none;
  overflow-wrap: normal;
}

.auth-alt .auth-consent {
  margin-top: 2px;
  text-align: center;
}

.auth-alt-with-telegram > .auth-consent { margin-top: 12px; }

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
}

.auth-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0 0 24px;
}

.auth-facts dt {
  color: var(--c-muted);
}

.auth-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-actions .btn {
  font-family: inherit;
  cursor: pointer;
}

.auth-page .auth-actions form { max-width: 100%; }
.auth-page .auth-actions .btn { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.auth-back { display: inline-block; margin-bottom: 20px; font-weight: 650; }

.auth-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 0 0 32px;
  font-size: 0.875rem;
}

.auth-foot a {
  color: var(--c-muted);
}

@media (min-width: 52em) {
  .auth-page-password .auth-main {
    min-height: 0;
    padding-block: 8px;
  }
  .auth-page-password .auth-foot { padding-bottom: 8px; }
}

/* Страница заказа (BTPR-901, `order.html`): цена под вопросом «Оформить …?»,
   согласие с офертой — строкой над кнопками. */
.order-price {
  margin: 0 0 12px;
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.5rem);
}

.order-consent {
  margin: 0 0 16px;
}

@media (max-width: 479px) {
  .auth-card {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .auth-facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .auth-facts dd {
    margin-bottom: 10px;
  }
}
