/* PO.BOOST Partners — витрина и кабинет партнёра.
   Светлая «бумага», кобальт, гильош как на банкноте; крупный гротеск
   Dela Gothic One, текст — Onest, цифры и подписи — JetBrains Mono.
   Один файл на обе страницы: кабинет переиспользует кнопки, карточки,
   подписи и одометр витрины. */

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes marquee { to { transform: translateX(-50%); } }

:root {
  color-scheme: light;
  --paper: #F4F7FE;
  --paper-2: #FFFFFF;
  --ink: #0B1D52;
  --cobalt: #1E46F0;
  --cobalt-2: #1638C9;
  --azure: #7FA8FF;
  --ice: #E1EAFF;
  --mute: #53628E;
  --rule: rgba(30, 70, 240, .16);
  --guil: rgba(30, 70, 240, .09);
  --glass-hi: rgba(255, 255, 255, .84);
  --glass-lo: rgba(225, 234, 255, .6);
  --bar: rgba(244, 247, 254, .74);
  --shine: rgba(255, 255, 255, .6);
  --shadow: rgba(11, 29, 82, .30);
  --good: #0E8A55;
  --good-bg: #DDF5EA;
  --warn: #A3620A;
  --warn-bg: #FDF0D9;
  --bad: #C2304A;
  --bad-bg: #FCE3E8;
  --f-display: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --f-body: "Onest", "Segoe UI", Roboto, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .75, .15, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { background: var(--paper); overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  padding-inline: var(--gutter); position: relative; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--cobalt); color: var(--paper-2); }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

#gl { position: fixed; inset: 0 auto auto 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; display: block; }
main, .foot { position: relative; z-index: 1; }
.wrap { max-width: var(--maxw); margin-inline: auto; }

/* ─── шапка ─── */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: calc(env(safe-area-inset-top, 0px) + 12px) var(--gutter) 0; }
.top-in {
  position: relative; max-width: var(--maxw); margin-inline: auto; display: flex; align-items: center; gap: 20px;
  padding: 8px 8px 8px 14px; background: var(--bar);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--rule); border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 18px; color: var(--ink); white-space: nowrap; text-decoration: none; }
.brand b { color: var(--cobalt); font-weight: 400; }
.brand-seal {
  width: 30px; height: 30px; border-radius: 50%; background: var(--cobalt); color: var(--paper-2);
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--ice), 0 0 0 4px var(--cobalt); flex: none;
}
.brand-seal svg { width: 16px; height: 16px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a, .nav button {
  color: var(--mute); font-weight: 500; font-size: 14px; padding: 9px 14px; border-radius: 999px;
  text-decoration: none; border: 0; background: none; cursor: pointer; white-space: nowrap;
  transition: background .25s, color .25s;
}
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--ice); }
.nav a.is-on { color: var(--paper-2); background: var(--ink); }
.progress { position: absolute; left: 28px; right: 28px; bottom: -1px; height: 2px; border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--cobalt); transform-origin: left; transform: scaleX(var(--prog, 0)); }

/* ─── кнопки ─── */
.btn {
  --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding-inline: 26px;
  border-radius: 999px; border: 0; font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden; white-space: nowrap;
  transition: transform .35s var(--ease), background .25s, color .25s, box-shadow .35s var(--ease), opacity .2s;
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-solid { background: var(--cobalt); color: var(--paper-2); box-shadow: 0 16px 30px -14px var(--cobalt); }
.btn-solid::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, var(--shine) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 22px 36px -14px var(--cobalt); }
.btn-solid:hover::after { transform: translateX(120%); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper-2); }
.btn-ghost { background: var(--ice); color: var(--cobalt); }
.btn-ghost:hover { background: var(--cobalt); color: var(--paper-2); }
.btn-sm { --h: 40px; padding-inline: 18px; font-size: 14px; }
.btn-xs { --h: 32px; padding-inline: 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.tg-ico { width: 18px; height: 18px; flex: none; }

/* ─── типографика ─── */
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 600 12px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; flex: none; }
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; color: var(--ink); }
.l2 { color: var(--cobalt); }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--mute); max-width: 34em; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.denoms { display: flex; flex-wrap: wrap; gap: 20px 44px; margin: 48px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }
.denoms dt { font: 600 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.denoms dd { margin: 8px 0 0; font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; color: var(--ink); }
.denoms dd span { color: var(--cobalt); }
.num { font-variant-numeric: tabular-nums; }

/* микротекст, как защитная строка на банкноте */
.micro {
  max-width: var(--maxw); margin-inline: auto; font: 500 7px/1 var(--f-mono); letter-spacing: .2em; color: var(--cobalt);
  opacity: .75; white-space: nowrap; overflow: hidden; padding-block: 4px; border-block: 1px solid var(--rule); user-select: none;
}
.micro span { display: inline-block; animation: marquee 60s linear infinite; }

.notice {
  display: flex; align-items: center; gap: 14px; max-width: 640px; margin: 0 0 32px; padding: 12px 18px 12px 12px;
  border-radius: 16px; background: var(--glass-hi); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--rule);
}
.notice p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.notice-ico {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--cobalt); color: var(--paper-2);
  display: grid; place-items: center; font: 700 14px/1 var(--f-mono);
}

/* ─── витрина: первый экран ─── */
.hero { position: relative; padding-top: clamp(130px, 18vh, 190px); padding-bottom: clamp(56px, 7vw, 96px); }
.hero-space, .final-space { display: none; }
.hero-copy { max-width: min(760px, 60%); }
.hero h1 { font-size: clamp(48px, 5.6vw, 88px); line-height: .94; margin: 22px 0 26px; }
.hero h1 .l2, .final h2 .l2 { white-space: nowrap; }
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero-copy > :nth-child(5) { animation-delay: .32s; }
.hero-fallback { display: none; }
.no-gl .hero-fallback {
  display: block; position: absolute; right: 4%; top: 110px; z-index: -1; font-family: var(--f-display);
  font-size: clamp(220px, 32vw, 460px); line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--cobalt); opacity: .5;
}

.sec { padding-block: clamp(76px, 10vw, 140px); scroll-margin-top: 72px; }
.sec-head { max-width: min(620px, 100%); margin-bottom: clamp(28px, 4vw, 40px); }
.h2 { font-size: clamp(32px, 5vw, 62px); line-height: 1; margin: 18px 0 16px; text-wrap: balance; }
.sec-lead { color: var(--mute); font-size: 17px; max-width: 36em; margin: 0; }
@media (min-width: 900px) { .sec-head { max-width: min(620px, 52vw); } }

/* ─── шаги ─── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 44px; grid-template-columns: 1fr; max-width: 760px; counter-reset: st; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .steps { max-width: min(760px, 60%); } }
.step { padding: 22px 0 26px; border-top: 1px solid var(--rule); counter-increment: st; }
.step-n { font: 600 11px/1 var(--f-mono); letter-spacing: .14em; color: var(--cobalt); }
.step-n::before { content: "0" counter(st) " · "; }
.step h3 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.1; margin: 12px 0 0; }
.step p { margin: 10px 0 0; color: var(--mute); font-size: 15px; max-width: 36ch; }

/* ─── «банкноты»: ступени ставки ─── */
.notes { display: grid; gap: 26px; grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; padding: 0; list-style: none; }
@media (min-width: 900px) { .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; } }
.note {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 34px 28px 40px; border-radius: 26px; transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .8s var(--ease);
}
.note.is-live { transition: transform .12s linear; }
.note-bg, .note-bg::before, .note-glare { position: absolute; inset: 0; border-radius: inherit; }
.note-bg {
  background: linear-gradient(165deg, var(--glass-hi), var(--glass-lo));
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--rule); box-shadow: 0 44px 70px -42px var(--shadow), inset 0 1px 0 var(--paper-2);
}
.note-bg::before {
  content: ""; background: repeating-radial-gradient(circle at 112% -12%, transparent 0 9px, var(--guil) 9px 10px);
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 72%); mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 72%);
}
.note-glare {
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), var(--shine), transparent 46%);
  opacity: 0; transition: opacity .4s; pointer-events: none; transform: translateZ(1px);
}
.note:hover .note-glare { opacity: 1; }
.note-thread {
  position: absolute; left: 16px; top: 24px; bottom: 24px; width: 7px; border-radius: 4px;
  background: linear-gradient(180deg, var(--azure), var(--cobalt), var(--ice), var(--cobalt), var(--azure));
  background-size: 100% 300%; background-position: 0 var(--gy, 0%);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 16px, transparent 16px 24px); mask-image: repeating-linear-gradient(180deg, #000 0 16px, transparent 16px 24px);
  transform: translateZ(6px); transition: background-position .6s var(--ease);
}
.note-top {
  position: relative; align-self: stretch; display: flex; justify-content: space-between; gap: 8px;
  font: 600 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); transform: translateZ(16px);
}
.note-top .serial { color: var(--cobalt); white-space: nowrap; }
.seal { position: relative; display: grid; place-items: center; width: 136px; height: 136px; margin: 20px 0 14px; transform: translateZ(50px); flex: none; }
.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 48s linear infinite; }
.seal svg path, .seal svg circle { fill: none; stroke: var(--cobalt); stroke-width: .38; opacity: .8; }
.seal svg circle { stroke-width: .3; opacity: .6; }
.medal {
  position: relative; display: grid; place-items: center; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, var(--cobalt), var(--ink) 72%);
  box-shadow: 0 18px 30px -14px var(--ink), inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--azure);
  font-family: var(--f-display); font-size: 28px; color: var(--paper-2);
}
.note-name { position: relative; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 2.1vw, 27px); line-height: 1.08; margin: 0; transform: translateZ(30px); }
.model { position: relative; margin: 16px 0 0; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateZ(38px); }
.model-k { font: 600 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.model-v { font-family: var(--f-display); color: var(--cobalt); font-size: 56px; line-height: 1; }
.feats { position: relative; list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--rule); align-self: stretch; display: grid; gap: 8px; text-align: left; transform: translateZ(22px); }
.feats li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.feats li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 0 3px var(--ice); }
.note.is-best .note-bg { border-color: var(--cobalt); box-shadow: 0 44px 70px -36px var(--cobalt), inset 0 1px 0 var(--paper-2); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font: 600 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: var(--cobalt); color: var(--paper-2);
}

/* ─── калькулятор ─── */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: minmax(0, 600px); } }
.panel {
  position: relative; padding: clamp(22px, 3vw, 34px); border-radius: 26px;
  background: linear-gradient(165deg, var(--glass-hi), var(--glass-lo));
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--rule); box-shadow: 0 44px 70px -48px var(--shadow), inset 0 1px 0 var(--paper-2);
}
.calc-panel { display: grid; gap: 26px; }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.field-row label { font-weight: 500; }
.field-row output { font-family: var(--f-display); color: var(--cobalt); font-size: 22px; white-space: nowrap; }
.field-scale { display: flex; justify-content: space-between; margin-top: 8px; font: 500 11px/1 var(--f-mono); color: var(--mute); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; margin: 0; --fill: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--cobalt) var(--fill), var(--ice) var(--fill)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--paper-2); border: 6px solid var(--cobalt); box-shadow: 0 6px 14px -6px var(--cobalt); transition: transform .25s var(--ease); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--ice); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--cobalt); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2); border: 6px solid var(--cobalt); }
.tierbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.tierbar span {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px; padding: 8px 10px; border-radius: 14px;
  border: 1px solid var(--rule); background: var(--paper-2); font-weight: 600; font-size: 14.5px; text-align: center;
  transition: background .25s, color .25s, transform .3s var(--ease);
}
.tierbar small { font: 500 11px/1.2 var(--f-mono); opacity: .75; }
.tierbar span.is-on { background: var(--cobalt); border-color: var(--cobalt); color: var(--paper-2); box-shadow: 0 12px 22px -12px var(--cobalt); transform: translateY(-2px); }
.result { border-top: 1px solid var(--rule); padding-top: 24px; }
.result-k { margin: 0; font: 600 11px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.result-sub { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 18px 0 0; font-size: 15px; color: var(--mute); }
.result-sub b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fine { margin: 14px 0 0; font-size: 13px; color: var(--mute); max-width: 56ch; }

/* одометр: каждая цифра — лента 0…9 */
.odo { display: flex; align-items: flex-start; margin-top: 10px; height: 1.25em; line-height: 1.25; overflow: hidden; font-family: var(--f-display); font-size: clamp(44px, 7vw, 88px); color: var(--ink); }
.odo-cur { color: var(--cobalt); margin-right: .12em; }
.odo-digits { display: flex; }
.odo-col { display: block; height: 1.25em; overflow: hidden; text-align: center; padding-inline: .02em; }
.odo-strip { display: block; transition: transform 1s var(--ease); }
.odo-strip span { display: block; height: 1.25em; line-height: 1.25; }
.odo-sep { display: block; width: .24em; }
.odo-dot { display: block; }
.odo--md { font-size: clamp(40px, 5.4vw, 68px); }

/* ─── словарь ─── */
.terms-grid { display: grid; grid-template-columns: 1fr; gap: 0 44px; margin: 0; max-width: 760px; }
@media (min-width: 700px) { .terms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .terms-grid { max-width: min(760px, 60%); } .notice { max-width: min(640px, 60%); } }
.term { padding: 22px 0 26px; border-top: 1px solid var(--rule); min-width: 0; }
.term dt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.term-name { font-family: var(--f-display); font-size: 26px; line-height: 1.1; }
.term-tag { font: 600 10px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cobalt); }
.term dd { margin: 10px 0 0; color: var(--mute); font-size: 15px; max-width: 36ch; }

/* ─── кабинет на витрине ─── */
.peek { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: min(900px, 100%); }
@media (min-width: 900px) { .peek { max-width: min(760px, 60%); } }
.peek li { list-style: none; padding: 18px 20px; border-radius: 20px; background: var(--glass-hi); border: 1px solid var(--rule); }
.peek b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 19px; }
.peek span { display: block; margin-top: 6px; color: var(--mute); font-size: 14px; line-height: 1.45; }
.peek { padding: 0; margin: 0; }

.final h2 { font-size: clamp(32px, 10vw, 60px); line-height: .96; margin: 20px 0 28px; }
@media (min-width: 900px) { .final h2 { font-size: clamp(60px, 6.6vw, 96px); } }
.final .notice { margin-top: 36px; margin-bottom: 0; }

.foot { padding-block: 0 40px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 28px; border-top: 1px solid var(--rule); max-width: var(--maxw); margin-inline: auto; }
.foot p { margin: 0; font-size: 14px; color: var(--mute); max-width: 56ch; }
.age { font: 600 13px/1 var(--f-mono); padding: 9px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }

@media (max-width: 899px) {
  .hero, .final.sec { padding-top: 0; }
  .hero-space, .final-space { display: block; height: clamp(310px, 52vh, 490px); height: clamp(310px, 52svh, 490px); }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: clamp(32px, 10vw, 64px); }
  .no-gl .hero-fallback { right: auto; left: 50%; transform: translateX(-50%); top: 70px; font-size: min(36vh, 280px); }
}
@media (max-width: 720px) {
  .top .nav { display: none; }
  .top .btn { margin-left: auto; }
}

/* ─── окно входа ─── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(11, 29, 82, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: rise .35s var(--ease) both; }
.modal-card { position: relative; width: min(460px, 100%); padding: 30px 28px 26px; border-radius: 26px; background: var(--paper-2); border: 1px solid var(--rule); box-shadow: 0 40px 90px -40px var(--shadow); overflow: hidden; }
.modal-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-radial-gradient(circle at 112% -12%, transparent 0 9px, var(--guil) 9px 10px); -webkit-mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 60%); mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 60%); }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ice); color: var(--ink); cursor: pointer; font-size: 18px; line-height: 1; }
.modal h3 { position: relative; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; margin: 16px 0 12px; }
.modal p { position: relative; margin: 0 0 18px; color: var(--mute); font-size: 15px; }
.modal .btn { position: relative; }
.wait { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 16px; font: 500 13px/1.3 var(--f-mono); color: var(--mute); }
.wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); animation: pulse 1.2s ease-in-out infinite; flex: none; }
.err { color: var(--bad); }
.modal ol { position: relative; margin: 0 0 20px; padding-left: 20px; color: var(--ink); font-size: 14.5px; display: grid; gap: 6px; }

/* ═══════════════════ кабинет ═══════════════════ */
.app main { padding-top: clamp(96px, 12vh, 120px); padding-bottom: 60px; }
.app .nav { overflow-x: auto; scrollbar-width: none; }
.app .nav::-webkit-scrollbar { display: none; }
.who { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.who-name { font: 600 13px/1 var(--f-mono); color: var(--mute); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.tabs-m { display: none; }
@media (max-width: 980px) {
  .app .top .nav { display: none; }
  .who-name { display: none; }
  .who { margin-left: auto; }
  .tabs-m {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: var(--maxw); margin: 10px auto 0;
    padding: 6px; border-radius: 999px; background: var(--bar); border: 1px solid var(--rule);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .tabs-m::-webkit-scrollbar { display: none; }
  .tabs-m a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--mute); font-size: 14px; font-weight: 500; }
  .tabs-m a.is-on { background: var(--ink); color: var(--paper-2); }
  .app main { padding-top: 140px; }
}

.view-head { margin-bottom: 26px; }
.view-head h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1; margin: 16px 0 10px; }
.view-head p { margin: 0; color: var(--mute); max-width: 52ch; }
.view { animation: rise .6s var(--ease) both; }

.grid { display: grid; gap: 18px; }
.g-hero { grid-template-columns: 1fr; }
@media (min-width: 980px) { .g-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.g-2 { grid-template-columns: 1fr; }
@media (min-width: 860px) { .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { position: relative; padding: clamp(20px, 2.6vw, 28px); border-radius: 24px; background: linear-gradient(165deg, var(--glass-hi), var(--glass-lo)); border: 1px solid var(--rule); box-shadow: 0 30px 60px -48px var(--shadow), inset 0 1px 0 var(--paper-2); min-width: 0; }
.card--guil::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-radial-gradient(circle at 108% -10%, transparent 0 9px, var(--guil) 9px 10px); -webkit-mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 64%); mask-image: radial-gradient(circle at 100% 0, #000 10%, transparent 64%); }
.card > * { position: relative; }
.card-k { margin: 0; font: 600 11px/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-t { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.1; margin: 0 0 4px; }
.card-sub { margin: 8px 0 0; font-size: 14px; color: var(--mute); }
.card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
.kpis > div { padding: 16px 0 16px; border-top: 1px solid var(--rule); }
.kpis > div:nth-child(odd) { padding-right: 14px; }
.kpis > div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--rule); }
.kpis dt { font: 600 10.5px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.kpis dd { margin: 6px 0 0; font-family: var(--f-display); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis dd small { font-family: var(--f-body); font-size: 13px; color: var(--mute); margin-left: 4px; }
.kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) {
  .kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis--4 > div { padding-inline: 16px !important; border-left: 1px solid var(--rule); }
  .kpis--4 > div:first-child { padding-left: 0 !important; border-left: 0; }
}

/* прогресс до следующей ставки */
.meter { position: relative; height: 10px; margin-top: 14px; border-radius: 999px; background: var(--ice); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--cobalt); transition: width 1s var(--ease); }
.meter-cap { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font: 500 12px/1.3 var(--f-mono); color: var(--mute); }

/* сегменты-переключатели */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--rule); }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: background .2s, color .2s; }
.seg button:hover { color: var(--ink); }
.seg button.is-on { background: var(--cobalt); color: var(--paper-2); }
.seg button small { font: 500 11px/1 var(--f-mono); opacity: .75; margin-left: 4px; }

/* график по дням */
.chart { position: relative; margin-top: 18px; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .gl { stroke: var(--rule); stroke-width: 1; }
.chart .ax { font: 500 10.5px var(--f-mono); fill: var(--mute); }
.chart .bar { fill: var(--cobalt); transition: fill .15s; }
.chart .bar.is-zero { fill: var(--ice); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover + .bar, .chart .bar.is-hot { fill: var(--ink); }
.tip { position: absolute; z-index: 3; pointer-events: none; padding: 8px 10px; border-radius: 12px; background: var(--ink); color: var(--paper-2); font: 500 12px/1.35 var(--f-mono); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); box-shadow: 0 14px 30px -16px var(--ink); }
.tip b { font-family: var(--f-body); font-size: 14px; display: block; }
.chart-total { font-family: var(--f-display); font-size: 26px; }

/* воронка */
.funnel { display: grid; gap: 12px; margin-top: 18px; }
.fn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; }
.fn-name { font-size: 14px; font-weight: 500; }
.fn-val { font-family: var(--f-display); font-size: 18px; font-variant-numeric: tabular-nums; }
.fn-bar { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--ice); overflow: hidden; }
.fn-bar i { display: block; height: 100%; border-radius: 999px; background: var(--cobalt); transition: width 1s var(--ease); min-width: 4px; }
.fn-conv { grid-column: 1 / -1; font: 500 11.5px/1 var(--f-mono); color: var(--mute); }

/* кампании */
.camps { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .camps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.camp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.camp-name { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.1; margin: 6px 0 0; word-break: break-word; }
.linkbox { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--rule); }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px/1.2 var(--f-mono); color: var(--ink); }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; margin: 18px 0 0; }
.mini dt { font: 600 10px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.mini dd { margin: 4px 0 0; font-family: var(--f-display); font-size: 19px; font-variant-numeric: tabular-nums; }
.mini dd small { font-family: var(--f-body); font-size: 12px; color: var(--mute); }

.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.input {
  flex: 1 1 240px; min-width: 0; height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--paper-2); font: 500 15px var(--f-body); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--ice); }
select.input { flex: 0 1 260px; cursor: pointer; }
.msg { margin: 10px 0 0; font-size: 14px; min-height: 1.4em; }
.msg.ok { color: var(--good); }
.msg.bad { color: var(--bad); }

/* таблицы */
.table-wrap { overflow-x: auto; margin-top: 18px; border-radius: 18px; border: 1px solid var(--rule); background: var(--paper-2); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; padding: 12px 14px; font: 600 10.5px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--paper); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; font-variant-numeric: tabular-nums; }
.t tr:last-child td { border-bottom: 0; }
.t td.mono { font-family: var(--f-mono); font-size: 13px; }
.t .r { text-align: right; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--reg { background: var(--ice); color: var(--cobalt); }
.chip--linked { background: var(--warn-bg); color: var(--warn); }
.chip--deposit { background: var(--good-bg); color: var(--good); }
.chip--other, .chip--rejected { background: #EEF0F6; color: var(--mute); }
.chip--pending { background: var(--warn-bg); color: var(--warn); }
.chip--paid { background: var(--good-bg); color: var(--good); }
.more { display: flex; justify-content: center; margin-top: 16px; }

@media (max-width: 640px) {
  .t thead { display: none; }
  .t, .t tbody, .t tr, .t td { display: block; width: 100%; }
  .t tr { padding: 12px 14px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; }
  .t tr:last-child { border-bottom: 0; }
  .t td { padding: 0; border: 0; white-space: normal; }
  .t td[data-k]::before { content: attr(data-k) " · "; font: 600 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
  .t .r { text-align: left; }
}

.empty { padding: clamp(28px, 5vw, 48px); text-align: center; }
.empty h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0 0 10px; }
.empty p { color: var(--mute); margin: 0 auto 20px; max-width: 44ch; }

/* обучение */
.lessons { display: grid; gap: 14px; grid-template-columns: 1fr; padding: 0; margin: 0; list-style: none; }
@media (min-width: 860px) { .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lessons li { min-width: 0; }
.lesson-card { text-decoration: none; color: inherit; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; width: 100%; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--rule); background: var(--glass-hi); cursor: pointer; text-align: left; transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease); }
.lesson-card:hover { transform: translateY(-3px); border-color: var(--cobalt); box-shadow: 0 24px 40px -30px var(--cobalt); }
.lesson-n { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 18px; color: var(--cobalt); background: var(--ice); box-shadow: inset 0 0 0 1px var(--rule); }
.lesson-card.is-done .lesson-n { background: var(--cobalt); color: var(--paper-2); }
.lesson-card .l-txt { display: block; min-width: 0; }
.lesson-card b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 18px; line-height: 1.15; }
.lesson-card .l-sub { display: block; margin-top: 4px; font-size: 13.5px; color: var(--mute); line-height: 1.4; }
.lesson-card em { font: 500 11px/1 var(--f-mono); font-style: normal; color: var(--mute); white-space: nowrap; }
.article { max-width: 760px; }
.article h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.02; margin: 16px 0 18px; }
.article h3 { font-family: var(--f-display); font-weight: 400; font-size: 21px; margin: 30px 0 10px; }
.article p, .article li { font-size: 16.5px; line-height: 1.65; color: var(--ink); }
.article p { margin: 0 0 14px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 16px; display: grid; gap: 6px; }
.article .callout { margin: 20px 0; padding: 16px 18px; border-radius: 16px; background: var(--ice); border-left: 3px solid var(--cobalt); font-size: 15px; }
.article .callout--warn { background: var(--warn-bg); border-left-color: var(--warn); }
.article-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--rule); }

.wallet { font: 500 13px/1.4 var(--f-mono); word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper-2); font-size: 14px; box-shadow: 0 20px 40px -20px var(--ink); animation: rise .35s var(--ease) both; }
.skeleton { height: 220px; border-radius: 24px; background: linear-gradient(90deg, var(--ice), var(--paper-2), var(--ice)); background-size: 200% 100%; animation: pulse 1.4s ease-in-out infinite; }

/* на телефонах и тачскринах стекло дорогое и 3D-наклон не нужен */
@media (max-width: 899px), (hover: none) {
  .note-bg, .notice, .top-in, .panel, .tabs-m { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .top-in, .tabs-m { background: var(--paper); }
  .notice { background: var(--paper-2); }
  .note-bg, .panel { background: linear-gradient(165deg, var(--paper-2), var(--ice)); }
  .note { transform-style: flat; transition: none; transform: none; }
  .note > * { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

/* узкие телефоны: логотип не должен выталкивать кнопку из шапки */
@media (max-width: 430px) {
  .top-in { gap: 10px; padding-left: 10px; }
  .top .brand { font-size: 15px; gap: 8px; }
  .top .brand-seal { width: 26px; height: 26px; }
  .top .btn-sm { --h: 38px; padding-inline: 14px; }
  .card-k { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .top .brand b { display: none; }
}

/* форма входа и регистрации */
.auth-seg { margin-bottom: 18px; position: relative; }
.auth-form { position: relative; display: grid; gap: 12px; }
.fld { display: grid; gap: 6px; }
.fld > span { font: 600 11px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.fld .input { flex: none; width: 100%; }
.rules { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.rules li { padding: 4px 10px; border-radius: 999px; background: var(--ice); color: var(--mute); font: 500 12px/1.2 var(--f-mono); transition: background .2s, color .2s; }
.rules li.is-ok { background: var(--good-bg); color: var(--good); }
.auth-form .msg { margin: 0; min-height: 0; }
.auth-form .msg:empty { display: none; }
.auth-form .fine { margin: 2px 0 0; }
.modal .auth-host { position: relative; }
.profile-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tg-state { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; }
.tg-state i { width: 10px; height: 10px; border-radius: 50%; background: var(--mute); }
.tg-state.is-on i { background: var(--good); box-shadow: 0 0 0 4px var(--good-bg); }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 14px 18px; border-radius: 18px; background: var(--ice); border: 1px solid var(--rule); }
.banner p { margin: 0; font-size: 14.5px; }
.auth-form .btn-sm, .auth-form .btn-xs { justify-self: start; }
.card-k .btn { font-family: var(--f-body); letter-spacing: 0; text-transform: none; }
.t a { text-decoration: none; }
.t a:hover b { color: var(--cobalt); }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.tg-login { display: flex; justify-content: center; min-height: 40px; }
.btn-tg { background: #2AABEE; color: #fff; box-shadow: 0 16px 30px -16px #2AABEE; }
.btn-tg:hover { transform: translateY(-2px); background: #229ED9; }
.tg-login { display: grid; gap: 8px; min-height: 0; }
.tg-login .wait { margin: 0; }
.tg-login .wait a { color: var(--cobalt); }
