@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("/_p/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("/_p/fonts/manrope-latin.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: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/_p/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/_p/fonts/inter-latin.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: #0c0c0c;
  --surface: #141414;
  --elevated: #1c1c1c;
  --line: rgba(255,255,255, .07);
  --line-strong: rgba(255,255,255, .12);
  --text: #f0f0f0;
  --text-2: #939393;
  --text-3: #616161;
  --indigo: #6f6f6f;
  --indigo-soft: #919191;
  --cyan: #afafaf;
  --ok: #9b9b9b;
  --warn: #a6a6a6;
  --bad: #686868;
  --grad: linear-gradient(135deg, #6f6f6f 0%, #afafaf 100%);
  --r-card: 20px;
  --r-btn: 14px;
  --display: "Manrope", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }
@keyframes pulse { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 0; transform: scale(2.4); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding: 0 16px env(safe-area-inset-bottom);
  overflow-x: hidden;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }

/* Фоновое свечение — как glow-тени кабинета, только на всю страницу */
.glow {
  position: fixed; inset: -20vh -20vw auto; height: 70vh; pointer-events: none; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 30%, rgba(111,111,111, .22), transparent 70%),
    radial-gradient(35% 45% at 75% 20%, rgba(175,175,175, .12), transparent 70%);
  filter: blur(10px);
}

/* Шапка */
.top { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 18px 0 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 18px/1 var(--display); letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.top-help { font: 600 13px/1 var(--display); color: var(--text-2); text-decoration: none; padding: 9px 14px; border-radius: 100px; border: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.top-help:hover { color: var(--text); border-color: rgba(255,255,255, .25); }

/* Сетка: телефон — колонка, компьютер — две колонки */
.layout { max-width: 1040px; margin: 0 auto; padding: 8px 0 24px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .layout { grid-template-columns: 380px minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 28px; }
  .col-status { position: sticky; top: 24px; }
}
.col-status, .col-connect { min-width: 0; animation: rise .45s ease-out both; }
.col-connect { animation-delay: .08s; }

/* === Подпись страницы: карточка статуса с бегущей градиентной рамкой (как в Mini App) === */
.status-wrap {
  --c1: var(--indigo); --c2: var(--cyan);
  padding: 1.5px; border-radius: 22px;
  background: conic-gradient(from var(--angle), var(--c1), var(--c2), var(--c1), var(--c2), var(--c1));
  animation: spin 5s linear infinite;
  box-shadow: 0 0 40px rgba(111,111,111, .22), 0 0 90px rgba(175,175,175, .07);
}
.status-wrap[data-state="warn"] { --c1: #a6a6a6; --c2: #e4e4e4; box-shadow: 0 0 40px rgba(166,166,166, .22); }
.status-wrap[data-state="bad"], .status-wrap[data-state="missing"] { background: var(--bad); animation: none; box-shadow: 0 0 40px rgba(104,104,104, .2); }
.status-wrap[data-state="loading"] { background: linear-gradient(90deg, #1e1e1e, #2f2f2f, #1e1e1e); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; box-shadow: none; }
.status-card { background: var(--surface); border-radius: 20px; padding: 24px; }

.status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2s ease-in-out infinite; }
[data-state="ok"] .dot { background: var(--ok); }
[data-state="warn"] .dot { background: var(--warn); }
[data-state="bad"] .dot, [data-state="missing"] .dot { background: var(--bad); }
[data-state="loading"] .dot::after { animation: none; }
.status-label { font: 700 11.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
[data-state="ok"] .status-label { color: var(--ok); }
[data-state="warn"] .status-label { color: var(--warn); }
[data-state="bad"] .status-label, [data-state="missing"] .status-label { color: var(--bad); }

.counter { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.counter-num {
  font: 800 76px/.86 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-state="warn"] .counter-num { background: linear-gradient(135deg, #a6a6a6, #e4e4e4); -webkit-background-clip: text; background-clip: text; }
.counter-num.is-word { font-size: 44px; letter-spacing: -.02em; }
.counter-side { display: flex; flex-direction: column; padding-bottom: 6px; }
.counter-unit { font: 700 19px/1.15 var(--display); }
.counter-note { color: var(--text-2); font-size: 13.5px; }
.status-msg { margin: 0 0 18px; color: var(--text-2); }

.facts { margin: 0 0 20px; display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--text-2); font-size: 13.5px; }
.facts dd { margin: 0; font-weight: 500; font-size: 13.5px; text-align: right; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 0 18px; border-radius: var(--r-btn); border: 0; cursor: pointer;
  font: 700 15px/1 var(--display); text-decoration: none; color: #ffffff;
  transition: transform .15s ease, filter .2s, background-color .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad); box-shadow: 0 8px 28px rgba(111,111,111, .32); position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255, .22) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 3.2s ease-in-out infinite; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary img { width: 26px; height: 26px; border-radius: 7px; position: relative; z-index: 1; }
.btn-primary span { position: relative; z-index: 1; }
.btn-incy { background: linear-gradient(135deg, #8e8e8e, #afafaf); box-shadow: 0 8px 28px rgba(142,142,142, .28); }
.btn-soft { background: rgba(111,111,111, .12); border: 1px solid rgba(111,111,111, .32); color: var(--indigo-soft); }
.btn-soft:hover { background: rgba(111,111,111, .18); }
[data-state="bad"] .btn-soft, [data-state="missing"] .btn-soft { background: var(--grad); border: 0; color: #ffffff; }
.btn-ghost { width: auto; min-height: 42px; background: var(--elevated); border: 1px solid var(--line-strong); color: var(--text); font-size: 13.5px; }
.btn-ghost:hover { border-color: rgba(255,255,255, .25); }
.store {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; border-radius: 14px; text-decoration: none;
  background: rgba(255,255,255, .035); border: 1px solid var(--line); transition: border-color .2s, background-color .2s;
}
.store:hover { border-color: var(--line-strong); background: rgba(255,255,255, .06); }
.store b { font: 600 14px/1.25 var(--display); }
.store small { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.store i { font-style: normal; color: var(--text-2); font-size: 16px; }

/* QR для компьютера */
.qr-card { margin-top: 18px; display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.qr { flex: none; width: 112px; height: 112px; padding: 8px; border-radius: 14px; background: #ffffff; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-title { margin: 0 0 4px; font: 700 15px/1.3 var(--display); }
.qr-text { margin: 0; color: var(--text-2); font-size: 13px; }

/* Подключение */
.section-title { margin: 6px 0 14px; font: 800 24px/1.15 var(--display); letter-spacing: -.02em; }
@media (min-width: 900px) { .section-title { font-size: 30px; margin-top: 0; } }

.devices { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; scroll-padding: 0 16px; scroll-snap-type: x proximity; }
.devices::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .devices { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; } }
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 15px; border-radius: 100px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  font: 600 13.5px/1 var(--display); transition: color .2s, border-color .2s, background-color .2s;
}
.chip svg { width: 16px; height: 16px; fill: currentColor; }
.chip:hover { color: var(--text); }
.chip[aria-selected="true"] { color: #ffffff; border-color: transparent; background: linear-gradient(var(--elevated), var(--elevated)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.detected { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); }
.detected b { color: var(--text-2); font-weight: 500; }

.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin-top: 20px; padding: 5px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.app-tab {
  display: flex; align-items: center; justify-content: center; gap: 9px; height: 46px; border-radius: 12px; cursor: pointer;
  border: 0; background: transparent; color: var(--text-2); font: 700 14.5px/1 var(--display); transition: background-color .2s, color .2s;
}
.app-tab img { width: 24px; height: 24px; border-radius: 6px; }
.app-tab[aria-selected="true"] { background: var(--elevated); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.app-tab .tag { font: 700 10px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); padding: 4px 6px; border-radius: 6px; background: rgba(175,175,175, .1); }
.app-hint { margin: 10px 2px 0; min-height: 1em; font-size: 13px; color: var(--text-2); }

/* Шаги — настоящая последовательность, поэтому нумеруем */
.steps { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: step; }
.step { position: relative; padding: 0 0 26px 50px; counter-increment: step; animation: rise .35s ease-out both; }
.step:nth-child(2) { animation-delay: .05s; } .step:nth-child(3) { animation-delay: .1s; }
.step::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 800 14px/1 var(--display); color: #ffffff; background: var(--grad);
  box-shadow: 0 0 0 5px var(--bg);
}
.step:not(:last-child)::after { content: ""; position: absolute; left: 15.5px; top: 38px; bottom: 6px; width: 1px; background: linear-gradient(var(--line-strong), transparent); }
.step h3 { margin: 4px 0 6px; font: 700 17px/1.3 var(--display); }
.step p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; }
.step p:last-child { margin-bottom: 0; }
.step .stack { display: grid; gap: 8px; }
.note { margin-top: 10px !important; padding: 10px 12px; border-radius: 12px; font-size: 13px !important; background: rgba(166,166,166, .08); border: 1px solid rgba(166,166,166, .22); color: #d7d7d7 !important; }

/* Запасной путь */
.fallback { margin-top: 4px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.fallback summary { list-style: none; cursor: pointer; padding: 16px 18px; font: 700 14.5px/1.3 var(--display); display: flex; justify-content: space-between; align-items: center; }
.fallback summary::-webkit-details-marker { display: none; }
.fallback summary::after { content: "+"; font-size: 20px; color: var(--text-2); transition: transform .2s; }
.fallback[open] summary::after { transform: rotate(45deg); }
.fallback > p, .fallback .link-row { margin: 0 18px 12px; }
.fallback > p { color: var(--text-2); font-size: 13.5px; }
.link-row { display: flex; gap: 8px; align-items: center; }
.link { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font: 500 12.5px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn { font-size: 12.5px !important; color: var(--text-3) !important; padding-bottom: 6px; }

.foot { max-width: 1040px; margin: 0 auto; padding: 18px 0 30px; display: flex; gap: 10px; justify-content: center; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 100px; background: var(--elevated); border: 1px solid var(--line-strong); font: 600 13.5px/1 var(--display); transition: opacity .25s, transform .25s; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* === Страница-переходник «Открыть в приложении» (go.html: /connect и /incy/<код>) === */
.go-main { max-width: 460px; margin: 0 auto; padding: 18px 0 36px; display: grid; gap: 22px; animation: rise .45s ease-out both; }
.go-card { text-align: center; padding: 32px 24px 24px; }
.go-icon { position: relative; width: 76px; height: 76px; margin: 0 auto 18px; }
.go-icon img { position: relative; z-index: 1; width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0, .45); }
.go-icon::before { content: ""; position: absolute; inset: -8px; border-radius: 26px; background: var(--grad); opacity: .35; filter: blur(14px); animation: pulse-soft 2.4s ease-in-out infinite; }
@keyframes pulse-soft { 0%, 100% { opacity: .25; transform: scale(.96); } 50% { opacity: .55; transform: scale(1.04); } }
[data-state="bad"] .go-icon::before { background: var(--bad); }
.go-title { margin: 0 0 8px; font: 800 26px/1.15 var(--display); letter-spacing: -.02em; }
.go-text { margin: 0 0 20px; color: var(--text-2); font-size: 14.5px; }
.go-card .go-text:last-child { margin-bottom: 0; }
.go-h2 { margin: 0 0 6px; font: 800 19px/1.25 var(--display); }
.go-install { padding: 20px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); animation: rise .35s ease-out both; }
.go-install .go-text { margin-bottom: 12px; font-size: 14px; }
.go-install .detected { margin: 0 0 12px; }
.stack { display: grid; gap: 8px; }
.go-links { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; font-size: 13.5px; color: var(--text-3); }
.go-links a { color: var(--text-2); text-decoration: none; }
.go-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.ios-help { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: #b7b7b7; font: 500 12.5px/1.45 var(--body); text-decoration: none; }
.ios-help:hover { color: #d4d4d4; }
.ios-help svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ios-help .arrow { color: #909090; }

:root { --bg: #101113; --surface: #1b1c1e; --elevated: #252629; --text: #fbfbf9; --text-2: #c1c1c0; --text-3: #a4a4a2; --indigo: #dededc; --indigo-soft: #dadad8; --cyan: #c6c6c4; --grad: linear-gradient(130deg,#f5f5f3,#a7a7a5); --ok: #d3ddce; --warn: #e8d5b3; --bad: #e2c6c3; }
.brand { color: #f4f4f1; }
.status-wrap { background: linear-gradient(145deg,#8e8f91,#393a3d 25%,#565759 72%,#a7a8aa); }
.btn-primary, .btn-main { color: #101113; }
