/* Общие стили Stackhand. План дизайна — docs/design-plan.md */
:root {
  --paper: #f4f6f2;
  --ink: #1c2622;
  --muted: #5b6862;
  --rule: #c9d3cd;
  --accent: #1d6a4c;
  --accent-ink: #ffffff;
  --measure: 720px;
  --wide: 860px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121715;
    --ink: #e4ebe7;
    --muted: #9aa8a1;
    --rule: #2c3632;
    --accent: #6cc39a;
    --accent-ink: #0d1411;
  }
}
:root[data-theme="dark"] {
  --paper: #121715;
  --ink: #e4ebe7;
  --muted: #9aa8a1;
  --rule: #2c3632;
  --accent: #6cc39a;
  --accent-ink: #0d1411;
}

* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.measure { max-width: var(--measure); }

/* Шапка */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; margin-right: auto; display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 24px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav { display: none; } }

.btn {
  display: inline-block; padding: 12px 20px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: 16px;
}
.btn:hover { filter: brightness(1.1); }
.link-strong { font-weight: 600; }

/* Первый экран */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 44px); margin: 0 0 20px; max-width: 18em; }
.hero .trust { color: var(--muted); margin: 0 0 28px; max-width: var(--measure); }
.hero .actions { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* Разделы */
.block { padding: 56px 0; border-top: 1px solid var(--rule); }
.block h2 { font-size: clamp(24px, 3.4vw, 28px); margin: 0 0 12px; }
.lead { color: var(--muted); max-width: var(--measure); margin-bottom: 36px; }

/* Прейскурант — главный элемент страницы */
.price-group + .price-group { margin-top: 48px; }
.price-group-title { font-size: 20px; margin: 0 0 4px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.price-group-note { color: var(--muted); font-size: 15px; margin: 12px 0 0; max-width: var(--measure); }
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 18px 0 16px; border-bottom: 1px solid var(--rule); }
.item-head { display: flex; align-items: baseline; gap: 10px; }
.item-title { font-weight: 600; font-size: 18px; flex: 0 1 auto; }
.item-leader { flex: 1 1 24px; min-width: 24px; border-bottom: 2px dotted var(--rule); transform: translateY(-5px); }
.item-price { flex: 0 0 auto; white-space: nowrap; text-align: right; }
.item-amount { font-weight: 600; font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.item-unit { color: var(--muted); font-size: 15px; }
.item-desc { color: var(--muted); font-size: 15px; margin: 4px 0 0; max-width: 62ch; }
.item-how { font-size: 15px; margin: 8px 0 0; }
.price-error { color: var(--muted); padding: 16px 0; border-top: 2px solid var(--ink); }
@media (max-width: 560px) {
  .item-head { flex-wrap: wrap; gap: 2px 10px; }
  .item-title { flex-basis: 100%; }
  .item-leader { display: none; }
  .item-price { text-align: left; white-space: normal; }
}

/* Шаги работы — настоящая последовательность, поэтому нумерация */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; padding: 10px 0; }
.steps li::before { content: counter(step); color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.steps b { font-weight: 600; }

/* Две колонки текста */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 56px; }
.cols h2 { font-size: 22px; }
.cols ul { margin: 0; padding-left: 1.1em; }
.cols li { margin-bottom: 10px; }
.cols li::marker { color: var(--muted); }

/* Вопросы */
.faq { max-width: var(--measure); border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 32px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 0 0 18px; }

/* Контакты */
.contacts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; margin: 0; font-size: 18px; }
.contacts dt { color: var(--muted); }
.contacts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .contacts { grid-template-columns: 1fr; gap: 0; }
  .contacts dd { margin-bottom: 12px; }
}

/* Подвал */
footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px; }
footer p { margin: 0; }
footer .links { display: flex; flex-direction: column; gap: 6px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* Юридические страницы */
.doc { max-width: var(--measure); padding: 48px 16px 64px; margin: 0 auto; }
.doc h1 { font-size: clamp(26px, 4vw, 32px); margin: 0 0 6px; }
.doc .date { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 20px; margin: 36px 0 12px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc .req { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 16px 0; }
