:root {
  /* Цвета из логотипа Swipix: циан #00F5FF → бирюза #00AEB5 */
  --bg: #eef3f5; --surface: #fff; --ink: #0a1f2b; --muted: #536571; --line: #d4dfe4;
  --accent: #00808c; --accent-ink: #042129; --brand-a: #00eef8; --brand-b: #00b3bc;
  --money: #13744c; --hold: #9a6410; --bad: #b42318;
  --radius: 10px;
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; font-size: 16px; }
a { color: var(--accent); }
h1, h2 { margin: 0 0 .75rem; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1120px; margin: 0 auto; padding: 1.25rem 1.25rem .5rem; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.top form { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.stack > * + * { margin-top: 1.25rem; }

label { display: block; font-size: .875rem; color: var(--muted); margin: .75rem 0 .25rem; }
input, select { width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; }
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
button { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: .65rem 1.1rem;
  background: linear-gradient(100deg, var(--brand-a), var(--brand-b)); color: var(--accent-ink); cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button.danger { color: #fff; }
button.link { background: none; color: var(--muted); padding: .25rem; font-weight: 500; }
button.danger { background: var(--bad); }
button[disabled] { opacity: .5; cursor: not-allowed; }

.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid var(--line); background: var(--surface); }
.flash-ok { border-color: color-mix(in srgb, var(--money) 40%, var(--line)); }
.flash-bad, .error { color: var(--bad); }
.error { margin-top: .75rem; }

/* Вход и регистрация */
.auth { max-width: 400px; margin: 8vh auto 0; }
.auth button { width: 100%; margin-top: 1.25rem; }
.auth .alt { margin-top: 1rem; text-align: center; }

/* Главный блок: баланс и путь к выводу */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; }
.balance { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.5rem; }
.balance .muted { color: #aab3c7; }
.amount { font-size: clamp(2.5rem, 7vw, 3.75rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; margin: .5rem 0; font-variant-numeric: tabular-nums; }
.local { color: #cfd6e4; font-size: 1.05rem; }
.meter { height: 10px; background: #1e3a47; border-radius: 99px; margin: 1.25rem 0 .5rem; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); border-radius: 99px; transition: width .6s ease; }
.meter.full span { background: #3fd08f; }
.hold-note { margin-top: .75rem; color: #f3c77a; }
.balance, .calc { background: var(--ink); }
.linkbox { display: flex; gap: .5rem; margin: .5rem 0 .75rem; }
.linkbox input { font-variant-numeric: tabular-nums; }
.linkbox button { flex: none; }

/* Воронка — реальная последовательность, поэтому идёт шагами */
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); }
.funnel div { padding: 1rem 1.25rem; border-left: 1px solid var(--line); }
.funnel div:first-child { border-left: 0; }
.funnel b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.funnel span { color: var(--muted); font-size: .875rem; }
.funnel div:last-child b { color: var(--bad); }

.grid2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.25rem; align-items: start; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--line); }
td { padding: .6rem .5rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
code { font-size: .85em; background: var(--bg); padding: .1rem .35rem; border-radius: 4px; word-break: break-all; }
.tag { display: inline-block; font-size: .8rem; padding: .1rem .5rem; border-radius: 99px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--money); background: color-mix(in srgb, var(--money) 12%, #fff); }
.tag.hold { color: var(--hold); background: color-mix(in srgb, var(--hold) 12%, #fff); }
.tag.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, #fff); }
.empty { color: var(--muted); padding: 1rem 0; }
.inline { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; flex: 1; min-width: 140px; padding: .4rem .6rem; }
.inline button { padding: .4rem .8rem; font-size: .875rem; }

.kpis { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.kpis div b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpis div span { color: var(--muted); font-size: .85rem; }

@media (max-width: 860px) {
  .hero, .grid2 { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: repeat(2, 1fr); }
  .funnel div { border-left: 0; border-top: 1px solid var(--line); }
  .funnel div:nth-child(-n+2) { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }

/* ---------- Навигация ---------- */
.nav { display: flex; align-items: center; gap: .75rem; }
.navlink { color: var(--ink); text-decoration: none; font-weight: 500; }
.navlink:hover { color: var(--accent); }
.btn { display: inline-block; font-weight: 700; text-decoration: none; border-radius: 8px; padding: .6rem 1.1rem;
  background: linear-gradient(100deg, var(--brand-a), var(--brand-b)); color: var(--accent-ink); border: 1px solid transparent; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.big { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn.light { background: var(--ink); color: #fff; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; font-weight: 600; font-size: .875rem; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem; list-style: none; z-index: 10;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 170px;
  box-shadow: 0 8px 24px rgba(22, 32, 58, .12); }
.lang a { display: block; padding: .45rem .65rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.lang a:hover { background: var(--bg); }
.lang a[aria-current] { font-weight: 600; color: var(--accent); }

/* ---------- Лендинг ---------- */
.land-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: center; padding: 3rem 0 2.5rem; }
.display { font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin: 0 0 1.25rem; max-width: 16ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 54ch; margin-bottom: 1.75rem; }
.cta-note { margin-top: .75rem; }

.calc { background: var(--ink); color: #fff; border-radius: 16px; padding: 2rem; }
.calc-title { color: #aab3c7; margin-bottom: .25rem; }
.calc-out { margin: 0 0 1.5rem; line-height: 1; }
#calc-sum { font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.03em; color: var(--brand-a); font-variant-numeric: tabular-nums; }
.calc-per { color: #cfd6e4; font-size: 1.1rem; }
.calc-label { color: #cfd6e4; margin: 0 0 .5rem; }
.calc-label b { color: #fff; font-variant-numeric: tabular-nums; }
.calc input[type=range] { padding: 0; border: 0; background: transparent; accent-color: var(--brand-a); height: 28px; }
.calc-note { color: #8e98ae; margin-top: .75rem; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.facts div { padding: 1.25rem 1.5rem; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts b { display: block; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .9rem; }

.section-h { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; margin: 3.5rem 0 1.25rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(step); display: block; font-size: 2.5rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: .75rem; }
.steps h3 { margin: 0 0 .35rem; font-size: 1.15rem; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: .6rem; }

.final { margin-top: 4rem; background: linear-gradient(110deg, var(--brand-a), var(--brand-b)); color: var(--accent-ink); border-radius: 16px; padding: 2.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.final h2 { font-size: 1.6rem; margin-bottom: .35rem; }
.final p { color: #0b3a42; margin: 0; }

.foot { max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem 3rem; display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }

.prose { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.prose li { margin-bottom: .75rem; }

/* ---------- Формы ---------- */
.auth { max-width: 460px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink); margin-top: .9rem; }
.check input { width: 18px; height: 18px; margin-top: .15rem; flex: none; accent-color: var(--accent); }
textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; resize: vertical; }
details.settings summary { cursor: pointer; list-style: none; }
details.settings summary::-webkit-details-marker { display: none; }
details.settings summary h2 { margin: 0; }
details.settings[open] summary h2 { margin-bottom: .5rem; }

@media (max-width: 860px) {
  .land-hero { grid-template-columns: 1fr; padding-top: 1.5rem; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div { border-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(-n+2) { border-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .navlink { display: none; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---------- Swipix ---------- */
.brand img { height: 30px; width: auto; display: block; }
.brand .sub { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.brand { display: flex; flex-direction: column; }

.geo { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.geo button { background: #14323f; color: #cfe6ea; font-weight: 600; padding: .4rem .75rem; font-size: .875rem; }
.geo button[aria-pressed="true"] { background: linear-gradient(100deg, var(--brand-a), var(--brand-b)); color: var(--accent-ink); }

.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.rate { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.rate-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .75rem; }
.rate-head b { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rate:first-child .rate-head b { background: linear-gradient(100deg, #00b8c4, #007f8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-size: .8rem; padding: .15rem .45rem; border-radius: 6px; background: var(--bg); white-space: nowrap; }
@media (max-width: 860px) { .rates { grid-template-columns: 1fr; } }
