/* =====================================================================
   Design system
   Brand colours come from /brand/brand.css (SCANNER_BRAND_COLOR*): --brand,
   --brand-2 and --brand-mid; every accent below is derived from them.
   Themes: html[data-theme="light" | "dark" | "system"] (system follows the OS).
   No inline styles anywhere: the Content-Security-Policy forbids them, so
   charts are SVG attributes and every visual state is a class.
   ===================================================================== */

/* Inter (SIL Open Font License 1.1, /static/fonts/LICENSE-Inter.txt): the brand
   typeface, one variable file with every weight the interface uses. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/InterVariable-latin.woff2") format("woff2");
}

:root {
  --brand: #5b5bf0;
  --brand-2: #0ea5c6;
  --brand-mid: #8b5cf6;
}

:root,
html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-grad-1: color-mix(in srgb, var(--brand) 10%, transparent);
  --bg-grad-2: color-mix(in srgb, var(--brand-2) 10%, transparent);
  --surface: #ffffff;
  --surface-2: #f2f4f9;
  --surface-3: #e9ecf4;
  --glass: rgba(255, 255, 255, 0.72);
  --border: #e3e7ef;
  --border-strong: #cfd5e2;
  --text: #0e1525;
  --text-2: #334155;
  --muted: #64708a;
  --accent: var(--brand);
  --accent-2: var(--brand-2);
  --accent-mid: var(--brand-mid);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-text: color-mix(in srgb, var(--brand) 78%, #000);
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --ring-track: #e6e9f2;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #070a12;
  --bg-grad-1: color-mix(in srgb, var(--brand) 22%, transparent);
  --bg-grad-2: color-mix(in srgb, var(--brand-2) 12%, transparent);
  --surface: #0e1320;
  --surface-2: #131a2a;
  --surface-3: #1a2236;
  --glass: rgba(14, 19, 32, 0.66);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #e8edf7;
  --text-2: #c3cbdb;
  --muted: #8e9ab2;
  --accent: color-mix(in srgb, var(--brand) 78%, #fff);
  --accent-2: color-mix(in srgb, var(--brand-2) 80%, #fff);
  --accent-mid: color-mix(in srgb, var(--brand-mid) 85%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-text: color-mix(in srgb, var(--brand) 42%, #fff);
  --code-bg: #05070d;
  --code-text: #dbe4f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  --ring-track: #1d2638;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #070a12;
    --bg-grad-1: color-mix(in srgb, var(--brand) 22%, transparent);
    --bg-grad-2: color-mix(in srgb, var(--brand-2) 12%, transparent);
    --surface: #0e1320;
    --surface-2: #131a2a;
    --surface-3: #1a2236;
    --glass: rgba(14, 19, 32, 0.66);
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.26);
    --text: #e8edf7;
    --text-2: #c3cbdb;
    --muted: #8e9ab2;
    --accent: color-mix(in srgb, var(--brand) 78%, #fff);
    --accent-2: color-mix(in srgb, var(--brand-2) 80%, #fff);
    --accent-mid: color-mix(in srgb, var(--brand-mid) 85%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --accent-text: color-mix(in srgb, var(--brand) 42%, #fff);
    --code-bg: #05070d;
    --code-text: #dbe4f3;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
    --ring-track: #1d2638;
    color-scheme: dark;
  }
}

:root {
  --critical: #ef4444;
  --high: #f97316;
  --medium: #f59e0b;
  --low: #3b82f6;
  --info: #64748b;
  --pass: #10b981;
  --grade-a: #10b981;
  --grade-b: #84cc16;
  --grade-c: #f59e0b;
  --grade-d: #f97316;
  --grade-f: #ef4444;
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, var(--bg-grad-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 750; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 14px; font-weight: 700; }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
pre { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gradient-text {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 60%, var(--accent-mid) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
svg.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
svg.icon-lg { width: 24px; height: 24px; }

/* --------------------------------------------------------------- layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; margin-left: auto; margin-right: auto; }
main { flex: 1; padding: 32px 0 64px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 17px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: block;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-mark svg { display: block; width: 30px; height: 30px; }
/* The drawn wordmark: "Attack" in the text colour, "Grade" in the brand gradient. */
.brand-wordmark { display: inline-flex; align-items: center; color: var(--text); }
.brand-wordmark svg { display: block; height: 19px; width: auto; }
.brand-mark, .brand-logo { flex-shrink: 0; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; object-fit: contain; }
/* A long product name gets an ellipsis instead of pushing the header apart. */
.site-header .brand { min-width: 0; }
.site-header .brand-text { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a { color: var(--text-2); font-size: 14px; font-weight: 550; padding: 8px 12px; border-radius: 9px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.credit-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.credit-pill:hover { text-decoration: none; border-color: var(--border-strong); }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px;
}
.menu-panel a, .menu-panel button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.menu-panel a.selected { color: var(--accent-text); font-weight: 650; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 12px 4px; font-weight: 700; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }
.mobile-nav { display: none; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; font-weight: 650; font-size: 14.5px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; font-family: inherit; white-space: nowrap; transition: transform 0.08s, box-shadow 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  border: none; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid) 55%, var(--accent-2));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 50%, transparent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--critical); border-color: rgba(239, 68, 68, 0.35); background: transparent; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.inline-form { display: inline; margin: 0; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
}
.card-glass { background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.card-tight { padding: 18px; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 18px; }
/* Cards laid out by a grid or flex row align by the layout, not by the stacking margin. */
:where(.grid, .plans, .cat-grid, .stats, .row, .row-between) > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent-text);
}
.hover-lift { transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.input, .field input, .field select {
  height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit; width: 100%;
}
.input:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hint { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--text-2); }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }
.input-xl { height: 56px; font-size: 17px; border-radius: 14px; padding: 0 18px; }

/* --------------------------------------------------------------- alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin: 0 0 18px; font-size: 14px; border: 1px solid; }
.alert-error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); color: var(--text); }
.alert-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); }
.alert-success { background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.35); color: var(--text); }
.alert-warn { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.4); color: var(--text); }
.alert-warn svg { color: #d97706; }
.scan-hero .no-credit { margin: 4px 0 14px; }

/* ---------------------------------------------------------- badges/chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.sev-critical { background: rgba(239, 68, 68, 0.14); color: var(--critical); }
.sev-high { background: rgba(249, 115, 22, 0.14); color: var(--high); }
.sev-medium { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.sev-low { background: rgba(59, 130, 246, 0.14); color: var(--low); }
.sev-info { background: rgba(100, 116, 139, 0.14); color: var(--info); }
.st-completed, .st-verified { background: rgba(16, 185, 129, 0.14); color: var(--pass); }
.st-running, .st-queued { background: var(--accent-soft); color: var(--accent-text); }
.st-failed, .st-expired { background: rgba(239, 68, 68, 0.14); color: var(--critical); }
.st-pending { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.chip-accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip-warn { background: rgba(245, 158, 11, 0.14); color: #b45309; border-color: transparent; }
html[data-theme="dark"] .chip-warn { color: #fbbf24; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-critical { background: var(--critical); } .dot-high { background: var(--high); }
.dot-medium { background: var(--medium); } .dot-low { background: var(--low); } .dot-info { background: var(--info); }

/* -------------------------------------------------------- grade visuals */
.grade-A { color: var(--grade-a); } .grade-B { color: var(--grade-b); } .grade-C { color: var(--grade-c); }
.grade-D { color: var(--grade-d); } .grade-F { color: var(--grade-f); }
.fill-A { fill: var(--grade-a); stroke: var(--grade-a); } .fill-B { fill: var(--grade-b); stroke: var(--grade-b); }
.fill-C { fill: var(--grade-c); stroke: var(--grade-c); } .fill-D { fill: var(--grade-d); stroke: var(--grade-d); }
.fill-F { fill: var(--grade-f); stroke: var(--grade-f); }
.grade-pill {
  display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 8px;
  font-weight: 800; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border);
}
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--ring-track); }
.ring .value { fill: none; stroke-linecap: round; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-score { font-size: 42px; font-weight: 850; letter-spacing: -0.03em; line-height: 1; }
.ring-grade { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.ring-sm .ring-score { font-size: 20px; }
.ring-sm .ring-grade { display: none; }
.bar { width: 100%; height: 8px; display: block; }
.bar .track { fill: var(--ring-track); }

/* --------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.kv th { width: 120px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.kv code { word-break: break-all; }
/* Legal details: labels up to "Correspondence and complaints" stay on one or
   two lines next to the value, and stack above it on a phone. */
.legal-table th { width: 36%; text-transform: none; letter-spacing: 0; font-size: 13px; vertical-align: top; padding-top: 13px; }
.legal-table td { vertical-align: top; overflow-wrap: anywhere; }
.legal-table tr:last-child th { border-bottom: none; }
/* Wide tables of records become one card per row on narrow screens, each value
   under its column name, so every action button stays on screen. */
@media (max-width: 860px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--border); border-radius: 12px; padding: 6px 14px; margin-bottom: 12px; }
  .table-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border); white-space: normal; overflow-wrap: anywhere; }
  .table-cards tr td:last-child { border-bottom: none; }
  .table-cards td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
  .table-cards td.cell-title { display: block; font-weight: 650; }
  .table-cards td.cell-title::before { display: none; }
  .table-cards td.cell-actions { flex-wrap: wrap; justify-content: flex-start; }
  .table-cards td.cell-actions::before { width: 100%; }
  .table-cards td:not([data-label])::before { display: none; }
}
@media (max-width: 560px) {
  .legal-table th, .legal-table td { display: block; width: auto; }
  .legal-table th { border-bottom: none; padding-bottom: 0; }
}

/* ----------------------------------------------------------------- hero */
/* The hero sets its own top spacing; main's 32px on top of it would stack into
   a 96px (desktop) / 68px (mobile) gap under the header. */
body:has(.hero) main { padding-top: 0; }
.hero { padding: 64px 0 40px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 56px; line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 20px; text-wrap: balance; }
.hero-lead { font-size: 19px; color: var(--text-2); max-width: 580px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; font-weight: 550; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--pass); }
.hero-visual { position: relative; }
.hero-visual::before {
  content: ""; position: absolute; inset: -30px; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  filter: blur(20px);
}
.preview-card { padding: 22px; border-radius: 22px; }
.preview-top { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.preview-meta h3 { margin: 0 0 4px; }
.cat-mini { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; }
.cat-mini .name { color: var(--text-2); font-weight: 550; }
.cat-mini .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.preview-finding { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); font-size: 13.5px; margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 12px; }
.stat-num { font-size: 36px; font-weight: 850; letter-spacing: -0.03em; }
.stat-label { color: var(--muted); font-size: 14px; }

.step-no {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 14px;
}
.check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
/* A long list of checks in two columns where there is room. */
.check-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; row-gap: 9px; }
@media (max-width: 760px) { .check-cols { grid-template-columns: minmax(0, 1fr); } }
.prose-text { color: var(--text-2); max-width: 760px; }
/* The link card closing the category grid centres its content and fills the
   rest of the last row, so the grid never ends with an empty slot. */
.cat-card-cta { display: flex; flex-direction: column; justify-content: center; }
.cat-card-cta .btn { align-self: flex-start; }
.area-grid > .cat-card-cta:nth-child(3n + 2) { grid-column: span 2; }
.area-grid > .cat-card-cta:nth-child(3n + 1) { grid-column: 1 / -1; }
@media (max-width: 1100px) and (min-width: 761px) {
  .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .area-grid > .cat-card-cta:nth-child(n) { grid-column: auto; }
  .area-grid > .cat-card-cta:nth-child(2n + 1) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .area-grid > .cat-card-cta:nth-child(n) { grid-column: auto; }
}
/* The sign-up side panel centres its content beside the taller form. */
.signup-aside { display: flex; flex-direction: column; justify-content: center; }
.signup-aside .btn { align-self: flex-start; }
.muted-list li { color: var(--muted); font-size: 13.5px; }
.muted-list svg { color: var(--muted); }
.prose > h2:first-child, .prose > h1:first-child { margin-top: 0; }
.check-list svg { color: var(--pass); margin-top: 3px; }
.check-list .no svg, .check-list li.no svg { color: var(--muted); }
.cat-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.cat-card li { margin-bottom: 4px; }

.compare-table td:not(:first-child), .compare-table th:not(:first-child) { text-align: center; width: 140px; }
.compare-table svg { color: var(--pass); }
.compare-table .no { color: var(--muted); }

.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--text-2); }

.cta-band {
  border-radius: 28px; padding: 56px 32px; text-align: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 85%, #000), color-mix(in srgb, var(--brand-mid) 85%, #000) 50%, color-mix(in srgb, var(--brand-2) 85%, #000));
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: 34px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); font-size: 17px; margin-bottom: 26px; }
.cta-band .btn { background: #fff; color: color-mix(in srgb, var(--brand) 55%, #000); border: none; }

/* --------------------------------------------------------------- pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--accent); box-shadow: 0 20px 50px color-mix(in srgb, var(--accent) 22%, transparent); }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); z-index: 1;
  height: 26px; padding: 0 14px; color: #fff; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid) 55%, var(--accent-2));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.plan-name { font-size: 15px; font-weight: 700; color: var(--text-2); }
.plan-price { font-size: 34px; font-weight: 850; letter-spacing: -0.03em; margin: 8px 0 2px; }
.plan-price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan-unit { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.plan .check-list { margin-bottom: 22px; flex: 1; }

/* ------------------------------------------------------------- dashboard */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 30px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.kpi { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 850; letter-spacing: -0.02em; margin-top: 4px; }
.scan-hero { padding: 28px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty > svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 8px; }

/* ---------------------------------------------------------------- report */
.report-hero { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.summary-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.summary-list li { font-size: 15.5px; color: var(--text-2); }
.summary-list li:first-child { font-size: 18px; font-weight: 650; color: var(--text); }
.counts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 14px; }
.cat-score { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.cat-score:hover { text-decoration: none; border-color: var(--border-strong); }
/* The status chip moves under the name when both do not fit, instead of cutting the name short. */
.cat-score .top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat-score .name { font-weight: 650; color: var(--text); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-score .top > .row { flex-wrap: nowrap; gap: 8px; min-width: 0; }
.cat-score .top > .badge, .cat-score .top > .chip { flex-shrink: 0; }
.cat-score .meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.bucket { border-radius: 16px; padding: 18px; border: 1px solid var(--border); background: var(--surface); }
.bucket h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.bucket-now { border-top: 3px solid var(--critical); }
.bucket-soon { border-top: 3px solid var(--medium); }
.bucket-later { border-top: 3px solid var(--low); }
.plan-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.plan-item:last-child { border-bottom: none; }
.plan-item a { color: var(--text); font-weight: 600; }
.plan-item .effort { font-size: 12px; color: var(--muted); }

.finding { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.finding > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary:hover { background: var(--surface-2); }
.finding .f-title { flex: 1; font-weight: 650; font-size: 15px; min-width: 0; }
.finding .chev { color: var(--muted); transition: transform 0.15s; }
.finding[open] .chev { transform: rotate(90deg); }
.finding-body { padding: 4px 18px 20px 18px; border-top: 1px solid var(--border); }
.f-section { margin-top: 16px; }
.f-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.impact { padding: 12px 14px; border-radius: 12px; background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.18); color: var(--text-2); font-size: 14.5px; }
.steps { margin: 0; padding-left: 22px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }
.code { margin-top: 8px; }
.code-box { position: relative; }
.code-label { font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.code pre {
  margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-text);
  font-size: 12.8px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08); color: #e2e8f0; font-size: 12px; cursor: pointer; font-family: inherit;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); }
.evidence .copy-btn { color: var(--text-2); border-color: var(--border-strong); background: var(--surface); }
.copy-btn { display: none; }
html.can-copy .copy-btn { display: inline-block; }
.js-only { display: none !important; }
html.js .js-only { display: inline-flex !important; }
.evidence pre { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.refs { margin: 0; padding-left: 18px; font-size: 13.5px; word-break: break-all; }
.locked-box {
  margin-top: 14px; padding: 18px; border-radius: 14px; text-align: center;
  background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 10px, var(--surface-3) 10px, var(--surface-3) 20px);
  border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 14px;
}
.locked-box svg { color: var(--accent); }
.unlock-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(120deg, var(--accent-soft), transparent);
}
.cve-table td { font-size: 13.5px; }
.passed-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 6px 22px; }
.passed-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 5px 0; color: var(--text-2); }
.passed-item svg { margin-top: 2px; }
.passed-item.passed svg { color: var(--pass); }
.passed-item.failed svg { color: var(--critical); }
.passed-item.na, .passed-item.skipped { color: var(--muted); }
.progress-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.progress-list li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; font-weight: 550; }
.progress-list .done svg { color: var(--pass); }
.progress-list .running svg { color: var(--accent); animation: spin 1s linear infinite; }
.progress-list .pending { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.delta-up { color: var(--pass); font-weight: 700; }
.delta-down { color: var(--critical); font-weight: 700; }
.toc { position: sticky; top: 84px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; }
.toc a:hover { background: var(--surface-2); text-decoration: none; }
.report-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.report-section { scroll-margin-top: 84px; margin-bottom: 26px; }
.sample-banner { margin-bottom: 18px; }

/* ----------------------------------------------------------------- prose */
.prose { max-width: 760px; }
.prose h2 { font-size: 20px; margin-top: 30px; }
.prose p, .prose li { color: var(--text-2); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 32px; background: var(--glass); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.footer-grid a { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 44px; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .report-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* The full navigation needs ~1050px once signed in with alerts; below that it moves into the menu. */
@media (max-width: 1100px) {
  .nav { display: none; }
  .mobile-nav { display: block; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .hide-sm { display: none !important; }
  .grid-2, .grid-3, .grid-4, .stats, .plans, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  /* Counters stay two to a row: a full-width card per number wastes a screen. */
  .grid-4.kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 24px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 36px; }
  .hero-lead { font-size: 17px; }
  .section { padding: 48px 0; }
  .report-hero { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .progress-list { grid-template-columns: 1fr; }
  .input-group { flex-direction: column; }
  .input-group .input { flex: none; }
  /* iOS Safari zooms into a focused field whose text is under 16px. */
  .input:not(.input-xl), .field input, .field select, select, textarea { font-size: 16px; }
  .page-head h1 { font-size: 26px; }
  h1 { font-size: 28px; }
  .compare-table td:not(:first-child), .compare-table th:not(:first-child) { width: auto; }
  .finding > summary { flex-wrap: wrap; }
  .cta-band { padding: 40px 20px; }
  .cta-band h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .site-header .brand-text { display: none; }
  .btn { white-space: normal; height: auto; min-height: 42px; padding-top: 8px; padding-bottom: 8px; text-align: center; }
  .btn-lg { min-height: 52px; }
  .btn-sm { min-height: 34px; }
  .unlock-banner form, .unlock-banner .btn, .hero-actions .btn { width: 100%; }
  .cat-mini { grid-template-columns: 120px 1fr 40px; }
  /* Header menus open across the header, so a 210px panel anchored to a button
     near the left edge cannot leave the screen (49px did at 320px). */
  .site-header .menu { position: static; }
  .site-header .menu-panel { left: 16px; right: 16px; min-width: 0; }
}

/* ----------------------------------------------------------------- print */
@media print {
  html, html[data-theme] {
    --bg: #fff; --surface: #fff; --surface-2: #f5f6f8; --surface-3: #eceff3; --text: #000; --text-2: #222;
    --muted: #555; --border: #d7dbe2; --code-bg: #f5f6f8; --code-text: #111; --ring-track: #e5e7eb; --glass: #fff;
  }
  body { background: #fff; font-size: 12px; }
  .site-header, .site-footer, .no-print, .toc, .copy-btn, .unlock-banner form { display: none !important; }
  .report-layout { display: block; }
  .card, .finding, .cat-score, .bucket { box-shadow: none; break-inside: avoid; }
  .finding > summary { padding: 10px 12px; }
  .finding-body { display: block !important; }
  main { padding: 0; }
  a { color: #000; }
}

/* Effort chip inside a section label keeps normal case so it wraps cleanly. */
.f-label { flex-wrap: wrap; }
.f-label .chip { text-transform: none; letter-spacing: 0; font-weight: 600; }

/* Free-report conversion elements. */
.finding-preview { border: 2px solid var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 15%, transparent); }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 0;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
}
body:has(.sticky-cta) main { padding-bottom: 96px; }
.locked-box .btn { margin-top: 4px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.breadcrumb svg { width: 14px; height: 14px; }
.center-row { justify-content: center; margin-top: 12px; }

/* Narrow screens: badges and chips on one line, the finding title on its own full-width line. */
@media (max-width: 760px) {
  .finding > summary { flex-wrap: wrap; row-gap: 8px; }
  .finding .f-title { order: 3; flex: 1 1 100%; }
  .finding .chev { margin-left: auto; }
}

/* Monitoring alerts. */
.alert-bell { position: relative; color: var(--critical); }
.bell-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--critical); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.alerts-card { border: 1px solid rgba(239, 68, 68, 0.35); }
.alert-group { padding: 14px 0; border-top: 1px solid var(--border); }
.alert-group h3 { margin: 0; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0 0; }
.alert-item .badge { margin-top: 2px; flex-shrink: 0; }
.alert-cves summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alert-cves summary::-webkit-details-marker { display: none; }
.alert-cves ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); }
.alert-cves li { margin-bottom: 6px; }

/* Free tools. */
.tool-hero { max-width: 820px; margin: 0 auto 24px; text-align: center; }
.tool-hero h1 { font-size: 44px; letter-spacing: -0.03em; }
.tool-hero .hero-lead { margin-left: auto; margin-right: auto; }
.tool-form { max-width: 640px; margin: 0 auto 8px; }
.tool-card { color: var(--text); }
.tool-card:hover { text-decoration: none; }
.h3 { font-size: 17px; }
.section-tight-top { margin-top: 32px; }
a.card { color: var(--text); }
a.card:hover { text-decoration: none; }
@media (max-width: 760px) { .tool-hero h1 { font-size: 32px; } .tool-hero { text-align: left; } }
.alert-item > div, .alert-cves ul, .alert-cves summary { min-width: 0; overflow-wrap: anywhere; }

/* Long unbroken tokens (setting names, hashes, URLs) wrap instead of widening the page. */
p, li, td, h1, h2, h3, .card-sub, .summary-list li { overflow-wrap: break-word; }
/* A text block inside a flex row may shrink below its longest word, which then wraps. */
.row > div, .row-between > div, .card-head > div, .alert > div, .page-head > div { min-width: 0; }

/* Unlock banner: text takes the free space, the button sits beside it while it fits. */
.unlock-banner { margin-bottom: 22px; }
.unlock-banner > div { flex: 1 1 360px; }
.unlock-banner > form, .unlock-banner > a { flex: 0 0 auto; }
.cat-score .top .chip { height: 22px; padding: 0 9px; font-size: 11px; }
@media (max-width: 480px) {
  .alert-item { flex-direction: column; gap: 6px; }
}

/* Header items never wrap; the menu collapses into the menu button before they would. */
.site-header .brand, .nav a, .credit-pill, .header-actions .btn { white-space: nowrap; }
.header-inner { min-width: 0; }
.footer-grid a.brand { display: inline-flex; margin-bottom: 12px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Account settings: a section menu beside one column of cards. Cards of any
   height follow each other, so no row leaves a gap beside a shorter card. */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 14px; font-weight: 550; }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.settings-nav svg { color: var(--muted); }
.account-grid { display: flex; flex-direction: column; gap: 20px; max-width: 860px; min-width: 0; }
.account-grid > .card { margin: 0; scroll-margin-top: 84px; }
.account-grid h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; }
.break { overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; }
.verify-banner { align-items: center; flex-wrap: wrap; }
.verify-banner form { flex: 0 0 auto; }
.twofa-setup { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.twofa-setup > div { flex: 1 1 220px; min-width: 0; }
.twofa-setup .qr { border-radius: 10px; border: 1px solid var(--border); background: #fff; max-width: 100%; height: auto; }
.steps-list { padding-left: 20px; color: var(--text-2); }
.steps-list li { margin-bottom: 6px; }
.code-box pre { overflow-wrap: anywhere; white-space: pre-wrap; }

/* Subdomains of a report. */
.host-list { display: flex; flex-direction: column; }
.host-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.host-row:last-child { border-bottom: none; }
.host-name { font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 13.5px; overflow-wrap: anywhere; min-width: 0; }
.host-row form, .host-row .chip { flex-shrink: 0; }
.table td form.inline-form + form.inline-form { margin-left: 6px; }

@media (max-width: 960px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { display: none; }
}
