/* Сайт Yobi.chat. Палитра: лёд, полночь, синий Yobi, небо и жёлтая «точка доставки» из знака. */

@font-face { font-family: 'Unbounded'; src: url(/site/fonts/unbounded.woff) format('woff'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Onest'; src: url(/site/fonts/onest.woff) format('woff'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/site/fonts/jbmono.woff) format('woff'); font-weight: 100 800; font-display: swap; }

:root {
  --ice: #F3F7FE;
  --paper: #FFFFFF;
  --ink: #0B1A36;
  --ink-2: #33435F;
  --mist: #64748F;
  --line: #DCE5F3;
  --blue: #2E7BF0;
  --blue-deep: #1D5BD0;
  --blue-soft: #E3EEFF;
  --sky: #A9CCFF;
  --spark: #FFC93C;
  --night: #071226;
  --night-2: #0E1E3D;
  --night-line: #1F3159;
  --bubble-in: #FFFFFF;
  --bubble-out: #DDEBFF;
  --shadow: 0 1px 2px rgba(11, 26, 54, .06), 0 18px 50px -20px rgba(29, 91, 208, .35);
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ice: #071226;
    --paper: #0D1B35;
    --ink: #E8EEF9;
    --ink-2: #BAC6DC;
    --mist: #8C9BB6;
    --line: #1C2D50;
    --blue: #4C8DFF;
    --blue-deep: #2E7BF0;
    --blue-soft: #132A55;
    --sky: #6FA6FF;
    --bubble-in: #13254A;
    --bubble-out: #1D4384;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 60px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ice); color: var(--ink);
  font: 400 17px/1.6 var(--text); font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.06; margin-bottom: .55em; }
h3 { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.2; font-weight: 500; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--sky); color: var(--night); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--mist); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.two { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (min-width: 920px) { .two { grid-template-columns: 1fr 1fr; } .two.rev > :first-child { order: 0; } }
@media (max-width: 919px) { .two.rev > :first-child { order: 2; } }
section p { color: var(--ink-2); max-width: 60ch; }

/* ---------- кнопки ---------- */
.btn {
  --bg: var(--blue); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); font: 600 15px/1 var(--text); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .25s var(--spring), background-color .2s, box-shadow .2s;
  box-shadow: 0 8px 22px -10px rgba(46, 123, 240, .8);
}
.btn:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.big { height: 54px; padding: 0 26px; font-size: 16px; }
.btn.ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--sky); }
.btn.light { --bg: #fff; --fg: var(--night); box-shadow: none; }
.btn.light:hover { background: var(--spark); }
.btn[aria-disabled="true"] { --bg: var(--line); --fg: var(--mist); box-shadow: none; pointer-events: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 50; transition: background-color .3s, box-shadow .3s, color .3s; }
.top-in { max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 28px; }
.top.scrolled { background: color-mix(in srgb, var(--ice) 82%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mark { width: 34px; height: 34px; filter: drop-shadow(0 6px 12px rgba(46, 123, 240, .35)); }
.word { font: 700 20px/1 var(--display); letter-spacing: -.03em; }
.tld { font-weight: 400; color: var(--mist); margin-left: 1px; }
.links { display: flex; gap: 4px; margin-left: auto; }
.links a { position: relative; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; transition: color .2s, background-color .2s; }
.links a:hover { color: var(--ink); background: color-mix(in srgb, var(--paper) 70%, transparent); }
.links a[aria-current] { color: var(--blue); }
.links a[aria-current]::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--spark); }
.actions { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; position: relative; color: var(--ink); }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.sheet { display: none; }

html[data-top="dark"] .top:not(.scrolled):not(.open) { color: #fff; }
html[data-top="dark"] .top:not(.scrolled):not(.open) .links a { color: rgba(255, 255, 255, .78); }
html[data-top="dark"] .top:not(.scrolled):not(.open) .links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
html[data-top="dark"] .top:not(.scrolled):not(.open) .tld { color: rgba(255, 255, 255, .6); }
html[data-top="dark"] .top:not(.scrolled):not(.open) .btn.ghost { --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); }
html[data-top="dark"] .top:not(.scrolled):not(.open) .burger { background: rgba(255, 255, 255, .1); box-shadow: none; color: #fff; }

@media (max-width: 1060px) {
  .links { display: none; }
  .actions { margin-left: auto; }
  .burger { display: block; }
  .sheet {
    display: flex; flex-direction: column; position: fixed; inset: 72px 0 0; z-index: 49; background: var(--ice);
    padding: 12px var(--gutter) 32px; overflow-y: auto;
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .5s var(--ease), visibility 0s .5s;
  }
  .top.open .sheet { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .5s var(--ease); }
  .top.open { background: var(--ice); }
  .sheet > a { font: 600 clamp(26px, 7vw, 36px)/1.15 var(--display); letter-spacing: -.02em; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .5s var(--ease); }
  .sheet > a[aria-current] { color: var(--blue); }
  .top.open .sheet > a { opacity: 1; transform: none; }
  .top.open .sheet > a:nth-child(2) { transition-delay: .04s; } .top.open .sheet > a:nth-child(3) { transition-delay: .08s; }
  .top.open .sheet > a:nth-child(4) { transition-delay: .12s; } .top.open .sheet > a:nth-child(5) { transition-delay: .16s; }
  .top.open .sheet > a:nth-child(6) { transition-delay: .2s; } .top.open .sheet > a:nth-child(7) { transition-delay: .24s; }
  .top.open .sheet > a:nth-child(8) { transition-delay: .28s; }
  .sheet-cta { display: grid; gap: 10px; margin-top: 28px; }
  body.locked { overflow: hidden; }
}
@media (max-width: 560px) {
  .actions .btn { display: none; }
  .top-in { padding-top: 12px; padding-bottom: 12px; }
}

/* ---------- первый экран ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(64px, 9vw, 120px); isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: -120px 0 -240px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 46% at 78% 32%, color-mix(in srgb, var(--sky) 55%, transparent), transparent 70%),
    radial-gradient(30% 26% at 8% 62%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 70%);
}
.hero-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: clamp(40px, 6vw, 64px); align-items: center; }
@media (min-width: 1000px) { .hero-in { grid-template-columns: 1.1fr .9fr; } }
.hero-title { font-size: clamp(44px, 7.6vw, 100px); line-height: .94; letter-spacing: -.045em; font-weight: 700; margin-bottom: 28px; }
.hero-title .line { display: block; }
.spark { display: inline-block; width: .2em; height: .2em; margin-left: .06em; border-radius: 50%; background: var(--spark); vertical-align: baseline; box-shadow: 0 0 0 0 rgba(255, 201, 60, .6); }
.js .hero-title .line { animation: rise .9s var(--ease) both; }
.js .hero-title .line:nth-child(2) { animation-delay: .08s; }
.js .spark { animation: drop .7s var(--spring) .75s both, ping 2.6s ease-out 1.6s 2; }
.lead { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.js .hero-copy .lead, .js .hero-copy .cta-row, .js .hero-copy .plats { animation: fade .8s var(--ease) both; }
.js .hero-copy .lead { animation-delay: .25s; } .js .hero-copy .cta-row { animation-delay: .35s; } .js .hero-copy .plats { animation-delay: .45s; }
@keyframes rise { from { transform: translateY(.9em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(-1.4em) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 201, 60, .7); } 100% { box-shadow: 0 0 0 .5em rgba(255, 201, 60, 0); } }

.plats { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.plats a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 12px; text-decoration: none; font-size: 14px; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s, color .2s; }
.plats a:hover { background: var(--paper); color: var(--blue); }
.os { width: 18px; height: 18px; flex-shrink: 0; }

/* окно переписки */
.stage { position: relative; perspective: 1400px; justify-self: center; width: min(100%, 470px); }
.win {
  position: relative; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  overflow: hidden; transform-style: preserve-3d; transition: transform .6s var(--ease);
  transform: rotateY(var(--ry, -6deg)) rotateX(var(--rx, 4deg));
}
.win-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ava { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 600 16px/1 var(--display); flex-shrink: 0; }
.ava-a { background: linear-gradient(135deg, #FF9A62, #F2557B); }
.ava-me { background: linear-gradient(135deg, #4C93FF, #1F5FD6); }
.who { display: grid; line-height: 1.25; }
.who b { font-weight: 600; }
.who small { color: var(--blue); font-size: 13px; transition: color .3s; }
.win-icons { margin-left: auto; display: flex; gap: 14px; color: var(--blue); }
.win-icons svg { width: 22px; height: 22px; }
.thread {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; height: 430px; overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--sky) 20%, transparent), transparent 40%),
    var(--ice);
  justify-content: flex-end;
  -webkit-mask-image: linear-gradient(transparent, #000 56px); mask-image: linear-gradient(transparent, #000 56px);
}
.day { align-self: center; font-size: 12px; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--paper) 80%, transparent); color: var(--mist); margin-bottom: 4px; }
.msg { position: relative; max-width: 78%; padding: 8px 12px 8px; border-radius: 18px; font-size: 15px; line-height: 1.35; box-shadow: 0 1px 1px rgba(11, 26, 54, .06); transform-origin: bottom left; }
.msg time { float: right; margin: 6px 0 -4px 10px; font-size: 11px; color: var(--mist); display: inline-flex; align-items: center; gap: 3px; }
.msg.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--bubble-out); border-bottom-right-radius: 6px; transform-origin: bottom right; }
.msg.out time { color: color-mix(in srgb, var(--blue) 75%, var(--mist)); }
.ticks { display: inline-block; width: 16px; height: 9px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 9'%3E%3Cpath d='M1 5l3 3 6-7M6 7l1 1 6-7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 9'%3E%3Cpath d='M1 5l3 3 6-7M6 7l1 1 6-7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mist); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.play { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); position: relative; flex-shrink: 0; }
.play::after { content: ''; position: absolute; left: 13px; top: 10px; border: 7px solid transparent; border-left: 10px solid #fff; border-right: 0; }
.wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
.wave i { width: 3px; border-radius: 2px; height: calc(var(--h) * 100%); background: var(--blue); opacity: .35; }
.voice.playing .wave i { animation: fillwave 2.4s linear both; }
.voice.playing .wave i:nth-child(n) { animation-delay: calc(var(--i, 0) * .1s); }
@keyframes fillwave { to { opacity: 1; } }
.voice time { float: none; margin: 0; }
.photo { padding: 4px; max-width: 72%; }
.pic { position: relative; display: block; width: 240px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #FFB86B 0%, #FF8F70 38%, #8C7BE0 70%, #3B4BA8 100%); }
.pic .sun { position: absolute; width: 56px; height: 56px; left: 50%; top: 34%; margin-left: -28px; border-radius: 50%; background: #FFE4A3; box-shadow: 0 0 40px 10px rgba(255, 228, 163, .6); }
.pic .hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.pic .h1 { bottom: -38%; height: 70%; background: #2B3D86; }
.pic .h2 { bottom: -50%; height: 72%; left: 30%; background: #1A2A68; }
.cap { display: block; padding: 6px 8px 2px; }
.react { position: absolute; right: -6px; bottom: -14px; padding: 2px 8px; border-radius: 99px; background: var(--paper); box-shadow: 0 2px 8px rgba(11, 26, 54, .15); font-size: 13px; transform: scale(0); transition: transform .45s var(--spring); }
.photo.reacted .react { transform: scale(1); }
.sticker { background: none !important; box-shadow: none; padding: 0; margin-top: 10px; }
.sticker .mark { width: 92px; height: 92px; filter: drop-shadow(0 10px 18px rgba(46, 123, 240, .4)); }
.win-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--mist); font-size: 15px; }
.win-input span { flex: 1; padding: 9px 14px; border-radius: 99px; background: var(--ice); }
.mic { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); position: relative; }
.mic::after { content: ''; position: absolute; left: 15px; top: 10px; width: 8px; height: 13px; border-radius: 5px; background: #fff; }

.js .stage [data-step] { opacity: 0; transform: translateY(10px) scale(.94); transition: opacity .35s, transform .5s var(--spring), max-height .4s var(--ease); }
.js .stage [data-step].shown { opacity: 1; transform: none; }
.js .stage [data-step].gone { display: none; }

.chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform .6s var(--ease); }
.chip svg { width: 18px; height: 18px; color: #2FA866; }
.chip-lock { left: -28px; top: 18%; transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -10px), 0); }
.chip-call { right: -22px; bottom: 16%; transform: translate3d(calc(var(--px, 0) * 16px), calc(var(--py, 0) * 12px), 0); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #2FA866; box-shadow: 0 0 0 0 rgba(47, 168, 102, .6); animation: ping2 1.8s infinite; }
@keyframes ping2 { to { box-shadow: 0 0 0 10px rgba(47, 168, 102, 0); } }
.js .chip { animation: fade .8s var(--ease) 1s both; }
@media (max-width: 560px) {
  .chip-lock { left: auto; right: -6px; top: -26px; } .chip-call { right: auto; left: -6px; bottom: -22px; }
  .thread { height: 380px; }
  .win { --ry: 0deg; --rx: 0deg; }
}

/* ---------- синхронизация ---------- */
.sync { padding: clamp(56px, 8vw, 110px) 0; }
.devices { position: relative; height: 340px; }
.dev::after { content: ''; position: absolute; right: -5px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--spark); box-shadow: 0 0 0 3px var(--ice); transform: scale(0); animation: blip 3.2s var(--spring) infinite; }
.phone::after { animation-delay: -2.9s; } .laptop::after { animation-delay: -1.5s; } .browser::after { animation-delay: -.2s; }
@keyframes blip { 0%, 14% { transform: scale(0); } 22%, 40% { transform: scale(1); } 52%, 100% { transform: scale(0); } }
.dev .top-bar { position: absolute; left: 0; right: 0; top: 0; height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 8px; }
.ph-head { display: flex; align-items: center; gap: 6px; margin-bottom: auto; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ph-head i { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #FF9A62, #F2557B); }
.ph-head span { width: 44px; height: 6px; border-radius: 3px; background: var(--line); }
.side { display: flex; flex-direction: column; gap: 8px; padding: 10px 8px; }
.side i { display: block; height: 18px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 0 18px, transparent 18px 22px, var(--line) 22px); opacity: .9; }
.side i:first-child { background: linear-gradient(90deg, var(--sky) 0 18px, transparent 18px 22px, var(--blue-soft) 22px); }
.dev { position: absolute; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.dev .scr { position: absolute; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px; background: var(--ice); overflow: hidden; }
.b { display: block; height: 12px; border-radius: 7px; background: var(--bubble-in); width: 62%; box-shadow: 0 1px 1px rgba(11, 26, 54, .06); }
.b.out { align-self: flex-end; background: var(--sky); width: 52%; }
.b.s { width: 38%; }
.b.new { animation: pop 3.2s var(--spring) infinite; transform-origin: right bottom; background: var(--blue); }
.phone .b.new { animation-delay: -2.9s; }
.laptop .b.new { animation-delay: -1.5s; }
.browser .b.new { animation-delay: -.2s; }
@keyframes pop { 0%, 12% { transform: scale(0); opacity: 0; } 22%, 92% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.phone { left: 2%; top: 46px; width: 132px; height: 262px; border-radius: 26px; }
.phone .scr { inset: 10px; border-radius: 18px; }
.laptop { left: 30%; top: 8px; width: 46%; height: 188px; border-radius: 14px 14px 4px 4px; }
.laptop .scr { inset: 10px 10px 0; border-radius: 6px 6px 0 0; flex-direction: row; padding: 0; gap: 0; }
.laptop .side { width: 30%; background: color-mix(in srgb, var(--paper) 60%, var(--ice)); border-right: 1px solid var(--line); }
.laptop .pane { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 10px; }
.laptop .base { position: absolute; left: -8%; right: -8%; bottom: -12px; height: 12px; border-radius: 0 0 14px 14px; background: color-mix(in srgb, var(--line) 80%, var(--paper)); }
.browser { right: 0; top: 190px; width: 44%; height: 140px; border-radius: 14px; }
.browser .bar { position: absolute; left: 0; right: 0; top: 0; height: 26px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.browser .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.browser .bar span { margin-left: 8px; font-size: 10px; color: var(--mist); }
.browser .scr { inset: 26px 0 0; border-radius: 0 0 14px 14px; }
@media (max-width: 560px) {
  .devices { height: 300px; }
  .phone { width: 104px; height: 210px; top: 60px; }
  .laptop { left: 34%; width: 62%; height: 150px; }
  .browser { width: 58%; top: 186px; height: 112px; }
}
.js .sync:not(.in) .dev::after, .js .sync:not(.in) .b.new { animation-play-state: paused; }

/* ---------- возможности ---------- */
.feats { padding: clamp(56px, 8vw, 110px) 0; }
.sec-title { max-width: 14em; }
.feat-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.feat-list a { display: grid; grid-template-columns: 1fr; gap: 6px 40px; padding: 26px 4px; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; transition: background-color .25s, padding .35s var(--ease); }
@media (min-width: 820px) { .feat-list a { grid-template-columns: minmax(240px, 1fr) 1.6fr; align-items: baseline; } }
.feat-list h3 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; transition: color .2s; }
.feat-list p { margin: 0; color: var(--ink-2); }
.feat-list a::after { content: ''; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--spark); transform: scale(0); transition: transform .35s var(--spring); }
.feat-list a:hover { padding-left: 16px; background: linear-gradient(90deg, var(--paper), transparent); }
.feat-list a:hover h3 { color: var(--blue); }
.feat-list a:hover::after { transform: scale(1); }

/* ---------- тёмные секции ---------- */
.dark { --ink: #EAF0FB; --ink-2: #B6C3DC; --mist: #8696B5; --line: var(--night-line); color: var(--ink); background: var(--night); }
.secure { padding: clamp(64px, 9vw, 120px) 0; background:
  radial-gradient(50% 60% at 85% 20%, rgba(46, 123, 240, .35), transparent 70%),
  radial-gradient(40% 50% at 0% 100%, rgba(255, 201, 60, .08), transparent 70%), var(--night); }
.ticks-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.ticks-list li { position: relative; padding-left: 32px; color: var(--ink-2); }
.ticks-list li::before { content: ''; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--spark) 22%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%23FFC93C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }
.e2e { display: grid; grid-template-columns: 1fr; gap: 0; justify-items: center; max-width: 420px; margin: 0 auto; width: 100%; }
.node { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 18px; border-radius: 22px; background: var(--night-2); box-shadow: inset 0 0 0 1px var(--night-line); text-align: center; }
.node b { font-family: var(--display); font-weight: 500; }
.node code { font: 500 14px/1.4 var(--mono); padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); color: #fff; }
.node.srv { width: 78%; background: transparent; box-shadow: inset 0 0 0 1px var(--night-line); }
.node.srv code { color: var(--spark); letter-spacing: .04em; }
.pipe { position: relative; width: 2px; height: 64px; background: linear-gradient(var(--night-line), var(--blue), var(--night-line)); }
.lock-pkt { position: absolute; left: 50%; top: 0; width: 30px; height: 30px; margin-left: -15px; border-radius: 10px; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 0 22px rgba(46, 123, 240, .8); }
.lock-pkt svg { width: 16px; height: 16px; }
.secure.in .lock-pkt { animation: travel 2.4s var(--ease) infinite; }
.secure.in .lock-pkt.d2 { animation-delay: 1.2s; }
@keyframes travel { 0% { top: -10px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 50px; opacity: 0; } }

/* ---------- код ---------- */
.devs { padding: clamp(56px, 8vw, 110px) 0; }
.code-card, .term { border-radius: 22px; background: var(--night); color: #D6E2F7; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.code-top { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--night-line); }
.code-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--night-line); }
.code-top i:first-child { background: #FF6B6B; } .code-top i:nth-child(2) { background: var(--spark); } .code-top i:nth-child(3) { background: #2FA866; }
.code-top span { margin-left: 10px; font: 13px var(--mono); color: #8696B5; }
.code-card pre, .term pre { margin: 0; padding: 20px; overflow-x: auto; font: 14px/1.7 var(--mono); }
.code-card .k { color: #8FB8FF; } .code-card .s { color: #FFD88A; } .code-card .f { color: #7FE0B5; }
.term .p { color: var(--spark); } .term .o { color: #7FE0B5; }
.cur { display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: #D6E2F7; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- финальный призыв ---------- */
.outro { padding: clamp(48px, 8vw, 100px) var(--gutter) clamp(64px, 9vw, 120px); }
.outro-in { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 7vw, 90px) clamp(20px, 5vw, 80px); border-radius: clamp(28px, 4vw, 48px); text-align: center; overflow: hidden; isolation: isolate;
  background: linear-gradient(140deg, #3B8BFF, #1D5BD0 60%, #16409A); color: #fff; }
.outro-in::before { content: ''; position: absolute; width: 520px; height: 520px; right: -140px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%); z-index: -1; }
.outro h2 { font-size: clamp(32px, 5.4vw, 68px); max-width: 12em; margin: 18px auto .4em; }
.outro p { color: rgba(255, 255, 255, .85); margin: 0 auto; }
.outro .cta-row { justify-content: center; }
.outro .btn { --bg: #fff; --fg: var(--blue-deep); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.outro .btn:hover { background: var(--spark); }
.outro .btn.ghost { --bg: transparent; --fg: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.outro .btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.outro-mark .mark { width: 72px; height: 72px; margin: 0 auto; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .3)); }
.outro.in .outro-mark .mark { animation: bob 3.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--line); background: var(--paper); }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--gutter) 32px; display: grid; gap: 40px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1fr 1.6fr; } }
.foot-brand p { color: var(--mist); max-width: 30ch; margin-top: 16px; font-size: 15px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; }
.foot-cols h2 { font: 600 14px/1.3 var(--text); letter-spacing: 0; color: var(--mist); margin-bottom: 12px; }
.foot-cols a { display: block; padding: 4px 0; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.foot-cols a:hover { color: var(--blue); }
.foot-base { max-width: var(--maxw); margin: 0 auto; padding: 18px var(--gutter) 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--mist); font-size: 14px; border-top: 1px solid var(--line); }

/* ---------- внутренние страницы ---------- */
.page-hero { padding: clamp(36px, 7vw, 96px) 0 clamp(32px, 5vw, 64px); position: relative; isolation: isolate; }
.page-hero::before { content: ''; position: absolute; inset: -120px 0 0; z-index: -1; background: radial-gradient(40% 60% at 85% 10%, color-mix(in srgb, var(--sky) 45%, transparent), transparent 70%); }
.page-hero h1 { font-size: clamp(38px, 6.6vw, 84px); line-height: .98; letter-spacing: -.04em; font-weight: 700; max-width: 13em; margin-bottom: 24px; }
.page-hero .lead { max-width: 38em; }
.js .page-hero h1, .js .page-hero .lead, .js .page-hero .cta-row { animation: fade .8s var(--ease) both; }
.js .page-hero .lead { animation-delay: .12s; } .js .page-hero .cta-row { animation-delay: .2s; }
.page-hero.dark { color: #fff; margin-top: -72px; padding-top: calc(72px + clamp(36px, 7vw, 96px)); background:
  radial-gradient(50% 70% at 90% 0%, rgba(46, 123, 240, .45), transparent 70%), var(--night); }
.page-hero.dark::before { display: none; }
.page-hero.dark .lead { color: #B6C3DC; }

.anchors { position: sticky; top: 70px; z-index: 10; padding: 10px 0; background: color-mix(in srgb, var(--ice) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.anchors .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.anchors .wrap::-webkit-scrollbar { display: none; }
.anchors a { flex-shrink: 0; padding: 8px 14px; border-radius: 99px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background-color .2s, color .2s; }
.anchors a:hover { background: var(--paper); }
.anchors a.on { background: var(--ink); color: var(--ice); }

.block { padding: clamp(48px, 7vw, 96px) 0; border-bottom: 1px solid var(--line); }
.block:last-of-type { border-bottom: 0; }
.block-head { display: grid; gap: 12px 60px; margin-bottom: 36px; }
@media (min-width: 900px) { .block-head { grid-template-columns: 1fr 1fr; align-items: end; } }
.block-head h2 { margin: 0; }
.block-head p { margin: 0; font-size: 18px; }
.grid-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-radius: 24px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.grid-list li { padding: 22px 22px 24px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.grid-list b { display: block; font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.grid-list span { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.dark .grid-list { background: var(--night-2); box-shadow: 0 0 0 1px var(--night-line); }
.dark.block { border-color: var(--night-line); }

/* ---------- приложения ---------- */
.mine { margin-top: 36px; display: grid; gap: 20px; align-items: center; padding: clamp(22px, 4vw, 36px); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
@media (min-width: 760px) { .mine { grid-template-columns: auto 1fr auto; } }
.mine .os { width: 56px; height: 56px; color: var(--blue); }
.mine h2 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 4px; }
.mine p { margin: 0; }
.mine .cta-row { margin: 0; }
.plat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.plat { display: grid; gap: 16px 28px; padding: 26px; border-radius: 24px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); scroll-margin-top: 100px; transition: box-shadow .3s; }
.plat:target, .plat.current { box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
@media (min-width: 860px) { .plat { grid-template-columns: 64px 1fr auto; align-items: center; } }
.plat .os { width: 44px; height: 44px; color: var(--ink); }
.plat h3 { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.plat p { margin: 0; color: var(--mist); font-size: 15px; }
.plat .files { display: flex; flex-wrap: wrap; gap: 8px; }
.plat .btn small { font-weight: 400; opacity: .75; }
.soon { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 99px; background: var(--ice); color: var(--mist); font-size: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { counter-increment: s; position: relative; padding: 24px; border-radius: 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font: 600 15px var(--display); }
.steps b { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- разработчикам ---------- */
.dev-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .dev-grid { grid-template-columns: 1fr 1fr; } }
.dev-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 26px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); text-decoration: none; transition: transform .35s var(--spring), box-shadow .3s; min-width: 0; }
.dev-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--sky), var(--shadow); }
.dev-card h3 { font-size: 24px; font-weight: 600; }
.dev-card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.dev-card pre { margin: auto 0 0; padding: 14px 16px; border-radius: 14px; background: var(--night); color: #D6E2F7; font: 13px/1.6 var(--mono); overflow-x: auto; }
.dev-card .more { margin-top: 4px; font-weight: 600; color: var(--blue); }

/* ---------- вопросы и ответы ---------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 20px; padding: 24px 4px; font: 500 clamp(18px, 2vw, 22px)/1.3 var(--display); letter-spacing: -.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ''; flex-shrink: 0; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12' stroke='%232E7BF0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat; box-shadow: 0 0 0 1px var(--line); transition: transform .35s var(--spring), background-color .2s; }
.qa[open] summary::after { transform: rotate(45deg); background-color: var(--blue-soft); }
.qa summary:hover { color: var(--blue); }
.qa .ans { overflow: hidden; }
.qa .ans > div { padding: 0 60px 26px 4px; color: var(--ink-2); }
.qa .ans p:last-child { margin-bottom: 0; }

/* ---------- текст документов ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 2.8vw, 32px); margin: 2em 0 .6em; scroll-margin-top: 96px; }
.prose h3 { font-size: 20px; margin: 1.8em 0 .5em; scroll-margin-top: 96px; }
.prose h4 { font: 600 17px var(--text); margin: 1.5em 0 .5em; }
.prose p, .prose li { color: var(--ink-2); max-width: none; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose b, .prose strong { color: var(--ink); font-weight: 600; }
.prose code { font: 500 .86em/1.4 var(--mono); padding: .14em .42em; border-radius: 7px; background: var(--blue-soft); color: var(--ink); overflow-wrap: anywhere; }
.prose pre { position: relative; margin: 1.4em 0; padding: 18px 20px; border-radius: 18px; background: var(--night); color: #D6E2F7; overflow-x: auto; font: 14px/1.65 var(--mono); }
.prose pre code { background: none; padding: 0; color: inherit; font: inherit; overflow-wrap: normal; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; right: 54px; top: 10px; font: 12px var(--mono); color: #8696B5; }
.copy { position: absolute; right: 10px; top: 8px; height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .08); color: #D6E2F7; font: 500 12px var(--text); cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s; }
.prose pre:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { background: rgba(255, 255, 255, .16); }
.copy.done { background: #2FA866; opacity: 1; }
.prose .tbl { margin: 1.4em 0; overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.prose td code, .prose th code { white-space: nowrap; overflow-wrap: normal; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--paper); font-weight: 600; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td { background: color-mix(in srgb, var(--paper) 50%, transparent); }
.prose blockquote { margin: 1.4em 0; padding: 16px 20px 16px 52px; border-radius: 16px; background: var(--blue-soft); position: relative; }
.prose blockquote::before { content: 'i'; position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font: 700 14px/1 var(--display); }
.prose blockquote p { margin: 0; color: var(--ink); }
.prose > :first-child { margin-top: 0; }

.legal { display: grid; gap: 48px; padding-bottom: 96px; }
@media (min-width: 1000px) { .legal { grid-template-columns: 1fr 240px; } }

/* ---------- документация ---------- */
.docs { max-width: 1400px; margin: 0 auto; padding: 24px var(--gutter) 96px; display: grid; gap: 40px; }
@media (min-width: 900px) { .docs { grid-template-columns: 250px minmax(0, 1fr); } }
@media (min-width: 1240px) { .docs { grid-template-columns: 250px minmax(0, 1fr) 220px; } }
.dside { position: relative; }
.dside-in { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 24px; scrollbar-width: thin; }
.dsearch { position: relative; margin-bottom: 20px; }
.dsearch input { width: 100%; height: 42px; padding: 0 14px 0 38px; border-radius: 12px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font: 15px var(--text); }
.dsearch input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.dsearch svg { position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; color: var(--mist); }
.dres { position: absolute; left: 0; right: 0; top: 48px; z-index: 20; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); max-height: 60vh; overflow-y: auto; }
.dres[hidden] { display: none; }
.dres a { display: block; padding: 8px 10px; border-radius: 9px; text-decoration: none; font-size: 14px; }
.dres a small { display: block; color: var(--mist); font-size: 12px; }
.dres a:hover, .dres a.sel { background: var(--blue-soft); }
.dres .none { padding: 10px; color: var(--mist); font-size: 14px; }
.dgroup { margin-bottom: 22px; }
.dgroup h2 { font: 600 13px/1.3 var(--text); letter-spacing: 0; color: var(--mist); margin: 0 0 6px 10px; }
.dgroup a { display: block; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: 15px; transition: background-color .2s, color .2s; }
.dgroup a:hover { background: var(--paper); color: var(--ink); }
.dgroup a[aria-current] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.dmobile { display: none; }
@media (max-width: 899px) {
  .dside-in { position: static; max-height: none; }
  .dnav { display: none; }
  .dside.open .dnav { display: block; }
  .dmobile { display: flex; width: 100%; height: 44px; align-items: center; justify-content: space-between; padding: 0 14px; border: 0; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font: 500 15px var(--text); margin-bottom: 12px; cursor: pointer; }
  .dmobile::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .3s; }
  .dside.open .dmobile::after { transform: rotate(-135deg); }
}
.darticle { min-width: 0; }
.darticle .crumbs { font-size: 14px; color: var(--mist); margin-bottom: 10px; }
.darticle .crumbs a { text-decoration: none; }
.darticle .crumbs a:hover { color: var(--blue); }
.darticle h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 28px; font-weight: 700; }
.dpager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; max-width: 760px; }
.dpager a { display: block; padding: 18px 20px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); text-decoration: none; transition: box-shadow .25s, transform .3s var(--spring); }
.dpager a:hover { box-shadow: 0 0 0 1.5px var(--blue); transform: translateY(-2px); }
.dpager small { display: block; color: var(--mist); font-size: 13px; }
.dpager b { font: 500 17px var(--display); }
.dpager .next { text-align: right; grid-column: 2; }
.dtoc { display: none; }
@media (min-width: 1240px) { .dtoc { display: block; } }
.dtoc-in { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow-y: auto; }
.dtoc h2, .toc-title { font: 600 13px/1.3 var(--text); letter-spacing: 0; color: var(--mist); margin: 0 0 10px; }
.dtoc a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); text-decoration: none; color: var(--mist); font-size: 14px; line-height: 1.35; transition: color .2s, border-color .2s; }
.dtoc a.l3 { padding-left: 24px; font-size: 13px; }
.dtoc a:hover { color: var(--ink); }
.dtoc a.on { color: var(--blue); border-color: var(--blue); }

/* ---------- 404 ---------- */
.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px var(--gutter); }
.lost .big { font: 700 clamp(90px, 20vw, 220px)/.9 var(--display); letter-spacing: -.06em; color: var(--blue); }
.lost .big i { color: var(--spark); font-style: normal; }
.lost .cta-row { justify-content: center; }

/* ---------- полосы прокрутки и индикатор чтения ---------- */
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--blue) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 99px; border: 3px solid transparent; background: color-mix(in srgb, var(--blue) 40%, transparent) padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--blue) padding-box; border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
.code-card, .term, .prose pre, .dev-card pre, .dark { scrollbar-color: rgba(169, 204, 255, .35) transparent; }
.code-card ::-webkit-scrollbar-thumb, .term ::-webkit-scrollbar-thumb, .prose pre::-webkit-scrollbar-thumb, .dev-card pre::-webkit-scrollbar-thumb { background: rgba(169, 204, 255, .3) padding-box; }
.anchors .wrap, .dres, .dside-in, .dtoc-in { scrollbar-width: none; }
.dside-in::-webkit-scrollbar, .dtoc-in::-webkit-scrollbar { width: 0; }
.dside-in:hover, .dtoc-in:hover { scrollbar-width: thin; }
.dside-in:hover::-webkit-scrollbar, .dtoc-in:hover::-webkit-scrollbar { width: 6px; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: 0 3px 3px 0; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.progress i::after { content: ''; position: absolute; right: -4px; top: -2.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--spark); box-shadow: 0 0 10px var(--spark); }
.top.scrolled .progress { opacity: 1; }
.top.open .progress { opacity: 0; }

/* ---------- публичные ссылки: /username, /s/username, /+код ---------- */
.tme { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: clamp(28px, 6vw, 72px) 16px; }
.tme-card { width: min(440px, 100%); display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 28px 28px; border-radius: 32px;
  background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.tme-ava { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; margin-bottom: 10px;
  color: #fff; font: 600 44px/1 var(--display); box-shadow: 0 10px 30px -12px rgba(29, 91, 208, .45); }
.tme-ava-lost { background: var(--ice); color: var(--mist); box-shadow: inset 0 0 0 1px var(--line); }
.tme-ava-s { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font: 600 13px/1 var(--display); flex-shrink: 0; }
.c0 { background: linear-gradient(135deg, #FF8A80, #E35D6A); } .c1 { background: linear-gradient(135deg, #8FD97A, #4BAF5A); }
.c2 { background: linear-gradient(135deg, #FFC46B, #E9963C); } .c3 { background: linear-gradient(135deg, #7CC4FF, #3E8DE0); }
.c4 { background: linear-gradient(135deg, #B9A6FF, #8A6BE6); } .c5 { background: linear-gradient(135deg, #FF9BC8, #E35A9D); }
.c6 { background: linear-gradient(135deg, #7FDCDD, #3BB3B5); } .c7 { background: linear-gradient(135deg, #FFB98A, #F0874E); }
.tme-title { font-size: clamp(22px, 5vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
.tme-user { margin: 0; color: var(--blue); font-weight: 600; }
.tme-sub { margin: 0; color: var(--mist); font-size: 15px; }
.tme-about { margin: 10px 0 0; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; max-width: 36ch; }
.tme-actions { display: grid; gap: 10px; width: 100%; margin-top: 22px; }
.tme-actions .btn { width: 100%; justify-content: center; }
.tme-preview { margin-top: 12px; font-weight: 600; color: var(--blue); text-decoration: none; }
.tme-preview:hover { text-decoration: underline; }
.tme-get { margin: 18px 0 0; font-size: 14px; color: var(--mist); }
.tme-get a { color: var(--blue); }
.tme-post { width: 100%; text-align: left; margin: -8px 0 22px; padding: 14px 16px 10px; border-radius: 20px; background: var(--ice); box-shadow: inset 0 0 0 1px var(--line); }
.tme-post header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tme-photo { display: block; width: calc(100% + 32px); max-height: 460px; object-fit: cover; margin: 0 -16px 10px; }
.tme-post header + .tme-photo { margin-top: 0; }
.tme-text { color: var(--ink); line-height: 1.55; overflow-wrap: anywhere; }
.tme-text a { color: var(--blue); }
.tme-text pre { white-space: pre-wrap; padding: 10px 12px; border-radius: 10px; background: var(--paper); font: 14px/1.5 var(--mono); }
.tme-text code { font: .9em var(--mono); padding: .1em .35em; border-radius: 6px; background: var(--paper); }
.tme-text blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--blue); }
.tme-text .spoiler { background: var(--ink-2); color: transparent; border-radius: 4px; cursor: pointer; transition: color .2s, background-color .2s; }
.tme-text .spoiler:hover { background: transparent; color: inherit; }
.tme-media { margin: 0 0 6px; color: var(--mist); font-weight: 600; }
.tme-post footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--mist); }
.tme-post footer a { color: inherit; text-decoration: none; }
.tme-post footer a:hover { text-decoration: underline; }
.tme-feed { width: min(1080px, 100% - 32px); margin: clamp(24px, 4vw, 48px) auto; display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .tme-feed { grid-template-columns: 320px 1fr; } .tme-side { position: sticky; top: 96px; } }
.tme-side { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 22px; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.tme-side .tme-ava { width: 96px; height: 96px; font-size: 38px; }
.tme-posts { display: grid; gap: 14px; max-width: 640px; }
.tme-posts .tme-post { margin: 0; background: var(--paper); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.tme-posts .tme-photo { margin-top: -14px; }
.tme-empty { color: var(--mist); text-align: center; padding: 40px 0; }

/* ---------- переходы между страницами и уменьшение движения ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .win { transform: none; }
  .js .stage [data-step] { opacity: 1; transform: none; }
  .js .stage [data-typing] { display: none; }
  .wire .packet { display: none; }
}
@media print { .top, .foot, .outro, .dside, .dtoc { display: none; } body { background: #fff; } }
