/* Доменный радар: единая дизайн-система. Токены сверху, компоненты ниже. */
:root {
  color-scheme: light dark;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-2: #ebeff1;
  --surface-3: #e1e6e9;
  --line: #d9dfe3;
  --line-strong: #b4bec5;
  --ctl-line: #84919c;
  --ink: #161c22;
  --ink-2: #47525c;
  --ink-3: #5f6b76;
  --accent: #0b6b62;
  --accent-ink: #ffffff;
  --accent-soft: #dff1ee;
  --accent-hover: #09574f;
  --focus: #0b6b62;

  --ok: #0c6a3b;      --ok-bg: #e0f3e8;
  --warn: #8a4f00;    --warn-bg: #fbeed6;
  --bad: #b01e1e;     --bad-bg: #fbe5e4;
  --info: #1d5a97;    --info-bg: #e2eefa;
  --violet: #5a3ca0;  --violet-bg: #ece8f8;
  --orange: #a13f08;  --orange-bg: #fbe7db;
  --gray: #4d5863;    --gray-bg: #e8ecef;

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --ctl: 34px;
  --shadow: 0 1px 2px rgb(20 28 36 / .05);
  --shadow-pop: 0 8px 24px rgb(20 28 36 / .16), 0 1px 3px rgb(20 28 36 / .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --side-w: 228px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d; --surface: #1b2127; --surface-2: #20272e; --surface-3: #2a323a;
    --line: #2e373f; --line-strong: #47525c; --ctl-line: #6f7c88;
    --ink: #e8ecef; --ink-2: #b8c2ca; --ink-3: #99a5af;
    --accent: #5eead4; --accent-ink: #06211e; --accent-soft: #143a36; --accent-hover: #99f6e4; --focus: #5eead4;
    --ok: #6ee7a8; --ok-bg: #123524;
    --warn: #fbc15e; --warn-bg: #3b2a0c;
    --bad: #fda4a0; --bad-bg: #421a1a;
    --info: #9cc8fa; --info-bg: #17304a;
    --violet: #c4b5fd; --violet-bg: #2c2350;
    --orange: #fdba8c; --orange-bg: #44230f;
    --gray: #b8c2ca; --gray-bg: #2a323a;
    --shadow: none; --shadow-pop: 0 8px 24px rgb(0 0 0 / .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 15px; line-height: 1.3; font-weight: 600; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
b { font-weight: 600; }
small { font-size: 12px; }
code, .mono { font-family: var(--mono); font-size: .93em; font-variant-ligatures: none; }
hr { border: 0; border-top: 1px solid var(--line); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.muted { color: var(--ink-3); }
.wrap { white-space: normal; overflow-wrap: anywhere; }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.hint { color: var(--ink-3); font-size: 13px; margin-top: var(--s3); max-width: 72ch; }
.error-text { color: var(--bad); margin-top: var(--s2); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: fixed; left: var(--s3); top: -48px; z-index: 50; background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.skip:focus { top: var(--s3); }

/* Каркас */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
main { padding: var(--s5) var(--s5) 64px; min-width: 0; max-width: 1560px; display: flex; flex-direction: column; gap: var(--s4); width: 100%; }
.side {
  all: unset; box-sizing: border-box;
  display: flex; flex-direction: column; gap: var(--s4);
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  padding: var(--s4) var(--s3); background: var(--surface-2); border-right: 1px solid var(--line);
}
.side-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--ink); font-weight: 600; padding: 2px var(--s2); }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 7px; display: block; }
.side-search input { background: var(--surface); }
.side nav { display: flex; flex-direction: column; gap: var(--s4); flex: 1; }
.nav-group h2 { font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 0 var(--s2); margin-bottom: var(--s1); }
.nav-group a { display: block; padding: 6px var(--s2); border-radius: var(--r); color: var(--ink-2); transition: background-color .15s, color .15s; }
.nav-group a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav-group a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s2) 0; border-top: 1px solid var(--line); }
.side-user a:first-child { min-width: 0; color: var(--ink); }
.side-user b, .side-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user span { color: var(--ink-3); font-size: 12px; }
.side-logout { color: var(--ink-3); font-size: 13px; flex: none; }
.tabbar { display: none; }

/* Заголовки страниц */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.page-head p { color: var(--ink-3); margin-top: 2px; max-width: 72ch; }
.page-actions { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }

/* Панели */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow); min-width: 0; }
.panel > h2 { margin-bottom: var(--s3); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.more-panel > summary { font-weight: 600; cursor: pointer; }
.more-panel[open] > summary { margin-bottom: var(--s3); }
.more-panel { padding: var(--s3) var(--s4); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ctl); padding: 0 var(--s3); border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 500 14px/1 var(--font); cursor: pointer; white-space: nowrap; position: relative;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 28px; padding: 0 var(--s2); font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.is-loading { color: transparent !important; pointer-events: none; }
.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--ink-3); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after { border-color: var(--accent-ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(1turn); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink-3); cursor: pointer; flex: none; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.is-done { color: var(--ok); }
.fav.is-on { color: var(--warn); }
.fav.is-on .icon { fill: currentColor; }
.side-close { display: none; }
.inline { display: inline-flex; }
.inline-form { display: flex; align-items: flex-end; gap: var(--s2); flex-wrap: wrap; }

/* Поля */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--ink-2); }
.field-inline { flex-direction: row; align-items: center; gap: var(--s2); }
.field-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-set legend { font-size: 12.5px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.grow { flex: 1 1 220px; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; height: var(--ctl); padding: 0 var(--s2); border: 1px solid var(--ctl-line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: 400 14px/1 var(--font); transition: border-color .15s;
}
textarea { height: auto; padding: var(--s2); font: 400 14px/1.5 var(--mono); resize: vertical; }
input::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover { border-color: var(--ink-3); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
input[type=search]::-webkit-search-cancel-button { display: none; }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: var(--ctl); cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 0 var(--s4); border: 0; margin: 0; padding: 0; grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); align-items: end; }
.form-end { display: flex; align-items: flex-end; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.settings { display: flex; flex-direction: column; gap: var(--s4); }
.save-bar { position: sticky; bottom: var(--s3); z-index: 6; display: flex; justify-content: flex-end; pointer-events: none; }
.save-bar .btn { pointer-events: auto; box-shadow: var(--shadow-pop); }

/* Статусы: цвет плюс форма метки и текст */
.st, .tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 var(--s2); border-radius: 999px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.st::before, .tag::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.st-free { color: var(--ok); background: var(--ok-bg); }
.st-free::before { border-radius: 50%; }
.st-registered { color: var(--gray); background: var(--gray-bg); }
.st-registered::before { border-radius: 1px; }
.st-reserved { color: var(--violet); background: var(--violet-bg); }
.st-reserved::before { transform: rotate(45deg); border-radius: 1px; }
.st-pending_release { color: var(--warn); background: var(--warn-bg); }
.st-pending_release::before { background: none; border: 2px solid currentColor; border-radius: 50%; }
.st-deleting { color: var(--orange); background: var(--orange-bg); }
.st-deleting::before { clip-path: polygon(50% 100%, 0 10%, 100% 10%); }
.st-error { color: var(--bad); background: var(--bad-bg); }
.st-error::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 9px; height: 9px; }
.st-unknown { color: var(--gray); background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.st-unknown::before { background: none; border: 2px dashed currentColor; border-radius: 50%; }
.tag-ok { color: var(--ok); background: var(--ok-bg); }
.tag-ok::before { border-radius: 50%; }
.tag-warn { color: var(--warn); background: var(--warn-bg); }
.tag-warn::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 9px; height: 9px; }
.tag-bad { color: var(--bad); background: var(--bad-bg); }
.tag-bad::before { border-radius: 1px; transform: rotate(45deg); }
.tag-info { color: var(--info); background: var(--info-bg); }
.tag-info::before { background: none; border: 2px solid currentColor; border-radius: 50%; }
.tag-neutral { color: var(--gray); background: var(--gray-bg); }
.tag-neutral::before { height: 2px; }
.mini { display: inline-block; padding: 0 5px; border-radius: var(--r-sm); background: var(--gray-bg); color: var(--gray); font-size: 11.5px; line-height: 18px; white-space: nowrap; }
.mini-warn { background: var(--warn-bg); color: var(--warn); }
.mini-bad { background: var(--bad-bg); color: var(--bad); }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; }
.fresh { font-size: 12px; color: var(--ink-3); white-space: nowrap; margin-left: 2px; }
.fresh-new { color: var(--ok); }
.fresh-old { color: var(--warn); }

/* Домены */
.dn { font-family: var(--mono); font-weight: 500; font-variant-ligatures: none; color: var(--ink); overflow-wrap: anywhere; }
.dn-zone { color: var(--ink-3); font-weight: 400; }
a:hover .dn { color: var(--accent); }

/* Конструктор отчёта */
.column-list li { display: flex; align-items: center; gap: var(--s1); border-top: 1px solid var(--line); }
.column-list li:first-child { border-top: 0; }
.column-list .check { flex: 1; min-width: 0; }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }

/* Вкладки */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs a { padding: var(--s2) var(--s3); color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; transition: color .15s, border-color .15s; }
.tabs a:hover { color: var(--ink); text-decoration: none; border-color: var(--line-strong); }
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }

/* Чипы */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips-label { color: var(--ink-3); font-size: 12.5px; }
.chips-sep { width: 1px; height: 18px; background: var(--line); margin: 0 var(--s1); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: 13px; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.chip[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.chip[aria-current] .count { background: transparent; color: inherit; }
.chip-bad .count { background: var(--bad-bg); color: var(--bad); }

/* Фильтры */
.filterbar { display: flex; flex-direction: column; gap: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
.filter-main { display: flex; align-items: flex-end; gap: var(--s2); flex-wrap: wrap; }
.filter-main select, .filter-main input[type=number] { min-width: 150px; }
.filter-more summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 500; width: fit-content; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s3); margin-top: var(--s3); align-items: end; }
.result-head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; min-height: 26px; }
.filter-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px 1px 8px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.filter-tag .icon { width: 13px; height: 13px; }
.filter-tag:hover { text-decoration: none; filter: brightness(.96); }
.reset { font-size: 13px; }

/* Выпадающие панели */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; max-height: 70dvh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
.link-list a { display: block; padding: 5px var(--s2); border-radius: var(--r-sm); color: var(--ink); }
.link-list a:hover { background: var(--surface-2); text-decoration: none; }

/* Таблицы */
.table-scroll { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; }
.data th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; padding: 7px var(--s3); border-bottom: 1px solid var(--line); }
.data th.num { text-align: right; }
.nowrap { white-space: nowrap; }
.data td { padding: 7px var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.data td.num { white-space: nowrap; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr { transition: background-color .1s; }
.data tbody tr:hover { background: var(--surface-2); }
.data tbody tr.is-picked { background: var(--accent-soft); }
.th-sort { color: inherit; display: inline-flex; gap: 3px; }
.th-sort:hover { color: var(--accent); text-decoration: none; }
th[aria-sort] .th-sort { color: var(--accent); font-weight: 600; }
.th-arrow { font-family: var(--mono); }
.col-check { width: 36px; padding-right: 0 !important; }
.col-actions { width: 72px; white-space: nowrap; padding: 2px var(--s2) !important; }
.col-actions > * { vertical-align: middle; }
.col-actions form { display: inline-flex; }
.col-domain { min-width: 170px; }
.domains-table td { white-space: nowrap; }
.domains-table td.col-domain { white-space: normal; }
@media (max-width: 1180px) { .domains-table .card-hide { display: none; } }
.domains-table .mini { margin-left: 3px; }

/* Закреплённая шапка таблицы: таблица доменов прокручивается вместе со страницей */
.panel-flush:has(> .table-scroll > .domains-table) { overflow: visible; }
.panel-flush > .table-scroll:has(> .domains-table) { overflow: visible; }
.domains-table th:first-child { border-top-left-radius: var(--r-lg); }
.domains-table th:last-child { border-top-right-radius: var(--r-lg); }

.bulkbar {
  position: sticky; bottom: var(--s3); z-index: 6; display: none; align-items: center; gap: var(--s2); width: fit-content; max-width: 100%; margin-left: auto;
  padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.bulkbar.is-open { display: flex; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pager a { min-width: 32px; height: 32px; padding: 0 var(--s2); display: inline-grid; place-items: center; border-radius: var(--r); color: var(--ink-2); }
.pager a:hover { background: var(--surface-3); text-decoration: none; }
.pager a[aria-current] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pager-gap { align-self: center; color: var(--ink-3); }
.pager.is-hidden { display: none; }
.infinite-sentinel { text-align: center; padding: var(--s3); color: var(--ink-3); font-size: 13px; }
.infinite-sentinel:empty { padding: var(--s2); }
progress { width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--surface-3); accent-color: var(--accent); appearance: none; }
progress::-webkit-progress-bar { background: var(--surface-3); }
progress::-webkit-progress-value { background: var(--accent); transition: width .3s var(--ease); }
progress::-moz-progress-bar { background: var(--accent); }
.progress { display: inline-flex; align-items: center; gap: var(--s2); min-width: 130px; width: 100%; font-size: 12.5px; color: var(--ink-2); }

/* Пусто, сообщения, выноски */
.empty { padding: var(--s6) var(--s4); text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); margin-bottom: 2px; }
.empty p { max-width: 56ch; margin: 0 auto; }
.flash, .callout { padding: var(--s2) var(--s3); border-radius: var(--r); }
.flash { animation: flash-in .25s var(--ease); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }
.flash-ok, .callout-ok { background: var(--ok-bg); color: var(--ok); }
.flash-bad, .callout-bad { background: var(--bad-bg); color: var(--bad); }
.callout-warn { background: var(--warn-bg); color: var(--warn); }
.callout-info { background: var(--info-bg); color: var(--info); }
.callout a { color: inherit; text-decoration: underline; }
.callout h2 { margin-bottom: 2px; }
.callout .data { margin-top: var(--s2); color: var(--ink); background: var(--surface); border-radius: var(--r); }
.queue-note { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.queue-note .btn { color: var(--ink); text-decoration: none; }
.source-results { margin-top: var(--s2); display: grid; gap: var(--s1); color: var(--ink); }

/* Факты */
.facts > div { display: flex; justify-content: space-between; gap: var(--s4); padding: 6px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts > div:last-child { padding-bottom: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { text-align: right; min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3) var(--s4); }
.metrics dt { color: var(--ink-3); font-size: 12.5px; }
.metrics dd { font-weight: 500; }
.metrics-strip { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
.pairs > div { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: var(--s3); padding: 2px 0; }
.pairs dt { color: var(--ink-3); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.more { margin-top: var(--s3); }
.more > summary, td .more > summary { cursor: pointer; color: var(--accent); font-size: 13px; width: fit-content; }
.more[open] > summary { margin-bottom: var(--s2); }
td .more { margin-top: 2px; min-width: 140px; }
td .more p { white-space: normal; max-width: 44ch; font-size: 13px; }
.plain-list li { padding: 3px 0; font-size: 13px; }
.row-list li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); min-height: 44px; }
.row-list li:last-child { border-bottom: 0; }
.row-list li > a { flex: 1; min-width: 0; }
.code { margin: var(--s2) 0; padding: var(--s3); background: var(--surface-2); border-radius: var(--r); overflow-x: auto; font: 13px/1.5 var(--mono); font-variant-ligatures: none; }

/* Дашборд */
.alert-band { background: var(--ok-bg); border: 1px solid var(--ok); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
.alert-band h2 { color: var(--ok); margin-bottom: var(--s2); }
.alert-band ul { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.alert-band li { display: inline-flex; align-items: center; gap: var(--s1); background: var(--surface); border-radius: var(--r); padding: 2px 4px 2px var(--s3); min-height: 36px; flex-wrap: wrap; }
.alert-name .dn { font-size: 18px; font-weight: 600; }
.alert-age { font-size: 12.5px; color: var(--ink-3); margin: 0 var(--s2); }
.dash-top { display: grid; grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr); gap: var(--s4); align-items: start; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s4); align-items: start; }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: var(--s4); align-items: start; }
.health-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); flex-wrap: wrap; }
.health-head h2 { font-size: 16px; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.health-warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.health-bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.issues { display: grid; gap: 2px; margin-bottom: var(--s3); }
.issues a { display: block; padding: 5px var(--s2); border-radius: var(--r-sm); }
.issue-bad a { color: var(--bad); background: var(--bad-bg); }
.issue-warn a { color: var(--warn); background: var(--warn-bg); }
.find-list li { display: flex; align-items: center; gap: var(--s1); padding: 4px var(--s2) 4px var(--s4); border-bottom: 1px solid var(--line); min-height: 38px; transition: background-color .1s; }
.find-list li:last-child { border-bottom: 0; }
.find-list li:hover { background: var(--surface-2); }
.find-list li > a { flex: 1; min-width: 0; }
.find-meta { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; margin-right: var(--s2); }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; padding: var(--s3) var(--s4); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); transition: background-color .15s; }
.tile:nth-child(6n) { border-right: 0; }
.tile:nth-last-child(-n+6) { border-bottom: 0; }
.tile:hover { background: var(--surface-2); text-decoration: none; }
.tile b { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.tile:hover b { color: var(--accent); }
.tile span { color: var(--ink-2); font-size: 13px; }
.tile small { color: var(--ink-3); }

/* Карточка домена */
.crumbs { font-size: 13px; }
.crumbs a::before { content: "← "; }
.domain-head { display: grid; gap: var(--s2); }
.domain-title { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.domain-title h1 { font-size: 26px; margin-right: var(--s2); overflow-wrap: anywhere; }
.domain-title h1 .dn { font-weight: 600; }
.domain-state { display: flex; align-items: center; gap: var(--s2) var(--s3); flex-wrap: wrap; }
.domain-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s1); }

/* Источники */
.source-list { display: flex; flex-direction: column; gap: var(--s4); }
.source { scroll-margin-top: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.source:target { border-color: var(--accent); }
.source .more { margin-top: 0; }
.source-head { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.source-head p { color: var(--ink-3); font-size: 13px; }
.source-status { display: flex; align-items: center; gap: var(--s3); }
.source-desc { color: var(--ink-2); max-width: 90ch; }
.source .hint { margin-top: 0; }
.source-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.switch { position: relative; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: background-color .2s; }
.switch span { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .2s var(--ease); }
.switch[aria-checked=true] { background: var(--accent); }
.switch[aria-checked=true] span { transform: translateX(16px); }
.switch.is-loading { color: inherit !important; opacity: .6; }
.switch.is-loading::after { display: none; }

/* Журнал */
.log-row { border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-row > summary { display: grid; grid-template-columns: 112px 74px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) var(--s4); cursor: pointer; list-style: none; transition: background-color .1s; }
.log-row > summary::-webkit-details-marker { display: none; }
.log-row > summary:hover { background: var(--surface-2); }
.log-row[open] > summary { background: var(--surface-2); }
.log-row time { color: var(--ink-3); font-size: 13px; }
.log-level { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.log-warning .log-level { color: var(--warn); }
.log-error .log-level { color: var(--bad); }
.log-body b { font-weight: 500; overflow-wrap: anywhere; }
.log-reason { display: block; color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.log-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; color: var(--ink-3); font-size: 12.5px; }
.log-detail { padding: var(--s3) var(--s4); background: var(--surface-2); border-top: 1px solid var(--line); animation: reveal .2s var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-3px); } }
.log-links { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s3); }

/* Вход и установка */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: var(--s4); background: var(--bg) repeating-radial-gradient(circle at 50% 50%, transparent 0 79px, var(--line) 79px 80px); }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-pop); }
.auth-brand { display: flex; align-items: center; gap: var(--s2); font-weight: 600; color: var(--ink-2); }
.auth-card h1 { margin-top: var(--s2); }
.auth-steps { list-style: decimal; padding-left: 20px; color: var(--ink-2); }

/* Телефон */
@media (max-width: 1023px) {
  .app { display: block; }
  main { padding: var(--s3) var(--s3) calc(76px + env(safe-area-inset-bottom)); gap: var(--s3); }
  .side {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100dvh; border-right: 1px solid var(--line); z-index: 40;
    box-shadow: var(--shadow-pop); padding-top: calc(var(--s4) + env(safe-area-inset-top)); padding-bottom: calc(var(--s4) + env(safe-area-inset-bottom));
  }
  .side:not(:popover-open) { display: none; }
  .side::backdrop { background: rgb(10 14 18 / .45); }
  .side:popover-open { animation: drawer .22s var(--ease); }
  @keyframes drawer { from { transform: translateX(-16px); opacity: .4; } }
  .side-close { display: inline-grid; }
  .nav-group a { padding: 9px var(--s2); }
  .tabbar {
    position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 54px; min-width: 0; padding: 0; border: 0; background: none;
    color: var(--ink-3); font: 500 11px/1.1 var(--font); cursor: pointer;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current] { color: var(--accent); }
  .tabbar .icon { width: 20px; height: 20px; }
  .bulkbar { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .save-bar { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .data th { top: 0; }
  .dash-top, .dash-bottom { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile:nth-child(6n) { border-right: 1px solid var(--line); }
  .tile:nth-child(3n) { border-right: 0; }
  .tile:nth-last-child(-n+6) { border-bottom: 1px solid var(--line); }
  .tile:nth-last-child(-n+3) { border-bottom: 0; }
}

@media (max-width: 760px) {
  :root { --ctl: 42px; }
  input:not([type=checkbox]):not([type=hidden]), select, textarea { font-size: 16px; }
  .btn-sm { height: 34px; font-size: 14px; }
  .icon-btn { width: 36px; height: 36px; }
  .chip { min-height: 34px; padding: 0 12px; }
  .check { min-height: 40px; }
  input[type=checkbox] { width: 20px; height: 20px; }
  .filterbar { padding: var(--s3); }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips-sep { flex: none; }
  .filter-main > .btn { flex: 1 1 100%; }
  .filter-main > .field:not(.grow) { flex: 1 1 calc(50% - var(--s1)); min-width: 0; }
  .filter-main select, .filter-main input[type=number] { min-width: 0; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: var(--s3); }
  .tile:nth-child(3n) { border-right: 1px solid var(--line); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .tile:nth-last-child(-n+2) { border-bottom: 0; }
  .dropdown-body { position: fixed; left: var(--s3); right: var(--s3); top: auto; bottom: 66px; width: auto; }
  .domain-title h1 { font-size: 22px; }
  .facts > div { gap: var(--s3); }
  .pairs > div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 4px 0; }

  /* Таблица становится карточками */
  .data-cards, .data-cards tbody, .data-cards tr, .data-cards td { display: block; width: 100%; }
  .data-cards thead { display: none; }
  .data-cards tr { position: relative; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .data-cards tbody tr:last-child { border-bottom: 0; }
  .data-cards td { padding: 2px 0; border: 0; text-align: left; white-space: normal; }
  .data-cards td[data-label] { min-height: 24px; text-align: right; overflow-wrap: anywhere; }
  .data-cards td[data-label]::before { content: attr(data-label); float: left; margin-right: var(--s3); color: var(--ink-3); font-size: 13px; }
  .data-cards .card-hide { display: none; }
  .data-cards td.col-domain { padding-bottom: 4px; font-size: 15px; }
  .data-cards .col-check { position: absolute; left: var(--s4); top: 14px; width: auto; padding: 0 !important; }
  .data-cards tr:has(.col-check) { padding-left: 46px; }
  .data-cards .col-actions { position: absolute; right: var(--s2); top: 6px; width: auto; padding: 0 !important; }
  .data-cards tr:has(.col-actions) .col-domain { padding-right: 76px; }

  .rating-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s4); }
  .rating-table td.col-domain, .rating-table td[data-label="Подтверждён"] { grid-column: 1 / -1; }

  .log-row > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s3); padding: var(--s3); }
  .log-body, .log-meta { grid-column: 1 / -1; }
  .log-meta { justify-content: flex-start; }
  .log-level { text-align: right; }
  .log-detail { padding: var(--s3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
