/* Кабинет r8, срез «оболочка + обзор» по plan кита (cli-r7):
   layout-app-overview-list-editor · compact-list, nar-app-screen-list: el-segment-capsule → el-list-editor → el-nav-glass.
   Палитра, рама, шкала и поверхности — значениями Trail r29 (r29.css, BREAKDOWN.md), своих цветов нет.
    Холст ровный: лаймовые пятна r29 за рамой владелец не принял (27.10). */
@font-face { font-family: Onest; src: url(../fonts/Onest-subset.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Onest; src: url(../fonts/Onest-cyrillic.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(../fonts/Onest-cyrillic-ext.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0460-052F; }

:root {
  --canvas: #EEF0EC; --frame: #F7F7F5; --panel: #FFFFFF; --band: #F2F3F5; --well: #EFF0F5; --ctl: #F6F7F8; --ctl-hover: #ECEEF2;
  --ink: #111111; --ink2: #696D6F; --ink2-onmuted: #54585B; --line: #EFEFEF;
  --lime: #D2FB4A; --lime-hover: #C4F03A; --lime-ink: #113A02; --blue: #628EF7; --blue-ink: #0C2250;
  --data-fill: rgb(98 142 247 / .12); --data-text: #365CAC;
  --e1: none; /* у r29 .03 — второй вид тени при тени рамы, правило «один вид» */ --frame-shadow: 0 30px 80px rgb(40 50 20 / .08); --scrim: rgb(238 240 236 / .6); --tab-shadow: 0 4px 16px rgb(0 0 0 / .08); --glass: rgb(247 247 245 / .72);
  --r-shell: 28px; --r-sheet: 28px; --r-panel: 18px; --r-card: 18px; --r-row: 8px; --gut: 28px;
  --ease: cubic-bezier(.32, .72, 0, 1); --t-fast: 150ms; --t-open: 420ms; --t-close: 240ms; --t-pad: 320ms;
  --font: Onest, Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) {
  --canvas: #101315; --frame: #16181B; --panel: #1E2125; --band: #282D33; --well: #282D33; --ctl: #282D33; --ctl-hover: #333B45;
  --ink: #F4F5F7; --ink2: #B1B6BD; --ink2-onmuted: #B1B6BD; --line: #343A42; --blue: #7A9DFF; --blue-ink: #102248;
  --data-fill: rgb(122 157 255 / .15); --data-text: #A9BDF4; --frame-shadow: none; --scrim: rgb(0 0 0 / .5); --glass: rgb(22 24 27 / .72); color-scheme: dark;
} }
:root[data-theme=dark] {
  --canvas: #101315; --frame: #16181B; --panel: #1E2125; --band: #282D33; --well: #282D33; --ctl: #282D33; --ctl-hover: #333B45;
  --ink: #F4F5F7; --ink2: #B1B6BD; --ink2-onmuted: #B1B6BD; --line: #343A42; --blue: #7A9DFF; --blue-ink: #102248;
  --data-fill: rgb(122 157 255 / .15); --data-text: #A9BDF4; --frame-shadow: none; --scrim: rgb(0 0 0 / .5); --glass: rgb(22 24 27 / .72); color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lock { overflow: hidden; }
body { background: var(--canvas); color: var(--ink); font: 400 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; padding: 28px 24px; }
a, button { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* рама r29: шапка и страница на одной поверхности #F7F7F5, радиус 40, мягкая тень на холсте */
.app { position: relative; max-width: 1392px; margin: 0 auto; background: var(--frame); border-radius: var(--r-shell); box-shadow: var(--frame-shadow); }
.wrap { padding-left: max(var(--gut), env(safe-area-inset-left, 0px)); padding-right: max(var(--gut), env(safe-area-inset-right, 0px)); }

/* ── el-nav-glass: шапка-капсула; прячется вниз, возвращается вверх, стекло только когда под ней идёт содержимое (r8 smarthead) ── */
.hd { position: sticky; top: 0; z-index: 10; border-radius: var(--r-shell) var(--r-shell) 0 0; transition: transform var(--t-close) var(--ease), background-color var(--t-fast) var(--ease); }
.hd[data-hidden] { transform: translateY(-100%); }
.hd[data-glass] { background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); border-radius: 0; }
.hd__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 96px; }
.logo { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.nav { display: flex; padding: 4px; border-radius: 999px; background: var(--well); }
.nav a { display: inline-flex; align-items: center; height: 40px; padding: 0 15px; border-radius: 999px; color: var(--ink2-onmuted); font-size: 13px; text-decoration: none; transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current=page] { background: var(--lime); color: var(--lime-ink); }
/* тихий счётчик «Входящих»: цифра рядом с названием, в таб-баре — маленькая капсула у значка */
.nb { margin-left: 6px; color: var(--ink2-onmuted); font-size: 12px; font-weight: 400; }
.nav a[aria-current=page] .nb { color: inherit; }
.nb[hidden] { display: none; }
.acct { cursor: pointer; justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 44px; min-width: 44px; padding: 4px; border: 0; border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.acct__av { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); font-size: 16px; }
.acct__n, .acct svg { display: none; }
@media (min-width: 768px) { .acct__n { display: inline; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acct svg { display: block; margin-right: 8px; } .acct { padding-right: 8px; } }
@media (max-width: 767px) { .acct[data-multi] svg { display: block; margin-right: 6px; } }

/* таб-бар на телефоне: стеклянный, строки уходят под него; активная вкладка на лаймовой подложке */
.tabs { display: none; }
@media (max-width: 899px) {
  body { padding: 0; background: var(--frame); }
  .app { border-radius: 0; box-shadow: none; }
  .hd { border-radius: 0; }
  :root { --gut: 16px; }
  .nav { display: none; }
  .hd__in { grid-template-columns: 1fr auto; min-height: 64px; }
  .tabs { position: fixed; z-index: 40; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); box-shadow: var(--tab-shadow); }
  .tabs a { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 56px; padding: 7px 2px 5px; border-radius: 999px; color: var(--ink2-onmuted); font-size: 11px; text-decoration: none; transition: color var(--t-fast) var(--ease); }
  .tabs a[aria-current=page] { color: var(--lime-ink); }
  .tabs .nb { position: absolute; top: 5px; left: calc(50% + 4px); min-width: 16px; height: 16px; margin: 0; padding: 0 4px; border-radius: 8px; background: var(--ink2-onmuted); color: var(--panel); font-size: 11px; line-height: 16px; text-align: center; }
  .tabs .nb[hidden] { display: none; }
  /* подложка переезжает к нажатой вкладке; перелёт ~6 % */
  .tabs[data-none] .tabs__pad { opacity: 0; }
  .tabs__pad { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 999px; background: var(--lime); transform: translateX(calc(var(--k, 0) * 100%)); transition: transform var(--t-pad) cubic-bezier(.34, 1.3, .64, 1), opacity var(--t-fast) var(--ease); }
  .app { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html:has(.ed:not(.flw)) { scroll-padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px)); } /* и над панелью «Сохранить» */ /* поле, выведенное в окно прокруткой или фокусом, не остаётся под плавающим таб-баром */
}

/* ── страница: заголовок r29 28/500, подзаголовок 13 серым ── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 0 12px; }
.head__acts { display: flex; gap: 8px; flex: none; }
h1 { font-weight: 500; font-size: 28px; line-height: 1.2; letter-spacing: -.8px; }
.head > div { min-width: 0; }
.head__sub { margin-top: 5px; color: var(--ink2); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.cta { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--lime); color: var(--lime-ink); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.cta:hover { background: var(--lime-hover); }
.cta svg { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--well); color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.btn:hover { background: var(--ctl-hover); }
.btn--quiet { min-height: 32px; padding: 0 12px; border-color: transparent; font-size: 12px; }
.ib { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); transition: background-color var(--t-fast) var(--ease); }
.ib:hover { background: var(--ctl); }
.ib[data-off] { opacity: .4; cursor: default; }
.ib svg { width: 16px; height: 16px; }
@media (max-width: 599px) { h1 { font-size: 25px; letter-spacing: -.6px; } .head__sub { font-size: 12px; } .cta, .btn { min-height: 44px; } .ib { width: 44px; height: 44px; } }

/* el-segment-capsule: капсула на тоне, активный — белая поверхность (note плана), счётчик серым */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--well); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
/* шесть вариантов и больше на телефоне не прячем за прокруткой: переносим строкой; радиус 22 = капсула при одной строке 44 px */
.seg:has(> :nth-child(6)) { flex-wrap: wrap; border-radius: 22px; }
.seg button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink2-onmuted); font-size: 13px; font-weight: 500; transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--panel); color: var(--ink); box-shadow: var(--e1); }
@media (max-width: 899px) { .seg button { min-height: 44px; } }
.seg .n { display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; color: var(--ink2-onmuted); font-weight: 400; font-variant-numeric: tabular-nums; }
.seg .n > span { display: block; }
.seg .n[data-roll] > span { animation: roll 360ms var(--ease); }
@keyframes roll { from { transform: translateY(100%); } }


/* ── «Обзор» по главной ManyChat: баннер, приветствие, «Начните здесь», «Следующие шаги».
   Скругления как у ManyChat — мелкие: карточки и кнопки 8 px; капсулы только у навигации и переключателя. ── */
.btn, .cta { border-radius: var(--r-row); }
.hello { margin-top: 28px; }
.hello h1 { font-size: clamp(32px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -.045em; }
.hello p { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 8px; font-size: 15px; }
.hello a, .sec__hd a { color: var(--data-text); text-decoration: none; }
.hello a:hover, .sec__hd a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* помощник с итогом дня — вместо промо-баннера: маскот Zidos и реплика с одним действием */
.helper { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 14px 16px 14px 12px; border-radius: var(--r-row); background: var(--panel); border: 1px solid var(--line); }
.helper .mascot { flex: none; width: 64px; height: 64px; }
.helper__b { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.helper__t { font-size: 16px; line-height: 1.45; max-width: 60ch; }
.helper__t b { font-weight: 500; }
.helper .cta { flex: none; }
.helper .cta svg { width: 18px; height: 18px; }
.sec { margin-top: 40px; }
.sec__hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec__hd h2 { font-weight: 500; font-size: 24px; letter-spacing: -.6px; }
.sec__hd a { font-size: 15px; }
.tpls, .moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; }
/* блоки одного ряда одной ширины и высоты (владелец 03:04: «блоки гуляют»); главный сценарий отмечен меткой «Популярно», как у ManyChat */
.moves { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.tpl--main { background: var(--panel); }
.tpl { display: grid; align-content: space-between; gap: 18px; min-height: 104px; padding: 16px 18px; border-radius: var(--r-row); background: var(--panel); border: 1px solid var(--line); text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
.tpl:hover { background: var(--ctl); }
.tpl b { font-weight: 500; font-size: 16px; }
.tpl b em { margin-left: 6px; vertical-align: 2px; font-style: normal; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 4px; background: var(--ink); color: var(--frame); white-space: nowrap; }
/* цепочка сценария: что происходит по шагам — своё вместо «Quick Automation» ManyChat */
.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chain li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink2); }
.chain li:not(:last-child)::after { content: "→"; color: var(--ink2); }
.chain li > *, .chain li { white-space: nowrap; }
.tpl .chain li:first-child { color: var(--ink); }
.tpl:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-row); }
svg.i--s { width: 16px; height: 16px; }
.move { display: grid; align-content: start; gap: 12px; padding: 18px 20px 20px; border-radius: var(--r-row); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.move__k { color: var(--ink2); font-size: 13px; }
.move h3 { margin-top: -6px; font-weight: 500; font-size: 18px; line-height: 1.35; letter-spacing: -.2px; max-width: 34ch; }
.move .btn { justify-self: start; }
/* телефон целиком, без обрезки: обрезанный Instagram читался криво (владелец 03:04) */
.stagebox { position: relative; display: grid; justify-items: center; gap: 12px; padding: 14px 0 20px; border-radius: var(--r-row); background: var(--well); }
.stagebox__ph { min-height: 0; }
/* на широком экране телефон справа от текста: карточка ниже и вровень с чек-листом */
@media (min-width: 1100px) {
  .move[data-element="el-scene-post-dm"] { grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto auto 1fr; column-gap: 20px; }
  .move[data-element="el-scene-post-dm"] .stagebox { grid-column: 2; grid-row: 1 / span 3; }
  .move[data-element="el-scene-post-dm"] .btn { align-self: end; }
}
/* в обрезанной карточке переписка читается сверху, а не прижата к низу */
.stagebox .ig-thread > :first-child { margin-top: 0; }
.seg--sm button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.prog { margin-top: 28px; height: 8px; border-radius: 4px; background: var(--well); overflow: hidden; }
.prog i { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: 4px; background: var(--blue); }
.prog__t { color: var(--ink2); font-size: 13px; }
.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-radius: var(--r-row); border: 1px solid var(--line); background: var(--panel); font-size: 15px; text-decoration: none; transition: background-color var(--t-fast) var(--ease); }
a.step:hover { background: var(--ctl); }
.step > span { flex: 1; min-width: 0; }
.step small { display: block; color: var(--ink2); font-size: 13px; }
.step__o { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink2); }
.step--done { background: var(--ctl); color: var(--ink2-onmuted); }
.step--done svg { flex: none; width: 22px; height: 22px; }
@media (max-width: 1099px) { .tpls { grid-template-columns: minmax(0, 1fr); } .tpl { min-height: 0; gap: 10px; } .moves { grid-template-columns: minmax(0, 1fr); } .moves > * { max-width: 640px; } }
@media (max-width: 599px) {
  .hello__ig { display: none; }
  .helper { align-items: flex-start; }
  .helper__b { flex-direction: column; align-items: flex-start; gap: 10px; }
  .helper .mascot { width: 56px; height: 56px; }
  .hello { margin-top: 24px; }
  .sec { margin-top: 32px; }
  .seg--sm button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hd, .scrim, .sheet, .tabs__pad { transition: opacity 80ms linear; }
  .hd[data-hidden] { transform: none; }
}

/* лист снизу (r8): подложка с размытием, подъём без перелёта, ручка */
.layer { position: fixed; inset: 0; z-index: 50; display: none; }
.layer.on { display: block; }
.scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--panel); border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); transform: translateY(calc(100% + 24px)); transition: transform var(--t-close) var(--ease); will-change: transform; }
.sheet:focus-visible { outline: none; }
.layer.open .scrim { opacity: 1; }
.layer.open .sheet { transform: none; transition-duration: var(--t-open); }
.layer.drag .sheet { transition: none; }
.grab { display: grid; place-items: center; height: 24px; touch-action: none; }
.grab i { width: 40px; height: 5px; border-radius: 3px; background: var(--well); }
.sheet__hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet__hd b { font-weight: 500; font-size: 17px; }
.sheet__hd .ib { width: 44px; height: 44px; border: 0; background: var(--ctl); }
/* уменьшенное движение: лист появляется затуханием, без подъёма (переход выше перебивал правило app.css) */
@media (prefers-reduced-motion: reduce) {
  .sheet, .layer.open .sheet { transform: none; opacity: 0; transition: opacity 80ms linear; }
  .layer.open .sheet { opacity: 1; }
}

/* загрузка: каркас из тональных блоков без анимации; ошибка: одна фраза и «Повторить» */
.skel { display: grid; gap: 12px; padding-top: 28px; }
.skel i { display: block; border-radius: var(--r-row); background: var(--panel); }
.skel__h { width: min(320px, 70%); height: 44px; }
.skel__b { height: 72px; }
.oops { display: grid; justify-items: center; gap: 12px; padding: 64px 16px; color: var(--ink2); text-align: center; }
.oops p { max-width: 36ch; }

/* лист аккаунта: имя, платформа, состояние словом, два действия */
.acs { display: grid; gap: 4px; padding: 4px 4px 8px; }
.acs__u { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.acs__p { color: var(--ink2); }
.acs__s { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.acs__s--bad::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.acs__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.acs__acts .btn { min-height: 48px; padding: 0 20px; }
.acs .err { margin-top: 8px; }
/* аккаунты пространства строками: кружок, ник, тихая мета; текущий на лаймовой подложке */
.acl { list-style: none; display: grid; gap: 6px; margin: 8px 0 0; padding: 0; }
.acl__r { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px 8px 8px; border: 0; border-radius: var(--r-row); background: var(--well); color: var(--ink); font: inherit; text-align: left; transition: background-color var(--t-fast) var(--ease); }
button.acl__r:hover { background: var(--ctl-hover); }
.acl__r[aria-current] { background: var(--lime); color: var(--lime-ink); }
.acl__r[aria-current] small { color: inherit; }
.acl__b { flex: 1; min-width: 0; display: grid; gap: 1px; }
.acl__b b { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acl__b small { color: var(--ink2-onmuted); font-size: 13px; }
.acs__more { display: grid; gap: 2px; margin-top: 12px; }
/* режим «только чтение» для ролей ниже «Редактор»: одна фраза вверху страницы */
.ro__t { margin-top: 20px; padding: 12px 16px; border-radius: var(--r-row); background: var(--well); color: var(--ink); font-size: 14px; }
.ro .head__acts { display: none; }
.ro [disabled] { cursor: default; }
.ro .upl, .ro #myFiles, .ro #chipRm, .ro #qrAdd { display: none; }
#helperAct { display: contents; }
@media (max-width: 599px) { .hello a { display: inline-flex; align-items: center; min-height: 44px; } }
.layer.open .sheet--acct { transition-duration: 280ms; } /* короткий лист по высоте содержимого: подъём 280 мс */
/* сообщение об ошибке проявляется, а не вспыхивает */
@keyframes err-in { from { opacity: 0; transform: translateY(-4px); } }
.err:not([hidden]) { animation: err-in var(--t-fast) var(--ease); }
@media (prefers-reduced-motion: reduce) { @keyframes err-in { from { opacity: 0; } } }

/* ── роутер: фокус на заголовке нового экрана без кольца; кнопка «Остаться» в листе подтверждения как главное действие ── */
h1[tabindex="-1"]:focus, main[tabindex="-1"]:focus { outline: none; }
.acs__acts .cta { min-height: 48px; padding: 0 20px; }

/* ── десктоп ≥900: «Входящие», «Контакты», «Правила», «Аналитика» и редактор помещаются в окно (body[data-fit]); длинное прокручивается внутри панели.
   «Обзор» без data-fit и прокручивается как раньше. Полоса справа зарезервирована всегда, чтобы шапка не сдвигалась между вкладками. ── */
:root { --sb: rgb(112 116 118 / .45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --sb: rgb(177 182 189 / .4); } }
:root[data-theme=dark] { --sb: rgb(177 182 189 / .4); }
@media (min-width: 900px) {
  :root { scrollbar-gutter: stable; }
  body[data-fit] { height: 100dvh; }
  body[data-fit] .app { height: 100%; display: flex; flex-direction: column; }
  body[data-fit] .hd { position: static; flex: none; }
  body[data-fit] #main { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
  body[data-fit] * { scrollbar-width: thin; scrollbar-color: var(--sb) transparent; }
}

/* ссылки на правила: запятая между ними, на телефоне каждая — цель 44 px */
.rls > :not(:last-child)::after { content: ","; }
@media (max-width: 599px) { .rls a { display: inline-flex; align-items: center; min-height: 44px; } }

/* повышенная контрастность: вторичный текст темнее, края карточек видны (светлая, затем тёмная — позднее правило тёмной перебивает) */
@media (prefers-contrast: more) {
  :root:not([data-theme=dark]) { --ink2: #4A4E50; --ink2-onmuted: #3F4345; --line: #A3A7AB; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme=light]) { --ink2: #D2D6DB; --ink2-onmuted: #D2D6DB; --line: #6B737D; } }
  :root[data-theme=dark] { --ink2: #D2D6DB; --ink2-onmuted: #D2D6DB; --line: #6B737D; }
}
/* уменьшенная прозрачность: стекло и вуаль непрозрачные, без размытия */
@media (prefers-reduced-transparency: reduce) {
  .hd[data-glass], .tabs { background: var(--frame); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .scrim { background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.acl__r .acl__b small.acs__s { margin-top: 0; color: var(--ink); } /* «плохо» чёрным и весом, красная только точка */
.acl__r[aria-current] .av { background: var(--lime-ink); color: var(--lime); }
