/* «0,76 мм» — Cashless. Fonts are self-hosted: Latin + Cyrillic subsets in ./_shared/fonts. */
@font-face { font-family: 'Geologica'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(./_shared/fonts/geologica-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Geologica'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(./_shared/fonts/geologica-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(./_shared/fonts/onest-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(./_shared/fonts/onest-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./_shared/fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(./_shared/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(./_shared/fonts/syne-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --bg: #e6e8ea; --spot: #f4f5f6; --spot-edge: #dcdfe2;
  --ink: #15171a; --ink2: #43474d; --line: #6e747c; --hair: #aeb3b9;
  --dark: #0e0f11; --d-ink: #f4f5f6; --d-ink2: #a9aeb5; --err: #b3261e;
  --core: #edede9; --vein: #cfe0ff; --warm: #ffd7ae;
  --f-head: 'Geologica', 'Onest', system-ui, sans-serif;
  --f-text: 'Onest', system-ui, -apple-system, sans-serif;
  --f-num: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --f-brand: 'Syne', 'Onest', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lx: 86vw; --ly: 30vh;            /* screen position of the light (set by JS) */
  --sx: -2; --sy: 1.5;               /* DOM shadow offset from the same light, px (≤ 4) */
  --m: 64px;                         /* page margin */
  --panel: 600px;                    /* stage A text panel; the cut window starts at its right edge */
  --hdr: 72px;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font: 400 17px/1.55 var(--f-text); font-feature-settings: 'tnum' 0; overflow-x: clip; }
img, canvas { display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
sup { font-size: 0.62em; line-height: 0; vertical-align: 0.55em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.small { font-size: 13px; line-height: 1.45; font-weight: 500; color: var(--ink2); margin: 0; }
.muted { color: var(--ink2); }
.mono { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- page light, wall shadow, layers ---------- */
.bg { position: fixed; inset: 0; z-index: 0; background: var(--bg); pointer-events: none; }
.bg-spot { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s var(--ease);
  background: radial-gradient(1100px 1100px at var(--lx) var(--ly), var(--spot) 0%, #eceef0 34%, var(--bg) 62%, var(--spot-edge) 100%); }
.lit .bg-spot { opacity: 1; }
.bg-dark { position: absolute; inset: 0; background: var(--dark); opacity: 0; }
.shade { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; mix-blend-mode: multiply; }
.gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease); }
.gl.on { opacity: 1; }
.gl.idle { visibility: hidden; }
.flash { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; }
main { position: relative; }
.foot { position: relative; }
.nogl { position: fixed; right: var(--m); top: 45vh; z-index: 6; max-width: 320px; }

/* CSS silhouette while WebGL boots: projected hero pose, graphite 6 % + contact shadow */
.silhouette { position: fixed; inset: 0; z-index: 3; pointer-events: none; transition: opacity 0.4s var(--ease); }
.sil-card { position: absolute; inset: 0; background: rgba(21, 23, 26, 0.06);
  clip-path: polygon(46.2% 0%, 52.9% 4%, 86.5% 31%, 88.7% 35.5%, 88.2% 84%, 86.6% 86.6%, 51.6% 88%, 46.6% 87.8%); }
.sil-contact { position: absolute; left: 44%; width: 46%; top: 85.5%; height: 4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(21,23,26,0.22), rgba(21,23,26,0)); }
.ready .silhouette { opacity: 0; }

/* ---------- header ---------- */
.top { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: var(--hdr); display: flex; align-items: center; gap: 32px;
  padding: 0 var(--m); background: var(--bg); transition: height 0.28s var(--ease), background-color 0.3s var(--ease); }
.top .logo { font: 700 22px/1 var(--f-brand); letter-spacing: -0.01em; text-decoration: none; }
.anchors { display: flex; gap: 28px; margin: 0 auto; }
.anchors a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 0.24s var(--ease); }
.anchors a:hover { background-size: 100% 1.5px; }
.chapter { display: none; font-size: 15px; font-weight: 500; color: var(--ink2); margin-right: auto; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.top.compact { --hdr: 56px; }
/* the compact header drops the inline links; on a phone the menu button still opens them as a list */
.top.compact .anchors:not(.open), .top.compact .top-actions .btn-text { display: none; }
.top.compact .chapter { display: block; }
.dark-mode .top { background: var(--dark); color: var(--d-ink); }
.dark-mode .top .chapter { color: var(--d-ink2); }
.dark-mode .top .btn-dark { background: var(--d-ink); color: var(--ink); }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 500; border-radius: 10px; white-space: nowrap; cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.24s var(--ease), background-color 0.24s var(--ease); border: 0; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: calc(var(--sx) * 1px) calc(var(--sy) * 1px) 10px rgba(21, 23, 26, 0.22); }
.btn-dark:hover { background: #2a2d32; }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; box-shadow: calc(var(--sx) * 0.6px) calc(var(--sy) * 0.6px) 8px rgba(21, 23, 26, 0.10); }
.btn-line:hover { background: rgba(21, 23, 26, 0.05); }
.btn-light { background: var(--d-ink); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-l { height: 56px; padding: 0 26px; font-size: 17px; }
.btn-m { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-s { height: 36px; padding: 0 16px; font-size: 15px; }
.btn-text { background: none; border: 0; padding: 4px 0; font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; color: inherit; }
.link-line { font-weight: 500; font-size: 17px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }

/* ---------- hero ---------- */
.hero { position: relative; height: max(100svh, 820px); }
.hero-col { position: absolute; left: var(--m); top: 0; bottom: 110px; width: 530px; display: flex; flex-direction: column; padding-top: 150px; z-index: 2; }
.h1 { font: 500 clamp(34px, 4.45vw, 64px)/0.98 var(--f-head); letter-spacing: -0.02em; margin: 0; }
.h1 .ln { display: block; }
.lead { font-size: 21px; line-height: 1.45; margin: 24px 0 0; max-width: 520px; }
.lead .fn { text-decoration: none; }
.fn { text-decoration: none; }
.cta-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.bot-line { margin-top: 10px; }
.trust { margin-top: 8px; max-width: 500px; }
.spec { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: auto auto auto; justify-content: space-between; gap: 18px; width: 530px; }
.spec li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spec-v { font: 300 27px/1.1 var(--f-head); letter-spacing: -0.01em; text-align: left; background: none; border: 0; padding: 0; cursor: help; white-space: nowrap; color: var(--ink); }
.spec-v-s { font-size: 17px; line-height: 1.12; white-space: normal; margin-top: -2px; }
.spec-v:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.spec-k { font-size: 13px; font-weight: 500; color: var(--ink2); line-height: 1.35; }

.hero-card { position: absolute; left: 44.5%; right: var(--m); bottom: 8px; z-index: 3; }
.hero-card.raised { z-index: 6; }
.card-note { margin: 0 0 8px; }
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.field { height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: rgba(244, 245, 246, 0.72); padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--ink); outline-offset: 2px; }
.field::placeholder { color: var(--ink2); opacity: 1; }
.field:focus { border-color: var(--ink); }
.combo { position: relative; flex: 0 0 196px; }
.combo .field { width: 100%; }
.combo-list { position: absolute; left: 0; right: 0; bottom: 50px; max-height: 280px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: #f4f5f6; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(21, 23, 26, 0.16); z-index: 30; }
.combo-list li { padding: 8px 10px; border-radius: 8px; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: #e3e5e8; }
.nick-wrap { position: relative; flex: 0 0 164px; }
.nick-at { position: absolute; left: 13px; top: 50%; transform: translateY(-52%); font-size: 15px; font-weight: 500; color: var(--ink2); pointer-events: none; }
.field-nick { width: 100%; padding-left: 28px; }
.fake-caret { position: absolute; left: 29px; top: 13px; width: 1.5px; height: 18px; background: var(--ink); opacity: 0; pointer-events: none; }
.caret-on .fake-caret { animation: caret 1.06s steps(1) infinite; }
.nick-wrap.has-focus .fake-caret, .nick-wrap.has-text .fake-caret { display: none; }
.nick-wrap.has-text .field-nick::placeholder { color: transparent; }
.caret-on .nick-wrap:not(.has-text) .field-nick::placeholder { padding-left: 4px; }
@keyframes caret { 0% { opacity: 1; } 50% { opacity: 0; } }
.nick-wrap.bad { animation: shake 0.16s linear; }
.nick-wrap.bad .field { border-color: var(--err); }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 0); } 75% { transform: translate(2px, 0); } }
.swatches { display: flex; gap: 6px; padding: 0 4px; }
.sw { width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--line); cursor: pointer; padding: 0; transition: transform 0.12s var(--ease); }
.sw:active { transform: translateY(1px); }
.sw[aria-checked="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw-ceramic { background: radial-gradient(120% 90% at 30% 20%, #3a3b40 0%, #111214 46%, #070708 100%); }
.sw-brushed { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.18) 0 1px, rgba(0,0,0,0.05) 1px 2px), linear-gradient(160deg, #e7e9ec, #b6b9be 55%, #d4d7db); }
.sw-glass { background: linear-gradient(145deg, rgba(180, 200, 196, 0.95), rgba(130, 156, 150, 0.95)), #b3c7c2; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35); }
.chip-btn { height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: transparent; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color 0.2s var(--ease); }
.chip-btn:hover { background: rgba(21, 23, 26, 0.05); }
.chip-btn[aria-pressed="false"] { color: var(--ink2); }
.under-row { display: flex; gap: 18px; margin-top: 6px; min-height: 19px; white-space: nowrap; overflow: hidden; }
.under-row .finish-name { color: var(--ink); }
.under-row:has(#nickAfter:not([hidden])) .finish-name { display: none; }
.nick-help.err { color: var(--err); }
.nick-after { display: inline-flex; gap: 10px; align-items: baseline; }
.nick-after[hidden] { display: none; }
.reveal-hint { color: var(--ink); }

.card-proxy { position: fixed; left: 0; top: 0; width: 10px; height: 10px; z-index: 5; cursor: grab; touch-action: pan-y; border-radius: 12px; }
.card-proxy:active { cursor: grabbing; }
.card-proxy:focus-visible { outline: 2px dashed var(--ink); outline-offset: 6px; }
.card-proxy.off { display: none; }

/* ---------- rail ---------- */
.rail { position: fixed; z-index: 7; left: var(--m); bottom: 30px; opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s; }
.rail.on { opacity: 1; visibility: visible; }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.rail li { display: flex; align-items: center; gap: 12px; }
.rail .seg { width: 64px; height: 3px; background: rgba(21, 23, 26, 0.16); border-radius: 2px; overflow: hidden; position: relative; }
.rail .seg i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--f, 0) * 100%); background: var(--ink); }
.rail .rail-label { font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; display: none; margin-right: 8px; }
.rail li.cur .rail-label { display: block; color: var(--ink); order: 2; }
.dark-mode .rail .seg { background: rgba(244, 245, 246, 0.2); }
.dark-mode .rail .seg i { background: var(--d-ink); }
.dark-mode .rail li.cur .rail-label { color: var(--d-ink); }

/* ---------- step 1 ---------- */
/* the step-1 column stays in place through the dive into the edge: the section runs 600 px under the pinned scene,
   whose opaque panel covers it only after the flash (stage texts never run ahead of the 3D) */
.step1 { position: relative; height: 1500px; margin-bottom: -600px; padding-top: 190px; box-sizing: border-box; }
.col { position: relative; z-index: 2; margin-left: var(--m); width: 470px; }
.step1 .col { position: sticky; top: 190px; }
.h2 { font: 500 clamp(27px, 2.95vw, 42px)/1.06 var(--f-head); letter-spacing: -0.015em; margin: 0 0 20px; }
.h2 sup a { text-decoration: none; }
.body { margin: 0 0 16px; max-width: 60ch; }

/* ---------- pinned scene ---------- */
.pinned { position: relative; height: calc(2700px + 100vh); }
.pin-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; z-index: 6; pointer-events: none; }
.pin-sticky .blk.is-on, .pin-sticky .hold-zone, .pin-sticky .m-bar { pointer-events: auto; }
.pin-panel { position: absolute; left: 0; top: 0; bottom: 0; width: var(--panel); background: var(--bg); opacity: 0; transition: opacity 0.3s var(--ease); }
.stageA .pin-panel { opacity: 1; }
.hold-zone { position: absolute; left: var(--panel); right: 0; top: var(--hdr); bottom: 0; z-index: 6; display: none; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.stageB .hold-zone { display: block; }
.hold-zone:focus-visible { outline: 2px dashed var(--d-ink); outline-offset: -24px; }
.win-caption { position: absolute; left: calc(var(--panel) + 40px); bottom: 28px; z-index: 6; opacity: 0; transition: opacity 0.3s var(--ease); color: var(--ink2); background: rgba(230, 232, 234, 0.92); padding: 6px 10px; border-radius: 6px; }
.stageA .win-caption { opacity: 1; }
.pin-blocks { position: absolute; left: var(--m); top: 0; bottom: 0; width: 500px; z-index: 6; }
.blk { position: absolute; left: 0; right: 0; top: 168px; opacity: 0; visibility: hidden; transition: opacity 0.28s var(--ease), visibility 0.28s; }
.blk.is-on { opacity: 1; visibility: visible; }
.offer { font: 500 27px/1.5 var(--f-head); letter-spacing: -0.01em; margin: 8px 0 10px; }
.num-field { display: inline-block; }
.num { width: 3.6em; height: 46px; border: 1.5px solid var(--line); border-radius: 10px; background: rgba(244, 245, 246, 0.8); padding: 0 10px; font: 500 24px/1 var(--f-num); font-variant-numeric: tabular-nums; text-align: right; cursor: ew-resize; color: var(--ink); vertical-align: 2px; }
.num:focus { cursor: text; border-color: var(--ink); }
.sel-wrap { display: inline-block; position: relative; }
.sel { height: 46px; border: 1.5px solid var(--line); border-radius: 10px; background: rgba(244, 245, 246, 0.8); padding: 0 34px 0 12px; font: 500 22px/1 var(--f-head); appearance: none; -webkit-appearance: none; cursor: pointer; vertical-align: 2px; color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.xrow { display: flex; gap: 24px; margin: 18px 0 8px; }
.xcell { display: flex; flex-direction: column; }
.xk { font-size: 13px; font-weight: 500; color: var(--ink2); }
.xv { font-size: 27px; line-height: 1.2; }
.chip-note { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 7px; background: #d6dae0; color: var(--ink); margin: 6px 0 12px; }
.stageB .blk-pay, .blk-pay { color: var(--d-ink); }
.light-muted { color: var(--d-ink2); margin-top: 8px; }
.offer-dark .sel, .offer-dark .num { background: rgba(244, 245, 246, 0.06); border-color: #8b9098; color: var(--d-ink); }
.offer-dark .sel option { color: var(--ink); }
.blk-pay .btn-light { margin-top: 18px; }
#payBtn { display: none; }
.rm #payBtn { display: inline-flex; }
.blk-pay :focus-visible { outline-color: var(--d-ink); }
.receipt { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(244, 245, 246, 0.2); }
.receipt .rc-line { font-size: 27px; margin: 0 0 4px; }
.receipt .btn { margin-top: 16px; }
.paid .blk-pay { color: var(--ink); }
.paid .blk-pay .light-muted { color: var(--ink2); }
.paid .offer-dark .sel, .paid .offer-dark .num { background: rgba(244, 245, 246, 0.8); border-color: var(--line); color: var(--ink); }
.paid .blk-pay .btn-light { background: var(--ink); color: #fff; }
.paid .receipt { border-top-color: var(--hair); }
.paid #payBtn, .paid #holdHint { display: none; }
.m-bar { display: none; }
.m-window { display: none; }

/* ---------- final + footer ---------- */
/* the final column sticks under the header: at the very bottom of the page the H2 stays whole (top ≥ 96 px) */
.final { position: relative; height: 100vh; min-height: 760px; padding-top: 260px; }
.final .col { position: sticky; top: 96px; width: 540px; }
.h2-final { font-size: clamp(34px, 3.65vw, 52px); line-height: 1.02; }
.foot { background: var(--bg); padding: 44px var(--m) 36px; border-top: 1px solid var(--hair); z-index: 8; }
.disclaimer { font-size: 17px; line-height: 1.55; max-width: 64ch; margin: 0 0 22px; color: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.foot-grid .small { margin-bottom: 6px; }
.notes { margin: 0; padding-left: 18px; }
.notes li { margin-bottom: 6px; }

/* ---------- popovers ---------- */
.pop { margin: 0; inset: auto; position: fixed; max-width: 340px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #f4f5f6; color: var(--ink); box-shadow: 0 18px 50px rgba(21, 23, 26, 0.18); font-size: 15px; line-height: 1.45; }
.pop p { margin: 0 0 6px; }
.pop p:last-child { margin: 0; }
.pop:popover-open { animation: pop 0.16s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }

/* ---------- dark stage (B) ---------- */
.dark-mode .rail .rail-label { color: var(--d-ink2); }

/* ---------- windows 1024–1439 px wide ---------- */
/* the card controls get a size smaller so the row ends inside the right margin: at 1280 «Движение» was cut off by 31 px */
@media (min-width: 1024px) and (max-width: 1439px) {
  .controls { gap: 6px; }
  .combo { flex: 0 1 172px; min-width: 166px; }   /* «Где будете платить?» at 14 px is 139 px + 27 px of padding and border */
  .nick-wrap { flex: 0 1 132px; min-width: 120px; }
  .field, .chip-btn, .nick-at { font-size: 14px; }
  .field, .chip-btn { height: 40px; }
  .chip-btn { padding: 0 11px; }
  .sw { width: 32px; height: 32px; }
  .swatches { gap: 5px; padding: 0 2px; }
  .fake-caret { top: 11px; height: 17px; }
}

/* ---------- desktop windows 1024–1365 px (landscape) ---------- */
/* the text column narrows with the window; main.js (FIT_W) fits the card into the free area right of it and above its controls */
@media (min-width: 1024px) and (max-width: 1365px) and (orientation: landscape) {
  :root { --m: clamp(40px, 5vw, 64px); --col: clamp(400px, 40vw, 530px); --panel: calc(var(--m) + min(500px, var(--col)) + 36px); }
  .top { gap: 24px; }
  .anchors { gap: clamp(16px, 2vw, 28px); }
  .anchors a { white-space: nowrap; }
  .hero-col { width: var(--col); }
  .lead { font-size: clamp(18px, 1.64vw, 21px); max-width: none; }
  .trust { max-width: none; }
  .spec { width: auto; }
  .hero-card { left: calc(var(--m) + var(--col) + 20px); }
  .controls { flex-wrap: wrap; row-gap: 8px; }
  .col { width: min(470px, var(--col)); }
  .final .col { width: min(540px, calc(var(--col) + 40px)); }   /* its two buttons (481 px) stay in one row */
  .pin-blocks { width: min(500px, var(--col)); }
}
/* the control row needs 637 px; narrower, it breaks into two tidy rows: the two fields, then finishes and buttons */
@media (min-width: 1024px) and (max-width: 1319px) and (orientation: landscape) {
  .combo { flex: 1 1 calc(55% - 3px); }
  .nick-wrap { flex: 1 1 calc(45% - 3px); }
}
/* the hero's two buttons (446 px at 17 px) stay in one row down to 1024 px */
@media (min-width: 1024px) and (max-width: 1199px) and (orientation: landscape) {
  .btn-l { padding: 0 20px; font-size: 16px; }
}

/* ---------- stacked staging: phones 390 × 844, tablets up to 1023 px, portrait windows up to 1365 px ---------- */
@media (max-width: 1023px), (max-width: 1365px) and (orientation: portrait) {
  :root { --m: 20px; --hdr: 56px; }
  body { font-size: 16px; }
  .top { gap: 12px; }
  .top .logo { font-size: 20px; }
  .anchors { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); padding: 8px var(--m) 16px; border-bottom: 1px solid var(--hair); }
  .anchors.open { display: flex; }
  .anchors a { padding: 12px 0; font-size: 17px; }
  .dark-mode .anchors { background: var(--dark); border-bottom-color: rgba(244, 245, 246, 0.16); }   /* the list hangs from the dark header in the payment stage */
  .dark-mode .anchors a { color: var(--d-ink); }
  .top-actions { margin-left: auto; gap: 10px; }
  .top-actions .btn-text { display: none; }
  .menu-btn { display: inline-flex; height: 36px; padding: 0 10px; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 9px; background: none; font-size: 13px; font-weight: 600; }
  .top.compact .chapter { display: none; }
  .m-window { display: block; position: relative; width: 100%; pointer-events: none; }
  .hero { height: auto; padding-bottom: 28px; }
  .hero .m-window { height: 190px; margin-top: 56px; }
  .hero-col { position: relative; left: auto; top: auto; bottom: auto; width: auto; padding: 8px var(--m) 0; display: block; }
  .h1 { font-size: 34px; }
  .lead { font-size: 15px; margin-top: 12px; }
  .lead .lead-rest { display: none; }
  .cta-row { margin-top: 14px; }
  .hero .cta-row .btn-l { flex: 1 1 100%; height: 52px; }
  .hero .cta-row .btn-line { display: none; }
  .bot-line { margin-top: 8px; }
  .trust { margin-top: 14px; }
  .spec { width: auto; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 18px; }
  .spec-v { font-size: 24px; }
  .spec-v-s { font-size: 18px; white-space: normal; }
  .hero-card { position: relative; left: auto; right: auto; bottom: auto; margin: 14px var(--m) 0; }
  .controls { flex-wrap: wrap; gap: 8px; }
  .combo { flex: 1 1 176px; }       /* «Где будете платить?» is 149 px wide + 27 px of padding and border */
  .nick-wrap { flex: 1 1 120px; }
  .under-row { white-space: normal; flex-wrap: wrap; gap: 4px 14px; }
  .nick-after { position: static; margin: 8px 0 0; }
  .card-proxy { touch-action: pan-y; }
  .rail { display: none; }
  .step1 { height: auto; margin-bottom: 0; padding: 0 0 56px; }
  .step1 .m-window { height: 230px; }
  .step1 .col { padding-top: 16px; width: auto; margin: 0 var(--m); }
  .h2 { font-size: 27px; }
  .pinned { height: calc(1400px + 100svh); }
  .pin-sticky { height: 100svh; }
  .pin-panel { display: none; }
  .pinned .m-window { position: absolute; left: 0; right: 0; top: 56px; height: 46svh; }
  .hold-zone { left: 0; top: 56px; bottom: auto; height: 46svh; }
  .win-caption { left: var(--m); bottom: auto; top: calc(56px + 46svh - 38px); max-width: calc(100% - 2 * var(--m)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pin-blocks { left: var(--m); right: var(--m); width: auto; top: calc(56px + 46svh); }
  .blk { top: 14px; padding-bottom: 78px; }   /* bottom button 48 px + 14 px + 16 px air */
  .offer { font-size: 19px; line-height: 1.6; }
  .num { height: 38px; font-size: 18px; }
  .sel { height: 38px; font-size: 16px; }
  #amtHelp, .blk-exchange .body { display: none; }
  .xv { font-size: 21px; }
  .blk-pay #holdHint { display: none; }
  .receipt .rc-line { font-size: 21px; }
  .receipt .btn { height: 48px; font-size: 15px; width: 100%; }
  .paid .blk-pay .offer { display: none; }   /* the receipt line repeats the offer; it must fit above the fold */
  .receipt { margin-top: 12px; }
  .m-bar { display: flex; position: absolute; left: var(--m); right: var(--m); bottom: 14px; height: 48px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; align-items: center; justify-content: center; text-decoration: none; font-weight: 500; z-index: 7; cursor: pointer; }
  .dark-mode .m-bar { background: var(--d-ink); color: var(--ink); }
  .m-bar.off { display: none; }
  .final { height: auto; min-height: 0; padding-top: 0; padding-bottom: 64px; }
  .final .m-window { height: 280px; margin-top: 56px; }
  .final .col { position: relative; top: auto; padding-top: 8px; width: auto; margin: 0 var(--m); }
  .foot { padding: 40px var(--m); }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .silhouette { display: none; }
  .nogl { right: var(--m); left: var(--m); top: 120px; }
}

/* ---------- tablets 768–1023 px and portrait 1024–1365 px: the same staging, larger windows and type, desktop texts back ---------- */
@media (min-width: 768px) and (max-width: 1023px), (min-width: 1024px) and (max-width: 1365px) and (orientation: portrait) {
  :root { --m: 40px; }
  .top-actions .btn-text { display: inline; }
  .hero .m-window { height: clamp(200px, calc(100svh - 440px), 520px); }   /* with the H1 below, the main button stays on the first screen */
  .hero-col { max-width: calc(640px + 2 * var(--m)); }
  .h1 { font-size: clamp(36px, min(6vw, 6svh), 56px); }
  .lead { font-size: 18px; margin-top: 16px; }
  .lead .lead-rest { display: inline; }
  .hero .cta-row .btn-l { flex: 0 0 auto; height: 56px; }
  .hero .cta-row .btn-line { display: inline-flex; }
  .spec { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 48px; }
  .step1 .m-window { height: clamp(280px, 40svh, 560px); }
  .step1 .col, .final .col { max-width: 640px; }
  .h2 { font-size: 34px; }
  .pin-blocks { right: auto; width: min(640px, calc(100% - 2 * var(--m))); }
  .offer { font-size: 22px; }
  .num { height: 42px; font-size: 20px; }
  .sel { height: 42px; font-size: 19px; }
  .m-bar { right: auto; width: min(640px, calc(100% - 2 * var(--m))); }
  .final .m-window { height: clamp(300px, 42svh, 560px); }
  .foot-grid { grid-template-columns: 1fr 1.3fr; gap: 48px; }
}
/* tall tablets have room under the window for the notes the phone drops */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 820px), (min-width: 1024px) and (max-width: 1365px) and (orientation: portrait) {
  #amtHelp, .blk-exchange .body, html:not(.paid) .blk-pay #holdHint { display: block; }
}
/* phones held sideways (768–1023 px wide, up to 600 px tall): the windows stand right of the text column */
@media (min-width: 768px) and (max-width: 1023px) and (max-height: 600px) {
  :root { --m: max(32px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); --lw: 54%; }
  .hero .m-window { position: absolute; top: 56px; right: 0; width: calc(100% - var(--lw)); height: calc(100svh - 56px); margin: 0; }
  .hero-col { width: var(--lw); max-width: none; padding-top: 72px; }
  .hero-card { width: calc(var(--lw) - 2 * var(--m)); }
  .h1 { font-size: 30px; }
  .lead { font-size: 15px; margin-top: 10px; }
  .lead .lead-rest { display: none; }
  .hero .cta-row .btn-l { flex: 1 1 100%; height: 48px; }
  .hero .cta-row .btn-line { display: none; }
  .spec { column-gap: 24px; }
  .spec-v { font-size: 20px; }
  .spec-v-s { font-size: 15px; }
  .step1, .final { display: grid; grid-template-columns: var(--lw) 1fr; align-items: start; }
  .step1 .m-window, .final .m-window { grid-column: 2; grid-row: 1; position: sticky; top: 56px; height: calc(100svh - 56px); margin-top: 0; }
  .step1 .col, .final .col { grid-column: 1; grid-row: 1; }
  .step1 .col { padding-top: 72px; }
  .final .col { padding-top: 96px; }
  .h2 { font-size: 24px; }
  .pinned .m-window, .hold-zone { left: var(--lw); width: auto; top: 56px; height: calc(100svh - 56px); }
  .win-caption { left: calc(var(--lw) + 12px); top: auto; bottom: 12px; max-width: calc(100% - var(--lw) - 24px); }
  .pin-blocks { width: calc(var(--lw) - 2 * var(--m)); top: 56px; }
  .blk { top: 12px; padding-bottom: 72px; }
  .offer { font-size: 18px; }
  .num { height: 38px; font-size: 17px; }
  .sel { height: 38px; font-size: 16px; }
  .m-bar { width: calc(var(--lw) - 2 * var(--m)); bottom: 12px; }
}

/* ---------- reduced motion ---------- */
.rm *, .rm *::before, .rm *::after { animation: none !important; transition-duration: 0.01ms !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
