/* jol24 - стили сайта. Один файл на все страницы. Светлая тема по умолчанию, тёмная - кнопкой в шапке. */
/* 19.11 (утверждено): тот же стиль, что у главной - системный шрифт, синий акцент для главной кнопки, спокойные серые линии и блоки */
:root {
  --bg: #ffffff;
  --text: #1a1d23;        /* основной текст */
  --muted: #5f6672;       /* второстепенный текст */
  --faint: #8a919c;       /* мелкие подписи */
  --rule: #e3e6eb;        /* линии */
  --surface: #f4f5f7;     /* фон блоков */
  --blue: #2563eb;        /* акцент: логотип, главная кнопка, ссылки */
  --blue-ink: #1d4ed8;
  --wa: #2563eb;          /* главная кнопка «Проверить штраф» (имя оставлено для совместимости страниц) */
  --wa-hover: #1d4ed8;
  --wa-ink: #ffffff;
  --dot: #2e7d32;
  --bubble-bot: #eef1f5;
  --bubble-me: #e6f2e7;
  --bubble-me-line: #c3e0c6;
  --shadow: none;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f141a;
  --text: #eef1f5;
  --muted: #a3acb8;
  --faint: #7d8794;
  --rule: #262f3a;
  --surface: #181e26;
  --blue: #6f9cff;
  --blue-ink: #9bbcff;
  --wa: #6f9cff;
  --wa-hover: #9bbcff;
  --wa-ink: #08172b;
  --dot: #4caf50;
  --bubble-bot: #1f2630;
  --bubble-me: #16301b;
  --bubble-me-line: #2a5a33;
  --shadow: none;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font); font-weight: 650; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(26px, 6.4vw, 34px); letter-spacing: -0.01em; margin: 0 0 14px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 12px; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---- шапка ---- */
header.top, .top { border-bottom: 1px solid var(--rule); }
.top { max-width: 720px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 7px; color: var(--text); text-decoration: none; font: 750 24px/1 var(--font); letter-spacing: -0.02em; }
.logo svg { width: 24px; height: 18px; color: var(--blue); flex: none; }
.logo b { color: var(--blue); font-weight: 750; }
.logo:hover { color: var(--text); }
.tools { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 14px; font-weight: 600; color: var(--faint); }
.lang a { color: var(--faint); text-decoration: none; }
.lang a[aria-current] { color: var(--blue); }
.lang a:hover { color: var(--blue); }
.theme { width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.theme:hover { color: var(--text); border-color: var(--muted); }
.theme svg { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

/* ---- главный экран ---- */
.hero { max-width: 720px; margin: 0 auto; padding: 22px 16px 0; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--faint); margin: 0 0 10px; }
.hero h1 { font-size: clamp(28px, 7vw, 38px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; max-width: 18ch; }
.hero .lead { font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 34ch; margin: 0 0 22px; }
.hero .btn { width: 100%; max-width: 420px; justify-content: center; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 15px; color: var(--muted); margin: 14px 0 6px; }
.meta::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.note { font-size: 12px; line-height: 1.4; color: var(--faint); margin: 0; }

/* ---- пример диалога ---- */
.chat { margin: 22px 0 0; max-width: 420px; border: 1px solid var(--rule); border-radius: 16px; padding: 12px 12px 10px; font-size: 15px; line-height: 1.4; background: var(--bg); box-shadow: var(--shadow); }
.chat-t { font-size: 14px; font-weight: 700; margin: 0 0 8px 2px; }
.msg { width: fit-content; max-width: 86%; padding: 8px 12px; border-radius: 14px; margin: 0 0 6px; }
.msg.bot { background: var(--bubble-bot); border-bottom-left-radius: 4px; }
.msg.me { margin-left: auto; background: var(--bubble-me); border: 1px solid var(--bubble-me-line); border-bottom-right-radius: 4px; }
.msg.file { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.msg.file svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.msg:last-child { margin-bottom: 0; }

/* ---- кнопка WhatsApp ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px;
  padding: 14px 22px; border-radius: 14px; font: 600 16px/1.2 var(--font);
  text-decoration: none; background: var(--wa); color: var(--wa-ink);
}
.btn:hover { background: var(--wa-hover); color: var(--wa-ink); }
.btn svg { width: 24px; height: 24px; flex: none; }

/* ---- как это работает: шаги по порядку ---- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 48px; margin: 0; min-height: 36px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  border: 0; color: var(--muted); font: 600 14px/32px var(--font); text-align: center; background: var(--surface);
}
.steps li:not(:last-child)::after { content: none; }
.steps b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; padding-top: 5px; }
.steps span { display: block; color: var(--muted); font-size: 16px; margin-top: 2px; }

/* ---- список ситуаций ---- */
.routes { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.routes li { margin: 0; border-bottom: 1px solid var(--rule); }
.routes a { display: flex; justify-content: space-between; gap: 14px; padding: 15px 2px; text-decoration: none; color: var(--text); }
.routes a span { font-weight: 600; }
.routes a::after { content: "\203A"; color: var(--faint); font-size: 22px; line-height: 1; }
.routes a small { color: var(--faint); white-space: nowrap; font-size: 14px; padding-top: 3px; margin-left: auto; }
.routes a:hover span { color: var(--blue); }

/* ---- развилка: скидка или жалоба ---- */
.fork { display: grid; gap: 12px; }
@media (min-width: 640px) { .fork { grid-template-columns: 1fr 1fr; } }
.fork > div { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 18px 18px 6px; }
.fork h3 { margin-top: 0; }
.fork + p, .faq + p { margin-top: 16px; }

/* ---- статьи ---- */
.crumbs { font-size: 14px; color: var(--faint); margin: 14px 0 14px; }
.crumbs a { color: var(--faint); }
.checked { font-size: 14px; color: var(--faint); margin: -4px 0 18px; }
.short { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 16px 18px 4px; margin: 0 0 8px; }
.short p:first-child { font-weight: 600; }
.tbl { overflow-x: auto; margin: 0 0 18px; }
.tbl table { margin: 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 700; background: var(--surface); }
td.num, th.num { text-align: right; white-space: nowrap; }
small.art { color: var(--faint); font-size: 14px; white-space: nowrap; }
.sample { margin: 8px 0 6px; }
.sample img { display: block; width: 100%; max-width: 520px; border: 1px solid var(--rule); border-radius: 10px; }
.sample figcaption { font-size: 14px; color: var(--faint); margin-top: 8px; }
.related { list-style: none; padding: 0; }
.related li { margin-bottom: 8px; }

/* ---- призыв в конце страницы ---- */
.cta { margin: 44px 0 8px; padding: 24px 20px; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); }
.cta h2 { margin: 0 0 8px; font-size: 20px; }
.cta p { color: var(--muted); margin-bottom: 18px; }

/* ---- вопросы и ответы ---- */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 15px 34px 15px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\203A"; position: absolute; right: 6px; top: 12px; font: 400 24px/1 var(--font); color: var(--faint); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(90deg); }
.faq details > div { padding: 0 0 8px; color: var(--muted); }

/* ---- калькуляторы ---- */
.calc { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 18px; margin: 0 0 18px; }
.calc label { display: block; font-weight: 700; margin-bottom: 6px; }
.calc input { font: 18px var(--font); padding: 10px 12px; border: 2px solid var(--rule); border-radius: 10px; width: 100%; max-width: 260px; background: var(--bg); color: var(--text); }
.calc input:focus { border-color: var(--blue); outline: none; }
.calc output { display: block; margin-top: 14px; font-size: 18px; }

/* ---- подвал ---- */
footer { border-top: 1px solid var(--rule); margin-top: 56px; padding: 30px 0 24px; font-size: 15px; color: var(--faint); }
footer .cols { display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); list-style: none; padding: 0; margin: 0 0 18px; }
footer .cols li { margin: 0; }
footer a { color: var(--muted); }
footer p { margin-bottom: 10px; }

/* ---- кнопка внизу экрана на телефоне ---- */
.stick { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: 84px; }
  .stick {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--rule);
  }
  .stick .btn { width: 100%; justify-content: center; font-size: 17px; padding: 12px 14px; }
  .stick.off { transform: translateY(110%); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s; }
  .stick { transition: transform .2s; }
}

/* ---- скачать образец ---- */
.dl { display: inline-block; padding: 10px 16px; border: 1px solid var(--rule); border-radius: 12px; font-weight: 600; text-decoration: none; }
.dl:hover { background: var(--surface); }

/* ссылка на WhatsApp под главной кнопкой */
.wa-alt { display: block; width: fit-content; margin-top: 12px; font-size: 15px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.wa-alt:hover { color: inherit; }
