@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --black:      #09090b;
  --gray-950:   #0f0f11;
  --gray-900:   #18181b;
  --gray-800:   #27272a;
  --gray-700:   #3f3f46;
  --gray-600:   #52525b;
  --gray-500:   #71717a;
  --gray-400:   #a1a1aa;
  --gray-300:   #d4d4d8;
  --gray-100:   #f4f4f5;
  --white:      #fafafa;
  --bg: #0A0A0A;
  --s1: #111111;
  --s2: #1a1a24;
  --text: #f5f5f7;
  --brd: rgba(255,255,255,0.08);
  /* Theme matching DeadSwap Pro */
  --rose: #a855f7;
  --blue: #c084fc;
  --cyan: #38bdf8;
  --amber: #fbbf24;
  --green: #34d399;
  --purple: #d8b4fe;
  --purple-dim: rgba(168,85,247,0.08);
  --purple-b:   rgba(168,85,247,0.2);
  --s0: var(--black);
  --brd:    rgba(255,255,255,0.06);
  --brd-h:  rgba(255,255,255,0.12);
  --r: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--s0);
  color: var(--gray-300);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
::selection { background: rgba(244,63,94,0.25); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--gray-800); border-radius: 100px; }

/* ═══ LAYOUT ═══ */
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ═══ NAV ═══ */
.nav {
  position: sticky; top: 0; z-index: 100; height: 48px;
  display: flex; align-items: center;
  background: rgba(9,9,11,0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--brd);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.875rem; color: #fff; }
.nav-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--rose); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 2px; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: 0.8125rem; font-weight: 500;
  font-family: inherit; border: 1px solid var(--brd);
  border-radius: var(--r); background: transparent; color: var(--gray-400);
  cursor: pointer; transition: all 0.2s var(--ease); outline: none; white-space: nowrap;
}
.btn:hover { color: var(--white); border-color: var(--brd-h); background: var(--s2); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--white); color: var(--black); border-color: transparent; font-weight: 600; }
.btn-primary:hover { background: var(--gray-100); color: var(--black); }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.btn-ghost { border: none; padding: 6px 8px; }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; }
.btn-rose { background: var(--rose); color: #fff; border: none; }
.btn-rose:hover { background: #e11d48; color: #fff; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--s2); color: var(--text); font-size: 0.6875rem; font-weight: 500; }
.badge-depth { background: var(--blue); color: #fff; }

.pivot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.pivot-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* ═══ FORM ═══ */
.search-panel { margin-top: 32px; margin-bottom: 24px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title { font-size: 0.8125rem; font-weight: 500; color: var(--gray-500); display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.field-grid .span-3 { grid-column: 1 / -1; }
.field-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid .span-3 { grid-column: 1 / -1; }
  .field-grid .span-2 { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .span-3, .field-grid .span-2 { grid-column: auto; }
}

.field-label { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--gray-600); margin-bottom: 4px; letter-spacing: 0.02em; }
.field-input {
  width: 100%; padding: 8px 10px; font-size: 0.8125rem;
  font-family: 'JetBrains Mono', monospace; color: var(--white);
  background: var(--s1); border: 1px solid var(--brd); border-radius: 6px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input::placeholder { color: var(--gray-700); }
.field-input:focus { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(244,63,94,0.08); }
.field-input.has-value { border-color: var(--gray-600); }

.form-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--brd); }
.field-count { font-size: 0.6875rem; color: var(--gray-600); font-family: 'JetBrains Mono', monospace; }
.field-count b { color: var(--rose); }

/* Deep toggle */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle { position: relative; width: 36px; height: 20px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 100px;
  background: var(--gray-800); border: 1px solid var(--brd);
  transition: background 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--rose); border-color: var(--rose); }
.toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--white); transition: transform 0.2s var(--ease);
}
.toggle input:checked ~ .toggle-knob { transform: translateX(16px); }
.toggle-label { font-size: 0.75rem; color: var(--gray-500); font-weight: 500; }

/* ═══ SCANNING ═══ */
.scan-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(9,9,11,0.94); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.scan-head { width: min(620px, 86vw); display: flex; align-items: center; justify-content: space-between; }
.scan-pill {
  font-size: 0.625rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--purple);
  border: 1px solid var(--brd-h);
  border-radius: 999px;
  padding: 4px 8px;
}
.scan-cancel-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--brd);
  background: var(--s1);
  color: var(--gray-400);
  font-size: 0.6875rem;
  cursor: pointer;
}
.scan-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-spinner { width: 32px; height: 32px; border: 2px solid var(--gray-800); border-top-color: var(--rose); border-radius: 50%; animation: spin 0.7s linear infinite; }
.scan-label { font-size: 0.875rem; color: var(--gray-400); font-weight: 500; }
.scan-sub { font-size: 0.6875rem; color: var(--gray-600); font-family: 'JetBrains Mono', monospace; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.scan-sub::after { content: "▋"; animation: blink 1s step-end infinite; color: var(--rose); margin-left: 2px; }
.scan-steps {
  width: min(620px, 86vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.scan-step {
  border: 1px solid var(--brd);
  border-radius: 8px;
  font-size: 0.625rem;
  color: var(--gray-600);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.scan-step i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-700); display: inline-block; }
.scan-step.on { border-color: var(--purple); color: var(--purple); }
.scan-step.on i { background: var(--purple); }
.scan-step.done { border-color: rgba(34,197,94,0.45); color: var(--green); }
.scan-step.done i { background: var(--green); }
.scan-bar-t { width: min(620px, 86vw); height: 4px; background: var(--gray-800); border-radius: 100px; overflow: hidden; margin-top: 4px; }
.scan-bar-f { width: 0%; height: 100%; background: var(--rose); border-radius: 100px; transition: width .35s var(--ease); }
.scan-meta {
  width: min(620px, 86vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.625rem;
  color: var(--gray-500);
  font-family: 'JetBrains Mono', monospace;
}

/* Cross-check log during scan */
.scan-log {
  margin-top: 6px;
  text-align: left;
  width: min(620px, 86vw);
  max-height: 132px;
  overflow: hidden;
}
.scan-log-item {
  font-size: 0.6875rem; font-family: 'JetBrains Mono', monospace;
  color: var(--gray-600); padding: 2px 0;
  animation: fadeIn 0.3s ease both;
}
.scan-log-item .chk { color: var(--green); margin-right: 4px; }
.scan-log-item.err .chk { color: var(--rose); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ TABS ═══ */
.view-tabs { display: flex; gap: 2px; background: var(--s1); border: 1px solid var(--brd); border-radius: var(--r); padding: 3px; width: fit-content; }
.view-tab {
  padding: 5px 14px; font-size: 0.75rem; font-weight: 500;
  border-radius: 6px; border: none; background: transparent;
  color: var(--gray-500); cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.view-tab:hover { color: var(--gray-300); }
.view-tab.on { background: var(--s2); color: var(--white); }

/* ═══ STATS ═══ */
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin-bottom: 20px; }
.stat-box { padding: 12px 14px; background: var(--s1); border: 1px solid var(--brd); border-radius: var(--r); }
.stat-val { font-size: 1.375rem; font-weight: 700; color: var(--white); font-family: 'JetBrains Mono', monospace; letter-spacing: -0.03em; }
.stat-val.danger { color: var(--rose); }
.stat-val.info { color: var(--blue); }
.stat-val.warn { color: var(--amber); }
.stat-val.good { color: var(--green); }
.stat-label { font-size: 0.625rem; color: var(--gray-600); margin-top: 2px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

/* ═══ GRAPH ═══ */
.graph-container {
  position: relative;
  width: 100%;
  height: 500px;
  background: var(--s1);
  border: 1px solid var(--brd);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}

/* Dot grid background */
.graph-container::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--gray-800) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
  pointer-events: none;
}

.graph-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.graph-edge { stroke: var(--gray-700); stroke-width: 1; opacity: 0.4; transition: opacity 0.2s, stroke 0.2s; }
.graph-edge.highlight { opacity: 0.9; stroke-width: 1.5; }
.graph-edge.edge-rose { stroke: var(--rose); }
.graph-edge.edge-blue { stroke: var(--blue); }

@keyframes node-pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.graph-node { cursor: pointer; animation: node-pop 0.3s var(--ease) both; }
.graph-node circle { transition: r 0.2s var(--ease), stroke-width 0.2s; }
.graph-node:hover circle { stroke-width: 2.5; }
.graph-node text { font-family: 'JetBrains Mono', monospace; font-size: 9px; fill: var(--gray-400); pointer-events: none; }
.graph-node.active circle { stroke-width: 3; }
.graph-node.dimmed { opacity: 0.15; }

/* Node type colors */
.n-email circle    { fill: var(--blue-dim);   stroke: var(--blue);   }
.n-username circle { fill: var(--amber-dim);  stroke: var(--amber);  }
.n-name circle     { fill: var(--cyan-dim);   stroke: var(--cyan);   }
.n-ip circle       { fill: var(--green-dim);  stroke: var(--green);  }
.n-password circle { fill: var(--rose-dim);   stroke: var(--rose);   }
.n-phone circle    { fill: var(--purple-dim); stroke: var(--purple); }
.n-location circle { fill: rgba(251,191,36,0.08); stroke: #fbbf24; }
.n-social circle   { fill: rgba(244,114,182,0.08); stroke: #f472b6; }

/* Graph legend */
.graph-legend {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: rgba(9,9,11,0.85);
  border-radius: 6px; border: 1px solid var(--brd);
}
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.625rem; color: var(--gray-500); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Graph tooltip */
.graph-tooltip {
  position: absolute; z-index: 10;
  padding: 8px 12px; background: var(--s2); border: 1px solid var(--brd-h);
  border-radius: 6px; font-size: 0.75rem; color: var(--white);
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
  max-width: 260px; word-break: break-all;
  font-family: 'JetBrains Mono', monospace;
}
.graph-tooltip.vis { opacity: 1; }
.graph-tooltip .tt-type { font-size: 0.5625rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; font-family: 'Inter', sans-serif; font-weight: 600; }

/* Cross-check chain */
.chain-section { margin-bottom: 20px; }
.chain-title { font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.chain-steps { position: relative; padding-left: 20px; }
.chain-steps::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--gray-800); }
.chain-step { position: relative; padding: 6px 0; font-size: 0.75rem; color: var(--gray-400); }
.chain-step::before { content: ""; position: absolute; left: -18px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--s1); border: 2px solid var(--gray-700); }
.chain-step.depth-0::before { border-color: var(--rose); background: var(--rose-dim); }
.chain-step.depth-1::before { border-color: var(--blue); background: var(--blue-dim); }
.chain-step.depth-2::before { border-color: var(--green); background: var(--green-dim); }
.chain-step .chain-field { color: var(--gray-600); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.04em; }
.chain-step .chain-val { color: var(--white); font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* ── Graph Details ── */
#node-details { padding:20px; font-size:0.8125rem; }
.data-row { display:flex; justify-content:space-between; margin-bottom:4px; font-size:0.6875rem; border-bottom:1px solid var(--brd); padding-bottom:4px; }
.data-row:last-child { border:0; margin:0; padding:0; }
.data-key { color:var(--gray-500); text-transform:uppercase; letter-spacing:0.04em; }
.data-val { color:var(--text); font-family:JetBrains Mono,monospace; text-align:right; max-width:60%; word-break:break-all; user-select:all; cursor:copy; }
.data-val.pw { color:var(--rose); }

/* ── AI Analyst ── */
.ai-panel { margin-top: 10px; }
.ai-header { padding: 16px; background: var(--s1); border: 1px solid var(--brd); border-radius: var(--r) var(--r) 0 0; border-bottom: none; }
.ai-content { padding: 24px; background: var(--s1); border: 1px solid var(--brd); border-radius: 0 0 var(--r) var(--r); min-height: 300px; }
.ai-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; }

/* ── Paywall Modal ── */
.paywall-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; animation: fadeIn 0.3s ease; }
.paywall-modal { margin: auto; background: var(--s1); border: 1px solid var(--brd); border-radius: 16px; padding: 40px; width: 100%; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.5); transform: scale(0.98); animation: modalEnter 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes modalEnter { to { transform: scale(1); opacity: 1; } }
.paywall-close { position: absolute; top: 16px; right: 20px; background: none; border: none; color: var(--gray-500); font-size: 1.5rem; cursor: pointer; z-index: 10; }
.paywall-close:hover { color: var(--white); }
.paywall-title { font-size: 1.75rem; font-weight: 700; color: var(--white); margin-bottom: 8px; text-align: center; letter-spacing: -0.02em; }
.paywall-sub { font-size: 0.875rem; color: var(--gray-400); text-align: center; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.5; }
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
@media (max-width: 768px) { .pricing-cards { grid-template-columns: 1fr; } }
.pricing-card { background: var(--s2); border: 1px solid var(--brd); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; position: relative; transition: transform 0.2s, border-color 0.2s; }
.pricing-card:hover { transform: translateY(-4px); border-color: var(--purple-b); }
.pricing-card.popular { border-color: var(--purple); background: linear-gradient(180deg, rgba(168,85,247,0.05) 0%, transparent 100%); }
.pricing-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--purple); color: #000; font-size: 0.625rem; font-weight: 700; padding: 4px 8px; border-radius: 100px; letter-spacing: 0.05em; }
.pricing-duration { font-size: 1.25rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.pricing-price { font-size: 2rem; font-weight: 700; color: var(--purple); margin-bottom: 4px; }
.pricing-save { font-size: 0.75rem; color: var(--green); font-weight: 600; margin-bottom: 16px; }
.pricing-features { list-style: none; margin: 16px 0; padding: 0; flex-grow: 1; border-top: 1px solid var(--brd); padding-top: 16px; }
.pricing-features li { font-size: 0.8125rem; color: var(--gray-300); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pricing-features li::before { content: "✓"; color: var(--green); font-weight: bold; }
.paywall-key-entry { border-top: 1px solid var(--brd); padding-top: 24px; max-width: 400px; margin: 0 auto; text-align: center; }
.w-full { width: 100%; }

/* ── Leaflet Dark Mode Overrides ── */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg); color: var(--text); border: 1px solid var(--brd); box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.leaflet-container a.leaflet-popup-close-button { color: var(--gray-400); }
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--text); }
.leaflet-popup-content { margin: 12px; font-size: 0.8125rem; }
.leaflet-control-zoom a { background: var(--s1) !important; color: var(--text) !important; border-color: var(--brd) !important; }
.leaflet-control-zoom a:hover { background: var(--s2) !important; }

/* ═══ FILTERS ═══ */
.filter-strip { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filter-hint {
  font-size: 0.625rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 2px;
}
.keyword-input {
  background: var(--bg);
  border: 1px solid var(--brd);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  width: 260px;
  outline: none;
  transition: border-color 0.2s;
}
.keyword-input:focus { border-color: var(--blue); }
.chip {
  padding: 4px 12px; font-size: 0.6875rem; font-weight: 500; font-family: inherit;
  border-radius: 100px; border: 1px solid var(--brd); background: transparent;
  color: var(--gray-500); cursor: pointer; transition: all 0.15s; outline: none;
}
.chip:hover { color: var(--white); border-color: var(--brd-h); }
.chip.on { background: var(--white); color: var(--black); border-color: transparent; }



/* ═══ PROFILES / MATRIX ═══ */
.profile-list { display: flex; flex-direction: column; gap: 16px; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.profile-card { background: var(--s1); border: 1px solid var(--brd); border-radius: var(--r); overflow: hidden; animation: card-in 0.25s var(--ease) both; }
.profile-head { padding: 12px 16px; background: rgba(255,255,255,0.01); border-bottom: 1px solid var(--brd); display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.15s; }
.profile-head:hover { background: rgba(255,255,255,0.03); }
.profile-title { font-size: 0.8125rem; font-weight: 600; color: var(--white); display: flex; align-items: center; gap: 8px; }
.profile-title-type { color: var(--gray-600); font-weight: 500; text-transform: uppercase; font-size: 0.625rem; letter-spacing: 0.04em; }
.profile-table { width: 100%; border-collapse: collapse; text-align: left; }
.profile-table th { font-size: 0.625rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; padding: 8px 16px; border-bottom: 1px solid var(--brd); background: rgba(0,0,0,0.1); }
.profile-table td { padding: 8px 16px; font-size: 0.75rem; color: var(--gray-300); font-family: 'JetBrains Mono', monospace; border-bottom: 1px solid var(--brd); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.profile-table tr:last-child td { border-bottom: none; }
.profile-table tr:hover td { background: var(--s2); }
.td-pw { color: var(--rose) !important; }
.copied { background: var(--green-dim) !important; color: var(--green) !important; }

/* ═══ HISTORY ═══ */
.history-drawer {
  position: fixed; top: 48px; right: 0; bottom: 0; width: 360px;
  background: rgba(9,9,11,0.95); backdrop-filter: blur(20px); border-left: 1px solid var(--brd); z-index: 90;
  transform: translateX(100%); transition: transform 0.3s var(--ease);
  overflow-y: auto; padding: 24px; box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.history-drawer.open { transform: translateX(0); }
.history-item { padding: 14px 16px; background: rgba(255,255,255,0.02); border: 1px solid var(--brd); border-radius: 10px; cursor: pointer; transition: all 0.2s; margin-bottom: 10px; }
.history-item:hover { background: rgba(255,255,255,0.05); border-color: var(--brd-h); transform: translateY(-1px); }
.history-query { font-size: 0.8125rem; color: var(--white); font-weight: 500; word-break: break-all; line-height: 1.5; }
.history-meta { font-size: 0.6875rem; color: var(--gray-500); margin-top: 8px; display: flex; justify-content: space-between; }

/* ═══ TOAST ═══ */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(16px);
  z-index: 600; padding: 8px 18px; border-radius: var(--r);
  background: var(--s2); border: 1px solid var(--brd); color: var(--gray-300);
  font-size: 0.75rem; font-weight: 500; opacity: 0; transition: all 0.25s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--rose-b); color: var(--rose); }
.toast.ok { border-color: var(--green-b); color: var(--green); }

/* ═══ PRINT REPORT ═══ */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; color: #1d1d1f !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nav { position: static; background: rgba(255,255,255,0.9); border-color: #e5e5e5; }
  .nav-brand { color: #1d1d1f; }
  .stat-box, .profile-card, .graph-container { background: #fff; border-color: #e5e5e5; }
  .stat-label, .profile-title-type { color: #86868b; }
  .stat-val, .profile-title, .profile-table td { color: #1d1d1f; }
  .profile-table th { background: #f9f9f9; border-color: #e5e5e5; color: #86868b; }
  .profile-head { background: #fcfcfc; border-color: #e5e5e5; }
  .profile-table td { border-color: #f0f0f0; }
  .td-pw { color: var(--rose) !important; }
  .pdf-report-head { display: flex; justify-content: space-between; padding: 20px 0; border-bottom: 2px solid #1d1d1f; margin-bottom: 20px; }
  .profile-card { break-inside: avoid; margin-bottom: 20px; }
}
.pdf-report-head { display: none; }

.kbd { display: inline-flex; padding: 1px 5px; font-size: 0.5625rem; font-weight: 600; color: var(--gray-600); background: var(--s2); border: 1px solid var(--brd); border-radius: 4px; }

/* AI Analyst Styles */
.ai-report-text { color: var(--gray-300); font-size: 0.875rem; line-height: 1.6; }
.ai-report-text h1, .ai-report-text h2, .ai-report-text h3 { color: var(--white); margin: 20px 0 10px 0; }
.ai-report-text h1 { font-size: 1.25rem; }
.ai-report-text h2 { font-size: 1.125rem; }
.ai-report-text p { margin-bottom: 12px; }
.ai-report-text ul { padding-left: 20px; margin-bottom: 16px; }
.ai-report-text li { margin-bottom: 4px; }
.ai-report-text strong { color: var(--rose); font-weight: 600; }

.tree-link { opacity: 0.4; }
.graph-node circle { stroke-width: 1.5; }

/* ═══ AVATARS (Profile Card Header) ═══ */
.avatar-row { display: flex; gap: 4px; align-items: center; }
.avatar-row a { position: relative; display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; }
.avatar-thumb {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--brd);
  background: var(--s2); transition: transform 0.15s, border-color 0.15s;
}
.avatar-row a:hover .avatar-thumb { transform: scale(1.15); border-color: var(--purple); z-index: 2; }
.avatar-tag {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  font-size: 0.5rem; color: var(--gray-600); white-space: nowrap;
  opacity: 0; transition: opacity 0.15s; pointer-events: none;
}
.avatar-row a:hover .avatar-tag { opacity: 1; }

/* ═══ PASSWORD REUSE ═══ */
.reuse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.reuse-card {
  background: var(--s1); border: 1px solid var(--brd); border-radius: var(--r);
  padding: 12px 14px; transition: border-color 0.15s;
}
.reuse-card.reuse-critical { border-color: var(--rose); box-shadow: 0 0 0 1px rgba(168,85,247,0.4) inset; }
.reuse-card.reuse-warning { border-color: var(--amber); }
.reuse-card.reuse-safe { opacity: 0.65; }
.reuse-pw {
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
  font-size: 0.875rem; color: var(--white); margin-bottom: 6px;
  letter-spacing: 0.05em; user-select: all;
}
.reuse-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.reuse-count { font-size: 0.6875rem; color: var(--gray-400); font-weight: 500; }
.reuse-badge { font-size: 0.5625rem; font-weight: 700; padding: 2px 8px; border-radius: 100px; letter-spacing: 0.06em; }
.reuse-badge-critical { background: var(--rose); color: #000; }
.reuse-badge-warning { background: var(--amber); color: #000; }
.reuse-badge-safe { background: var(--gray-800); color: var(--gray-500); }
.reuse-sources { display: flex; flex-wrap: wrap; gap: 4px; }
.reuse-src {
  font-size: 0.625rem; padding: 2px 6px; border-radius: 4px;
  background: var(--s2); color: var(--gray-400); font-family: 'JetBrains Mono', monospace;
}

/* ═══ RELATED ENTITIES ═══ */
.related-feed { display: flex; flex-direction: column; gap: 6px; }
.related-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--s1); border: 1px solid var(--brd);
  border-left-width: 3px; border-radius: var(--r);
  transition: background 0.15s, transform 0.15s;
}
.related-row[onclick] { cursor: pointer; }
.related-row[onclick]:hover { background: var(--s2); transform: translateX(2px); }
.related-high { border-left-color: var(--rose); }
.related-medium { border-left-color: var(--amber); }
.related-low { border-left-color: var(--gray-700); }
.related-ico { font-size: 1.125rem; flex-shrink: 0; }
.related-body { flex: 1; min-width: 0; }
.related-title { display: flex; gap: 8px; align-items: center; font-size: 0.8125rem; color: var(--white); font-weight: 500; }
.related-disc { font-family: 'JetBrains Mono', monospace; }
.related-arrow { font-size: 0.625rem; color: var(--blue); opacity: 0.7; }
.related-sub { font-size: 0.6875rem; color: var(--gray-500); margin-top: 2px; }
.related-conf {
  font-size: 0.5625rem; font-weight: 700; padding: 2px 8px; border-radius: 100px; letter-spacing: 0.06em;
}
.related-conf-high { background: var(--rose); color: #000; }
.related-conf-medium { background: var(--amber); color: #000; }
.related-conf-low { background: var(--gray-800); color: var(--gray-500); }

/* ═══ ACCOUNTS (Username Enumeration) ═══ */
.accounts-summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--s1); border: 1px solid var(--brd);
  border-radius: var(--r); margin-bottom: 12px; font-size: 0.8125rem; color: var(--gray-400);
}
.accounts-count b { color: var(--green); font-family: 'JetBrains Mono', monospace; font-size: 1rem; }
.accounts-target { color: var(--purple); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.accounts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.account-card {
  display: block; padding: 12px; background: var(--s1); border: 1px solid var(--brd);
  border-radius: var(--r); text-decoration: none; transition: all 0.15s;
}
.account-card:hover { border-color: var(--brd-h); background: var(--s2); transform: translateY(-1px); }
.account-card.on { border-left: 3px solid var(--green); }
.account-card.off { opacity: 0.45; }
.account-platform { font-size: 0.8125rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.account-status {
  font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 1px 6px; border-radius: 3px; display: inline-block; margin-bottom: 6px;
}
.account-card.on .account-status { background: var(--green); color: #000; }
.account-card.off .account-status { background: var(--gray-800); color: var(--gray-600); }
.account-url {
  font-size: 0.625rem; color: var(--gray-500); font-family: 'JetBrains Mono', monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══ TIMELINE ═══ */
.timeline {
  position: relative; padding: 20px 0;
}
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--gray-800) 0%, var(--rose) 100%);
  transform: translateX(-1px);
}
.tl-node {
  position: relative; width: 50%; padding: 8px 24px; min-height: 80px;
  animation: card-in 0.3s var(--ease) both;
}
.tl-node.tl-left { left: 0; text-align: right; }
.tl-node.tl-right { left: 50%; text-align: left; }
.tl-dot {
  position: absolute; top: 18px; width: 14px; height: 14px;
  background: var(--s2); border: 3px solid var(--gray-700); border-radius: 50%; z-index: 2;
}
.tl-node.tl-left .tl-dot { right: -7px; }
.tl-node.tl-right .tl-dot { left: -7px; }
.tl-dot-danger { border-color: var(--rose); background: rgba(168,85,247,0.2); }
.tl-card {
  display: inline-block; max-width: 100%;
  padding: 10px 14px; background: var(--s1); border: 1px solid var(--brd);
  border-radius: var(--r); text-align: left;
}
.tl-date { font-size: 0.8125rem; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.tl-meta { font-size: 0.6875rem; color: var(--gray-500); margin-bottom: 6px; }
.tl-breaches { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-breach {
  font-size: 0.625rem; padding: 2px 6px; border-radius: 4px;
  background: var(--s2); color: var(--gray-400); font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 720px) {
  .timeline::before { left: 8px; }
  .tl-node, .tl-node.tl-left, .tl-node.tl-right { width: 100%; left: 0; padding-left: 30px; padding-right: 8px; text-align: left; }
  .tl-node.tl-left .tl-dot, .tl-node.tl-right .tl-dot { left: 1px; right: auto; }
}

.empty {
  padding: 40px 20px; background: var(--s1); border: 1px dashed var(--brd);
  border-radius: var(--r); text-align: center;
}

/* ═══ FREEMIUM LOCK (clean masked-text style — no blur) ═══
   First-and-last char visible, everything between is `*`. The whole
   span is clickable and routes to the paywall. */
.locked {
  display: inline-block;
  max-width: 100%;
  color: var(--purple);
  cursor: pointer;
  user-select: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.locked:hover { color: var(--white); }

/* Make sure the password column never overflows its cell */
td.td-pw {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
td.td-pw .locked { max-width: 100%; vertical-align: middle; }

/* Password reuse card: keep mask cleanly inside its card */
.reuse-pw {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.reuse-pw .locked { display: inline; max-width: 100%; }

/* ═══ GRAPH SOLO MODE ═══ */
/* When the Graph tab is active, the graph container expands and the chrome
   above (stats / intel banners / view toggles get tighter spacing). */
#results-section.graph-solo .graph-container {
  height: calc(100vh - 200px);
  min-height: 520px;
  margin-bottom: 8px;
}
#results-section.graph-solo .view-tabs { margin-bottom: 0; }

/* ═══ MOBILE OPTIMIZATIONS ═══ */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .wrap { padding: 0 16px; }
  
  /* Make top nav horizontally scrollable if needed */
  .nav-inner { gap: 12px; }
  .nav-actions { 
    flex-wrap: wrap; 
    gap: 6px; 
    overflow-x: auto; 
    white-space: nowrap; 
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .nav-actions::-webkit-scrollbar { display: none; }
  
  /* Shrink enormous headers */
  .osint-h1 { font-size: 1.75rem !important; }
  .paywall-title { font-size: 1.25rem !important; }
  
  /* Ensure scan overlay and modals fit horizontally */
  .scan-head, .scan-steps, .scan-bar-t, .scan-meta, .scan-log { width: 90vw !important; }
  
  /* Paywall Mobile Optimization (Bottom Sheet Style) */
  .paywall-overlay { padding: 40px 0 0 0; align-items: flex-end; }
  .paywall-modal { padding: 24px 20px; width: 100%; border-radius: 24px 24px 0 0; margin: 0; animation: sheetUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards; transform: translateY(100%); }
  @keyframes sheetUp { to { transform: translateY(0); } }
  .pricing-cards { grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
  .pricing-card { padding: 18px; }
  .paywall-key-entry { padding-top: 16px; }

  /* Adjust graph container */
  .graph-container { height: 400px; }
  #results-section.graph-solo .graph-container { height: 50vh; min-height: 400px; }
  
  /* Ensure tables scroll horizontally instead of overflowing the page */
  .profile-table-wrapper, .timeline-table-wrapper { overflow-x: auto; max-width: 100vw; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
  
  .filter-strip { flex-direction: column; align-items: flex-start; }
  .keyword-input { width: 100%; }

  /* History drawer full-width on mobile */
  .history-drawer { width: 100%; }
}
