:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f8f9fa; --surface-3: #eef0f3;
  --text: #121821; --text-2: #3d4654; --muted: #6b7482; --line: #e3e6ea; --line-strong: #cfd4db;
  --accent: #0f4c81; --accent-hover: #0b3c66; --accent-ink: #ffffff; --accent-soft: #e7eef6; --focus: rgba(15,76,129,.28);
  --high: #1d7a46; --high-soft: #e6f3eb; --mid: #a35f00; --mid-soft: #fbf1df; --low: #c2410c; --low-soft: #fcebe1;
  --miss: #b42318; --miss-soft: #fbe9e7; --def: #5f6b7a; --def-soft: #eef0f3;
  --overlay: rgba(14,20,28,.48);
  --shadow-1: 0 1px 2px rgba(16,24,40,.05);
  --shadow-2: 0 12px 32px rgba(16,24,40,.16), 0 2px 6px rgba(16,24,40,.08);
  --r: 8px; --r-sm: 6px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #151a21; --surface-2: #1a2029; --surface-3: #212833;
    --text: #e7eaef; --text-2: #c3cad4; --muted: #8f99a8; --line: #262e39; --line-strong: #34404e;
    --accent: #5fa0dc; --accent-hover: #7ab2e6; --accent-ink: #0b1622; --accent-soft: #172738; --focus: rgba(95,160,220,.35);
    --high: #4cc27c; --high-soft: #132a1d; --mid: #e3a33a; --mid-soft: #2e2311; --low: #f08350; --low-soft: #331c12;
    --miss: #f2685c; --miss-soft: #351714; --def: #95a0af; --def-soft: #1f252e;
    --overlay: rgba(0,0,0,.6); --shadow-1: none; --shadow-2: 0 16px 40px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #151a21; --surface-2: #1a2029; --surface-3: #212833;
  --text: #e7eaef; --text-2: #c3cad4; --muted: #8f99a8; --line: #262e39; --line-strong: #34404e;
  --accent: #5fa0dc; --accent-hover: #7ab2e6; --accent-ink: #0b1622; --accent-soft: #172738; --focus: rgba(95,160,220,.35);
  --high: #4cc27c; --high-soft: #132a1d; --mid: #e3a33a; --mid-soft: #2e2311; --low: #f08350; --low-soft: #331c12;
  --miss: #f2685c; --miss-soft: #351714; --def: #95a0af; --def-soft: #1f252e;
  --overlay: rgba(0,0,0,.6); --shadow-1: none; --shadow-2: 0 16px 40px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 128px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- шапка */
.appbar { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.appbar .row1 { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.logo-mark svg { width: 16px; height: 16px; stroke: var(--accent-ink); fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.logo b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.logo span { color: var(--muted); font-size: 13px; padding-left: 10px; border-left: 1px solid var(--line); }
.spacer { flex: 1; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--high); background: var(--high-soft);
  padding: 4px 10px; border-radius: 99px; font-weight: 500; white-space: nowrap; }
.secure.off { color: var(--muted); background: var(--surface-3); }
.appbar .row2 { display: flex; align-items: center; gap: 16px; height: 52px; border-top: 1px solid var(--line); }

.steps { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 10px 4px 4px; white-space: nowrap; }
.steps li + li::before { content: ""; width: 20px; height: 1px; background: var(--line-strong); margin-right: 6px; }
.steps .num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps li.active { color: var(--text); font-weight: 550; }
.steps li.active .num { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.steps li.done .num { border-color: var(--high); background: var(--high); color: #fff; }
.steps li.done .num svg { width: 12px; height: 12px; stroke-width: 3; }

.progress { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.progress .bar { width: 120px; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--high); transition: width .25s; }
.progress b { font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px;
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.quiet:hover:not(:disabled) { background: var(--surface-3); border-color: transparent; }
.btn.danger { color: var(--miss); }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.icon { width: 34px; padding: 0; }

/* ---------- панели */
main { padding: 24px 0 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.panel-h .sub { color: var(--muted); font-size: 13px; }
.panel-b { padding: 18px; }
section.block { margin-bottom: 20px; }

/* ---------- загрузка */
.intake { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 36px 20px; text-align: center; background: var(--surface-2);
  transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: inline-grid;
  place-items: center; color: var(--accent); margin-bottom: 12px; }
.drop .ic svg { width: 22px; height: 22px; }
.drop h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.drop p { margin: 0; color: var(--muted); font-size: 13px; }
.drop .btn { margin-top: 16px; }
.formats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.formats span { font: 500 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; background: var(--surface); }
.locked { border: 1px solid var(--line); border-radius: var(--r); padding: 36px 20px; text-align: center; background: var(--surface-2); }
.locked .ic { color: var(--muted); }
.env { display: flex; gap: 8px; align-items: flex-start; text-align: left; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--miss-soft); color: var(--miss); font-size: 13px; }

.qtable { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13.5px; }
.qtable td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.qtable tr:last-child td { border-bottom: 0; }
.qtable .fn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qtable .fn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qtable .fn svg { color: var(--muted); }
.qtable .sz { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; width: 1%; }
.qtable .st { white-space: nowrap; width: 1%; font-size: 12.5px; }
.qtable .x { width: 1%; }
.qtable .x button { border: 0; background: none; color: var(--muted); padding: 4px; border-radius: 4px; display: grid; }
.qtable .x button:hover { background: var(--surface-3); color: var(--text); }
.st.done { color: var(--high); } .st.err { color: var(--miss); } .st.run { color: var(--accent); } .st.wait { color: var(--muted); }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.run-status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.kit h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; }
.kit > p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.kit ul { list-style: none; margin: 0; padding: 0; }
.kit li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.kit li:last-child { border-bottom: 0; }
.kit .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.kit li.ok .dot { background: var(--high); border-color: var(--high); color: #fff; }
.kit li.ok .dot svg { width: 11px; height: 11px; stroke-width: 3.2; }
.kit li.miss .dot { border-color: var(--miss); }
.kit li.miss { color: var(--miss); }
.kit li .opt { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; padding-left: 8px; }

/* ---------- документы */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .fname { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent); white-space: nowrap; margin: 2px 4px 2px 0; }
.tag.skip, .tag.sub { background: var(--surface-3); color: var(--muted); }
.tag.unk { background: var(--miss-soft); color: var(--miss); }
.tbl select { height: 30px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 8px; background: var(--surface); font-size: 13px; max-width: 220px; }
.scroll-x { overflow-x: auto; }

/* ---------- сводка */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--accent)); }
.kpi .v { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.kpi.total .k::before { display: none; }
.warns { list-style: none; margin: 0; padding: 0; }
.warns li { display: flex; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: flex-start; }
.warns li:last-child { border-bottom: 0; }
.warns li svg { margin-top: 2px; color: var(--mid); }
.warns li.error svg { color: var(--miss); }
.warns li.info svg { color: var(--def); }
.warns .lvl { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.foot-note { padding: 10px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r) var(--r); }

/* ---------- шпаргалка */
.sheet { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 20px; align-items: start; }
.nav { position: sticky; top: 128px; padding: 6px; max-height: calc(100vh - 148px); overflow: auto; }
.nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.nav a .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; white-space: nowrap; font-weight: 400; }
.nav a.done .n { color: var(--high); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 3px; height: 14px; border-radius: 2px; background: var(--c); }

.sec { margin-bottom: 16px; overflow: hidden; }
.sec > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.sec > header h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.sec > header .n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.row { display: grid; grid-template-columns: 28px minmax(160px, 1fr) minmax(220px, 1.3fr) auto; gap: 8px 14px; align-items: start;
  padding: 12px 18px 12px 15px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--def); }
.row:last-child { border-bottom: 0; }
.row.c-high { border-left-color: var(--high); }
.row.c-medium { border-left-color: var(--mid); }
.row.c-low { border-left-color: var(--low); }
.row.c-missing { border-left-color: var(--miss); }
.row.c-default, .row.c-manual { border-left-color: var(--line-strong); }
.row.entered { background: color-mix(in srgb, var(--high-soft) 55%, var(--surface)); }
.mark { width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid;
  place-items: center; color: transparent; margin-top: 6px; padding: 0; }
.mark svg { width: 13px; height: 13px; stroke-width: 3; }
.mark:hover { border-color: var(--high); }
.row.entered .mark { background: var(--high); border-color: var(--high); color: #fff; }
.lbl { font-weight: 550; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 5px; }
.chip { font-size: 11px; height: 18px; display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; font-weight: 500;
  background: var(--surface-3); color: var(--text-2); }
.conf { font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--c); }
.conf::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.src { font-size: 12px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.val input { width: 100%; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; background: var(--surface);
  font-family: var(--mono); font-size: 13.5px; }
.val input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.val input.edited { border-color: var(--accent); background: var(--accent-soft); }
.val .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.val .note { font-size: 12px; color: var(--mid); margin-top: 3px; }
.ops { display: flex; gap: 6px; align-items: center; }
.copy { min-width: 92px; }
.copy.ok { background: var(--high); border-color: var(--high); color: #fff; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chk-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px dashed var(--line-strong);
  background: var(--surface-2); border-radius: var(--r-sm); font-size: 13.5px; }
.chk-btn .box { width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 4px; display: grid; place-items: center; color: transparent; }
.chk-btn .box svg { width: 11px; height: 11px; stroke-width: 3.2; }
.row.entered .chk-btn { border-style: solid; border-color: var(--high); color: var(--high); background: var(--high-soft); }
.row.entered .chk-btn .box { background: var(--high); border-color: var(--high); color: #fff; }
.evidence { grid-column: 2 / -1; display: none; padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.row.open .evidence { display: block; }
.ev-src { margin-bottom: 12px; }
.ev-src:last-child { margin-bottom: 0; }
.ev-src .cap { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ev-src img { max-width: 100%; border-radius: 4px; border: 1px solid var(--line); background: #fff; display: block; }
.alts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.alts button { height: 26px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 4px; padding: 0 8px; font-family: var(--mono); font-size: 12px; color: var(--text); }
.alts button:hover { border-color: var(--accent); color: var(--accent); }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; }
.empty .ic svg { width: 22px; height: 22px; }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

.site-foot { border-top: 1px solid var(--line); padding: 16px 0 24px; color: var(--muted); font-size: 12.5px; }
.site-foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); background: var(--text); color: var(--bg);
  padding: 9px 16px; border-radius: var(--r-sm); font-size: 13.5px; opacity: 0; transition: .18s; pointer-events: none; z-index: 60; box-shadow: var(--shadow-2); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- диалог доступа */
dialog { border: 0; padding: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-2);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: var(--overlay); }
.dlg-h { padding: 22px 24px 0; display: flex; gap: 14px; align-items: flex-start; }
.dlg-h .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.dlg-h .ic svg { width: 20px; height: 20px; }
.dlg-h h2 { margin: 0 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.dlg-h p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.dlg-b { padding: 18px 24px 4px; }
.facts { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.facts li { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.facts li:last-child { border-bottom: 0; }
.facts li svg { color: var(--accent); margin-top: 2px; }
.facts b { display: block; font-weight: 600; margin-bottom: 1px; }
.facts span { color: var(--muted); font-size: 13px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.agree input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.granted { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--high-soft);
  color: var(--high); font-size: 13px; }
.dlg-f { padding: 18px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-f .left { margin-right: auto; }
.dlg-note { padding: 0 24px 20px; margin-top: -8px; font-size: 12px; color: var(--muted); }
.cloud { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.cloud .agree { margin-top: 0; }
.cloud small { display: block; margin: 6px 0 0 26px; color: var(--muted); font-size: 12px; }
.ai-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.ai-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.ai-toggle.disabled { color: var(--muted); cursor: not-allowed; }
.ai-chip { font-size: 11px; height: 18px; display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 4px; font-weight: 500; }
.ai-chip svg { width: 11px; height: 11px; stroke-width: 2.6; }
.ai-chip.confirmed { background: var(--high-soft); color: var(--high); }
.ai-chip.filled, .ai-chip.replaced { background: var(--accent-soft); color: var(--accent); }
.ai-chip.conflict { background: var(--mid-soft); color: var(--mid); }
.ai-line { display: flex; gap: 10px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.ai-line b { font-weight: 600; }
.ai-line.err { color: var(--miss); }

@media (max-width: 1080px) {
  .intake { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .wrap { padding: 0 16px; }
  .sheet { grid-template-columns: 1fr; }
  .nav { position: static; max-height: none; display: flex; overflow-x: auto; gap: 2px; }
  .nav a { flex: 0 0 auto; }
  .steps { display: none; }
  .appbar .row2 { justify-content: space-between; }
  html { scroll-padding-top: 116px; }
}
@media (max-width: 640px) {
  .logo span, .secure .t, .progress .bar, .hide-sm { display: none; }
  .progress { min-width: 0; }
  .row { grid-template-columns: 28px minmax(0, 1fr); padding-right: 14px; }
  .row .val, .row .ops { grid-column: 2 / -1; }
  .ops { justify-content: flex-end; }
  .evidence { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(2n) { border-right: 0 !important; }
  .tbl th, .tbl td { padding: 9px 12px; }
  .page-head h1 { font-size: 19px; }
}

/* ---------- аккаунт в шапке */
.quota { font-size: 12.5px; color: var(--text-2); background: var(--surface-3); padding: 4px 10px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quota.warn { color: var(--miss); background: var(--miss-soft); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; z-index: 40; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: grid; gap: 2px; }
.menu-head b { font-size: 13.5px; font-weight: 600; }
.menu-head span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text);
  text-decoration: none; font-size: 13.5px; background: none; border: 0; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.foot-links { display: inline-flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.agree a { color: var(--accent); }

/* ---------- страницы сайта */
.site-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.site-nav nav { display: flex; gap: 4px; margin-left: 24px; }
.site-nav nav a { color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--r-sm); font-size: 14px; }
.site-nav nav a:hover { color: var(--text); background: var(--surface-3); }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }

.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.025em; margin: 14px 0 16px; font-weight: 700; }
.hero p.lead { font-size: 17px; color: var(--text-2); margin: 0 0 28px; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); overflow: hidden; }
.mock-h { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-h i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.mock-row { display: grid; grid-template-columns: 3px 1fr 1.1fr; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mock-row:last-child { border-bottom: 0; }
.mock-row .bar { width: 3px; height: 26px; border-radius: 2px; background: var(--c); }
.mock-row .k { color: var(--text-2); }
.mock-row .v { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px;
  display: flex; justify-content: space-between; gap: 8px; }
.mock-row .v em { font-style: normal; font-family: var(--sans); font-size: 11px; color: var(--c); }

.band { padding: 64px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--surface); }
.band h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 700; }
.band .sub { color: var(--text-2); margin: 0 0 36px; max-width: 640px; font-size: 15.5px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feat { padding: 22px; }
.feat .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feat .ic svg { width: 19px; height: 19px; }
.feat h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; }
.feat p { margin: 0; color: var(--text-2); font-size: 14px; }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; padding: 0; margin: 0; }
.flow li { list-style: none; padding: 0 20px 0 0; position: relative; }
.flow li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.flow li::after { content: ""; position: absolute; top: 15px; left: 40px; right: 12px; height: 1px; background: var(--line-strong); }
.flow li:last-child::after { display: none; }
.flow h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.flow p { margin: 0; color: var(--text-2); font-size: 14px; }
.docs-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.docs-list span { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.price { padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.price.main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price h3 { margin: 0; font-size: 15px; font-weight: 600; }
.price .amt { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0; }
.price .amt small { font-size: 14px; color: var(--muted); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.price li { display: flex; gap: 8px; }
.price li svg { color: var(--high); margin-top: 2px; }
.price .btn { margin-top: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: var(--text-2); font-size: 14.5px; max-width: 820px; }

/* ---------- формы */
.auth-wrap { min-height: calc(100vh - 60px - 64px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(420px, 100%); padding: 28px; }
.auth-card h1 { font-size: 21px; margin: 0 0 6px; letter-spacing: -.015em; }
.auth-card > p { margin: 0 0 22px; color: var(--muted); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field .opt { color: var(--muted); font-weight: 400; }
.input { width: 100%; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 12px; background: var(--surface); font-size: 14px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.form-err { display: none; padding: 10px 12px; border-radius: var(--r-sm); background: var(--miss-soft); color: var(--miss); font-size: 13.5px; margin-bottom: 14px; }
.form-err.show { display: block; }
.form-ok { padding: 10px 12px; border-radius: var(--r-sm); background: var(--high-soft); color: var(--high); font-size: 13.5px; margin-bottom: 14px; }
.btn.block { width: 100%; height: 40px; }
.auth-alt { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }
.auth-alt a, .text-link { color: var(--accent); text-decoration: none; }
.auth-alt a:hover, .text-link:hover { text-decoration: underline; }
.row2c { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- кабинет и админка */
.page { padding: 28px 0 56px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-row .kpi { border-bottom: 0; }
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.danger-zone { border-color: color-mix(in srgb, var(--miss) 40%, var(--line)); }
.tbl td .muted { font-size: 12.5px; }
.tbl input.input { height: 30px; width: 80px; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 500; background: var(--surface-3); color: var(--text-2); }
.pill.ok { background: var(--high-soft); color: var(--high); }
.pill.bad { background: var(--miss-soft); color: var(--miss); }
.pill.adm { background: var(--accent-soft); color: var(--accent); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legal { max-width: 820px; }
.legal h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-2); font-size: 15px; line-height: 1.65; }
.legal .upd { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

@media (max-width: 900px) {
  .hero .wrap, .cols { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; gap: 24px; }
  .flow li::after { display: none; }
  .site-nav nav { display: none; }
  .hero { padding: 40px 0; }
}
@media (max-width: 560px) { .flow, .row2c { grid-template-columns: 1fr; } }
