/* Страницы сайта: главная, инструкция, статьи. Приложение живет на /app со своим app.css. */
:root {
  --ink: #1f2545; --soft: #566090; --sky: #e3f0fb; --panel: #ffffff; --well: #eef6ff;
  --line: #1f2545; --shade: #a9cbea; --accent: #2f6fe0; --accent-d: #1d3f9e; --gold: #f2b53a; --green: #35a866; --red: #dd4459;
  --f-b: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-d: "Balsamiq Sans", "Golos Text", system-ui, sans-serif;
  --box: 0 0 0 2.5px var(--line), 0 6px 0 2.5px var(--shade);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 17px/1.6 var(--f-b); }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 48px; }

/* Шапка и подвал (pages/_header.html, pages/_footer.html) */
.site-top { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 23px/1 var(--f-d); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line); }
.site-nav { display: none; gap: 18px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--accent); }
.site-acts { display: flex; gap: 8px; }
@media (max-width: 400px) { .brand span { display: none; } .site-acts .btn.small { padding: 8px 12px; } }
.site-foot { margin-top: 40px; padding: 24px 0 8px; border-top: 2px solid #c9dcef; color: var(--soft); font-size: 15px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.site-foot a { color: var(--soft); }

/* Кнопки */
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 17px/1.2 var(--f-d); text-decoration: none; text-align: center; border: 0; cursor: pointer; box-shadow: 0 0 0 2.5px var(--line), 0 5px 0 2.5px var(--accent-d); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 2.5px var(--line), 0 2px 0 2.5px var(--accent-d); }
.btn.plain { background: #fff; color: var(--ink); box-shadow: 0 0 0 2.5px var(--line), 0 5px 0 2.5px var(--shade); }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 0 0 2.5px var(--line), 0 5px 0 2.5px #c98a1a; }
.btn.small { padding: 8px 14px; font-size: 15px; }
.btn.big { padding: 16px 28px; font-size: 20px; }

/* Текст */
h1, h2, h3 { font-family: var(--f-d); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 34px; }
h2 { font-size: 27px; margin-top: 44px; }
h3 { font-size: 21px; margin-top: 22px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
.lead { font-size: 19px; color: var(--soft); }
.sub { color: var(--soft); font-size: 15px; }

/* Блоки */
.card { background: var(--panel); border-radius: 20px; box-shadow: var(--box); padding: 20px; margin: 22px 0; }
.card > :last-child { margin-bottom: 0; }
.note { background: var(--well); border-radius: 14px; padding: 12px 16px; margin: 14px 0; }
.note > :last-child { margin-bottom: 0; }
.tip { border-left: 5px solid var(--gold); background: #fff8e6; border-radius: 0 14px 14px 0; padding: 12px 16px; margin: 14px 0; }
.tip > :last-child { margin-bottom: 0; }
.two { display: grid; grid-template-columns: 1fr; gap: 14px; }
.three { display: grid; grid-template-columns: 1fr; gap: 14px; }
.opt { background: var(--well); border-radius: 16px; padding: 14px 16px; }
.opt > b:first-child { display: block; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1.5px solid #d6e3f2; }
th { font-weight: 600; color: var(--soft); background: var(--well); }
.shot { margin: 0; text-align: center; }
.shot img { width: 100%; max-width: 270px; border-radius: 18px; box-shadow: 0 0 0 2.5px var(--line), 0 6px 0 2.5px var(--shade); background: #fff; }
.shot figcaption { font-size: 14px; color: var(--soft); margin-top: 10px; }
.heroes { display: flex; justify-content: center; align-items: flex-end; gap: 4px; min-height: 120px; }
.heroes svg { width: 96px; height: auto; }
details { background: var(--panel); border-radius: 16px; box-shadow: 0 0 0 2.5px var(--line); padding: 14px 18px; margin: 12px 0; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 10px 0 0; }

/* Статьи */
.crumbs { font-size: 14px; color: var(--soft); margin: 4px 0 10px; }
.crumbs a { color: var(--soft); }
.article-head { background: var(--panel); border-radius: 22px; box-shadow: var(--box); padding: 22px 20px; margin-bottom: 24px; }
.article-head .meta { color: var(--soft); font-size: 14px; margin: 0; }
.toc { background: var(--well); border-radius: 16px; padding: 14px 18px 4px; margin: 0 0 22px; }
.toc b { display: block; margin-bottom: 6px; }
.article h2 { scroll-margin-top: 12px; }
.article .card h2:first-child, .article .card h3:first-child { margin-top: 0; }
.cta-box { background: linear-gradient(135deg, #2f6fe0, #5aa8f5); color: #fff; border-radius: 22px; box-shadow: 0 0 0 2.5px var(--line), 0 6px 0 2.5px var(--accent-d); padding: 22px 20px; margin: 30px 0; }
.cta-box h2, .cta-box h3 { margin-top: 0; color: #fff; }
.cta-box p { color: #eaf3ff; }
.cta-box .btn { background: #fff; color: var(--ink); box-shadow: 0 0 0 2.5px var(--line), 0 5px 0 2.5px var(--accent-d); }
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0; }
.acard { display: block; background: var(--panel); border-radius: 20px; box-shadow: var(--box); padding: 18px; color: var(--ink); text-decoration: none; }
.acard:hover { transform: translateY(-2px); }
.acard b { display: block; font: 700 20px/1.25 var(--f-d); margin-bottom: 6px; }
.acard span { color: var(--soft); font-size: 15px; }

/* Главная */
.hero-block { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; padding: 24px 20px; background: var(--panel); border-radius: 24px; box-shadow: var(--box); }
.hero-block h1 { font-size: 36px; }
.hero-block .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.feature { background: var(--panel); border-radius: 20px; box-shadow: var(--box); padding: 18px; }
.feature .ico { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.feature h3 { margin-top: 0; }
.feature p { margin: 0; color: var(--soft); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2.5px var(--line); font: 700 20px/38px var(--f-d); text-align: center; }

@media (min-width: 720px) {
  h1 { font-size: 40px; }
  .site-nav { display: flex; }
  .hero-block { grid-template-columns: 1.3fr 1fr; padding: 32px; }
  .hero-block h1 { font-size: 46px; }
  .two { grid-template-columns: 1fr 1fr; }
  .three { grid-template-columns: 1fr 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .heroes svg { width: 120px; }
}
