/*
 * Статические страницы сайта: about, privacy, terms (EN и RU) и 404.
 * Это обычный HTML без сборки и без JS — его читают поисковики и
 * классификаторы веб-фильтров. Палитра и шрифт повторяют приложение
 * (Tailwind zinc, системный sans). Тема — из data-theme, который ставит
 * инлайн-скрипт по выбору в приложении; без JS — системная.
 */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #18181b;
  --muted: #52525b;
  --faint: #a1a1aa;
  --border: #e4e4e7;
  --soft: #f4f4f5;
  --btn-bg: #18181b;
  --btn-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #09090b;
    --fg: #f4f4f5;
    --muted: #a1a1aa;
    --faint: #71717a;
    --border: #27272a;
    --soft: #18181b;
    --btn-bg: #fafafa;
    --btn-fg: #18181b;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #09090b;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --border: #27272a;
  --soft: #18181b;
  --btn-bg: #fafafa;
  --btn-fg: #18181b;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }
}

/* --- Шапка --- */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: inherit;
  text-decoration: none;
}

.logo span {
  color: var(--faint);
}

.bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
}

.bar nav a {
  color: var(--muted);
  text-decoration: none;
}

.bar nav a:hover,
.bar nav a[aria-current='page'] {
  color: var(--fg);
}

.bar nav .lang {
  padding: 0 0.4rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.5rem;
  font-weight: 500;
}

/* --- Текст --- */

.page {
  flex: 1;
  padding-bottom: 3rem;
}

h1 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.35;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

li::marker {
  color: var(--faint);
}

.lead {
  font-size: 1.0625rem;
  color: var(--muted);
}

.updated {
  margin-top: -0.25rem;
  font-size: 0.875rem;
  color: var(--faint);
}

main a:not(.cta) {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}

main a:not(.cta):hover {
  text-decoration-color: currentColor;
}

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.625rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.cta:hover {
  opacity: 0.9;
}

/* --- Подвал --- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--faint);
}

.site-footer a {
  color: inherit;
}
