/* RepoVet design system.
   No build step and no third-party CSS: fewer dependencies is a feature for a security tool.
   Strict CSP: no inline style attributes anywhere, so every visual lives in this file. */

/* ------------------------------------------------------------------ tokens */
:root {
    --bg: #f7f8fa;
    --bg-elev: #ffffff;
    --bg-sunken: #f1f3f6;
    --ink: #0b1220;
    --ink-2: #334155;
    --muted: #5f6b7c;
    --faint: #94a3b8;
    --line: #e4e7ec;
    --line-strong: #cfd5dd;

    --brand: #059669;
    --brand-ink: #047857;
    --brand-soft: #ecfdf5;
    --primary: #0b1220;
    --primary-ink: #ffffff;
    --primary-hover: #1f2a3d;
    --focus: #2563eb;

    --critical: #dc2626; --critical-bg: #fef2f2; --critical-line: #fecaca;
    --high: #ea580c;     --high-bg: #fff7ed;     --high-line: #fed7aa;
    --medium: #b45309;   --medium-bg: #fffbeb;   --medium-line: #fde68a;
    --low: #2563eb;      --low-bg: #eff6ff;      --low-line: #bfdbfe;
    --info: #64748b;     --info-bg: #f1f5f9;     --info-line: #e2e8f0;
    --clean: #059669;    --clean-bg: #ecfdf5;    --clean-line: #a7f3d0;

    --code-bg: #0d1117;
    --code-head: #161b22;
    --code-ink: #e6edf3;
    --code-muted: #7d8590;
    --code-line: #30363d;
    --code-hl: rgba(248, 81, 73, .14);

    --radius-lg: 16px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -10px rgba(15, 23, 42, .12);
    --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 28px 56px -20px rgba(15, 23, 42, .25);

    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --wrap: 1120px;
    --wrap-narrow: 880px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0c10;
        --bg-elev: #11141a;
        --bg-sunken: #161a21;
        --ink: #e8ebf0;
        --ink-2: #c4cad4;
        --muted: #8d95a3;
        --faint: #5d6574;
        --line: #1f242d;
        --line-strong: #2b313c;

        --brand: #34d399;
        --brand-ink: #6ee7b7;
        --brand-soft: rgba(52, 211, 153, .10);
        --primary: #f1f5f9;
        --primary-ink: #0b1220;
        --primary-hover: #ffffff;
        --focus: #60a5fa;

        --critical: #f87171; --critical-bg: rgba(248, 113, 113, .10); --critical-line: rgba(248, 113, 113, .32);
        --high: #fb923c;     --high-bg: rgba(251, 146, 60, .10);     --high-line: rgba(251, 146, 60, .32);
        --medium: #facc15;   --medium-bg: rgba(250, 204, 21, .09);   --medium-line: rgba(250, 204, 21, .28);
        --low: #60a5fa;      --low-bg: rgba(96, 165, 250, .10);      --low-line: rgba(96, 165, 250, .30);
        --info: #94a3b8;     --info-bg: rgba(148, 163, 184, .10);    --info-line: rgba(148, 163, 184, .25);
        --clean: #34d399;    --clean-bg: rgba(52, 211, 153, .10);    --clean-line: rgba(52, 211, 153, .30);

        --code-bg: #0b0e13;
        --code-head: #12161d;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -10px rgba(0, 0, 0, .6);
        --shadow-lg: 0 28px 56px -20px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 720; letter-spacing: -0.03em; }
h3 { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

code, pre, kbd { font-family: var(--mono); font-size: .86em; }
:not(pre) > code {
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    padding: .08em .38em;
    border-radius: 6px;
    color: var(--ink-2);
    white-space: nowrap;
}

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--primary); color: #34d399; }
.brand-mark .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .925rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav { display: none; } .header-row { justify-content: space-between; } }

/* ------------------------------------------------------------------ buttons & inputs */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 600; font-size: .925rem; line-height: 1;
    padding: 11px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap;
    border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.btn .icon { width: 16px; height: 16px; }

.field-error { display: flex; align-items: center; gap: 8px; color: var(--critical); margin: 10px 0 0; font-size: .925rem; font-weight: 500; }

/* ------------------------------------------------------------------ chips & pills */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 500;
    background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none;
}
.chip .icon { width: 14px; height: 14px; color: var(--muted); }
a.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip-brand { background: var(--brand-soft); border-color: var(--clean-line); color: var(--brand-ink); }
.chip-brand .icon { color: var(--brand); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .74rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sev-critical { color: var(--critical); background: var(--critical-bg); border-color: var(--critical-line); }
.sev-high { color: var(--high); background: var(--high-bg); border-color: var(--high-line); }
.sev-medium { color: var(--medium); background: var(--medium-bg); border-color: var(--medium-line); }
.sev-low { color: var(--low); background: var(--low-bg); border-color: var(--low-line); }
.sev-info { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.sev-clean { color: var(--clean); background: var(--clean-bg); border-color: var(--clean-line); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
@media (max-width: 640px) { .card-pad { padding: 18px; } }

/* ------------------------------------------------------------------ home: hero */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 35%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 35%, transparent 75%);
    opacity: .7;
}
.hero::after {
    content: ""; position: absolute; z-index: -1; top: -220px; left: 50%; width: 900px; height: 520px; transform: translateX(-50%);
    background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 48px 0 40px; } }

.hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.045em; margin: 18px 0 18px; }
.hero h1 .accent { color: var(--brand); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.lead strong { color: var(--ink-2); }

.scan-box {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 6px 6px 16px;
    background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 14px;
    box-shadow: var(--shadow-lg);
    transition: border-color .15s, box-shadow .15s;
}
.scan-box:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent), var(--shadow-lg); }
.scan-box > .icon { color: var(--faint); width: 20px; height: 20px; }
.scan-box input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 1rem; color: var(--ink); padding: 12px 4px;
}
.scan-box input::placeholder { color: var(--faint); }
.scan-box.has-error { border-color: var(--critical); }
@media (max-width: 560px) {
    .scan-box { flex-wrap: wrap; padding: 6px; }
    .scan-box > .icon { display: none; }
    .scan-box input { flex-basis: 100%; padding: 12px; }
    .scan-box .btn { flex: 1; }
}

.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: .85rem; color: var(--muted); }
.examples button.chip { cursor: pointer; font: inherit; font-size: .82rem; }
.examples button.chip:hover { border-color: var(--line-strong); color: var(--ink); }

.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { color: var(--brand); }

.notice { display: flex; align-items: center; gap: 10px; background: var(--low-bg); border: 1px solid var(--low-line); color: var(--low); padding: 10px 14px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }

/* sample report illustration */
.preview { position: relative; }
.preview-card { overflow: hidden; }
.preview-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.preview-top .dots { display: flex; gap: 6px; margin-right: 6px; }
.preview-top .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.preview-body { padding: 18px; display: grid; gap: 14px; }
.preview-repo { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.preview-repo .icon { width: 18px; height: 18px; }
.preview-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--critical-bg); border: 1px solid var(--critical-line); }
.preview-verdict .icon { color: var(--critical); width: 22px; height: 22px; margin-top: 2px; }
.preview-verdict strong { display: block; color: var(--critical); font-size: .95rem; }
.preview-verdict span { font-size: .82rem; color: var(--muted); }
.preview-finding { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.preview-finding-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .88rem; font-weight: 600; }
.preview-finding-head code { margin-left: auto; font-size: .78rem; }
.preview-float { position: absolute; right: -14px; bottom: -18px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: .85rem; font-weight: 600; }
.preview-float .icon { color: var(--brand); }
@media (max-width: 960px) { .preview-float { right: 12px; } }

/* ------------------------------------------------------------------ home: sections */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
@media (max-width: 640px) { .section { padding: 52px 0; } }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; font-weight: 700; color: var(--brand-ink); margin: 0 0 10px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 8px; }
.stat { background: var(--bg-elev); padding: 22px; }
.stat strong { display: block; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { padding: 24px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .85rem; margin-bottom: 16px; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 24px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--clean-line); margin-bottom: 16px; }
.feature-icon .icon { width: 20px; height: 20px; }
.feature p { margin: 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.checklist .icon { color: var(--brand); margin-top: 3px; }

.readme { overflow: hidden; }
.readme-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); }
.readme-body { padding: 22px 22px 26px; }
.readme-body h3 { font-size: 1.35rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.readme-body p { color: var(--muted); font-size: .92rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.badge-row img { display: block; height: 20px; }

.recent { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.recent li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.recent li:first-child { border-top: 0; }
.recent li:hover { background: var(--bg-sunken); }
.recent .icon { width: 18px; height: 18px; color: var(--muted); }
.recent a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent a:hover { text-decoration: underline; }
.recent time { color: var(--faint); font-size: .85rem; white-space: nowrap; }
@media (max-width: 620px) { .recent li { grid-template-columns: auto minmax(0, 1fr) auto; } .recent time { display: none; } }

/* ------------------------------------------------------------------ report page */
.report { padding-top: 40px; padding-bottom: 24px; } /* top/bottom only: keep .wrap's side gutters */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { width: 14px; height: 14px; color: var(--faint); }

.report-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.repo-avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.repo-avatar .icon { width: 22px; height: 22px; }
.report-title h1 { margin: 0; font-size: clamp(1.5rem, 3.6vw, 2.1rem); overflow-wrap: anywhere; }
.report-title h1 a { text-decoration: none; }
.report-title h1 a:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.report-title .eyebrow { margin-bottom: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.meta .chip code { background: none; border: 0; padding: 0; color: inherit; }

.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.verdict::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--verdict, var(--info)); }
.verdict-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--verdict-bg, var(--info-bg)); color: var(--verdict, var(--info)); border: 1px solid var(--verdict-line, var(--info-line)); }
.verdict-icon .icon { width: 28px; height: 28px; }
.verdict-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; margin: 4px 0 4px; color: var(--verdict, var(--ink)); }
.verdict-sub { margin: 0; color: var(--muted); }
.verdict-clean { --verdict: var(--clean); --verdict-bg: var(--clean-bg); --verdict-line: var(--clean-line); }
.verdict-unusual { --verdict: var(--medium); --verdict-bg: var(--medium-bg); --verdict-line: var(--medium-line); }
.verdict-suspicious { --verdict: var(--high); --verdict-bg: var(--high-bg); --verdict-line: var(--high-line); }
.verdict-malware { --verdict: var(--critical); --verdict-bg: var(--critical-bg); --verdict-line: var(--critical-line); background: linear-gradient(var(--critical-bg), var(--critical-bg)), var(--bg-elev); border-color: var(--critical-line); }
.verdict-failed { --verdict: var(--info); }
@media (max-width: 560px) { .verdict { grid-template-columns: 1fr; padding: 20px; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.tile { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); }
.tile .tile-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 500; }
.tile .tile-label .icon { width: 14px; height: 14px; }
.tile strong { display: block; font-size: 1.5rem; letter-spacing: -0.03em; margin-top: 4px; line-height: 1.2; }
.tile.is-critical strong { color: var(--critical); }
.tile.is-high strong { color: var(--high); }
.tile.is-medium strong { color: var(--medium); }
.tile.is-zero strong { color: var(--faint); }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.report-meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 2px 0; font-size: .85rem; color: var(--muted); }
.report-meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.report-meta-line .icon { width: 14px; height: 14px; color: var(--faint); }
.warn-line { display: flex; gap: 8px; align-items: flex-start; margin: 12px 2px 0; font-size: .875rem; color: var(--medium); }

.report-line { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0; }
.report-line .icon { width: 15px; height: 15px; color: var(--faint); }

.block { margin-top: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { font-size: 1.25rem; margin: 0; letter-spacing: -0.02em; }
.block-head .count { color: var(--muted); font-weight: 500; }

.finding { padding: 20px 22px; margin-bottom: 14px; }
.finding-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.finding-head h3 { margin: 0; font-size: 1.02rem; }
.finding > p { color: var(--ink-2); margin: 0 0 14px; font-size: .95rem; }
.finding .rule { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: .78rem; color: var(--faint); }
.finding .rule code { font-size: .78rem; }
.finding-critical { border-left: 3px solid var(--critical); }
.finding-high { border-left: 3px solid var(--high); }
.finding-medium { border-left: 3px solid var(--medium); }
.finding-low { border-left: 3px solid var(--low); }

.code { border-radius: 10px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--code-line); }
.code-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--code-head); border-bottom: 1px solid var(--code-line); font-family: var(--mono); font-size: .8rem; color: var(--code-ink); }
.code-head .icon { width: 14px; height: 14px; color: var(--code-muted); }
.code-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-head a { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--code-muted); text-decoration: none; font-family: var(--font); font-size: .78rem; white-space: nowrap; }
.code-head a:hover { color: var(--code-ink); }
.code pre { margin: 0; display: flex; background: var(--code-hl); }
.code .ln { flex: none; padding: 12px 12px 12px 14px; color: var(--code-muted); text-align: right; user-select: none; border-right: 1px solid var(--code-line); min-width: 3.2em; }
.code pre code { display: block; padding: 12px 14px; color: var(--code-ink); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; line-height: 1.6; }
.file-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .85rem; text-decoration: none; color: var(--ink-2); margin-bottom: 12px; overflow-wrap: anywhere; }
.file-link:hover { color: var(--ink); text-decoration: underline; }
.file-link .icon { width: 15px; height: 15px; color: var(--muted); }

.notes { padding: 0; }
.notes summary { display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary .icon { color: var(--muted); }
.notes summary .chev { margin-left: auto; transition: transform .15s; }
.notes[open] summary .chev { transform: rotate(90deg); }
.note { padding: 14px 20px; border-top: 1px solid var(--line); }
.note p { margin: 0; }
.note .muted { font-size: .9rem; margin-top: 4px; }

.badge-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
.badge-panel h2 { font-size: 1.15rem; }
@media (max-width: 760px) { .badge-panel { grid-template-columns: 1fr; } }
.badge-preview { display: flex; align-items: center; justify-content: center; padding: 22px; border-radius: var(--radius); background: var(--bg-sunken); border: 1px dashed var(--line-strong); }
.badge-preview img { display: block; height: 20px; }
.snippet-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; }
.snippet { flex: 1; min-width: 0; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--code-line); font-size: .78rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 560px) { .snippet-row { flex-direction: column; } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 32px 0 0; }

/* pending scan */
.pending { display: grid; justify-items: center; text-align: center; padding: 44px 24px; }
.pending h2 { font-size: 1.3rem; margin: 18px 0 6px; }
.pending > p { color: var(--muted); max-width: 440px; }
.radar { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.radar .icon { width: 30px; height: 30px; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }
.radar::after { animation-delay: 1s; }
@keyframes ping { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.9); opacity: 0; } }
.progress { width: min(360px, 100%); height: 4px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; margin: 20px 0 22px; }
.progress span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--brand); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.stages { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; font-size: .9rem; color: var(--muted); }
.stages li { display: flex; align-items: center; gap: 10px; }
.stages .icon { width: 16px; height: 16px; color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .radar::before, .radar::after, .progress span { animation-duration: 4s; } }

/* ------------------------------------------------------------------ legal pages */
.legal { padding-top: 56px; padding-bottom: 24px; }
.legal .prose { max-width: 720px; }
.legal h1 { margin-bottom: 12px; }
.legal h2 { font-size: 1.2rem; margin-top: 40px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 8px; color: var(--ink-2); }
.legal li::marker { color: var(--faint); }
.legal p { color: var(--ink-2); }
.legal .lead { margin-bottom: 8px; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding: 44px 0 28px; }
.footer-grid h4 { margin: 0 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.footer-grid ul a { text-decoration: none; color: var(--ink-2); }
.footer-grid ul a:hover { color: var(--ink); text-decoration: underline; }
.footer-about p { color: var(--muted); font-size: .9rem; max-width: 380px; margin: 12px 0 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 18px 0 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: .82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
