: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); }
.status.capacity {
  border-color: var(--accent);
  background: rgba(124, 108, 240, 0.08);
}

.upload-section.processing {
  pointer-events: none;
  opacity: 0.92;
}

.upload-section.processing #upload-btn {
  opacity: 0.55;
  cursor: not-allowed;
}

.drop-zone-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(15, 17, 23, 0.82);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}

.drop-zone-overlay.hidden { display: none; }

.pulse-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 3px solid rgba(124, 108, 240, 0.25);
  border-top-color: var(--accent);
  animation: mf-spin 0.9s linear infinite;
}

.overlay-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-hover);
  letter-spacing: 0.02em;
}

.upload-progress {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 108, 240, 0.12), rgba(74, 222, 128, 0.06));
  border: 1px solid rgba(124, 108, 240, 0.35);
  box-shadow: 0 0 24px rgba(124, 108, 240, 0.12);
}

.upload-progress.hidden { display: none; }

.upload-progress-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.upload-progress-orbit {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-hover), var(--accent));
  position: relative;
  flex-shrink: 0;
  animation: mf-pulse 1.6s ease-in-out infinite;
}

.upload-progress-orbit::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--green);
  animation: mf-spin 1.2s linear infinite;
}

.upload-progress-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0;
}

.upload-progress-step {
  margin: 0.15rem 0 0;
  color: var(--accent-hover);
  font-size: 0.88rem;
  min-height: 1.25em;
  transition: opacity 0.25s ease;
}

.upload-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.upload-progress-bar {
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
  background-size: 200% 100%;
  animation: mf-progress-slide 1.8s ease-in-out infinite, mf-progress-grow 12s ease-out forwards;
}

.upload-progress-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.status.processing {
  border-color: var(--accent);
  color: var(--accent-hover);
}

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

@keyframes mf-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.88; }
}

@keyframes mf-progress-slide {
  0% { background-position: 0% 50%; transform: translateX(-120%); }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; transform: translateX(320%); }
}

@keyframes mf-progress-grow {
  from { width: 18%; }
  to { width: 94%; }
}

.agent-panel.processing {
  opacity: 0.85;
  pointer-events: none;
}

.agent-panel .agent-processing-banner {
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(124, 108, 240, 0.35);
  background: rgba(124, 108, 240, 0.1);
  font-size: 0.85rem;
  color: var(--accent-hover);
}

.agent-panel .agent-processing-banner.hidden { display: none; }

.referral-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.referral-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.referral-input {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  font-size: 0.9rem;
}
.referral-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
}
.referral-stats .founder-badge { color: var(--accent, #7c9cff); }
.free-iter { color: var(--muted); font-size: 0.85em; }

.share-card { margin-bottom: 1.5rem; }
.share-referral-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.share-disclaimer {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}
.share-timer-note {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  margin-top: 0.5rem;
}
.share-expired-card {
  max-width: 36rem;
  margin: 2rem auto 3rem;
  padding: 2rem 1.75rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.share-expired-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.share-expired-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}
.share-expired-lead,
.share-expired-cta-lead {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.share-expired-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.btn.share-btn { border-color: var(--accent); color: var(--accent-hover); }

.billing-card {
  max-width: 28rem;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.billing-balance { font-size: 1.1rem; margin: 0 0 0.5rem; }
.billing-rate, .billing-foot { color: var(--muted); font-size: 0.9rem; }
.billing-form { margin-top: 1.25rem; }
.billing-amount-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.billing-currency { color: var(--muted); font-weight: 600; }
.billing-amount-row input { flex: 1; }
.billing-success h1 { margin-top: 0; }
.billing-success-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

.nav-avatar-btn {
  border: 2px solid var(--border);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}
.nav-avatar-btn:hover { border-color: var(--accent); }
.nav-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-avatar-fallback {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-hover);
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-profile-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4.5rem 0 0;
  pointer-events: none;
}
.user-profile-panel.hidden { display: none; }
.user-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.user-profile-sheet {
  position: relative;
  z-index: 2;
  margin: 0 1rem 1rem;
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
.user-profile-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
}
.user-profile-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}
.user-profile-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.user-profile-avatar,
.user-profile-avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
}
.user-profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-hover);
}
.user-profile-identity { min-width: 0; }
.user-profile-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-profile-badge { margin: 0; color: var(--muted); font-size: 0.85rem; }
.user-profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.user-profile-danger {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.user-profile-danger h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.btn.danger { border-color: #c44; color: #f88; }
body.profile-panel-open { overflow: hidden; }

.admin-dashboard h1 { margin-top: 0; }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-section { margin-bottom: 2rem; }
.admin-section h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.admin-grant-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  max-width: 42rem;
}
.admin-grant-form .text-field { flex: 1; min-width: 8rem; margin: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-pill {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-right: 0.25rem;
  color: var(--muted);
}
.admin-pill.ok { border-color: var(--accent); color: var(--accent-hover); }
.admin-positive { color: #6c6; }
.admin-negative { color: #c88; }
.stat-value { font-size: 1.75rem; font-weight: 700; margin: 0.25rem 0; }
.stat-sub { color: var(--muted); font-size: 0.85rem; margin: 0; }
.profile-photo-field { display: block; margin-top: 0.75rem; }

.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-top-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

@media (max-width: 640px) {
  .card-top-scores {
    grid-template-columns: 1fr;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.score-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.score-bar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.score-bar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-bar-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.score-bar-value-warn {
  color: var(--red);
}

.score-bar-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.score-bar-compat { background: linear-gradient(90deg, var(--accent), var(--accent-hover)); }
.score-bar-attract { background: linear-gradient(90deg, #a78bfa, var(--accent)); }
.score-bar-red { background: linear-gradient(90deg, #f87171, #ef4444); }

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

.card-header-right {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-delete {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.btn-delete:hover {
  color: var(--red);
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.35);
}

.card {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.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;
}

.token-spent {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.agent-panel {
  margin: 0.75rem 0;
  padding: 0.85rem;
  background: rgba(124, 108, 240, 0.06);
  border: 1px solid rgba(124, 108, 240, 0.2);
  border-radius: var(--radius);
}

.agent-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 0.4rem;
}

.agent-compose {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
}

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

.agent-prompt {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px 8px 0 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 3.5rem;
  display: block;
}

.agent-prompt:focus {
  outline: none;
}

.agent-compose:focus-within {
  border-color: var(--accent);
}

.agent-compose-hint {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.35rem 0.75rem 0.5rem;
  border-top: 1px solid var(--border);
  margin: 0;
}

.agent-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0;
}

.agent-attachment-chip.url-chip {
  width: auto;
  max-width: 14rem;
  height: auto;
  min-height: 2rem;
  padding: 0.35rem 1.6rem 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.agent-url-link {
  color: var(--accent);
  font-size: 0.78rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.agent-url-link:hover { text-decoration: underline; }

.agent-attachment-chip {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
}

.agent-attachment-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.agent-attachment-remove {
  position: absolute;
  top: -0.3rem;
  right: -0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.agent-attachment-remove:hover {
  color: var(--red);
  border-color: var(--red);
}

.agent-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.agent-files-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.agent-attach-btn {
  cursor: pointer;
  margin: 0;
  border-color: rgba(124, 108, 240, 0.35);
  color: var(--accent-hover);
}

.agent-attach-btn:hover {
  background: rgba(124, 108, 240, 0.1);
  border-color: var(--accent);
}

.agent-cost-hint {
  font-size: 0.75rem;
  color: var(--muted);
  flex: 1;
}

.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-footer {
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.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; }

.profile-optional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .profile-optional-grid { grid-template-columns: 1fr; }
}

.text-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.text-field input,
.text-field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.text-field input:focus,
.text-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.profile-media-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .profile-media-row { grid-template-columns: 1fr; }
}

.media-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.media-field input[type="file"] {
  font-size: 0.8rem;
  color: var(--muted);
}

.media-preview {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.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;
}

/* --- Environment chrome --- */
.env-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.env-banner-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.env-banner-host {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.85;
}

.env-dev.env-banner {
  background: rgba(91, 76, 219, 0.15);
  color: #c4b5fd;
  border-bottom-color: rgba(91, 76, 219, 0.35);
}
.env-dev .env-banner-dot { background: #7c6cf0; box-shadow: 0 0 8px rgba(124, 108, 240, 0.8); }

.env-stage.env-banner {
  background: rgba(217, 119, 6, 0.15);
  color: #fcd34d;
  border-bottom-color: rgba(217, 119, 6, 0.35);
}
.env-stage .env-banner-dot { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.8); }

.nav-logo {
  border-radius: 6px;
  flex-shrink: 0;
}

.nav-env-pill {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  line-height: 1.2;
}

.env-dev .nav-env-pill {
  background: rgba(124, 108, 240, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(124, 108, 240, 0.35);
}

.env-stage .nav-env-pill {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* --- 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 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover { color: var(--accent-hover); }
.nav-brand:hover .nav-logo { filter: brightness(1.1); }

.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: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* --- Landing --- */
.hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 0 2rem;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90vw);
  height: 360px;
  background: radial-gradient(ellipse at center, rgba(124, 108, 240, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > *:not(.hero-glow) {
  position: relative;
  z-index: 1;
}

.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;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.value-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
}

.value-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.value-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(124, 108, 240, 0.45);
  transform: translateY(-2px);
}

.feature-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(124, 108, 240, 0.15);
  border: 1px solid rgba(124, 108, 240, 0.3);
  margin-bottom: 0.85rem;
  position: relative;
}

.feature-icon::after {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
}

.feature-icon-trust::after {
  border-radius: 50%;
  inset: 0.5rem;
}

.feature-icon-rank::after {
  border: none;
  background: linear-gradient(135deg, var(--accent) 40%, transparent 40%);
  inset: 0.45rem;
}

.feature-icon-privacy::after {
  border-radius: 50% 50% 0 0;
  border-bottom: none;
  inset: 0.45rem 0.65rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

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

.section-lead {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 640px;
  margin-bottom: 1.25rem;
}

.trust-grid {
  margin-bottom: 2.5rem;
}

.trust-grid h2,
.privacy-callout h2,
.landing-cta h2 {
  font-size: 1.35rem;
}

.trust-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

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

.trust-pillar-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.trust-up {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.trust-down {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.trust-pillar h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.trust-pillar p {
  color: var(--muted);
  font-size: 0.85rem;
}

.privacy-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

.privacy-callout p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.privacy-callout p:last-of-type {
  margin-bottom: 1rem;
}

.privacy-disclaimer {
  font-size: 0.88rem !important;
  font-style: italic;
}

.privacy-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.privacy-links a {
  color: var(--accent);
  text-decoration: none;
}

.privacy-links a:hover {
  text-decoration: underline;
}

.landing-cta {
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(26, 29, 39, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
}

.landing-cta .section-lead {
  margin: 0 auto 1.5rem;
}

/* --- At capacity --- */
.capacity-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.capacity-card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-top: 2rem;
}

.capacity-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.capacity-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.capacity-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.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: 720px) {
  .features,
  .trust-pillars {
    grid-template-columns: 1fr;
  }

  .value-strip {
    grid-template-columns: 1fr;
  }
}

@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; }
  .privacy-callout { padding: 1.25rem; }
  .landing-cta { padding: 2rem 1.25rem; }
}