/* Общие стили статических страниц для поиска. Палитра и шрифт — как в приложении (src/styles.css). */
:root {
  --bg: #0b1220;
  --card: #111d30;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #7d8ba0;
  --line: #1c2b45;
  --raised: #1e2e4a;
  --f-pinky: #f472b6;
  --f-ring: #fbbf24;
  --f-middle: #34d399;
  --f-index: #38bdf8;
  --f-thumb: #94a3b8;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 65ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ui);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
::selection { background: rgba(56, 189, 248, 0.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--accent); color: var(--bg); font-weight: 700;
  padding: 8px 14px; border-radius: 8px; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ── шапка ─────────────────────────────── */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 40px; }
.site-header { padding-top: 24px; }
.site-header .wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--accent); color: var(--bg); font-weight: 800;
}
.brand-name { font-size: 1.1875rem; font-weight: 800; }
.site-nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 0.9375rem; flex: 1; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current='page'] { color: var(--text); }
.site-nav .lang { margin-left: auto; }

/* ── статья ─────────────────────────────── */
main { flex: 1; }
.article { padding-top: 64px; padding-bottom: 72px; }
.article > * { max-width: var(--measure); }
.article > .wide { max-width: none; }

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.lead { margin-top: 20px; font-size: 1.25rem; line-height: 1.55; color: var(--muted); }
h2 {
  margin-top: 64px;
  font-size: 1.625rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h3 { margin-top: 32px; font-size: 1.1875rem; line-height: 1.35; font-weight: 700; }
h2 + p, h2 + ul, h2 + ol, h3 + p { margin-top: 14px; }
p + p, p + ul, p + ol, ul + p, ol + p, .table-wrap + p, figure + p { margin-top: 14px; }
figure + ul { margin-top: 20px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li + li { margin-top: 8px; }
.article li::marker { color: var(--dim); }
strong { font-weight: 700; color: var(--text); }
.muted { color: var(--muted); }
kbd {
  font: inherit; font-size: 0.875em; font-weight: 700;
  padding: 1px 7px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--line);
}

/* ── кнопки ─────────────────────────────── */
.cta { margin-top: 32px; display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 14px;
  background: var(--accent); color: var(--bg);
  font-weight: 800; font-size: 1.0625rem; text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}
.btn:hover { background: var(--accent-hover); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.cta-note { color: var(--muted); font-size: 0.9375rem; }

/* ── таблица уровней ─────────────────────── */
.table-wrap { margin-top: 20px; }
.levels { width: 100%; border-collapse: collapse; }
.levels th, .levels td { text-align: left; vertical-align: top; padding: 14px 0; }
.levels thead th { font-size: 0.875rem; font-weight: 600; color: var(--dim); padding-top: 0; }
.levels thead th:first-child { white-space: nowrap; padding-right: 24px; }
.levels tbody th { white-space: nowrap; font-size: 1.25rem; font-weight: 800; padding-right: 24px; font-variant-numeric: tabular-nums; }
.levels td { color: var(--muted); }
.levels tbody tr > * { border-top: 1px solid var(--line); }

/* ── карточка ─────────────────────────────── */
.card { margin-top: 24px; background: var(--card); border-radius: 20px; padding: 24px 28px; }
.card h3:first-child { margin-top: 0; }
.card p { color: var(--muted); }

/* ── клавиатура ─────────────────────────── */
.keyboard { margin-top: 24px; background: var(--card); border-radius: 20px; padding: 24px; max-width: 760px; }
.keyboard svg { display: block; width: 100%; height: auto; }
.keyboard figcaption { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 0.875rem; color: var(--muted); list-style: none; padding: 0 !important; }
.legend li + li { margin-top: 0 !important; }
.legend span { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 7px; vertical-align: 0; }

/* ── вопросы ─────────────────────────────── */
.faq h3 { margin-top: 28px; }
.faq h3 + p { margin-top: 8px; color: var(--muted); }

/* ── финальный призыв ─────────────────────── */
.closing { margin-top: 72px; padding: 32px 36px; background: var(--card); border-radius: 24px; max-width: var(--measure); }
.closing h2 { margin-top: 0; }
.closing p { color: var(--muted); margin-top: 10px; }
.closing .cta { margin-top: 24px; }

/* ── подвал ─────────────────────────────── */
.site-footer .wrap {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--muted);
}
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .site-header { padding-top: 16px; }
  .site-header .wrap { gap: 10px 20px; }
  .site-nav { flex-basis: 100%; gap: 4px 18px; font-size: 0.875rem; }
  .site-nav .lang { margin-left: 0; }
  .article { padding-top: 36px; padding-bottom: 48px; }
  .lead { font-size: 1.125rem; }
  h2 { margin-top: 48px; font-size: 1.375rem; }
  .btn { width: 100%; }
  .card { padding: 20px; }
  .keyboard { padding: 14px; border-radius: 16px; }
  .closing { margin-top: 56px; padding: 24px 20px; border-radius: 20px; }
  .levels tbody th { font-size: 1.0625rem; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
