/* Анамнез — стили
   Палитра: холодная бумага, чернильно-синий акцент, три сигнальных цвета для норм.
   Шрифт: Onest (кириллица), цифры моноширинные по ширине (tabular-nums). */

:root {
  --bg: #f2f4f3;
  --surface: #ffffff;
  --sunken: #e8ecea;
  --ink: #16201c;
  --ink-2: #4a5650;
  --ink-3: #7b8781;
  --line: #dce2df;
  --line-2: #c7d0cb;
  --accent: #24407a;
  --accent-2: #1a3061;
  --accent-soft: #e4e9f3;
  --on-accent: #ffffff;
  --ok: #2c7150;
  --ok-soft: #e0efe6;
  --band: #cfe3d6;
  --warn: #a2610c;
  --warn-soft: #f7ecd8;
  --bad: #ad332c;
  --bad-soft: #f7e1df;
  --paper: #fffefb;
  --shadow: 0 1px 2px rgba(22, 32, 28, 0.05), 0 8px 24px -12px rgba(22, 32, 28, 0.16);
  --r-lg: 14px;
  --r: 10px;
  --r-sm: 7px;
  --side: 240px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111614;
    --surface: #181e1b;
    --sunken: #222a26;
    --ink: #e7ece9;
    --ink-2: #aab5af;
    --ink-3: #7c8882;
    --line: #2a332f;
    --line-2: #39443f;
    --accent: #8fa8e0;
    --accent-2: #b2c4ee;
    --accent-soft: #1f2a42;
    --on-accent: #0e1626;
    --ok: #6cc196;
    --ok-soft: #173126;
    --band: #234536;
    --warn: #e3a64b;
    --warn-soft: #3a2c16;
    --bad: #f08a80;
    --bad-soft: #3d1f1c;
    --paper: #1d2420;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
small { font-size: 13px; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.ic { width: 20px; height: 20px; flex: none; }
.ic.muted { color: var(--ink-3); }
.spacer { flex: 1; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* ---------- Оболочка ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  display: flex; flex-direction: column; gap: 24px;
  padding: 22px 14px 18px; border-right: 1px solid var(--line); background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
.bm-bg { fill: var(--accent); }
.bm-track { fill: var(--on-accent); opacity: .35; }
.bm-band { fill: var(--band); }
.bm-dot { fill: var(--on-accent); }
.brand__name { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__link {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 500;
}
.side__link:hover { background: var(--sunken); color: var(--ink); text-decoration: none; }
.side__link.is-active { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.side__link.is-active .ic { color: var(--accent); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.side__note { display: flex; gap: 8px; padding: 0 10px; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.side__note .ic { width: 16px; height: 16px; margin-top: 1px; }

.topbar, .tabbar { display: none; }
.main { margin-left: var(--side); padding: 40px clamp(24px, 4vw, 56px) 80px; max-width: calc(var(--side) + 1160px); outline: none; }

/* ---------- Заголовок страницы ---------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.pagehead > div:first-child { max-width: 68ch; }
.pagehead__date { color: var(--ink-3); margin-bottom: 6px; }
.pagehead__sub { color: var(--ink-2); margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagehead__kicker { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13.5px; margin-bottom: 8px; }
.pagehead__kicker .ic { width: 16px; height: 16px; }
.pagehead__kicker .sep { width: 1px; height: 12px; background: var(--line-2); margin: 0 6px; }
.pagehead__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pagehead--person .person { display: flex; gap: 18px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); margin: -12px 0 18px -4px; font-size: 14px; }
.back .ic { width: 18px; height: 18px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 500; white-space: nowrap; background: none; text-decoration: none !important;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn .ic { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-2); }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--text { color: var(--accent); padding: 0 8px; }
.btn--text:hover { background: var(--accent-soft); }
.btn--text-danger { color: var(--bad); padding: 0 8px; }
.btn--text-danger:hover { background: var(--bad-soft); }
.btn--sm { height: 32px; padding: 0 10px; font-size: 14px; }
.btn--sm .ic { width: 16px; height: 16px; }
.btn--icon { width: 34px; padding: 0; }
.btn--icon span { display: none; }
.iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: none; color: var(--ink-2);
}
.iconbtn:hover { background: var(--sunken); color: var(--ink); }
.iconbtn--sm { width: 30px; height: 30px; }
.iconbtn--sm .ic { width: 16px; height: 16px; }
.pagehead__actions .iconbtn { border-color: var(--line-2); background: var(--surface); }
.link { font-size: 14px; font-weight: 500; }
[data-action="ind-add"] { align-self: flex-start; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Уведомления на странице ---------- */
.notice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 20px;
  border-radius: var(--r); background: var(--accent-soft); color: var(--ink);
}
.notice > .ic { color: var(--accent); }
.notice p { flex: 1; }
.notice--warn { background: var(--warn-soft); } .notice--warn > .ic { color: var(--warn); }
.notice--bad { background: var(--bad-soft); } .notice--bad > .ic { color: var(--bad); }
.notice--ok { background: var(--ok-soft); } .notice--ok > .ic { color: var(--ok); }

/* ---------- Аватары, метки ---------- */
.avatar {
  --tone: var(--accent);
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 14%, var(--surface)); color: var(--tone);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
}
@media (prefers-color-scheme: dark) { .avatar { color: color-mix(in srgb, var(--tone) 55%, white); background: color-mix(in srgb, var(--tone) 28%, var(--surface)); } }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.lg { width: 46px; height: 46px; font-size: 15px; }
.avatar.xl { width: 64px; height: 64px; font-size: 20px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--sunken); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; vertical-align: 2px; }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.count--bad { background: var(--bad-soft); color: var(--bad); }
.mini { font-size: 12.5px; padding: 1px 7px; border-radius: 5px; white-space: nowrap; }
.mini--low, .mini--high { background: var(--warn-soft); color: var(--warn); }

/* ---------- Чипы ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px;
  border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.chip:has(.avatar) { padding-left: 6px; }
.chip:hover { text-decoration: none; border-color: var(--ink-3); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip--sm { height: 30px; font-size: 13px; padding: 0 12px; }

/* ---------- Блоки ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px 8px; margin-bottom: 20px; }
.grid-2 > .block { margin-bottom: 0; }
.block--flush { padding: 0; border: 0; background: none; margin-bottom: 32px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.block--flush .block__head { margin-bottom: 12px; }
.block__lead { color: var(--ink-3); font-size: 14px; margin-bottom: 8px; }
.empty { color: var(--ink-3); padding: 16px 0 20px; }
.empty--big { padding: 48px 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.footnote { display: flex; gap: 10px; color: var(--ink-3); font-size: 13.5px; max-width: 80ch; margin-top: 8px; }
.footnote .ic { width: 18px; height: 18px; margin-top: 2px; }

/* ---------- Полоса «расшифровать» на обзоре ---------- */
.dropband { margin-bottom: 20px; }
.dropband__zone {
  display: flex; align-items: center; gap: 18px; padding: 20px 22px; cursor: pointer;
  border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: var(--surface);
  transition: border-color .15s, background-color .15s;
}
.dropband__zone:hover, .dropband__zone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropband__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.dropband__text { flex: 1; display: flex; flex-direction: column; }
.dropband__text b { font-size: 16px; }
.dropband__text span { color: var(--ink-2); font-size: 14px; }

/* ---------- План ---------- */
.plist > li + li { border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 0; }
.prow--solo { grid-template-columns: minmax(0, 1fr) auto auto; }
.prow__title { font-weight: 500; line-height: 1.35; }
.prow__title .tag { margin-left: 4px; }
.prow__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.prow__due { text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.prow__due small { color: var(--ink-3); }
.due { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.due--overdue { color: var(--bad); }
.due--soon { color: var(--warn); }
.due--later { color: var(--ink-2); }
.due--nodata { color: var(--ink-3); }
.prow__act { display: flex; gap: 2px; }
.block .plist, .block .dlist, .block .famlist { margin: 0 -2px; }

/* ---------- Семья на обзоре ---------- */
.famlist > li + li { border-top: 1px solid var(--line); }
.famrow { display: flex; align-items: center; gap: 14px; padding: 14px 0; color: var(--ink); }
.famrow:hover { text-decoration: none; }
.famrow:hover b { color: var(--accent); }
.famrow__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.famrow__main small { color: var(--ink-3); }
.famrow__flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.famrow__ok { font-size: 12.5px; color: var(--ok); margin-top: 4px; }

/* ---------- Документы ---------- */
.dlist { container-type: inline-size; }
.dlist > li + li { border-top: 1px solid var(--line); }

.drow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 13px 0; color: var(--ink); }
.drow:hover { text-decoration: none; }
.drow:hover b { color: var(--accent); }
.drow__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--sunken); color: var(--ink-2); }
.drow__icon .ic { width: 18px; height: 18px; }
.drow__main { display: flex; flex-direction: column; min-width: 0; }
.drow__main b { font-weight: 500; }
.drow__main small { color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.drow__folder { display: inline-flex; align-items: center; gap: 4px; }
.drow__folder .ic { width: 14px; height: 14px; }
.drow__tags { display: flex; gap: 6px; }
.drow__date { color: var(--ink-2); font-size: 14px; white-space: nowrap; min-width: 92px; text-align: right; }
@container (max-width: 560px) {
  .drow { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 4px; }
  .drow__tags { grid-column: 2; grid-row: 2; }
  .drow__tags:empty { display: none; }
  .drow__folder { display: none; }
  .drow__date { min-width: 0; font-size: 13px; }
}

/* ---------- Архив ---------- */
.archive { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.archive__rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 1px; }
.archive__rail h3 { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin: 18px 10px 6px; }
.archive__rail h3:first-child { margin-top: 0; }
.rail__item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14px; border: 0; background: none; text-align: left; width: 100%;
}
.rail__item .ic { width: 18px; height: 18px; }
.rail__item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__item small { color: var(--ink-3); font-size: 12.5px; }
.rail__item:hover { background: var(--sunken); text-decoration: none; color: var(--ink); }
.rail__item.is-on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.rail__add { color: var(--accent); }
.searchbar { position: relative; margin-bottom: 14px; }
.searchbar .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.searchbar input { width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); }
.catchips { display: none; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.folderbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.folderbar b { flex: 1; }
.dropslim { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 8px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--ink-3); font-size: 14px; cursor: pointer; }
.dropslim:hover, .dropslim.is-over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.yeargroup { margin-top: 18px; }
.yeargroup__h { font-size: 13px; font-weight: 600; color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }

/* ---------- Карточка документа ---------- */
.docview { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.docview__preview { position: sticky; top: 24px; }
.preview__img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: block; }
.preview__pdf { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.preview__file { display: flex; align-items: center; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.skeleton { height: 420px; border-radius: var(--r); background: var(--sunken); }

.paper {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 28px 28px 20px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2); box-shadow: var(--shadow);
  font-family: 'PT Serif', Georgia, serif;
}
.paper__org { font-size: 11px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.paper__title { font-size: 16px; font-weight: 700; color: var(--ink); text-align: center; margin-bottom: 10px; }
.paper__meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { text-align: left; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink-3); padding: 4px 6px 4px 0; font-size: 11.5px; }
.paper td { padding: 4px 6px 4px 0; border-bottom: 1px dotted var(--line-2); }
.paper .r { text-align: right; }
.paper__text { white-space: normal; color: var(--ink); }
.paper__foot { margin-top: 18px; font-size: 10.5px; color: var(--ink-3); text-align: right; font-family: var(--font); }

.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; color: var(--ink-2); max-width: 78ch; }

/* ---------- Вердикт ---------- */
.verdict { border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 32px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); }
.verdict--soon { border-left-color: var(--warn); }
.verdict--urgent { border-left-color: var(--bad); background: var(--bad-soft); }
.verdict__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.verdict__summary { font-size: 17px; line-height: 1.55; max-width: 70ch; color: var(--ink); margin-bottom: 4px; }
.verdict .link { display: inline-block; margin-top: 10px; }
.urg { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px; font-size: 13.5px; }
.urg .ic { width: 16px; height: 16px; }
.urg--ok { background: var(--ok-soft); color: var(--ok); }
.urg--warn { background: var(--warn-soft); color: var(--warn); }
.urg--bad { background: var(--bad); color: #fff; }
.urg__text { color: var(--ink-2); font-size: 14px; }

/* ---------- Показатели и шкала нормы ---------- */
.indlist { border-top: 1px solid var(--line-2); container-type: inline-size; }

.indlist__cols, .ind__head {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(88px, 0.6fr) minmax(140px, 1.3fr) minmax(130px, 0.8fr) 24px;
  gap: 16px; align-items: center;
}
.indlist__cols { font-size: 12.5px; color: var(--ink-3); padding: 8px 0; border-bottom: 1px solid var(--line); }
.ind { border-bottom: 1px solid var(--line); }
.ind__head { width: 100%; padding: 12px 0; background: none; border: 0; text-align: left; cursor: default; }
.is-expandable > .ind__head { cursor: pointer; }
.is-expandable > .ind__head:hover .ind__name { color: var(--accent); }
.ind__name { font-weight: 500; line-height: 1.3; }
.ind__val { white-space: nowrap; }
.ind__val b { font-size: 16px; font-weight: 600; }
.ind__val small { color: var(--ink-3); }
.ind--low .ind__val b, .ind--high .ind__val b { color: var(--warn); }
.ind__flag em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--warn); white-space: nowrap; }
.ind__chev { color: var(--ink-3); transition: transform .2s; }
.ind__chev .ic { width: 18px; height: 18px; }
.ind__head[aria-expanded="true"] .ind__chev { transform: rotate(180deg); }
.ind__body { padding: 0 0 18px; max-width: 72ch; }
.ind__about { color: var(--ink-2); }
.ind__note { margin-top: 6px; }
.ind--low .ind__note, .ind--high .ind__note { padding-left: 12px; border-left: 2px solid var(--warn); }
.ind__trend { margin-top: 14px; }
.ind__trend-h { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.indlist__more { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ok); font-weight: 500; text-align: left; }
.indlist__more .ic { width: 18px; height: 18px; transition: transform .2s; }
.indlist__more.is-open .ic { transform: rotate(180deg); }

@container (max-width: 760px) {
  .indlist__cols { display: none; }
  .ind__head { grid-template-columns: minmax(0, 1fr) 92px minmax(110px, 0.9fr) 20px; grid-template-areas: 'n v s c' 'f v s c'; row-gap: 2px; }
  .ind__name { grid-area: n; } .ind__val { grid-area: v; } .ind__scale { grid-area: s; } .ind__flag { grid-area: f; } .ind__chev { grid-area: c; }
  .ind__flag em { font-size: 12.5px; }
}
.scale { position: relative; padding-top: 4px; }
.scale__track { position: relative; height: 6px; border-radius: 99px; background: var(--sunken); }
.scale__band { position: absolute; top: 0; bottom: 0; background: var(--band); border-radius: 2px; }
.scale__band.open-l { border-top-left-radius: 99px; border-bottom-left-radius: 99px; }
.scale__band.open-r { border-top-right-radius: 99px; border-bottom-right-radius: 99px; }
.scale__mark {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 2.5px var(--surface);
}
.scale--low .scale__mark, .scale--high .scale__mark { background: var(--warn); }
.scale__ticks { position: relative; height: 16px; margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.scale__ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale--empty { font-size: 12.5px; color: var(--ink-3); }
.scale--compact .scale__track { height: 4px; }
.scale--compact .scale__mark { width: 10px; height: 10px; margin: -5px 0 0 -5px; }

/* График динамики */
.trendchart { width: 100%; height: auto; display: block; overflow: visible; }
.tc__band { fill: var(--band); opacity: .55; }
.tc__axis { stroke: var(--line-2); }
.tc__line { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }
.tc__pt circle { fill: var(--ok); stroke: var(--surface); stroke-width: 2; }
.tc__pt--low circle, .tc__pt--high circle { fill: var(--warn); }
.tc__x, .tc__y { font-size: 11px; fill: var(--ink-3); font-family: var(--font); }
.tc__v { font-size: 11.5px; font-weight: 600; fill: var(--ink); font-family: var(--font); }

.trends { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px 28px; padding: 6px 0 16px; }
.trend { margin: 0; max-width: 480px; }
.trend figcaption { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.trend figcaption span { color: var(--ink-3); font-size: 13.5px; }
.trend--low figcaption span, .trend--high figcaption span { color: var(--warn); }

/* ---------- Семья ---------- */
.memlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 22px; }
.memlist > li + li { border-top: 1px solid var(--line); }
.memrow { display: flex; align-items: center; gap: 16px; padding: 18px 0; color: var(--ink); }
.memrow:hover { text-decoration: none; }
.memrow:hover b { color: var(--accent); }
.memrow__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.memrow__main b { font-size: 16px; font-weight: 600; }
.memrow__main small { color: var(--ink-3); }
.memrow__stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 80px; line-height: 1.25; }
.memrow__stat b { font-size: 18px; font-weight: 600; }
.memrow__stat small { color: var(--ink-3); font-size: 12px; }
.memrow__stat.is-bad b { color: var(--bad); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.facts > div { padding: 16px 20px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts h3 { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.facts li { padding: 1px 0; }

/* ---------- Формы ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea, .decode-opts select {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); line-height: 1.4;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .searchbar input:focus, .edtable input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field input:disabled { background: var(--sunken); color: var(--ink-3); }
.field--inline { flex-direction: row; align-items: center; gap: 12px; }
.field--inline > span { white-space: nowrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--ink-3); }
.check-line { display: flex; gap: 10px; align-items: flex-start; }
.check-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.radios { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.radio:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.radio:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.radio input { margin-top: 3px; accent-color: var(--accent); }
.radio span { display: flex; flex-direction: column; gap: 2px; }
.radio small { color: var(--ink-2); }
.filepick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filepick__box { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); cursor: pointer; }
.filepick:hover .filepick__box, .filepick input:focus-visible + .filepick__box { border-color: var(--accent); color: var(--accent); }
.filepick__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Настройки ---------- */
.setting { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 560px); gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.setting__label p { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.setting__body { display: flex; flex-direction: column; gap: 14px; }
.prose p + p { margin-top: 10px; }
.prose { color: var(--ink-2); max-width: 64ch; }

/* ---------- Модальные окна и уведомления ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(12, 18, 16, 0.42); opacity: 0; transition: opacity .18s; }
.modal__panel {
  position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 24px 64px -16px rgba(0,0,0,.35);
  transform: translateY(8px); opacity: 0; transition: transform .2s, opacity .2s;
}
.modal__panel--wide { width: min(1100px, 100%); }
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { transform: none; opacity: 1; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 22px; }
.modal__head h2 { font-size: 18px; }
.modal__body { padding: 8px 22px 20px; overflow-y: auto; }
.modal__body > p + p { margin-top: 10px; }
.modal__foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }
.toasts { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.toast.ok .ic { color: var(--band); }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Расшифровка ---------- */
.stepper { display: flex; gap: 8px; margin: -6px 0 28px; counter-reset: s; }
.stepper li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; font-weight: 500; }
.stepper li + li::before { content: ''; width: 32px; height: 1px; background: var(--line-2); margin-right: 4px; }
.stepper span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 12px; }
.stepper span .ic { width: 14px; height: 14px; }
.stepper .is-cur { color: var(--ink); }
.stepper .is-cur span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stepper .is-done { color: var(--ink-2); }
.stepper .is-done span { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 56px 24px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.dropzone__icon .ic { width: 26px; height: 26px; }
.dropzone b { font-size: 18px; font-weight: 600; }
.dropzone > span:not(.btn):not(.dropzone__icon) { color: var(--ink-3); }
.dropzone .btn { margin-top: 12px; }
.decode-opts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 16px 0 24px; }
.decode-opts select { width: auto; min-width: 240px; }
.decode-opts .hint { flex: 1; min-width: 240px; }
.samples h2 { font-size: 15px; margin-bottom: 10px; color: var(--ink-2); font-weight: 500; }
.samples__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sample { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-align: left; }
.sample:hover { border-color: var(--accent); }
.sample > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.sample small { color: var(--ink-3); }
.sample__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--sunken); color: var(--ink-2); }
.sample__icon .ic { width: 18px; height: 18px; }

.busy { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 40px; align-items: center; }
.busy__preview { position: relative; overflow: hidden; border-radius: var(--r); min-height: 280px; background: var(--sunken); }
.busy__preview .preview__pdf { height: 420px; }
.scanning::after {
  content: ''; position: absolute; left: 0; right: 0; height: 64px; top: -64px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 22%, transparent) 70%, var(--accent) 100%);
  animation: scan 1.6s cubic-bezier(.5, 0, .5, 1) infinite;
}
@keyframes scan { to { top: 100%; } }
.busy__lines li { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink-3); animation: line-on .4s calc(var(--i) * .5s) forwards; }
.busy__lines li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); animation: dot-on .4s calc(var(--i) * .5s) forwards; }
@keyframes line-on { to { color: var(--ink); } }
@keyframes dot-on { to { background: var(--accent); } }

.check { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
.check__preview { position: sticky; top: 24px; }
.check__foot { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-bottom: 12px; }
.edtable { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.edtable__row { display: grid; grid-template-columns: minmax(0, 2fr) 92px 78px 64px 64px 30px; gap: 6px; align-items: center; padding: 6px 8px; }
.edtable__row + .edtable__row { border-top: 1px solid var(--line); }
.edtable__row--head { font-size: 12px; color: var(--ink-3); padding-top: 8px; padding-bottom: 8px; background: var(--bg); }
.edtable input { width: 100%; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-size: 14px; }
.edtable input:hover { border-color: var(--line); }
.edval { position: relative; border-radius: 6px; }
.edval input { font-weight: 600; padding-left: 20px; }
.edval::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ok); }
.edval--low, .edval--high { background: var(--warn-soft); }
.edval--low::before, .edval--high::before { background: var(--warn); }
.edval--none::before { background: var(--line-2); }

.decoding { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.decoding__aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.modal .decoding__aside { position: static; }
.aside-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.aside-block h2 { font-size: 15px; margin-bottom: 10px; }
.aside-block__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.aside-block__head h2 { margin: 0; }
.aside-block--row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.aside-block--row .muted { display: flex; align-items: center; gap: 8px; }
.aside-block--row .ic { width: 18px; height: 18px; }
.todo li { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 9px 0; }
.todo li + li { border-top: 1px solid var(--line); }
.todo__when { font-size: 12.5px; font-weight: 600; color: var(--accent); padding-top: 2px; }
.todo .is-urgent .todo__when { color: var(--bad); }
.todo p { font-size: 14px; line-height: 1.45; }
.questions li { position: relative; padding: 7px 0 7px 18px; font-size: 14px; line-height: 1.45; }
.questions li::before { content: '?'; position: absolute; left: 0; top: 7px; font-weight: 700; color: var(--accent); }
.fus li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.fus b { font-weight: 500; }
.fus span { color: var(--ink-2); white-space: nowrap; }
.fus + .hint { margin-top: 8px; }
.disclaimer { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; padding: 4px 4px 0; }
.disclaimer .ic { width: 16px; height: 16px; margin-top: 1px; }
.meaning li { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.meaning li:last-child { border-bottom: 1px solid var(--line); }
.meaning h3 { margin-bottom: 4px; }
.meaning p { color: var(--ink-2); max-width: 66ch; }
.lk { font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.meaning li:first-child .lk { color: var(--accent); }
.terms { margin: 14px 0 0; display: grid; gap: 10px; }
.terms div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.terms dt { font-weight: 600; }
.terms dd { margin: 0; color: var(--ink-2); }

/* ---------- Мобильная версия ---------- */
@media (max-width: 1180px) {
  .decoding { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
  .indlist__cols, .ind__head { grid-template-columns: minmax(0, 1.4fr) minmax(80px, 0.6fr) minmax(120px, 1.2fr) minmax(110px, 0.8fr) 20px; gap: 12px; }
}
@media (max-width: 1040px) {
  .grid-2, .docview, .check, .decoding { grid-template-columns: minmax(0, 1fr); }
  .docview__preview, .check__preview, .decoding__aside { position: static; }
  .docview__preview { max-width: 560px; }
  .check__preview { max-height: 360px; overflow: auto; border-radius: var(--r); }
  .busy { grid-template-columns: 1fr; gap: 24px; }
  .busy__preview { max-height: 320px; }
}
@media (max-width: 860px) {
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20;
    height: 56px; padding: 0 8px 0 6px; background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand__mark { width: 26px; height: 26px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar__link { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--ink-3); font-weight: 500; }
  .tabbar__link:hover { text-decoration: none; }
  .tabbar__link.is-active { color: var(--accent); }
  .tabbar__link .ic { width: 22px; height: 22px; }
  .main { margin-left: 0; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .pagehead { margin-bottom: 20px; align-items: flex-start; }
  .pagehead > .btn { width: 100%; }
  .notice { flex-wrap: wrap; }
  .notice p { flex: 1 1 calc(100% - 40px); }
  .notice .btn { margin-left: 32px; }
  .docview__preview { order: 2; }
  .pagehead__sub .avatar { display: none; }
  .archive { grid-template-columns: minmax(0, 1fr); }
  .archive__rail { display: none; }
  .catchips { display: flex; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px; scrollbar-width: none; }
  .chip { flex: none; }
  .block { padding: 16px 16px 4px; }
  .dropband__zone { padding: 16px; }
  .dropband__zone .btn { display: none; }
  .dropband__icon { width: 44px; height: 44px; }
  .prow { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
  .prow--solo { grid-template-columns: minmax(0, 1fr) auto; }
  .prow--solo .prow__due { grid-column: 1; }
  .prow--solo .prow__act { grid-column: 2; }
  .prow__due { grid-column: 2; grid-row: 2; flex-direction: row; gap: 8px; align-items: baseline; text-align: left; }
  .prow__act { grid-column: 3; grid-row: 1 / span 2; }
  .prow__act .btn span { display: none; }
  .prow__act .btn { width: 40px; padding: 0; }
  .drow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .drow__tags { grid-column: 2; grid-row: 2; }
  .drow__tags:empty { display: none; }
  .drow__date { min-width: 0; font-size: 13px; }
  .indlist__cols { display: none; }
  .ind__head { grid-template-columns: minmax(0, 1fr) auto 20px; grid-template-areas: 'n v c' 's s s' 'f f f'; row-gap: 6px; }
  .ind__name { grid-area: n; } .ind__val { grid-area: v; } .ind__scale { grid-area: s; } .ind__flag { grid-area: f; } .ind__chev { grid-area: c; }
  .ind__flag:empty, .ind__flag:not(:has(em)) { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .memlist { padding: 0 16px; }
  .memrow__stat:not(.is-bad) { display: none; }
  .setting { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .samples__list { grid-template-columns: 1fr; }
  .dropzone { padding: 36px 16px; }
  .decode-opts select { min-width: 0; width: 100%; }
  .field--inline { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
  .edtable { overflow-x: auto; }
  .edtable__row { grid-template-columns: 160px 84px 70px 58px 58px 30px; min-width: 500px; }
  .meaning li { grid-template-columns: 1fr; gap: 4px; }
  .terms div { grid-template-columns: 1fr; gap: 2px; }
  .stepper li:not(.is-cur) { font-size: 0; gap: 0; }
  .stepper li + li::before { width: 16px; }
  .modal { padding: 0; align-items: end; }
  .modal__panel { width: 100%; max-height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .modal__panel--wide { width: 100%; }
  .row2 { grid-template-columns: 1fr; }
  .pagehead--person .person { gap: 14px; }
  .avatar.xl { width: 52px; height: 52px; font-size: 17px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .busy__lines li { color: var(--ink); }
}

/* ---------- Печать ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; }
  body { font-size: 12px; }
  .side, .topbar, .tabbar, .noprint, .stepper, .pagehead__actions, .back, .toasts, .notice, .prow__act, .ind__chev, .indlist__more, .btn--text { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; }
  .decoding, .docview { grid-template-columns: 1fr; }
  .decoding__aside, .docview__preview { position: static; }
  .indlist [hidden] { display: block !important; }
  .ind__body { padding-bottom: 8px; }
  .block, .aside-block, .verdict { break-inside: avoid; }
  .preview__pdf { display: none; }
}

/* ---------- Вход и регистрация ---------- */
.is-auth { background: var(--bg); }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); min-height: 100dvh; }
.auth__intro { display: flex; flex-direction: column; gap: 40px; padding: 40px clamp(24px, 5vw, 72px); background: var(--surface); border-right: 1px solid var(--line); }
.auth__intro .brand { padding: 0; }
.auth__pitch { margin: auto 0; max-width: 560px; }
.auth__pitch h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; margin-bottom: 32px; }
.auth__points { display: flex; flex-direction: column; gap: 18px; }
.auth__points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; color: var(--ink-2); }
.auth__points .ic { width: 40px; height: 40px; padding: 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.auth__points li:last-child .ic { background: var(--ok-soft); color: var(--ok); }
.auth__demo { align-self: flex-start; padding: 0; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 4vw, 56px); }
.auth__mbrand { display: none; }
.auth__card { width: 100%; max-width: 400px; margin: 0 auto; }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--sunken); border-radius: var(--r); margin-bottom: 24px; }
.auth__tabs button { height: 38px; border: 0; border-radius: var(--r-sm); background: none; font-weight: 500; color: var(--ink-2); }
.auth__tabs button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.auth__h { font-size: 24px; margin-bottom: 8px; }
.auth__lead { color: var(--ink-2); margin-bottom: 20px; }
.auth__card .back { margin: 0 0 16px -4px; background: none; border: 0; padding: 0; }
.auth__card .btn--text { align-self: center; }
.auth__err { color: var(--bad); background: var(--bad-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; }
.btn--block { width: 100%; height: 46px; }
.btn:disabled { opacity: .7; cursor: progress; }
.pw { position: relative; display: block; }
.pw input { padding-right: 44px; }
.pw__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; }
.pw__eye .ic { width: 18px; height: 18px; }
.mono, .code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px; margin-bottom: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); font-size: 18px; font-weight: 600; letter-spacing: .08em; text-align: center; user-select: all; }
.auth__card .btnrow { margin-bottom: 20px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.account { display: flex; gap: 12px; align-items: center; }
.account .ic { color: var(--ok); width: 28px; height: 28px; }
.account span { display: flex; flex-direction: column; }
.account small { color: var(--ink-3); }
.ok-dot, .bad-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--ok); vertical-align: 1px; }
.bad-dot { background: var(--bad); }
.sync { color: var(--ink-3); }
.sync--error { color: var(--bad); }
.sync--saving, .sync--pending { color: var(--warn); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__intro { border-right: 0; border-bottom: 1px solid var(--line); gap: 20px; padding: 20px 16px 24px; }
  .auth__pitch h1 { font-size: 24px; margin-bottom: 16px; }
  .auth__points { gap: 10px; font-size: 14px; }
  .auth__points li { grid-template-columns: 32px 1fr; gap: 10px; }
  .auth__points .ic { width: 32px; height: 32px; padding: 7px; }
  .auth__panel { order: -1; padding: 24px 16px 32px; justify-content: flex-start; }
  .auth__intro .brand { display: none; }
  .auth__mbrand { display: flex; padding: 0; margin: 0 0 20px; }
  .code { grid-template-columns: repeat(2, 1fr); font-size: 17px; }
}
