/* Радикс · раскладка страниц: шапка, подвал, контейнер, страницы-заглушки, результат M1.
   Токены и компоненты — radix.css (дизайн-система); здесь только то, чего в ней нет.
   Шапка и подвал — по лендингу (design/Radix Landing.dc.html, 1d/1m). */

:root { color-scheme: dark; }   /* нативные поля (дата, время, список) — в тёмной теме */
body { display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

/* ссылка «К содержанию» — видна только с клавиатуры */
.rx-skip { position: absolute; left: var(--rx-gutter); top: -100px; z-index: 50; padding: 10px 14px; border-radius: var(--rx-r-m); background: var(--rx-text); color: var(--rx-bg-0); font-size: 14px; font-weight: 600; }
.rx-skip:focus { top: 8px; color: var(--rx-bg-0); }

/* M9: фрейм-отправитель Метрики на страницах с ключом (analytics.js вставляет его вне <body>):
   невидим, без места и фокуса; не display:none — так tag.js во фрейме мог бы не работать */
.rx-metrika-frame { position: absolute; left: 0; top: 0; width: 0; height: 0; border: 0; visibility: hidden; }

/* ——— шапка ——— */
.site-header { height: 56px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--rx-s-4); padding: 0 var(--rx-gutter); border-bottom: 1px solid var(--rx-line); }
/* SEO-аудит 27.10.2026 (4.1 п. 13): зона касания ссылок шапки — 44 px в высоту; текст — прежний
   (min-height и выравнивание по центру, без отступов вокруг букв) */
.site-header__logo { display: inline-flex; align-items: center; min-height: 44px; font: 600 24px/1 var(--rx-serif); color: var(--rx-text); }
.site-header__logo:hover { color: var(--rx-text); }
.site-header .rx-btn--pill { height: 40px; }
/* После M9: «Услуги и цены» рядом с «Мои карты»; SEO-аудит 27.10.2026 (4.1 п. 6): и «Значения» */
.site-header__end { display: flex; align-items: center; gap: var(--rx-s-4); min-width: 0; }
.site-header__nav { display: flex; align-items: center; gap: var(--rx-s-4); }
.site-header__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--rx-text-2); white-space: nowrap; }
.site-header__link:hover, .site-header__link[aria-current="page"] { color: var(--rx-text); }
/* Сертификат: до 1280 px короткая подпись «Подарок» — полная не влезает в шапку лендинга
   (1024) и в строку телефона рядом с «Мои карты». */
.site-header__link--gift-full { display: none; }
.site-header__link--gift-short { display: inline-flex; }
/* Телефон (до 479 px): шапка — прежние 56 px в одну строку, «Значения» в ней не показываем (вторая
   строка сдвигала форму главной на 45 px — решение исполнителя 28.10.2026); ссылка остаётся в HTML
   шапки (её видят поисковики), людям — в подвале и хлебных крошках */
.site-menu { display: none; }
.site-menu__summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--rx-text); cursor: pointer; list-style: none; }
.site-menu__summary::-webkit-details-marker { display: none; }
.site-menu__nav { position: absolute; z-index: 40; right: var(--rx-gutter); top: 52px; display: flex; flex-direction: column; min-width: 220px; padding: 8px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-m); background: var(--rx-bg-0); box-shadow: 0 12px 32px rgba(5,6,12,.45); }
.site-menu__nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--rx-r-s); font-size: 15px; font-weight: 600; color: var(--rx-text); }
.site-menu__nav a:hover, .site-menu__nav a[aria-current="page"] { background: rgba(242,240,234,.06); color: var(--rx-text); }
@media (max-width: 479px) {
  .site-header__link--wide { display: none; }
  .site-header__link--compat { display: none; }
  .site-header__link--gift-full { display: none; }
  .site-header__link--gift-short { display: inline-flex; }
  /* «Подарок» + «Услуги и цены» + «Мои карты» не умещаются в 320 px. Цены уходят в «Меню». */
  .site-header:has(.rx-btn--pill) .site-header__link--gift-short ~ a[href="/prices"] { display: none; }
  .site-menu { display: block; position: relative; }
}
@media (min-width: 1280px) {
  .site-header__link--gift-full { display: inline-flex; }
  .site-header__link--gift-short { display: none; }
}
@media (max-width: 374px) {
  .site-header, .site-header__end, .site-header__nav { gap: var(--rx-s-2); }
  .site-header__link { font-size: 13px; }
  .site-header .rx-btn--pill { padding: 0 var(--rx-s-3); font-size: 13px; }
}
@media (min-width: 1024px) {
  .site-header { height: 72px; }
  .site-header__logo { font-size: 28px; }
}

/* ——— контейнер и страницы ——— */
.site-main { width: 100%; max-width: var(--rx-max); margin: 0 auto; padding: var(--rx-s-6) var(--rx-gutter) var(--rx-s-16); }
@media (min-width: 1024px) { .site-main { padding-top: var(--rx-s-12); } }
.page { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--rx-s-8); }
.page--wide { max-width: none; }
.page__intro { display: flex; flex-direction: column; gap: var(--rx-s-2); }
.page__lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--rx-text-2); text-wrap: pretty; }
.page__actions { display: flex; flex-wrap: wrap; gap: var(--rx-s-3); }

/* ——— подвал ——— */
.site-footer { flex: none; padding: var(--rx-s-12) var(--rx-gutter) var(--rx-s-10); border-top: 1px solid var(--rx-line); }
.site-footer__inner { max-width: var(--rx-max); margin: 0 auto; display: flex; flex-direction: column; gap: var(--rx-s-8); }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: var(--rx-s-8); }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: minmax(0, 2fr) 1fr 1fr; } }
.site-footer__brand, .site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__logo { margin: 0; font: 600 28px/1.1 var(--rx-serif); }
.site-footer__tagline { margin: 0; max-width: 320px; font-size: 14px; line-height: 1.55; color: var(--rx-text-2); }
.site-footer__title { margin: 0; font: 600 12px/1.3 var(--rx-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rx-text-2); }
.site-footer__col { align-items: flex-start; font-size: 14px; }
/* SEO-аудит 27.10.2026 (4.1 п. 13): зона касания ссылок подвала — 35 px (было 25): отступ 7 px
   сверху и снизу, а −5 px поля возвращают прежние места строк — вид подвала тот же */
.site-footer__col a { color: var(--rx-text); padding: 7px 0; margin: -5px 0; }
.site-footer__col a:hover { color: var(--rx-gold-hover); }
.site-footer__legal { padding-top: var(--rx-s-5); border-top: 1px solid rgba(242,240,234,.08); font-size: 12px; line-height: 1.6; color: var(--rx-text-2); text-wrap: pretty; }
.site-footer__legal p { margin: 0 0 var(--rx-s-2); }
/* Ссылки в строке реквизитов (оферта, политика, cookie): зона касания ≥ 24 px — отступ строчного
   элемента строку не раздвигает */
.site-footer__legal a { padding: 4px 0; }

/* ——— индикатор HTMX (встроенные стили HTMX отключены ради CSP) ——— */
.htmx-indicator { opacity: 0; transition: opacity var(--rx-dur) ease-in; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ——— плашки «нет сети» / «соединение есть» (11c — форма, 11d — экран карты; offline.js) ——— */
#net-root { position: sticky; top: 0; z-index: 30; }
#net-root:not(:empty) { padding: 12px 12px 0; }
@media (min-width: 1024px) { #net-root:not(:empty) { padding: 12px var(--rx-gutter) 0; } #net-root > * { max-width: 560px; margin: 0 auto; } }
#net-root .rx-notice { animation: rx-down .2s ease-out; }
#net-root .rx-notice .rx-btn { white-space: nowrap; }
.rx-notice .rx-spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(242,240,234,.25); border-top-color: var(--rx-text); animation: rx-spin .8s linear infinite; }
.rx-notice--online { grid-template-columns: 18px minmax(0, 1fr); border-color: transparent; background: rgba(232,195,106,.1); }
.rx-notice--online .rx-notice__icon { width: 18px; height: 18px; stroke: var(--rx-gold); }
@keyframes rx-down { from { opacity: 0; transform: translateY(-6px); } }

/* ——— форма рождения — static/radix/form.css (экраны 2a–2g) ——— */
p.rx-field__hint, p.rx-field__error { margin-bottom: 0; }
p.rx-field__hint:first-child, p.rx-field__error:first-child { margin-top: 0; }

/* ——— результат M1: позиции планет (до экрана карты 3a–3d) ——— */
.result:empty { display: none; }
.result { margin-top: var(--rx-s-8); }
.result-errors { border: 1px solid rgba(239,143,128,.45); border-radius: var(--rx-r-l); background: rgba(239,143,128,.06); padding: 18px; font-size: 14px; line-height: 1.5; }
.result-errors p { margin: 0 0 6px; font-weight: 600; color: var(--rx-error); }
.result-errors ul { margin: 0; padding-left: 20px; }
.chart-result { display: flex; flex-direction: column; gap: var(--rx-s-3); }
.chart-result__meta { margin: 0; font-size: 14px; line-height: 1.5; color: var(--rx-text-2); }
.chart-result__meta.offset { color: var(--rx-text); font-weight: 500; }
.note { margin: 0; padding: 12px 14px; border-left: 2px solid var(--rx-blue); border-radius: 0 var(--rx-r-m) var(--rx-r-m) 0; background: var(--rx-surface-1); font-size: 14px; line-height: 1.5; }
.note p { margin: 0 0 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--rx-line); border-radius: var(--rx-r-l); background: var(--rx-surface-1); }
table.positions { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.positions th, .positions td { padding: 12px 6px; text-align: left; font-size: 14px; border-bottom: 1px solid rgba(242,240,234,.08); }
.positions tr > :first-child { padding-left: 14px; }
.positions tr > :last-child { padding-right: 14px; text-align: right; }
.positions tbody tr:last-child > * { border-bottom: 0; }
.positions thead th { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rx-text-2); }
.positions tbody th { font-weight: 500; }
.positions .num { white-space: nowrap; }
.positions .retro { color: var(--rx-error); font-weight: 600; }
.positions .glyph { display: inline-block; min-width: 1.6em; color: var(--rx-gold); }
abbr[title] { text-decoration: none; }

/* ——— ошибка и заглушки ——— */
.page--doc .rx-notice { max-width: 560px; }
