:root {
  --bg: #0b1020;
  --bg-2: #0f172a;
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #3b82f6;
  --primary-glow: rgba(59,130,246,0.35);
  --accent: #22d3ee;
  --success: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(59,130,246,0.25), transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(34,211,238,0.18), transparent 45%),
    radial-gradient(ellipse at 50% 120%, rgba(139,92,246,0.15), transparent 50%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid rgba(34,211,238,0.3);
  border-radius: 20px;
  background: rgba(34,211,238,0.08);
  margin-bottom: 20px;
}
.eyebrow.success {
  color: var(--success);
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.08);
}

/* ===== HERO ===== */
.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.hero-inner {
  max-width: 780px;
  width: 100%;
  text-align: center;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: #fff;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-muted);
  margin: 0 auto 40px;
  max-width: 620px;
}

/* ===== AUDIT FORM ===== */
.audit-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 6px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 80px var(--primary-glow);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.audit-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 100px var(--primary-glow);
}
.input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 16px;
  min-width: 0;
}
.input-prefix {
  color: var(--text-dim);
  font-size: 17px;
  margin-right: 4px;
  user-select: none;
}
.audit-form input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 17px;
  padding: 16px 0;
  font-family: inherit;
  min-width: 0;
}
.audit-form input::placeholder { color: var(--text-dim); }
.audit-form button {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.audit-form button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 24px var(--primary-glow); }
.audit-form button:disabled { opacity: 0.6; cursor: wait; }
.audit-form .btn-arrow { font-size: 20px; line-height: 1; }

.form-error {
  max-width: 640px;
  margin: 0 auto 20px;
  padding: 10px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 14px;
  text-align: left;
}

/* ===== BENEFITS ===== */
.benefits {
  list-style: none;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 32px 0 0;
}
.benefits li {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}
.benefit-num {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

/* ===== WHAT WE CHECK ===== */
.what-we-check {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.what-we-check h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin: 0 0 40px;
  letter-spacing: -0.01em;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.check-card {
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.check-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,0.35);
  background: rgba(255,255,255,0.06);
}
.check-icon { font-size: 26px; margin-bottom: 8px; }
.check-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #fff; }
.check-card p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.45; }

/* ===== SCANNER ===== */
.scanner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.scanner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.scanner-header h2 {
  margin: 0;
  font-size: 24px;
  color: #fff;
  word-break: break-all;
}
.scanner-stats { display: flex; gap: 20px; }
.stat { text-align: center; }
.stat-num { font-size: 30px; font-weight: 800; color: #fff; line-height: 1; }
.stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

.scanner-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
@media (max-width: 880px) {
  .scanner-body { grid-template-columns: 1fr; }
}

/* === site mock === */
.site-mock {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
}
.mock-browser {
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.mock-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mock-browser-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yel { background: #f59e0b; }
.dot.grn { background: #22c55e; }
.mock-url {
  flex: 1;
  margin-left: 12px;
  padding: 5px 12px;
  background: #0b1020;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-page {
  position: relative;
  padding: 18px;
  background: #fff;
  min-height: 360px;
  overflow: hidden;
}
.mock-block {
  background: #e2e8f0;
  border-radius: 6px;
  position: relative;
  transition: background 0.3s, box-shadow 0.3s;
}
.mock-block.scanned {
  background: linear-gradient(90deg, #bfdbfe, #93c5fd);
  box-shadow: 0 0 0 2px #3b82f6, 0 6px 16px rgba(59,130,246,0.35);
}
.mock-block.scanned::after {
  content: '✓';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #1e40af;
  font-weight: 700;
  font-size: 16px;
  animation: pop 0.35s;
}
.mock-header { height: 34px; margin-bottom: 12px; }
.mock-hero { height: 96px; margin-bottom: 12px; }
.mock-row { display: flex; gap: 10px; margin-bottom: 12px; background: transparent !important; box-shadow: none !important; }
.mock-col { flex: 1; height: 64px; background: #e2e8f0; border-radius: 6px; transition: background 0.3s, box-shadow 0.3s; }
.mock-col.scanned { background: linear-gradient(90deg, #bfdbfe, #93c5fd); box-shadow: 0 0 0 2px #3b82f6; }
.mock-form { height: 58px; margin-bottom: 12px; }
.mock-footer { height: 24px; }

/* animated scan line */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #3b82f6 20%, #22d3ee 50%, #3b82f6 80%, transparent);
  box-shadow: 0 0 28px 6px rgba(59,130,246,0.6), 0 0 60px 14px rgba(34,211,238,0.35);
  animation: scanMove 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes scanMove {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(380px); opacity: 0; }
}
@keyframes pop {
  0% { transform: translateY(-50%) scale(0); opacity: 0; }
  60% { transform: translateY(-50%) scale(1.4); opacity: 1; }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

/* === checklist === */
.checklist {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 8px;
  max-height: 460px;
  overflow-y: auto;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 14px;
  transition: background 0.2s;
}
.checklist-item:last-child { border-bottom: 0; }
.checklist-item .icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.checklist-item.queued .icon { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.checklist-item.queued .icon::before { content: '•'; }
.checklist-item.queued { color: var(--text-dim); }

.checklist-item.running .icon {
  background: rgba(59,130,246,0.2);
  color: var(--primary);
  animation: spin 1s linear infinite;
}
.checklist-item.running .icon::before { content: '↻'; font-weight: 700; }
.checklist-item.running { color: #fff; background: rgba(59,130,246,0.06); }

.checklist-item.done .icon { background: rgba(34,197,94,0.2); color: var(--success); }
.checklist-item.done .icon::before { content: '✓'; font-weight: 700; }
.checklist-item.done { color: var(--text-muted); }

.checklist-item.error .icon { background: rgba(239,68,68,0.2); color: var(--danger); }
.checklist-item.error .icon::before { content: '✕'; font-weight: 700; }
.checklist-item.error { color: var(--danger); }

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

/* progress bar */
.progress-bar-wrap { margin-top: 20px; }
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 0.4s;
  border-radius: 3px;
}

/* ===== RESULTS ===== */
.results {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.results-header {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.score-ring-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring circle { transition: stroke-dashoffset 0.8s ease-out, stroke 0.3s; }
.score-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-ring-label > div:first-child { font-size: 34px; font-weight: 800; color: #fff; line-height: 1; }
.small { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.results-header h2 { margin: 0 0 10px; font-size: 26px; color: #fff; word-break: break-all; }
.results-stats { color: var(--text-muted); font-size: 14px; display: flex; gap: 20px; flex-wrap: wrap; }
.results-stats strong { color: #fff; font-size: 20px; font-weight: 700; }
.results-stats .bad { color: var(--danger); }

.results-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-family: inherit;
  text-decoration: none;
}
.btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), #6366f1); border-color: transparent; color: #fff; }
.btn.primary:hover { box-shadow: 0 8px 24px var(--primary-glow); }
.btn.ghost { background: transparent; }

#results-content { display: flex; flex-direction: column; gap: 12px; }
.result-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 20px;
}
.result-card h3 { margin: 0 0 10px; font-size: 15px; color: #fff; font-weight: 600; }
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.result-row:last-child { border-bottom: 0; }
.result-row .lbl { color: var(--text-muted); }
.result-row .val { color: #fff; font-weight: 500; text-align: right; }
.result-row .val.ok { color: var(--success); }
.result-row .val.warn { color: var(--warn); }
.result-row .val.bad { color: var(--danger); }

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 40px 24px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--card-border);
  margin-top: 40px;
}
.site-footer .small { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
