/* Кабинет — общий макет для всех клиентов: светлое и тёмное «стекло».
   Тема — как в системе или выбранная в профиле (data-theme на <html>).
   Бренд меняет только переменные: цвет акцента — из brand.json
   (accent_color, задаёт страница), остальное — assets/brand.css клиента.
   Телефон: меню снизу. От 1024 px: меню слева, содержимое до 1180 px. */

@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../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: 200 800; font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../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;
}

/* Темы — через :where(), то есть без веса: цвет бренда (:root в странице и
   assets/brand.css клиента) перекрывает их в обеих темах. Раньше тёмная тема
   (:root:not(…) — вес двух селекторов) затирала золотое свечение F5 */
:where(:root) {
  /* Светлая тема: белое стекло на светло-сером, текст почти чёрный */
  --bg: #e7e9ec;
  --blob-1: #ffffff;
  --blob-2: #c3c8cf;
  --glass: rgba(255, 255, 255, .55);
  --glass-hi: rgba(255, 255, 255, .78);
  --glass-line: rgba(255, 255, 255, .92);
  --hair: rgba(18, 20, 23, .09);
  --ink: #121417;
  --ink-2: #454b53;
  --ink-3: #646a72;
  --cta-bg: #121417;
  --cta-ink: #ffffff;
  --ok: #157a44;
  --warn: #9a5b00;
  --bad: #b8352b;
  --shadow: 0 28px 56px -34px rgba(18, 20, 23, .38);
  /* Акцент по умолчанию — сам текст: без цвета бренда кабинет чёрно-белый */
  --accent: var(--ink);
  --on-accent: var(--cta-ink);
  --accent-glow: rgba(18, 20, 23, .10);
  --radius-card: 30px;
  --radius-tile: 22px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Тёмная тема: дымчатое стекло на почти чёрном */
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) {
    --bg: #090a0c; --blob-1: #2a2d33; --blob-2: #15171b;
    --glass: rgba(36, 39, 45, .50); --glass-hi: rgba(48, 52, 59, .70); --glass-line: rgba(255, 255, 255, .09);
    --hair: rgba(255, 255, 255, .09); --ink: #f1f2f4; --ink-2: #bcc1c8; --ink-3: #959ba4;
    --cta-bg: #f1f2f4; --cta-ink: #0a0b0d; --ok: #45cf80; --warn: #f0b13e; --bad: #ff6b60;
    --shadow: 0 28px 56px -30px rgba(0, 0, 0, .85); --accent-glow: rgba(255, 255, 255, .07);
    color-scheme: dark;
  }
}
:where(:root[data-theme="dark"]) {
  --bg: #090a0c; --blob-1: #2a2d33; --blob-2: #15171b;
  --glass: rgba(36, 39, 45, .50); --glass-hi: rgba(48, 52, 59, .70); --glass-line: rgba(255, 255, 255, .09);
  --hair: rgba(255, 255, 255, .09); --ink: #f1f2f4; --ink-2: #bcc1c8; --ink-3: #959ba4;
  --cta-bg: #f1f2f4; --cta-ink: #0a0b0d; --ok: #45cf80; --warn: #f0b13e; --bad: #ff6b60;
  --shadow: 0 28px 56px -30px rgba(0, 0, 0, .85); --accent-glow: rgba(255, 255, 255, .07);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.4;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
:where(button, input) { font: inherit; color: inherit; }
a { color: inherit; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Фон: размытые пятна под стеклом; третье — свечение цвета бренда */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i { position: absolute; border-radius: 50%; filter: blur(56px); }
.bg i:nth-child(1) { width: 360px; height: 360px; top: -110px; right: -140px; background: var(--blob-2); }
.bg i:nth-child(2) { width: 320px; height: 320px; top: 360px; left: -150px; background: var(--blob-1); }
.bg i:nth-child(3) { width: 280px; height: 280px; top: 150px; left: 90px; background: var(--accent-glow); }

.main { padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(124px + env(safe-area-inset-bottom, 0px)); }
.main.bare { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.page { width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.page.login { max-width: 440px; }

.glass {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-card);
  backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: var(--shadow);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.bar-title { font-size: 16px; font-weight: 650; }
.logo { display: inline-flex; align-items: center; gap: 9px; height: 30px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo svg { height: 30px; width: auto; }
.logo .mark { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--glass-hi); border: 1px solid var(--glass-line); color: var(--ink); text-decoration: none;
}
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm .i { width: 17px; height: 17px; }
.display { margin: 0; font-size: 44px; line-height: 1; font-weight: 300; letter-spacing: -.04em; text-wrap: balance; }
.lead { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.textlink {
  background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--ink-2); text-decoration: none;
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px;
}
.textlink .i { width: 16px; height: 16px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.note-in { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.fine { margin: 0; font-size: 12.5px; color: var(--ink-3); text-align: center; line-height: 1.5; text-wrap: balance; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.pill.muted { color: var(--ink-2); }

.cta, .ghost {
  height: 52px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; font-size: 15px; font-weight: 650; white-space: nowrap; text-decoration: none;
}
.cta { border: 0; background: var(--cta-bg); color: var(--cta-ink); padding: 0 22px 0 6px; }
.cta .dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--cta-ink) 16%, transparent); }
.cta.plain { padding: 0 22px; }
.ghost { border: 1px solid var(--glass-line); background: var(--glass-hi); color: var(--ink); padding: 0 20px; }
.cta.sm, .ghost.sm { height: 42px; font-size: 14px; }
.cta.sm { padding: 0 18px 0 5px; }
.cta.sm .dot { width: 32px; height: 32px; }
.ghost.sm { padding: 0 16px; }
.wide { width: 100%; }
.cta:disabled, .ghost:disabled { opacity: .55; cursor: progress; }

/* Главная */
.home-grid { display: flex; flex-direction: column; gap: 14px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 22px; font-size: 14px; line-height: 1.45; }
.notice.done { color: var(--ok); font-weight: 600; }
.notice.bad { color: var(--bad); }
.spin { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--hair); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero { padding: 20px 20px 18px; display: flex; flex-direction: column; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.big { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.num { font-size: 100px; line-height: .86; font-weight: 200; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.unit { font-size: 21px; font-weight: 400; color: var(--ink-2); }
.hero .sub { margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.hero .text { margin-top: 16px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.ticks { margin-top: 18px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.ticks i { height: 24px; border-radius: 3px; background: var(--hair); }
.ticks i.on { background: var(--accent); }
.meter { margin-top: 18px; height: 10px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.meter b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.bad b { background: var(--bad); }
.meta { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.actions { margin-top: 18px; display: flex; gap: 10px; }
.actions .cta { flex: 1 1 auto; }
.actions .ghost { flex: 0 0 auto; }
.circle {
  width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: var(--glass-hi); border: 1px solid var(--glass-line);
}
.circle .i { width: 22px; height: 22px; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 20px;
  text-decoration: none; background: var(--glass-hi); border: 1px solid var(--glass-line); min-width: 0;
}
.mini .circle { width: 40px; height: 40px; }
.mini b { display: block; font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.mini small { display: none; font-size: 12.5px; color: var(--ink-3); }
.linkrow {
  display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border-radius: 18px;
  background: var(--glass-hi); border: 1px solid var(--glass-line);
}
.linkrow .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px var(--mono); color: var(--ink-2); }

/* Подключение */
.md { display: flex; flex-direction: column; gap: 14px; }
.md.unpicked .detail, .md.picked .dev-list { display: none; }
.dev-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding: 16px; min-height: 148px;
  border-radius: var(--radius-tile); text-decoration: none; min-width: 0;
}
.dev-item .circle { width: 46px; height: 46px; }
.dev-item > span:nth-child(2) { margin-top: auto; min-width: 0; }
.dev-item b { display: block; font-size: 16px; font-weight: 650; }
.dev-item small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.dev-item > .i { display: none; }
.detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.appcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-tile); }
.appicon {
  width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center;
  background: var(--cta-bg); color: var(--cta-ink); font-size: 22px; font-weight: 300;
}
.appcard b { display: block; font-size: 16px; font-weight: 650; }
.appcard small { color: var(--ink-3); font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-tile); }
.step .n {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cta-bg); color: var(--cta-ink); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.step-body p, .rich { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.step-body p:first-child { margin-top: 5px; }
.rich b, .step-body b { font-weight: 700; }
.rich code, .step-body code { font: 500 13px var(--mono); padding: 1px 6px; border-radius: 6px; background: var(--glass-hi); }
.step-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.shot { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-line); }
.shot img { display: block; width: 100%; height: auto; }
.tv-panel { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.tv-nav { display: flex; gap: 8px; }
.tv-nav > * { flex: 1; }
.tv-count { font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* Тарифы */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; width: 100%;
  padding: 18px; border-radius: var(--radius-tile); text-align: left; cursor: pointer;
}
.plan[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); }
.plan b { display: block; font-size: 17px; font-weight: 650; }
.plan small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.plan .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.save {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.bestmark {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--hair); color: var(--ink-2); font-size: 12px; font-weight: 650;
}
.plan .price { font-size: 36px; line-height: 1; font-weight: 300; letter-spacing: -.035em; text-align: right; font-variant-numeric: tabular-nums; }
.plan .per { text-align: right; }
.pay-grid { display: flex; flex-direction: column; gap: 14px; }
.paycol { gap: 10px; }
.paybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; border-radius: 999px; }
.paybar small { display: block; color: var(--ink-3); font-size: 12px; }
.paybar b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.promo-row { display: flex; gap: 8px; }
.promo-row .input { flex: 1; min-width: 0; text-transform: uppercase; }
.promo-row .input::placeholder { text-transform: none; color: var(--ink-3); }
.promo-on { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-on .promo-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); }
.invite-l, .invite-r { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.big.sm { margin-top: 2px; }
.big.sm .num { font-size: 72px; }
.big.sm .unit { font-size: 18px; }
.stat { padding: 12px 14px; border-radius: 18px; background: var(--glass-hi); border: 1px solid var(--glass-line); }
.stat small { display: block; font-size: 12.5px; color: var(--ink-3); }
.stat b { font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; }

/* Профиль */
.prof-grid { display: flex; flex-direction: column; gap: 14px; }
.me { display: flex; align-items: center; gap: 14px; padding: 16px; }
.avatar {
  width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--cta-bg); color: var(--cta-ink); font-size: 22px; font-weight: 400; text-transform: uppercase;
}
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.me b { display: block; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.me small { color: var(--ink-3); font-size: 13px; }
.list { padding: 4px 16px; display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 58px; width: 100%; padding: 0; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--hair); font-size: 15px; text-decoration: none;
}
.row:last-child { border-bottom: 0; }
.row > .i { color: var(--ink-2); }
.row-t { flex: 1; min-width: 0; }
.row-v { color: var(--ink-3); font-size: 14px; min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; min-width: 52px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 650;
  border: 1px solid var(--glass-line); background: var(--glass-hi); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--cta-bg); color: var(--cta-ink); border-color: transparent; }
.logout {
  align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer;
  background: none; border: 0; color: var(--bad); font-size: 15px; font-weight: 650;
}

/* Вход */
.login-hero { margin-top: 56px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--glass-line);
  background: var(--glass-hi); font-size: 16px; font-weight: 500; color: var(--ink);
}
/* Код из письма — шесть ячеек: цифра — и курсор в следующую, вставка — во все сразу */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-cell {
  width: 100%; height: 60px; padding: 0; text-align: center; border-radius: 16px; border: 1px solid var(--glass-line);
  background: var(--glass-hi); color: var(--ink); caret-color: var(--ink);
  font-size: 28px; font-weight: 300; font-variant-numeric: tabular-nums;
}
.otp-cell:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.sent { margin: 0; font-size: 14px; color: var(--ink-2); }
.sent b { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.check a { color: var(--ink); font-weight: 600; }
.tg-widget { display: flex; justify-content: center; min-height: 40px; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 170px; padding: 6px;
  border-radius: 18px; display: flex; flex-direction: column;
}
.lang-list a { padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600; }
.lang-list a[aria-current="true"] { background: var(--cta-bg); color: var(--cta-ink); }

/* Меню: на телефоне — плавающая «таблетка» снизу, у открытого раздела — подпись */
.rail { display: none; }
.tabbar {
  position: fixed; z-index: 10; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  max-width: 524px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; padding: 6px; border-radius: 999px;
  background: var(--glass-hi); border: 1px solid var(--glass-line); box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.tab {
  height: 50px; min-width: 50px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); font-size: 14px; font-weight: 650;
  text-decoration: none;
}
.tab span { display: none; }
.tab[aria-current="page"] { background: var(--cta-bg); color: var(--cta-ink); padding: 0 18px 0 14px; }
.tab[aria-current="page"] span { display: inline; }
.toast {
  position: fixed; z-index: 20; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 10px);
  opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-ink);
  font-size: 14px; font-weight: 650; text-align: center; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #ffffff; }
.topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 26px; }
.intro-block { display: flex; flex-direction: column; gap: 14px; }
.only-desk { display: none; }

/* ── Компьютер: меню слева, содержимое не шире 1180 px, две колонки ── */
@media (min-width: 1024px) {
  .bg i { filter: blur(90px); }
  .bg i:nth-child(1) { width: 760px; height: 760px; top: -260px; right: -180px; }
  .bg i:nth-child(2) { width: 640px; height: 640px; top: 420px; left: -200px; }
  .bg i:nth-child(3) { width: 560px; height: 560px; top: 110px; left: 360px; }
  .tabbar { display: none; }
  .only-phone { display: none !important; }
  .only-desk { display: flex; }
  .rail {
    position: fixed; z-index: 10; top: 20px; bottom: 20px; left: 20px; width: 232px;
    display: flex; flex-direction: column; gap: 30px; padding: 24px 14px 16px; border-radius: 30px;
    background: var(--glass-hi); border: 1px solid var(--glass-line); box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  }
  .rail .logo { padding: 0 10px; }
  .rail-nav { display: flex; flex-direction: column; gap: 4px; }
  .rail .tab { width: 100%; justify-content: flex-start; padding: 0 16px; }
  .rail .tab span { display: inline; }
  .rail-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hair); }
  .main { margin-left: 272px; padding: 32px 40px 48px; }
  .main.bare { margin-left: 0; min-height: 100vh; display: grid; place-items: center; }
  .page { max-width: 1180px; gap: 18px; }
  .page.login { max-width: 440px; }
  .login-hero { margin-top: 0; }
  .col { gap: 18px; }
  .toast { bottom: 36px; }
  .with-nav .toast { left: calc(50% + 136px); }   /* по центру содержимого, правее меню; на входе меню нет */
  .topline { align-items: center; gap: 16px; min-height: 56px; padding-top: 0; }
  .intro-block { gap: 18px; }
  .who {
    display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 6px; border-radius: 999px;
    background: var(--glass-hi); border: 1px solid var(--glass-line); font-size: 14px; font-weight: 600; text-decoration: none;
  }
  /* Главная: подписка слева тянется до низа правой колонки */
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
  .hero { padding: 28px 28px 26px; }
  .num { font-size: 156px; }
  .unit { font-size: 26px; }
  .hero .sub { margin-bottom: 22px; }
  .hero .push { margin-top: auto; }   /* нижний блок карточки — к низу */
  .ticks i { height: 38px; }
  .mini { padding: 14px; gap: 16px; }
  .mini .circle { width: 42px; height: 42px; }
  .mini b { font-size: 14.5px; }
  .mini small { display: block; }
  /* Подключение: список слева, инструкция справа */
  .md { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
  .md.unpicked .detail, .md.picked .dev-list { display: flex; }
  .dev-list { display: flex; flex-direction: column; gap: 10px; }
  .dev-item { flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 12px 16px 12px 12px; }
  .dev-item > span:nth-child(2) { margin-top: 0; flex: 1; }
  .dev-item b { font-size: 15.5px; }
  .dev-item > .i { display: block; color: var(--ink-3); }
  .dev-item[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); }
  /* Тарифы: карточки в ряд, промокод и оплата рядом, приглашение — во всю ширину */
  .plans { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 16px; }
  .plan { display: flex; flex-direction: column; align-items: stretch; min-height: 260px; padding: 24px; }
  .plan .per { margin-top: auto; padding-top: 32px; text-align: left; }
  .plan .price { font-size: 64px; text-align: left; }
  .pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .paybar { padding: 12px 12px 12px 28px; }
  .invite { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 14px 32px; align-items: center; }
  .invite .card-head { grid-column: 1 / -1; }
  .prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; }
  .toast { transition: none; }
}
