/* Шопсодел — свой CSS на токенах, без сборки (04-stack). Контраст ≥ 4.5:1, зона касания ≥ 44px (NFR-W2). */
:root {
  --bg: #f7f6fb; --card: #ffffff; --text: #1d1b26; --muted: #5d5a6b; --line: #e3e0ee;
  --brand: #5b3df5; --brand-dark: #4327d9; --brand-soft: #efebff; --ok: #157347; --warn: #9a5b00; --err: #b3261e;
  --radius: 14px; --gap: 16px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(20, 10, 60, .06), 0 6px 20px rgba(20, 10, 60, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .2em 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.2em 0 .5em; }
p { margin: .5em 0; }
code { background: var(--brand-soft); padding: 0 .3em; border-radius: 4px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; }
.top nav a { color: var(--text); text-decoration: none; padding: 10px 0; }
.top nav a:hover { color: var(--brand-dark); }
main { padding: 24px 16px 48px; }
.foot { border-top: 1px solid var(--line); padding: 20px 0 100px; font-size: .9rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 0 0 var(--gap); }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost:hover { background: #e2dbff; }
.btn-small { min-height: 44px; padding: 8px 14px; }
.btn-wide { width: 100%; }
.btn-vk { background: #0077ff; } .btn-vk:hover { background: #0062d1; }
.btn-ya { background: #1d1b26; } .btn-ya:hover { background: #000; }
.btn-tg { background: #1f86c9; } .btn-tg:hover { background: #176ea8; }

label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=url], input[type=number], textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid #bdb8cf; border-radius: 10px; font: 1rem var(--font); background: #fff; color: var(--text); }
textarea { min-height: 120px; }
input:focus, textarea:focus { border-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.hint { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.error { color: var(--err); font-weight: 600; }
.notice { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; }
.notice-warn { background: #fff4e0; color: #5c3700; }
.notice-ok { background: #e6f4ec; color: #0f5132; }

.hero { display: grid; gap: 24px; align-items: center; grid-template-columns: 1.1fr .9fr; padding: 12px 0 8px; }
.hero h1 { font-size: 2.2rem; }
.hero .lead { font-size: 1.15rem; color: var(--muted); }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.examples img { border-radius: 12px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steps li { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 6px; }

.price { font-size: 1.8rem; font-weight: 800; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-dark); font-size: .85rem; font-weight: 600; }
.badge-ok { background: #e6f4ec; color: #0f5132; } .badge-err { background: #fde8e7; color: var(--err); }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumbs img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.result img { border-radius: 12px; }
.post { white-space: pre-wrap; background: #fbfaff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%;
  animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
.htmx-indicator { display: none; } .htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 640px; margin: 0 auto; background: var(--card);
  box-shadow: 0 10px 30px rgba(20, 10, 60, .2); border-radius: var(--radius); padding: 14px 16px; z-index: 5; font-size: .95rem; }
.legal h2 { font-size: 1.15rem; }
.legal { max-width: 760px; }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  h1 { font-size: 1.5rem; }
}

.top-align { align-items: flex-start; }
.prod-img { width: 96px; height: 96px; object-fit: contain; border-radius: 10px; background: #fff; flex: none; }
.fig { margin: 0; }
.tile { text-decoration: none; color: inherit; }
.tile-img { border-radius: 10px; aspect-ratio: 4 / 5; object-fit: cover; background: var(--line); }
.btn-option { justify-content: flex-start; text-align: left; }

.hero-solo { grid-template-columns: 1fr; max-width: 720px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card h3 { margin: 0 0 6px; }
.rate .btn { min-width: 52px; padding: 8px 10px; }
@media (max-width: 720px) {
  .top nav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .top nav a { white-space: nowrap; }
  .top-in { flex-wrap: nowrap; gap: 10px; }
  .logo { flex: none; font-size: 1.1rem; }
  .top nav { flex: 1 1 auto; min-width: 0; gap: 10px; font-size: .88rem; }
  .top nav > :first-child { margin-left: auto; }
  .top-in:has(.nav-user) { flex-wrap: wrap; row-gap: 0; }
  .top nav.nav-user { flex-basis: 100%; justify-content: space-between; }
  .top nav.nav-user > :first-child { margin-left: 0; }
  .top nav .btn-small { padding: 8px 10px; }
  .cookie { padding: 12px; font-size: .9rem; }
  .cookie .row { flex-wrap: nowrap; }
  .cookie .btn { min-height: 44px; padding: 8px 12px; flex: 1; font-size: .92rem; }
}

/* таблицы не растягивают страницу на телефоне (2026-10-19) */
td, th { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  table:not(.table-stack) { display: block; overflow-x: auto; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin: 0 0 12px; }
  .table-stack td { border: 0; padding: 4px 0; }
  .table-stack td[data-label="Данные"] { font-weight: 700; }
  .table-stack td:not([data-label="Данные"])::before { content: attr(data-label) ": "; color: var(--muted); }
}
