:root {
  --bg: #fbfaf6;
  --bg-alt: #f1efe8;
  --card: #ffffff;
  --text: #1c2420;
  --muted: #53605a;
  --line: #d9d6cb;
  --accent: #0d6b58;
  --accent-text: #ffffff;
  --accent-soft: #dff0ea;
  --warn-bg: #fff4d6;
  --warn-line: #e3c36a;
  --bubble-in: #eceae1;
  --bubble-out: #dff0ea;
  --radius: 14px;
  --maxw: 1040px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111715;
    --bg-alt: #172019;
    --card: #1b2420;
    --text: #e9efec;
    --muted: #a6b3ad;
    --line: #2f3c36;
    --accent: #55c6aa;
    --accent-text: #08201a;
    --accent-soft: #1d3a31;
    --warn-bg: #3a3118;
    --warn-line: #6e5c22;
    --bubble-in: #25302b;
    --bubble-out: #1d3a31;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.nav a {
  display: inline-block;
  padding: 11px 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.97rem;
}
.nav a:hover { color: var(--accent); text-decoration: underline; }
.nav a[aria-current="page"] { font-weight: 700; }

/* buttons */
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--accent);
  text-align: center;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary {
  background: transparent;
  color: var(--accent);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* sections */
section { padding: 52px 0; }
section.alt { background: var(--bg-alt); }
h1, h2, h3 { line-height: 1.22; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.hero { padding: 44px 0 52px; }
.hero-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 48px; }
}
.note { font-size: 0.93rem; color: var(--muted); margin-top: 14px; }

/* chat mock */
.chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat .cap { font-size: 0.85rem; color: var(--muted); margin: 0 0 4px; }
.bubble {
  margin: 0;
  padding: 9px 13px;
  border-radius: 14px;
  max-width: 88%;
  font-size: 0.97rem;
  line-height: 1.45;
}
.bubble.in { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat .time { align-self: center; font-size: 0.8rem; color: var(--muted); }

/* grids and cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid.two { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: s;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.steps li::before {
  content: counter(s);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  margin-bottom: 10px;
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.example {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 0.93rem;
  line-height: 1.5;
}
.example strong { display: block; margin-bottom: 2px; }

ul.check { list-style: none; padding: 0; margin: 0; }
ul.check li { position: relative; padding-left: 28px; margin-bottom: 10px; }
ul.check li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 8px;
  height: 14px;
  border: solid var(--accent);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* pricing */
.plan .price { font-size: 2rem; font-weight: 800; line-height: 1.1; margin: 4px 0 2px; }
.plan .per { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.plan.featured { border: 2px solid var(--accent); }
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* faq */
details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  list-style-position: inside;
}
details[open] summary { border-bottom: 1px solid var(--line); }
details .ans { padding: 14px 18px 4px; }

.cta { text-align: center; }
.cta .lead { margin-left: auto; margin-right: auto; }
.cta .btn-row { justify-content: center; }

/* article pages */
.article { padding: 36px 0 56px; max-width: 760px; }
.article h1 { margin-bottom: 0.4em; }
.article h2 { margin-top: 1.8em; font-size: 1.4rem; }
.article ol, .article ul { padding-left: 1.4em; }
.article li { margin-bottom: 0.5em; }
.article code, code {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.template-note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 700;
  margin: 16px 0 24px;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 420px; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; font-size: 0.95rem; }
th { background: var(--bg-alt); }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding: 28px 0;
  font-size: 0.93rem;
  color: var(--muted);
}
.site-footer ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--text); }
.site-footer p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Длинные слова в заголовках («конфиденциальности») переносятся по слогам, а не посреди слова. */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; }
