/* Общий стиль публичных страниц ядра: лендинг, статус заявки, SEO-страницы, юридические документы,
   отписка и удаление демо. Один файл на все страницы (отдаётся как /static/site.css).
   Направление «C · Характер»: тёмная шапка и первый экран, Unbounded для заголовков, Golos Text для
   текста, акцент #FF6A1A. Шрифты — свои, из /static/fonts (CDN и внешних запросов нет).
   Оранжевый как текст на светлом фоне не используем: контраст ниже 4.5:1; на светлом он только в фоне кнопок. */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/static/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/static/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/static/fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0f0f10;
  --ink-2: #1c1c1f;
  --ink-3: #27272a;
  --paper: #efede8;
  --card: #ffffff;
  --accent: #ff6a1a;
  --accent-hi: #ff8a47;
  --text: #111111;
  --muted: #52525b;      /* на #fff и #efede8: 7+:1 */
  --line: #d9d5cc;
  --link: #b4420a;       /* ссылки на светлом фоне: 4.9:1 */
  --field: #71717a;      /* рамка поля: не ниже 3:1 */
  --focus: #b4420a;
  --danger: #9b1c1c;
  --radius-card: 22px;
  --radius-btn: 14px;
  --head: "Unbounded", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.55 var(--body);
  overflow-wrap: anywhere;
}

a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--head); margin: 0; }
h1 { font-weight: 800; font-size: clamp(32px, 6vw, 56px); line-height: 1.06; letter-spacing: -0.035em; }
h2 { font-weight: 700; font-size: clamp(24px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-weight: 500; font-size: 20px; line-height: 1.25; }

p { margin: 0; }
ol, ul { margin: 0; padding: 0; }

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

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── шапка и подвал: тёмные, как в макете ── */

.site-top { background: var(--ink); color: #fff; }
.site-top__in {
  max-width: 1240px; margin: 0 auto; padding: 18px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
}
.brand {
  font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em;
  color: #fff; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center;
}
.brand__dot { color: var(--accent); }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.top-nav a { color: #fff; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-nav .btn { margin-left: 0; }
.site-top a:focus-visible { outline-color: #fff; }
.langs { display: flex; gap: 4px; font-size: 14px; }
.langs a, .langs span { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 8px; border-radius: 10px; }
.langs a { color: #fff; text-decoration: none; border: 1px solid #3f3f46; }
.langs span { font-weight: 700; color: var(--ink); background: var(--accent); }

.foot { background: var(--ink); color: var(--ink-3); margin-top: 0; padding: 0; font-size: 14px; }
.foot__in { max-width: 1240px; margin: 0 auto; padding: 36px 16px; color: #a1a1aa; }
.foot__name { color: #fff; font-weight: 700; }
.foot__in div { margin: 4px 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; }
.foot__links a { color: #d4d4d8; min-height: 44px; display: inline-flex; align-items: center; }

/* ── оболочка страницы ── */

.page { max-width: 880px; margin: 0 auto; padding: 8px 16px 24px; }
.page > section, .page > .doc, .page > .doc-nav { margin-top: 24px; }
.page--doc { max-width: 820px; }
.page--landing { max-width: none; padding: 0; }
/* секции лендинга идут встык: фон блока сам задаёт ритм, отступ между ними даёт полосы */
.page--landing > section { margin-top: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.lead { font-size: 18px; line-height: 1.55; color: var(--muted); margin: 16px 0 0; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.meta { font-size: 14px; color: var(--muted); }
.price { font-size: 20px; font-weight: 700; margin: 12px 0 0; }

.card { background: var(--card); border-radius: var(--radius-card); padding: 24px; }
.block { padding: 64px 0; }
.block--tint { background: #e7e4dc; }

/* ── кнопки: высота 44 px и выше, радиус 14 ── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius-btn);
  font: inherit; font-weight: 600; font-size: 17px; line-height: 1.2; text-decoration: none; cursor: pointer;
  background: var(--ink); color: #fff; text-align: center;
}
.btn:hover { background: var(--ink-3); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hi); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: #52525b; }
.btn--ghost:hover { background: var(--ink-2); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--xl { min-height: 58px; padding: 0 28px; font-size: 17px; }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; min-height: 56px; }

/* ── первый экран (лендинг) ── */

.hero { background: var(--ink); color: #fff; padding: 40px 0 72px; }
.hero__in { display: flex; flex-direction: column; gap: 24px; }
.hero__title { color: #fff; max-width: 900px; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__price { font-size: 18px; color: #d4d4d8; margin: 0; }
.hero__lead { font-size: 20px; line-height: 1.5; color: #d4d4d8; max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .price { color: #fff; }

/* ── три шага ── */

.steps-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step__n { font-family: var(--head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--ink); align-self: flex-start; border-bottom: 4px solid var(--accent); padding-bottom: 6px; }
.step__d { font-size: 16px; line-height: 1.55; color: var(--muted); }
.card--dark { background: var(--ink); color: #fff; }
.card--dark .step__d { color: #d4d4d8; }
.card--dark .step__n { color: #fff; }

/* ── что входит ── */

ul.inc { list-style: none; display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
ul.inc li { background: var(--card); border-radius: 14px; padding: 14px 16px; min-height: 52px; display: flex; align-items: center; }

/* ── цена: оранжевый блок макета ── */

.price-card {
  background: var(--accent); color: var(--ink); border-radius: 28px; padding: 32px 24px;
  display: flex; flex-direction: column; gap: 24px;
}
.price-card h2 { color: var(--ink); }
.price-card ul, .price-card p { color: #3b1a08; }
.price-card__text { display: flex; flex-direction: column; gap: 12px; font-size: 18px; line-height: 1.5; }
.price-card .btn { align-self: stretch; }

/* ── форма аудита ── */

.audit-card { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; border-radius: 28px; }
.audit-card__text { display: flex; flex-direction: column; gap: 12px; }
.audit-card__text .lead { margin: 0; }

form .row { margin: 0; display: flex; flex-direction: column; gap: 6px; }
label.field { display: block; font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=url], input[type=tel] {
  width: 100%; height: 52px; font: inherit; font-size: 16px; padding: 0 14px;
  border: 1px solid var(--field); border-radius: 12px; background: #fff; color: var(--text);
}
input[aria-invalid=true] { border: 2px solid var(--danger); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: #3f3f46; cursor: pointer; }
.check input { margin: 3px 0 0; width: 22px; height: 22px; flex: none; accent-color: var(--ink); }
.check a { color: var(--link); }
.err { color: var(--danger); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.alert { border: 2px solid var(--danger); background: #fff5f5; border-radius: 12px; padding: 12px 16px; color: #5c1212; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ── вопросы и ответы ── */

details { background: var(--card); border-radius: 14px; padding: 4px 18px; }
details + details { margin-top: 10px; }
h2 + details { margin-top: 16px; }
summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
details p { padding: 0 0 16px; color: #2b2825; }

/* ── статус заявки ── */

.banner { border-radius: 12px; padding: 12px 16px; background: #fff8e6; border: 1px solid #d9a83a; color: #4d3500; margin: 16px 0 0; }
.steps { list-style: none; margin: 16px 0 0; }
.steps li { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--field); flex: none; }
.dot.done { background: #1d6b3a; border-color: #1d6b3a; }
.dot.current { border-color: var(--link); background: #fde6d8; }
ol.how, ul.plain, ul.needs { padding-left: 20px; }
ol.how li, ul.plain li, ul.needs li { margin: 8px 0; }
ul.plain.price { padding-left: 0; list-style: none; }
ul.plain.price li { background: var(--card); border-radius: 14px; padding: 12px 16px; margin: 8px 0; font-size: 18px; font-weight: 500; }
ul.needs { list-style: none; padding-left: 0; }
ul.needs li { background: var(--card); border-radius: 14px; padding: 12px 16px; }

/* ── SEO-страницы ── */

.crumbs { font-size: 14px; color: var(--muted); padding-top: 16px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--field); }
ul.cities { list-style: none; display: flex; flex-direction: column; gap: 10px; }
ul.cities > li { background: var(--card); border-radius: 14px; padding: 14px 16px; }
ul.cities ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
ul.links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 12px; }
ul.links a { display: inline-flex; align-items: center; min-height: 44px; }
.bars { list-style: none; margin: 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.bars li { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bars .bv { font-size: 14px; color: var(--muted); }
.bar { display: block; height: 10px; background: #e2ded5; border-radius: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.kv { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 0; font-size: 15px; }
.kv div { background: var(--card); border-radius: 12px; padding: 10px 14px; }

/* ── юридические документы ── */

.doc-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.doc-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.doc-nav__lang { color: var(--muted); }
.doc { background: var(--card); border-radius: var(--radius-card); padding: 28px 24px; margin-top: 16px; }
.doc h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; font-family: var(--head); font-weight: 700; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; font-family: var(--head); font-weight: 500; letter-spacing: 0; }
.doc h3 { font-size: 16px; margin: 20px 0 6px; font-family: var(--body); font-weight: 600; }
.doc p, .doc li { margin: 8px 0; }
.doc ol.clauses { padding-left: 0; list-style: none; }
.doc ol.clauses li { margin: 10px 0; }
.doc .meta { margin: 0 0 8px; }
.doc .owner { background: #f1f5f9; border-left: 3px solid #64748b; padding: 8px 12px; font-size: 14px; }
.doc .table-wrap { overflow-x: auto; margin: 12px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
.doc th, .doc td { border: 1px solid #e3e0da; padding: 6px 8px; text-align: left; vertical-align: top; }
.doc th { background: #f7f5f1; }
.draft { background: #fff3cd; border: 1px solid #f0c36d; padding: 12px 16px; border-radius: 12px; margin: 16px 0 0; color: #3d2f00; }
.doc-foot { font-size: 13px; color: var(--muted); margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc-foot div { margin: 4px 0; }

/* ── отписка, удаление демо, сообщения ── */

.notice { background: var(--card); border-radius: var(--radius-card); padding: 28px 24px; }
.notice__form { margin-top: 20px; }

/* ── узкие экраны: одна колонка, без горизонтальной прокрутки ── */

@media (min-width: 720px) {
  .top-nav { gap: 4px 28px; }
  .hero { padding: 64px 0 96px; }
  .hero__in { gap: 28px; }
  .steps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  ul.inc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 44px 40px; }
  .price-card .btn { align-self: center; width: auto; }
  .audit-card { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 44px 40px; gap: 40px; }
  .bars li { grid-template-columns: minmax(0, 1fr) 220px auto; align-items: center; gap: 16px; }
  .doc { padding: 40px 48px; }
  .notice { padding: 40px 48px; }
}

@media (min-width: 960px) {
  .block { padding: 88px 0; }
  .hero { padding: 88px 0 120px; }
  .site-top__in { padding: 22px 32px; }
  .wrap { padding: 0 32px; }
  .foot__in { padding: 40px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* служебные отступы и строки: вместо инлайн-стилей в шаблонах */
.mt { margin-top: 20px; }
.mt-sm { margin: 6px 0 0; }
.hint-inline { display: inline; margin: 0; }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

/* ── страница счёта: состояние, строки сумм, кнопки оплаты (invoice/*.html.j2) ── */

.invoice h1 { font-size: clamp(24px, 5vw, 32px); line-height: 1.15; letter-spacing: -0.02em; margin: 14px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.inv__state { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.inv__state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.inv__state--open { background: #fde6d8; color: #6b2a05; }
.inv__state--paid { background: #dcefe2; color: #16512a; }
.inv__state--canceled { background: #e4e4e7; color: #27272a; }
.inv__state--wait { background: #ececea; color: var(--muted); }
.inv__rows { margin: 20px 0 0; }
.inv__rows > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inv__rows dt { color: var(--muted); font-size: 14px; }
.inv__rows dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.inv__total dd { font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.2; }
.inv__ref dd { font-weight: 700; }
.inv__h2 { font-size: 18px; margin: 28px 0 0; }
.inv__actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.inv__form { margin: 0; }
.inv__done { margin-top: 20px; font-size: 18px; font-weight: 600; color: #16512a; }
.inv__note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.invoice .hint { margin-top: 10px; }
.invoice .alert { margin-top: 16px; }
.inv__link { margin: 16px 0 0; }
.inv__link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.inv__pdf { margin: 20px 0 0; }
/* кнопка «Копировать» у реквизита: появляется скриптом invoice.js, без JS скрыта атрибутом hidden */
.inv__rows .copy { display: inline-flex; align-items: center; min-height: 36px; margin: 0 0 0 8px; padding: 0 12px; vertical-align: middle; font: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: var(--radius-btn); cursor: pointer; }
.inv__rows .copy:hover { background: var(--ink); color: #fff; }
.inv__rows .copy[hidden] { display: none; }
.inv__pdf .btn { min-height: 44px; font-size: 15px; padding: 0 16px; }
/* реквизиты перевода: номера — моноширинные, переносятся внутри колонки, а не ломают ширину */
.inv__mono dd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.01em; }
.inv__transfer { margin-top: 28px; padding: 0; border-radius: 0; background: none; border-top: 1px solid var(--line); }
.inv__transfer > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; font-size: 17px; font-weight: 700; list-style: none; }
.inv__transfer > summary::-webkit-details-marker { display: none; }
.inv__transfer > summary::after { content: "+"; flex: none; font-size: 24px; font-weight: 500; line-height: 1; }
.inv__transfer[open] > summary::after { content: "\2212"; }
.inv__transfer > summary:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.inv__transfer .inv__rows { margin-top: 12px; }
.inv__transfer .inv__note { margin-top: 14px; }
.inv__qr { display: flex; flex-direction: column; align-items: center; margin: 16px 0 0; text-align: center; }
.inv__qr svg { display: block; width: min(180px, 60vw); height: auto; max-width: 100%; }
.inv__qr .hint { max-width: 32ch; margin: 12px 0 0; }
@media (min-width: 480px) {
  .inv__rows > div { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 16px; align-items: baseline; }
  .inv__actions { flex-direction: row; }
  .inv__actions > * { flex: 1 1 0; min-width: 0; }
}
@media (min-width: 720px) {
  .invoice { padding: 40px 48px; }
}
