:root {
  --bg: #0b0a14; --bg2: #12101f; --card: #171428; --line: #2a2545; --text: #ece9f8; --muted: #9a94b8;
  --accent: #8b5cf6; --accent2: #22d3ee; --crit: #ef4444; --high: #f97316; --med: #eab308; --low: #60a5fa; --info: #94a3b8; --ok: #22c55e;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
header.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: rgba(11,10,20,.75); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -.3px; }
.logo span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav a { color: var(--muted); margin-left: 22px; font-size: 15px; }
nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 700px) { nav a:not(.cta) { display: none; } }

.hero { padding: 80px 0 50px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -200px 0 auto; height: 600px; background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,.35), transparent 60%); pointer-events: none; }
.pill { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 14px; background: var(--bg2); }
h1 { font-size: clamp(32px, 5.5vw, 58px); line-height: 1.08; letter-spacing: -1.5px; margin: 22px auto 18px; max-width: 900px; }
h1 em { font-style: normal; background: linear-gradient(90deg, #c4b5fd, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 720px; margin: 0 auto 34px; }
.scanbox { display: flex; gap: 10px; max-width: 680px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 20px 60px rgba(139,92,246,.18); }
.scanbox input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font-size: 18px; padding: 12px 14px; outline: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff; border: 0; border-radius: 12px; padding: 14px 24px; font-size: 16px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .1s, filter .2s; }
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 14px; }
.err { color: #fca5a5; margin-top: 14px; min-height: 1.4em; }
@media (max-width: 560px) { .scanbox { flex-direction: column; } }

.stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 44px; }
.stat b { display: block; font-size: 30px; letter-spacing: -1px; }
.stat span { color: var(--muted); font-size: 14px; }

section { padding: 70px 0; }
section h2 { font-size: clamp(26px, 3.5vw, 38px); letter-spacing: -1px; margin: 0 0 12px; text-align: center; }
section .sub { color: var(--muted); text-align: center; max-width: 680px; margin: 0 auto 40px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { font-size: 26px; }
.facts .card b { font-size: 34px; letter-spacing: -1px; background: linear-gradient(90deg, #fca5a5, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts .card small { display: block; margin-top: 10px; color: #6f6990; font-size: 12px; }
.steps { counter-reset: s; }
.steps .card::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(139,92,246,.2); color: #c4b5fd; font-weight: 800; }
pre.prompt { background: #0e0c1a; border: 1px solid var(--line); border-radius: 12px; padding: 16px; white-space: pre-wrap; word-break: break-word; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #d6d0f2; margin: 0; max-height: 360px; overflow: auto; }

.pricing { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.price { display: flex; flex-direction: column; }
.price.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(139,92,246,.25); }
.price .amount { font-size: 38px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 2px; }
.price .amount small { font-size: 16px; color: var(--muted); font-weight: 500; }
.price ul { padding: 0; list-style: none; margin: 16px 0 24px; flex: 1; }
.price li { padding: 6px 0 6px 26px; position: relative; color: #cfc9e8; font-size: 15px; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(139,92,246,.2); color: #c4b5fd; }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
footer a { color: var(--muted); margin-right: 16px; }

/* ---------- Отчёт ---------- */
.report-head { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 40px 0 24px; }
@media (max-width: 640px) { .report-head { grid-template-columns: 1fr; text-align: center; } }
.grade { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; font-size: 64px; font-weight: 900; border: 6px solid; margin: 0 auto; }
.grade small { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-top: -18px; }
.g-A { color: var(--ok); border-color: var(--ok); } .g-B { color: #84cc16; border-color: #84cc16; } .g-C { color: var(--med); border-color: var(--med); }
.g-D { color: var(--high); border-color: var(--high); } .g-F { color: var(--crit); border-color: var(--crit); }
.report-head h1 { font-size: clamp(24px, 3.5vw, 34px); margin: 0 0 8px; letter-spacing: -.5px; word-break: break-all; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
@media (max-width: 640px) { .chips { justify-content: center; } }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); background: var(--bg2); }
.counts { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .counts { justify-content: center; } }
.count { padding: 6px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.sev-critical { background: rgba(239,68,68,.15); color: #fca5a5; } .sev-high { background: rgba(249,115,22,.15); color: #fdba74; }
.sev-medium { background: rgba(234,179,8,.15); color: #fde047; } .sev-low { background: rgba(96,165,250,.15); color: #93c5fd; }
.sev-info { background: rgba(148,163,184,.15); color: #cbd5e1; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 24px; }
.finding { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; overflow: hidden; }
.finding > summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; gap: 12px; align-items: center; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary .t { flex: 1; font-weight: 600; }
.finding > summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.finding[open] > summary::after { transform: rotate(180deg); }
.finding .body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.finding h4 { margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.finding ol { margin: 0; padding-left: 20px; } .finding li { margin: 4px 0; white-space: pre-wrap; }
.evidence { font: 13px ui-monospace, Menlo, Consolas, monospace; background: #0e0c1a; border-radius: 8px; padding: 8px 12px; color: #fca5a5; word-break: break-all; }
.prompt-wrap { position: relative; }
.prompt-wrap .btn { position: absolute; top: 10px; right: 10px; }
.sev { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.cat { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .cat { display: none; } }
.passed li { color: #bbf7d0; } .passed li::marker { content: "✓  "; color: var(--ok); }
.loading { text-align: center; padding: 120px 0; }
.spinner { width: 54px; height: 54px; border: 5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.cta-box { background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(34,211,238,.1)); border: 1px solid var(--line); border-radius: 18px; padding: 28px; margin: 30px 0; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-box h3 { margin: 0 0 6px; } .cta-box p { margin: 0; color: var(--muted); }
code.inline { background: #0e0c1a; padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }

/* ---------- Модалка ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: none; place-items: center; z-index: 50; padding: 20px; }
.modal.open { display: grid; }
.modal .box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; max-width: 460px; width: 100%; position: relative; }
.modal .close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.modal input[type=email] { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 12px; font-size: 16px; margin: 12px 0; }
.modal label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: #1f1b36; border: 1px solid var(--accent); padding: 12px 20px; border-radius: 12px; transition: transform .3s; z-index: 60; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Документы ---------- */
.doc { max-width: 860px; padding: 40px 20px 80px; }
.doc h1 { text-align: left; font-size: clamp(30px, 4vw, 44px); margin: 10px 0 20px; }
.doc h2 { text-align: left; margin-top: 48px; font-size: 28px; }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { color: #d3cee8; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg2); }
.doc blockquote { border-left: 3px solid var(--accent); margin: 16px 0; padding: 4px 18px; color: var(--muted); }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 24px; }

/* правки после визуальной проверки */
[hidden] { display: none !important; }
code.inline { word-break: normal; overflow-wrap: anywhere; white-space: nowrap; }
.prompt-wrap pre.prompt { padding-top: 52px; }
.toolbar .btn { white-space: normal; text-align: center; }
@media (max-width: 560px) { .toolbar .btn { width: 100%; } }
