:root {
  --bg: #0b1020; --bg2: #121a33; --ink: #0f172a; --text: #1e293b; --muted: #64748b; --line: #e2e8f0;
  --paper: #ffffff; --soft: #f8fafc; --brand: #6366f1; --brand2: #4f46e5;
  --good: #16a34a; --almost: #65a30d; --risk: #d97706; --critical: #dc2626; --info: #64748b;
  --radius: 14px; --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif; color: var(--text); background: var(--soft); }
a { color: var(--brand2); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4.5vw, 46px); letter-spacing: -.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; }
h3 { font-size: 18px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 48px 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--brand); margin: 0 0 10px; }
.eyebrow--red { color: var(--critical); } .eyebrow--blue { color: #2563eb; }
.lead { font-size: 19px; color: #334155; }

.top { background: var(--bg); color: #e2e8f0; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,.06); }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.logo small { display: block; font-weight: 500; color: #94a3b8; letter-spacing: 0; font-size: 12px; }
.logo__mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: grid; place-items: center; font-weight: 900; }
.top__nav { display: flex; gap: 20px; align-items: center; }
.top__nav a { color: #cbd5e1; text-decoration: none; font-size: 15px; }
.top__nav a:hover { color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 13px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .1s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand2); }
.btn--ghost { background: transparent; color: var(--brand2); box-shadow: inset 0 0 0 2px currentColor; }
.top .btn--ghost { color: #e2e8f0; }
.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn.is-disabled { opacity: .45; pointer-events: none; }

.hero { background: radial-gradient(1200px 500px at 80% -10%, #1e2a5a 0%, var(--bg) 60%); color: #e2e8f0; padding: 64px 0 72px; }
.hero h1 { color: #fff; }
.hero .lead { color: #cbd5e1; }
.hero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero__gauge { text-align: center; }
.hero__gauge .gauge { width: 280px; max-width: 100%; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.chip { border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.chip--fail { background: rgba(220, 38, 38, .18); color: #fca5a5; }
.chip--warn { background: rgba(217, 119, 6, .18); color: #fcd34d; }
.scan { display: flex; gap: 10px; margin: 26px 0 8px; background: #fff; padding: 6px; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.scan input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 19px; padding: 10px 14px; color: var(--ink); background: transparent; }
.scan__error { color: #f87171; min-height: 1.2em; margin: 6px 0; font-weight: 600; }
.hero .muted { color: #94a3b8; }

.gauge { display: block; margin: 0 auto; }
.gauge__track, .gauge__val { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge__track { stroke: rgba(148, 163, 184, .25); }
.gauge__val { stroke: var(--brand); transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); }
.gauge--good .gauge__val { stroke: var(--good); } .gauge--almost .gauge__val { stroke: var(--almost); }
.gauge--risk .gauge__val { stroke: var(--risk); } .gauge--critical .gauge__val { stroke: var(--critical); }
.gauge__num { font-size: 58px; font-weight: 800; text-anchor: middle; fill: currentColor; }
.gauge__cap { font-size: 15px; text-anchor: middle; fill: #94a3b8; }
.bar { width: 100%; height: 8px; display: block; margin: 6px 0 4px; }
.bar__track { fill: #e2e8f0; } .bar__val { fill: var(--brand); }
.bar--good .bar__val { fill: var(--good); } .bar--almost .bar__val { fill: var(--almost); }
.bar--risk .bar__val { fill: var(--risk); } .bar--critical .bar__val { fill: var(--critical); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card--accent { border-color: #c7d2fe; background: linear-gradient(180deg, #eef2ff, #fff); }
.card--wide { text-align: left; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; }
.ticks li { position: relative; padding-left: 26px; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

.ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.step p { margin: 0 0 8px; color: #475569; font-size: 14px; flex: 1; }
.step--accent { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.step__price { font-weight: 800; color: var(--brand2); font-size: 18px; }
.credit { margin-top: 22px; padding: 16px 20px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }

.progress { margin: 28px 0; }
.progress__bar { height: 12px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.progress__fill { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .6s; }
.progress__text { font-weight: 600; color: var(--ink); }

.report-head { background: var(--bg); color: #e2e8f0; padding: 40px 0; }
.report-head h1 a { color: #fff; text-decoration: none; word-break: break-all; }
.report-head__in { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center; }
.report-head .gauge { width: 240px; color: #fff; }
.report-head .muted { color: #94a3b8; }
.grade { font-size: 20px; font-weight: 700; margin: 0 0 18px; }
.grade--good { color: #4ade80; } .grade--almost { color: #a3e635; } .grade--risk { color: #fbbf24; } .grade--critical { color: #f87171; }
.contours { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 14px; }
.contour__row { display: flex; justify-content: space-between; font-weight: 600; color: #fff; }
.contour__row b { font-size: 22px; }
.report-head .bar__track { fill: rgba(148,163,184,.25); }

.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.issue { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); border-top: 4px solid var(--info); box-shadow: var(--shadow); }
.issue--fail { border-top-color: var(--critical); } .issue--warn { border-top-color: var(--risk); } .issue--ok { border-top-color: var(--good); }
.issue__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.issue__impact { color: #475569; font-size: 15px; }
.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .02em; color: #fff; white-space: nowrap; }
.badge--fail { background: var(--critical); } .badge--warn { background: var(--risk); } .badge--ok { background: var(--good); } .badge--info { background: var(--info); }

.offer { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.offer:not(:has(.offer__next)) { grid-template-columns: 1fr; }
.offer__body { padding: 30px; }
.offer--sprint .offer__body { background: linear-gradient(135deg, #fff7ed, #fff); }
.offer--watchdog .offer__body, .offer--almost .offer__body { background: linear-gradient(135deg, #f0fdf4, #fff); }
.offer__next { padding: 30px; background: #0f172a; color: #cbd5e1; }
.offer__next h3 { color: #fff; }
.offer__next .btn--ghost { color: #a5b4fc; }
.offer__price { font-size: 24px; font-weight: 800; color: var(--ink); margin: 10px 0 16px; }
.offer__next .offer__price { color: #fff; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 12px 0; color: #475569; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

.tgpreview { background: #dfe7ef; border-radius: var(--radius); padding: 28px; }
.tgpreview__msg { max-width: 420px; background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.tgpreview__url { color: #2481cc; font-size: 15px; word-break: break-all; }
.tgpreview__card { border-left: 3px solid #2481cc; padding: 4px 0 4px 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.tgpreview__site { color: #2481cc; }
.tgpreview__card img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
.tgpreview__noimg { color: var(--critical); font-size: 13px; }

.checklist { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.checklist__title { padding: 18px 22px; margin: 0; background: var(--soft); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.score { font-size: 16px; font-weight: 800; }
.score--good { color: var(--good); } .score--almost { color: var(--almost); } .score--risk { color: var(--risk); } .score--critical { color: var(--critical); }
.check { border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 96px minmax(180px, 1fr) 2fr; gap: 14px; align-items: baseline; padding: 14px 22px; }
.check summary::-webkit-details-marker { display: none; }
.check summary:hover { background: #fafbff; }
.check__title { font-weight: 700; color: var(--ink); }
.check__sum { color: #475569; font-size: 15px; }
.check__body { padding: 0 22px 16px 132px; font-size: 15px; }
.check__body:empty { display: none; }
.evidence { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #334155; word-break: break-all; }
.locked { color: var(--brand2); font-weight: 600; }
.notice { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.notice--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.copy { cursor: pointer; }
.copy.is-copied { outline: 2px solid var(--good); }

.modal { border: 0; border-radius: 16px; padding: 0; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal::backdrop { background: rgba(11, 16, 32, .6); }
.modal__form, .form { display: flex; flex-direction: column; gap: 12px; }
.modal__form { padding: 28px; position: relative; }
.modal__close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
input[type=text], input:not([type]), textarea, select { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); border-color: transparent; }
.steps { padding-left: 20px; } .steps li { margin: 8px 0; }
.methods { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.methods summary { cursor: pointer; }
.kv th { text-align: left; padding: 4px 16px 4px 0; color: var(--muted); font-weight: 500; }
.doc h2 { font-size: 20px; margin-top: 1.4em; }

.foot { background: var(--bg); color: #cbd5e1; padding: 32px 0; margin-top: 40px; }
.foot__in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot__links { display: flex; flex-direction: column; gap: 6px; }
.foot a { color: #a5b4fc; }
.foot .muted { color: #94a3b8; }

.admin .section { padding-top: 24px; }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; }
.stats b { font-size: 24px; color: var(--ink); }
.stats span { color: var(--muted); font-size: 13px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px; }
.inline-form input { flex: 1; min-width: 160px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 26px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--soft); font-weight: 700; color: #334155; white-space: nowrap; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions form { margin: 0; }

@media (max-width: 960px) {
  .hero__in, .report-head__in, .grid2, .offer { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr 1fr; }
  .top3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .report-head__gauge { text-align: center; }
}
@media (max-width: 640px) {
  .top__nav a:not(.btn) { display: none; }
  .scan { flex-direction: column; }
  .contours { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; }
  .check summary { grid-template-columns: 1fr; gap: 4px; }
  .check__body { padding: 0 22px 16px; }
  .section { padding: 32px 16px; }
}
