/* ========================================================================
   Url Reporter — Verification Lab
   ------------------------------------------------------------------------
   Aesthetic: midnight console × editorial security advisory.
   Type:      Bricolage Grotesque (sans, opsz) · Fraunces (display serif,
              opsz 144) · JetBrains Mono (technical fragments).
   Palette:   deep midnight blue with electric-blue → cyan → violet gradient
              accent; emerald/amber/coral status colors. High contrast.
   ======================================================================== */

/* ------------------------- Tokens -------------------------------------- */
:root {
  /* Surfaces */
  --bg-deep:       #060914;
  --bg-surface:    #0c1226;
  --bg-raised:     #131a33;
  --bg-elev:       #1a2245;
  --bg-input:      #08101f;

  /* Borders */
  --border:        #1f2b4d;
  --border-strong: #2c3a64;
  --border-bright: #3a4d80;

  /* Text */
  --text:          #eef1f8;
  --text-mute:     #8e9ab8;
  --text-faint:    #5f6a85;

  /* Brand */
  --accent:        #4f8cff;
  --accent-2:      #66e0ff;
  --accent-3:      #b794ff;
  --accent-deep:   #2454c9;
  --grad: linear-gradient(120deg, #4f8cff 0%, #66e0ff 50%, #b794ff 100%);
  --grad-soft: linear-gradient(120deg, rgba(79,140,255,0.18) 0%, rgba(102,224,255,0.18) 50%, rgba(183,148,255,0.18) 100%);

  /* Statuses */
  --good:          #3ddc97;
  --good-glow:     rgba(61, 220, 151, 0.14);
  --warn:          #ffb454;
  --warn-glow:     rgba(255, 180, 84, 0.14);
  --bad:           #ff5d6c;
  --bad-glow:      rgba(255, 93, 108, 0.14);
  --info:          #66e0ff;
  --info-glow:     rgba(102, 224, 255, 0.14);

  /* Geometry */
  --radius-sm:     6px;
  --radius:        12px;
  --radius-lg:     18px;
  --radius-xl:     24px;
  --hairline:      1px solid var(--border);

  /* Type */
  --font-sans:     'Bricolage Grotesque', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  'Fraunces', 'Bricolage Grotesque', Georgia, serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ------------------------- Reset --------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "cv11";
  font-optical-sizing: auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
input, button, textarea, select { font: inherit; }

/* ------------------------- Atmosphere ---------------------------------- */
/* Brand gradient hairline at the very top of every page. */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  z-index: 100;
  pointer-events: none;
}
/* Soft radial glow at the top — atmosphere, not a banner. */
body::after {
  content: "";
  position: fixed;
  top: -260px; left: 50%;
  width: 1100px; height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(79, 140, 255, 0.18) 0%,
    rgba(102, 224, 255, 0.05) 35%,
    transparent 70%);
  z-index: -2;
  pointer-events: none;
}
/* Dot-grid texture, very subtle, the lab-bench surface. */
.atmosphere {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(143, 159, 200, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  z-index: -1;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
}

/* ------------------------- Layout -------------------------------------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 32px 96px;
}

/* Top status strip: brand mark on the left, version + signature on the right.
   Reads like an SSH banner / lab terminal status line. */
.system-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.system-strip .left,
.system-strip .right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.system-strip .right { color: var(--text-mute); }
.system-strip .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: live-dot 2.6s ease-in-out infinite;
}

/* Brand monogram + wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 22px; height: 22px;
  position: relative;
  border-radius: 5px;
  background: var(--grad);
  display: inline-block;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 2px;
  background: var(--bg-deep);
}
.brand-mark::before {
  content: "";
  position: absolute;
  width: 4px; height: 4px;
  bottom: 6px; right: 6px;
  background: var(--accent-2);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--accent-2);
  z-index: 1;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  display: inline-block;
  vertical-align: middle;
  object-fit: cover;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* ------------------------- Hero / page header ------------------------- */
.site-header {
  padding: 56px 0 40px;
  position: relative;
  animation: rise-in 700ms 60ms cubic-bezier(.16,.84,.3,1) backwards;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "//";
  color: var(--text-faint);
  font-weight: 700;
  letter-spacing: 0;
}

.site-header h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  margin: 0 0 16px;
  font-variation-settings: "opsz" 60;
  color: var(--text);
}
.site-header h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-header h1 code {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6em;
  letter-spacing: -0.01em;
  background: transparent;
  border: var(--hairline);
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--accent-2);
  vertical-align: middle;
  display: inline-block;
  margin-left: 6px;
  word-break: break-all;
}
.site-header h1 a {
  text-decoration: none;
  color: inherit;
}
.site-header h1 a:hover code {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(79, 140, 255, 0.08);
}

.tagline {
  color: var(--text-mute);
  font-size: 16px;
  margin: 0 0 8px;
}

/* ------------------------- Cards / sections --------------------------- */
.card {
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.card + .card { margin-top: 24px; }

/* Frosted gradient frame on hover */
.card.is-interactive {
  transition: border-color 200ms;
}
.card.is-interactive:hover {
  border-color: var(--border-strong);
}

/* Section heading shared style */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 12px;
}
.section-eyebrow::before {
  content: "//";
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
}
h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  color: var(--text);
  font-variation-settings: "opsz" 36;
}

/* ------------------------- Scan form ----------------------------------- */
.scan-form {
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  animation: rise-in 700ms 180ms cubic-bezier(.16,.84,.3,1) backwards;
}
.scan-form::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.55;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.scan-form label[for="url"] {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.scan-form input[type="text"] {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: border-color 160ms, box-shadow 200ms, background 200ms;
}
.scan-form input[type="text"]::placeholder {
  color: var(--text-faint);
  font-weight: 400;
}
.scan-form input[type="text"]:hover {
  border-color: var(--border-strong);
}
.scan-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(79, 140, 255, 0.12),
    0 0 30px rgba(79, 140, 255, 0.08);
  background: var(--bg-deep);
}

.scan-form .note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-mute);
}

/* Run scan button — the moment. */
.scan-form button#scan-submit,
.scan-form > button[type="submit"] {
  margin-top: 20px;
  padding: 14px 26px;
  background: var(--grad);
  background-size: 200% 100%;
  background-position: 0% 50%;
  color: #050813;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background-position 600ms cubic-bezier(.4,0,.2,1),
              transform 160ms,
              box-shadow 200ms;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 8px 26px -8px rgba(79, 140, 255, 0.55);
}
.scan-form button#scan-submit::after,
.scan-form > button[type="submit"]::after {
  content: "→";
  font-size: 1.05em;
  font-weight: 500;
  transition: transform 200ms;
}
.scan-form button#scan-submit:hover,
.scan-form > button[type="submit"]:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.22) inset,
    0 12px 36px -8px rgba(102, 224, 255, 0.55);
}
.scan-form button#scan-submit:hover::after,
.scan-form > button[type="submit"]:hover::after {
  transform: translateX(3px);
}
.scan-form button#scan-submit:disabled,
.scan-form > button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* ------------------------- Scanners fieldset --------------------------- */
.scanners-fieldset {
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  margin: 26px 0 6px;
  background: rgba(255,255,255,0.012);
}
.scanners-fieldset legend {
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.scanner-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
button.ghost-btn,
.scan-form button.ghost-btn {
  margin-top: 0 !important;
  padding: 5px 11px !important;
  background: transparent !important;
  color: var(--text-mute) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 999px !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  line-height: 1.3 !important;
  cursor: pointer;
  transition: color 140ms, border-color 140ms, background 140ms;
}
button.ghost-btn:hover,
.scan-form button.ghost-btn:hover {
  border-color: var(--accent) !important;
  background: rgba(79,140,255,0.08) !important;
  color: var(--text) !important;
  filter: none !important;
}
button.ghost-btn:focus-visible,
.scan-form button.ghost-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scanner-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 14px;
}
.scanner-list li { padding: 0; }
.scanner-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 8px;
  transition: background 140ms;
  user-select: none;
}
.scanner-list label:hover {
  background: rgba(255, 255, 255, 0.025);
}
.scanner-list code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Custom checkbox */
.scanner-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  background: var(--bg-deep);
  cursor: pointer;
  position: relative;
  flex: none;
  transition: border-color 140ms, background 140ms;
}
.scanner-list input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.scanner-list input[type="checkbox"]:checked {
  background: var(--grad);
  border-color: transparent;
}
.scanner-list input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #050813;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.scanner-list input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ------------------------- Form error --------------------------------- */
.form-error {
  margin: 18px 0 0;
  padding: 12px 14px 12px 18px;
  background: rgba(255, 93, 108, 0.06);
  border: 1px solid rgba(255, 93, 108, 0.35);
  border-left: 3px solid var(--bad);
  border-radius: var(--radius-sm);
  color: #ffc6cc;
  font-size: 13.5px;
  font-family: var(--font-mono);
  letter-spacing: -0.005em;
}

/* ------------------------- Submit progress overlay -------------------- */
.submit-progress { margin-top: 18px; }
.submit-progress .note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------- Progress bar ------------------------------- */
.bar-track {
  position: relative;
  height: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--grad);
  background-size: 200% 100%;
  background-position: 0% 50%;
  transition: width 500ms cubic-bezier(.16,.84,.3,1);
  box-shadow: 0 0 18px rgba(79, 140, 255, 0.55);
  animation: bar-shift 8s linear infinite;
}
.bar-track.scanning::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  left: -30%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%);
  animation: bar-shimmer 1.6s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes bar-shift {
  to { background-position: 200% 50%; }
}
@keyframes bar-shimmer {
  0%   { left: -30%; }
  100% { left: 100%; }
}

.bar-indeterminate {
  width: 35%;
  animation: bar-slide 1.4s ease-in-out infinite;
}
@keyframes bar-slide {
  0%   { left: -35%; width: 35%; }
  50%  { left: 50%;  width: 45%; }
  100% { left: 100%; width: 35%; }
}

.bar-caption {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.bar-caption #bar-pct { color: var(--accent-2); }
.muted { color: var(--text-mute); }

/* ------------------------- Progress section / table ------------------ */
.progress-section {
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  animation: rise-in 700ms 120ms cubic-bezier(.16,.84,.3,1) backwards;
}
.progress-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.55;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.progress-table,
.scanners-results table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  font-size: 14px;
}
.progress-table th,
.scanners-results th {
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.progress-table td,
.scanners-results td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}
.progress-table tr:last-child td,
.scanners-results tr:last-child td { border-bottom: 0; }

.progress-table tbody tr,
.scanners-results tbody tr {
  position: relative;
  transition: background 160ms;
}
.progress-table tbody tr:hover,
.scanners-results tbody tr:hover {
  background: rgba(79, 140, 255, 0.025);
}

/* Scanner-name column in mono — looks like config keys, very lab. */
.progress-table td:first-child,
.scanners-results td:first-child {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.progress-table td.elapsed,
.progress-table td.result {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mute);
}
.progress-table td.result a,
.scanners-results td a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 140ms, color 140ms;
}
.progress-table td.result a:hover,
.scanners-results td a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.progress-table .result.err,
.scanners-results .err {
  color: var(--bad);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* "What does this mean?" expandable explanation under a scanner error.
   Overrides the global details{} rule (which is sized for the raw-summary
   block at the bottom of the page) with a compact in-cell variant. */
.scanners-results details.err-explain {
  margin: 10px 0 0;
  background: rgba(255, 93, 108, 0.04);
  border: 1px solid rgba(255, 93, 108, 0.2);
  border-radius: 8px;
  overflow: hidden;
  animation: none;
}
.scanners-results details.err-explain summary {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-mute);
}
.scanners-results details.err-explain summary::before {
  content: "▸";
  color: var(--bad);
}
.scanners-results details.err-explain summary:hover {
  color: var(--text);
  background: rgba(255, 93, 108, 0.06);
}
.scanners-results details.err-explain .err-explain-body {
  padding: 0 14px 12px;
  font-size: 13px;
  font-family: var(--font-sans);
}
.scanners-results details.err-explain .err-explain-body .title {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0;
}
.scanners-results details.err-explain .err-explain-body p {
  margin: 0;
  color: var(--text-mute);
  line-height: 1.55;
  letter-spacing: 0;
}

/* ------------------------- Status pills ------------------------------- */
.progress-table .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.progress-table .status-icon {
  font-size: 13px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  filter: saturate(1.1);
}
.status-waiting {
  background: rgba(143, 159, 200, 0.06);
  border-color: var(--border);
  color: var(--text-faint);
}
.status-running {
  background: var(--info-glow);
  border-color: rgba(102, 224, 255, 0.4);
  color: var(--accent-2);
  animation: status-pulse 1.6s ease-in-out infinite;
}
.status-done {
  background: var(--good-glow);
  border-color: rgba(61, 220, 151, 0.45);
  color: var(--good);
}
.status-error {
  background: var(--bad-glow);
  border-color: rgba(255, 93, 108, 0.45);
  color: var(--bad);
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 224, 255, 0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(102, 224, 255, 0.18); }
}

/* ------------------------- Note (small footnote) --------------------- */
.note {
  font-size: 13px;
  color: var(--text-mute);
}
.progress-section .note {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 180, 84, 0.35);
  background: rgba(255, 180, 84, 0.06);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #ffd9a3;
}

/* ------------------------- Result page: grade card ------------------- */
.overall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin: 28px 0 32px;
  position: relative;
  overflow: hidden;
  animation: rise-in 700ms 80ms cubic-bezier(.16,.84,.3,1) backwards;
}
.overall::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
}
.overall::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.18) 0%, transparent 60%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}
.overall > * { position: relative; z-index: 1; }

.overall .grade {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
}
.overall .grade strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(86px, 12vw, 144px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-variation-settings: "opsz" 144;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(79, 140, 255, 0.35));
}
.overall .grade .score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-mute);
  margin-left: 0;
}
.grade-unknown {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-mute);
  font-weight: 400;
}

/* Grade-letter color tints used elsewhere (per-scanner cells stay neutral
   in this design; tint the overall-card glow only by grade). */
.grade-a strong { background: linear-gradient(120deg, #3ddc97 0%, #66e0ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grade-b strong { background: linear-gradient(120deg, #66e0ff 0%, #4f8cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grade-c strong { background: linear-gradient(120deg, #4f8cff 0%, #b794ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grade-d strong { background: linear-gradient(120deg, #ffb454 0%, #ff5d6c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grade-e strong,
.grade-f strong { background: linear-gradient(120deg, #ff5d6c 0%, #b794ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Download button group on the result page. */
.overall p:has(.download),
.overall .download-row {
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  justify-content: center;
}
.download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--bg-deep);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  transition: border-color 200ms, color 200ms, transform 160ms;
  animation: download-blink 2.6s ease-in-out infinite;
}
.download::before {
  content: "↓";
  font-size: 1.1em;
  font-weight: 500;
}
.download::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 220ms;
  z-index: -1;
}
.download:hover {
  color: #050813;
  border-color: transparent;
  transform: translateY(-1px);
  animation-play-state: paused;
}
.download:hover::after { opacity: 1; }
@keyframes download-blink {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(79, 140, 255, 0.55), 0 6px 20px -10px rgba(79, 140, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(79, 140, 255, 0.0), 0 6px 20px -10px rgba(79, 140, 255, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) {
  .download { animation: none; }
}

/* Quiet variant: identical look to .download but with no pulsing glow.
   Used on secondary downloads (e.g. Markdown source) so only the primary
   download blinks for attention. */
.download-quiet { animation: none; }


/* ------------------------- Per-scanner table -------------------------- */
.scanners-results {
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  animation: rise-in 700ms 160ms cubic-bezier(.16,.84,.3,1) backwards;
}
.scanners-results::before {
  content: "// per_scanner";
  position: absolute;
  top: 14px; right: 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
}

.scanners-results td:nth-child(2),
.scanners-results td:nth-child(3) {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ------------------------- Recommendations --------------------------- */
.recommendations {
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  animation: rise-in 700ms 220ms cubic-bezier(.16,.84,.3,1) backwards;
}
.recommendations::before {
  content: "// recommended_actions";
  position: absolute;
  top: 14px; right: 24px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  pointer-events: none;
}
.recommendations ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: rec;
}
.recommendations ol li {
  counter-increment: rec;
  padding: 18px 8px 18px 56px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.recommendations ol li:last-child { border-bottom: 0; }
.recommendations ol li::before {
  content: counter(rec, decimal-leading-zero);
  position: absolute;
  left: 0; top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  width: 44px;
  text-align: left;
}
.recommendations ol li strong {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.recommendations ol li em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-mute);
  margin-left: 8px;
}
.recommendations .rec {
  color: var(--text-mute);
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
}
.recommendations a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(102, 224, 255, 0.3);
}
.recommendations a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Severity chips */
.sev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid;
  margin-right: 10px;
  vertical-align: middle;
}
.sev::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.sev-critical { color: #ff8090; border-color: rgba(255, 93, 108, 0.5); background: rgba(255, 93, 108, 0.1); }
.sev-high     { color: #ffa3a3; border-color: rgba(255, 93, 108, 0.4); background: rgba(255, 93, 108, 0.06); }
.sev-medium   { color: var(--warn); border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.06); }
.sev-low      { color: var(--accent-2); border-color: rgba(102, 224, 255, 0.4); background: rgba(102, 224, 255, 0.06); }
.sev-info     { color: var(--good); border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.06); }

/* ------------------------- Raw summary + copy ------------------------- */
details {
  margin-top: 24px;
  background: var(--bg-surface);
  border: var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: rise-in 700ms 280ms cubic-bezier(.16,.84,.3,1) backwards;
}
details summary {
  cursor: pointer;
  padding: 18px 24px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  user-select: none;
  transition: background 160ms, color 160ms;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "▸";
  font-size: 12px;
  color: var(--accent);
  transition: transform 200ms;
  letter-spacing: 0;
}
details[open] summary::before { transform: rotate(90deg); }
details summary:hover { color: var(--text); background: rgba(255,255,255,0.02); }

.raw-summary {
  position: relative;
  padding: 0 24px 24px;
}
.raw-summary pre {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 64px 20px 22px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 14px;
  right: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: var(--bg-surface);
  color: var(--text-mute);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 160ms, border-color 160ms, background 160ms, transform 120ms;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(79,140,255,0.08);
  transform: translateY(-1px);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.copy-btn.copied {
  color: var(--good);
  border-color: var(--good);
  background: rgba(61,220,151,0.1);
}
.copy-icon { display: block; }
.copy-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms;
}
.copy-btn:hover .copy-tip,
.copy-btn:focus-visible .copy-tip,
.copy-btn.copied .copy-tip { opacity: 1; }

/* ------------------------- Linkout info tooltip ----------------------- */
.linkout-block {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.linkout-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: default;
  outline: none;
}
.linkout-info-icon {
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1;
  transition: color 120ms;
}
.linkout-info:hover .linkout-info-icon,
.linkout-info:focus-visible .linkout-info-icon { color: var(--accent-2); }

.linkout-info-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms;
  z-index: 5;
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.6);
}
.linkout-info:hover .linkout-info-tip,
.linkout-info:focus-visible .linkout-info-tip { opacity: 1; }

/* ------------------------- Back link --------------------------------- */
.back-link {
  color: var(--text-mute);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 160ms, border-color 160ms, background 160ms;
}
.back-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(79,140,255,0.05);
  text-decoration: none;
}

/* ------------------------- Footer ------------------------------------- */
.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.site-footer .footer-link {
  color: var(--accent-2);
  text-decoration: none;
  letter-spacing: 0.12em;
  border-bottom: 1px solid transparent;
  transition: color 140ms, border-color 140ms;
}
.site-footer .footer-link:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}
.site-footer a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 140ms, border-color 140ms;
}
.site-footer a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}
.site-footer .signature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.site-footer .footer-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
}

/* Prominent "Our score" link in the top header strip */
.header-score-link {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--accent-2);
  border-radius: 6px;
  transition: background 140ms, color 140ms, box-shadow 140ms;
}
.header-score-link:hover {
  background: var(--accent-2);
  color: var(--bg-deep);
  box-shadow: 0 0 16px rgba(102, 224, 255, 0.45);
}

/* ------------------------- Live dot animation ------------------------ */
@keyframes live-dot {
  0%, 100% { box-shadow: 0 0 10px rgba(102, 224, 255, 0.7); opacity: 1; }
  50%      { box-shadow: 0 0 4px rgba(102, 224, 255, 0.3); opacity: 0.7; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------- Responsive -------------------------------- */
@media (max-width: 720px) {
  .container { padding: 18px 18px 80px; }
  .scan-form, .progress-section, .scanners-results, .recommendations { padding: 22px; }
  .overall {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
  .overall::before { border-radius: 0; }
  .progress-table th:nth-child(3),
  .progress-table td.elapsed { display: none; }
  .scanners-results table { font-size: 13px; }
  .system-strip { font-size: 10.5px; }
  .scan-form input[type="text"] { font-size: 15px; padding: 14px 15px; }
  .recommendations ol li { padding-left: 44px; }
  .copy-btn { right: 30px; }
}

/* ------------------------- Reduced motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------- Score / methodology page ----------------- */
.card p { color: var(--text-mute); margin: 0 0 12px; line-height: 1.6; }
.card p:last-child { margin-bottom: 0; }
.card p strong { color: var(--text); font-weight: 600; }
.card p code,
.rule-list code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-2);
}
.rule-list {
  margin: 4px 0 0;
  padding-left: 22px;
  color: var(--text-mute);
  line-height: 1.7;
}
.rule-list li { margin-bottom: 8px; }
.rule-list li::marker { color: var(--accent); }
.rule-list strong { color: var(--text); font-weight: 600; }
.card table { width: 100%; max-width: 520px; margin-top: 4px; }

/* ------------------------- Selection --------------------------------- */
::selection {
  background: rgba(79, 140, 255, 0.4);
  color: var(--text);
}

/* ------------------------- Scrollbar (subtle) ------------------------ */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }
