:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2f3d;
  --text: #e8eaed;
  --muted: #9aa0b0;
  --accent: #7c6cf0;
  --accent-hover: #9588f5;
  --green: #4ade80;
  --red: #f87171;
  --radius: 12px;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.header h1 { font-size: 1.75rem; font-weight: 700; }
.tagline { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }

section { margin-bottom: 2.5rem; }
h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
  position: relative;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(124, 108, 240, 0.05);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-zone .drop-hint {
  position: relative;
  z-index: 1;
  pointer-events: none;
  margin: 0;
}

.drop-zone .file-selected {
  position: relative;
  z-index: 3;
  pointer-events: none;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--green);
}

.drop-zone .link { color: var(--accent); text-decoration: underline; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn.like { border-color: var(--green); color: var(--green); }
.btn.dislike { border-color: var(--red); color: var(--red); }
.btn.super { border-color: var(--accent); color: var(--accent); }

.status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.status.hidden { display: none; }
.status.ok { border-color: var(--green); }
.status.error { border-color: var(--red); }

.stats { display: flex; gap: 1rem; flex-wrap: wrap; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  min-width: 140px;
}

.stat-num { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.8rem; }

.cards { display: grid; gap: 1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

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

.card-header h3 { font-size: 1.1rem; }
.score {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.card-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.platform {
  background: var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  text-transform: capitalize;
}

.bio, .explanation { font-size: 0.9rem; margin-bottom: 0.5rem; }
.explanation { color: var(--muted); font-style: italic; }

.scores-row {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.scores-row .red { color: var(--red); }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.empty { color: var(--muted); text-align: center; padding: 2rem; }

.user-badge {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.user-badge a { color: var(--accent); }

.onboarding fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.onboarding-lead {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

.onboarding legend { font-weight: 600; padding: 0 0.5rem; }

.field-hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.section-lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -0.25rem 0 1.25rem;
}
.onboarding label {
  display: block;
  margin: 0.4rem 0;
  cursor: pointer;
}

.onboarding label input { margin-right: 0.5rem; }
.onboarding .hint { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.drop-zone.small { padding: 1.5rem; }
.hidden { display: none; }

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.badge-green { background: rgba(74, 222, 128, 0.15); color: var(--green); border-color: var(--green); }
.badge-yellow { background: rgba(250, 204, 21, 0.12); color: #facc15; border-color: #facc15; }
.badge-red { background: rgba(248, 113, 113, 0.15); color: var(--red); border-color: var(--red); }

/* --- Trust vetting --- */
.shortlist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.card-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-handle {
  font-size: 0.85rem;
  color: var(--muted);
}

.profile-link {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
}

.profile-link:hover { text-decoration: underline; }

.card-scores {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.trust-score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.match-score {
  font-size: 1.25rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.score-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.vet-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  width: fit-content;
}

.vet-clear { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.vet-caution { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.vet-flag { background: rgba(248, 113, 113, 0.18); color: var(--red); }

.card-flag { border-color: rgba(248, 113, 113, 0.45); }
.card-caution { border-color: rgba(250, 204, 21, 0.35); }
.card-clear { border-color: var(--border); }

.vetting-line {
  font-size: 0.85rem;
  margin: 0.5rem 0;
  color: var(--muted);
}

.vetting-warn { color: #facc15; }
.vetting-ok { color: var(--green); }

.risk-factors {
  margin: 0.35rem 0 0.75rem 1.1rem;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.risk-factors li { margin-bottom: 0.2rem; }

.enrichment-links {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.enrich-chip {
  display: inline-block;
  margin: 0.2rem 0.5rem 0.2rem 0;
  padding: 0.15rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-transform: capitalize;
}

.enrich-chip a { margin-left: 0.35rem; color: var(--accent); }

.enrich-done { color: var(--green); }
.enrich-running, .enrich-queued { color: #facc15; }
.enrich-error { color: var(--red); }

.trust-warning {
  font-size: 0.85rem;
  color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  border-left: 3px solid #facc15;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0 6px 6px 0;
}

/* --- Nav & layout --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover { color: var(--accent-hover); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-muted { opacity: 0.75; }

.btn-nav {
  padding: 0.45rem 1rem !important;
  font-size: 0.85rem !important;
}

.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.page-header h1 { font-size: 1.75rem; font-weight: 700; }

main { padding-bottom: 3rem; }

.landing-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* --- Landing --- */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
}

.flow h2 { margin-bottom: 1rem; }

.flow-steps {
  list-style: none;
  counter-reset: step;
}

.flow-steps li {
  counter-increment: step;
  padding: 0.6rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.flow-steps li:last-child { border-bottom: none; }

.flow-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.75rem;
}

/* --- Auth --- */
.auth-card {
  max-width: 400px;
  margin: 3rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.auth-form input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn.full { width: 100%; text-align: center; }

.auth-foot {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
}

.auth-foot a { color: var(--accent); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.auth-tab.active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
}

.dev-link-box {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px dashed var(--border);
  font-size: 0.85rem;
  word-break: break-all;
}

.dev-link-box a { color: var(--accent); }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.footer a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .nav-inner { padding: 0.75rem 1rem; }
  .nav-links { gap: 0.75rem; }
  .hero { padding: 2rem 0 1.5rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
}