:root {
  --cyan: #22d3ee;
  --blue: #2563eb;
  --navy: #0c2d5c;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f6ff;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 18px; }
.brand img { border-radius: 9px; }
.pill { font-size: 12px; font-weight: 600; color: var(--blue); background: var(--soft); border: 1px solid #dbeafe; padding: 2px 8px; border-radius: 999px; }
.toplink { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Hero */
.hero { padding: 48px 0 24px; text-align: center; }
h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; color: var(--navy); margin: 0 0 12px; letter-spacing: -.02em; }
.lead { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 17px; }
.search { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; background: #fff; padding: 6px; border-radius: 999px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 16px; padding: 12px 16px; border-radius: 999px; background: transparent; color: var(--ink); }
.search button, .button {
  border: 0; cursor: pointer; font-weight: 700; font-size: 15px; color: #fff; padding: 12px 22px; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue)); white-space: nowrap; text-decoration: none; display: inline-block;
}
.search button:disabled { opacity: .6; cursor: progress; }
.search:focus-within { border-color: var(--blue); }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* Status */
.status { display: flex; flex-direction: column; align-items: center; padding: 24px 0; color: var(--muted); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid #dbeafe; border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 16px; color: var(--navy); margin: 0 0 12px; }
.error { border-color: #fecaca; background: #fff7f7; margin: 8px 0 24px; }
.error h2 { color: var(--bad); }
.result { margin: 8px 0 24px; display: grid; gap: 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Score */
.score-card { display: flex; align-items: center; gap: 24px; }
.ring {
  --pct: 0; --c: var(--blue);
  width: 132px; height: 132px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), #e8eef8 0);
  display: grid; place-items: center;
}
.ring-inner { width: 104px; height: 104px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; }
.ring-inner span { font-size: 36px; font-weight: 800; color: var(--navy); line-height: 1; }
.ring-inner small { color: var(--muted); font-size: 12px; }
.grade-line { margin: 0; font-size: 18px; font-weight: 600; }
.grade { display: inline-block; min-width: 34px; text-align: center; padding: 2px 10px; border-radius: 8px; background: var(--soft); color: var(--blue); font-weight: 800; }
.final-url { color: var(--muted); word-break: break-all; margin: 6px 0 0; font-size: 14px; }
.notes { margin: 10px 0 0; padding-left: 18px; color: var(--warn); font-size: 14px; }

/* Checks */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 12px 1fr; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.dot.healthy { background: var(--ok); }
.dot.warning { background: var(--warn); }
.dot.error { background: var(--bad); }
.check-name { font-weight: 600; font-size: 14px; }
.check-detail { grid-column: 2; color: var(--muted); font-size: 13px; }
.issues { margin: 0; padding-left: 20px; }
.issues li { margin-bottom: 10px; font-size: 14px; }
.more { color: var(--blue); font-weight: 600; font-size: 14px; margin: 4px 0 0; }

/* CTA */
.cta { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; margin: 24px 0; background: linear-gradient(135deg, #ffffff, var(--soft)); }
.cta h2 { font-size: 20px; }
.cta > div { min-width: 0; }
.sample-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 8px; font-size: 15px; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.snippet { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 16px; font-size: 12.5px; line-height: 1.55; overflow-x: auto; }

.fineprint { color: var(--muted); font-size: 13px; text-align: center; padding-bottom: 24px; }
.footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }

[hidden] { display: none !important; }

@media (max-width: 720px) {
  .hero { padding-top: 32px; }
  .search { flex-direction: column; border-radius: 18px; }
  .search button { width: 100%; }
  .grid, .cta { grid-template-columns: 1fr; }
  .score-card { flex-direction: column; text-align: center; }
  .toplink { font-size: 14px; }
}
.quick-note { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

/* Quick start guide page */
.guide { padding: 32px 16px 40px; max-width: 880px; }
.guide-cover { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.guide-card { margin-top: 20px; text-align: center; }
.guide-card h1 { margin-bottom: 8px; }
.guide-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.button.ghost { background: #fff; color: var(--blue); border: 2px solid #bfdbfe; }
