/* Сайт экосистемы «Спутник». Одна страница, без сборки. */

/*
  Палитра — та же, что в приложении (apps/mobile/src/constants/theme.ts).
  Соответствие переменных токенам темы и расчёт оттенков — docs/design-system.md.
*/
:root {
  /* Фирменный акцент — цвет логотипа (ADR-0014): заливки кнопок и «таблеток». */
  --water: #0088cc;
  /* Тот же тон темнее — наведение на кнопку. */
  --water-dark: #006496;
  /* Акцент тёмной темы приложения — блики и рамки при наведении. */
  --water-light: #46b5ec;
  /*
    Цветной текст и ссылки. Не --water: #0088cc на белом даёт 3,9:1, а
    обычному тексту нужно не меньше 4,5:1.
  */
  --accent-text: #006496;
  --ink: #12212b;
  --ink-soft: #5a6b76;
  --bg: #f6f8f9;
  --surface: #ffffff;
  --border: #e2e8ec;
  /* «Хорошо» — тот же зелёный, что у рыбки клёва в приложении. */
  --reed: #3fa34d;
  --sand: #e8dcc6;
  --radius: 14px;
  --wrap: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -0.01em;
}

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

/* --- Шапка --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 248, 249, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  min-width: 0;
}

/* Служебные пункты (Скачать/Войти/Кабинет) — у правого края шапки, разделы —
   сразу у логотипа. */
.nav a.nav-split {
  margin-left: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--accent-text);
}

.nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 700;
}

.nav-cta {
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--water);
  color: #fff !important;
  font-weight: 600;
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--water);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 136, 204, 0.28);
}

.btn-primary:hover {
  background: var(--water-dark);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--ink);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--water-light);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn.is-checking {
  opacity: 0.65;
  pointer-events: none;
}

.btn.is-unavailable {
  background: var(--sand);
  color: var(--ink-soft);
  box-shadow: none;
  pointer-events: none;
}

/* --- Hero --- */
/*
  Низ шапки уходит в воду: цвет заметно отличается от фона страницы, иначе
  волну на стыке секций просто не видно.
*/
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 clamp(72px, 9vw, 116px);
  overflow: hidden;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(70, 181, 236, 0.18), transparent),
    linear-gradient(180deg, #fff 15%, #d7e7ef);
}

/*
  Блики на воде: два широких пятна медленно расходятся в разные стороны.
  Чистый CSS, без картинок; при `prefers-reduced-motion` анимация выключается.
*/
.hero::before {
  content: '';
  position: absolute;
  inset: -25% -15%;
  pointer-events: none;
  background:
    radial-gradient(46% 30% at 22% 30%, rgba(70, 181, 236, 0.22), transparent 70%),
    radial-gradient(38% 26% at 74% 62%, rgba(0, 136, 204, 0.12), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(4%, 3%, 0) scale(1.12);
  }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

/* Волна на стыке секций. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
  pointer-events: none;
}

.wave svg {
  display: block;
  width: 100%;
  height: clamp(48px, 7vw, 90px);
}

.wave path {
  fill: var(--bg);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
  margin: 0 0 12px;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 12px;
  flex-wrap: wrap;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Телефон: настоящий снимок экрана «Лента» с телефона владельца. */
.hero-art {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 248px;
  border-radius: 34px;
  background: #0e1a20;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(18, 33, 43, 0.28),
    inset 0 0 0 2px #26414c;
  transform: rotate(3deg);
  animation: float 7s ease-in-out infinite;
}

/* Динамик над экраном — без него корпус читается как рамка картины. */
.phone::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: #26414c;
  transform: translateX(-50%);
}

/* Снимок экрана 9:20 входит целиком: рамка подстраивается под него по высоте. */
.phone-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  transition: opacity 0.4s ease;
}

@keyframes float {
  0%,
  100% {
    transform: rotate(3deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-12px);
  }
}

/* --- Секции --- */
.section {
  padding: clamp(48px, 8vw, 88px) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.feature {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

/* Полоска сверху проявляется под курсором — карточка перестаёт быть плоской. */
.feature::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--water-dark), var(--water), var(--water-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--water-light);
  box-shadow: 0 12px 28px rgba(18, 33, 43, 0.1);
}

.feature:hover::before {
  transform: scaleX(1);
}

.feature:hover .feature-icon {
  transform: scale(1.14) rotate(-6deg);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  transition: transform 0.25s ease;
  transform-origin: left center;
}

.feature h3 {
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 32px;
}

.how-item h3 {
  font-size: 1.2rem;
  color: var(--accent-text);
}

.how-item p {
  margin: 0;
  color: var(--ink-soft);
}

/* --- Скачать --- */
.download {
  text-align: center;
  background:
    radial-gradient(800px 300px at 50% 120%, rgba(0, 136, 204, 0.12), transparent), var(--bg);
}

.download-inner {
  max-width: 620px;
}

.download-lead {
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.download-meta {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.download-note {
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Подвал --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-inner a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent-text);
}

/*
  Появление блоков при прокрутке. Класс `reveal` стоит в разметке, но прячет
  блок только когда `assets/app.js` пометил страницу как `js-reveal`. Так без
  JS (или при отключённой анимации) содержимое остаётся видимым.
*/
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --- Адаптив --- */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-art {
    order: -1;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* --- Вход и личный кабинет (ADR-0007) --- */

.btn-sm {
  padding: 7px 16px;
  font-size: 0.9rem;
}

.auth {
  padding: 64px 0 96px;
}

.auth-inner {
  max-width: 520px;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin: 28px 0 16px;
}

.auth-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Крупно и вразрядку: код переписывают с экрана телефона. */
.auth-code {
  font-size: 1.8rem;
  letter-spacing: 6px;
  text-align: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.auth-code:focus {
  outline: none;
  border-color: var(--water);
}

.auth-error {
  margin: 0;
  color: #c0392b;
  font-size: 0.95rem;
}

.auth-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Второй способ входа отделён чертой, чтобы две формы не сливались в одну. */
.auth-alt {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 1.25rem;
}

/* Почта или телефон — обычный текст, без разрядки, как у кода. */
.auth-input {
  font-size: 1.05rem;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

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

/* Форма кода появляется после отправки; без этого display: grid перебил бы hidden. */
.auth-form[hidden] {
  display: none;
}

.cabinet {
  padding: 40px 0 96px;
}

.cabinet h2 {
  margin-top: 40px;
}

.cabinet-hint,
.cabinet-loading {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.cabinet-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.cabinet-topbar img {
  border-radius: 8px;
  flex: none;
}

.cabinet-who {
  flex: 1;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cabinet-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.cabinet-stat {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.cabinet-stat b {
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

.cabinet-stat span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.cabinet-photo {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.cabinet-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.cabinet-photo figcaption {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.cabinet-photo figcaption span {
  color: var(--ink-soft);
}

.cabinet-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
}

.cabinet-session div {
  display: grid;
  gap: 2px;
}

.cabinet-session span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* --- Админка владельца --- */

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 16px 0 20px;
}

.admin-tab {
  padding: 10px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--ink);
}

.admin-tab.active {
  color: var(--ink);
  border-bottom-color: var(--water);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 32px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
}

.admin-table th {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.admin-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 32px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-row > div:first-child {
  flex: 1;
  display: grid;
  gap: 2px;
}

.admin-row span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}

.admin-row-sub {
  margin-left: 24px;
  background: transparent;
}

.admin-comments {
  display: grid;
  gap: 8px;
  margin: -2px 0 14px 24px;
}

.admin-comments[hidden] {
  display: none;
}

/* .btn — display: inline-flex, перебивает UA-стиль [hidden] без этого правила. */
#admin-link[hidden],
#users-more[hidden],
#audit-more[hidden] {
  display: none;
}

/* --- Админка: поиск, роли, редактор тарифов (ADR-0055, этап 1б) --- */

.admin-tabs {
  flex-wrap: wrap;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
}

.admin-search {
  flex: 1 1 260px;
  min-width: 0;
}

/* Тестовый тариф под выбором роли: только у тестировщика и администратора. */
.admin-override {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
}
.admin-override[hidden] {
  display: none;
}
.admin-override-label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-soft);
}
.admin-row-privileged td:first-child {
  box-shadow: inset 3px 0 0 var(--water);
}

/* Аккаунт на тестовом тарифе: лимиты у него как у клиента, поэтому строка заметна и без чтения выпадающего списка. */
.admin-row-override {
  background: #fff8e6;
}
.admin-badge {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fdebc0;
  color: #7a5200;
  font-size: 0.75rem;
  font-weight: 600;
}
.admin-badge[hidden] {
  display: none;
}
.admin-summary {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.admin-summary[hidden] {
  display: none;
}
.admin-summary-active {
  color: #7a5200;
  font-weight: 600;
}

.admin-row-blocked {
  opacity: 0.6;
}

.admin-audit-details {
  white-space: normal;
  min-width: 220px;
}

/* Поля и списки редактора */
.plans-input {
  font: inherit;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}

.plans-input:disabled {
  opacity: 0.5;
}

.plans-input.is-invalid {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.18);
}

.plans-short {
  width: 110px;
}

.plans-limit {
  width: 96px;
}

.plans-window {
  padding: 5px 8px;
}

.plans-meta,
.plans-hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.plans-set {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  margin: 0 0 18px;
  background: var(--surface);
}

.plans-set > legend {
  font-weight: 700;
  padding: 0 6px;
}

.plans-field {
  display: grid;
  gap: 4px;
  margin: 10px 0;
  max-width: 420px;
}

.plans-field-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.plans-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  cursor: pointer;
}

.plans-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 16px;
}

.plans-table {
  margin-bottom: 8px;
}

.plans-limits td,
.plans-limits th {
  white-space: normal;
  vertical-align: top;
}

.plans-feature {
  min-width: 150px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--ink);
}

.plans-cell {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.plans-cell-body {
  display: grid;
  gap: 6px;
}

.plans-cell-body[hidden] {
  display: none;
}

.plans-cell-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.plans-errors,
.plans-diff {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 0.9rem;
}

.plans-errors {
  color: #c0392b;
}

.plans-errors[hidden] {
  display: none;
}

.plans-diff-title {
  margin: 16px 0 0;
  font-size: 1rem;
}

.plans-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}

.plans-message {
  min-height: 1.2em;
  margin: 6px 0;
  font-size: 0.9rem;
}

.plans-message-ok {
  color: var(--reed);
  font-weight: 600;
}

.plans-message-error {
  color: #c0392b;
  font-weight: 600;
  /* Ответ сервера бывает из нескольких строк (список проблем) — переносы сохраняем. */
  white-space: pre-line;
}

.plans-json {
  margin: 14px 0 28px;
}

.plans-json pre {
  overflow-x: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.8rem;
}

.plans-version {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  margin: 0 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  justify-items: start;
}

.plans-version-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
}

/* --- Приглашение на выезд (ADR-0010, M1) --- */

.trip {
  padding: 40px 0 96px;
}

.trip-inner {
  max-width: 640px;
}

.trip-loading {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.trip-error .lead {
  margin-bottom: 0;
}

.trip-meta {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 20px;
}

.trip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 28px;
}

.trip-chip {
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
}

.trip-block {
  margin: 0 0 32px;
}

.trip-checklist,
.trip-roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.trip-checklist-item,
.trip-roster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.trip-checklist-item.is-done {
  opacity: 0.6;
  text-decoration: line-through;
}

.trip-checklist-group {
  flex: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-text);
  min-width: 4.5em;
}

.trip-checklist-title {
  color: var(--ink);
}

.trip-roster-item {
  justify-content: space-between;
}

.trip-roster-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--water);
  color: #fff;
}

.trip-cta {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 20px;
}

.trip-cta h2 {
  margin-bottom: 6px;
}

.trip-cta-lead {
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.trip-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-cta-error {
  margin: 12px 0 0;
  color: #c0392b;
  font-size: 0.95rem;
}

.trip-done {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #226b2c;
}

.trip-solo-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* --- Страница «Маяк» для получателя просьбы (/oncall/, ADR-0037) ---
   Раньше она занимала классы `.trip*` страницы приглашения на выезд. Выезды
   выводятся (ADR-0057), и `.trip*` уйдут вместе со страницей /trip/ — эти
   правила остаются. Значения те же, что были у `.trip*`. */

.oncall {
  padding: 40px 0 96px;
}

.oncall-inner {
  max-width: 640px;
}

.oncall-cta {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 20px;
}

.oncall-cta-lead {
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.oncall-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.oncall-solo-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* --- Пропуск к содержимому и видимый фокус (доступность) --- */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  left: 12px;
}

:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Бургер-меню: три полоски превращаются в крестик по aria-expanded --- */
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  flex: none;
}

.menu-btn .bars {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.menu-btn .bars i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    top 0.2s ease;
}

.menu-btn .bars i:nth-child(1) {
  top: 0;
}

.menu-btn .bars i:nth-child(2) {
  top: 6px;
}

.menu-btn .bars i:nth-child(3) {
  top: 12px;
}

.menu-btn[aria-expanded='true'] .bars i:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded='true'] .bars i:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded='true'] .bars i:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

@media (max-width: 860px) {
  /* На мобильной ширине .nav уходит в абсолютное позиционирование (ниже) и
     выпадает из потока — без этого лого и бургер потеряли бы разбежку по
     краям, которую на столе даёт flex:1 у .nav. */
  .header-inner {
    justify-content: space-between;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .nav.open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav a {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
  }

  /* Разбивка на «свои» и «служебные» пункты — только для стола; в
     выпадающем списке все пункты — обычные строки на всю ширину. */
  .nav a.nav-split {
    margin-left: 0;
  }

  .nav-cta {
    border-radius: 0;
    text-align: center;
  }

  .lvl-grid {
    grid-template-columns: 1fr;
  }
}

/* На 560px раньше прятался весь навигационный список кроме кнопки «Скачать» —
   теперь список открывается бургер-меню, прятать нечего. */

/* --- Плитка-иконка раздела: тот же приём, что в нижнем меню приложения —
   эмодзи на синей подложке (components/nav/tab-icon.tsx), а не свой значок. */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--water);
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}

.icon-tile-lg {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 1.9rem;
}

/* В меню — без синей подложки: рядом с текстом ссылки квадрат смотрелся
   тяжело, здесь достаточно самого эмодзи. */
.icon-tile-sm {
  width: auto;
  height: auto;
  background: none;
  font-size: 1rem;
}

/* --- Страница раздела (tracker/locator/weather/gallery/feed) --- */
.crumbs {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.crumbs a {
  color: var(--ink-soft);
}

.crumbs a:hover {
  color: var(--accent-text);
}

.mod-hero {
  padding: clamp(40px, 7vw, 72px) 0 clamp(32px, 5vw, 56px);
  background:
    radial-gradient(1000px 320px at 80% -10%, rgba(70, 181, 236, 0.16), transparent),
    linear-gradient(180deg, #fff 15%, #d7e7ef);
  border-bottom: 1px solid var(--border);
}

.mod-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.mod-head h1 {
  margin: 0;
}

.mod-hero .lead {
  margin: 10px 0 0;
  max-width: 42em;
}

.mod-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 20px 56px;
  font-weight: 600;
}

.mod-pager a {
  color: var(--accent-text);
  text-decoration: none;
}

.mod-pager a:hover {
  text-decoration: underline;
}

/* Блок «Как работает без интернета» внутри страницы раздела. */
.lvl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.lvl {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.lvl h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.lvl p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.lvl-offline {
  border-color: #e3b7ad;
}

.lvl-whitelist {
  border-color: #e7cf8e;
}

.lvl-online {
  border-color: #b6dcc0;
}

.offband-note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* --- Переключатель режима сети на главной (ключевой элемент) --- */
.net-switch {
  margin: 0 auto;
  max-width: 640px;
  text-align: center;
}

.net-switch-q {
  font-weight: 600;
  margin: 0 0 16px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
}

/* Радиокнопки спрятаны визуально, но остаются в таб-порядке и доступны диктору. */
.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.seg label {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.seg input:checked + label {
  background: var(--water);
  color: #fff;
}

.seg input:focus-visible + label {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}

.sigbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.sig {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.sig i {
  display: block;
  width: 4px;
  background: var(--border);
  border-radius: 1px;
}

.sig i:nth-child(1) {
  height: 25%;
}

.sig i:nth-child(2) {
  height: 50%;
}

.sig i:nth-child(3) {
  height: 75%;
}

.sig i:nth-child(4) {
  height: 100%;
}

.net-switch[data-state='online'] .sig i {
  background: var(--reed);
}

.net-switch[data-state='whitelist'] .sig i:nth-child(-n + 3) {
  background: #e0a516;
}

.net-switch[data-state='whitelist'] .sig i:nth-child(4) {
  background: var(--border);
}

.net-switch[data-state='offline'] .sig i:nth-child(1) {
  background: #c0392b;
}

.net-switch[data-state='offline'] .sig i:nth-child(n + 2) {
  background: var(--border);
}

/* Список пяти разделов под переключателем: имя ссылкой, три варианта пояснения
   (по числу режимов сети), JS показывает только тот, что выбран радиокнопкой. */
.ledger {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ledger-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.ledger-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.ledger-name:hover {
  color: var(--accent-text);
}

.ledger-body {
  flex: 1;
  min-width: 0;
}

.ledger-mode {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.ledger-mode[hidden] {
  display: none;
}

.checklist {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  color: var(--reed);
  font-weight: 700;
}

/* Выбор производителя телефона в инструкции по настройке (страница «Локатор»). */
.setup-picker {
  display: grid;
  gap: 8px;
  max-width: 380px;
  margin: 28px 0 8px;
}

.setup-picker label {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.setup-picker select {
  font: inherit;
  cursor: pointer;
}

.setup-guide[hidden] {
  display: none;
}

.setup-note {
  margin: 20px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Компактная полоска «Забыли телефон?» на странице «Локатор» — одна строка с
   иконкой вместо отдельного блока или списка. */
.notice-section {
  padding: clamp(20px, 3vw, 32px) 0;
}

.notice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.notice p {
  margin: 0;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .notice {
    flex-direction: column;
    text-align: center;
  }
}

/* Уважаем системную настройку «меньше движения»: гасим всю анимацию. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone,
  .hero::before {
    animation: none;
  }

  .phone-shot {
    transition: none;
  }

  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #46b5ec;
    --ink: #e8eef1;
    --ink-soft: #9fb0b9;
    --bg: #0f1417;
    --surface: #1a2227;
    --border: #2a353b;
    --sand: #2b2a24;
  }

  .site-header {
    background: rgba(15, 20, 23, 0.85);
  }

  .hero {
    background:
      radial-gradient(1200px 400px at 80% -10%, rgba(70, 181, 236, 0.12), transparent),
      linear-gradient(180deg, #131b1f 15%, #122935);
  }

  .hero::before {
    background:
      radial-gradient(46% 30% at 22% 30%, rgba(70, 181, 236, 0.16), transparent 70%),
      radial-gradient(38% 26% at 74% 62%, rgba(0, 136, 204, 0.12), transparent 70%);
  }

  .feature:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  }

  .mod-hero {
    background:
      radial-gradient(1000px 320px at 80% -10%, rgba(70, 181, 236, 0.12), transparent),
      linear-gradient(180deg, #131b1f 15%, #122935);
  }
}

/* --- Экраны приложения: лента снимков с прокруткой вбок --- */
.screens {
  padding-bottom: clamp(24px, 4vw, 40px);
}

.screens-wrap {
  position: relative;
}

.screens-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/*
  Стрелки поверх крайних снимков: скрыты, пока курсор не наведён на ленту,
  чтобы не мешать чтению. На тач-экранах листают свайпом — стрелки не нужны
  и не показываются вовсе (`hover: hover` — только у мыши/трекпада).
*/
.screens-nav {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .screens-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(18, 33, 43, 0.18);
    opacity: 0;
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
    z-index: 2;
  }

  .screens-wrap:hover .screens-nav,
  .screens-nav:focus-visible {
    opacity: 1;
  }

  .screens-nav:hover {
    transform: translateY(-50%) scale(1.06);
  }

  .screens-nav[disabled] {
    display: none;
  }

  .screens-prev {
    left: -8px;
  }

  .screens-next {
    right: -8px;
  }
}

.screens-strip:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 4px;
  border-radius: 12px;
}

.screens-strip figure {
  flex: 0 0 auto;
  width: clamp(170px, 22vw, 220px);
  margin: 0;
  scroll-snap-align: start;
}

.screens-strip img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(18, 33, 43, 0.16);
}

.screens-strip figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}

.screens-strip img[role='button'] {
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.screens-strip img[role='button']:hover {
  transform: translateY(-3px);
}

.screens-strip img[role='button']:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

/* Увеличенный снимок: во всю высоту окна, фон затемнён. */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(5, 10, 13, 0.88);
}

.lightbox figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
}

.lightbox img {
  display: block;
  max-width: min(100%, 864px);
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  width: auto;
  height: auto;
  border-radius: 20px;
  touch-action: pan-y;
}

.lightbox figcaption {
  margin-top: 12px;
  font-size: 0.95rem;
  text-align: center;
  color: #e8eef1;
}

.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lb-btn:hover,
.lb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.lb-close {
  top: 16px;
  right: 16px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 16px;
}

.lb-next {
  right: 16px;
}

/* На телефоне стрелки не закрывают снимок: листают свайпом. Крестик — над
   снимком, а не на его углу. */
@media (max-width: 600px) {
  .lightbox {
    padding-top: 72px;
  }

  .lightbox img {
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
  }

  .lb-close {
    top: 12px;
  }

  .lb-prev,
  .lb-next {
    display: none;
  }
}

/* --- Модули экосистемы --- */
.section-lead {
  max-width: 640px;
  margin: -0.2em 0 1.6em;
  color: var(--ink-soft);
}

.core-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.module-status {
  display: inline-block;
  margin: 0 0 0.5em;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--border);
}

.module-status.is-live {
  color: #226b2c;
  background: #e4f4e6;
  border-color: #c6e6ca;
}

/* Функция ещё не готова целиком — тот же приём, что у «Работает», цвет
   «так себе» из палитры (docs/design-system.md), не «плохо» и не «готово». */
.module-status.is-dev {
  color: #8a5a00;
  background: #fdf1d9;
  border-color: #f0d9a0;
}

/* --- Виджет --- */
.widget-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.widget-text p {
  color: var(--ink-soft);
  max-width: 34em;
}

.widget-note {
  font-size: 0.92rem;
}

.widget-art {
  display: flex;
  justify-content: center;
}

/*
  Макет виджета «Часы и погода» повторяет то, что рисует приложение: слева часы
  на 35 % ширины, справа погода на 65 % — восход и закат в правом верхнем углу.
*/
.widget-art {
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.widget-clock {
  width: 100%;
  max-width: 360px;
  display: grid;
  /* minmax(0, …): колонки не раздвигаются содержимым — иначе на узком экране текст наезжал. */
  grid-template-columns: minmax(0, 7fr) 1px minmax(0, 13fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 22px;
  /* На узком экране секция центрирует текст — у виджета он, как на телефоне, слева. */
  text-align: left;
  background: var(--w-bg);
  box-shadow: 0 18px 40px rgba(18, 33, 43, 0.3);
  transition: background-color 0.2s ease;
}

/* Виджет «Погода»: та же карточка без колонки часов и разделителя. */
.widget-clock-weather-only {
  grid-template-columns: minmax(0, 1fr);
}

.widget-label {
  align-self: flex-start;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.widget-label:not(:first-child) {
  margin-top: 6px;
}

.wc-clock,
.wc-weather {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wc-time {
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  white-space: nowrap;
  font-weight: 300;
  line-height: 1;
  color: var(--w-primary);
  transition: color 0.2s ease;
}

.wc-date {
  margin-top: 4px;
  font-size: 0.84rem;
  white-space: nowrap;
  color: var(--w-primary);
  transition: color 0.2s ease;
}

.wc-day {
  font-size: 0.68rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--w-secondary);
  transition: color 0.2s ease;
}

.wc-divider {
  align-self: stretch;
  background: var(--w-divider);
  transition: background-color 0.2s ease;
}

.w-place {
  font-size: 0.72rem;
  color: var(--w-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.w-temp {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--w-primary);
  line-height: 1.1;
  transition: color 0.2s ease;
}

.w-line {
  font-size: 0.8rem;
  color: var(--w-primary);
  transition: color 0.2s ease;
}

.w-sub {
  font-size: 0.74rem;
  color: var(--w-secondary);
  transition: color 0.2s ease;
}

/* Верх погоды: место и температура слева, восход и закат — в правом углу. */
.w-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.w-head-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.w-sun {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.74rem;
  color: var(--w-secondary);
  transition: color 0.2s ease;
}

.w-sun span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.w-sun svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Оценка клёва по частям суток: подпись и процент сверху, рыбка снизу. */
.w-bites {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.w-bite {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  white-space: nowrap;
}

.w-bite-head {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.w-bite small {
  font-size: 0.64rem;
  color: var(--w-secondary);
  transition: color 0.2s ease;
}

.w-bite b {
  font-size: 0.78rem;
}

.w-fish {
  width: 18px;
  height: 11px;
  margin-top: 2px;
  flex: none;
  fill: currentColor;
}

/*
  Пять тем виджета — кружки одновременно образец цвета и кнопка выбора
  (assets/widget-theme.js): клик красит макет выше через переменные ниже.
  Цвета — те же, что в приложении (apps/mobile/src/widgets/themes.ts).
*/
.widget-art {
  --w-bg: #0f1417;
  --w-primary: #e8eef1;
  --w-secondary: #9fb0b9;
  --w-divider: #26343b;
}

.widget-art[data-theme='day'] {
  --w-bg: #ffffff;
  --w-primary: #12212b;
  --w-secondary: #5a6b76;
  --w-divider: #e2e8ec;
}

.widget-art[data-theme='lake'] {
  --w-bg: #0b3a55;
  --w-primary: #ffffff;
  --w-secondary: #a9d4ec;
  --w-divider: #1d5878;
}

.widget-art[data-theme='forest'] {
  --w-bg: #1f3a2b;
  --w-primary: #eef5ef;
  --w-secondary: #a8c5b0;
  --w-divider: #2f5240;
}

/* Как в приложении: «Прозрачная» просвечивает фоном под виджетом — здесь это фон секции. */
.widget-art[data-theme='glass'] {
  --w-bg: rgba(0, 0, 0, 0.4);
  --w-primary: #ffffff;
  --w-secondary: #dde6ea;
  --w-divider: rgba(255, 255, 255, 0.25);
}

.widget-themes {
  display: flex;
  gap: 10px;
}

.widget-themes button {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(18, 33, 43, 0.15);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.widget-themes button:hover {
  transform: scale(1.1);
}

.widget-themes button[aria-pressed='true'] {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--water);
}

.widget-themes button:focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 2px;
}

.theme-glass {
  background: linear-gradient(135deg, #5b8f6a, #8fb3c9);
}

/*
  Узкий экран: сначала виджет, под ним описание во всю ширину. Правило стоит
  после основных стилей виджета — раньше оно было в общем @media выше и
  проигрывало им, так что раздел оставался в две колонки.
*/
@media (max-width: 860px) {
  .widget-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .widget-art {
    order: -1;
  }

  .widget-text p {
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Юридические страницы: политика конфиденциальности, согласие на ПДн --- */
.legal {
  max-width: 760px;
  margin: 0 auto;
}

.legal .lead {
  max-width: none;
}

.legal h2 {
  margin-top: 1.6em;
}

.legal p {
  margin: 0 0 1em;
}

.legal ul,
.legal ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.legal li {
  margin: 0 0 0.5em;
}
