/* CheckURLink V2 — application styles.
 * Editorial cybersecurity aesthetic, aligned to ubuntuguard.co.za palette.
 * Dark-first. Mobile-first. No inline styles. No glow shadows.
 */

@import url("./tokens.css");

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink-900);
  background-color: var(--surface-page);
  /* Subtle blue-cyan atmospherics + paper grain. */
  background-image:
    radial-gradient(1200px 700px at 10% -10%, rgba( 26, 127, 200, 0.16), transparent 60%),
    radial-gradient(1000px 700px at 95% 110%, rgba( 59, 189, 198, 0.12), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: var(--opentype-default);
  font-variant-numeric: tabular-nums lining-nums;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(1200px 700px at 10% -10%, rgba( 26, 127, 200, 0.06), transparent 60%),
    radial-gradient(1000px 700px at 95% 110%, rgba( 59, 189, 198, 0.05), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--brand-cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-blue-bright); }
[data-theme="light"] a { color: var(--brand-blue); }
[data-theme="light"] a:hover { color: var(--brand-blue-bright); }
img, svg { max-width: 100%; display: block; }

/* ---- Type scale ---- */
h1, h2, h3, h4 { margin: 0; color: var(--ink-1000); }
h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  line-height: var(--lh-tighter);
  letter-spacing: var(--tracking-display);
}
h1 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--brand-cyan);
}
[data-theme="light"] h1 em { color: var(--brand-blue); }
h2 {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  font-variation-settings: "opsz" 72, "SOFT" 30;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
h3 { font-size: var(--fs-lg); font-weight: 600; line-height: var(--lh-snug); }
p { margin: 0; }

/* ---- Accessibility ---- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -48px; left: 16px; z-index: 100;
  background: var(--brand-blue); color: #FFFFFF;
  padding: 10px 16px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
}
.skip-link:focus { top: 16px; outline: none; box-shadow: var(--focus-ring); }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface-page) 85%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
  min-height: 60px;
}
.brand-lockup {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 14, "SOFT" 30;
  letter-spacing: -0.005em;
  color: var(--ink-1000);
  text-decoration: none;
  font-size: var(--fs-lg);
}
.brand-name { display: inline-flex; align-items: baseline; gap: 0; }
.brand-mark { color: var(--brand-cyan); }
[data-theme="light"] .brand-mark { color: var(--brand-blue); }
.brand-divider {
  width: 1px; height: 18px; background: var(--border-strong);
}
.brand-parent {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.header-actions { display: flex; align-items: center; gap: var(--space-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  color: var(--ink-700);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-standard),
              color      var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard);
}
.icon-btn:hover {
  background: rgba( 26, 127, 200, 0.16);
  color: var(--brand-cyan);
  border-color: var(--brand-cyan);
}
[data-theme="light"] .icon-btn:hover {
  background: rgba( 26, 127, 200, 0.08);
  color: var(--brand-blue);
}
.icon-btn .icon { width: 20px; height: 20px; }

/* (Language picker removed by user request — verdict messages always English for now.) */

/* ---- Hero (asymmetric, editorial) ---- */
main { flex: 1; }
.hero {
  padding-block: clamp(var(--space-10), 9vw, var(--space-20)) var(--space-10);
  position: relative;
}
.hero::before {
  content: "";
  position: absolute; top: 60px; right: -40px;
  width: 320px; height: 320px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320' fill='none' stroke='%233BBDC6' stroke-width='1' stroke-opacity='0.30'><circle cx='160' cy='160' r='150'/><circle cx='160' cy='160' r='110'/><circle cx='160' cy='160' r='70'/><circle cx='160' cy='160' r='30'/><line x1='160' y1='0' x2='160' y2='320'/><line x1='0' y1='160' x2='320' y2='160'/></svg>");
  background-size: contain; background-repeat: no-repeat;
  opacity: 0.7;
  pointer-events: none;
  display: none;
}
@media (min-width: 1100px) { .hero::before { display: block; } }
[data-theme="light"] .hero::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320' fill='none' stroke='%231A7FC8' stroke-width='1' stroke-opacity='0.20'><circle cx='160' cy='160' r='150'/><circle cx='160' cy='160' r='110'/><circle cx='160' cy='160' r='70'/><circle cx='160' cy='160' r='30'/><line x1='160' y1='0' x2='160' y2='320'/><line x1='0' y1='160' x2='320' y2='160'/></svg>");
}

.hero-grid {
  display: grid;
  gap: var(--space-6);
  position: relative;
  z-index: 1;
}
@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: var(--space-10);
    align-items: end;
  }
}
.hero-meta { display: grid; gap: var(--space-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-500);
  width: fit-content;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 28px; height: 1px; background: currentColor;
}
.hero-tagline {
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  color: var(--ink-700);
  max-width: 36ch;
  line-height: 1.5;
}
.hero h1 { text-wrap: balance; }

/* Page-load entrance — staggered, respects reduced-motion. */
.hero-meta, .hero h1, .scan-card { animation: fadeUp var(--motion-slow) var(--ease-emphasized) both; }
.hero-meta { animation-delay: 60ms; }
.hero h1   { animation-delay: 140ms; }
.scan-card { animation-delay: 220ms; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Scan card (the action centerpiece) ---- */
.scan-card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 4vw, var(--space-8));
  box-shadow: var(--shadow-md);
  margin-top: var(--space-8);
}
.scan-card::before {
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid var(--hairline);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}

.card-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: var(--space-4);
}
.card-strip .num {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--brand-cyan);
  font-size: 0.78rem;
}
[data-theme="light"] .card-strip .num { color: var(--brand-blue); }

.scan-form { display: grid; gap: var(--space-4); position: relative; z-index: 1; }
.scan-input-row {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 580px) {
  .scan-input-row { grid-template-columns: 1fr auto; align-items: stretch; }
}
.url-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink-1000);
  background: var(--surface-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-height: 56px;
  transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}
.url-input::placeholder { color: var(--ink-500); font-family: var(--font-ui); }
.url-input:hover { border-color: var(--brand-cyan); }
.url-input:focus { background: var(--surface-deep); border-color: var(--brand-cyan); outline: none; box-shadow: var(--focus-ring); }
[data-theme="light"] .url-input:focus { background: var(--surface-card); }
.url-input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-tint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-ui); font-size: var(--fs-base); font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 var(--space-6);
  min-height: 56px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-blue);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--brand-blue-bright); color: #FFFFFF; }
.btn-primary[disabled] { background: var(--ink-300); color: var(--surface-card); cursor: not-allowed; }

.btn-secondary {
  background: var(--surface-card);
  color: var(--ink-900);
  border-color: var(--border-strong);
  min-height: 44px;
  padding-inline: var(--space-4);
  font-size: var(--fs-sm);
}
.btn-secondary:hover { background: var(--surface-inset); border-color: var(--brand-cyan); }
[data-theme="light"] .btn-secondary:hover { border-color: var(--brand-blue); }

.consent-strip {
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--ink-500);
  flex-wrap: wrap;
}
.checkbox {
  display: inline-flex; align-items: center; gap: var(--space-2);
  cursor: pointer; user-select: none;
  color: var(--ink-900);
  font-weight: 500;
}
.checkbox input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-card);
  display: grid; place-items: center;
  cursor: pointer;
  margin: 0;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.checkbox input:checked {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.checkbox input:checked::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF;
  transform: rotate(-45deg) translate(1px, -1px);
}
.checkbox input:focus-visible { box-shadow: var(--focus-ring); }

.error-text {
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: 500;
  display: none;
}
.scan-input-row[data-invalid="true"] .error-text { display: block; }

/* ---- Result panel ---- */
.result {
  margin-top: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.result[hidden] { display: none; }
.result-head {
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  display: grid;
  gap: var(--space-3);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  width: fit-content;
}
.status-pill .icon { width: 14px; height: 14px; }
.status-pill[data-verdict="safe"]       { background: var(--success-tint); color: var(--success); }
.status-pill[data-verdict="suspicious"] { background: var(--warning-tint); color: var(--warning); }
.status-pill[data-verdict="malicious"]  { background: var(--danger-tint);  color: var(--danger);  }
.status-pill[data-verdict="unknown"]    { background: var(--surface-inset); color: var(--ink-500); }

/* Destination context note — surfaced when the destination returned an
 * HTTP error (404/410/5xx/etc.) or was unreachable. NOT styled as our
 * own error — it's neutral context. */
.destination-note {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-700);
  background: var(--surface-inset);
  border-left: 3px solid var(--ink-500);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.destination-note[hidden] { display: none; }

.result-headline {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.result-host {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-700);
  word-break: break-all;
  background: var(--surface-inset);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
}

.risk-bar {
  display: grid; gap: 6px;
  margin-top: var(--space-2);
}
.risk-bar-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-700);
}
.risk-bar-label .score {
  font-family: var(--font-mono);
  color: var(--ink-1000);
}
.risk-bar-track {
  height: 8px;
  background: var(--surface-inset);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--hairline);
}
.risk-bar-fill {
  height: 100%;
  width: var(--score, 0%);
  border-radius: inherit;
  transition: width var(--motion-slow) var(--ease-standard), background-color var(--motion-base);
}
.result[data-verdict="safe"]       .risk-bar-fill { background: var(--success); }
.result[data-verdict="suspicious"] .risk-bar-fill { background: var(--warning); }
.result[data-verdict="malicious"]  .risk-bar-fill { background: var(--danger); }
.result[data-verdict="unknown"]    .risk-bar-fill { background: var(--ink-500); }

.result-body {
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  display: grid;
  gap: var(--space-6);
}
.section-title {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-500);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: var(--hairline);
}
/*
  Inline status hint next to a section title. Used by the destination-preview
  block to say "loading…" / "unavailable" without expanding the layout or
  introducing a second line. Sits BEFORE the hairline (DOM order) and gets
  ordered visually with `order: -1` so the rule still flows to fill the row.
  Kept lowercase + non-uppercase so it reads like ambient status, not a label.
*/
.section-title-note {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-500);
  font-size: var(--fs-xs);
  font-style: italic;
}

.screenshot {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-inset);
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  position: relative;
}
.screenshot img { width: 100%; height: 100%; object-fit: cover; }
/*
  Loading state: subtle horizontal shimmer instead of the previous big
  "Loading preview…" text. The status word lives in the section-title note
  now ("loading…"), so the skeleton itself just needs to feel alive without
  shouting. Keeps the 16:10 aspect-ratio so there's no layout jump when the
  real image arrives.
*/
.screenshot[data-state="loading"] {
  background:
    linear-gradient(
      90deg,
      var(--surface-inset) 0%,
      var(--surface-card) 50%,
      var(--surface-inset) 100%
    );
  background-size: 200% 100%;
  animation: screenshot-shimmer 1.4s ease-in-out infinite;
}
@keyframes screenshot-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
/* Honour reduced-motion preference — for users who disable animations,
   show a static dim background with no shimmer. */
@media (prefers-reduced-motion: reduce) {
  .screenshot[data-state="loading"] {
    animation: none;
    background: var(--surface-inset);
  }
}
.screenshot[data-state="unavailable"]::after {
  content: "Preview unavailable";
  font-family: var(--font-ui);
  color: var(--ink-500);
  font-size: var(--fs-sm);
}
.screenshot[data-state="ok"]::after { content: none; }
.screenshot[data-state="ok"] { background: var(--surface-card); }

/* Safety caption pinned to the bottom of the preview frame.
 * Always present in the DOM (so screen readers announce it), visually
 * docked over the image so the user can't miss the disclaimer. */
.screenshot-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(11, 18, 32, 0.78), rgba(11, 18, 32, 0.0));
  color: #FFFFFF;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: 1.4;
  pointer-events: none;
}
.screenshot-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  background: var(--brand-cyan);
  color: var(--ink-1000);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="light"] .screenshot-badge { background: var(--brand-blue); color: #FFFFFF; }
.screenshot-caption strong { font-weight: 700; }
/* While loading or unavailable the figure shows ::after text; hide the caption then. */
.screenshot[data-state="loading"] .screenshot-caption,
.screenshot[data-state="unavailable"] .screenshot-caption { display: none; }

.chain { display: grid; gap: var(--space-2); }
.chain-hop {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 14px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.chain-hop-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-cyan);
  font-weight: 600;
}
[data-theme="light"] .chain-hop-num { color: var(--brand-blue); }
.chain-hop-url {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-900);
  word-break: break-all;
  min-width: 0;
}
.chain-hop-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-500);
  white-space: nowrap;
}

/* "Why we think this" disclosure */
.disclosure { border-top: 1px solid var(--hairline); }
.disclosure-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) clamp(var(--space-5), 3vw, var(--space-8));
  background: transparent;
  border: 0;
  font: inherit;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink-1000);
  cursor: pointer;
  text-align: left;
  transition: background var(--motion-fast);
}
.disclosure-toggle:hover { background: var(--surface-inset); }
.disclosure-toggle .chevron {
  width: 18px; height: 18px;
  transition: transform var(--motion-base) var(--ease-standard);
  color: var(--ink-500);
}
.disclosure[data-open="true"] .chevron { transform: rotate(180deg); }
.disclosure-content {
  padding: 0 clamp(var(--space-5), 3vw, var(--space-8)) var(--space-6);
  display: none;
}
.disclosure[data-open="true"] .disclosure-content { display: grid; gap: var(--space-3); }

.check-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.check-row:last-child { border-bottom: 0; }
.check-row-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-500);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.check-row-name {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--ink-1000);
  font-size: var(--fs-sm);
}
.check-row-status {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.check-row-status[data-status="safe"]       { background: var(--success-tint); color: var(--success); }
.check-row-status[data-status="suspicious"] { background: var(--warning-tint); color: var(--warning); }
.check-row-status[data-status="malicious"]  { background: var(--danger-tint);  color: var(--danger);  }
.check-row-status[data-status="skipped"],
.check-row-status[data-status="error"],
.check-row-status[data-status="pending"],
.check-row-status[data-status="unknown"]    { background: var(--surface-inset); color: var(--ink-500); }
.check-row-reason {
  grid-column: 2 / -1;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-500);
  line-height: 1.5;
  margin-top: 2px;
}

.result-actions {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  padding: 0 clamp(var(--space-5), 3vw, var(--space-8)) clamp(var(--space-5), 3vw, var(--space-8));
}

/* ---- Empty / loading / error / rate-limited states ---- */
.state-card {
  margin-top: var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 5vw, var(--space-10));
  text-align: center;
}
.state-card[hidden] { display: none; }
.state-headline {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 500;
  font-variation-settings: "opsz" 24;
  margin-bottom: var(--space-2);
  color: var(--ink-1000);
}
.state-text { color: var(--ink-500); font-size: var(--fs-sm); }
.state-text code { font-family: var(--font-mono); font-size: .85em; padding: 2px 6px; background: var(--surface-inset); border-radius: 4px; color: var(--ink-700); }

.progress-list { list-style: none; margin: var(--space-5) auto 0; padding: 0; max-width: 360px; text-align: left; display: grid; gap: 10px; }
.progress-list li {
  display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: center;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-500);
}
.progress-list li[data-state="active"] { color: var(--ink-1000); font-weight: 600; }
.progress-list li[data-state="done"]   { color: var(--success); }
.progress-list li::before {
  content: ""; width: 14px; height: 14px;
  border: 2px solid var(--ink-300); border-top-color: var(--brand-cyan);
  border-radius: 50%;
  display: block;
}
.progress-list li[data-state="done"]::before {
  border-color: var(--success); border-top-color: var(--success);
  background: var(--success);
  background-image: linear-gradient(45deg, transparent 50%, var(--surface-page) 50%);
  background-position: 4px -2px;
  background-size: 70% 70%; background-repeat: no-repeat;
}
.progress-list li[data-state="active"]::before { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Feed panel (Recently flagged in SA) ---- */

.feed-panel {
  padding-block: clamp(var(--space-8), 6vw, var(--space-12));
}

.feed-panel-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.feed-panel-header .section-title { margin-bottom: 0; }
.feed-panel-header .section-title::after { display: none; }
.feed-panel-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-500);
  white-space: nowrap;
}

.feed-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: var(--space-1);
}

.feed-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}
@media (max-width: 440px) {
  .feed-row {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }
  .feed-row .feed-row-time { grid-column: 2 / -1; }
  .feed-row .feed-row-count { grid-row: 1; }
}
.feed-row .status-pill {
  font-size: 0.62rem; padding: 3px 8px;
}
.feed-row-host {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-900);
  word-break: break-all;
  min-width: 0;
}
.feed-row-time {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-500);
  white-space: nowrap;
}
.feed-row-count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-cyan);
  font-weight: 600;
  white-space: nowrap;
}
[data-theme="light"] .feed-row-count { color: var(--brand-blue); }

.feed-empty {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-500);
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--surface-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  margin: 0;
}
.feed-empty strong { display: block; color: var(--ink-1000); margin-bottom: 4px; font-weight: 600; }

.feed-report {
  margin-top: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.feed-report > summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-900);
  list-style: none;
  user-select: none;
}
.feed-report > summary::-webkit-details-marker { display: none; }
.feed-report[open] > summary { margin-bottom: var(--space-3); }
.feed-report-row {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .feed-report-row { grid-template-columns: 1fr auto; align-items: stretch; }
}
.feed-report .url-input { min-height: 44px; padding: 10px 14px; }
.feed-report-status {
  margin: var(--space-2) 0 0;
  min-height: 1em;
  font-size: var(--fs-sm);
  color: var(--ink-500);
}
.feed-report-status[data-state="ok"]    { color: var(--success); }
.feed-report-status[data-state="error"] { color: var(--danger); }
.feed-report-status[data-state="info"]  { color: var(--ink-700); }

/* Standalone local-line — sits below the feed panel as a quiet credit line. */
.local-line {
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--ink-500);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: center;
  padding: var(--space-4) var(--space-4) var(--space-8);
}
.local-line a { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.local-line a:hover { color: var(--brand-cyan); }
[data-theme="light"] .local-line a:hover { color: var(--brand-blue); }
.sa-flag { font-size: 1.1em; line-height: 1; }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  padding-block: var(--space-10) var(--space-8);
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-sm);
  color: var(--ink-500);
}
.footer-row {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 720px) {
  .footer-row { grid-template-columns: 1fr auto; }
}
.footer-links { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer-links a { color: var(--ink-500); text-decoration: none; }
.footer-links a:hover { color: var(--ink-1000); }
.footer-meta {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 14, "SOFT" 50;
  font-size: var(--fs-sm);
  color: var(--ink-700);
}
.footer-meta strong {
  font-style: normal;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--brand-cyan);
  letter-spacing: -0.005em;
}
[data-theme="light"] .footer-meta strong { color: var(--brand-blue); }
