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

:root {
  --brand:    #0f172a;
  --accent:   #6366f1;
  --accent-h: #4f46e5;
  --surface:  #ffffff;
  --muted:    #f8fafc;
  --border:   #e2e8f0;
  --text:     #0f172a;
  --subtle:   #64748b;
  --danger:   #dc2626;
  --warn:     #f59e0b;
  --good:     #3b82f6;
  --excel:    #16a34a;
  --radius:   12px;
  --shadow:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--muted);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.navbar {
  background: var(--brand);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand { font-size: 18px; font-weight: 700; color: #fff; }
.navbar-sub   { font-size: 12px; color: #94a3b8; margin-top: 2px; }

.container { max-width: 760px; margin: 0 auto; padding: 40px 16px; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}

/* ── Hero ── */
.hero { text-align: center; padding: 56px 16px 40px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.hero p   { font-size: 17px; color: var(--subtle); max-width: 520px; margin: 0 auto 32px; }

/* ── Form ── */
.scan-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.scan-form input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.scan-form input:focus { border-color: var(--accent); }

.btn {
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-dark:hover { opacity: .85; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Progress ── */
.progress-wrap { text-align: center; padding: 40px 0; }
.progress-label { font-size: 15px; color: var(--subtle); margin-bottom: 20px; }
.progress-bar-track { background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; max-width: 400px; margin: 0 auto 12px; }
.progress-bar-fill  { height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .4s ease; animation: scan-pulse 2s ease-in-out infinite; }
@keyframes scan-pulse { 0%,100% { opacity:1 } 50% { opacity:.6 } }

/* ── Score ── */
.score-hero {
  background: var(--brand);
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.score-number { font-size: 80px; font-weight: 900; line-height: 1; }
.score-denom  { font-size: 24px; color: #475569; padding-bottom: 10px; }
.score-meta   { flex: 1; }
.score-domain { font-size: 13px; color: #94a3b8; margin-bottom: 6px; }
.score-title  { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.band-badge   {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
  color: #fff;
}
.band-Invisible { background: var(--danger); }
.band-Partial   { background: var(--warn); }
.band-Good      { background: var(--good); }
.band-Excellent { background: var(--excel); }

/* ── Identity banner ── */
.identity-banner {
  display: flex; align-items: center; gap: 12px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: var(--radius); padding: 14px 18px;
  margin-bottom: 24px; font-size: 14px;
}
.identity-banner img { width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0; }
.identity-banner strong { color: var(--text); }
.identity-banner .muted { color: var(--subtle); margin-left: auto; font-size: 12px; }

/* ── Category bars ── */
.category-grid { display: grid; gap: 14px; }
.cat-row label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.cat-row label span { font-weight: 700; }
.bar-track { background: var(--border); border-radius: 99px; height: 8px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 99px; transition: width .6s ease; }
.bar-low  { background: var(--danger); }
.bar-mid  { background: var(--warn); }
.bar-high { background: var(--excel); }

/* ── Section title ── */
.section-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ── Rec card ── */
.rec-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.rec-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 4px; text-transform: uppercase; letter-spacing: .3px;
}
.badge-rank    { background: var(--brand); color: #fff; }
.badge-high    { background: #fee2e2; color: #dc2626; }
.badge-medium  { background: #fef3c7; color: #92400e; }
.badge-low     { background: #f1f5f9; color: var(--subtle); }
.badge-easy    { background: #dcfce7; color: #166534; }
.badge-medium-e{ background: #fef9c3; color: #854d0e; }
.badge-hard    { background: #fce7f3; color: #9d174d; }
.badge-cat     { background: #eff6ff; color: #1d4ed8; }
.rec-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.rec-desc  { font-size: 13px; color: var(--subtle); line-height: 1.6; margin-bottom: 10px; }
.rec-steps { padding-left: 18px; }
.rec-steps li { font-size: 13px; color: #374151; margin-bottom: 4px; line-height: 1.5; }

/* ── Email gate ── */
.gate-card { text-align: center; padding: 36px 32px; }
.gate-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.gate-card p  { font-size: 14px; color: var(--subtle); margin-bottom: 24px; }
.email-form   { display: flex; gap: 10px; justify-content: center; max-width: 420px; margin: 0 auto; }
.email-form input { flex: 1; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; }
.email-form input:focus { border-color: var(--accent); }

/* ── Upgrade card ── */
.upgrade-card { background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%); color: #fff; text-align: center; padding: 36px; }
.upgrade-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.upgrade-card p  { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }
.price-tag { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.price-sub { font-size: 13px; color: #94a3b8; margin-bottom: 24px; }

/* ── Tier 2 upgrade card ── */
.upgrade-card-t2 {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  color: #fff; text-align: center; padding: 36px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.upgrade-card-t2 h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.upgrade-card-t2 p  { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }

/* ── Competitor URL inputs ── */
.competitor-input {
  width: 100%; padding: 12px 14px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none;
}
.competitor-input:focus { border-color: var(--accent); }

/* ── Alerts ── */
.alert { padding: 14px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ── Utility ── */
.hidden  { display: none !important; }
.text-muted { color: var(--subtle); font-size: 13px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
