/* Общее для всех страниц сайта: цвета, шапка, подвал, статьи и тексты главной. Редактор — в app.css. */
:root {
  --bg: #f3f4f6; --fg: #16181d; --muted: #6b7280; --line: #d6d9df; --card: #ffffff;
  --accent: #2a9df4; --accent-fg: #ffffff; --shade: rgba(10, 12, 16, .58); --link: #1877c9;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e1015; --fg: #eceef2; --muted: #9097a3; --line: #2b2f38; --card: #171a21; --link: #5cb6ff; }
}
* { box-sizing: border-box; }
html { height: 100%; }
/* Колонка во всю высоту окна: подвал прижат к низу экрана, а не висит посреди короткой страницы. */
body { margin: 0; min-height: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
/* Заголовки переносятся ровными строками, без одинокого слова в конце */
h1, h2, .card b { text-wrap: balance; }
/* В Mini App (внутри Telegram) шапка, подвал сайта и тексты для поисковиков не нужны: класс ставит скрипт в <head>. */
.miniapp .site-only { display: none !important; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }

/* Шапка */
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; min-height: 60px; padding-top: 8px;
  padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: -.02em;
  color: var(--fg); text-decoration: none; }
.brand img { display: block; }
.site-nav { display: flex; gap: 18px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--fg); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-cta { font-size: 15px; font-weight: 600; color: var(--accent-fg); background: var(--accent); text-decoration: none;
  padding: 8px 16px; border-radius: 12px; white-space: nowrap; }
@media (max-width: 560px) {
  .site-nav { gap: 14px; }
  .site-nav .opt { display: none; }
}
@media (max-width: 420px) {
  .header-cta { display: none; }   /* на узком экране в статьях хватит логотипа: он тоже ведёт в редактор */
}

/* Подвал */
.site-footer { padding: 24px 0 30px; color: var(--muted); font-size: 13px; text-align: center; }
html:not(.miniapp) .site-footer { margin-top: 32px; border-top: 1px solid var(--line); }
.miniapp .site-footer { padding: 8px 0 28px; }
.site-footer a { color: inherit; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; font-size: 14px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.site-footer p { margin: 0; }
.site-footer .copy { margin-top: 8px; font-size: 12px; }

/* Статьи и простые страницы */
.page { flex: 1; width: min(792px, 100%); margin: 0 auto; padding: 20px 16px 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; font-size: 14px; color: var(--muted); }
.crumbs a { color: inherit; }
.crumbs .sep { opacity: .6; }
.article { font-size: 18px; line-height: 1.6; }
.article h1 { margin: 0 0 10px; font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -.02em; }
.article h2 { margin: 40px 0 12px; font-size: clamp(23px, 3.4vw, 28px); line-height: 1.25; letter-spacing: -.01em; }
.article p, .article ul, .article ol, .article table { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 24px; }
.article li { margin: 6px 0; }
.article a, .landing a:not(.card) { color: var(--link); }
.article-meta { font-size: 14px; color: var(--muted); }
.article h1 + .article-meta { margin-bottom: 24px; }
.lead { font-size: 20px; line-height: 1.5; }
.article table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.article th, .article td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article th { font-size: 14px; font-weight: 600; color: var(--muted); }
/* Кнопка бота или редактора, о которой идёт речь в тексте */
.bt { padding: 1px 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); font-size: .88em;
  white-space: nowrap; }
.tip { padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 11%, var(--card)); font-size: 16px; line-height: 1.5; }
.steps { padding: 0 !important; list-style: none; counter-reset: step; }
.steps > li { position: relative; margin: 14px 0; padding-left: 46px; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-size: 16px; font-weight: 700; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.cta a { flex: 1 1 220px; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 20px;
  border-radius: 16px; font-size: 18px; font-weight: 600; text-align: center; text-decoration: none; }
.article .cta .main, .cta .main { background: var(--accent); color: var(--accent-fg); }
.article .cta .alt, .cta .alt { border: 2px solid var(--line); background: var(--card); color: var(--fg); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { padding: 14px 0; font-weight: 600; cursor: pointer; }
.faq p { margin: 0 0 16px; }
.more { margin-top: 48px; }
.more h2 { margin: 0 0 14px; font-size: 22px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card b { font-size: 18px; line-height: 1.3; }
.card span { font-size: 15px; line-height: 1.45; color: var(--muted); }
.notfound { padding: 40px 0; text-align: center; }

/* Главная: заголовок над редактором и тексты под ним (только на сайте и только на первом шаге) */
.hero { text-align: center; }
.hero h1 { margin: 0 0 12px; font-size: clamp(30px, 5.2vw, 48px); line-height: 1.1; letter-spacing: -.025em; }
.hero p { max-width: 640px; margin: 0 auto; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45; color: var(--muted); }
.landing { width: min(1120px, 100%); margin: 0 auto; padding: 32px 16px 0; }
body[data-step]:not([data-step="pick"]) .landing { display: none; }
.land-block { margin: 0 0 56px; }
.land-block > h2 { margin: 0 0 20px; font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -.015em; text-align: center; }
.how { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0; padding: 0;
  list-style: none; counter-reset: step; }
.how li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); counter-increment: step; }
.how li::before { content: counter(step); width: 34px; height: 34px; margin-bottom: 6px; border-radius: 50%; display: grid;
  place-items: center; background: var(--accent); color: var(--accent-fg); font-weight: 700; }
.how b { font-size: 18px; }
.how span { font-size: 15px; line-height: 1.45; color: var(--muted); }
.features { display: grid; gap: 14px 32px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 0; padding: 0;
  list-style: none; font-size: 16px; line-height: 1.5; }
.features li { position: relative; padding-left: 28px; }
.features li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }
.faq-list { max-width: 792px; margin: 0 auto; font-size: 17px; line-height: 1.55; }
