:root {
  /* Commerce dashboard palette — calm, confident, single primary blue, severity by
     thin left stripe only, no full pastel surfaces. */
  --bg: #ffffff;
  --bg-soft: #f0f4fa;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #0b1f33;
  --muted: #6c83a0;
  --line: #e3e9f2;
  --accent: #005bff;
  --accent-strong: #003bbf;
  --teal: #0f766e;
  --teal-soft: rgba(15, 118, 110, 0.1);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.08);
  --critical: #b42318;
  --success: #15803d;
  --info: #2563eb;
  /* Layered modern B2B shadow — tight inner + soft outer.
     Replaces the old `0 18px 40px` single heavy drop (engineering look) with
     a more "product-grade dashboard" feel. Each panel sits, doesn't float. */
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 10px 30px -14px rgba(17, 24, 39, 0.12);
  /* Radius scale — was flat 8px everywhere (bootstrap-default look).
     Now a real hierarchy: hero panels round more, controls round less.
     Kept tight (16/12/10) for a precise fintech-dashboard feel, not bubbly. */
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-pill: 999px;

  /* Accent-soft surface for badges, chips, counts. */
  --accent-soft: #eaf1ff;

  /* ── v08 Marketplace base + theme-ready tokens (Фаза 1 миграции дизайна) ── */
  /* Field/sub-surface background (бывший #f8fafc хардкод, ×19). */
  --field-bg: #f8fafc;
  /* Текст поверх акцент-заливки (кнопки/градиенты) — белый во всех светлых темах. */
  --on-accent: #ffffff;
  /* v08 вторичный акцент — магента (ценник, brand-mark, crit-плашка). */
  --magenta: #f1117e;
  --magenta-ink: #c70a64;

  /* ── 2026 premium refresh (additive, никаких переименований) ── */
  /* Brighter accent stop for gradients; base accent stays var(--accent). */
  --accent-2: #2e79ff;
  /* Vertical gradient for the primary CTA — light top, deep bottom. */
  --accent-grad: linear-gradient(180deg, #2e79ff 0%, #005bff 52%, #003bbf 100%);
  /* Diagonal gradient for the brand glyph — v08 синий → магента. */
  --brand-grad: linear-gradient(135deg, #005bff 55%, #f1117e 130%);
  /* Glass surface for the sticky header (translucent + blur). */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-blur: saturate(180%) blur(14px);
  /* Focus ring — accessible 3px halo at low alpha. */
  --ring: 0 0 0 3px rgba(0, 91, 255, 0.30);
  /* Motion — one easing + duration for cohesive micro-interactions. */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 180ms;
  /* Card shadow — hairline top highlight (inset) + soft layered drop. */
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 1px 2px rgba(17, 24, 39, 0.05), 0 12px 32px -14px rgba(17, 24, 39, 0.14);
  /* CTA shadow — blue-tinted, with inner sheen line. */
  --shadow-cta: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 6px rgba(24, 71, 199, 0.26), 0 10px 24px -8px rgba(24, 71, 199, 0.42);
  --shadow-cta-hover: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 4px 10px rgba(24, 71, 199, 0.30), 0 16px 34px -10px rgba(24, 71, 199, 0.50);
  /* Floating popover / modal shadow. */
  --shadow-pop: 0 24px 60px -20px rgba(17, 24, 39, 0.30);

  /* Severity palette (paired with shape glyph for a11y — no color-only signal).
     Two families: card chrome (border + left stripe) and badge (bg + ink). */
  --severity-low-border: #bfdbfe;
  --severity-low-stripe: var(--accent);
  --severity-low-bg: #eff6ff;
  --severity-low-ink: var(--accent-strong);
  --severity-medium-border: #fed7aa;
  --severity-medium-stripe: #f97316;
  --severity-medium-bg: #fff7ed;
  --severity-medium-ink: #c2410c;
  --severity-critical-border: #fecaca;
  --severity-critical-stripe: #dc2626;
  --severity-critical-bg: #fef2f2;
  --severity-critical-ink: #b91c1c;

  /* Success/verified family (бывшие зелёные хардкоды; Фаза 3 — темится). */
  --success-bg: #ecfdf5;
  --success-border: #bbf7d0;
  --success-ink: #15803d;
  --success-stripe: #059669;

  /* Shadow scale (existing --shadow stays as a wider drop for hero panels). */
  --shadow-1: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-2: 0 6px 20px rgba(17, 24, 39, 0.10);
}

/* ─────────────────────────────────────────────────────────────
   5 принятых тем (D-057). Каждый блок переопределяет ПОЛНЫЙ core-набор
   токенов, чтобы переключение между любыми темами было полным.
   Скоуп строго html[data-theme="vXX"] (НЕ [data-theme]) — иначе селектор
   матчит сами кнопки-чипы переключателя (баг прототипа).
   Дефолт (:root выше) = v08. Тёмные темы закаляются в Фазе 3
   (severity-контраст, glass, mesh-фоны, score-кольцо).
   ───────────────────────────────────────────────────────────── */

/* v08 — Маркетплейс (явный блок = дефолт; нужен для возврата с других тем) */
html[data-theme="v08"] {
  --bg: #ffffff; --bg-soft: #f0f4fa; --panel: #ffffff; --panel-strong: #ffffff;
  --ink: #0b1f33; --muted: #6c83a0; --line: #e3e9f2;
  --accent: #005bff; --accent-strong: #003bbf; --accent-soft: #eaf1ff; --accent-2: #2e79ff;
  --on-accent: #ffffff; --field-bg: #f8fafc;
  --accent-grad: linear-gradient(180deg, #2e79ff 0%, #005bff 52%, #003bbf 100%);
  --brand-grad: linear-gradient(135deg, #005bff 55%, #f1117e 130%);
  --glass-bg: rgba(255, 255, 255, 0.72); --ring: 0 0 0 3px rgba(0, 91, 255, 0.30);
  --magenta: #f1117e; --magenta-ink: #c70a64;
}

/* v03 — Жёлтый × чёрный (акцент = чёрный, заливка жёлтая, текст-на-акценте жёлтый) */
html[data-theme="v03"] {
  --bg: #ffdd2d; --bg-soft: #ffe684; --panel: #ffffff; --panel-strong: #ffffff;
  --ink: #1c1c1e; --muted: rgba(28, 28, 30, 0.64); --line: rgba(28, 28, 30, 0.14);
  --accent: #1c1c1e; --accent-strong: #000000; --accent-soft: rgba(28, 28, 30, 0.08); --accent-2: #1c1c1e;
  --on-accent: #ffdd2d; --field-bg: #ffffff;
  --accent-grad: linear-gradient(180deg, #2a2a2c 0%, #1c1c1e 100%);
  --brand-grad: linear-gradient(135deg, #1c1c1e, #000000);
  --glass-bg: rgba(255, 221, 45, 0.82); --ring: 0 0 0 3px rgba(28, 28, 30, 0.30);
  --magenta: #1c1c1e; --magenta-ink: #1c1c1e;
}

/* v10 — Аврора (тёмная, индиго/бирюза; панели сплошные тёмные для читаемости вложений) */
html[data-theme="v10"] {
  --bg: #0d1024; --bg-soft: #161a33; --panel: #171a30; --panel-strong: #1c2038;
  --ink: #eef0ff; --muted: rgba(238, 240, 255, 0.64); --line: rgba(255, 255, 255, 0.12);
  --accent: #8b93ff; --accent-strong: #4f46e5; --accent-soft: rgba(79, 70, 229, 0.20); --accent-2: #2dd4bf;
  --on-accent: #ffffff; --field-bg: rgba(255, 255, 255, 0.06);
  --accent-grad: linear-gradient(115deg, #2dd4bf 0%, #4f46e5 100%);
  --brand-grad: linear-gradient(135deg, #2dd4bf 0%, #4f46e5 62%, #f472b6 120%);
  --glass-bg: rgba(13, 16, 36, 0.74); --ring: 0 0 0 3px rgba(139, 147, 255, 0.35);
  --magenta: #f472b6; --magenta-ink: #f9a8d4;
  /* severity/success на тёмном — полупрозрачные тинты + светлый ink (контраст + glyph для a11y) */
  --severity-low-bg: rgba(139, 147, 255, 0.12); --severity-low-border: rgba(139, 147, 255, 0.34); --severity-low-stripe: #8b93ff; --severity-low-ink: #c7cbff;
  --severity-medium-bg: rgba(250, 204, 21, 0.10); --severity-medium-border: rgba(250, 204, 21, 0.32); --severity-medium-stripe: #facc15; --severity-medium-ink: #fde68a;
  --severity-critical-bg: rgba(244, 114, 182, 0.12); --severity-critical-border: rgba(244, 114, 182, 0.40); --severity-critical-stripe: #f472b6; --severity-critical-ink: #f9a8d4;
  --success-bg: rgba(45, 212, 191, 0.12); --success-border: rgba(45, 212, 191, 0.34); --success-ink: #7ff0e1; --success-stripe: #2dd4bf;
}

/* v05 — iOS-стекло (светлая пастель; панели полупрозрачные, blur добавится в Фазе 3) */
html[data-theme="v05"] {
  --bg: #eef1fa; --bg-soft: #e7ebf8; --panel: rgba(255, 255, 255, 0.80); --panel-strong: rgba(255, 255, 255, 0.90);
  --ink: #1c2030; --muted: rgba(27, 33, 64, 0.62); --line: rgba(255, 255, 255, 0.70);
  --accent: #5b51d8; --accent-strong: #4a40c0; --accent-soft: rgba(91, 81, 216, 0.12); --accent-2: #9d7bff;
  --on-accent: #ffffff; --field-bg: rgba(255, 255, 255, 0.72);
  --accent-grad: linear-gradient(135deg, #ff6fb1 0%, #9d7bff 52%, #4f9dff 100%);
  --brand-grad: linear-gradient(135deg, #ff7ab8 0%, #9d7bff 55%, #58a6ff 100%);
  --glass-bg: rgba(255, 255, 255, 0.65); --ring: 0 0 0 3px rgba(91, 81, 216, 0.30);
  --magenta: #ee3b6e; --magenta-ink: #d23d6d;
}

/* v02 — Тёмный неон (тёмная, циан/фиолет; текст-на-акценте тёмный — заливка яркая) */
html[data-theme="v02"] {
  --bg: #0a0b14; --bg-soft: #10121f; --panel: #14162a; --panel-strong: #191b30;
  --ink: #e7e9f5; --muted: #8b8fa8; --line: rgba(255, 255, 255, 0.08);
  --accent: #22d3ee; --accent-strong: #0fb5d0; --accent-soft: rgba(34, 211, 238, 0.12); --accent-2: #a78bfa;
  --on-accent: #0a0b14; --field-bg: #14162a;
  --accent-grad: linear-gradient(95deg, #22d3ee 0%, #a78bfa 100%);
  --brand-grad: linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
  --glass-bg: rgba(10, 11, 20, 0.74); --ring: 0 0 0 3px rgba(34, 211, 238, 0.35);
  --magenta: #fb7185; --magenta-ink: #fda4af;
  /* severity/success на тёмном — полупрозрачные тинты + светлый ink (контраст + glyph для a11y) */
  --severity-low-bg: rgba(34, 211, 238, 0.10); --severity-low-border: rgba(34, 211, 238, 0.32); --severity-low-stripe: #22d3ee; --severity-low-ink: #7fe9f7;
  --severity-medium-bg: rgba(251, 191, 36, 0.10); --severity-medium-border: rgba(251, 191, 36, 0.34); --severity-medium-stripe: #fbbf24; --severity-medium-ink: #fcd34d;
  --severity-critical-bg: rgba(251, 113, 133, 0.12); --severity-critical-border: rgba(251, 113, 133, 0.40); --severity-critical-stripe: #fb7185; --severity-critical-ink: #fda4af;
  --success-bg: rgba(52, 211, 153, 0.10); --success-border: rgba(52, 211, 153, 0.34); --success-ink: #6ee7b7; --success-stripe: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  /* Subtle top glow over the flat gray — adds depth without hurting legibility. */
  background: radial-gradient(1200px 620px at 50% -8%, var(--panel) 0%, var(--bg) 58%) no-repeat,
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.72;
}

.is-hidden {
  display: none !important;
}

.page-shell {
  width: min(1220px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 36px;
  position: relative;
}

.page-shell::before,
.page-shell::after {
  display: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 14px;
  padding: 9px 16px;
  /* Glass sticky header — translucent + backdrop blur so content scrolls under
     with depth instead of a flat white slab. Falls back to solid panel. */
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(221, 227, 234, 0.7);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 22px -14px rgba(17, 24, 39, 0.22);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-header {
    background: var(--panel);
  }
}
.app-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  /* Gradient glyph + inner highlight + soft blue glow — reads like a real product mark. */
  background: var(--brand-grad);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px -3px rgba(24, 71, 199, 0.5);
}
.app-brand-name {
  font-family: "Unbounded", inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}
.app-header-status {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.card-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink);
}
.card-status-pill[data-state="loaded"] {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}
.card-status-pill[data-state="ready"] {
  border-color: var(--severity-low-border);
  background: var(--severity-low-bg);
  color: var(--severity-low-ink);
}
.card-status-pill[data-state="error"] {
  border-color: var(--severity-critical-border);
  background: var(--severity-critical-bg);
  color: var(--severity-critical-ink);
}
.card-status-marketplace {
  font-weight: 700;
}
.card-status-divider {
  color: var(--muted);
}
.card-status-label {
  color: var(--muted);
}
.card-status-pill[data-state]:not([data-state="idle"]) .card-status-label {
  color: inherit;
}
.app-header-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.app-header-nav::-webkit-scrollbar {
  display: none;
}
.app-nav-link {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.app-nav-link:hover {
  color: var(--ink);
  background: rgba(17, 24, 39, 0.05);
}
.app-nav-link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.app-nav-link.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(30, 91, 255, 0.18);
}
.app-header-auth {
  position: relative;
  flex: 0 0 auto;
}
.app-auth-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.app-auth-button:hover {
  border-color: var(--accent);
}
.app-auth-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.app-auth-button[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.app-auth-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.app-auth-caret {
  font-size: 10px;
  color: var(--muted);
}
.app-auth-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 260px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
  z-index: 40;
}
.app-auth-menu-section {
  padding: 6px;
  border-bottom: 1px solid var(--line);
}
.app-auth-menu-section:last-child {
  border-bottom: none;
}
.app-auth-menu-title {
  margin: 4px 6px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.app-auth-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.app-auth-menu-item:hover {
  background: var(--bg);
}
.app-auth-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.app-auth-menu-item:disabled,
.app-auth-menu-item[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}
.app-auth-menu-tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.brand-lockup {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 800;
}

.brand-lockup .eyebrow {
  margin: 0;
}

.brand-lockup h1,
.panel h2,
.block-heading h3 {
  font-family: "Unbounded", sans-serif;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.header-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid var(--line);
}

.chip.accent {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent-soft);
}

button.chip {
  font-family: inherit;
  font-size: 0.82rem;
}
.chip-action {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.chip-action:hover {
  background: var(--line);
  border-color: var(--accent-strong);
}
.chip-action:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}
.chip-action:active {
  transform: translateY(1px);
}

.content-card-top,
.panel-header,
.block-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(0, 91, 255, 0.16);
}

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

/* Компактный вход сверху: не растягиваем на всю ширину, результаты ниже — полные */
.input-panel {
  max-width: 760px;
}

/* Навигация по разбору: липкие якоря-переходы, чтобы длинный результат не скроллить вслепую */
.result-nav {
  position: sticky;
  top: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 0;
  background: var(--panel);
}
.result-tabs {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.result-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}
.result-tab:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}
.result-tab.is-active {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.16);
}
.result-tab:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}
.result-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
}
.result-tab.is-active .result-tab-count {
  background: rgba(255, 255, 255, 0.26);
  color: var(--on-accent);
}
.result-tab-count:empty {
  display: none;
}
/* Tabs: show only the active group's sections (the sticky nav itself has no group). */
#results[data-active-tab="diagnosis"] [data-result-tab-group]:not([data-result-tab-group="diagnosis"]),
#results[data-active-tab="media"] [data-result-tab-group]:not([data-result-tab-group="media"]),
#results[data-active-tab="basis"] [data-result-tab-group]:not([data-result-tab-group="basis"]),
#results[data-active-tab="card"] [data-result-tab-group]:not([data-result-tab-group="card"]) {
  display: none;
}
.result-nav-stats {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.result-nav-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.74rem;
  line-height: 1.2;
}
.result-nav-stat-label {
  color: var(--muted);
  font-weight: 700;
}
.result-nav-stat-value {
  max-width: 18ch;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* P1.3 — mobile sticky-density: keep result-nav <= ~96px tall on narrow phones.
   Single-row horizontal-scroll strip for tabs and stats (modern mobile pattern). */
@media (max-width: 480px) {
  .result-nav {
    padding: 6px 0;
    gap: 4px;
  }
  .result-tabs,
  .result-nav-stats {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .result-tabs::-webkit-scrollbar,
  .result-nav-stats::-webkit-scrollbar {
    display: none;
  }
  .result-tab,
  .result-nav-stat {
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .result-tab {
    padding: 7px 13px;
    font-size: 0.82rem;
  }
  .result-nav-stat {
    padding: 4px 10px;
    font-size: 0.7rem;
  }
}

.install-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  background: var(--severity-medium-bg);
  border: 1px solid var(--severity-medium-border);
  box-shadow: var(--shadow);
}

.install-banner-copy {
  display: grid;
  gap: 8px;
}

.install-banner-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.install-banner-title {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1rem, 3vw, 1.35rem);
}

.install-banner-text {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.65;
}

.install-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.install-cta,
.install-dismiss {
  min-width: 132px;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 18px;
}

.panel h2 {
  margin: 6px 0 0;
  font-size: 1.3rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--field-bg);
}

.draft-status-neutral {
  background: var(--field-bg);
}

.draft-status-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.draft-status-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.draft-status-copy {
  display: grid;
  gap: 4px;
}

.draft-status-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.draft-status-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.draft-button {
  width: auto;
  min-width: 0;
  flex-shrink: 0;
}

.ghost-button,
.primary-button {
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  min-height: 44px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.ghost-button {
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 700;
  border: 1px solid var(--line);
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  /* Gradient CTA — light top → deep bottom, with inner sheen + blue-tinted lift.
     Modern fintech feel; still calm, not a candy button. */
  background: var(--accent-grad);
  color: var(--on-accent);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-cta);
}
.primary-button:hover {
  box-shadow: var(--shadow-cta-hover);
}

/* P1.4 unified button states: same focus ring as .chip-action/.result-tab + active press. */
.primary-button:focus-visible,
.ghost-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(0);
}

.card-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card-form label,
.form-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.link-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.link-first-field {
  gap: 10px;
}

.link-import-button {
  white-space: nowrap;
}

.card-form input,
.card-form select,
.card-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  color: var(--ink);
  line-height: 1.5;
  resize: vertical;
}

.card-form input:focus,
.card-form select:focus,
.card-form textarea:focus {
  outline: 2px solid rgba(0, 91, 255, 0.25);
  border-color: rgba(0, 91, 255, 0.3);
}

.form-hint {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.link-import-status {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.link-import-status[hidden] {
  display: none;
}

.link-import-status-neutral {
  background: var(--field-bg);
}

.link-import-status-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.link-import-status-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.link-import-status-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.link-import-status-pill,
.link-import-status-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.link-import-status-pill {
  padding: 7px 10px;
  background: rgba(15, 124, 116, 0.12);
  color: var(--teal);
}

.link-import-status-title {
  color: var(--ink);
}

.link-import-status-message {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.link-import-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-import-status-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.link-import-status-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
}

.link-import-status-group-known {
  border-color: var(--success-border);
  background: var(--success-bg);
}

.link-import-status-group-blocked {
  border-color: var(--severity-medium-border);
  background: var(--field-bg);
}

.link-import-status-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0;
}

.link-import-status-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-import-status-group li {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
}

.link-import-status-scope {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 124, 116, 0.18);
  background: var(--field-bg);
}

.link-import-status-scope-item {
  display: grid;
  gap: 3px;
}

.link-import-status-scope-item span {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.link-import-status-scope-item p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .link-import-status-groups {
    grid-template-columns: 1fr;
  }
}

.link-import-status-tags span {
  padding: 7px 10px;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}

.manual-fields {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--field-bg);
}

.manual-fields summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
  list-style: none;
}

.manual-fields summary::-webkit-details-marker {
  display: none;
}

.manual-fields summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  flex: 0 0 auto;
}

.manual-fields[open] summary::after {
  content: "−";
}

.manual-fields summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.manual-fields-grid {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.legal-consent {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.legal-consent-neutral {
  background: var(--field-bg);
}

.legal-consent-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.legal-consent-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.legal-consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  cursor: pointer;
}

.legal-consent-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
  flex: 0 0 auto;
}

.legal-consent-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
}

.legal-consent-links,
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.legal-consent-links a,
.app-footer a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.legal-consent-links a:hover,
.app-footer a:hover {
  text-decoration: underline;
}

.app-footer a.is-disabled,
.app-footer a.is-disabled:hover {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
  text-decoration: none;
}

.live-pill,
.meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.live-pill {
  padding: 10px 12px;
  background: rgba(15, 124, 116, 0.1);
  border-radius: 999px;
  color: var(--teal);
}

.runtime-status {
  margin-top: 14px;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.runtime-status-neutral {
  background: var(--field-bg);
}

.runtime-status-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.runtime-status-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.runtime-status-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.runtime-status-badge,
.runtime-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.runtime-status-badge {
  padding: 7px 10px;
  background: rgba(17, 24, 39, 0.06);
  color: var(--ink);
}

.runtime-status-pill {
  padding: 7px 12px;
  background: rgba(15, 124, 116, 0.12);
  color: var(--teal);
}

.runtime-status-title {
  margin: 12px 0 6px;
  font-size: 1rem;
  font-weight: 800;
}

.runtime-status-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.64;
}

.runtime-status-details {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.provider-mode {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 10px;
}

.provider-mode[hidden] {
  display: none;
}

.provider-mode-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.provider-mode-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  margin: 0;
}

.provider-mode-copy {
  display: grid;
  gap: 2px;
}

.provider-mode-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.provider-mode-caption {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
}

.provider-mode-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.runtime-status-detail-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.empty-state {
  margin-top: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--field-bg);
  color: var(--muted);
}

.status-state {
  margin-top: 16px;
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--line);
  min-height: 118px;
}

.loading-state {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.error-state {
  background: var(--severity-critical-bg);
  border-color: var(--severity-critical-border);
}

.status-state-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.status-state-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
}

.results.is-hidden {
  display: none;
}

.score-strip,
.cards-grid,
.content-stack,
.review-stack,
.history-list {
  display: grid;
  gap: 14px;
}

.score-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.score-card,
.insight-card,
.content-card,
.history-item {
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
}

.score-card {
  padding: 14px;
}

.score-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.score-value {
  margin-top: 12px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
}

.data-coverage-block {
  margin-top: 14px;
}

.data-coverage-card {
  display: grid;
  gap: 14px;
  border-color: var(--severity-low-border);
  box-shadow: inset 4px 0 0 var(--accent);
}

.data-coverage-card-warn {
  border-color: var(--severity-medium-border);
  box-shadow: inset 4px 0 0 var(--severity-medium-stripe);
}

.data-coverage-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.data-coverage-fact {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

.data-coverage-fact span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.data-coverage-fact strong {
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.35;
}

.data-coverage-fact-ok {
  border-color: var(--success-border);
}

.data-coverage-fact-warn {
  border-color: var(--severity-medium-border);
  background: var(--severity-medium-bg);
}

.data-coverage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.data-coverage-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--field-bg);
}

.data-coverage-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
}

.data-coverage-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Per-field actionable recommendations list — конкретные действия для seller'а
   под каждым полем (Цена / Описание / Фото / Рейтинг / Отзывы). Заменил
   декоративное «не оцениваем» на реальную ценность. По CLAUDE.md SellerCopilot:
   «диагностика + понятные действия для роста продаж». */
.data-coverage-recs {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  list-style: disc;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}
.data-coverage-recs li {
  margin: 0 0 4px;
}
.data-coverage-recs li:last-child {
  margin-bottom: 0;
}

.data-coverage-status {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--muted);
}

.data-coverage-item-known .data-coverage-status {
  background: var(--success-stripe);
}

.data-coverage-item-partial .data-coverage-status {
  background: var(--accent);
}

.data-coverage-item-blocked .data-coverage-status,
.data-coverage-item-missing .data-coverage-status {
  background: var(--severity-medium-stripe);
}

.action-plan-block {
  margin-top: 14px;
}

.action-plan-card {
  display: grid;
  gap: 14px;
  border-color: var(--severity-low-border);
  box-shadow: inset 4px 0 0 var(--accent);
}

.action-plan-queue {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-plan-queue-item {
  min-width: 0;
}

.action-plan-queue-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.action-plan-queue-link:hover,
.action-plan-queue-link:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.action-plan-queue-item-critical .action-plan-queue-link {
  border-color: var(--severity-critical-border);
}

.action-plan-queue-item-medium .action-plan-queue-link {
  border-color: var(--severity-medium-border);
}

.action-plan-queue-item-low .action-plan-queue-link {
  border-color: var(--severity-low-border);
}

.action-plan-queue-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-accent);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.action-plan-queue-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.action-plan-queue-text {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.45;
}

.action-plan-queue-impact {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.4;
}

.action-plan-queue-cue {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.action-plan-list {
  display: grid;
  gap: 10px;
}

.action-plan-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  scroll-margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.action-plan-item:focus-visible {
  outline: 3px solid rgba(0, 129, 138, 0.25);
  outline-offset: 2px;
}

.action-plan-item-critical {
  border-color: var(--severity-critical-border);
  background: var(--severity-critical-bg);
}

.action-plan-item-medium {
  border-color: var(--severity-medium-border);
  background: var(--severity-medium-bg);
}

.action-plan-item-low {
  border-color: var(--severity-low-border);
  background: var(--severity-low-bg);
}

.action-plan-step {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-accent);
  font-weight: 900;
}

.action-plan-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.action-plan-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.action-plan-problem {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.action-plan-item h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.action-plan-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.action-plan-breakdown {
  display: grid;
  gap: 8px;
}

.action-plan-point {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.action-plan-point strong {
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.action-plan-point span {
  color: var(--muted);
}

.action-plan-point-now {
  border-color: var(--severity-low-border);
  background: var(--severity-low-bg);
  box-shadow: inset 3px 0 0 var(--accent);
}

.action-plan-point-now strong {
  color: var(--accent-strong);
}

.action-plan-point-now span {
  color: var(--ink);
  font-weight: 750;
}

.action-plan-check {
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.action-plan-check strong {
  color: var(--ink);
}

.results-block {
  margin-top: 18px;
}

.block-heading {
  margin-bottom: 14px;
}

.block-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.block-heading p {
  margin: 2px 0 0;
  color: var(--muted);
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.insight-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.insight-card.problem {
  background: var(--panel);
}

.insight-card.improvement {
  background: var(--panel);
}

.insight-card.severity-critical {
  border-color: var(--severity-critical-border);
  box-shadow: inset 4px 0 0 var(--severity-critical-stripe);
}

.insight-card.severity-medium {
  border-color: var(--severity-medium-border);
  box-shadow: inset 4px 0 0 var(--severity-medium-stripe);
}

.insight-card.severity-low {
  border-color: var(--severity-low-border);
  box-shadow: inset 4px 0 0 var(--severity-low-stripe);
}

.insight-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.insight-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  min-height: 32px;
}

.problem .insight-tag {
  background: var(--warn-soft);
  color: var(--warn);
}

.improvement .insight-tag {
  background: var(--teal-soft);
  color: var(--teal);
}

.severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.severity-badge-critical {
  color: var(--severity-critical-ink);
  background: var(--severity-critical-bg);
}

.severity-badge-medium {
  color: var(--severity-medium-ink);
  background: var(--severity-medium-bg);
}

.severity-badge-low {
  color: var(--severity-low-ink);
  background: var(--severity-low-bg);
}

.severity-badge-icon {
  margin-right: 6px;
  font-size: 0.85em;
  line-height: 1;
}

.insight-flow {
  display: grid;
  gap: 10px;
}

.insight-flow-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--field-bg);
  border: 1px solid var(--line);
}

.insight-flow-item.action {
  background: var(--severity-low-bg);
  border-color: var(--severity-low-border);
}

.insight-flow-item-breakdown {
  background: var(--panel);
}

.insight-flow-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.insight-card h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.insight-card p,
.body-copy {
  margin: 0;
  line-height: 1.72;
  color: var(--muted);
}

.content-stack {
  margin-top: 0;
}

.content-card {
  padding: 14px;
}

.audit-meta-card {
  display: grid;
  gap: 12px;
}

.compare-card {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.compare-actions {
  display: grid;
  gap: 10px;
}

.compare-before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compare-side {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.compare-side-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.compare-side-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.compare-side-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compare-side strong {
  font-size: 0.98rem;
}

.compare-side span:not(.compare-side-label) {
  font-weight: 900;
  color: var(--ink);
}

.compare-side p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.compare-apply-button {
  width: 100%;
}

.compare-apply-hint {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.compare-card-neutral {
  background: var(--panel);
}

.compare-card-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.compare-card-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.audit-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.compare-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 124, 116, 0.1);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.export-status {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.export-status-neutral {
  color: var(--muted);
}

.export-status-success {
  color: var(--teal);
}

.export-status-warn {
  color: var(--warn);
}

.inline-button {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  min-height: 40px;
}

.quick-copy-button {
  white-space: nowrap;
}

.content-label {
  font-weight: 800;
}

.title-output {
  margin: 12px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 700;
}

.rich-list,
.faq-list,
.tag-list {
  margin-top: 12px;
}

.rich-list {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.72;
  color: var(--muted);
}

.faq-list,
.tag-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--field-bg);
  border: 1px solid var(--line);
}

.faq-item strong {
  display: block;
  margin-bottom: 6px;
}

.tag-list {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.photo-task-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.photo-task-notice {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--severity-medium-border);
  background: var(--severity-medium-bg);
  color: var(--ink);
  line-height: 1.5;
}

.photo-task-notice strong {
  font-size: 0.82rem;
  text-transform: uppercase;
}

.photo-task-notice span {
  color: var(--muted);
}

.photo-task-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.photo-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.photo-task-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--severity-low-bg);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
}

.photo-task-body {
  display: grid;
  gap: 8px;
}

.photo-task-point {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.photo-task-point strong {
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tag-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--teal);
  font-weight: 700;
}

.double-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--field-bg);
  border: 1px solid var(--line);
}

.review-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.review-theme {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(0, 91, 255, 0.12);
  color: var(--accent-strong);
}

.history-card {
  display: flex;
  flex-direction: column;
}

.history-list {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
}

.history-card .export-status {
  margin-top: 12px;
}

.history-item {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.history-item-top,
.history-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.history-item-title {
  font-weight: 800;
}

.history-item-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.history-diff {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
}

.history-diff-neutral {
  background: var(--field-bg);
}

.history-diff-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.history-diff-warn {
  background: var(--severity-medium-bg);
  border-color: var(--severity-medium-border);
}

.history-diff-accent {
  background: var(--severity-low-bg);
  border-color: var(--severity-low-border);
}

.history-diff-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.history-diff-badge,
.history-diff-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.history-diff-badge {
  padding: 7px 10px;
  background: var(--bg-soft);
  color: var(--ink);
}

.history-diff-summary {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.58;
}

.history-diff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-diff-tag {
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}

.history-button {
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  min-height: 40px;
  cursor: pointer;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-weight: 700;
}

.history-empty {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.app-footer {
  justify-content: center;
  margin-top: 22px;
  padding: 18px 12px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 12px, 0);
  }
}

@media (max-width: 1080px) {
  .app-header,
  .workspace,
  .cards-grid,
  .double-grid,
  .score-strip {
    grid-template-columns: 1fr;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .install-banner,
  .panel {
    border-radius: var(--radius-xl);
    padding: 14px;
  }

  .field-grid,
  .compare-before-after,
  .data-coverage-list,
  .data-coverage-strip,
  .link-input-row,
  .tag-list {
    grid-template-columns: 1fr;
  }

  .install-banner,
  .app-header,
  .panel-header,
  .draft-status,
  .content-card-top,
  .block-heading,
  .history-item-top,
  .history-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-lockup h1 {
    font-size: clamp(1.35rem, 8vw, 1.9rem);
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .draft-status .draft-button {
    width: auto;
  }

  .action-plan-item {
    grid-template-columns: 1fr;
  }

  .action-plan-queue-link {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .action-plan-queue-cue {
    grid-column: 2;
    justify-self: start;
  }

  .action-plan-step {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   B2B dashboard shell (UI rewrite) — sections, summary, mobile
   ============================================================ */

/* Visually-hidden but readable by screen readers (also satisfies static-surface
   guard for canonical hint copy without re-introducing a hero h1). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Compact section-input — replaces the old .panel-header / hero pattern. */
.section-input-head {
  margin: 0 0 14px;
}
.section-input-title {
  margin: 0 0 4px;
  font-family: "Unbounded", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.section-input-honest {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.section-primary {
  min-width: 200px;
}
.section-secondary {
  min-height: 44px;
}

/* Results sections — dense, scannable, no decorative hero cards. */
.results-section {
  margin-top: 24px;
}
.results-section:first-of-type {
  margin-top: 0;
}
.results-section-head {
  margin: 0 0 12px;
}
.results-section-head h2 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}
.results-section-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Section anchor offset so sticky header doesn't cover headings on scroll-to. */
[id^="section-"],
#diagnostics-list,
#improvements-list,
#result-newcard,
#photos-list,
#reviews-list {
  scroll-margin-top: 80px;
}

/* "Как посчитали" — collapsible meta block at the bottom. */
.results-section-meta {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 12px 16px;
}
.results-section-meta > .results-section-meta-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
}
.results-section-meta > .results-section-meta-summary::-webkit-details-marker {
  display: none;
}
.results-section-meta > .results-section-meta-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.15s ease;
}
.results-section-meta[open] > .results-section-meta-summary::after {
  transform: rotate(180deg);
}
.results-section-meta-title {
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
  font-weight: 700;
}
.results-section-meta-hint {
  color: var(--muted);
  font-size: 12px;
  flex: 1 1 auto;
  text-align: left;
}
.results-section-meta[open] > .results-block {
  margin-top: 14px;
}

/* Summary bar — compact 4-tile dashboard top instead of the old big cards. */
.results-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
}
.summary-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  min-height: 76px;
}
.summary-tile-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.summary-tile-value {
  font-family: "Unbounded", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.summary-tile-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.summary-tile-score-value {
  font-size: 22px;
}
.summary-tile[data-tone="critical"] {
  border-color: var(--severity-critical-border);
  background: var(--severity-critical-bg);
}
.summary-tile[data-tone="critical"] .summary-tile-value {
  color: var(--severity-critical-ink);
}
.summary-tile[data-tone="warn"] {
  border-color: var(--severity-medium-border);
  background: var(--severity-medium-bg);
}
.summary-tile[data-tone="warn"] .summary-tile-value {
  color: var(--severity-medium-ink);
}
.summary-tile[data-tone="ok"] {
  border-color: var(--severity-low-border);
  background: var(--severity-low-bg);
}
.summary-tile[data-tone="ok"] .summary-tile-value {
  color: var(--severity-low-ink);
}
.summary-tile[data-tone="accent"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.summary-tile[data-tone="accent"] .summary-tile-value {
  color: var(--accent-strong);
}

/* Mobile compression — keep sticky header <=72px and let nav scroll horizontally. */
@media (max-width: 720px) {
  .app-header {
    margin: 0 -12px 12px;
    padding: 8px 12px;
  }
  .app-header-row {
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
  }
  .app-brand-name {
    display: none;
  }
  .app-header-status {
    order: 3;
    width: 100%;
  }
  .card-status-pill {
    width: 100%;
    justify-content: space-between;
  }
  .app-header-nav {
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 2px;
  }
  .app-header-auth {
    order: 2;
  }
  .app-auth-menu {
    width: min(280px, calc(100vw - 24px));
  }
  .results-section-head h2 {
    font-size: 17px;
  }
  .section-input-title {
    font-size: 16px;
  }
  .summary-tile {
    min-height: 64px;
  }
}

/* ============================================================
   UI revision pass — kill dead space, denser cards, calmer tiles,
   compact form, mobile nav toggle, scroll-margin for sticky header.
   ============================================================ */

.input-panel {
  max-width: none;
}
#results {
  max-width: none;
  min-width: 0;
}
.workspace {
  gap: 18px;
}
.panel {
  padding: 18px 18px 20px;
}

/* Anchor scroll offset honors sticky header height (~64) plus breathing space so the
   target heading is never crowded against the header bottom edge. */
[id^="section-"],
#diagnostics-list,
#improvements-list,
#result-newcard,
#photos-list,
#reviews-list,
#data-coverage-card {
  scroll-margin-top: 88px;
}

/* Desktop 2-column workspace: input column left, results dashboard right.
   Below 1024px we fall back to a single stacking column. */
@media (min-width: 1024px) {
  .workspace {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .input-panel {
    align-self: start;
  }
}

/* Quiet preflight link — replaces the old competing "Разобрать ссылку" CTA. */
.link-precheck {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-precheck:hover {
  color: var(--accent);
}
.link-precheck:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.link-precheck:disabled {
  color: var(--muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* Compact draft status — a one-line status, not a hero block. */
.draft-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 0 0 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
}
.draft-status-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.draft-status-title {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.draft-status-message {
  margin: 0;
  font-size: 12px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draft-status .draft-button {
  flex-shrink: 0;
}

/* Compact legal consent — checkbox + label inline, links beside, no dominance. */
.legal-consent {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 8px 14px;
  padding: 10px 12px;
  margin: 4px 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.legal-consent-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.legal-consent-message {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.legal-consent-links {
  display: inline-flex;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
}
.legal-consent-links a {
  color: var(--accent-strong);
}

/* Denser content cards — less gallery, more dashboard. */
.content-card {
  padding: 14px 16px;
  border-radius: 10px;
}
.insight-card {
  padding: 14px;
  gap: 10px;
}
.cards-grid {
  gap: 10px;
}
.results-block {
  padding: 0;
}

/* Calmer summary tiles — keep meaning, drop pastel intensity. */
.summary-tile {
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.summary-tile[data-tone="critical"],
.summary-tile[data-tone="warn"],
.summary-tile[data-tone="ok"],
.summary-tile[data-tone="accent"] {
  background: var(--panel);
  border-color: var(--line);
}
.summary-tile[data-tone] .summary-tile-value {
  /* tone-coloured value only, surface stays neutral */
  color: var(--ink);
}
.summary-tile[data-tone="critical"] .summary-tile-value {
  color: var(--severity-critical-ink);
}
.summary-tile[data-tone="warn"] .summary-tile-value {
  color: var(--severity-medium-ink);
}
.summary-tile[data-tone="ok"] .summary-tile-value {
  color: var(--severity-low-ink);
}
.summary-tile[data-tone="accent"] .summary-tile-value {
  color: var(--accent-strong);
}
.summary-tile {
  position: relative;
}
.summary-tile[data-tone]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--line);
  border-radius: 10px 0 0 10px;
}
.summary-tile[data-tone="critical"]::before {
  background: var(--severity-critical-stripe);
}
.summary-tile[data-tone="warn"]::before {
  background: var(--severity-medium-stripe);
}
.summary-tile[data-tone="ok"]::before {
  background: var(--severity-low-stripe);
}
.summary-tile[data-tone="accent"]::before {
  background: var(--accent);
}

/* Mobile nav-toggle — hidden on desktop, hamburger on small screens. */
.app-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  flex: 0 0 auto;
}
.app-nav-toggle:hover {
  border-color: var(--accent);
}
.app-nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.app-nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.app-nav-toggle[aria-expanded="true"] .app-nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.app-nav-toggle[aria-expanded="true"] .app-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.app-nav-toggle[aria-expanded="true"] .app-nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.app-nav-toggle-bar {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* On mobile: hide nav behind toggle; reveal as a dropdown sheet under the header. */
@media (max-width: 720px) {
  .app-nav-toggle {
    display: inline-flex;
  }
  .app-header-row {
    flex-wrap: nowrap;
  }
  .app-brand-name {
    display: inline; /* show name on mobile so the toggle is the only collapse */
  }
  .app-header-status {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    order: 0;
  }
  .card-status-pill {
    width: auto;
    justify-content: center;
    padding: 4px 8px;
    font-size: 11px;
  }
  .card-status-marketplace {
    display: none; /* save width — marketplace tag is also in the brand context */
  }
  .app-header-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding: 0;
    margin: 0;
    border-top: 0;
    min-width: 0;
  }
  .app-nav-link {
    /* Mobile tap target — Apple HIG min 44px, Material min 48px. Previous
       7px vertical padding gave 34px which fails accessibility for thumb taps.
       Bumped to 11px vertical + min-height: 44px gate. Font 13px for legibility. */
    flex: 0 0 auto;
    width: auto;
    padding: 11px 14px;
    min-height: 44px;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
  }
  .input-panel {
    max-width: 100%;
    padding: 14px;
  }
  .legal-consent {
    grid-template-columns: 1fr;
  }
  .legal-consent-links {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   UI revision 4 — kill header overlap, ban horizontal overflow,
   single "Разделы ▾" drawer for nav, compact link status, action
   plan collapse, less repeated "пока не оцениваем" wording.
   ============================================================ */

/* Sticky header overlap fix — workspace starts with breathing room so first
   sticky header is back: anchor scroll needs to clear it (header ≈64-72 px + breathing). */
[id^="section-"],
#diagnostics-list,
#improvements-list,
#result-newcard,
#photos-list,
#reviews-list,
#data-coverage-card {
  scroll-margin-top: 88px;
}

/* Inline horizontal sticky nav — single row inside the sticky header. Scrolls
   horizontally when 8 items don't fit (mobile/narrow). No drawer, always visible. */
.app-header-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  min-width: 0;
}
.app-header-nav::-webkit-scrollbar {
  display: none;
}
.app-header-nav .app-nav-link {
  width: auto;
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 7px 13px;
  text-align: center;
  font-size: 13px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
/* Hide any legacy toggle button if it still exists from older shells. */
.app-nav-toggle {
  display: none !important;
}

/* Compact link-import-status — was a multi-row block, now max 2 visible lines
   plus an expand toggle. */
.link-import-status {
  padding: 8px 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.link-import-status .link-import-status-message {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  margin: 4px 0 0;
}
.link-import-status[data-expanded="true"] .link-import-status-message {
  -webkit-line-clamp: unset;
  display: block;
}
.link-import-status-groups,
.link-import-status-scope,
.link-import-status-tags {
  display: none;
}
.link-import-status[data-expanded="true"] .link-import-status-groups,
.link-import-status[data-expanded="true"] .link-import-status-scope,
.link-import-status[data-expanded="true"] .link-import-status-tags {
  display: block;
  margin-top: 6px;
}
.link-import-status-expand {
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-import-status-expand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Action plan height cap — scroll within when it overflows, keep first 3 visible. */
.action-plan-card {
  position: relative;
}
.action-plan-queue {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
}
.action-plan-list {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
  margin-top: 12px;
}
.action-plan-queue::-webkit-scrollbar,
.action-plan-list::-webkit-scrollbar {
  width: 6px;
}
.action-plan-queue::-webkit-scrollbar-thumb,
.action-plan-list::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

/* Mobile overflow guarantee — no element wider than the viewport.
   Use `overflow-x: clip` (not `hidden`) because `hidden` creates a scrolling
   context on html/body and breaks `position: sticky` on descendants in Chrome
   (sticky pins relative to the nearest scrolling ancestor — if that's body
   instead of viewport, the header scrolls away). `clip` does the same visual
   clipping but does NOT establish a scroll container, so sticky keeps working.
   Fallback to `hidden` for older browsers that don't support `clip`. */
html,
body {
  overflow-x: hidden;
  overflow-x: clip;
}
.panel,
.content-card,
.results-block,
.results-summary-bar,
.app-header-nav,
.app-header-nav-drawer {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.summary-tile,
.insight-card {
  min-width: 0;
}
.summary-tile-value,
.summary-tile-note,
.insight-card p,
.insight-card h4,
.content-card p {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Disable the old @media (max-width: 720px) inline nav behaviour — the drawer
   now handles all viewports. Keep the brand-name visible on mobile. */
@media (max-width: 720px) {
  .app-nav-toggle {
    display: inline-flex;
    padding: 6px 10px;
    font-size: 12px;
  }
  .app-nav-toggle-label {
    /* hide label on the smallest phones to save width, keep "Разделы" otherwise */
    display: inline;
  }
  .app-header-row {
    flex-wrap: nowrap; /* override previous wrap so the row stays single-line */
  }
  .app-brand-name {
    display: inline;
  }
  .card-status-pill {
    padding: 4px 8px;
    font-size: 11px;
  }
  .app-header-nav,
  .app-header-nav-drawer {
    right: 12px;
    max-width: min(280px, calc(100vw - 24px));
  }
}
@media (max-width: 420px) {
  .app-brand-name {
    display: none; /* very narrow phones — keep just the "SC" mark */
  }
  .app-nav-toggle-label {
    display: none; /* tightest viewport — caret-only "▾" */
  }
}

/* Empty-state right-column preview — kills the dead grey void before audit. Shows
   the full D-053 marketplace registry coverage and a 7-step preview of the result. */
.results-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body:has(#results:not(.is-hidden)) .results-preview {
  display: none;
}
.preview-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
}
.preview-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.preview-card-title {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.preview-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.preview-card-sub {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Marketplace coverage grid — chip per registry entry, color by supportStatus. */
.marketplace-coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.marketplace-coverage-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink);
  min-width: 0;
}
.marketplace-coverage-chip-name {
  flex: 1 1 auto;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.marketplace-coverage-chip-region {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.marketplace-coverage-chip[data-status="supported-now"] {
  border-left-color: var(--success);
}
.marketplace-coverage-chip[data-status="detect-only"] {
  border-left-color: var(--accent);
}
.marketplace-coverage-chip[data-status="planned-api"] {
  border-left-color: var(--warn);
}
.marketplace-coverage-chip[data-status="blocked-tos"] {
  border-left-color: var(--critical);
}
.marketplace-coverage-chip[data-status="market-radar"] {
  border-left-color: var(--muted);
}

.marketplace-coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.coverage-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg);
}
.coverage-status-chip[data-status="supported-now"] {
  border-left-color: var(--success);
}
.coverage-status-chip[data-status="detect-only"] {
  border-left-color: var(--accent);
}
.coverage-status-chip[data-status="planned-api"] {
  border-left-color: var(--warn);
}
.coverage-status-chip[data-status="blocked-tos"] {
  border-left-color: var(--critical);
}
.coverage-status-chip[data-status="market-radar"] {
  border-left-color: var(--muted);
}

/* Roadmap "what's coming" preview list — 7 numbered steps. */
.preview-roadmap-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-roadmap-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.preview-roadmap-step {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}
.preview-roadmap-list li > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.preview-roadmap-list strong {
  font-size: 13px;
  color: var(--ink);
}
.preview-roadmap-list span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Hide the runtime-status debug block from the seller-facing surface (still in DOM
   for static-surface guard string coverage; sr-only for SR users). */
#runtime-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Legal-consent — compact but readable. 11px font violated accessibility
   (juridical text MUST be readable). Bumped to 12-13px while keeping density
   via tight padding and removing redundant margin. Target height ≤100px. */
.legal-consent {
  padding: 10px 12px;
  font-size: 13px;
}
.legal-consent-message {
  font-size: 12px;
  line-height: 1.5;
}
.legal-consent-check {
  font-size: 13px;
}

/* Draft status — single-line ellipsis works only with proper flex; tighten so the
   "Ввод сохраняется автоматически" message has room. */
.draft-status {
  font-size: 11px;
}
.draft-status-copy {
  flex-wrap: wrap;
}
.draft-status-message {
  white-space: normal; /* allow wrap instead of clipping */
  overflow: visible;
  text-overflow: clip;
  font-size: 11px;
  line-height: 1.35;
}

/* Right-column preview — make sure it grows into the available width. */
@media (min-width: 1024px) {
  .results-preview {
    min-width: 0;
  }
}
@media (max-width: 1023px) {
  .results-preview {
    margin-top: 12px;
  }
  .marketplace-coverage-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Mobile primary-CTA-above-fold pass — compress so "Разобрать карточку" lands
   within the first 420 px on a 390-wide phone. */
@media (max-width: 720px) {
  .panel {
    padding: 12px 12px 14px;
  }
  .section-input-head {
    margin-bottom: 8px;
  }
  .section-input-title {
    font-size: 15px;
    margin-bottom: 2px;
  }
  .section-input-honest {
    font-size: 12px;
    line-height: 1.4;
  }
  .draft-status {
    padding: 4px 8px;
    margin-bottom: 8px;
  }
  .card-form {
    gap: 8px;
    margin-top: 6px;
  }
  .form-actions {
    margin-top: 4px;
  }
  .form-actions .primary-button {
    flex: 1 1 100%;
  }
  .results-section {
    margin-top: 16px;
  }
}

/* ── Переключатель тем в шапке (D-057, Фаза 2) ── */
.app-header-themes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--line);
}
.app-header-themes::-webkit-scrollbar { display: none; }
.app-header-themes-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: none;
  margin-right: 2px;
}
.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  white-space: nowrap;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--field-bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.theme-chip:hover { border-color: var(--accent); }
.theme-chip.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.theme-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* v05 iOS-стекло: матовое стекло на панелях (Фаза 3) */
html[data-theme="v05"] .panel {
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* ── Score-кольцо в плитке «Индекс карточки» (углубление интерфейса) ── */
.summary-tile-with-ring {
  display: flex;
  align-items: center;
  gap: 14px;
}
.summary-tile-ring {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.summary-tile-ring svg { display: block; }
.summary-tile-ring .ring-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 7;
}
.summary-tile-ring .ring-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s var(--ease);
}
.summary-tile-ring[data-tone="ok"] .ring-arc { stroke: var(--success-stripe); }
.summary-tile-ring[data-tone="warn"] .ring-arc { stroke: var(--severity-medium-stripe); }
.summary-tile-ring[data-tone="critical"] .ring-arc { stroke: var(--severity-critical-stripe); }
.summary-tile-with-ring .summary-tile-score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}
.summary-tile-with-ring .summary-tile-score-value span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 1px;
}
.summary-tile-ring-copy { min-width: 0; }
.summary-tile-with-ring .summary-tile-note { margin-top: 2px; }

/* ── Telegram-вход в auth-меню (D-051) ── */
.app-auth-login-slot { display: grid; gap: 8px; padding: 2px 0; }
.app-auth-loggedin { font-size: 13px; color: var(--muted); }
.app-auth-loggedin b { color: var(--ink); }
.app-auth-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin: 2px 0 0; }

/* ════════════════════════════════════════════════════════════════════
   ВАУ-ПЛАШКИ + анти-обрезание шапки (2026-06-16)
   (1) Навигация и чипы тем больше не выглядят «обрезанными»: у правого края —
       мягкое затухание (mask) вместо жёсткого среза → «листай дальше», а не «сломано».
   (2) Сводка результата читается комфортно: «Индекс карточки» = крупная hero-плашка
       с большим кольцом и тон-glow (зелёный/янтарь/красный), остальные плитки — ровная
       адаптивная сетка, на мобиле — стопкой по 2. Только классы из контракта DOM
       (.summary-tile / .summary-tile-value / .summary-tile-score-value сохранены).
   ════════════════════════════════════════════════════════════════════ */

/* (1) Шапка — горизонтальный скролл с затуханием у краёв. */
.app-header-nav {
  scroll-padding-inline: 4px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.app-header-themes {
  scroll-padding-inline: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}

/* (2) Сводка: hero-плашка индекса во всю ширину + 3 плитки-инсайта. */
.results-summary-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.results-summary-bar .summary-tile-with-ring {
  grid-column: 1 / -1;
}

/* Hero-плашка «Индекс карточки». */
.summary-tile.summary-tile-with-ring {
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(130% 150% at 0% 0%, var(--hero-glow, transparent) 0%, transparent 58%),
    var(--panel);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.summary-tile-with-ring[data-tone="ok"] { --hero-glow: rgba(5, 150, 105, 0.16); }
.summary-tile-with-ring[data-tone="warn"] { --hero-glow: rgba(249, 115, 22, 0.18); }
.summary-tile-with-ring[data-tone="critical"] { --hero-glow: rgba(220, 38, 38, 0.18); }
.summary-tile-with-ring[data-tone]::before { display: none; }

/* Крупное кольцо в hero. */
.summary-tile-with-ring .summary-tile-ring {
  width: 108px;
  height: 108px;
}
.summary-tile-with-ring .summary-tile-ring svg { width: 100%; height: 100%; }
.summary-tile-with-ring .summary-tile-ring .ring-track,
.summary-tile-with-ring .summary-tile-ring .ring-arc { stroke-width: 6.5; }
.summary-tile-with-ring .summary-tile-score-value { font-size: 31px; }
.summary-tile-with-ring .summary-tile-score-value span { font-size: 13px; }
.summary-tile-with-ring .summary-tile-ring-copy { display: flex; flex-direction: column; }
.summary-tile-with-ring .summary-tile-label { font-size: 12px; }
.summary-tile-with-ring .summary-tile-note {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 5px;
  font-weight: 600;
}

/* Плитки-инсайты — ровные, читаемые. */
.results-summary-bar .summary-tile:not(.summary-tile-with-ring) {
  padding: 14px 15px;
  border-radius: var(--radius-lg);
  min-height: 94px;
  box-shadow: var(--shadow-1);
}

@media (max-width: 720px) {
  .results-summary-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary-tile.summary-tile-with-ring { padding: 16px; gap: 16px; }
  .summary-tile-with-ring .summary-tile-ring { width: 86px; height: 86px; }
  .summary-tile-with-ring .summary-tile-score-value { font-size: 26px; }
  .summary-tile-with-ring .summary-tile-note { font-size: 13px; }
}

/* ── Мобильная раскладка: воздух, одна колонка, ритм секций (2026-06-17) ──
   Жалоба: «карточки жмутся, сводка перегружена». На узких экранах: сводка и
   плитки-инсайты в ОДНУ колонку (не жмём в 2), между секциями — разделитель и
   крупный отступ (понятный ритм вердикт→детали), заголовки секций крупнее. */
@media (max-width: 560px) {
  .results-summary-bar { grid-template-columns: 1fr; gap: 10px; }
  .results-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
  .results-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
  .results-section-head { margin-bottom: 14px; }
  .results-section-head h2 { font-size: 21px; }
  .results-block { margin-top: 16px; }
  .content-card { padding: 16px; }
  .benchmark-row { padding: 12px 14px; }
}


/* ── Разгрузка шапки (2026-06-17) ──
   Статус-пилл с длинным текстом («Ozon · парсинг через расширение») распирал
   ряд и выдавливал табы нав вправо. Ограничиваем ширину ярлыка статуса
   ellipsis'ом; вторичные пункты (Карточки/Коннектор/История) убраны из нав
   в меню профиля — оставлены только in-page табы разделов аудита. */
.card-status-label {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
@media (max-width: 720px) {
  .card-status-label { max-width: 104px; }
}

/* ── Сравнение с топами категории (output.benchmark) ── */
.benchmark-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.benchmark-row {
  position: relative;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: baseline;
}
.benchmark-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--line);
}
.benchmark-row[data-tone="critical"]::before { background: var(--severity-critical-stripe); }
.benchmark-row[data-tone="warn"]::before { background: var(--severity-medium-stripe); }
.benchmark-row[data-tone="info"]::before { background: var(--accent); }
.benchmark-row-label { font-weight: 800; font-size: 13px; color: var(--ink); white-space: nowrap; }
.benchmark-row-delta { font-size: 13px; color: var(--ink); }
.benchmark-row-delta b { color: var(--accent-strong); }
.benchmark-row[data-tone="critical"] .benchmark-row-delta b { color: var(--severity-critical-ink); }
.benchmark-row[data-tone="warn"] .benchmark-row-delta b { color: var(--severity-medium-ink); }
.benchmark-row-note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); line-height: 1.35; }
.benchmark-meta { margin-top: 10px; font-size: 11.5px; color: var(--muted); }

/* ── Нав-табы шапки: перенос вместо обрезания (2026-06-17) ──
   На средних ширинах даже 6 табов не влезали и последний («Как посчитали»/
   «Отзывы») уходил под fade. Теперь ряд и сами табы ПЕРЕНОСятся на новую строку
   — все табы видны при любой ширине; fade/скролл/snap убраны (больше не прячут). */
.app-header-nav {
  overflow: visible;
  flex-wrap: wrap;
  row-gap: 4px;
  scroll-snap-type: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* ── Toast копирования (глобальное оповещение «Скопировано») ── */
.sc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  z-index: 2000;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sc-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sc-toast-success { background: var(--success-stripe); }
.sc-toast-warn { background: var(--severity-critical-stripe); }
