:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --muted: #5f6b78;
  --line: #e2e7ee;
  --accent: #0e3150;
  --accent-soft: #3d6b92;
  --accent-ink: #fff;
  --bad: #e0483b;
  --high: #e2711d;
  --warn: #d9a21b;
  --ok: #17916b;
  --info: #7c7b76;
  --code-bg: #082238;
  --code-ink: #e9e7e1;
  --radius: 20px;
  --shadow: 0 1px 0 rgba(0,0,0,.03), 0 12px 40px -18px rgba(20,20,30,.18);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0c; --surface: #111a24; --ink: #eef2f6; --muted: #8e9bab; --line: #1f2c3b;
    --accent: #8fb4d9; --accent-soft: #5d8bb5; --accent-ink: #0a0a0c; --code-bg: #061829; --code-ink: #dce6f0;
    --shadow: 0 1px 0 rgba(255,255,255,.03), 0 20px 50px -24px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0c; --surface: #111a24; --ink: #eef2f6; --muted: #8e9bab; --line: #1f2c3b;
  --accent: #8fb4d9; --accent-soft: #5d8bb5; --accent-ink: #0a0a0c; --code-bg: #061829; --code-ink: #dce6f0;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 20px 50px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: background .3s, color .3s;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background:
    radial-gradient(900px 520px at 80% -12%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(700px 420px at -10% 28%, color-mix(in oklab, var(--accent-soft) 12%, transparent), transparent 70%);
}
main, .top, .foot { position: relative; z-index: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Шапка */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 16px var(--display); letter-spacing: .02em; }
.logo b { font-weight: 500; color: var(--accent); letter-spacing: -.01em; }
.logo svg { border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.theme { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: transform .2s; }
.theme:hover { transform: rotate(-20deg); }

/* Hero */
.hero { padding: 9vh 0 6vh; text-align: center; }
.kicker { font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 18px; }
h1 { font: 700 clamp(34px, 7vw, 76px)/1 var(--display); letter-spacing: -.035em; margin: 0 auto; text-wrap: balance; }
.tagline { font: 500 clamp(18px, 2.6vw, 26px)/1.3 var(--display); letter-spacing: -.02em; color: var(--ink); margin: 18px auto 0; max-width: 22ch; text-wrap: balance; }
h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent), var(--accent-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 560px; margin: 22px auto 36px; text-wrap: pretty; }

.scan { display: flex; gap: 8px; max-width: 620px; margin: 0 auto; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.scan:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent); }
.field { flex: 1; display: flex; align-items: center; min-width: 0; padding-left: 18px; cursor: text; }
.prefix { color: var(--muted); font: 500 16px var(--mono); user-select: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 500 17px var(--mono); padding: 12px 4px; }
.field input::placeholder { color: color-mix(in oklab, var(--muted) 60%, transparent); }
.go { display: flex; align-items: center; gap: 8px; border: 0; background: var(--accent); color: var(--accent-ink); padding: 0 24px; border-radius: 999px; font-weight: 700; transition: transform .15s, background .2s; }
.go:hover { background: var(--ink); color: var(--bg); }
.go:active { transform: scale(.97); }
.go svg { transition: transform .2s; }
.go:hover svg { transform: translateX(3px); }
.hint { display: flex; flex-direction: column; gap: 2px; align-items: center; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.hint b { font: 700 13px var(--display); letter-spacing: .04em; color: var(--accent); }
.error { color: var(--bad); font-weight: 600; margin: 16px 0 0; }
.chips { list-style: none; padding: 0; margin: 34px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.chips li { font-size: 13px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Загрузка */
.loading { padding: 12vh 0; display: flex; flex-direction: column; align-items: center; }
.radar { width: 120px; height: 120px; position: relative; }
.radar span { position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 50%; opacity: 0; animation: ping 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
.radar::after { content: ''; position: absolute; inset: 44px; background: var(--accent); border-radius: 50%; }
@keyframes ping { from { transform: scale(.3); opacity: .9; } to { transform: scale(1); opacity: 0; } }
.loading-host { font: 700 22px var(--display); margin: 28px 0 22px; letter-spacing: -.02em; word-break: break-all; text-align: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; color: var(--muted); transition: color .3s; }
.steps li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; transition: all .3s; }
.steps li.active { color: var(--ink); }
.steps li.active::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Отчёт */
.report { padding: 10px 0 60px; }
.report > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.report > *:nth-child(2) { animation-delay: .08s; } .report > *:nth-child(3) { animation-delay: .16s; }
.report > *:nth-child(4) { animation-delay: .24s; } .report > *:nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.summary { display: flex; gap: 36px; align-items: center; padding: 34px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: calc(var(--radius) + 8px); box-shadow: var(--shadow); }
.score-card { position: relative; width: 168px; height: 168px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--grade, var(--accent)); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.2,1); }
.score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-num b { font: 700 52px/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.score-num small { color: var(--muted); font-size: 13px; margin-top: 4px; }
.summary-text { min-width: 0; }
.summary-text .kicker { margin-bottom: 8px; color: var(--grade, var(--accent)); }
.summary-text h2 { font: 700 clamp(24px, 3.4vw, 34px)/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 8px; word-break: break-all; }
.muted { color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: all .2s; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; margin: 14px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: var(--surface); padding: 16px 18px; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 700 20px var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.cat { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; transition: transform .2s, border-color .2s; }
.cat:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--ink) 25%, var(--line)); }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cat-name { font-weight: 700; }
.cat-score { font: 700 22px var(--display); font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--line); border-radius: 99px; margin: 12px 0 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1.2s cubic-bezier(.2,.7,.2,1) .3s; }
.cat-counts { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

.block { margin-top: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
h3 { font: 700 22px var(--display); letter-spacing: -.02em; margin: 0; }
.count { font: 600 14px var(--body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.filters { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.filters button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .2s; }
.filters button.on { background: var(--accent); color: var(--accent-ink); }

/* Сниппет */
.serp { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.snippet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.snip-site { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.snip-site img, .snip-site .fav { width: 26px; height: 26px; border-radius: 50%; background: var(--line); flex: none; object-fit: contain; padding: 4px; }
.snip-site small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snip-title { color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 10px 0 4px; }
:root[data-theme="dark"] .snip-title { color: #99b4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .snip-title { color: #99b4ff; } }
.snip-desc { color: var(--muted); font-size: 14px; margin: 0; }
.snip-empty { color: var(--bad); font-style: italic; }
.meters { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; }
.meter-top b { font-variant-numeric: tabular-nums; }
.meter-track { position: relative; height: 8px; border-radius: 99px; background: var(--line); margin-top: 8px; }
.meter-zone { position: absolute; top: 0; bottom: 0; background: color-mix(in oklab, var(--ok) 28%, transparent); border-radius: 99px; }
.meter-pin { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--c); transform: translateX(-2px); transition: left 1s cubic-bezier(.2,.7,.2,1) .4s; }
.meter-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Точки роста */
.growth { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; counter-reset: g; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s; }
.item[open] { border-color: color-mix(in oklab, var(--c) 45%, var(--line)); }
.item summary { list-style: none; display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.item summary::-webkit-details-marker { display: none; }
.item-n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 14px var(--display); background: color-mix(in oklab, var(--c) 14%, transparent); color: var(--c); counter-increment: g; }
.item-n::before { content: counter(g); }
.tier { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 2px; font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tier:first-child { margin-top: 0; }
.tier[data-tier="0"] span { color: var(--bad); }
.tier small { font-size: 12px; opacity: .7; }
.item-title { font-weight: 700; font-size: 16px; line-height: 1.35; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.tag { font-weight: 700; color: var(--c); }
.chev { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .25s; }
.item[open] .chev { transform: rotate(180deg); }
.item-body { padding: 0 20px 20px 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.item-body p { margin: 0; }
.item-body .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; }
.value { font: 13px/1.5 var(--mono); background: color-mix(in oklab, var(--line) 50%, transparent); padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
.code { position: relative; }
.code pre { margin: 0; background: var(--code-bg); color: var(--code-ink); font: 13px/1.6 var(--mono); padding: 40px 16px 14px; border-radius: 12px; overflow-x: auto; }
.copy { position: absolute; top: 8px; right: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #e9e7e1; font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.copy:hover { background: rgba(255,255,255,.14); }

.good summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.good summary::-webkit-details-marker { display: none; }
.good summary::after { content: '+'; font: 500 22px var(--body); color: var(--muted); margin-left: auto; transition: transform .2s; }
.good[open] summary::after { transform: rotate(45deg); }
.oklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.oklist li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.oklist li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.oklist li.info::before { background-image: none; content: 'i'; color: #fff; font: 700 11px/18px var(--display); text-align: center; }
.oklist small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.empty-good { padding: 26px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.foot { padding-top: 30px; padding-bottom: 30px; font-size: 13px; color: var(--muted); text-align: center; }
.foot p { margin: 0; }
.foot a { color: var(--accent); font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-note { margin-top: 6px !important; font-size: 12px; opacity: .8; }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .serp { grid-template-columns: 1fr; }
  .oklist { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  main, .top, .foot { padding: 0 16px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  .hero { padding-top: 5vh; }
  .scan { flex-direction: column; border-radius: 22px; }
  .field { padding: 4px 10px; }
  .go { justify-content: center; padding: 14px; border-radius: 16px; }
  .summary { flex-direction: column; text-align: center; padding: 26px 20px; gap: 18px; }
  .actions { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: 1fr; }
  .item summary { gap: 12px; padding: 16px; }
  .item-body { padding: 0 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .top, .hero, .foot, .actions, .filters, .copy, .grain, .theme { display: none !important; }
  body { background: #fff; }
  .item-body { display: grid !important; }
  .item, .cat, .summary { break-inside: avoid; box-shadow: none; }
  details:not([open]) > :not(summary) { display: block; }
}

/* ── Отчёт v2: важность, план, находки ── */
.small { font-size: 13px; }
.sev-counts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sev-counts li { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: color-mix(in oklab, var(--c) 12%, transparent); font-size: 14px; color: var(--ink); }
.sev-counts b { font: 700 16px var(--display); color: var(--c); font-variant-numeric: tabular-nums; }
.score-num small { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; }

.plan-block { margin-top: 28px; }
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 16px; }
.plan-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--display); background: var(--accent); color: var(--accent-ink); }
.plan-step { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sev-tag { color: var(--c); }
.plan-title { display: block; margin: 3px 0 2px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.plan-title:hover { color: var(--accent); text-decoration: underline; }
.plan-reach { font-size: 13px; color: var(--muted); }

.sev-badge { justify-self: start; padding: 5px 9px; border-radius: 8px; font: 700 11px var(--mono); letter-spacing: .04em; background: color-mix(in oklab, var(--c) 14%, transparent); color: var(--c); }
.item-code { font: 500 12px var(--mono); color: var(--muted); margin-bottom: 3px; }
.found { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; }
.found li { font: 13px/1.45 var(--mono); padding: 6px 10px; background: color-mix(in oklab, var(--line) 50%, transparent); border-radius: 8px; word-break: break-all; }
.found a { color: var(--accent); text-decoration: none; }
.found a:hover { text-decoration: underline; }
.found .more { background: none; color: var(--muted); font-family: var(--body); }
.ai { position: relative; justify-self: start; }
.ai-btn { background: linear-gradient(100deg, var(--accent), var(--accent-soft)); border: 0; }
.ai-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 5; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: grid; }
.ai-menu[hidden] { display: none !important; }
.ai-menu button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.ai-menu button:hover { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.group-filter { margin: -6px 0 12px; font-size: 14px; color: var(--muted); }
.group-filter button { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 0; text-decoration: underline; }
.filters { flex-wrap: wrap; }
@media (max-width: 600px) {
  .item summary { grid-template-columns: 1fr auto; }
  .item summary .sev-badge { grid-column: 1 / -1; }
  .item-body { padding: 0 16px 16px; }
  .sev-counts { justify-content: center; }
  .plan li { grid-template-columns: 32px 1fr; padding: 14px; }
}

/* ── Отчёт v3 (спецификация 275) ── */
.rings { display: flex; gap: 14px; align-items: center; flex: none; }
.small-ring { width: 118px; height: 118px; }
.small-ring .score-num b { font-size: 34px; }
.small-ring .score-num small { font-size: 9px; line-height: 1.25; }
.small-ring .ring-fg { stroke: var(--grade); }
.coverage { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.coverage b { color: var(--ink); }
.cats { grid-template-columns: repeat(4, 1fr); }
.cat-off { opacity: .7; }
.cat-off .cat-score { color: var(--muted); }
.cat-off .cat-counts span { font-size: 12px; }
.msg { font-weight: 600; }
.exc { font-size: 13px; color: var(--muted); margin: 0; }
.quality-block .block-head { flex-direction: column; align-items: flex-start; gap: 4px; }
.engine-note { margin-top: 30px; text-align: center; }
@media (max-width: 860px) { .cats { grid-template-columns: repeat(2, 1fr); } .rings { justify-content: center; } }
@media (max-width: 600px) { .cats { grid-template-columns: 1fr; } .rings { flex-wrap: wrap; } }

.cat-counts { flex-wrap: wrap; gap: 4px 12px; }
.cat-counts span { white-space: nowrap; }

.lab { margin: 10px 0 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.lab span { font-weight: 700; font-variant-numeric: tabular-nums; }
.lab small { flex-basis: 100%; color: var(--muted); }

.cats > * { min-width: 0; }
.cat-off .cat-counts span { white-space: normal; }

/* ── История, сравнение, профиль, лаборатория ── */
.diff-block, .lab-block { margin-top: 14px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.diff-counts { list-style: none; padding: 0; margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.diff-counts li { padding: 6px 12px; border-radius: 999px; background: color-mix(in oklab, var(--line) 60%, transparent); font-size: 14px; }
.diff-counts b { font: 700 16px var(--display); margin-right: 4px; }
.d-RESOLVED { --dc: var(--ok); } .d-NEW { --dc: var(--high); } .d-REGRESSED { --dc: var(--bad); } .d-NOT_RECHECKED { --dc: var(--info); } .d-FIRST_OBSERVED, .d-PERSISTING { --dc: var(--muted); }
.diff-counts li[class] b { color: var(--dc); }
.diff-changes { margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.diff-group { margin-top: 8px; font-size: 14px; }
.diff-group summary { cursor: pointer; color: var(--dc, var(--ink)); }
.diff-group ul { margin: 6px 0 0; padding-left: 18px; }
.diff-group .rule { font: 600 12px var(--mono); color: var(--muted); }
.diff-group small { display: block; color: var(--muted); }
.diff-tag { font-weight: 700; color: var(--dc); }
.warn-note { background: color-mix(in oklab, var(--warn) 14%, transparent); padding: 8px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 10px; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.hist li { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.hist li.cur { border-color: var(--accent); }
.hist a { color: var(--accent); font-weight: 600; text-decoration: none; }
.hist .hs { font: 700 18px var(--display); margin-left: auto; }
.lab-wait { display: flex; gap: 14px; align-items: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
.lab-table-wrap { overflow-x: auto; }
.lab-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.lab-table th, .lab-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lab-table td small { color: var(--muted); display: block; font-size: 11px; }
.lab-table td.over { color: var(--bad); font-weight: 700; }
.profile-block { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.profile-block > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.profile-block > summary::-webkit-details-marker { display: none; }
.prof { display: grid; gap: 12px; margin-top: 14px; }
.prof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.prof label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.prof select, .prof input:not([type=checkbox]) { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-width: 0; }
.prof .chk { display: flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 600; }
.sec-table { display: grid; gap: 6px; }
.sec-row { display: grid; grid-template-columns: minmax(0, 1.4fr) 70px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.sec-row code { font: 13px var(--mono); overflow: hidden; text-overflow: ellipsis; }
.intent-ask { background: color-mix(in oklab, var(--accent) 7%, transparent); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: grid; gap: 6px; }
.intent-ask.busy { opacity: .5; pointer-events: none; }
.ia-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ia-row span { font: 12px var(--mono); flex: 1 1 200px; min-width: 0; word-break: break-all; }
.ia-row.all span { font-family: var(--body); font-weight: 700; }
.ia-row button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.ia-row button:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) { .prof-grid { grid-template-columns: 1fr; } .sec-row { grid-template-columns: 1fr 1fr; } .sec-row code { grid-column: 1 / -1; } }
