/* Поисковые сайты Keyosk: светлая страница-справочник с акцентным цветом сайта.
   Цвет акцента задаёт сборка в <head> (--accent, --accent-deep, --accent-soft). */
:root {
  --bg: #fbfaf7;
  --card: #ffffff;
  --ink: #1d1f22;
  --muted: #5f6670;
  --line: #e6e2d9;
  --warn: #9a4a00;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1040px;
  --gutter: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--text); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }

/* Шапка */
.hdr { position: sticky; top: 0; z-index: 10; background: rgba(251, 250, 247, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.logo { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.logo b { padding: 2px 8px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; }
.hdr nav { display: none; gap: 18px; margin-left: auto; }
.hdr nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.hdr nav a:hover, .hdr nav a[aria-current] { color: var(--ink); }
.hdr .btn { margin-left: auto; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 12px;
  background: var(--accent); color: #fff; font: 600 17px/1.2 var(--text); text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--accent-deep); box-shadow: inset 0 0 0 2px var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* Хлебные крошки и шапка статьи */
.crumbs { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.doc { max-width: 760px; padding: 20px 0 48px; }
.doc.wide { max-width: none; }
h1 { margin: 6px 0 12px; font-size: clamp(30px, 6.4vw, 46px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
h2 { margin: 44px 0 14px; font-size: clamp(23px, 4.6vw, 30px); line-height: 1.2; letter-spacing: -0.01em; }
h3 { margin: 26px 0 8px; font-size: 19px; line-height: 1.3; }
p, ul, ol, table { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.lead { font-size: 19px; color: #33373d; }
strong { font-weight: 600; }

/* Первый экран главной */
.hero { display: grid; gap: 24px; padding: 28px 0 8px; }
.hero h1 { font-size: clamp(34px, 7.6vw, 56px); }
.hero .price { color: var(--accent-deep); white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 16px; }
.hero-actions .btn { flex: 1 1 240px; max-width: 340px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ticks li { margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 14px; font-weight: 600; }
.hero-card { padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(30, 30, 20, 0.06); }
.hero-card h2 { margin: 0 0 12px; font-size: 20px; }

/* Цены */
.prices { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.prices th, .prices td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.prices tr:last-child td { border-bottom: 0; }
.prices th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; background: #f6f4ef; }
.prices .sum { font-weight: 700; white-space: nowrap; }
.prices .go { text-align: right; }
.prices .go a { white-space: nowrap; font-weight: 600; }
.prices tr.main td { background: var(--accent-soft); }
.prices small { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; }
.scroll .prices { min-width: 0; }
/* На телефоне строка тарифа — название сверху, цена и кнопка под ним, без прокрутки вбок. */
@media (max-width: 640px) {
  .prices thead { display: none; }
  .prices, .prices tbody { display: block; }
  .prices tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .prices tr:last-child { border-bottom: 0; }
  .prices tr.main { background: var(--accent-soft); }
  .prices td { display: block; padding: 0; border: 0; background: none !important; }
  .prices td:first-child { grid-column: 1 / -1; }
  .prices .sum { font-size: 19px; }
}
.note { color: var(--muted); font-size: 15px; }

/* Таблицы сравнения */
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border: 1px solid var(--line); }
.cmp th, .cmp td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp th { background: #f6f4ef; font-weight: 600; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
.scroll table { margin: 0; min-width: 560px; }

/* Шаги */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; margin: 0; padding: 16px 16px 16px 62px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700;
}
.steps b { display: block; margin-bottom: 2px; }

/* Врезки */
.box { margin: 22px 0; padding: 18px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.box > :last-child { margin-bottom: 0; }
.box-warn { border-color: #f0d2b0; background: #fff8f0; }
.box-good { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.cta { margin: 30px 0; padding: 22px; border-radius: 18px; background: var(--ink); color: #f5f3ee; display: grid; gap: 14px; }
.cta h2, .cta h3 { margin: 0; color: #fff; font-size: 22px; }
.cta p { margin: 0; color: #d8d4ca; }
.cta .btn { justify-self: start; }

/* Вопросы */
.qa { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 0 0 8px; }
.qa summary { cursor: pointer; list-style: none; padding: 15px 46px 15px 18px; position: relative; font-weight: 600; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 24px; font-weight: 400; }
.qa[open] summary::after { content: "−"; }
.qa > div { padding: 0 18px 16px; color: #33373d; }
.qa > div > :last-child { margin-bottom: 0; }

/* Ссылки на статьи */
.cards { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; margin-bottom: 4px; color: var(--accent-deep); }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Подвал */
.ftr { margin-top: 24px; padding: 28px 0 96px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.ftr nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.ftr nav a { color: var(--ink); }
.ftr p { margin: 6px 0; max-width: 64em; }

/* Кнопка у нижнего края на телефоне */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, rgba(251, 250, 247, 0)); }
.dock .btn { width: 100%; }

@media (min-width: 800px) {
  :root { --gutter: 24px; }
  .hdr nav { display: flex; }
  .hdr .btn { margin-left: 0; }
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 40px; padding: 48px 0 16px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .cta { grid-template-columns: 1fr auto; align-items: center; padding: 26px 30px; }
  .cta .btn { justify-self: end; }
  .dock { display: none !important; }
  .ftr { padding-bottom: 40px; }
}
