:root {
  --bg: #0a0f1e;
  --bg-card: #111a30;
  --bg-card-2: #15203c;
  --border: #24304f;
  --text: #e8edf8;
  --muted: #93a0bd;
  --accent: #4f8cff;
  --accent-2: #2dd4bf;
  --pass: #34d399;
  --warn: #fbbf24;
  --fail: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
.hidden { display: none !important; }
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1080px; margin: 0 auto; padding: 18px 24px;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 22px; align-items: center; }
.site-header nav a { color: var(--muted); }
.link-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 6px 14px; border-radius: 99px; cursor: pointer; font-size: 0.9rem;
}
.link-btn:hover { border-color: var(--accent); color: var(--text); }

main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.hero { text-align: center; padding: 64px 0 40px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.78rem;
  color: var(--accent-2); margin-bottom: 8px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 16px; }
.hero .sub { color: var(--muted); max-width: 640px; margin: 0 auto 32px; font-size: 1.08rem; }

#audit-form { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; }
#audit-form input {
  flex: 1; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  font-size: 1rem;
}
#audit-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
button.btn, #audit-form button {
  padding: 14px 22px; border-radius: var(--radius); border: none; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #06121f; font-weight: 700; font-size: 1rem; white-space: nowrap;
}
button:disabled { opacity: 0.55; cursor: wait; }
.hint { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }
.pro-badge {
  display: inline-block; margin-top: 10px; padding: 4px 14px; border-radius: 99px;
  background: rgba(45, 212, 191, 0.12); color: var(--accent-2); font-size: 0.85rem;
}

/* Report */
.report { padding: 8px 0 24px; }
.report-head {
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.score-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .num {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 800; font-size: 2rem;
}
.score-ring .num small { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.report-meta { flex: 1; min-width: 220px; }
.report-meta .audited-url { color: var(--muted); word-break: break-all; font-size: 0.9rem; }
.grade-pill {
  display: inline-block; padding: 2px 14px; border-radius: 8px; font-weight: 800;
  font-size: 1.3rem; margin-right: 10px;
}
.g-A, .g-B { background: rgba(52, 211, 153, 0.15); color: var(--pass); }
.g-C { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.g-D, .g-F { background: rgba(248, 113, 113, 0.15); color: var(--fail); }

.top-fixes {
  margin-top: 18px; background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25); border-radius: var(--radius); padding: 18px 22px;
}
.top-fixes h3 { margin: 0 0 8px; font-size: 1rem; }
.top-fixes ol { margin: 0; padding-left: 20px; color: var(--muted); }
.top-fixes li { margin: 6px 0; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.cat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.cat-card h3 { margin: 0 0 4px; font-size: 1rem; display: flex; justify-content: space-between; }
.cat-card .bar { height: 8px; border-radius: 99px; background: var(--bg-card-2); overflow: hidden; margin: 10px 0 12px; }
.cat-card .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.check { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--bg-card-2); font-size: 0.88rem; }
.check .badge { flex-shrink: 0; width: 46px; text-align: center; border-radius: 6px; font-size: 0.72rem; font-weight: 700; padding: 1px 0; height: fit-content; margin-top: 3px; }
.b-pass { background: rgba(52, 211, 153, 0.15); color: var(--pass); }
.b-warn { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.b-fail { background: rgba(248, 113, 113, 0.15); color: var(--fail); }
.check .msg { color: var(--text); }
.check .rec { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }
.pages-list { margin-top: 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 22px; font-size: 0.9rem; }
.pages-list td { padding: 4px 14px 4px 0; color: var(--muted); }
.report-cta { text-align: center; margin-top: 22px; }
.error-box {
  background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius); padding: 18px 22px; color: var(--text);
}
.spinner { text-align: center; padding: 36px; color: var(--muted); }

/* Sections */
.how, .pricing, .faq { padding: 48px 0 12px; }
h2 { font-size: 1.7rem; text-align: center; margin-bottom: 28px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin-top: 0; font-size: 1.02rem; }
.card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }
.plan { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 36px rgba(79, 140, 255, 0.15); }
.plan .flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #06121f;
  font-size: 0.75rem; font-weight: 700; padding: 2px 14px; border-radius: 99px; margin: 0;
}
.plan h3 { margin: 0 0 6px; }
.price { font-size: 2.1rem; font-weight: 800; margin: 0 0 14px; }
.price span { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.plan ul { padding-left: 20px; color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.plan li { margin: 7px 0; }
.btn.ghost { background: none; border: 1px solid var(--border); color: var(--text); display: inline-block; text-align: center; }
.btn.ghost:hover { border-color: var(--accent); text-decoration: none; }
a.btn { display: block; padding: 12px; }
#checkout-form { display: flex; flex-direction: column; gap: 10px; }
#checkout-form input {
  padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.95rem;
}
.small { color: var(--muted); font-size: 0.8rem; }

.faq { max-width: 720px; margin: 0 auto; }
details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--border); margin-top: 56px; padding: 26px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  max-width: 1080px; margin-left: auto; margin-right: auto; color: var(--muted); font-size: 0.88rem;
}
.site-footer nav { display: flex; gap: 18px; }

dialog {
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; max-width: 430px; width: 92%;
}
dialog::backdrop { background: rgba(4, 8, 18, 0.7); }
dialog h3 { margin-top: 0; }
dialog input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-family: ui-monospace, monospace; font-size: 0.9rem;
}
.dialog-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }

/* Success page */
.success-wrap { max-width: 560px; margin: 9vh auto; padding: 0 24px; text-align: center; }
.key-box {
  background: var(--bg-card); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 16px; font-family: ui-monospace, monospace; word-break: break-all; margin: 18px 0;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  #audit-form { flex-direction: column; }
  .site-header nav { gap: 12px; }
}
