:root {
  --bg: #0b0f17;
  --bg2: #111827;
  --card: #131b2a;
  --line: #22304a;
  --text: #e6ebf5;
  --muted: #8b98b1;
  --accent: #5b8cff;
  --pass: #22c55e;
  --warn: #f5a524;
  --fail: #ef4444;
  --unknown: #94a3b8;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f5f7fb; --bg2: #ffffff; --card: #ffffff; --line: #e1e6ef; --text: #101828; --muted: #5c6b84; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .86em; word-break: break-all; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
[hidden] { display: none !important; }

.topbar { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 85%, transparent); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 800; color: var(--text); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 200deg, var(--pass), var(--accent), var(--fail), var(--warn), var(--pass)); box-shadow: 0 0 18px #5b8cff55; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 42px 20px 18px; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.lead { color: var(--muted); max-width: 760px; font-size: 1.05rem; margin: 0; }
.hl-real { color: var(--pass); } .hl-sus { color: var(--warn); } .hl-fake { color: var(--fail); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid > .card { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; background: var(--accent); color: #fff; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn[disabled] { opacity: .6; cursor: default; }
.input { width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }

/* Scanner */
.scanner { display: flex; gap: 28px; align-items: center; padding: 30px; }
.scanner h2 { margin: 0 0 10px; }
.scanner.failed h2 { color: var(--fail); }
.scan-anim { width: 92px; height: 92px; position: relative; flex: none; }
.scan-anim span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
.scan-anim span:nth-child(2) { inset: 12px; border-top-color: var(--pass); animation-duration: 1.6s; animation-direction: reverse; }
.scan-anim span:nth-child(3) { inset: 24px; border-top-color: var(--warn); animation-duration: .8s; }
.scanner.failed .scan-anim span { animation: none; border-top-color: var(--fail); }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.steps li { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .9em; }
.steps li.active { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px #5b8cff22; }
.steps li.done { border-color: color-mix(in srgb, var(--pass) 50%, var(--line)); color: var(--pass); }
.steps li.done::before { content: "✓ "; }

/* Verdict */
.verdict { padding: 26px; position: relative; overflow: hidden; }
.verdict::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--vc); }
.verdict-REAL { --vc: var(--pass); }
.verdict-SUSPICIOUS { --vc: var(--warn); }
.verdict-HIGH_RISK { --vc: var(--fail); }
.verdict-UNKNOWN { --vc: var(--unknown); }
.verdict { background: linear-gradient(120deg, color-mix(in srgb, var(--vc) 13%, var(--card)) 0%, var(--card) 55%); border-color: color-mix(in srgb, var(--vc) 40%, var(--line)); }
.verdict-main { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
@media (max-width: 700px) { .verdict-main { grid-template-columns: 1fr; } .gauge { justify-self: start; } }
.verdict-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2rem; font-weight: 900; color: #fff; background: var(--vc); box-shadow: 0 8px 30px color-mix(in srgb, var(--vc) 45%, transparent); }
.verdict-kicker { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); }
.verdict-label { margin: 2px 0; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--vc); letter-spacing: -.01em; line-height: 1.1; }
.verdict-sub { margin: 0 0 8px; font-weight: 600; }
.verdict-summary { margin: 0; color: var(--muted); max-width: 720px; }
.verdict-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92em; color: var(--muted); }
.verdict-meta b { color: var(--text); }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.gauge { width: 132px; height: 132px; }
.gauge-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.gauge-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.g-REAL { stroke: var(--pass); } .g-SUSPICIOUS { stroke: var(--warn); } .g-HIGH_RISK { stroke: var(--fail); } .g-UNKNOWN { stroke: var(--unknown); }
.gauge-num { fill: var(--text); font-size: 30px; font-weight: 800; text-anchor: middle; }
.gauge-lbl { fill: var(--muted); font-size: 10px; letter-spacing: .2em; text-anchor: middle; }

.s-pass { color: var(--pass); } .s-warn { color: var(--warn); } .s-fail { color: var(--fail); } .s-info { color: var(--accent); }

/* Panels */
.panel h3 { margin: 0 0 14px; font-size: 1.05rem; }
.panel h4 { margin: 18px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 7px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .92em; }
.kv dd { margin: 0; word-break: break-word; }
.kv dd.big { font-size: 1.05em; font-weight: 700; }
.map { width: 100%; height: 220px; border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 140px 1fr 44px; gap: 10px; align-items: center; }
.bar-label { font-size: .92em; }
.bar-track { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; transition: width .8s ease; }
.b-pass { background: var(--pass); } .b-warn { background: var(--warn); } .b-fail { background: var(--fail); }
.bar-val { font-family: var(--mono); font-size: .85em; text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 11px; border-radius: 999px; font-size: .85em; border: 1px solid var(--line); }
.chip-on { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 55%, var(--line)); background: color-mix(in srgb, var(--fail) 10%, transparent); }
.chip-off { color: var(--muted); }
.codes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.codes-group { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--muted); width: 70px; }
.code { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); padding: 1px 7px; border-radius: 6px; font-size: .78em; }

.tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.tab { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .9em; cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.check-cat { margin: 20px 0 8px !important; }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.check-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8em; font-weight: 800; color: #fff; background: var(--muted); margin-top: 1px; }
.check.s-pass .check-icon { background: var(--pass); }
.check.s-warn .check-icon { background: var(--warn); }
.check.s-fail .check-icon { background: var(--fail); }
.check.s-info .check-icon { background: var(--accent); }
.check.s-pass, .check.s-info { color: var(--text); }
.check-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.check-ev { margin: 4px 0 0; color: var(--muted); }
.check-meta { margin: 6px 0 0; font-size: .82em; color: var(--muted); }
.tag { font-size: .72em; padding: 1px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; }
.tag-fail { background: var(--fail); color: #fff; }

.table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9em; }
.table th, .table td { text-align: left; padding: 7px 6px; border-top: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; }
.pill { padding: 1px 8px; border-radius: 999px; font-size: .8em; font-weight: 700; }
.p-REAL { color: var(--pass); } .p-SUSPICIOUS { color: var(--warn); } .p-HIGH_RISK { color: var(--fail); } .p-UNKNOWN { color: var(--unknown); }
.live { color: var(--accent); margin: 12px 0 0; font-family: var(--mono); }
.timings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.timing { font-size: .78em; border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.timing b { color: var(--text); font-weight: 600; }
details.panel summary { cursor: pointer; font-weight: 700; }
.raw { max-height: 520px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: .8em; margin-top: 14px; }

/* Ads */
.ad-slot { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.ad-slot > [data-pt] { width: 100%; }
.ad-slot .pt-unit { margin: 0 auto 18px; }
.ad-pair { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 760px) { .ad-pair { grid-template-columns: 1fr 1fr; } }
.ad-after-report { display: none; }
.report-ready .ad-after-report.ad-slot { display: flex; }
.report-ready .ad-pair.ad-after-report { display: grid; }

/* Content pages */
.prose { max-width: 860px; }
.prose h2 { margin-top: 34px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92em; margin: 12px 0 20px; }
.prose th, .prose td { text-align: left; border-top: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
.prose th { color: var(--muted); }
.prose li { margin-bottom: 6px; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0; color: var(--muted); font-size: .9em; }
.footer p { margin: 4px 0; }
