:root {
	--bg: #ffffff;
	--bg-alt: #f4f7f6;
	--ink: #16202b;
	--ink-soft: #4b5967;
	--muted: #7a8794;
	--line: #dde4e2;
	--brand: #13895a;
	--brand-ink: #ffffff;
	--brand-soft: #e5f4ec;
	--good: #13895a;
	--high: #2563c9;
	--warn: #b06d07;
	--bad: #b4372f;
	--none: #8a95a1;
	--radius: 10px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #10171d;
		--bg-alt: #151e26;
		--ink: #e6ecf1;
		--ink-soft: #b3c0cb;
		--muted: #8795a2;
		--line: #2a3641;
		--brand: #3cc184;
		--brand-ink: #0c1a13;
		--brand-soft: #16301f;
		--good: #3cc184;
		--high: #6f9cf0;
		--warn: #e6a64a;
		--bad: #ec7a70;
		--none: #8795a2;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.01em; max-width: 26ch; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--brand);
	background: var(--brand); color: var(--brand-ink); font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }

.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: #18a566; }
.top-nav { display: flex; gap: 20px; margin-left: auto; }
.top-nav a { color: var(--ink-soft); text-decoration: none; font-size: 15px; }
.top-nav a:hover { color: var(--ink); }

.hero { position: relative; overflow: hidden; padding: 64px 0 72px; background: radial-gradient(ellipse 60% 70% at 85% 30%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 70%), radial-gradient(ellipse 40% 50% at 5% 0%, color-mix(in srgb, var(--high) 6%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 20px; }
.kicker { display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; font-size: 15px; }
.spark { width: 16px; height: 16px; flex: none; fill: currentColor; }

/* Фоновый мотив знака: столбцы, линия атрибуции, искра. Только украшение, под контентом. */
.hero > .wrap, .final > .wrap { position: relative; z-index: 1; }
.motif { position: absolute; z-index: 0; pointer-events: none; color: var(--brand); }
.motif-bar { fill: currentColor; }
.motif-bar-1 { opacity: .05; }
.motif-bar-2 { opacity: .08; }
.motif-bar-3 { opacity: .11; }
.motif-line { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 16; opacity: .45; }
.motif-node { fill: var(--bg); stroke: currentColor; stroke-width: 5; opacity: .6; }
.motif-glow { fill: currentColor; opacity: .08; }
.motif-spark { fill: currentColor; opacity: .7; }
.motif-hero { width: 620px; right: -90px; bottom: -150px; }
.motif-final { width: 380px; left: -80px; bottom: -110px; }
.motif-final .motif-node { fill: var(--section-bg, var(--bg)); }
.lead { font-size: 19px; color: var(--ink-soft); max-width: 58ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 18px; height: 18px; flex: none; color: var(--brand); }

.report { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); box-shadow: 0 18px 40px -24px rgba(16, 40, 30, .35); overflow: hidden; }
.report-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.report-period { color: var(--muted); font-weight: 400; }
.report table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report th, .report td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.report th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.report th:not(:first-child), .report td:not(:first-child) { text-align: right; white-space: nowrap; }
.report-note { padding: 10px 18px; color: var(--muted); font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.pill-good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.pill-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.pill-bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); --section-bg: var(--bg-alt); }

/* Плитка с иконкой в карточках, шагах, возможностях и тарифах. */
.icon-tile { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.is-warn { background: color-mix(in srgb, var(--warn) 13%, transparent); color: var(--warn); }
.icon-tile.is-small { width: 38px; height: 38px; margin-bottom: 2px; border-radius: 10px; }
.icon-tile.is-small svg { width: 21px; height: 21px; }
.plan-accent .icon-tile { background: var(--brand); color: var(--brand-ink); }
.section h2 { margin-bottom: 28px; }
.section-lead { color: var(--ink-soft); max-width: 66ch; margin: -12px 0 28px; }

.cards { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: grid; gap: 8px; align-content: start; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: 0 14px 30px -22px rgba(16, 40, 30, .45); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .card, .plan { transition: none; } .card:hover, .plan:hover { transform: none; } }
.card p { color: var(--ink-soft); font-size: 16px; }
.status { border-top: 4px solid var(--status); }
.status h3 { color: var(--status); }
.status-good { --status: var(--good); }
.status-high { --status: var(--high); }
.status-review { --status: var(--warn); }
.status-none { --status: var(--none); }
.status { position: relative; }
.conf-bars { position: absolute; top: 24px; right: 22px; display: flex; align-items: flex-end; gap: 3px; }
.conf-bars i { width: 6px; border-radius: 2px 2px 1px 1px; background: color-mix(in srgb, var(--status) 18%, transparent); }
.conf-bars i:nth-child(1) { height: 9px; }
.conf-bars i:nth-child(2) { height: 14px; }
.conf-bars i:nth-child(3) { height: 19px; }
.conf-bars i.on { background: var(--status); }
.status .icon-tile { background: color-mix(in srgb, var(--status) 13%, transparent); color: var(--status); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; display: grid; gap: 8px; align-content: start; counter-increment: step; }
.steps li::before {
	content: counter(step); position: absolute; left: 30px; top: -8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
	border: 2px solid var(--section-bg, var(--bg)); background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 700;
}
.steps p { color: var(--ink-soft); font-size: 16px; }
.steps .icon-tile { position: relative; z-index: 1; }
.steps li::before { z-index: 2; }
/* Последний шаг — «искра» знака: подтверждённое обращение уходит в Метрику. */
.steps li:last-child .icon-tile { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 16%, transparent), 0 0 0 12px color-mix(in srgb, var(--brand) 7%, transparent); }
.steps li:last-child::before { background: var(--bg); color: var(--brand); border-color: var(--brand); }
/* Пунктир атрибуции между шагами: от центра первой плитки до центра последней. */
@media (min-width: 1025px) {
	.steps { position: relative; }
	.steps::before { content: ""; position: absolute; top: 21px; left: 22px; width: calc(75% + 21px); height: 2px; background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--brand) 50%, transparent) 0 6px, transparent 6px 13px); }
}

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 16px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font-size: 14px; color: var(--muted); font-weight: 600; }
.compare tbody th { font-weight: 600; width: 30%; }
.compare td { color: var(--ink-soft); }
.compare .ours { background: var(--brand-soft); color: var(--ink); }
.compare thead .ours { color: var(--brand); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.features div { display: grid; gap: 6px; align-content: start; }
.features p { color: var(--ink-soft); font-size: 16px; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.split h2 { font-size: clamp(22px, 2.4vw, 28px); }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-soft); font-size: 16px; }
.ticks li::before {
	content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px;
	border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg);
}
.ticks li.has-icon { padding-left: 34px; }
.ticks li.has-icon::before { content: none; }
.tick-icon { position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); }
.tick-icon svg { width: 15px; height: 15px; }
.ticks b { color: var(--ink); }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.plan { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; align-content: start; transition: box-shadow .2s, transform .2s; }
.plan:hover { box-shadow: 0 14px 30px -22px rgba(16, 40, 30, .45); transform: translateY(-2px); }
.plan-accent { border-color: var(--brand); background: var(--brand-soft); }
.price { font-size: 26px; font-weight: 700; }
.price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan p:not(.price) { color: var(--ink-soft); font-size: 15px; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--ink-soft); max-width: 68ch; }

.final { position: relative; overflow: hidden; }
.final-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: start; }
.contacts { margin-top: 20px; color: var(--ink-soft); }
.request { display: grid; gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.request label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.request em { font-style: normal; font-weight: 400; color: var(--muted); }
.request input:not([type="checkbox"]) {
	width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--bg); color: var(--ink); font: 16px var(--font);
}
.request input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.request [aria-invalid="true"] { border-color: var(--bad) !important; outline-color: var(--bad); }
.request .consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 400; color: var(--ink-soft); }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.form-status.is-error { color: var(--bad); }
.form-done { font-size: 17px; }
.request.is-done { border-color: var(--brand); background: var(--brand-soft); }

.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--ink-soft); }

@media (max-width: 1024px) {
	.hero-grid, .final-grid { grid-template-columns: 1fr; gap: 40px; }
	.cards-4, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.motif-hero { width: 420px; right: -140px; bottom: auto; top: -40px; opacity: .7; }
	.motif-final { display: none; }
	.top-nav { display: none; }
	.top-row { justify-content: space-between; }
	.section { padding: 56px 0; }
	.hero { padding: 40px 0 56px; }
	.cards-3, .split { grid-template-columns: 1fr; }
	.split { gap: 48px; }
}
@media (max-width: 560px) {
	.wrap { padding: 0 16px; }
	body { font-size: 16px; }
	.cards-4, .plans, .steps, .features { grid-template-columns: 1fr; }
	.report th, .report td { padding: 10px 12px; }
	.report th:nth-child(2), .report td:nth-child(2) { display: none; }
	.actions .btn { width: 100%; }
	.request { padding: 20px; }
}

.policy { max-width: 780px; display: grid; gap: 14px; }
.policy h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 8px; }
.policy h2 { font-size: 20px; margin: 18px 0 0; max-width: none; }
.policy p, .policy li { color: var(--ink-soft); }
.policy ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.consent a { color: var(--brand); }

/* Отчёт для клиента (report.php) */
.report-periods { display: flex; gap: 4px; margin-left: auto; }
.report-periods a { padding: 6px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: 14px; white-space: nowrap; }
.top .brand, .top .btn-small { white-space: nowrap; }
@media (max-width: 400px) { .top-row { gap: 12px; } .top .brand { font-size: 15px; } }
.report-periods a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.report-page { padding-top: 40px; }
.report-wrap { display: grid; gap: 40px; }
.report-wrap > * { min-width: 0; }
.report-wrap h1 { font-size: clamp(24px, 3vw, 32px); overflow-wrap: anywhere; }
.report-wrap h2 { font-size: clamp(20px, 2.2vw, 24px); margin-bottom: 14px; max-width: none; }
.report-period-text { margin: 6px 0 0; }
.report-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.report-stat { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.report-stat span { color: var(--muted); font-size: 14px; }
.report-stat b { font-size: 30px; line-height: 1.15; }
.report-stat small { color: var(--ink-soft); font-size: 13px; }
.report-table { min-width: 560px; font-size: 15px; }
.report-table td { white-space: nowrap; }
.report-table tfoot > * > * { border-top: 2px solid var(--line); font-weight: 600; color: var(--ink); }
.report-note { color: var(--muted); font-size: 14px; margin-top: 10px; }
.report-big { font-size: 26px; font-weight: 700; color: var(--ink) !important; }
.report-big small { font-size: 14px; font-weight: 400; color: var(--muted); }
@media (max-width: 1024px) { .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
	.report-stats { grid-template-columns: 1fr; }
	.report-periods { gap: 0; }
	.report-periods a { padding: 6px 7px; font-size: 13px; }
}

/* Знак К³ */
.brand-mark { display: inline-block; flex: none; width: 30px; height: 30px; background: url("brand/k3-icon.svg") center / contain no-repeat; }
.brand-q { color: var(--brand); }
