/*
 * Design system.
 *
 * Direction: modern developer infrastructure / diagnostic tool. Calm, dense, legible.
 * Explicitly NOT: hacker dashboard, antivirus scareware, generic AI startup, enterprise
 * security suite. Information hierarchy over decoration.
 *
 * Rules held to throughout:
 *   - No gradients, no glow, no shield iconography, no giant hero.
 *   - Severity colour is an accent on a neutral surface, never a filled alarm-red panel.
 *   - Colour never carries meaning alone: every status has a text label.
 */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  --bg:            #ffffff;
  --bg-subtle:     #f7f8fa;
  --surface:       #ffffff;
  --surface-inset: #f4f6f8;
  --border:        #e2e6eb;
  --border-strong: #cbd2da;

  --text:          #14171c;
  --text-muted:    #5b6472;
  --text-faint:    #858e9c;

  --accent:        #1f5fd0;
  --accent-hover:  #1a4fae;
  --accent-weak:   #eaf1fd;

  --ok:            #08704a;
  --ok-weak:       #e7f4ee;
  --critical:      #a8291d;
  --critical-weak: #fdeceb;
  --high:          #a8480c;
  --high-weak:     #fdf0e7;
  --medium:        #7a5306;
  --medium-weak:   #fcf4e3;
  --low:           #47566b;
  --low-weak:      #eff2f6;
  --info:          #5b6472;
  --info-weak:     #f2f4f7;

  --radius:   8px;
  --radius-sm: 5px;
  --shadow:   0 1px 2px rgba(16, 20, 28, 0.05);

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

  --maxw: 940px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0f1116;
    --bg-subtle:     #14171d;
    --surface:       #161a21;
    --surface-inset: #1b2029;
    --border:        #272d37;
    --border-strong: #39424f;

    --text:          #e6e9ee;
    --text-muted:    #9aa4b2;
    --text-faint:    #6f7987;

    --accent:        #6ba1ff;
    --accent-hover:  #8db8ff;
    --accent-weak:   #16233a;

    --ok:            #46b881;
    --ok-weak:       #12271e;
    --critical:      #f2857c;
    --critical-weak: #2c1917;
    --high:          #f0a35e;
    --high-weak:     #2a1f14;
    --medium:        #e0bc63;
    --medium-weak:   #262013;
    --low:           #9aa8bd;
    --low-weak:      #1b202a;
    --info:          #9aa4b2;
    --info-weak:     #191d25;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

/* Explicit override wins over the media query in both directions. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-subtle: #f7f8fa; --surface: #ffffff; --surface-inset: #f4f6f8;
  --border: #e2e6eb; --border-strong: #cbd2da;
  --text: #14171c; --text-muted: #5b6472; --text-faint: #858e9c;
  --accent: #1f5fd0; --accent-hover: #1a4fae; --accent-weak: #eaf1fd;
  --ok: #08704a; --ok-weak: #e7f4ee;
  --critical: #a8291d; --critical-weak: #fdeceb;
  --high: #a8480c; --high-weak: #fdf0e7;
  --medium: #7a5306; --medium-weak: #fcf4e3;
  --low: #47566b; --low-weak: #eff2f6;
  --info: #5b6472; --info-weak: #f2f4f7;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1116; --bg-subtle: #14171d; --surface: #161a21; --surface-inset: #1b2029;
  --border: #272d37; --border-strong: #39424f;
  --text: #e6e9ee; --text-muted: #9aa4b2; --text-faint: #6f7987;
  --accent: #6ba1ff; --accent-hover: #8db8ff; --accent-weak: #16233a;
  --ok: #46b881; --ok-weak: #12271e;
  --critical: #f2857c; --critical-weak: #2c1917;
  --high: #f0a35e; --high-weak: #2a1f14;
  --medium: #e0bc63; --medium-weak: #262013;
  --low: #9aa8bd; --low-weak: #1b202a;
  --info: #9aa4b2; --info-weak: #191d25;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 600; letter-spacing: -0.011em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.98rem; }
p { margin: 0 0 0.85rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text);
  padding: 0.6rem 1rem; border: 1px solid var(--border); z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.15rem; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 0.845rem; }
.mono { font-family: var(--mono); font-size: 0.86em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header / footer ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  height: 56px;
}
.brand {
  font-weight: 600; color: var(--text); font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 0.5rem; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 17px; height: 17px; border-radius: 4px;
  border: 1.5px solid var(--accent);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 3.5px 3px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: rotate(45deg) translate(-1px, 1px);
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: var(--text-muted); font-size: 0.875rem; }
.site-nav a:hover { color: var(--text); text-decoration: none; }

.theme-toggle {
  background: none; border: 1px solid var(--border); color: var(--text-muted);
  width: 30px; height: 30px; border-radius: var(--radius-sm); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  font-size: 0.85rem;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem; padding: 2.5rem 0 3rem;
  color: var(--text-muted); font-size: 0.875rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.75rem 2rem;
}
.footer-col h2 {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); margin-bottom: 0.6rem; font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-base {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline;
}

/* ---------- how it works ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem;
  counter-reset: step;
}
.steps li { position: relative; padding-left: 2.4rem; }
.step-n {
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 0.98rem; margin-bottom: 0.3rem; }
.steps p { font-size: 0.885rem; color: var(--text-muted); margin: 0; }

/* ---------- scenarios ---------- */
.scenarios {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 0.85rem;
}
.scenario {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 1rem 1.1rem;
}
.scenario h3 { font-size: 0.92rem; margin-bottom: 0.35rem; }
.scenario p { font-size: 0.865rem; color: var(--text-muted); margin: 0; }

/* ---------- audiences ---------- */
.audience-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.25rem 2rem;
}
.audience h3 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.audience p { font-size: 0.885rem; color: var(--text-muted); margin: 0; }

/* ---------- change examples ---------- */
.changes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 0.7rem;
}
.change {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 0.9rem 1rem;
}
.change-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; }
.change-head h3 { font-size: 0.9rem; margin: 0; }
.change-proto {
  font-size: 0.68rem; color: var(--text-faint); letter-spacing: 0.04em;
  border: 1px solid var(--border); border-radius: 3px; padding: 0.05rem 0.3rem;
  white-space: nowrap; flex: none; margin-left: auto;
}
.change p { font-size: 0.855rem; color: var(--text-muted); margin: 0; }

/* ---------- monitoring workspace preview ----------
   Static illustration of a product that does not exist yet. The flag is part of the component
   so the label can never be separated from the mockup. */
.preview { margin: 0; }
.preview-flag {
  border: 1px solid color-mix(in srgb, var(--medium) 30%, transparent);
  background: var(--medium-weak); color: var(--medium);
  border-radius: var(--radius) var(--radius) 0 0; border-bottom: none;
  padding: 0.6rem 1rem; font-size: 0.845rem;
}
.preview-flag strong { font-weight: 600; }
.preview-frame {
  border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface); overflow: hidden;
}
.preview-summary {
  display: flex; flex-wrap: wrap; gap: 2.25rem;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); background: var(--bg-subtle);
}
.stat { display: flex; flex-direction: column; gap: 0.1rem; }
.stat-n { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 0.78rem; color: var(--text-muted); }
.preview-table { width: 100%; border-collapse: collapse; font-size: 0.885rem; }
.preview-table th {
  text-align: left; padding: 0.55rem 1.25rem; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
.preview-table td { padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.preview-table tr:last-child td { border-bottom: none; }
.preview-table .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 0.5rem; flex: none;
}
.dot-ok { background: var(--ok); }
.dot-attention { background: var(--high); }
.dot-info { background: var(--accent); }
.preview-note { color: var(--text-muted); font-size: 0.83rem; text-align: right; white-space: nowrap; }
.preview figcaption { margin-top: 0.55rem; }

/* ---------- provider section ---------- */
.msp { padding: 1.75rem 1.9rem; }
.msp h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.msp p { color: var(--text-muted); max-width: 70ch; font-size: 0.915rem; }
.msp-list {
  list-style: none; padding: 0; margin: 1.15rem 0 1.15rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 0.35rem 1.5rem;
  font-size: 0.885rem;
}
.msp-list li { display: flex; gap: 0.5rem; align-items: baseline; color: var(--text); }
.msp-list li::before { content: "→"; color: var(--text-faint); flex: none; font-size: 0.78rem; }

.plan-flag {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.5rem;
}

/* ---------- comparison + what-we-check tables ---------- */
.what-table td, .compare td { vertical-align: top; }
.what-table, .compare {
  width: 100%; border-collapse: collapse; font-size: 0.895rem;
}
.what-table th, .compare th, .what-table td, .compare td {
  text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border);
}
.what-table th, .compare th {
  color: var(--text-muted); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.045em;
}
.compare td:not(:first-child) { width: 150px; }
.yes { color: var(--ok); font-weight: 550; font-size: 0.85rem; }
.no { color: var(--text-faint); font-size: 0.85rem; }
.soon {
  display: inline-block; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--medium); background: var(--medium-weak); border-radius: 3px;
  padding: 0.1rem 0.35rem; margin-left: 0.35rem; text-transform: none;
}

/* ---------- pricing ---------- */
.plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  gap: 0.8rem; margin-top: 1.5rem; align-items: stretch;
}
.plan { padding: 1.35rem 1.25rem; display: flex; flex-direction: column; height: 100%; }
.plan-featured { border-color: var(--accent); }
.plan h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.plan-price {
  font-size: 1.65rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 0.35rem;
  font-variant-numeric: tabular-nums;
}
.plan-price .per { font-size: 0.83rem; font-weight: 400; color: var(--text-faint); letter-spacing: 0; }
.plan-tagline { font-size: 0.895rem; margin-bottom: 0.5rem; }
.plan-limits {
  font-size: 0.79rem; color: var(--text-faint); font-family: var(--mono);
  margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--border);
}
.plan-features { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.35rem; }
.plan-features li {
  font-size: 0.855rem; color: var(--text-muted); padding-left: 1.05rem; position: relative;
}
.plan-features li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong);
}
.plan-for { font-size: 0.82rem; color: var(--text-muted); margin-top: auto; margin-bottom: 0.9rem; }
.plan-for strong { color: var(--text); }
.plan-soon {
  display: inline-block; font-size: 0.8rem; color: var(--text-faint);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem; text-align: center;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.4rem; margin-top: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item > summary {
  cursor: pointer; list-style: none; padding: 0.85rem 1.6rem 0.85rem 0; position: relative;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary h2 {
  display: inline; font-size: 0.95rem; font-weight: 550; margin: 0;
}
.faq-item > summary::after {
  content: "＋"; position: absolute; right: 0; top: 0.85rem;
  color: var(--text-faint); font-size: 0.8rem;
}
.faq-item[open] > summary::after { content: "−"; }
.faq-item > p {
  font-size: 0.895rem; color: var(--text-muted);
  margin: 0 0 1rem; max-width: 68ch;
}

/* ---------- report check cards ---------- */
.check-heading { min-width: 0; }
.check-question { font-size: 0.83rem; color: var(--text-muted); margin: 0.15rem 0 0; }
.check-summary { font-size: 0.925rem; margin: 0 0 1rem; }
.tech { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.tech > summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 0.5rem;
  font-size: 0.83rem; color: var(--text-muted);
}
.tech > summary::-webkit-details-marker { display: none; }
.tech > summary::before { content: "▸"; font-size: 0.7rem; color: var(--text-faint); }
.tech[open] > summary::before { content: "▾"; }
.tech > summary:hover { color: var(--text); }
.tech-proto { margin-left: auto; font-family: var(--mono); font-size: 0.74rem; color: var(--text-faint); }
.tech-body { padding-top: 0.9rem; }
.tech-h {
  font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); margin: 1rem 0 0.35rem; font-weight: 600;
}
.tech-note { font-size: 0.8rem; color: var(--text-faint); margin: 1rem 0 0; }

/* ---------- landing ---------- */
.hero { padding: 4rem 0 2.5rem; }
.hero h1 { font-size: 2.1rem; max-width: 20ch; margin-bottom: 0.85rem; }
.hero .lede { font-size: 1.02rem; color: var(--text-muted); max-width: 60ch; margin-bottom: 1.75rem; }

.scan-form { display: flex; gap: 0.55rem; max-width: 560px; }
.scan-form .field { flex: 1; min-width: 0; }
.input {
  width: 100%; font: inherit; font-family: var(--mono); font-size: 0.92rem;
  padding: 0.68rem 0.8rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.input::placeholder { color: var(--text-faint); font-family: var(--font); }
.input:focus-visible { border-color: var(--accent); outline-offset: 0; }

.btn {
  font: inherit; font-weight: 550; font-size: 0.92rem;
  padding: 0.68rem 1.1rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-inset); border-color: var(--border-strong); }
.btn-sm { padding: 0.42rem 0.75rem; font-size: 0.845rem; }

.form-error {
  margin-top: 0.6rem; color: var(--critical); font-size: 0.875rem;
  display: flex; gap: 0.4rem; align-items: flex-start;
}

.checklist-inline {
  margin: 1.5rem 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.15rem;
  color: var(--text-muted); font-size: 0.86rem;
}
.checklist-inline li { display: flex; align-items: center; gap: 0.4rem; }
.checklist-inline li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-strong); flex: none;
}

/* ---------- generic panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.section { padding: 2.25rem 0 0; }
.section-title { margin-bottom: 0.9rem; }

.notice {
  border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  background: var(--bg-subtle); border-radius: var(--radius-sm);
  padding: 0.8rem 1rem; font-size: 0.885rem; color: var(--text-muted);
}
.notice strong { color: var(--text); font-weight: 600; }
.notice-accent { border-left-color: var(--accent); background: var(--accent-weak); }

/* ---------- scanning state ---------- */
.scanning { padding: 3.5rem 0; max-width: 520px; }
.scanning h1 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.scanning .target { font-family: var(--mono); color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.phase {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.2rem; font-size: 0.9rem;
  color: var(--text-faint);
  border-bottom: 1px solid transparent;
}
.phase .dot {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.phase[data-state="running"] { color: var(--text); }
.phase[data-state="running"] .dot { border-color: var(--accent); }
.phase[data-state="running"] .dot::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.1s ease-in-out infinite;
}
.phase[data-state="done"] { color: var(--text-muted); }
.phase[data-state="done"] .dot { border-color: var(--ok); background: var(--ok); }
.phase[data-state="done"] .dot::after {
  content: ""; width: 3.5px; height: 6.5px;
  border-right: 1.5px solid var(--bg); border-bottom: 1.5px solid var(--bg);
  transform: rotate(45deg) translate(-0.5px, -1px);
}
.phase .meta { margin-left: auto; font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  .phase[data-state="running"] .dot::after { animation: none; }
}

/* ---------- report header ---------- */
.report-head { padding: 2.25rem 0 0; }
.report-domain {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 600;
  word-break: break-all; letter-spacing: -0.02em; margin-bottom: 0.35rem;
}
.report-meta {
  color: var(--text-faint); font-size: 0.83rem;
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-bottom: 1.5rem;
}

.summary {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.15rem 1.25rem; margin-bottom: 0.5rem;
}
.summary-verdict { flex: 1; min-width: 0; }
.summary-verdict h2 { font-size: 1.18rem; margin-bottom: 0.3rem; letter-spacing: -0.015em; }
.summary-verdict p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.score {
  text-align: right; flex: none; padding-left: 1.25rem;
  border-left: 1px solid var(--border);
}
.score-value { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.score-label { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.score a { color: var(--text-faint); font-size: 0.75rem; }

.tally { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; }

/* ---------- severity ---------- */
.sev {
  display: inline-flex; align-items: center; gap: 0.38rem;
  font-size: 0.715rem; font-weight: 600; letter-spacing: 0.045em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 4px; white-space: nowrap;
  border: 1px solid transparent;
}
.sev::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.sev-critical { color: var(--critical); background: var(--critical-weak); border-color: color-mix(in srgb, var(--critical) 22%, transparent); }
.sev-high     { color: var(--high);     background: var(--high-weak);     border-color: color-mix(in srgb, var(--high) 22%, transparent); }
.sev-medium   { color: var(--medium);   background: var(--medium-weak);   border-color: color-mix(in srgb, var(--medium) 22%, transparent); }
.sev-low      { color: var(--low);      background: var(--low-weak);      border-color: color-mix(in srgb, var(--low) 22%, transparent); }
.sev-info     { color: var(--info);     background: var(--info-weak);     border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.sev-ok       { color: var(--ok);       background: var(--ok-weak);       border-color: color-mix(in srgb, var(--ok) 22%, transparent); }

/* ---------- check cards ---------- */
.checks { display: grid; gap: 0.85rem; margin-top: 1.5rem; }

.check { overflow: hidden; }
.check-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.check-title { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.005em; }
.check-title .std { font-weight: 400; color: var(--text-faint); font-size: 0.78rem; margin-left: 0.45rem; }
.check-head .sev { margin-left: auto; }
.check-body { padding: 1.1rem; }
.check-body > *:last-child { margin-bottom: 0; }

.kv { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: 0.4rem 0.9rem; margin: 0 0 1rem; font-size: 0.885rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; min-width: 0; }

.record {
  position: relative;
  background: var(--surface-inset); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 2.5rem 0.65rem 0.75rem;
  font-family: var(--mono); font-size: 0.815rem; line-height: 1.5;
  overflow-wrap: anywhere; word-break: break-word;
  color: var(--text);
}
.record + .record { margin-top: 0.4rem; }
.copy-btn {
  position: absolute; top: 0.4rem; right: 0.4rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 4px; cursor: pointer;
  font-size: 0.68rem; padding: 0.18rem 0.4rem; line-height: 1.4;
  font-family: var(--font);
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }

.explain { font-size: 0.885rem; color: var(--text-muted); margin-bottom: 1rem; }
.explain strong { color: var(--text); font-weight: 600; }

/* ---------- findings ---------- */
.findings { display: grid; gap: 0.5rem; margin-top: 0.25rem; }
.finding {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden;
}
.finding > summary {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.65rem 0.8rem; cursor: pointer; list-style: none;
  font-size: 0.9rem;
}
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary::after {
  content: "＋"; margin-left: auto; color: var(--text-faint); font-size: 0.8rem; flex: none;
  line-height: 1.5;
}
.finding[open] > summary::after { content: "−"; }
.finding > summary:hover { background: var(--bg-subtle); }
.finding-statement { min-width: 0; }
.finding-detail {
  padding: 0.15rem 0.8rem 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.finding-detail h4 {
  font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); margin: 0.9rem 0 0.35rem; font-weight: 600;
}
.finding-detail p { font-size: 0.885rem; margin-bottom: 0; color: var(--text-muted); }
.finding-code {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint);
}
.cite { font-size: 0.8rem; }
.cite a { color: var(--accent); }

/* ---------- CTA ---------- */
.cta {
  margin-top: 2.5rem; padding: 1.6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-subtle);
}
.cta h2 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.cta p { color: var(--text-muted); font-size: 0.9rem; max-width: 62ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; align-items: center; }
.cta-list {
  list-style: none; padding: 0; margin: 1.1rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.35rem 1.2rem;
  font-size: 0.875rem; color: var(--text-muted);
}
.cta-list li { display: flex; gap: 0.5rem; align-items: baseline; }
.cta-list li::before { content: "→"; color: var(--text-faint); flex: none; font-size: 0.8rem; }

/* ---------- content pages ---------- */
.prose { max-width: 68ch; padding: 2.25rem 0 0; }
.prose h1 { margin-bottom: 0.75rem; }
.prose h2 { margin: 2rem 0 0.6rem; font-size: 1.05rem; }
.prose h3 { margin: 1.4rem 0 0.4rem; }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 0.9rem; }
.prose li { margin-bottom: 0.3rem; }
.prose code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--surface-inset); border: 1px solid var(--border);
  padding: 0.08em 0.32em; border-radius: 3px;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.885rem; margin: 0 0 1.1rem; }
.prose th, .prose td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tool-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.7rem; margin-top: 1.1rem;
}
.tool-card { padding: 0.95rem 1rem; display: block; color: var(--text); }
.tool-card:hover { border-color: var(--border-strong); text-decoration: none; }
.tool-card h3 { font-size: 0.92rem; margin-bottom: 0.25rem; }
.tool-card p { font-size: 0.845rem; color: var(--text-muted); margin: 0; }

/* ---------- error page ---------- */
.errorstate { padding: 3.5rem 0; max-width: 560px; }
.errorstate h1 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.errorstate p { color: var(--text-muted); }

/* ---------- demo banner ---------- */
.demo-banner {
  background: var(--medium-weak); border-bottom: 1px solid color-mix(in srgb, var(--medium) 25%, transparent);
  color: var(--medium); font-size: 0.83rem; padding: 0.5rem 0;
}
.demo-banner strong { font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hero { padding: 2.5rem 0 1.75rem; }
  .hero h1 { font-size: 1.6rem; }
  .scan-form { flex-direction: column; }
  .btn { width: 100%; }
  .summary { flex-direction: column; gap: 0.9rem; padding: 1rem; }
  .score {
    border-left: none; border-top: 1px solid var(--border);
    padding-left: 0; padding-top: 0.8rem; text-align: left;
    width: 100%; display: flex; align-items: baseline; gap: 0.6rem;
  }
  .score-label { order: 2; }
  .report-domain { font-size: 1.15rem; }
  .kv { grid-template-columns: 1fr; gap: 0.15rem; }
  .kv dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
  .kv dd { margin-bottom: 0.55rem; }
  .site-nav { gap: 0.85rem; }
  .site-nav .nav-hide-sm { display: none; }
  .check-head { padding: 0.75rem 0.85rem; flex-wrap: wrap; gap: 0.5rem; }
  .check-head .sev { margin-left: 0; }
  .check-body { padding: 0.9rem 0.85rem; }
  .cta { padding: 1.2rem; }
  .plans { grid-template-columns: 1fr; }
  .compare td:not(:first-child) { width: auto; }
  .preview-summary { gap: 1.25rem; padding: 0.9rem 1rem; }
  .stat-n { font-size: 1.3rem; }
  .preview-table th, .preview-table td { padding: 0.6rem 0.85rem; }
  .preview-note { text-align: left; white-space: normal; }
  .preview-table thead { display: none; }
  .preview-table td:first-child { padding-bottom: 0.15rem; font-weight: 600; }
  .preview-table td { display: block; border-bottom: none; padding-top: 0.15rem; }
  .preview-table tr { display: block; border-bottom: 1px solid var(--border); padding: 0.55rem 0; }
  .preview-table tr:last-child { border-bottom: none; }
  .change-proto { margin-left: 0; }
  .msp { padding: 1.2rem; }
  .tech-proto { display: none; }
  .footer-cols { gap: 1.5rem; }
}
