/* kurmanov Tools: стили приложения (UTM, SEO-аудит, кабинет, аналитика).
   Две темы: светлая (по умолчанию) и тёмная, html[data-theme]. Вёрстка резиновая,
   на всю ширину: слева меню, справа контент на сетке из 12 колонок.
   Переменные совпадают по именам с основным сайтом (--ink, --line, --accent...),
   поэтому старые стили инструментов (utm.css) подхватывают новую палитру. */

:root {
  --bg: #f3f5f1; --bg-2: #eef2eb; --bg-3: #e3e9de;
  --surface: #ffffff; --surface-2: #f7f9f5; --surface-hover: #f4f7f1;
  --ink: #141817; --ink-2: #3a423e; --ink-3: #69736d; --text-body: #2c332f;
  --line: #e4e9e1; --line-2: #c9d1c5;
  --accent: #c3f36b; --accent-2: #b1e650; --accent-ink: #141817; --accent-text: #3f7a10;
  --green: #6fb83a; --tint: rgba(111, 184, 58, .10);
  --success: #2f9e44; --danger: #d64545; --warning: #c77d00;
  --side-bg: #141817; --side-ink: #c4ccc7; --side-ink-2: #7b8680; --side-hover: #1f2623;
  --shadow: 0 1px 2px rgba(20, 24, 23, .04), 0 10px 30px -14px rgba(20, 24, 23, .14);
  --c1: #6fb83a; --c2: #141817; --c3: #2bb3a3; --c4: #f2994a; --c5: #6c8cff; --c6: #e85d75;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --radius: 10px; --r-card: 16px;
  --step--1: .875rem; --step-0: 1rem; --step-1: 1.2rem; --step-2: 1.5rem; --step-3: 2rem; --step-4: 2.6rem;
  --side-w: 256px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0f0e; --bg-2: #161b19; --bg-3: #1f2724;
  --surface: #151a18; --surface-2: #1b2220; --surface-hover: #1d2422;
  --ink: #f2f6f0; --ink-2: #c9d2cc; --ink-3: #8e9a94; --text-body: #d3dbd5;
  --line: #252d2a; --line-2: #3a4541;
  --accent-text: #c3f36b; --green: #a9e05a; --tint: rgba(195, 243, 107, .08);
  --success: #69db7c; --danger: #ff7a8a; --warning: #ffb547;
  --side-bg: #101413; --side-ink: #c9d2cc; --side-ink-2: #6f7b75; --side-hover: #19201d;
  --shadow: none;
  --c1: #c3f36b; --c2: #4fd1c5; --c3: #ff9f43; --c4: #a78bfa; --c5: #60a5fa; --c6: #ff6b81;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.app { background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font-body); min-height: 100vh; }
:root[data-theme="dark"] body.app { background: var(--bg) radial-gradient(900px 500px at 90% -10%, rgba(195, 243, 107, .07), transparent 60%) fixed; }
a { color: inherit; }
img { max-width: 100%; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ic { width: 19px; height: 19px; flex-shrink: 0; }

/* ---------- Боковое меню ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
  background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 16px; }
.side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.side-brand b { color: var(--accent); }
.side-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #141817; font-weight: 800; }
.side-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--side-ink-2); padding: 16px 12px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.side-link:hover { background: var(--side-hover); color: #fff; }
.side-link.is-on { background: var(--accent); color: #141817; }
:root[data-theme="dark"] .side-link.is-on { background: rgba(195, 243, 107, .12); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(195, 243, 107, .35); }
.side-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 8px; }
.side-cta { display: block; text-align: center; background: var(--accent); color: #141817; font-weight: 600; text-decoration: none; padding: 11px; border-radius: 10px; }
.side-cta:hover { background: var(--accent-2); }
.side-tg { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--side-ink); text-decoration: none; font-size: 13.5px; padding: 8px; border-radius: 10px; }
.side-tg:hover { background: var(--side-hover); color: #fff; }
.side .side-close { display: none; color: var(--side-ink); }
.top .top-burger { display: none; }
.side-overlay { display: none; }

/* ---------- Каркас ---------- */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(16px, 2.4vw, 36px); min-height: 64px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-title { min-width: 0; margin-right: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-3); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.side .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .1); }
.theme-btn .ic:last-child { display: none; }
:root[data-theme="dark"] .theme-btn .ic:first-child { display: none; }
:root[data-theme="dark"] .theme-btn .ic:last-child { display: block; }
.top-user { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.top-user form { margin: 0; }
.top-user .icon-btn { border: 0; width: 32px; height: 32px; }
.top-ava { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #141817; font-weight: 700; }
.top-uname { font-weight: 600; font-size: 14px; line-height: 1.15; }
.top-uname small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
.content { flex: 1; padding: clamp(18px, 2.2vw, 32px) clamp(16px, 2.4vw, 36px) 40px; min-width: 0; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 18px clamp(16px, 2.4vw, 36px); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }

/* ---------- Заголовок страницы ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.page-head p { color: var(--ink-3); margin-top: 6px; font-size: 15px; max-width: none; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eyebrow { font: 500 12px var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

/* ---------- Сетка и карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.content > * + .grid, .content > * + .card, .content > * + .kpis, .content > * + section, .stack > * + * { margin-top: 16px; }
.content > .page-head + * { margin-top: 0; }
.c-12 { grid-column: span 12; } .c-9 { grid-column: span 9; } .c-8 { grid-column: span 8; } .c-7 { grid-column: span 7; }
.c-6 { grid-column: span 6; } .c-5 { grid-column: span 5; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
:root:not([data-theme="dark"]) .card { border-color: transparent; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-h h2, .card-h h3 { font-size: 16px; font-weight: 650; letter-spacing: -.005em; }
.card-h span, .card-h small { font-size: 13px; color: var(--ink-3); }
.card-accent { background: var(--side-bg); color: #f2f6f0; border-color: transparent; }
:root[data-theme="dark"] .card-accent { background: linear-gradient(135deg, #c3f36b, #8fd14f); color: #0c0f0e; }
.card-accent .kpi-k, .card-accent .kpi-sub { color: rgba(242, 246, 240, .7); }
:root[data-theme="dark"] .card-accent .kpi-k, :root[data-theme="dark"] .card-accent .kpi-sub { color: rgba(12, 15, 14, .7); }
.muted { color: var(--ink-3); }
.empty { color: var(--ink-3); font-size: 14px; padding: 14px 0; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.kpi { position: relative; overflow: hidden; }
.kpi-k { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.kpi-v { font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kpi-d { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 100px; background: var(--tint); color: var(--accent-text); letter-spacing: 0; }
.kpi-d.is-down { background: rgba(214, 69, 69, .12); color: var(--danger); }
.kpi-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.kpi .chart { margin: 6px -8px -14px; }

/* Сегменты (переключатели периода и сайта) */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: 0; background: none; font: 500 13px var(--font-body); color: var(--ink-2); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); background: var(--bg-2); }
.seg .is-active, .seg .is-on { background: var(--ink); color: var(--surface); }
:root[data-theme="dark"] .seg .is-active, :root[data-theme="dark"] .seg .is-on { background: var(--accent); color: #0c0f0e; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px var(--font-body); padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-dark { background: var(--ink); color: var(--surface); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: none; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn:disabled { opacity: .55; cursor: progress; }

/* Формы */
.app input[type=text], .app input[type=url], .app input[type=email], .app input[type=password], .app input[type=number], .app input[type=search], .app select, .app textarea {
  width: 100%; min-width: 0; font: 400 15px var(--font-body); color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px;
}
.app input:focus, .app select:focus, .app textarea:focus { outline: 2px solid color-mix(in srgb, var(--green) 55%, transparent); outline-offset: 0; border-color: var(--green); }
.app input::placeholder, .app textarea::placeholder { color: var(--ink-3); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-row > * { flex: 1 1 180px; }
.form-row > .btn, .form-row > button { flex: 0 0 auto; }

/* Таблицы */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.table th.num { text-align: right; }
.table .mono { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.table tr.is-off td { opacity: .55; }

/* Бейджи, флеш-сообщения */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 100px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge.is-on { background: var(--tint); color: var(--accent-text); }
.badge.is-off { background: rgba(214, 69, 69, .12); color: var(--danger); }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14.5px; border: 1px solid; word-break: break-word; }
.flash.is-ok { background: var(--tint); border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--ink); }
.flash.is-error { background: rgba(214, 69, 69, .08); border-color: rgba(214, 69, 69, .35); color: var(--danger); }

/* Списки с полосками (топ страниц, ссылок, источников) */
.rows { list-style: none; display: grid; gap: 13px; }
.rows li { min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 10px; }
.row-k { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row-sub { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.row-top b { margin-left: auto; font-weight: 650; font-variant-numeric: tabular-nums; }
.row-bar { display: block; height: 6px; background: var(--bg-2); border-radius: 100px; margin-top: 6px; overflow: hidden; }
.row-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--accent)); }
:root[data-theme="dark"] .row-bar i { background: linear-gradient(90deg, #4fd1c5, var(--accent)); }

/* Графики */
.chart { min-height: 40px; }
.chart-tall { min-height: 300px; }

/* Текстовые блоки (описания инструментов, FAQ) */
.prose { color: var(--text-body); font-size: 15.5px; line-height: 1.7; }
.prose p + p { margin-top: .9rem; }
.prose h2 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); margin-bottom: .7rem; }
.prose h3 { font-size: 16px; font-weight: 650; color: var(--ink); margin: 1.2rem 0 .5rem; }
.prose ul { padding-left: 1.2rem; display: grid; gap: .4rem; margin-top: .6rem; }
.prose a { color: var(--accent-text); }
.prose code { word-break: break-all; }
.faq { display: grid; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.faq summary { cursor: pointer; padding: 13px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-family: var(--font-mono); }
.faq details[open] summary::after { content: "-"; }
.faq details p { padding: 0 16px 14px; color: var(--text-body); font-size: 14.5px; }

/* Карточки инструментов на /tools/ */
.tool-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tool-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--tint); color: var(--accent-text); }
.tool-ic .ic { width: 23px; height: 23px; }
.tool-card h2 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.tool-card p { color: var(--ink-3); font-size: 14.5px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tool-go { font-weight: 600; color: var(--accent-text); font-size: 14px; }

/* Кабинет: вход, таблицы ссылок и клиентов */
.login-wrap { min-height: calc(100vh - 220px); display: grid; place-items: center; }
.login-card { width: 100%; max-width: 440px; padding: 30px; }
.login-h { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.login-form { display: grid; gap: 14px; margin-top: 20px; }
.login-form .btn { padding: 12px; }
.login-note { margin-top: 18px; font-size: 13.5px; }
.login-note a, .page-head p a { color: var(--accent-text); }
.link-target { max-width: 520px; }
.link-target b { display: block; font-weight: 600; }
.link-target a { color: var(--ink-3); font-size: 13px; text-decoration: none; word-break: break-all; }
.link-target a:hover { color: var(--ink); text-decoration: underline; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acts form { margin: 0; display: flex; gap: 6px; }
.app .acts-limit input[type=number] { width: 84px; padding: 5px 8px; font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }

/* Отчёт SEO-аудита (/tools/seo/r/) */
.tone-great { --tone: var(--green); } .tone-good { --tone: #d4a82a; } .tone-mid { --tone: #e8833a; } .tone-bad { --tone: var(--danger); } .tone-na { --tone: var(--ink-3); }
:root[data-theme="dark"] .tone-great { --tone: var(--accent); }
.rep-score { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.rep-ring-wrap { position: relative; width: 170px; aspect-ratio: 1; }
.rep-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.rep-ring-bg { fill: none; stroke: var(--bg-2); stroke-width: 11; }
.rep-ring-fg { fill: none; stroke: var(--tone); stroke-width: 11; stroke-linecap: round; }
.rep-ring-val { position: absolute; inset: 0; display: grid; place-content: center; }
.rep-ring-val b { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.rep-ring-val span { font-size: 13px; color: var(--ink-3); }
.rep-grade { font-weight: 700; font-size: 18px; color: var(--tone); }
.rep-sev { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.rep-sev li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px; padding: 4px 10px; }
.rep-sev li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.rep-sev b { color: var(--ink); }
.sev-critical { --c: var(--danger); } .sev-warning { --c: #e8833a; } .sev-notice { --c: #5b8def; } .sev-ok { --c: var(--green); }
.rep-blocks .rep-blk .row-bar i { background: var(--tone); }
.rep-blocks .row-top b { color: var(--tone); }
.rep-top { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.rep-top li { display: flex; gap: 14px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--c); }
.rep-n { font: 500 13px var(--font-mono); color: var(--c); padding-top: 2px; }
.rep-top-t { font-weight: 650; line-height: 1.4; }
.rep-top-f { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.rep-top a { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent-text); }
.rep-bscore { font-weight: 700; color: var(--tone) !important; font-size: 15px !important; }
.rep-iss { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: var(--surface-2); }
.rep-iss[open] { border-color: var(--line-2); }
.rep-iss summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; }
.rep-iss summary::-webkit-details-marker { display: none; }
.rep-iss summary::after { content: "+"; margin-left: auto; color: var(--ink-3); font-family: var(--font-mono); font-size: 18px; flex-shrink: 0; }
.rep-iss[open] summary::after { content: "-"; }
.rep-chip { flex-shrink: 0; min-width: 96px; text-align: center; font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--c); border: 1px solid var(--c); border-radius: 6px; padding: 3px 6px; }
.rep-iss-t { font-weight: 600; }
.rep-iss-c { flex-shrink: 0; font-size: 12.5px; color: var(--ink-3); }
.rep-iss-b { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; padding: 2px 16px 16px; }
.rep-iss-b h3 { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.rep-iss-b p { color: var(--text-body); font-size: 14.5px; }
.rep-where { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
.rep-where ul { list-style: none; display: grid; gap: 4px; font: 400 12.5px/1.5 var(--font-mono); color: var(--ink-3); }
.rep-where a { color: var(--ink-2); word-break: break-all; }
.rep-ok { margin-top: 12px; }
.rep-ok summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent-text); }
.rep-ok ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 24px; margin-top: 8px; }
.rep-ok li { font-size: 14px; color: var(--ink-2); padding-left: 20px; position: relative; }
.rep-ok li::before { content: "✓"; position: absolute; left: 0; color: var(--green); }
.rep-disclaimer { font-size: 13px; margin-top: 14px; }
.rep-kw-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rep-kw-kpis .kpi { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.rep-kw tr.is-gap td { background: color-mix(in srgb, var(--danger) 5%, transparent); }
.rep-kw-ok { color: var(--green); font-weight: 700; }
.rep-kw-no { color: var(--danger); font-weight: 600; font-size: 13px; }
.rep-kw a { color: var(--ink-2); font-size: 13px; }
.rep-kw-part { color: var(--warning); font-weight: 700; }
.rep-kw-more { margin-top: 12px; }
.rep-kw-more summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 8px 0; color: var(--ink-2); }
.rep-kw-export { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 4px 0 14px; }
.rep-kw-export .muted { font-size: 13px; flex: 1 1 260px; }
@media (max-width: 720px) { .rep-kw-kpis { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .rep-iss summary { flex-wrap: wrap; gap: 6px 10px; }
  .rep-iss-t { flex-basis: 100%; order: 3; }
  .rep-iss-b { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .foot, .page-head-actions, .cta-card, .no-print { display: none !important; }
  .shell { margin: 0; } .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}

/* Генератор UTM внутри приложения: убираем отступы старой страницы */
.utm-page .utm-tool-section { padding: 0; }
.utm-page .utm-tabs { margin-bottom: 16px; }
.utm-page .utm-form-col, .utm-page .utm-result-card, .utm-page .utm-history-card, .utm-page .utm-bulk { border-radius: var(--r-card); box-shadow: var(--shadow); }
.utm-page .utm-result-col { top: 80px; }

/* Страница kurmanov SEO */
.seo-intro { display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 3vw, 36px); }
.seo-h1 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.seo-lead { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; margin-top: 12px; }
.seo-page .seo-form { margin-top: 22px; }
.seo-page .seo-form input[type=text] { height: 52px; font: 500 16px var(--font-mono); }
.seo-page .seo-form .btn { height: 52px; padding: 0 22px; }
.seo-page .score-card { border-radius: var(--r-card); }
.seo-page .seo-result { margin-top: 16px; }
.seo-page .seo-result:not([hidden]) + .card { margin-top: 16px; }
:root:not([data-theme="dark"]) .seo-page .score-bar i { background: var(--green); }
:root:not([data-theme="dark"]) .seo-page .score-bar.is-low i { background: var(--danger); }
.seo-check { display: flex; gap: 14px; padding: 4px 0; }
.seo-check h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 4px; }
.seo-check p { color: var(--ink-3); font-size: 14px; }

/* CTA-блок */
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.cta-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.cta-card p { color: var(--ink-3); margin-top: 4px; }
.cta-card .btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1280px) {
  .c-3 { grid-column: span 6; } .c-4 { grid-column: span 6; } .c-8, .c-9, .c-7 { grid-column: span 12; } .c-5 { grid-column: span 12; }
}
@media (max-width: 960px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  body.side-open .side { transform: none; }
  body.side-open .side-overlay { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .4); }
  .side .side-close { display: inline-grid; }
  .shell { margin-left: 0; }
  .top .top-burger { display: inline-grid; }
  .top-uname { display: none; }
}
@media (max-width: 720px) {
  .c-3, .c-4, .c-6 { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi-v { font-size: 26px; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .page-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Калькулятор стоимости сайта (/tools/calc/) ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.calc-main { display: grid; gap: 16px; min-width: 0; }
.calc-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 700; margin-right: 10px; vertical-align: 1px; }
:root[data-theme="dark"] .calc-n { background: var(--accent); color: #0c0f0e; }
.calc-step .card-h h2 { font-size: 17px; }
/* Пакеты */
.calc-pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-pkg { position: relative; text-align: left; display: grid; gap: 3px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .15s; }
.calc-pkg:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.calc-pkg b { font-size: 17px; } .calc-pkg span { color: var(--ink-3); font-size: 13.5px; } .calc-pkg small { color: var(--ink-3); font-size: 12px; }
.calc-pkg.is-best { border-color: var(--green); }
.calc-pkg.is-on { background: var(--tint); border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.calc-pkg-badge { position: absolute; top: -10px; right: 12px; background: var(--accent); color: #141817 !important; font-size: 11px !important; font-weight: 700; padding: 2px 8px; border-radius: 100px; }
/* Типы сайта */
.calc-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-type { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, transform .15s, background .15s; }
.calc-type:hover { border-color: var(--line-2); transform: translateY(-1px); }
.calc-type .tool-ic { width: 40px; height: 40px; margin-bottom: 4px; }
.calc-type b { font-size: 16px; }
.calc-type-price { font-weight: 700; color: var(--accent-text); font-size: 14px; }
.calc-type-desc { color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.calc-type-inc { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--ink-3); font-family: var(--font-mono); }
.calc-type.is-on { border-color: var(--green); background: var(--tint); box-shadow: inset 0 0 0 1px var(--green); }
.calc-type.is-on .tool-ic { background: var(--accent); color: #141817; }
/* Объём */
.calc-vols { display: grid; gap: 4px; }
.calc-vol { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.calc-vol:first-child { border-top: 0; padding-top: 0; }
.calc-vol-txt b { display: block; } .calc-vol-txt > span { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.calc-vol-txt p { font-size: 13px; margin-top: 2px; }
.calc-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.calc-stepper button { width: 40px; height: 40px; border: 0; background: none; color: var(--ink); font-size: 20px; cursor: pointer; }
.calc-stepper button:hover:not(:disabled) { background: var(--bg-2); }
.calc-stepper button:disabled { color: var(--line-2); cursor: default; }
.calc-stepper output { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Опции */
.calc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calc-opt { position: relative; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.calc-opt:hover { border-color: var(--line-2); }
.calc-opt.is-on, .calc-rush.is-on .calc-opt-main { border-color: var(--green); background: var(--tint); }
.calc-opt-main { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 12px 44px 12px 12px; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; border-radius: 12px; }
.calc-check { grid-row: span 2; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); background: var(--surface); position: relative; transition: background .15s, border-color .15s; }
.is-on .calc-check, .calc-rush.is-on .calc-check { background: var(--green); border-color: var(--green); }
.is-on .calc-check::after, .calc-rush.is-on .calc-check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
:root[data-theme="dark"] .is-on .calc-check, :root[data-theme="dark"] .calc-rush.is-on .calc-check { background: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .is-on .calc-check::after, :root[data-theme="dark"] .calc-rush.is-on .calc-check::after { border-color: #0c0f0e; }
.calc-opt-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.calc-opt-name .muted { display: block; font-weight: 400; font-size: 13px; }
.calc-opt-price { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.calc-hint-btn { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); font: 600 12px var(--font-body); cursor: pointer; }
.calc-hint-btn:hover, .calc-hint-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--ink-3); }
.calc-hint { padding: 0 14px 12px 46px; font-size: 13.5px; color: var(--text-body); line-height: 1.5; }
.calc-rush { padding: 8px; }
.calc-rush .calc-opt-main { border: 1.5px solid var(--line); padding-right: 12px; grid-template-columns: auto 1fr auto; grid-template-rows: auto; }
.calc-rush .calc-check { grid-row: auto; }
/* Сводка */
.calc-sum { position: sticky; top: 80px; display: grid; gap: 14px; scroll-margin-top: 80px; }
.calc-sum-card { background: var(--side-bg); color: #f2f6f0; border: 0; }
:root[data-theme="dark"] .calc-sum-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.calc-sum-k { font-size: 13px; color: rgba(242, 246, 240, .65); font-weight: 500; }
:root[data-theme="dark"] .calc-sum-k { color: var(--ink-3); }
.calc-total { font-size: clamp(32px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; color: var(--accent); }
.calc-sum-meta { display: grid; gap: 4px; font-size: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .calc-sum-meta { border-color: var(--line); }
.calc-lines { list-style: none; display: grid; gap: 8px; padding: 14px 0; max-height: 300px; overflow-y: auto; font-size: 13.5px; }
.calc-lines li { display: flex; justify-content: space-between; gap: 12px; }
.calc-lines li span { opacity: .8; } .calc-lines li b { white-space: nowrap; font-weight: 600; }
.calc-lines li.is-m { opacity: .75; }
.calc-sum-btns { display: grid; gap: 8px; }
.calc-sum-btns .btn { width: 100%; padding: 13px; }
.calc-sum-card .btn-ghost { background: transparent; color: inherit; border-color: rgba(255, 255, 255, .25); }
:root[data-theme="dark"] .calc-sum-card .btn-ghost { border-color: var(--line-2); }
.calc-tip { border-left: 3px solid var(--warning); }
.calc-tip p { font-size: 14px; color: var(--text-body); margin-bottom: 10px; }
.calc-always { font-size: 13.5px; }
.calc-always ul { list-style: none; display: grid; gap: 6px; margin-top: 8px; }
.calc-always li { padding-left: 22px; position: relative; color: var(--text-body); }
.calc-always li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.calc-bar { display: none; }
/* Окно заявки */
.calc-modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 11, .55); display: grid; place-items: center; padding: 16px; }
.calc-modal[hidden] { display: none; }
.calc-modal .card { width: 100%; max-width: 440px; padding: 26px; position: relative; }
.calc-modal h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding-right: 40px; }
.calc-modal form { display: grid; gap: 12px; margin-top: 16px; }
.calc-modal .icon-btn { position: absolute; top: 14px; right: 14px; }
.calc-form-status { font-size: 13.5px; min-height: 1.2em; }
.calc-form-status.is-error { color: var(--danger); } .calc-form-status.is-ok { color: var(--accent-text); }
/* PDF-макет: рисуется вне экрана и фотографируется в PDF */
.calc-pdf { position: fixed; left: -10000px; top: 0; width: 794px; padding: 48px 52px; background: #fff; color: #141817; font: 400 13px/1.5 Inter, Arial, sans-serif; }
.calc-pdf .pdf-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 2px solid #141817; }
.calc-pdf .pdf-brand { display: flex; gap: 12px; align-items: center; }
.calc-pdf .pdf-brand > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #c3f36b; font-weight: 800; font-size: 18px; }
.calc-pdf .pdf-brand b { font-size: 17px; } .calc-pdf .pdf-brand small { display: block; color: #69736d; font-size: 11.5px; }
.calc-pdf .pdf-meta { text-align: right; font-size: 12px; color: #3a423e; }
.calc-pdf h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 26px; }
.calc-pdf h2 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; }
.calc-pdf .pdf-for { color: #3a423e; margin-top: 4px; }
.calc-pdf table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.calc-pdf th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #69736d; border-bottom: 1px solid #dde2db; padding: 8px 0; }
.calc-pdf th:last-child, .calc-pdf td:last-child { text-align: right; white-space: nowrap; }
.calc-pdf td { padding: 9px 0; border-bottom: 1px solid #eef1ec; }
.calc-pdf tfoot td { border: 0; padding-top: 14px; font-size: 16px; font-weight: 800; }
.calc-pdf tfoot td:last-child { background: #c3f36b; padding: 10px 14px; border-radius: 8px; }
.calc-pdf .pdf-m tfoot td { font-size: 14px; } .calc-pdf .pdf-m tfoot td:last-child { background: #eef4e6; }
.calc-pdf .pdf-inc { list-style: none; columns: 2; font-size: 12.5px; color: #3a423e; }
.calc-pdf .pdf-inc li::before { content: "✓  "; color: #4f8a10; font-weight: 700; }
.calc-pdf .pdf-note { margin-top: 20px; font-size: 11.5px; color: #69736d; }
.calc-pdf .pdf-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 16px; border-top: 1px solid #dde2db; font-size: 12px; color: #3a423e; }
.calc-pdf .pdf-foot div:last-child { text-align: right; }
@media (max-width: 1280px) { .calc-layout { grid-template-columns: minmax(0, 1fr) 330px; } .calc-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .calc-opts { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-sum { position: static; }
  .calc-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--side-bg); color: #f2f6f0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .2); }
  .calc-bar small { display: block; font-size: 11.5px; opacity: .7; }
  .calc-bar b { font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
  .calc-page .content { padding-bottom: 90px; }
}
@media (max-width: 720px) { .calc-pkgs, .calc-types { grid-template-columns: 1fr; } .calc-vol { flex-wrap: wrap; } }
