/* ─── RESET & VARIABLES ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── v01 design tokens (canonical names, same values as /assets/style.css) ── */
  --bg-0:         #0a0e1a;
  --bg-1:         #0f1424;
  --bg-2:         #161c30;
  --border:       #232a42;
  --border-strong:#2f3853;
  --text:         #ffffff;
  --text-dim:     #a4acc4;
  --text-mute:    #6b7391;
  --red:          #ff4757;
  --red-hover:    #ff5a68;
  --red-glow:     rgba(255,71,87,0.35);
  --red-soft:     rgba(255,71,87,0.12);
  --green:        #2ed573;
  --mono:         "SF Mono", Menlo, ui-monospace, "Cascadia Code", Consolas, monospace;

  /* ── Legacy aliases ──
     The app screens (and their inline <style> blocks) were written against the
     old variable names. Rather than touch every rule, the old names now point
     at the v01 values, so the whole logged-in app inherits the new palette.
     Prefer the canonical names above in new CSS. */
  --bg:       var(--bg-0);
  --bg2:      var(--bg-1);
  --bg3:      var(--bg-2);
  --surface:  #1c2440;
  --green2:   #5fe08a;
  /* The purple and orange aliases both meant "the accent" in the old palette;
     v01 has exactly one accent, so they all resolve to --red. */
  --orange:   var(--red);
  --orange2:  var(--red-hover);
  --purple:   var(--red);
  --purple2:  var(--red-hover);
  --purple3:  #ffffff;
  --red2:     #ff6b78;
  --yellow:   #ffb020;
  /* v01 has no cyan; its terminal path colour doubles as the info/link tone. */
  --cyan:     #7dd3fc;
  --text2:    var(--text-dim);
  --text3:    var(--text-mute);
  --glow-p:   0 4px 18px var(--red-glow);
  --glow-g:   0 0 18px rgba(46,213,115,0.22);
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient backdrop — the same radar pulse + faint grid the public pages use,
   so signing in doesn't change the feel of the page underneath. */
body::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -60%);
  background: radial-gradient(circle,
    rgba(255,71,87,0.08) 0%,
    rgba(255,71,87,0.03) 30%,
    transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-pulse 6s ease-in-out infinite;
}
@keyframes ambient-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -60%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -60%) scale(1.05); }
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

.hidden { display: none !important; }

/* ─── LANDING PAGE ─── */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

.landing-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(255,71,87,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(255,90,104,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.landing-header {
  text-align: center;
  margin-bottom: 3rem;
  z-index: 1;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.accent { color: var(--purple2); }

.tagline {
  color: var(--text2);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.landing-main { z-index: 1; width: 100%; max-width: 600px; padding: 0 1rem; }

.scan-input-group {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--glow-p);
  border: 1px solid var(--border-strong);
  transition: border-color 0.15s;
}
.scan-input-group:focus-within { border-color: var(--red); }

.scan-input-group input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  background: var(--bg-2);
  border: none;
  color: var(--text);
  outline: none;
}

.scan-input-group input::placeholder { color: var(--text3); }

.scan-input-group select {
  padding: 1rem 1rem;
  font-size: 0.95rem;
  background: var(--bg3);
  color: var(--text2);
  border: none;
  border-left: 1px solid var(--border);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  min-width: 130px;
}

.scan-input-group select:hover { background-color: var(--surface); }
.scan-input-group select:focus { color: var(--text); }

.scan-input-group button {
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scan-input-group button:hover { background: var(--red-hover); }
.scan-input-group button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-loader {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.profile-hint {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text3);
  letter-spacing: 0.3px;
}

.error-text {
  color: var(--red);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.landing-footer {
  position: fixed;
  bottom: 1.5rem;
  color: var(--text3);
  font-size: 0.85rem;
}

/* ─── SCAN PAGE ─── */
.scan-page {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Left 2/3: Dashboard */
.scan-dashboard {
  flex: 2;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  overflow-y: auto;
}

.scan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.scan-domain {
  font-size: 1.3rem;
  color: var(--text);
}

.scan-domain span { color: var(--purple2); }

.scan-domain .scanning-pulse {
  animation: text-pulse 2s ease infinite;
}
@keyframes text-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.overall-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-bar-container {
  width: 200px;
  height: 6px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  border-radius: 4px;
  transition: width 0.4s linear;
}

.progress-pct {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--mono);
  min-width: 48px;
  text-align: right;
}

/* Radar container */
.radar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  min-height: 400px;
  position: relative;
}
/* Backdrop glow so the radar feels anchored on the navy page instead of
   floating in a void (was the main complaint after the color refresh). */
.radar-container::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255,71,87,0.10) 0%,
    rgba(255,71,87,0.04) 35%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

.radar-canvas {
  width: 380px;
  height: 380px;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(255, 71, 87, 0.15),
    0 0 80px rgba(255, 71, 87, 0.08);
}

/* Score display (appears when scan completes) */
.score-display {
  position: absolute;
  text-align: center;
  animation: score-reveal 0.8s ease;
}
@keyframes score-reveal {
  0% { opacity: 0; transform: scale(0.5); }
  60% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

.score-value {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple2), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-grade {
  font-size: 1.5rem;
  color: var(--text2);
}

/* Speedometer gauge */
.speedometer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  min-height: 280px;
  animation: speedo-reveal 0.6s ease;
}
@keyframes speedo-reveal {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
.speedometer-svg {
  width: 360px;
  max-width: 100%;
  height: auto;
  overflow: visible;
}
.speedo-grade {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.speedo-score {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.speedo-score-num {
  font-size: 1.4rem;
  font-weight: 700;
}
.speedo-needle {
  will-change: transform;
}

/* Category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.category-card {
  background: rgba(10,14,26,0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s, background 0.3s;
}
.category-card:hover { transform: translateY(-2px); border-color: var(--purple2); }
.category-card:focus { outline: 2px solid var(--purple2); outline-offset: 2px; }
.category-card.completed {
  animation: card-complete 0.5s ease;
}
@keyframes card-complete {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

/* A finished card is tinted by what it found, not merely by having finished —
   same neg / warn / ok language as the category chips on the public site.
   `.completed` alone stays neutral as the fallback. */
.category-card.completed { border-color: var(--border-strong); }
.category-card.completed:has(.score-good) {
  border-color: rgba(46,213,115,.35); background: rgba(46,213,115,.06);
}
.category-card.completed:has(.score-medium) {
  border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.07);
}
.category-card.completed:has(.score-bad),
.category-card.completed:has(.score-critical) {
  border-color: rgba(255,71,87,.4); background: rgba(255,71,87,.07);
}
.category-card.scanning { border-color: var(--red); animation: pulse-border 1.5s ease infinite; }
.category-card.timed-out {
  border-color: rgba(255,176,32,.4);
  background: rgba(255,176,32,.07);
  opacity: 0.75;
}
.cat-score.score-timeout { color: var(--yellow); font-size: 0.9rem; }

@keyframes pulse-border {
  0%, 100% { border-color: var(--border); }
  50% { border-color: var(--purple2); }
}

.cat-name {
  font-size: 0.7rem;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.cat-score {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--mono);
}

.cat-score.score-good { color: var(--green); }
.cat-score.score-medium { color: var(--yellow); }
.cat-score.score-bad { color: var(--orange); }
.cat-score.score-critical { color: var(--red); }
.cat-score.score-pending { color: var(--text3); }

/* Findings panel */
.findings-panel {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.fp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.fp-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple3);
}
.fp-stats {
  display: flex;
  gap: 0.75rem;
}
.fp-stat {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--text2);
}
.fp-stat.fp-pass { background: rgba(46,213,115,0.15); color: var(--green); }
.fp-stat.fp-critical { background: rgba(255,71,87,0.15); color: var(--red); }
.fp-list {
  max-height: 600px;
  overflow-y: auto;
}
.fp-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.82rem;
}
.fp-row:last-child { border-bottom: none; }
.fp-row.fp-pass .fp-row-title { color: var(--green); }
.fp-divider {
  padding: 0.6rem 1.25rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green);
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}
.fp-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  min-width: 55px;
  text-align: center;
  flex-shrink: 0;
}
.fp-badge.fp-critical { background: rgba(255,71,87,0.15); color: #ff6b78; }
.fp-badge.fp-high { background: rgba(255,90,104,0.15); color: var(--orange); }
.fp-badge.fp-medium { background: rgba(255,176,32,0.15); color: var(--yellow); }
.fp-badge.fp-low { background: rgba(107,115,145,0.15); color: var(--text2); }
.fp-badge.fp-info { background: rgba(125,211,252,0.15); color: var(--cyan); }
.fp-badge.fp-pass { background: rgba(46,213,115,0.15); color: var(--green); }
.fp-row-title { color: var(--text); }

/* Findings: category sections */
.fp-category-section {
  border-bottom: 1px solid var(--border);
}
.fp-category-section:last-child { border-bottom: none; }
.fp-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: var(--bg3);
}
.fp-cat-name {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple3);
}
.fp-cat-score {
  font-size: 0.85rem;
  font-weight: 700;
}
.fp-cat-findings { }

/* Expandable finding rows */
.fp-clickable { cursor: pointer; }
.fp-clickable:hover { background: rgba(255,71,87,0.06); }
.fp-expand-icon {
  margin-left: auto;
  font-size: 0.55rem;
  color: var(--text3);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.fp-expanded .fp-expand-icon { transform: rotate(180deg); }

/* Finding detail (expandable) */
.fp-detail {
  padding: 0.6rem 1.25rem 0.6rem 4.5rem;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  animation: fp-detail-reveal 0.2s ease;
}
@keyframes fp-detail-reveal {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}
.fp-description {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}
.fp-details-kv {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fp-kv-row {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
}
.fp-kv-key {
  color: var(--cyan);
  font-weight: 600;
  min-width: 100px;
  flex-shrink: 0;
}
.fp-kv-val {
  color: var(--text2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Tag list for arrays of primitives */
.fp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  white-space: normal;
}
.fp-tag {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.4;
}

/* Mini table for arrays of objects */
.fp-mini-table-wrap {
  white-space: normal;
  width: 100%;
}
.fp-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}
.fp-mini-table thead th {
  text-align: left;
  padding: 0.3rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple3);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.fp-mini-table tbody td {
  padding: 0.3rem 0.5rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.fp-mini-table tbody tr:hover {
  background: rgba(255,71,87,0.06);
}
.fp-overflow {
  font-size: 0.7rem;
  color: var(--text3);
  padding: 0.3rem 0;
  font-style: italic;
}

/* Nested key-value for plain objects */
.fp-nested-kv {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  white-space: normal;
}
.fp-nested-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
}
.fp-nested-key {
  color: var(--text3);
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
}
.fp-nested-key::after { content: ':'; }
.fp-nested-val {
  color: var(--text2);
  word-break: break-word;
}

.fp-recommendation {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: rgba(46, 213, 115, 0.08);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
}
.fp-rec-label {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
}

/* Identity & Data Leak table */
.fp-leak-table-wrap {
  padding: 0.5rem 1.25rem;
}
.fp-leak-table-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}
.fp-leak-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.fp-leak-table thead th {
  text-align: left;
  padding: 0.45rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple3);
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.fp-leak-table tbody td {
  padding: 0.45rem 0.6rem;
  color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.fp-leak-table tbody tr:hover {
  background: rgba(255,71,87,0.06);
}
.fp-leak-table tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

/* Stealer-sale: collapsible per-subdomain group inside the findings panel */
.fp-sale-group {
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
}
.fp-sale-group[open] { background: rgba(255,255,255,0.03); }
.fp-sale-group-summary {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  list-style: none;
  user-select: none;
}
.fp-sale-group-summary::-webkit-details-marker { display: none; }
.fp-sale-group-summary::before {
  content: "▸";
  color: var(--text3);
  font-size: 0.72rem;
  width: 0.8em;
  display: inline-block;
  transition: transform 0.15s ease;
}
.fp-sale-group[open] > .fp-sale-group-summary::before { transform: rotate(90deg); }
.fp-sale-group-summary .fp-sale-sd {
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
}
.fp-sale-group-summary .fp-sale-meta {
  color: var(--text3);
  font-size: 0.72rem;
}
.fp-sale-group > .fp-leak-table {
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* Headline metric cards (SOCRadar reference style): show counts at the top
   of Dark Web and Identity sections as big numbers + small label cards. */
.fp-metric-grid {
  display: grid;
  /* 130px min so 7 cards (Dark Web after CEO May review) fit on a single
     row at typical desktop widths. Gracefully wraps to fewer columns
     below ~950px content width; orphan rows centre via justify-content. */
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem 1rem 1rem 1rem;
}
.fp-metric-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}
.fp-metric-card:hover { transform: translateY(-1px); }
.fp-metric-count {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.fp-metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
  line-height: 1.3;
}
.fp-metric-bad .fp-metric-count { color: var(--purple); }
.fp-metric-bad { border-color: var(--purple); }
.fp-metric-good .fp-metric-count { color: var(--green); }

/* Cross-reference note between related categories (e.g. Dark Web → Identity) */
.fp-xref-note {
  margin: 0.75rem 1rem 0.25rem 1rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255,71,87,0.06);
  border-left: 2px solid var(--purple);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--text2);
  font-style: italic;
}
.fp-xref-note a {
  color: var(--purple2);
  text-decoration: none;
  font-weight: 600;
}
.fp-xref-note a:hover { text-decoration: underline; }

/* Redacted state for public/unauthenticated users */
.fp-redacted-banner {
  padding: 0.6rem 1.25rem;
  background: rgba(255,71,87,0.08);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text2);
  text-align: center;
}
.fp-redacted-banner a {
  color: var(--purple2);
  text-decoration: underline;
  margin-left: 0.25rem;
}
.fp-redacted-banner a:hover { color: var(--purple3); }
.fp-redacted-list { position: relative; }
.fp-redacted-list::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg2));
  pointer-events: none;
}
.fp-blurred {
  filter: blur(3px);
  user-select: none;
}
.fp-redacted-detail { opacity: 0.5; }

/* Right 1/3: Terminal */
.scan-terminal {
  flex: 1;
  background: #05070d;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(15,20,36,0.7);
  border-bottom: 1px solid var(--border);
  color: var(--text-mute);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.terminal-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.5s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.term-line { margin-bottom: 2px; white-space: pre-wrap; word-break: break-all; }
.term-line.cmd { color: #7dd3fc; }
.term-line.cmd::before { content: ""; }
.term-line.output { color: #8fe3a3; }
.term-line.success { color: var(--green2); }
.term-line.error { color: #ff6b78; }
.term-line.info { color: var(--text-dim); }

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  animation: cursor 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .scan-page { flex-direction: column; }
  .scan-terminal {
    flex: none;
    height: 35vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
