/* ==========================================================================
   Ecommerce Secure — Minimalist glassmorphism (dark)
   Translucent glass, monochrome; color only signals risk level.
   ========================================================================== */

:root {
  --bg: #07080b;
  --ink: #f4f5f7;
  --ink-soft: #c4c7ce;
  --muted: #8d929c;
  --faint: #5c616b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --glass-bg: rgba(255, 255, 255, 0.035);
  --glass-bg-hover: rgba(255, 255, 255, 0.055);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-blur: blur(24px) saturate(120%);

  /* Severity colors: the only use of color in the UI */
  --danger: #ff6b6b;
  --high: #ff9a6b;
  --warn: #f5b85a;
  --low: #8fd3c8;
  --safe: #4ade80;
  --info: #9aa8c7;

  --font: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  touch-action: pan-y;
  -ms-touch-action: pan-y;
  overscroll-behavior: none;
}

.mono {
  font-family: var(--font-mono);
}

/* --- Background: two soft grey glows + faint grid --- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  animation: drift 26s ease-in-out infinite alternate;
}

.g1 {
  width: 640px;
  height: 640px;
  right: 2%;
  top: 4%;
  background: rgba(150, 160, 185, 0.16);
}

.g2 {
  width: 540px;
  height: 540px;
  left: -8%;
  bottom: -12%;
  background: rgba(120, 130, 150, 0.12);
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 25%, #000 10%, transparent 70%);
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

/* --- Glass --- */

.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Header
   ========================================================================== */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 3.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.brand-badge svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}

.top-nav {
  display: flex;
  gap: 0.25rem;
}

.top-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a[aria-current="page"] {
  color: var(--ink);
}

.top-nav a:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  min-height: calc(100vh - 5.5rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3.5rem) 4rem;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0 0 1.4rem;
  max-width: 13ch;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  animation: rise 0.9s var(--ease) 0.06s both;
}

.hero h1 span {
  color: var(--muted);
  font-weight: 300;
}

.lede {
  margin: 0 0 2.2rem;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
  animation: rise 0.9s var(--ease) 0.12s both;
}

.lede strong {
  color: var(--ink);
  font-weight: 500;
}

/* --- Form --- */

.scan-form {
  max-width: 580px;
  animation: rise 0.9s var(--ease) 0.18s both;
}

.field {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 20px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 4px rgba(255, 255, 255, 0.04),
    0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

.field-input {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.field-prefix {
  padding-left: 1rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  white-space: nowrap;
}

.field input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 0.95rem 0.75rem 0.95rem 0.15rem;
  touch-action: manipulation;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:disabled {
  opacity: 0.6;
}

.field button {
  appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #0a0b0e;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  touch-action: manipulation;
}

.field button:hover {
  background: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.5);
}

.field button:active {
  transform: scale(0.98);
}

.field button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.field button.is-loading {
  pointer-events: none;
  background: var(--ink-soft);
}

.btn-spinner {
  width: 0;
  height: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
}

.field button.is-loading .btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 1;
  border-color: rgba(10, 11, 14, 0.2);
  border-top-color: #0a0b0e;
  animation: spin 0.7s linear infinite;
}

.form-hint {
  margin: 1rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
}

/* --- Radar --- */

.hero-visual {
  position: relative;
  min-width: 0;
  max-width: 540px;
  width: 100%;
  margin-left: auto;
  perspective: 1400px;
  animation: rise 1s var(--ease) 0.15s both;
}

.radar-card {
  --rx: 0deg;
  --ry: 0deg;
  padding: 1.25rem;
  border-radius: 32px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.8s var(--ease);
}

.radar-card.is-tracking {
  transition: transform 0.2s linear;
}

.radar-head {
  display: flex;
  justify-content: space-between;
  margin: 0.1rem 0.4rem 1rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.radar-head b {
  font-weight: 500;
  color: var(--ink-soft);
}

.radar-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.radar-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

body[data-tone] .radar-state i {
  background: var(--tone-color, var(--safe));
}

body.is-scanning .radar-state i {
  background: var(--warn);
  animation: breathe 0.9s ease-in-out infinite;
}

.radar {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2) 70%);
}

.ring {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.r2 {
  inset: 22%;
}

.r3 {
  inset: 38%;
}

.cross {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)) center / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06)) center / 100% 1px no-repeat;
}

.sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 290deg,
    rgba(255, 255, 255, 0.07) 340deg,
    rgba(255, 255, 255, 0.32) 359.6deg,
    transparent 360deg
  );
  animation: spin 6s linear infinite;
}

body.is-scanning .sweep {
  animation-duration: 1.6s;
}

.core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.core svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.blip {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.07);
  animation: blip 3s ease-out forwards;
  pointer-events: none;
}

.blip.threat {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.12);
}

.float-chip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.75rem;
  color: var(--muted);
  animation: float 7s ease-in-out infinite;
}

.float-chip b {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.chip-a {
  left: -1.5rem;
  top: 18%;
}

.chip-b {
  right: -1.25rem;
  bottom: 14%;
  animation-delay: -3.5s;
}

/* ==========================================================================
   Scan in progress
   ========================================================================== */

.scanning {
  margin: 0 clamp(1rem, 4vw, 3.5rem) 3rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  animation: fade-up 0.6s var(--ease) both;
}

.scanning-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.scanning h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.scan-progress {
  height: 2px;
  margin: 1.5rem 0;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.scan-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 0.45s var(--ease);
}

.scope {
  display: block;
  width: 100%;
  height: 140px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 10% 100%,
    rgba(0, 0, 0, 0.15);
}

.steps-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.scan-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.scan-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.72rem 0.15rem;
  border-bottom: 1px solid var(--line);
  opacity: 0.35;
  transition: opacity 0.35s var(--ease);
}

.scan-step.is-active,
.scan-step.is-done {
  opacity: 1;
}

.scan-step-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}

.scan-step-label {
  margin: 0;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.scan-step.is-active .scan-step-label {
  color: var(--ink);
}

.scan-step-state {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--faint);
}

.scan-step.is-active .scan-step-state {
  color: var(--warn);
  animation: breathe 1s ease-in-out infinite;
}

.scan-step.is-done .scan-step-state {
  color: var(--safe);
}

.scanning-status {
  margin: auto 0 0;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ==========================================================================
   Report: result screen (fits on a single screen)
   ========================================================================== */

.report {
  padding: 0 clamp(1rem, 4vw, 3.5rem) 4rem;
  /* Keeps the easter-egg sparks from causing horizontal scroll */
  overflow-x: clip;
  /* Opacity only: a transform would break the scroll alignment */
  animation: fade-in 0.6s var(--ease) both;
}

.result-screen {
  --tone: var(--warn);
  display: flex;
  flex-direction: column;
  min-height: min(calc(100svh - 24px), 860px);
  padding: clamp(1.2rem, 2.6vw, 2.2rem) clamp(1.2rem, 3vw, 2.6rem);
  border-radius: 28px;
  scroll-margin-top: 12px;
}

/* Thin risk-colored line on the top edge */
.result-screen::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 2.5rem;
  right: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: 0.8;
}

body[data-tone="safe"],
body[data-tone="low"] {
  --tone-color: var(--safe);
}

body[data-tone="medium"] {
  --tone-color: var(--warn);
}

body[data-tone="high"],
body[data-tone="critical"] {
  --tone-color: var(--danger);
}

body[data-tone] .result-screen {
  --tone: var(--tone-color);
}

.result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.result-site {
  min-width: 0;
}

.result-host {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.8rem, 4.4vw, 3.3rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.result-site .meta {
  margin: 0;
}

.result-stamp {
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  flex: 0 0 auto;
  padding-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.result-brand {
  font-weight: 500;
  color: var(--ink);
}

.result-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1rem, 2.5vh, 1.75rem) 0;
}

.result-gauge {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  min-width: 0;
}

/* --- Gauge --- */

.risk-gauge {
  --risk-color: var(--warn);
  width: min(100%, 460px);
  padding: clamp(1.1rem, 2.4vw, 1.75rem) clamp(1.1rem, 2.4vw, 1.75rem) clamp(1rem, 2vw, 1.4rem);
  border-radius: 24px;
}

.risk-gauge[data-tone="safe"],
.risk-gauge[data-tone="low"] {
  --risk-color: var(--safe);
}

.risk-gauge[data-tone="medium"] {
  --risk-color: var(--warn);
}

.risk-gauge[data-tone="high"],
.risk-gauge[data-tone="critical"] {
  --risk-color: var(--danger);
}

.risk-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.risk-gauge-track,
.risk-gauge-value {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.risk-gauge-track {
  stroke: rgba(255, 255, 255, 0.07);
}

.risk-gauge-value {
  stroke: var(--risk-color);
  transition: stroke-dashoffset 1.6s var(--ease), stroke 0.35s ease;
}

.risk-gauge-ticks line {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.risk-gauge-ticks line.major {
  stroke: rgba(255, 255, 255, 0.4);
}

.risk-gauge-ticks text {
  font-family: var(--font);
  font-size: 7px;
  fill: var(--faint);
  text-anchor: middle;
}

.risk-gauge-needle {
  transform-box: view-box;
  transform-origin: 100px 100px;
  transform: rotate(-90deg);
  transition: transform 1.8s var(--spring);
}

.risk-gauge-needle path {
  fill: var(--ink);
}

.needle-tremble {
  transform-box: view-box;
  transform-origin: 100px 100px;
}

.risk-gauge.is-live .needle-tremble {
  animation: tremble 2.4s ease-in-out infinite alternate;
}

.needle-hub {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.risk-gauge-core {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
  padding: 0 0.2rem;
}

.risk-gauge-score {
  font-size: clamp(2.6rem, 5.6vw, 4rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.risk-gauge-score::after {
  content: "/100";
  margin-left: 0.25rem;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.risk-gauge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--risk-color);
  background: color-mix(in srgb, var(--risk-color) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--risk-color) 28%, transparent);
}

.risk-gauge-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.platform-tag {
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}


/* --- Platform badges in each brand's color --- */

[data-platform="woocommerce"] { --pf: #9b5cff; }
[data-platform="magento"] { --pf: #f26322; }
[data-platform="prestashop"] { --pf: #df0067; }
[data-platform="shopify"] { --pf: #95bf47; }
[data-platform="ecommerce-secure"] { --pf: #4ade80; }

.platform-tag[data-platform],
.pf-badge[data-platform] {
  color: color-mix(in srgb, var(--pf) 72%, white);
  background: color-mix(in srgb, var(--pf) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--pf) 45%, transparent);
  box-shadow: 0 0 18px -6px color-mix(in srgb, var(--pf) 60%, transparent);
}

/* Small brand dot before the name */
.platform-tag[data-platform]::before,
.pf-badge[data-platform]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.45rem;
  border-radius: 50%;
  vertical-align: 0.08em;
  background: var(--pf);
  box-shadow: 0 0 8px var(--pf);
}

/* Inline badge inside the meta line under the domain */
.meta .pf-badge {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

/* --- Findings summary --- */

.result-summary {
  min-width: 0;
}

.risk-reason {
  margin: 0 0 1.3rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.result-subtitle {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

:is(.finding, .summary-row)[data-sev="critical"] { --sev: var(--danger); }
:is(.finding, .summary-row)[data-sev="high"] { --sev: var(--high); }
:is(.finding, .summary-row)[data-sev="medium"] { --sev: var(--warn); }
:is(.finding, .summary-row)[data-sev="low"] { --sev: var(--low); }
:is(.finding, .summary-row)[data-sev="info"] { --sev: var(--info); }
:is(.finding, .summary-row)[data-sev="safe"] { --sev: var(--safe); }

.summary-row {
  --sev: var(--info);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--line);
  animation: fade-up 0.5s var(--ease) both;
}

.led {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sev, var(--muted));
}

.summary-row[data-sev="critical"] .led,
.finding[data-sev="critical"] .led {
  animation: breathe 1.6s ease-in-out infinite;
}

.summary-num {
  font-size: 0.75rem;
  color: var(--faint);
}

.summary-title {
  min-width: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sev {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sev, var(--muted));
}

.signal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  animation: fade-up 0.45s var(--ease) both;
}

.result-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--faint);
}

.result-foot a {
  color: var(--ink);
  text-decoration: none;
}

.result-foot a:hover {
  text-decoration: underline;
}

.result-hint {
  margin: 0.9rem 0 3rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--faint);
}

.details-title {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  scroll-margin-top: 16px;
}

/* --- Findings detail --- */

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.finding {
  --sev: var(--info);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.4rem;
  padding: 1.4rem 1.6rem;
  border-radius: 20px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    background 0.25s var(--ease);
}

.finding.is-visible {
  opacity: 1;
  transform: none;
}

.finding.is-visible:hover {
  background: var(--glass-bg-hover);
}

.finding-index {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  align-self: start;
  padding-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
}

.finding-body {
  min-width: 0;
}

.finding-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.finding-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  margin-bottom: 0.75rem;
}

.cve {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.finding p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.65;
}

.finding .fix {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.finding .fix strong {
  font-weight: 600;
  color: var(--ink);
}

/* --- References --- */

.refs {
  margin-top: 1rem;
  padding: 1.5rem 1.6rem;
  border-radius: 20px;
}

.refs h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.refs-note {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.refs ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.refs a {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.refs a::after {
  content: "↗";
  color: var(--faint);
}

.refs a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Self-scan easter egg ("God mode") --- */

.risk-gauge.is-godmode {
  --risk-color: var(--safe);
}

.risk-gauge.is-godmode .risk-gauge-value {
  transition: stroke-dashoffset 2s cubic-bezier(0.5, 0, 0.75, 0);
}

.risk-gauge.is-exploded {
  border-color: rgba(74, 222, 128, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(74, 222, 128, 0.15),
    0 0 80px -10px rgba(74, 222, 128, 0.45),
    0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

.risk-gauge.is-exploded .risk-gauge-value {
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.8));
}

/* Needle stuck past the limit, vibrating */
.risk-gauge.is-exploded .needle-tremble {
  animation: tremble-hard 0.07s linear infinite alternate;
}

.risk-gauge.is-godmode .risk-gauge-score {
  color: var(--safe);
}

.risk-gauge.is-exploded .risk-gauge-score {
  text-shadow: 0 0 24px rgba(74, 222, 128, 0.6);
  animation: score-flicker 2.4s steps(1) infinite;
}

.risk-gauge.is-exploded .risk-gauge-label {
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.45);
  animation: god-pulse 1.6s ease-in-out infinite;
}

.risk-gauge.is-shaking {
  animation: gauge-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.result-screen.is-shaking {
  animation: screen-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.fx-canvas {
  position: absolute;
  inset: -140px;
  width: calc(100% + 280px);
  height: calc(100% + 280px);
  z-index: 6;
  pointer-events: none;
}

.fx-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 75%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  animation: flash 0.7s ease-out forwards;
}

.fx-wave {
  position: absolute;
  z-index: 5;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  pointer-events: none;
  animation: shockwave 0.8s ease-out forwards;
}

/* Cracked glass after the blast */
.fx-cracks {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fx-cracks path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: crack 0.35s ease-out forwards;
}

@keyframes tremble-hard {
  from { transform: rotate(-1.6deg); }
  to { transform: rotate(1.6deg); }
}

@keyframes gauge-shake {
  10%, 90% { transform: translate(-2px, 1px) rotate(-0.4deg); }
  20%, 80% { transform: translate(4px, -2px) rotate(0.6deg); }
  30%, 50%, 70% { transform: translate(-7px, 3px) rotate(-1deg); }
  40%, 60% { transform: translate(7px, -3px) rotate(1deg); }
}

@keyframes screen-shake {
  20%, 80% { transform: translate(-2px, 0); }
  40%, 60% { transform: translate(3px, 1px); }
  50% { transform: translate(-3px, -1px); }
}

@keyframes flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes shockwave {
  from { transform: scale(0.2); opacity: 1; }
  to { transform: scale(26); opacity: 0; }
}

@keyframes crack {
  to { stroke-dashoffset: 0; }
}

@keyframes god-pulse {
  50% { box-shadow: 0 0 40px rgba(74, 222, 128, 0.7); }
}

@keyframes score-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  96% { opacity: 0.6; }
}

/* ==========================================================================
   Content sections (SEO)
   ========================================================================== */

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.content-section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 3.5rem) 0;
  scroll-margin-top: 1rem;
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.2rem;
}

.section-head h2 {
  margin: 0.2rem 0 0.8rem;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.check-grid,
.steps-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.check-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.steps-row {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.check-card,
.step-card {
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), background 0.25s var(--ease);
}

.check-card:hover,
.step-card:hover {
  background: var(--glass-bg-hover);
}

.check-card h3,
.step-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.check-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

.check-card strong {
  color: var(--ink);
  font-weight: 500;
}

.check-num {
  font-size: 0.75rem;
  color: var(--faint);
}

.step-dial {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.85rem;
  color: var(--ink);
}

.faq {
  max-width: 860px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0.2rem;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.3s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--ink-soft);
  outline-offset: 2px;
  border-radius: 6px;
}

.faq-item h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.faq-item p {
  margin: 0;
  padding: 0 2.5rem 1.3rem 0.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item[open] p {
  animation: fade-up 0.4s var(--ease) both;
}

.faq-cta {
  margin: 2.2rem 0 0;
}

.cta-key {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 1.4rem;
  border-radius: 14px;
  background: var(--ink);
  color: #0a0b0e;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease);
}

.cta-key:hover {
  background: #fff;
}

.cta-key:active {
  transform: scale(0.98);
}

/* Reveal on scroll (only when JS runs) */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Error, footer and utilities
   ========================================================================== */

.error-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 clamp(1rem, 4vw, 3.5rem) 2rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  font-size: 0.92rem;
  color: #ffc9c9;
  background: rgba(255, 107, 107, 0.06);
  border: 1px solid rgba(255, 107, 107, 0.25);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  animation: shake 0.45s var(--ease) both;
}

.error-banner::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--danger);
}

.error-banner[hidden] {
  display: none;
}

.foot {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding: 2.4rem clamp(1rem, 4vw, 3.5rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.foot p {
  margin: 0;
  line-height: 1.6;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}

.foot-main {
  max-width: 62ch;
}

.foot-brand {
  margin: 0 0 0.4rem !important;
  color: var(--ink);
  font-weight: 600;
}

.foot-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.foot-nav a {
  color: var(--muted);
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--ink);
}

/* Technical spec sheet */
.spec-sheet {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.spec-title {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  margin: 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.spec-grid > div {
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-grid dt {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.spec-grid dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.foot-legal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem 2.5rem;
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--faint);
}

.foot-legal strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--faint);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--safe);
  vertical-align: middle;
  animation: breathe 2.8s ease-in-out infinite;
}

.notfound {
  max-width: 720px;
  min-height: 80vh;
  display: grid;
  align-content: center;
}

.notfound h1 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Animations (subtle)
   ========================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  50% { opacity: 0.35; }
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.08); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes blip {
  0% { opacity: 0; transform: scale(0.4); }
  10% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; }
}

@keyframes tremble {
  from { transform: rotate(-0.4deg); }
  to { transform: rotate(0.4deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .top-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-visual {
    margin: 0 auto;
    max-width: 460px;
  }

  .scanning-grid {
    grid-template-columns: 1fr;
  }

  .result-body {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 1rem;
  }

  /* On mobile, keep only the essentials inside the screenshot */
  .result-summary .risk-reason,
  .result-summary .signal-bar,
  .result-gauge .platform-tag {
    display: none;
  }

  /* The gauge scales with available height so everything fits on screen */
  .result-gauge .risk-gauge {
    width: min(100%, 420px, calc((100svh - 470px) * 1.45));
    min-width: 220px;
  }
}

@media (max-width: 980px) and (max-height: 780px) {
  .result-foot {
    display: none;
  }
}

@media (max-width: 520px) {
  .field {
    flex-direction: column;
  }

  .field button {
    width: 100%;
  }

  .chip-a {
    left: -0.4rem;
  }

  .chip-b {
    right: -0.4rem;
  }

  .float-chip {
    padding: 0.6rem 0.8rem;
  }

  .result-screen {
    padding: 1.2rem 1.1rem 1rem;
    border-radius: 24px;
  }

  .result-top {
    flex-direction: column;
    gap: 0.4rem;
    padding-bottom: 0.9rem;
  }

  .result-host {
    font-size: clamp(1.4rem, 6.6vw, 2rem);
  }

  .result-stamp {
    display: flex;
    gap: 0.7rem;
    padding: 0;
    text-align: left;
  }

  .result-body {
    padding: 0.9rem 0;
  }

  .risk-gauge {
    padding: 1rem 1rem 0.9rem;
  }

  .risk-gauge-score {
    font-size: 2.6rem;
  }

  .summary-row {
    gap: 0.6rem;
    padding: 0.62rem 0.1rem;
  }

  .summary-title {
    font-size: 0.88rem;
  }

  .result-foot {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .finding {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1.2rem 1.1rem;
  }

  .scan-step {
    gap: 0.6rem;
  }

  .faq-item p {
    padding-right: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .finding {
    opacity: 1;
    transform: none;
  }
}
