:root {
  --bg: #000000;
  --bg-soft: #050505;
  --panel: #0a0a0a;
  --panel-2: #0d0d0d;
  --panel-3: #111111;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f5f5f5;
  --muted: #9d9d9d;
  --muted-2: #6f6f6f;
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --radius: 22px;
}

* { box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.05), transparent 18%),
    linear-gradient(180deg, #020202 0%, #000 100%);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 92%);
  opacity: 0.6;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.card {
  background: linear-gradient(180deg, rgba(13,13,13,0.98), rgba(8,8,8,0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), transparent 30%),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.02));
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #d8d8d8;
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.55);
}

.hero h1, h2, h3, p {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 0.94;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.privacy-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  margin: 8px 0 26px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  color: #efefef;
}

.privacy-dot {
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255,255,255,0.55);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  min-height: 270px;
  border-radius: 26px;
  border: 1px dashed rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  padding: 28px;
  transition: 0.22s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: rgba(255,255,255,0.42);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 18px 42px rgba(0, 0, 0, 0.32);
  outline: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 1.8rem;
}

.inline-button,
.ghost-button {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.inline-button:hover,
.ghost-button:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.mini-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.mini-card,
.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
}

.mini-card strong,
.metric-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.mini-card span,
.metric-label,
.muted,
small {
  color: var(--muted);
}

.status-card,
.error-card,
.profile-card {
  margin-top: 18px;
  padding: 24px;
}

.status-card,
.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #ffffff;
  animation: spin 0.85s linear infinite;
}

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

.error-card {
  border-color: rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(22,22,22,0.98), rgba(8,8,8,0.98));
}

.results {
  margin-top: 18px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 1.6rem;
  font-weight: 800;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-value {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.two-col .card {
  padding: 24px;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

canvas {
  width: 100% !important;
  height: 320px !important;
}

.list-table,
.facts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-row,
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.07);
}

.list-row .sub,
.fact-row .sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.list-row strong,
.fact-row strong {
  font-size: 0.98rem;
}

.right-pill {
  white-space: nowrap;
  font-weight: 700;
  color: #ffffff;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f2f2f2;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .metric-grid,
  .mini-grid,
  .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 100%);
    padding-top: 10px;
  }

  .hero,
  .two-col .card,
  .status-card,
  .error-card,
  .profile-card {
    padding: 18px;
  }

  .metric-grid,
  .mini-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .status-card,
  .profile-card,
  .list-row,
  .fact-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dropzone {
    min-height: 220px;
  }
}
