@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Thermal palette */
  --bg: #0f0b09;
  --bg-warm: #1a1210;
  --panel: rgba(22, 14, 10, 0.92);
  --panel-border: rgba(255, 107, 53, 0.18);
  --text: #f5ede6;
  --muted: #a89b8c;
  --accent: #ff6b35;
  --accent-strong: #ff3d00;
  --safe: #10e8b0;
  --safe-dim: rgba(16, 232, 176, 0.12);
  --warning: #ffb347;
  --danger: #ff4444;
  --danger-dim: rgba(255, 68, 68, 0.12);
  --exposed-dim: rgba(255, 179, 71, 0.12);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: "Space Grotesk", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "IBM Plex Mono", Consolas, monospace;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 10% 0%, rgba(255, 90, 30, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 5%, rgba(255, 61, 0, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 75% 95%, rgba(255, 107, 53, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ─── Animations ──────────────────────────────────────── */

@keyframes ember-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.75); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 68, 68, 0.3), 0 0 20px rgba(255, 68, 68, 0.1); }
  50%       { box-shadow: 0 0 0 1px rgba(255, 68, 68, 0.6), 0 0 32px rgba(255, 68, 68, 0.22); }
}

@keyframes safe-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(16, 232, 176, 0.2), 0 0 16px rgba(16, 232, 176, 0.06); }
  50%       { box-shadow: 0 0 0 1px rgba(16, 232, 176, 0.4), 0 0 24px rgba(16, 232, 176, 0.12); }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.3; }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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

/* ─── Ticker Bar ──────────────────────────────────────── */

.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 32px;
  background: var(--accent-strong);
  overflow: hidden;
  display: flex;
  align-items: center;
  user-select: none;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 38s linear infinite;
  will-change: transform;
}

.ticker-item {
  display: inline-block;
  padding: 0 28px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

.ticker-sep {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  vertical-align: middle;
}

/* ─── Layout Shell ────────────────────────────────────── */

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  z-index: 1;
}

/* ─── Nav ─────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 32px;
  z-index: 100;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 11, 9, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.nav-flame {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-wordmark span {
  color: var(--accent);
}

/* Nav tab links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.nav-link {
  display: block;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 107, 53, 0.09);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(255, 107, 53, 0.12);
}

/* ─── Mode Toggle ────────────────────────────────────── */

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.mode-toggle-btn {
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
  white-space: nowrap;
}

.mode-toggle-btn:hover {
  color: var(--text);
}

.mode-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ─── Mode Visibility ────────────────────────────────── */

.quant-only { display: none !important; }
.simple-only { }

body.mode-quant .quant-only,
html.mode-quant .quant-only { display: revert !important; }
body.mode-quant .simple-only,
html.mode-quant .simple-only { display: none !important; }

/* ─── Main Content ────────────────────────────────────── */

.app {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 64px;
  flex: 1;
}

/* ─── Hero ────────────────────────────────────────────── */

.hero {
  width: min(760px, 100%);
  padding: 0 2px;
}

.hero-news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(480px, 0.92fr);
  gap: 32px;
  align-items: start;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 107, 53, 0.28);
  border-radius: 999px;
  background: rgba(255, 90, 30, 0.08);
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  animation: ember-pulse 2s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
}

.hero h1 .shimmer {
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    #ffca80 30%,
    var(--danger) 50%,
    #ffca80 70%,
    var(--accent) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

.lede {
  margin: 16px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ─── Threat Watch ────────────────────────────────────── */

.threat-panel {
  position: sticky;
  top: 116px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 107, 53, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 68, 68, 0.08) 0%, rgba(22, 14, 10, 0.92) 28%, rgba(15, 11, 9, 0.94) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 140px);
}

.threat-panel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.threat-sub {
  max-width: none;
}

.threat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.threat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.22);
  background: rgba(255, 107, 53, 0.08);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.threat-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 14px rgba(255, 68, 68, 0.45);
  animation: ember-pulse 1.8s ease-in-out infinite;
}

.threat-updated {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.news-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 107, 53, 0.14);
  background: rgba(255, 107, 53, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.news-status.error {
  border-color: rgba(255, 68, 68, 0.24);
  color: #ffb3b3;
}

.news-status[hidden] {
  display: none;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.news-item {
  margin: 0;
}

.news-card {
  display: block;
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.11);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.news-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 107, 53, 0.24);
  background: rgba(255, 107, 53, 0.05);
}

.news-item-fresh .news-card {
  border-color: rgba(255, 68, 68, 0.24);
  background: linear-gradient(180deg, rgba(255, 68, 68, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.news-item-skeleton .news-card {
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.news-source {
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-time {
  color: var(--muted);
  font-size: 0.79rem;
  white-space: nowrap;
}

.news-headline {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.news-summary {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.news-footnote {
  margin: 0;
  color: #807163;
  font-size: 0.77rem;
  line-height: 1.55;
}

/* ─── Threat Brief Drawer ─────────────────────────────── */

.news-drawer[hidden] {
  display: none;
}

.news-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
}

.news-drawer-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.news-drawer-shell > * {
  pointer-events: auto;
}

.news-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 5, 0.72);
  backdrop-filter: blur(8px);
}

.news-context-panel[hidden] {
  display: none;
}

.news-context-panel,
.news-drawer-panel {
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.news-context-panel {
  position: absolute;
  left: auto;
  right: calc(24px + min(560px, calc(100vw - 32px)) + 24px);
  top: 84px;
  width: min(460px, calc(100vw - 640px));
  border: 1px solid rgba(255, 107, 53, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 107, 53, 0.08) 0%, rgba(19, 13, 10, 0.95) 26%, rgba(15, 11, 9, 0.98) 100%);
}

.news-drawer-panel {
  position: absolute;
  right: 24px;
  top: 84px;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid rgba(255, 107, 53, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 68, 68, 0.07) 0%, rgba(22, 14, 10, 0.95) 22%, rgba(15, 11, 9, 0.98) 100%);
}

.news-drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.news-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.news-context-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  background: rgba(255, 107, 53, 0.08);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-context-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.news-context-title {
  margin: 0;
  max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.7vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.news-context-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.68;
}

.news-drawer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.news-drawer-tag {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 53, 0.18);
  background: rgba(255, 107, 53, 0.08);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-drawer-time {
  color: var(--muted);
  font-size: 0.84rem;
}

.news-drawer-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.news-drawer-hook {
  margin: 14px 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.news-drawer-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.news-context-block,
.news-drawer-block {
  padding: 16px 17px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.news-context-label,
.news-drawer-label {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-context-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.news-context-point {
  line-height: 1.6;
}

.news-context-copy,
.news-drawer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.news-context-actions,
.news-drawer-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.news-context-primary,
.news-drawer-cta {
  font: inherit;
  cursor: pointer;
}

.news-context-secondary,
.news-drawer-secondary {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.news-context-secondary:hover,
.news-drawer-secondary:hover {
  color: var(--text);
}

/* ─── Checker Panel ───────────────────────────────────── */

.checker-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.panel {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.lookup-form {
  display: grid;
  gap: 12px;
}

.field-label,
.metric-label,
.result-label {
  color: var(--muted);
  font-size: 0.87rem;
  letter-spacing: 0.02em;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.field-row input,
.field-row button {
  min-height: 52px;
  border-radius: var(--radius-md);
  font: inherit;
}

.field-row input {
  width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(255, 107, 53, 0.2);
  background: rgba(15, 11, 9, 0.85);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.field-row input::placeholder {
  color: #5a4a3f;
  font-family: var(--font-mono);
}

.field-row input:focus {
  border-color: rgba(255, 107, 53, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 61, 0, 0.1);
}

.field-row input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field-row button {
  padding: 0 22px;
  border: 0;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
  color: #1a0a02;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.field-row button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 61, 0, 0.35);
}

.field-row button:active {
  transform: translateY(0);
}

.field-row button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.helper-text code,
.mono {
  font-family: var(--font-mono);
}

/* ─── Status Banner ───────────────────────────────────── */

.status-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 107, 53, 0.18);
  background: rgba(15, 11, 9, 0.7);
  color: var(--text);
  font-size: 0.93rem;
}

.status-banner.error {
  border-color: rgba(255, 68, 68, 0.3);
  color: #ffb3b3;
}

/* ─── Result Card ─────────────────────────────────────── */

.result-card {
  display: none;
}

.result-card.visible {
  display: block;
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 107, 53, 0.16);
  background: rgba(15, 11, 9, 0.9);
  pointer-events: auto;
  animation: card-enter 300ms ease forwards;
}

/* State-specific card styles */
.result-card.result-vulnerable {
  border-color: rgba(255, 68, 68, 0.35);
  background: linear-gradient(180deg, rgba(255, 40, 40, 0.06) 0%, rgba(15, 11, 9, 0.9) 40%);
  animation: card-enter 300ms ease forwards, glow-pulse 3s ease-in-out infinite;
}

.result-card.result-safe {
  border-color: rgba(16, 232, 176, 0.3);
  background: linear-gradient(180deg, rgba(16, 232, 176, 0.05) 0%, rgba(15, 11, 9, 0.9) 40%);
  animation: card-enter 300ms ease forwards, safe-glow 4s ease-in-out infinite;
}

.result-card.result-exposed {
  border-color: rgba(255, 179, 71, 0.3);
  background: linear-gradient(180deg, rgba(255, 179, 71, 0.05) 0%, rgba(15, 11, 9, 0.9) 40%);
}

.result-card.result-unsupported {
  border-color: rgba(168, 155, 140, 0.2);
}

/* ─── Verdict (top of result card) ───────────────────── */

.result-verdict {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

.verdict-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.1);
}

.result-vulnerable .verdict-icon { background: rgba(255, 68, 68, 0.12); }
.result-safe .verdict-icon       { background: rgba(16, 232, 176, 0.1); }
.result-exposed .verdict-icon    { background: rgba(255, 179, 71, 0.1); }

/* Risk-class verdict icons (colored dot indicator) */
.verdict-icon--critical { background: rgba(255, 68, 68, 0.15); }
.verdict-icon--critical::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--risk-critical); box-shadow: 0 0 12px rgba(255,68,68,0.5); }
.verdict-icon--high { background: rgba(255, 107, 53, 0.12); }
.verdict-icon--high::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--risk-high); box-shadow: 0 0 8px rgba(255,107,53,0.35); }
.verdict-icon--medium { background: rgba(255, 179, 71, 0.12); }
.verdict-icon--medium::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--risk-medium); }
.verdict-icon--low { background: rgba(16, 232, 176, 0.1); }
.verdict-icon--low::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--risk-low); }
.verdict-icon--safe { background: rgba(16, 232, 176, 0.1); }
.verdict-icon--safe::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--risk-safe); }

.verdict-text { flex: 1; }

.result-label {
  display: block;
  margin-bottom: 2px;
}

.result-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.result-vulnerable .result-title { color: #ff8080; }
.result-safe .result-title       { color: var(--safe); }
.result-exposed .result-title    { color: var(--warning); }

/* Status pill */
.status-pill {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 53, 0.24);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.vulnerable {
  background: rgba(255, 68, 68, 0.14);
  color: #ff9090;
  border-color: rgba(255, 68, 68, 0.3);
}

.status-pill.safe {
  background: rgba(16, 232, 176, 0.1);
  color: var(--safe);
  border-color: rgba(16, 232, 176, 0.25);
}

.status-pill.exposed {
  background: rgba(255, 179, 71, 0.12);
  color: var(--warning);
  border-color: rgba(255, 179, 71, 0.28);
}

.status-pill.unsupported {
  background: rgba(168, 155, 140, 0.1);
  color: #c9bdb4;
  border-color: rgba(168, 155, 140, 0.2);
}

/* ─── Result Summary ──────────────────────────────────── */

.result-summary {
  margin: 0 0 20px;
  color: var(--text);
  line-height: 1.7;
  font-size: 0.97rem;
}

/* ─── Metrics Grid ────────────────────────────────────── */

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric {
  padding: 12px 14px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 107, 53, 0.08);
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  display: block;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
  color: var(--text);
}

/* ─── Result Notes ────────────────────────────────────── */

.result-notes {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 107, 53, 0.07);
}

/* ─── Section Divider ─────────────────────────────────── */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
  border: none;
}

/* ─── How It Works ────────────────────────────────────── */

.how-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
  max-width: 52ch;
}

.how-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.how-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.22);
  background: rgba(255, 107, 53, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.how-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.how-card:nth-child(2) { transition-delay: 100ms; }
.how-card:nth-child(3) { transition-delay: 200ms; }

.how-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 61, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-card-step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.how-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.how-card-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ─── Stats Bar ───────────────────────────────────────── */

.stats-section {
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 107, 53, 0.14);
  background: rgba(22, 14, 10, 0.8);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

/* ─── FAQ ─────────────────────────────────────────────── */

.faq-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: var(--radius-md);
  background: rgba(22, 14, 10, 0.7);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color 160ms ease;
  user-select: none;
}

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

.faq-item summary:hover { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 200ms ease, color 160ms ease;
}

.faq-item[open] summary { color: var(--accent); }
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-body {
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
}

.faq-body p { margin: 0; }
.faq-body p + p { margin-top: 10px; }

/* ─── Inner Pages ─────────────────────────────────────── */

.page-hero {
  width: min(720px, 100%);
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.page-sub {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.content-panel {
  padding: 32px 36px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.content-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-block h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.content-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.72;
  max-width: 72ch;
}

.content-block p + p {
  margin-top: 10px;
}

.content-divider {
  height: 1px;
  background: rgba(255, 107, 53, 0.1);
  border: none;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 107, 53, 0.2);
  background: rgba(15, 11, 9, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255, 107, 53, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 61, 0, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #5a4a3f;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.7;
  line-height: 1.5;
}

.btn-primary {
  align-self: flex-start;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  border: 0;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #1a0a02;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 61, 0, 0.32);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-info-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-info-value {
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-info-value a {
  color: var(--text);
  text-decoration: none;
  transition: color 160ms ease;
}

.contact-info-value a:hover {
  color: var(--accent);
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  margin-top: auto;
  padding: 28px 24px;
  border-top: 1px solid rgba(255, 107, 53, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-brand strong {
  color: var(--text);
  font-family: var(--font-display);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 160ms ease;
}

.footer-link:hover {
  color: var(--text);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: #6b5d53;
  max-width: 60ch;
  line-height: 1.55;
}

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-news-grid {
    grid-template-columns: 1fr;
  }

  .threat-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .news-drawer-shell {
    inset: 72px 16px 16px;
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    gap: 16px;
  }

  .news-context-panel,
  .news-drawer-panel {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: auto;
  }

  .news-context-panel {
    max-height: min(30vh, 280px);
  }

  .news-drawer-panel {
    max-height: calc(100vh - 104px);
  }

  .news-drawer.has-context .news-drawer-panel {
    max-height: 48vh;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 32px 16px 60px;
    gap: 48px;
  }

  .panel,
  .content-panel,
  .threat-panel {
    padding: 20px;
  }

  .field-row,
  .result-grid,
  .how-cards,
  .stats-section,
  .hero-news-grid {
    grid-template-columns: 1fr;
  }

  .hero-stack {
    gap: 18px;
  }

  .field-row button {
    width: 100%;
  }

  .result-verdict {
    flex-wrap: wrap;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .nav-links {
    display: none;
  }

  .mode-toggle {
    margin-left: auto;
  }

  .threat-panel {
    position: static;
    max-height: none;
  }

  .news-drawer-shell {
    inset: 72px 16px 16px;
    gap: 16px;
  }

  .news-context-panel,
  .news-drawer-panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .hero h1 {
    letter-spacing: -0.03em;
  }

  .site-nav {
    padding: 12px 16px;
  }

  .ticker-item {
    padding: 0 18px;
    font-size: 0.64rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   QC Dashboard Extensions
   ═══════════════════════════════════════════════════════════════ */

:root {
  --risk-critical: #ff4444;
  --risk-high: #ff6b35;
  --risk-medium: #ffb347;
  --risk-low: #10e8b0;
  --risk-safe: #4fe1b0;
}

/* ── Risk Badge ───────────────────────────────────────────────── */

.risk-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--risk-color, var(--risk-safe));
}
.risk-badge--critical { background: var(--risk-critical); animation: glow-pulse-danger 2.4s ease-in-out infinite; }
.risk-badge--high     { background: var(--risk-high); }
.risk-badge--medium   { background: var(--risk-medium); color: #1a1410; }
.risk-badge--low      { background: var(--risk-low); color: #0f0b09; }
.risk-badge--safe     { background: var(--risk-safe); color: #0f0b09; }

.risk-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ── Simple Mode Result ───────────────────────────────────────── */

.simple-result {
  text-align: center;
  padding: 1.5rem 0;
}

.simple-verdict {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.simple-verdict-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.simple-verdict-indicator--exposed {
  background: var(--risk-critical);
  box-shadow: 0 0 16px rgba(255, 68, 68, 0.5), 0 0 32px rgba(255, 68, 68, 0.2);
}

.simple-verdict-indicator--safe {
  background: var(--risk-safe);
  box-shadow: 0 0 12px rgba(79, 225, 176, 0.3);
}

.simple-verdict-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.simple-verdict-indicator--exposed + .simple-verdict-text { color: var(--risk-critical); }
.simple-verdict-indicator--safe + .simple-verdict-text { color: var(--risk-safe); }

.simple-amount {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 0.75rem;
}

.simple-explanation {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.simple-address {
  margin: 0.75rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Example Helper Box ──────────────────────────────────────── */

.example-helper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.82rem;
  color: var(--muted);
}

.example-helper code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(255, 107, 53, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  cursor: pointer;
  word-break: break-all;
}

.example-helper code:hover {
  background: rgba(255, 107, 53, 0.15);
}

/* ── V2 Result Card ───────────────────────────────────────────── */

.result-v2-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 107, 53, 0.12);
}

.result-v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.v2-metric {
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 53, 0.08);
}

.v2-metric-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.v2-metric-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.attack-modes { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }

.attack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 107, 53, 0.12);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 53, 0.18);
}
.attack-chip--at_rest   { background: rgba(255, 68, 68, 0.12); color: #ff6666; border-color: rgba(255,68,68,0.18); }
.attack-chip--on_spend  { background: rgba(255, 179, 71, 0.12); color: #ffb347; border-color: rgba(255,179,71,0.18); }
.attack-chip--on_setup  { background: rgba(16, 232, 176, 0.12); color: #10e8b0; border-color: rgba(16,232,176,0.18); }

/* ── Dashboard Stats Bar ──────────────────────────────────────── */

.stats-live {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 107, 53, 0.06);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.22);
  margin: 2rem 0;
}

.stat-card { text-align: center; padding: 1rem; }

.stat-card-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: "Space Grotesk", var(--body);
  color: var(--text);
  line-height: 1.1;
}
.stat-card-value.stat-danger { color: var(--risk-critical); }
.stat-card-value.stat-accent { color: var(--accent); }

.stat-updated {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 0.25rem;
}

.stat-card-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
}

/* ── Leaderboard Table ────────────────────────────────────────── */

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.leaderboard-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
  cursor: pointer;
  user-select: none;
}
.leaderboard-table thead th:hover { color: var(--accent); }
.leaderboard-table thead th.sorted-asc::after  { content: " ↑"; }
.leaderboard-table thead th.sorted-desc::after { content: " ↓"; }

.leaderboard-table tbody tr { transition: background 0.15s ease; }
.leaderboard-table tbody tr:hover { background: rgba(255, 107, 53, 0.05); cursor: pointer; }

.leaderboard-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.leaderboard-table .col-rank { width: 3rem; text-align: center; color: var(--muted); font-weight: 600; }
.leaderboard-table .col-address { font-family: "SFMono-Regular", "Cascadia Code", monospace; font-size: 0.82rem; }
.leaderboard-table .col-tvl { text-align: right; font-weight: 600; }

/* ── Protocol Scorecard Grid ──────────────────────────────────── */

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.protocol-card {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.10);
  transition: border-color 0.2s ease;
}
.protocol-card:hover { border-color: rgba(255, 107, 53, 0.25); }

.protocol-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.protocol-card-name { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.protocol-card-chain { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.readiness-badge {
  display: inline-flex;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.readiness-badge--resistant  { background: rgba(16,232,176,0.15); color: #10e8b0; }
.readiness-badge--migrating  { background: rgba(96,165,250,0.15); color: #60a5fa; }
.readiness-badge--vulnerable { background: rgba(255,107,53,0.15);  color: #ff6b35; }
.readiness-badge--critical   { background: rgba(255,68,68,0.15);   color: #ff4444; }
.readiness-badge--unknown    { background: rgba(168,155,140,0.15); color: #a89b8c; }

.primitive-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.5rem; }
.primitive-chip {
  padding: 0.15em 0.5em;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* ── Protocol Page: Simple Mode (Report Card) ────────────────── */

.proto-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.10);
  margin-bottom: 1.5rem;
}

.proto-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.proto-stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--text);
}
.proto-stat--danger   { color: var(--danger); }
.proto-stat--migrating { color: #60a5fa; }
.proto-stat--safe     { color: var(--safe); }

.proto-stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.3;
}

.proto-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.proto-bucket {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease;
}
.proto-bucket:hover { border-color: rgba(255, 255, 255, 0.12); }

.proto-bucket--resistant  { border-color: rgba(16, 232, 176, 0.20); }
.proto-bucket--migrating  { border-color: rgba(96, 165, 250, 0.20); }
.proto-bucket--vulnerable { border-color: rgba(255, 107, 53, 0.20); }
.proto-bucket--critical   { border-color: rgba(255, 68, 68, 0.20); }
.proto-bucket--unknown    { border-color: rgba(168, 155, 140, 0.12); }

.proto-bucket--resistant:hover  { border-color: rgba(16, 232, 176, 0.35); }
.proto-bucket--migrating:hover  { border-color: rgba(96, 165, 250, 0.35); }
.proto-bucket--vulnerable:hover { border-color: rgba(255, 107, 53, 0.35); }
.proto-bucket--critical:hover   { border-color: rgba(255, 68, 68, 0.35); }

.proto-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.proto-bucket-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

.proto-bucket-stats {
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.proto-bucket-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.proto-bucket-tvl {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.proto-bucket-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.proto-bucket-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}
.proto-bucket-item:hover { background: rgba(255, 255, 255, 0.05); }

.proto-bucket-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.proto-bucket-item-tvl {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.proto-bucket-more {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  font-style: italic;
}

/* ── Protocol Page: Quant Mode (Filter Bar) ──────────────────── */

.proto-filter-bar {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.10);
  margin-bottom: 1rem;
}

.proto-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.proto-filter-group--search { flex: 1; min-width: 180px; }

.proto-filter-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.proto-filter-select,
.proto-filter-input {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
}
.proto-filter-select:focus,
.proto-filter-input:focus {
  border-color: rgba(255, 107, 53, 0.35);
}

.proto-filter-select option { background: var(--bg); color: var(--text); }

/* ── Protocol Page: Quant Mode (Table) ───────────────────────── */

.proto-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.10);
}

.proto-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

.proto-table thead th {
  position: sticky;
  top: 0;
  background: rgba(15, 11, 9, 0.98);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 107, 53, 0.15);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.proto-table thead th:hover { color: var(--accent); }
.proto-table thead th.sorted-asc::after  { content: " \2191"; }
.proto-table thead th.sorted-desc::after { content: " \2193"; }
.proto-table thead th.col-right { text-align: right; }

.proto-table tbody tr.proto-table-row {
  transition: background 0.15s ease;
  cursor: pointer;
}
.proto-table tbody tr.proto-table-row:hover { background: rgba(255, 107, 53, 0.04); }
.proto-table tbody tr.proto-table-row--expanded { background: rgba(255, 107, 53, 0.06); }

.proto-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
  vertical-align: middle;
}
.proto-table td.col-right { text-align: right; font-weight: 600; }

.proto-table-name { font-weight: 600; }
.proto-table-chain {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.proto-table-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Protocol Detail Row (expanded) ──────────────────────────── */

.proto-detail-row td {
  padding: 0;
  border-bottom: 1px solid rgba(255, 107, 53, 0.10);
}

.proto-detail {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.015);
}

.proto-detail-field {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.proto-detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  min-width: 140px;
  flex-shrink: 0;
  font-weight: 600;
}

.proto-detail-value {
  font-size: 0.85rem;
  color: var(--text);
}
.proto-detail-value.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
}

/* ── Network Map Layout ────────────────────────────────────���──── */

.map-page {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

.map-canvas-container { flex: 1; position: relative; overflow: hidden; }
.map-canvas-container canvas { display: block; width: 100%; height: 100%; }

.map-sidebar {
  width: 320px;
  padding: 1.2rem;
  background: rgba(15, 11, 9, 0.95);
  border-left: 1px solid rgba(255, 107, 53, 0.12);
  overflow-y: auto;
  flex-shrink: 0;
}

.map-sidebar-section { margin-bottom: 1.5rem; }
.map-sidebar-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.75rem; }
.map-view-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.map-view-tab { flex: 1; padding: 0.4rem 0.6rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,107,53,0.15); border-radius: 6px; color: var(--muted); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.map-view-tab:hover { border-color: rgba(255,107,53,0.35); color: var(--text); }
.map-view-tab--active { background: rgba(255,107,53,0.12); border-color: rgba(255,107,53,0.5); color: var(--accent); }

.map-filter-group { display: flex; flex-direction: column; gap: 0.5rem; }
.map-filter-checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text); cursor: pointer; }
.map-filter-checkbox input[type="checkbox"] { accent-color: var(--accent); }

.map-range-slider { width: 100%; accent-color: var(--accent); }

.map-tooltip {
  position: fixed;
  padding: 0.6rem 0.9rem;
  background: rgba(15, 11, 9, 0.95);
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text);
  pointer-events: none;
  z-index: 1000;
  max-width: 280px;
  backdrop-filter: blur(8px);
}

.map-legend { display: flex; flex-direction: column; gap: 0.4rem; }
.map-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text); }

.edge-line { display: inline-block; width: 18px; height: 3px; border-radius: 1px; }
.edge-line--collateral { background: rgba(255,179,71,0.7); }
.edge-line--governance { background: rgba(255,107,53,0.7); background-image: repeating-linear-gradient(90deg, transparent 0 4px, rgba(15,11,9,1) 4px 6px); }
.edge-line--bridge { background: rgba(96,165,250,0.7); background-image: repeating-linear-gradient(90deg, transparent 0 2px, rgba(15,11,9,1) 2px 4px); }
.edge-line--oracle { background: rgba(255,215,0,0.7); height: 4px; }
.edge-line--lst { background: rgba(160,120,255,0.7); background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(15,11,9,1) 6px 8px, transparent 8px 10px, rgba(15,11,9,1) 10px 12px); }
.edge-line--liquidity { background: rgba(16,232,176,0.7); }
.edge-line--controls { background: rgba(255,107,53,0.6); }

.map-tooltip-address { font-family: "SFMono-Regular", "Cascadia Code", monospace; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.3rem; }
.map-tooltip-label { font-weight: 700; margin-bottom: 0.2rem; }
.map-tooltip-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.78rem; }

/* ── Skeleton Loading ─────────────────────────────────────────── */

.skeleton-pulse {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent !important;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Page Header ──────────────────────────────────────────────── */

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 107, 53, 0.10);
}
.page-header .page-title {
  font-size: 2rem;
  font-weight: 800;
  font-family: "Space Grotesk", var(--body);
  color: var(--text);
  margin-bottom: 0.3rem;
}
.page-header .page-subtitle { font-size: 0.92rem; color: var(--muted); }

/* ── View on Map Link ─────────────────────────────────────────── */

.view-on-map {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.view-on-map:hover { opacity: 1; }

/* ── Responsive: Dashboard Extensions ─────────────────────────── */

@media (max-width: 760px) {
  .map-page { flex-direction: column; height: auto; }
  .map-canvas-container { height: 60vh; min-height: 400px; }
  .map-sidebar { width: 100%; border-left: none; border-top: 1px solid rgba(255, 107, 53, 0.12); max-height: 40vh; }
  .stats-live { grid-template-columns: repeat(2, 1fr); }
  .protocol-grid { grid-template-columns: 1fr; }
  .proto-summary-bar { grid-template-columns: repeat(2, 1fr); }
  .proto-buckets { grid-template-columns: 1fr; }
  .proto-filter-bar { flex-direction: column; align-items: stretch; }
  .proto-detail-field { flex-direction: column; gap: 0.25rem; }
  .proto-detail-label { min-width: auto; }
}

@media (max-width: 520px) {
  .stats-live { grid-template-columns: 1fr; }
  .result-v2-grid { grid-template-columns: 1fr 1fr; }
  .proto-summary-bar { grid-template-columns: 1fr; }
}

/* ── Print stylesheet ────────────────────────────── */
@media print {
  body { background: #fff !important; color: #111 !important; }
  .ticker-bar, .site-nav, .mode-toggle, #network-canvas,
  .news-drawer, .threat-panel, canvas, .nav-logo svg,
  .site-footer { display: none !important; }
  .page-shell, .app, main { background: transparent !important; }
  .panel, .result-card, .stat-card, .content-panel,
  .content-block, .stats-live {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  .stat-card-value, .stat-card-label, h1, h2, h3, p, li, span {
    color: #111 !important;
  }
  a { color: #0066cc !important; text-decoration: underline !important; }
  .risk-badge { border: 1px solid currentColor !important; }
  .leaderboard-table th, .leaderboard-table td {
    background: #fff !important; color: #111 !important;
    border-bottom: 1px solid #ccc !important;
  }
}

.skip-link { position: absolute; top: -100px; left: 0; background: var(--accent); color: #fff; padding: 0.5rem 1.25rem; z-index: 10000; font-size: 0.9rem; font-weight: 600; border-radius: 0 0 8px 0; text-decoration: none; transition: top 0.15s ease; }
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media print { body { background: #fff !important; color: #000 !important; } .ticker-bar, #network-canvas, .nav-flame, .mode-toggle, .eyebrow, .ambient-bg, .map-canvas-container { display: none !important; } .site-nav { background: none !important; border-bottom: 1px solid #ccc; } .nav-link, .nav-wordmark, .nav-wordmark span { color: #000 !important; } .result-card, .panel, .stat-card, .how-card { background: #fff !important; border: 1px solid #ccc !important; color: #000 !important; } .risk-badge { border: 1px solid currentColor !important; } a { color: #000 !important; text-decoration: underline !important; } .stat-card-value, .stat-card-label, h1, h2, h3, p, span { color: #000 !important; } }

.map-user-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: var(--muted);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 10;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}
