:root {
  --bg: #07101f;
  --surface: #0f1b31;
  --surface-2: #152542;
  --border: #22355a;
  --text: #e8effa;
  --muted: #98abc8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: radial-gradient(circle at top center, #112445 0%, var(--bg) 52%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  background: rgba(7, 16, 31, 0.78);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 14px;
}

.pill-soft {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
}

.hero {
  text-align: center;
  padding: 58px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

h1 {
  margin: 0 auto 14px;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.14;
  max-width: 780px;
}

.lead {
  margin: 0 auto 28px;
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
}

.scan-form {
  display: flex;
  gap: 10px;
  max-width: 660px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.scan-form input {
  flex: 1 1 280px;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.scan-form input:focus,
.lead-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06101f;
  transition: transform 0.12s ease, opacity 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.trust-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.error-banner {
  max-width: 660px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-top: 20px;
}

.loading-panel {
  display: flex;
  align-items: center;
  gap: 18px;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.score-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.score-meta h2 {
  margin: 4px 0;
  font-size: 26px;
}

.status-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.status-green {
  background: #047857;
}

.status-yellow {
  background: #b45309;
}

.status-red {
  background: #b91c1c;
}

.quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stat-chip {
  font-size: 12px;
  color: #cbd5e1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 8px;
}

.gauge-wrap {
  position: relative;
  width: 136px;
  height: 136px;
  flex-shrink: 0;
}

.gauge {
  width: 136px;
  height: 136px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: #1e293b;
  stroke-width: 10;
}

.gauge-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.7s ease, stroke 0.3s ease;
}

.gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-label strong {
  font-size: 36px;
  line-height: 1;
}

.gauge-label span {
  font-size: 12px;
  color: var(--muted);
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.pillar-top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 8px;
}

.bar {
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}

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

.bot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bot-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.bot-ok {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.bot-bad {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.findings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.finding-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--yellow);
  border-radius: 12px;
  padding: 14px 16px;
  background: #0b1528;
}

.finding-item.red {
  border-left-color: var(--red);
}

.finding-item h4 {
  margin: 6px 0 4px;
  font-size: 16px;
}

.finding-item p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.finding-tags {
  display: flex;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.tag-red {
  color: #fca5a5;
}

.tag-yellow {
  color: #fcd34d;
}

.tag-pillar {
  color: var(--accent);
}

.lead-card {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(155deg, #10203a, #0c172b);
}

.lead-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.lead-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.lead-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.faq-section h2 {
  margin-top: 0;
}

.faq-item {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
}

.footer {
  text-align: center;
  padding: 36px 20px 48px;
  color: var(--muted);
  font-size: 13px;
}

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

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

@media print {
  body {
    background: #fff;
    color: #0f172a;
  }
  .topbar,
  .hero,
  .lead-card,
  .faq-section,
  .footer {
    display: none;
  }
  .card,
  .pillar-card,
  .finding-item {
    background: #fff;
    color: #0f172a;
    border-color: #cbd5e1;
  }
  .muted,
  .finding-item p {
    color: #334155;
  }
}
