/* «Ярус» — сцены страницы connect.html (GSM-модем, шаги, SIP) внутри главной: раздел #connect.cx-embed.
   Собрано из connect.css: общие правила страницы (html, body, :root) ограничены .cx-embed, остальное как есть.
   Обновлять: story-src/make_connect_embed.py */
.cx-embed {
  --sun: #fbd530;
  --ink: #17181c;
  --news: #efe9d8;
  --paper: #f6f0de;
  --milk: #fbfaf6;
  --mute: #5c5d61;
  --nav: 72px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --torn: polygon(0 1.5%, 3% 0, 47% 1%, 52% 0, 97% .8%, 100% 2.5%, 99.4% 50%, 100% 97%, 96% 100%, 50% 99.2%, 3% 100%, 0 98%, .6% 50%);
  --torn-strip: polygon(0 4%, 3% 0, 50% 3%, 97% 1%, 100% 6%, 99.4% 50%, 100% 94%, 96% 100%, 50% 97%, 3% 99%, 0 95%, .6% 50%);
}
.cx-embed { position: relative; color: var(--ink); font: 400 17px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--ink); }
.cx-embed *, .cx-embed *::before, .cx-embed *::after { box-sizing: border-box; }
.cx-embed img, .cx-embed svg, .cx-embed canvas { display: block; max-width: 100%; }
.cx-embed a { color: inherit; }
.cx-embed :is(h1, h2, h3, p, ol, ul) { margin: 0; }
.cx-embed :is(ol, ul) { padding: 0; list-style: none; }
.cx-embed :focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
main > section.cx-embed h2::before { content: none !important; }
main > section.cx-embed { padding: 0 !important; overflow: visible !important; }


.cx-wrap { width: min(1320px, calc(100% - 48px)); margin-inline: auto; }
.cx-skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; background: var(--sun); color: var(--ink); font-weight: 700; border-radius: 8px; }
.cx-skip:focus { top: 12px; }

/* ---------- растр точками */
.cx-dots {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgb(0 0 0 / 15%) 0 1px, transparent 1.5px);
  background-size: 6px 6px;
}
.cx-dots--dark { background-image: radial-gradient(circle, rgb(251 250 246 / 8%) 0 1px, transparent 1.5px); }

/* ---------- бумага с рваным краем */
.cx-paper {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 30px -18px rgb(0 0 0 / 45%), 0 2px 0 rgb(0 0 0 / 6%);
  clip-path: var(--torn);
}

/* ---------- кнопки */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 650 15px/1 "Onest", system-ui, sans-serif; letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease;
}
.cx-btn svg { width: 14px; height: 14px; transition: transform .2s ease; }
.cx-btn:hover svg { transform: translateX(3px); }
.cx-btn:active { transform: translateY(1px); }
.cx-btn--sun { background: var(--sun); color: var(--ink); }
.cx-btn--sun:hover { background: #ffe25a; }
.cx-btn--ink { background: var(--ink); color: var(--sun); }
.cx-btn--ink:hover { background: #2a2b31; }
.cx-btn--xl { min-height: 64px; padding: 0 30px; font-size: 19px; }

/* ================================================================ ШАПКА */
.cx-nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav);
  background: rgb(23 24 28 / 90%);
  border-bottom: 1px solid rgb(251 250 246 / 10%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  color: var(--milk);
}
.cx-nav__bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cx-nav__logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 650; letter-spacing: -.02em; text-decoration: none; }
.cx-nav__logo img { width: 28px; height: 28px; }
.cx-nav__links { display: flex; gap: 4px; }
.cx-nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 999px; font-size: 15px; text-decoration: none; color: rgb(251 250 246 / 86%); }
.cx-nav__links a:hover { background: rgb(251 250 246 / 8%); color: var(--milk); }
.cx-nav__actions { display: flex; align-items: center; gap: 8px; }
.cx-nav__back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 15px; text-decoration: none; color: rgb(251 250 246 / 86%); }
.cx-nav__back svg { width: 16px; height: 16px; }
.cx-nav__back:hover { background: rgb(251 250 246 / 8%); color: var(--milk); }

/* ================================================================ ЗАГОЛОВКИ РАЗДЕЛОВ */
.cx-h2 {
  font-weight: 900;
  font-size: clamp(40px, 5.6vw, 96px);
  line-height: .92;
  letter-spacing: -.05em;
  max-width: 14ch;
  text-wrap: balance;
}
.cx-h2 small {
  display: block;
  margin-bottom: 18px;
  font: 700 13px/1 var(--mono);
  letter-spacing: .18em;
  opacity: .7;
}

/* ================================================================ ПЕРВЫЙ ЭКРАН */
.cx-hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav) + 5vh) 0 5vh;
  background: var(--sun);
  overflow: clip;
}
.cx-hero__in { position: relative; z-index: 1; display: grid; gap: 28px; }
.cx-meta { display: flex; flex-wrap: wrap; gap: 22px; font: 700 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.cx-meta span + span::before { content: "/"; margin-right: 22px; opacity: .5; }
.cx-hero__h {
  display: grid;
  font-weight: 900;
  font-size: clamp(52px, 14.6vw, 214px);
  line-height: .84;
  letter-spacing: -.062em;
  margin-top: 1vh;
}
.cx-ln { display: block; white-space: nowrap; will-change: transform; }
.cx-ln--a { padding-left: .06em; }
.cx-ln--b { margin-left: -.04em; }
.cx-ln--c { padding-left: 1.25em; }
.cx-outline { color: transparent; -webkit-text-stroke: max(2px, .018em) var(--ink); }
.cx-hero__row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 2vh; }
.cx-lead { padding: 18px 22px; max-width: 54ch; font-size: 17px; font-weight: 500; line-height: 1.5; rotate: -.6deg; }
.cx-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cx-route {
  position: relative; display: grid; gap: 4px; padding: 18px 20px 22px;
  text-decoration: none; clip-path: var(--torn-strip);
  transition: background-color .2s ease, translate .25s ease;
}
.cx-route:nth-child(1) { rotate: .8deg; }
.cx-route:nth-child(2) { rotate: -.7deg; }
.cx-route b { font-size: 22px; font-weight: 850; letter-spacing: -.03em; line-height: 1.1; }
.cx-route span { font-size: 15px; color: rgb(23 24 28 / 72%); }
.cx-route i { position: absolute; right: 18px; top: 16px; font-style: normal; font-weight: 800; font-size: 22px; }
.cx-route:hover { background: #fff; translate: 0 -3px; }
/* лента «Номер остаётся у УК», как «ЗАНЯТО» у Моны на главной */
.cx-tape {
  position: absolute; right: -10px; top: 4vh; z-index: 2;
  padding: 12px 26px 14px;
  background: var(--ink); color: var(--sun);
  font: 900 clamp(22px, 2.5vw, 38px)/1 "Onest", system-ui, sans-serif; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
  rotate: -5deg;
  clip-path: polygon(1.5% 8%, 99% 0, 100% 86%, 98.5% 100%, 0 92%);
  box-shadow: 0 14px 22px -12px rgb(0 0 0 / 45%);
  will-change: transform;
}
.cx-hint { display: flex; align-items: center; gap: 14px; margin-top: 2vh; font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.cx-hint i { display: block; width: 2px; height: 46px; background: var(--ink); position: relative; }
.cx-hint i::after { content: ""; position: absolute; left: -5px; bottom: -1px; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); rotate: 45deg; }

/* ================================================================ МОДЕМ: закреплённая сцена */
.cx-scene { position: relative; background: var(--ink); color: var(--milk); }
.cx-scene__sticky { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--nav) + 40px) 0 56px; }
.cx-scene.is-live { height: 700vh; }  /* 18.11: первая треть — упаковка и отправка (embed.js, SHIP) */
.cx-scene.is-live .cx-scene__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--nav) + 3vh) 0 3vh; }
.cx-bigword {
  position: absolute; left: 0; bottom: -.12em; z-index: 0; margin: 0;
  display: flex; gap: .4em; white-space: nowrap; pointer-events: none;
  font-weight: 900; font-size: clamp(120px, 24vw, 420px); line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1.5px rgb(251 250 246 / 14%);
  will-change: transform;
}
.cx-scene__grid { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.5fr); gap: 32px; align-items: stretch; }
.cx-scene__text { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.cx-scene .cx-h2 { font-size: clamp(38px, 4.4vw, 74px); max-width: 11ch; color: var(--milk); }
.cx-scene__lead { max-width: 38ch; color: rgb(251 250 246 / 78%); font-size: 16px; }
.cx-parts { display: grid; gap: 6px; margin-top: auto; }
.cx-part {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; row-gap: 2px;
  padding: 12px 16px 13px;
  border-top: 1px solid rgb(251 250 246 / 14%);
  color: rgb(251 250 246 / 62%);
  transition: background-color .3s ease, color .3s ease, translate .35s cubic-bezier(.2, .7, .3, 1), rotate .35s ease;
}
.cx-part__n { grid-row: span 2; align-self: start; display: grid; place-items: center; height: 30px; border: 1.5px solid currentColor; border-radius: 6px; font: 700 13px/1 var(--mono); letter-spacing: .06em; }
.cx-part b { font-size: 18px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: rgb(251 250 246 / 88%); }
.cx-part__t { font-size: 14.5px; line-height: 1.4; }
.cx-part.is-on {
  background: var(--paper); color: rgb(23 24 28 / 78%);
  border-top-color: transparent;
  clip-path: var(--torn-strip);
  translate: 18px 0; rotate: -.8deg;
  box-shadow: 0 16px 26px -16px rgb(0 0 0 / 60%);
}
.cx-part.is-on b { color: var(--ink); }
.cx-part.is-on .cx-part__n { background: var(--sun); border-color: var(--ink); color: var(--ink); }

.cx-stage { position: relative; min-height: 540px; }
.cx-scene.is-live .cx-stage { min-height: 0; }
.cx-stage__bleed { position: absolute; top: calc(-1 * var(--gt, 0px)); right: calc(-1 * var(--gr, 0px)); bottom: calc(-1 * var(--gb, 0px)); left: calc(-1 * var(--gl, 0px)); pointer-events: none; }
.cx-stage__gl { width: 100%; height: 100%; max-width: none; display: none; }
.cx-stage__bp { position: absolute; left: 50%; top: 50%; width: min(100%, 820px); height: auto; translate: -50% -50%; rotate: -2deg; box-shadow: 0 30px 50px -24px rgb(0 0 0 / 70%); }
.cx-stage.is-gl .cx-stage__gl { display: block; }
.cx-stage.is-gl .cx-stage__bp { display: none; }
.cx-stage__count { position: absolute; right: 0; bottom: 0; display: flex; align-items: baseline; gap: 8px; margin: 0; font-family: var(--mono); color: rgb(251 250 246 / 60%); }
.cx-stage__count b { font: 900 clamp(56px, 6vw, 104px)/1 "Onest", system-ui, sans-serif; letter-spacing: -.05em; color: var(--sun); }
.cx-stage__count span { font-size: 15px; letter-spacing: .1em; }

.cx-leader { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; overflow: visible; display: none; }
.cx-scene.is-live .cx-leader.is-on { display: block; }
.cx-leader__line { fill: none; stroke: var(--sun); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; transition: stroke-dashoffset .5s cubic-bezier(.3, .7, .3, 1); }
.cx-leader__dot { fill: var(--sun); stroke: var(--ink); stroke-width: 2; }
.cx-leader__ring { fill: none; stroke: var(--sun); stroke-width: 2; stroke-dasharray: 6 5; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .cx-leader__ring { animation: cx-spin 6s linear infinite; }
  @keyframes cx-spin { to { rotate: 360deg; } }
}

/* ================================================================ ШАГИ GSM */
.cx-steps { position: relative; background: var(--news); }
.cx-steps__sticky { position: relative; isolation: isolate; overflow: hidden; padding: 110px 0 120px; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.cx-steps__head { position: relative; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cx-steps__note { padding: 14px 20px; font-weight: 650; font-size: 17px; rotate: 1.4deg; clip-path: var(--torn-strip); background: var(--sun); }
.cx-track-wrap { position: relative; z-index: 1; }
.cx-track { display: flex; gap: 56px; padding-inline: max(24px, calc((100vw - 1320px) / 2)); width: max-content; position: relative; will-change: transform; }
.cx-track::before {
  content: ""; position: absolute; left: max(24px, calc((100vw - 1320px) / 2)); right: 120px; top: 52%; height: 0;
  border-top: 3px dashed var(--ink); opacity: .55; z-index: -1;
}
.cx-step {
  position: relative; width: clamp(290px, 27vw, 400px); flex: none;
  display: grid; gap: 10px; align-content: start;
  padding: 26px 26px 30px;
}
.cx-step:nth-child(odd) { rotate: -1.6deg; translate: 0 -14px; }
.cx-step:nth-child(even) { rotate: 1.3deg; translate: 0 26px; }
.cx-step__n { position: absolute; right: 18px; top: 4px; font: 900 108px/1 "Onest", system-ui, sans-serif; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.cx-step__ic { width: 120px; height: 90px; margin-bottom: 10px; }
.cx-step h3 { font-size: 26px; font-weight: 850; letter-spacing: -.035em; line-height: 1.05; max-width: 11ch; }
.cx-step p { font-size: 16px; color: rgb(23 24 28 / 78%); max-width: 26ch; }
.cx-step--last { background: var(--ink); color: var(--milk); }
.cx-step--last .cx-step__n { -webkit-text-stroke-color: var(--sun); }
.cx-step--last p { color: rgb(251 250 246 / 76%); }
.cx-step--last .cx-step__ic path[fill="#fbd530"] { stroke: var(--sun); }
.cx-step--last .cx-step__ic path[fill="none"] { stroke: var(--sun); }
.cx-steps.is-live { height: 330vh; }
.cx-steps.is-live .cx-steps__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--nav) + 4vh) 0 5vh; }

/* ================================================================ SIP: живая сцена по прокрутке */
.cx-sip { position: relative; background: var(--sun); }
.cx-sip__sticky { position: relative; isolation: isolate; overflow: hidden; padding: 130px 0 140px; }
.cx-sip.is-live { height: 360vh; }
.cx-sip.is-live .cx-sip__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding: calc(var(--nav) + 4vh) 0 4vh; display: flex; align-items: center; }
.cx-sip__dots { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.cx-sip.has-dots .cx-sip__dots { display: block; }
.cx-sip.has-dots .cx-dots { display: none; }
.cx-sip__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.cx-sip__text { display: grid; gap: 28px; }
.cx-sip__steps { display: grid; gap: 0; counter-reset: sip; }
.cx-sip__step {
  counter-increment: sip; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px;
  padding: 16px 14px 16px 0; border-top: 2px solid var(--ink);
  transition: background-color .3s ease, translate .35s cubic-bezier(.2, .7, .3, 1), padding .35s ease;
}
.cx-sip__step::before { content: "0" counter(sip); grid-row: span 2; font: 900 44px/1 "Onest", system-ui, sans-serif; letter-spacing: -.05em; -webkit-text-stroke: 1.5px var(--ink); color: transparent; transition: color .3s ease; }
.cx-sip__step b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.cx-sip__step span { font-size: 16px; color: rgb(23 24 28 / 80%); }
.cx-sip.is-live .cx-sip__step.is-on { background: var(--paper); padding-left: 14px; translate: 12px 0; clip-path: var(--torn-strip); border-top-color: transparent; box-shadow: 0 16px 26px -16px rgb(0 0 0 / 45%); }
.cx-sip.is-live .cx-sip__step.is-on::before, .cx-sip:not(.is-live) .cx-sip__step::before { color: var(--ink); }
.cx-sip__leave { justify-self: start; padding: 14px 20px; font-weight: 700; font-size: 18px; clip-path: var(--torn-strip); background: var(--ink); color: var(--sun); rotate: -1deg; }
.cx-sip__art { position: relative; perspective: 1400px; display: grid; place-items: center; padding: 40px 0 70px; }
.cx-window {
  position: relative; z-index: 1;
  width: min(100%, 520px);
  border-radius: 16px; overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--ink), 0 40px 70px -30px rgb(0 0 0 / 55%), 18px 18px 0 var(--ink);
  transform-style: preserve-3d;
  will-change: transform;
}
.cx-window__bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--ink); color: rgb(251 250 246 / 70%); font-size: 13px; }
.cx-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgb(251 250 246 / 22%); }
.cx-window__bar i:first-child { background: var(--sun); }
.cx-window__bar span { margin-left: 8px; }
.ui.sip { display: grid; gap: 10px; padding: 22px 22px 24px; background: #fff; color: var(--ink); font: 400 15px/1.4 "Onest", system-ui, sans-serif; }
.sip__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sip__head b { font-weight: 600; font-size: 17px; }
/* статус номера — те же слова, что в программе */
.sip__st { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; transform-origin: right center; }
.sip__st i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.sip__st[data-st="off"] { background: #ecebe7; color: #5c5d61; }
.sip__st[data-st="off"] i { background: #a3a4a8; }
.sip__st[data-st="wait"] { background: #fdf1cc; color: #7a5a00; }
.sip__st[data-st="wait"] i { border: 2px solid #c48a00; border-right-color: transparent; background: transparent; }
.sip__st[data-st="ok"] { background: #e3f3e8; color: #17663a; }
.sip__st[data-st="ok"] i { background: #1f9d55; }
@media (prefers-reduced-motion: no-preference) {
  .sip__st[data-st="wait"] i { animation: cx-spin .8s linear infinite; }
}
.sip__field { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 8px; border: 1px solid rgb(23 24 28 / 14%); transition: border-color .2s ease, box-shadow .2s ease; }
.sip__field span { color: var(--mute); font-size: 14px; }
.sip__field > b { display: flex; align-items: center; min-width: 0; font-weight: 550; font-family: var(--mono); font-size: 15.5px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; }
.sip__field.is-typing { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(251 213 48 / 70%); }
.sip__caret { display: none; width: 2px; height: 1.2em; margin-left: 1px; background: var(--ink); }
.sip__field.is-typing .sip__caret { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .sip__caret { animation: cx-caret 1s steps(1) infinite; }
  @keyframes cx-caret { 50% { visibility: hidden; } }
}
.sip__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sip__btn {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease, color .2s ease;
}
.sip__btn--save { background: var(--ink); color: var(--milk); box-shadow: 0 3px 0 #000; }
.sip__btn--call { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.sip__btn.is-off { background: #f1f0ec; color: #a3a4a8; border-color: #d7d6d1; box-shadow: none; }
.sip__btn.is-press { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.sip__btn--call.is-press { background: var(--sun); }
.sip__check { display: flex; align-items: center; gap: 10px; min-height: 22px; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--ink); clip-path: inset(0 0 0 0); transition: clip-path .5s cubic-bezier(.3, .7, .3, 1); }
.cx-sip.is-live .sip__check.is-hidden { clip-path: inset(0 100% 0 0); }
.sip__check i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px rgb(251 213 48 / 45%), 0 0 0 1px var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .sip__check i { animation: cx-ring 1.2s ease-in-out infinite; }
  @keyframes cx-ring { 50% { box-shadow: 0 0 0 7px rgb(251 213 48 / 45%), 0 0 0 1px var(--ink); } }
}

/* трубка, которая звонит для проверки */
.cx-phone { position: absolute; right: -6%; bottom: -4%; z-index: 2; width: clamp(170px, 17vw, 250px); aspect-ratio: 1; filter: drop-shadow(0 18px 18px rgb(0 0 0 / 28%)); will-change: transform; }
.cx-phone svg { width: 100%; height: 100%; overflow: visible; }
.cx-phone__rings path { transform-box: fill-box; transform-origin: center; }
.cx-sip.is-live .cx-phone__rings { visibility: hidden; }
.cx-sip.is-live .cx-phone.is-ringing .cx-phone__rings { visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .cx-phone.is-ringing .cx-phone__rings path { animation: cx-arc .9s cubic-bezier(.3, .7, .3, 1) infinite; }
  .cx-phone.is-ringing .cx-phone__rings path:nth-child(2) { animation-delay: .15s; }
  .cx-phone.is-ringing .cx-phone__rings path:nth-child(3) { animation-delay: .3s; }
  @keyframes cx-arc { 0% { scale: .7; } 60% { scale: 1.12; } 100% { scale: .7; } }
}
.cx-stamp {
  position: absolute; right: -4%; top: 0; z-index: 3; margin: 0;
  padding: 10px 18px 12px;
  border: 4px solid #1f7a45; border-radius: 10px;
  color: #1f7a45; font: 900 clamp(26px, 3vw, 44px)/1 "Onest", system-ui, sans-serif; letter-spacing: -.02em; text-transform: uppercase;
  rotate: -8deg;
  background: rgb(246 240 222 / 55%);
  mix-blend-mode: multiply;
  will-change: transform;
}

/* ================================================================ РЕЖИМЫ */
.cx-modes { position: relative; isolation: isolate; overflow: clip; background: var(--ink); color: var(--milk); padding: 130px 0; }
.cx-modes .cx-wrap { position: relative; z-index: 1; display: grid; gap: 48px; }
.cx-modes .cx-h2 { max-width: 13ch; }
.cx-modes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cx-mode {
  display: grid; gap: 14px; align-content: start;
  padding: 30px 30px 34px;
  border-radius: 22px;
  background: rgb(251 250 246 / 8%);
  border: 1px solid rgb(251 250 246 / 18%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}
.cx-mode__k { font: 700 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: rgb(251 250 246 / 60%); }
.cx-mode h3 { font-size: clamp(30px, 3.2vw, 48px); font-weight: 900; letter-spacing: -.045em; line-height: 1; }
.cx-mode p { font-size: 17px; color: rgb(251 250 246 / 80%); max-width: 44ch; }
.cx-mode--sun { background: var(--sun); color: var(--ink); border-color: var(--sun); rotate: 1deg; }
.cx-mode--sun .cx-mode__k { color: rgb(23 24 28 / 64%); }
.cx-mode--sun p { color: rgb(23 24 28 / 82%); }
.cx-mode:not(.cx-mode--sun) { rotate: -.8deg; }
.cx-modes__xl { display: inline-flex; align-items: center; gap: 12px; justify-self: start; font-size: 18px; font-weight: 600; color: rgb(251 250 246 / 88%); }
.cx-xl-ic { width: 26px; height: 26px; }

/* ================================================================ КАК УЙТИ */
.cx-leave { position: relative; isolation: isolate; overflow: clip; background: var(--news); padding: 130px 0 140px; }
.cx-leave .cx-wrap { position: relative; z-index: 1; display: grid; gap: 48px; }
.cx-coupons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.cx-coupon {
  position: relative; display: grid; gap: 8px; align-content: start;
  padding: 30px 24px 28px;
  background: var(--paper);
  border: 2.5px dashed var(--ink);
  border-radius: 6px;
  box-shadow: 0 18px 30px -20px rgb(0 0 0 / 40%);
}
.cx-coupon::before { content: "✂"; position: absolute; top: -17px; left: 18px; padding: 0 6px; background: var(--news); font-size: 22px; line-height: 1; }
.cx-coupon:nth-child(odd) { rotate: -1.2deg; }
.cx-coupon:nth-child(even) { rotate: 1deg; translate: 0 18px; }
.cx-coupon b { font-size: clamp(28px, 2.6vw, 40px); font-weight: 900; letter-spacing: -.045em; line-height: 1; }
.cx-coupon span { font-size: 16px; color: rgb(23 24 28 / 80%); }
.cx-coupon:first-child { background: var(--sun); }

/* ================================================================ ФОРМА */
.cx-cta { position: relative; isolation: isolate; overflow: clip; background: var(--sun); padding: 140px 0 150px; }
.cx-cta__in { position: relative; z-index: 1; display: grid; gap: 30px; justify-items: start; padding-right: min(44%, 600px); }
.cx-cta__bp { position: absolute; right: -2%; top: 50%; width: min(46%, 640px); margin: 0; translate: 0 -50%; rotate: 3deg; box-shadow: 0 30px 50px -24px rgb(0 0 0 / 50%); clip-path: var(--torn); will-change: transform; }
.cx-cta__bp img { width: 100%; height: auto; }
.cx-cta__h { font-weight: 900; font-size: clamp(48px, 7.4vw, 128px); line-height: .9; letter-spacing: -.055em; max-width: 12ch; }
.cx-cta__p { max-width: 56ch; font-size: 18px; font-weight: 500; }

/* ================================================================ ПОДВАЛ */
.cx-foot { background: var(--ink); color: rgb(251 250 246 / 72%); padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); font-size: 14px; }
.cx-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.cx-foot__in .cx-nav__logo { color: var(--milk); margin-right: auto; }
.cx-foot a { text-decoration: none; }
.cx-foot a:hover { color: var(--sun); }

/* ================================================================ ПЛАНШЕТ */
@media (max-width: 1100px) {
  .cx-wrap { width: min(100% - 40px, 960px); }
  .cx-nav__links { display: none; }
  .cx-scene__grid { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 20px; }
  .cx-part { padding: 10px 12px 11px; }
  .cx-part__t { font-size: 13.5px; }
  .cx-coupons { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}

/* ================================================================ ТЕЛЕФОН */
@media (max-width: 899px) {
  :root { --nav: 64px; }
  .cx-wrap { width: calc(100% - 32px); }
  .cx-nav__back span { display: none; }
  .cx-nav__back { padding: 0 10px; }
  .cx-btn { font-size: 14px; padding: 0 16px; min-height: 42px; }

  .cx-hero { padding-top: calc(var(--nav) + 26px); }
  .cx-hero__in { gap: 22px; }
  .cx-meta { gap: 12px; font-size: 11px; }
  .cx-meta span + span::before { margin-right: 12px; }
  .cx-hero__h { font-size: clamp(50px, 15.5vw, 120px); margin-top: 4px; }
  .cx-ln--c { padding-left: .5em; }
  .cx-hero__row { grid-template-columns: 1fr; gap: 18px; }
  .cx-lead { font-size: 15.5px; padding: 16px 18px; }
  .cx-routes { gap: 10px; }
  .cx-route { padding: 14px 14px 16px; }
  .cx-route b { font-size: 16px; padding-right: 20px; }
  .cx-route i { right: 12px; top: 12px; font-size: 18px; }
  .cx-tape { position: relative; right: auto; top: auto; justify-self: end; margin: 4px -6px 0 0; padding: 10px 18px 12px; font-size: 19px; }

  .cx-scene__grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
  .cx-scene__text { display: contents; }
  .cx-scene .cx-h2 { font-size: clamp(32px, 9vw, 44px); max-width: 12ch; }
  .cx-scene .cx-h2 small { margin-bottom: 10px; }
  .cx-scene__lead { display: none; }
  .cx-stage { min-height: 300px; }
  .cx-scene.is-live .cx-stage { min-height: 0; }
  .cx-stage__count { right: 0; bottom: 0; }
  .cx-stage__count b { font-size: 46px; }
  .cx-stage__count span { font-size: 12px; }
  .cx-stage { order: 2; }
  .cx-parts { order: 3; margin-top: 0; }
  .cx-scene.is-live .cx-parts { display: flex; gap: 0; overflow: hidden; width: 100%; padding-top: 4px; }
  .cx-scene.is-live .cx-part { flex: 0 0 100%; translate: calc(var(--i, 0) * -100%) 0; rotate: 0deg; transition: translate .45s cubic-bezier(.2, .7, .3, 1), background-color .3s ease, color .3s ease; }
  .cx-scene.is-live .cx-part.is-on { translate: calc(var(--i, 0) * -100%) 0; rotate: 0deg; }
  .cx-part b { font-size: 17px; }
  .cx-part__t { font-size: 14px; }
  .cx-bigword { font-size: 34vh; bottom: auto; top: 30%; }

  .cx-steps__sticky { padding: 90px 0 100px; gap: 34px; }
  .cx-track { flex-direction: column; width: auto; gap: 26px; padding-inline: 16px; }
  .cx-track::before { left: 50%; right: auto; top: 40px; bottom: 40px; height: auto; width: 0; border-top: 0; border-left: 3px dashed var(--ink); }
  .cx-step { width: 100%; padding: 22px 20px 24px; }
  .cx-step:nth-child(odd) { rotate: -1deg; translate: none; }
  .cx-step:nth-child(even) { rotate: .9deg; translate: none; }
  .cx-step__n { font-size: 84px; }
  .cx-step h3 { font-size: 24px; }
  .cx-step__ic { width: 96px; height: 72px; }

  .cx-modes, .cx-leave { padding: 90px 0 100px; }
  .cx-sip__sticky { padding: 90px 0 100px; }
  .cx-sip.is-live .cx-sip__sticky { padding: calc(var(--nav) + 14px) 0 14px; align-items: flex-start; }
  .cx-sip__grid { grid-template-columns: 1fr; gap: 14px; }
  .cx-sip__text { display: contents; }
  .cx-sip .cx-h2 { order: 1; font-size: clamp(32px, 9vw, 44px); }
  .cx-sip .cx-h2 small { margin-bottom: 10px; }
  .cx-sip__art { order: 2; padding: 0 0 6px; place-items: start stretch; }
  .cx-sip__steps { order: 3; }
  .cx-sip__leave { order: 4; font-size: 15px; padding: 10px 14px; }
  .cx-sip__step { grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; padding: 12px 12px 12px 0; }
  .cx-sip__step::before { font-size: 30px; }
  .cx-sip__step b { font-size: 18px; }
  .cx-sip__step span { font-size: 14.5px; }
  .cx-sip.is-live .cx-sip__steps { display: flex; overflow: hidden; padding-top: 2px; }
  .cx-sip.is-live .cx-sip__step,
  .cx-sip.is-live .cx-sip__step.is-on { flex: 0 0 100%; translate: calc(var(--s, 0) * -100%) 0; padding-left: 12px; transition: translate .45s cubic-bezier(.2, .7, .3, 1), background-color .3s ease; }
  .cx-window { width: 100%; box-shadow: 0 0 0 1.5px var(--ink), 0 30px 50px -26px rgb(0 0 0 / 55%), 8px 8px 0 var(--ink); }
  .cx-window__bar { height: 32px; }
  .ui.sip { padding: 14px 14px 16px; gap: 8px; }
  .sip__head b { font-size: 15px; }
  .sip__st { height: 26px; padding: 0 10px; font-size: 12px; }
  .sip__field { grid-template-columns: 66px minmax(0, 1fr); height: 40px; padding: 0 10px; gap: 8px; }
  .sip__field span { font-size: 13px; }
  .sip__field > b { font-size: 14px; }
  .sip__btn { min-height: 34px; padding: 0 10px; font-size: 12.5px; }
  .sip__check { font-size: 13px; }
  .cx-phone { width: 112px; right: -10px; bottom: -40px; }
  .cx-stamp { right: -4px; top: 44%; }

  .cx-modes__grid { grid-template-columns: 1fr; gap: 18px; }
  .cx-mode { padding: 24px 22px 26px; }
  .cx-mode, .cx-mode--sun, .cx-mode:not(.cx-mode--sun) { rotate: 0deg; }
  .cx-coupons { grid-template-columns: 1fr; row-gap: 34px; }
  .cx-coupon:nth-child(even) { translate: none; }

  .cx-cta { padding: 100px 0 110px; }
  .cx-cta__in { padding-right: 0; }
  .cx-cta__bp { position: relative; right: auto; top: auto; width: 100%; translate: none; rotate: -2deg; margin-top: 10px; }
  .cx-btn--xl { min-height: 58px; padding: 0 22px; font-size: 17px; white-space: normal; text-align: center; }
  .cx-foot__in .cx-nav__logo { margin-right: 0; width: 100%; }
}
@media (max-width: 380px) {
  .cx-nav__logo { font-size: 17px; gap: 8px; }
  .cx-btn { padding: 0 13px; font-size: 13.5px; }
}

/* ---------- меньше движения: ничего не закрепляется, всё стоит на месте */
@media (prefers-reduced-motion: reduce) {
  .cx-scene.is-live { height: auto; }
  .cx-scene.is-live .cx-scene__sticky { position: relative; height: auto; }
  .cx-steps.is-live { height: auto; }
  .cx-steps.is-live .cx-steps__sticky { position: relative; height: auto; }
  .cx-sip.is-live { height: auto; }
  .cx-sip.is-live .cx-sip__sticky { position: relative; height: auto; }
  .cx-btn, .cx-route, .cx-part { transition: none; }
}

/* на главной: заголовок сцены модема помещается в узкую колонку */
main > section.cx-embed #gsm-h { font-size: clamp(36px, 3.9vw, 64px) !important; max-width: none; }
/* «Подключено» в SIP — слово из газетных букв на рваной полосе (story-src/make_paper_pieces.py) */
main > section.cx-embed .cx-stamp {
  width: clamp(220px, 22vw, 330px); aspect-ratio: 817 / 140; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: url("../poster/emo/w-connected.webp") center / contain no-repeat !important;
  color: transparent !important; mix-blend-mode: normal !important; overflow: hidden; white-space: nowrap;
}

/* 18.11: подпись этапа отправки — рваная чёрная глянцевая бумага, как плашки по всему сайту */
.cx-ship { position: absolute; left: 0; top: 2%; z-index: 4; margin: 0; padding: 14px 20px 13px; max-width: 92%;
  font: 800 clamp(17px, 1.5vw, 24px)/1.2 "Onest", system-ui, sans-serif; color: #fbd530; letter-spacing: -.01em;
  border: 0 solid transparent; border-image: url("../poster/paper/card-black.webp?v=1") 40 fill / 26px / 12px stretch;
  rotate: -1.5deg; opacity: 0; translate: 0 -10px; transition: opacity .25s, translate .25s; pointer-events: none; }
.cx-scene.is-ship .cx-ship { opacity: 1; translate: 0 0; }
.cx-scene.is-ship .cx-stage__count { opacity: 0; }
.cx-stage__count { transition: opacity .25s; }
@media (max-width: 899px) { .cx-ship { top: 0; left: 50%; translate: -50% -10px; white-space: nowrap; font-size: 16px; padding: 11px 16px 10px; }
  .cx-scene.is-ship .cx-ship { translate: -50% 0; } }

/* поездка: текст колонки уезжает влево, фургон и дорога — во всю ширину (embed.js, is-trip) */
@media (min-width: 900px) {
  .cx-scene__text { transition: translate .6s cubic-bezier(.6, 0, .3, 1); }
  .cx-scene.is-trip .cx-scene__text { translate: -120% 0; }
}

/* 18.11: плашки SIP — та же рваная глянцевая бумага. «Уйти просто» — чёрная с жёлтым текстом (на белой жёлтый сливался) */
main > section.cx-embed .cx-sip__leave.cx-paper { border-image-source: url("../poster/paper/card-black.webp?v=1") !important; color: #fbd530; background: none; clip-path: none; }
.cx-sip.is-live .cx-sip__step.is-on { padding: 14px 16px 14px 18px; background: none; clip-path: none; box-shadow: none; border: 0 solid transparent;
  border-image: url("../poster/paper/card-white.webp?v=1") 40 fill / 26px / 12px stretch; }
