/* The site's text pages (privacy.html, support.html, the blog — blog.html and blog/*.html, made by scripts/blog/blog.mjs):
   the tokens and the header of index.html, a reading column. */
:root {
  --bg: #F4F3EF; --surface: #FFFFFF; --surface-2: #FAF9F5;
  --text: #1C1B19; --muted: #5F5D57; --faint: #8F8C85; --border: #E2E0D9;
  --accent: #2F6FED; --accent-soft: #E4ECFD; --on-accent: #FFFFFF; --link: #2459C8;
  --warm: #FFC857; --warm-soft: #FFF1D6; --warm-ink: #8A5300;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1C1C1E; --surface-2: #171718;
    --text: #F2F1EC; --muted: #A4A29C; --faint: #74726D; --border: #2E2E30;
    --accent: #6E9BFF; --accent-soft: #1F2B45; --on-accent: #0E1A33; --link: #6E9BFF;
    --warm-soft: #3A2D16; --warm-ink: #FFC857;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1C1C1E; --surface-2: #171718;
  --text: #F2F1EC; --muted: #A4A29C; --faint: #74726D; --border: #2E2E30;
  --accent: #6E9BFF; --accent-soft: #1F2B45; --on-accent: #0E1A33; --link: #6E9BFF;
  --warm-soft: #3A2D16; --warm-ink: #FFC857;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
button { font: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.dark-only { display: none; }
:root[data-theme="dark"] .dark-only { display: block; }
:root[data-theme="dark"] .light-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dark-only { display: block; }
  :root:not([data-theme="light"]) .light-only { display: none; }
}

header.top {
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
}
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 18px; white-space: nowrap; }
.brand img, .brand .sh-mark { width: 32px; height: 32px; flex: none; object-fit: contain; }
.theme-switch {
  margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none;
}
.theme-switch:hover { color: var(--text); }
.theme-switch svg { width: 18px; height: 18px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 12px;
  font-weight: 650; font-size: 15px; text-decoration: none; background: var(--accent); color: var(--on-accent); flex: none;
}
.lang { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); flex: none; }
.lang a { padding: 5px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.lang a:hover { color: var(--text); }
/* /privacy, /support: RU / EN над документом (в шапке — общее меню сайта) */
.doc-lang { width: max-content; margin: 24px max(0px, calc((100% - 760px) / 2)) -8px auto; } /* по правому краю .doc */

main { padding: 40px 0 72px; }
.doc { max-width: 760px; margin: 0 auto; }
/* Одна h1 на страницу: у второй (английской) части документа заголовок — h2.doc-title, разделы — h3, подразделы — h4; выглядят
   как h1 / h2 / h3 русской части. */
.doc h1, .doc .doc-title { margin: 0; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
.doc h2, .doc[lang="en"] h3 { margin: 44px 0 10px; font-size: 1.45rem; line-height: 1.25; letter-spacing: -0.015em; }
.doc h3, .doc[lang="en"] h4 { margin: 26px 0 6px; font-size: 1.1rem; }
.doc p, .doc li { color: var(--text); }
.doc p { margin: 10px 0; hyphens: auto; }
.doc ul { margin: 10px 0; padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .lead { color: var(--muted); font-size: 1.1rem; margin-top: 14px; }
.doc .meta { color: var(--muted); font-size: 14px; margin-top: 8px; } /* --faint как текст — контраст 3,0–3,9 < 4,5 (обе темы) */
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--border); }
.doc th { color: var(--muted); font-weight: 650; }
.table-scroll { overflow-x: auto; }
.draft-note {
  margin: 0 0 28px; padding: 12px 16px; border-radius: 14px; background: var(--warm-soft); color: var(--warm-ink);
  font-size: 15px; font-weight: 600;
}
.fill { background: var(--accent-soft); color: var(--link); border-radius: 6px; padding: 0 6px; font-weight: 650; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; margin: 16px 0; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 64px 0 40px; }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 18px 0; font-weight: 650; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details > p, .faq details > ul { margin: 0 0 18px; color: var(--muted); }

footer { padding: 36px 0 52px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
@media (max-width: 420px) { .button.demo { display: none; } }
/* Касание (телефон, планшет): цели нажатия в шапке, навигации и подвале — не меньше 44 px. Ссылки-строки растут отступом
   с отрицательным полем: место на экране то же, попасть пальцем проще (scripts/live-plan/check-mobile.mjs). */
@media (max-width: 979px), (pointer: coarse) {
  .brand { min-height: 44px; }
  .theme-switch { width: 44px; height: 44px; }
  .button { min-height: 44px; }
  .lang { padding: 0 3px; }
  .lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-block: 0; }
  footer nav { row-gap: 22px; }
  footer nav a { display: inline-block; padding: 11px 0; margin: -11px 0; }
}

/* Blog (scripts/blog/blog.mjs). */
.blog-nav { margin-left: auto; display: flex; gap: 18px; }
.blog-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 650; }
.blog-nav a:hover { color: var(--text); }
.blog-nav + .theme-switch { margin-left: 0; }
@media (max-width: 520px) { .blog-nav a + a { display: none; } }
.doc th.right, .doc td.right { text-align: right; padding-right: 0; white-space: nowrap; }
.doc th.center, .doc td.center { text-align: center; }
.doc ol { margin: 10px 0; padding-left: 1.4em; }
.doc code { font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 0 4px; }
.post-back { margin: 0 0 18px; font-size: 15px; }
.post-back a { color: var(--muted); text-decoration: none; }
.post-back a:hover { color: var(--text); }
@media (max-width: 979px), (pointer: coarse) { .blog-nav a, .post-back a { display: inline-block; padding: 11px 0; margin: -11px 0; } }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px !important; }
.post-tags span { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.post-list { list-style: none; margin: 32px 0 !important; padding: 0 !important; }
.post-list li { margin: 0 0 16px !important; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; }
.post-list h2 { margin: 4px 0 6px; font-size: 1.3rem; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { color: var(--link); }
.post-list p { margin: 0; color: var(--muted); }
.post-list .meta { margin: 0; }
[hidden] { display: none !important; }

/* Landing pages (scripts/blog/landing.mjs from content/landing): /zashchita-ot-protechek, /dlya-biznesa. Mobile first; same tokens. */
.ld { max-width: 1080px; }
.ld-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.ld-crumbs a { color: var(--muted); text-underline-offset: 3px; }
.ld-crumbs a:hover { color: var(--text); }
@media (max-width: 979px), (pointer: coarse) { .ld-crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; } } /* касание: 44 px, место то же */
.ld-hero {
  padding: 28px 20px; border-radius: 28px; border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%);
}
.ld-hero h1 { margin: 0; max-width: 15em; font-size: clamp(2.05rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
.ld-hero .lead { margin: 18px 0 0; max-width: 38em; color: var(--muted); font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); line-height: 1.5; text-wrap: pretty; }
.ld-hero .lead strong { color: var(--text); }
.ld-cta { margin: 24px 0 0; }
/* App Store badge of a landing page (scripts/blog/landing.mjs): the badge's own clear space (padding) hangs into the margin */
.ld-app { margin: 16px -12px 0; line-height: 0; }
.ld-cta .button {
  width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 14px; font-size: 16px; line-height: 1.3; text-align: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, transparent);
}
.ld-cta .button:hover { opacity: .93; }
.ld-section { margin: 56px 0 0; }
.ld-section h2 { margin: 0 0 18px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; }
.ld-section p { max-width: 44em; margin: 12px 0; }
.ld-points, .ld-flow, .ld-steps { list-style: none; margin: 0; padding: 0; }
.ld-points, .ld-flow { display: grid; gap: 14px; }
.ld-points li, .ld-flow li { margin: 0; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.ld-points strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 1.08rem; line-height: 1.3; }
.ld-flow strong { color: var(--text); }
.ld-icon { float: left; width: 44px; height: 44px; margin: 0 14px 6px 0; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--link); }
.ld-icon svg { width: 22px; height: 22px; }
.ld-section .ld-callout { max-width: none; margin: 16px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--accent-soft); color: var(--text); font-weight: 600; }
.ld-price .table-scroll { padding: 4px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.ld table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ld th, .ld td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.ld tbody tr:last-child td { border-bottom: 0; }
.ld th { color: var(--muted); font-size: 14px; font-weight: 650; }
.ld th.right, .ld td.right { padding-right: 0; text-align: right; min-width: 7.5em; }
.ld .ld-total td { font-size: 1.08rem; }
.ld-table .table-scroll { padding: 4px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.ld-table td { color: var(--muted); }
.ld-table td strong { color: var(--text); }
@media (max-width: 719px) {
  /* table of scenarios: on a phone each row is a small card (name above, text below) instead of two narrow columns */
  .ld-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ld-table tr, .ld-table td { display: block; }
  .ld-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .ld-table tbody tr:last-child { border-bottom: 0; }
  .ld-table td { padding: 0; border: 0; }
  .ld-table td + td { margin-top: 4px; }
}
.ld-price .ld-points + p { margin-top: 16px; color: var(--muted); font-size: 15px; }
/* «Сколько стоит» с пакетом под ключ: подзаголовки «### …» — пакет, затем таблица «из чего складывается цена» */
.ld-section h3 { margin: 36px 0 12px; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.25; letter-spacing: -0.01em; font-weight: 750; text-wrap: balance; }
.ld-section h2 + h3 { margin-top: 0; }
.ld-price h3 + p { color: var(--muted); }
.ld-calc { margin: 20px 0; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.ld-calc-fields { display: grid; gap: 14px; }
.ld-field { display: grid; gap: 6px; align-content: start; }
.ld-field span { font-weight: 650; font-size: 15px; line-height: 1.3; }
.ld-field input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 17px; font-variant-numeric: tabular-nums;
}
.ld-field input::placeholder { color: var(--muted); opacity: .75; }
.ld-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.ld-field small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.ld-section .ld-calc-result { max-width: none; margin: 18px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.ld-section .ld-calc-result.is-result { background: var(--accent-soft); color: var(--text); font-size: 1.15rem; }
.ld-section .ld-calc-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.ld-steps li { position: relative; margin: 0; padding: 4px 0 22px 52px; color: var(--muted); counter-increment: ld-step; }
.ld-steps { counter-reset: ld-step; }
.ld-steps li::before {
  content: counter(ld-step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 750; font-size: 15px;
}
.ld-steps li::after { content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px; width: 2px; border-radius: 1px; background: var(--border); }
.ld-steps li:last-child { padding-bottom: 0; }
.ld-steps li:last-child::after { display: none; }
.ld-steps strong { color: var(--text); }
.ld-note { padding: 22px 20px; border-radius: 22px; background: var(--warm-soft); }
.ld-note h2 { color: var(--warm-ink); }
.ld-note p { margin-bottom: 0; }
.ld-faq { max-width: 820px; }
.ld-final { padding: 32px 20px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.ld-final p { margin-left: auto; margin-right: auto; }
@media (min-width: 720px) {
  .ld-hero { padding: 48px 44px; }
  .ld-cta .button { width: auto; padding: 0 24px; font-size: 17px; }
  .ld-icon { float: none; margin: 0 0 14px; }
  .ld-section { margin-top: 72px; }
  .ld-points { grid-template-columns: repeat(3, 1fr); }
  .ld-flow { grid-template-columns: repeat(2, 1fr); }
  .ld-note, .ld-final { padding: 32px 36px; }
  .ld-calc { padding: 28px; }
  .ld-calc-fields { grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
}
@media (min-width: 1000px) { .ld-flow { grid-template-columns: repeat(4, 1fr); } .ld-calc-fields { grid-template-columns: repeat(3, 1fr); } }

/* /promo (scripts/live-plan/promo-static.mjs): спрайт иконок без инлайн-стиля; несколько акций — разделы и пометка «одна акция на договор» */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.promo-section li > ul { margin: 6px 0; padding-left: 1.2em; }
.promo-one { margin: 22px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--accent-soft); color: var(--text); }
.promo-section { overflow-wrap: break-word; }
