:root {
  --bg: #f4f6f9; --card: #ffffff; --text: #14181f; --muted: #667085; --line: #e3e7ee;
  --accent: #1f6feb; --accent-text: #ffffff; --ok: #12805c; --ok-bg: #e3f5ee; --warn-bg: #fff4e0; --warn: #8a5300;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --card: #161b22; --text: #e8ecf2; --muted: #9aa4b2; --line: #2a313c;
    --accent: #4c8dff; --accent-text: #08111f; --ok: #3ccf91; --ok-bg: #12291f; --warn-bg: #2d2210; --warn: #f0b44c;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --card: #161b22; --text: #e8ecf2; --muted: #9aa4b2; --line: #2a313c;
  --accent: #4c8dff; --accent-text: #08111f; --ok: #3ccf91; --ok-bg: #12291f; --warn-bg: #2d2210; --warn: #f0b44c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Inter, sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; }
nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 15px; }
nav a { text-decoration: none; }
.hero { padding: 32px 0 8px; }
h1 { font-size: clamp(26px, 6vw, 36px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin: 0 0 14px; }
.lead { font-size: 17px; color: var(--muted); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; gap: 10px; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
button, .pay { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 18px; background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; text-align: center; }
.qr[hidden] { display: none; }
.qr { display: block; width: 220px; height: 220px; margin: 16px auto 0; border-radius: 12px; background: #fff; padding: 8px; }
@media (max-width: 560px) { .qr { display: none !important; } }
.pay { display: block; margin: 16px 0 6px; padding: 14px; font-size: 17px; }
.order-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 14px 0 6px; }
.o-what { font-weight: 600; font-size: 18px; }
.o-total { text-align: right; display: flex; flex-direction: column; }
.o-total span:first-child { font-size: 26px; font-weight: 700; white-space: nowrap; }
.steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; border-top: 4px solid var(--line); padding-top: 8px; font-size: 14px; color: var(--muted); }
.steps li b { display: block; color: var(--text); font-size: 15px; }
.steps li b::before { content: counter(s) ". "; }
.steps li.ok { border-color: var(--ok); }
.steps li.now { border-color: var(--accent); }
.steps li span { display: block; }
.alert { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.refund td:last-child { white-space: normal; text-align: left; width: 50%; }
.sum td { font-weight: 700; border-bottom: 0; }
.hist { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.calc-out { margin-top: 16px; }
.big { font-size: 34px; font-weight: 700; }
.path { padding-left: 22px; margin: 0; }
.path li { margin-bottom: 10px; }
.foot { color: var(--muted); font-size: 14px; padding-top: 8px; padding-bottom: 40px; }
/* оферта */
.doc h1 { font-size: 26px; margin-top: 28px; }
.doc h2 { font-size: 19px; margin-top: 26px; }
.doc p, .doc li { margin: 6px 0; }
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .order-head { flex-direction: column; }
  .o-total { text-align: left; }
}
