:root {
  --bg: #fafaf8; --fg: #16181d; --muted: #6b7079; --line: #e7e5df; --card: #ffffff; --soft: #f3f2ee;
  --accent: #16181d; --good: #1a9e5c; --ok: #d28a0b; --bad: #d64545;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0f11; --fg: #ececea; --muted: #8f949c; --line: #24262b; --card: #151619; --soft: #1b1d21; --accent: #ececea; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.55; font-size: 16px; }
a { color: inherit; text-decoration: none; }
p a, li a, .doc a, footer a:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
p a:hover, li a:hover, .doc a:hover { text-decoration-color: currentColor; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
.nav { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.nav nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav nav a { color: var(--muted); transition: color .15s; }
.nav nav a:hover { color: var(--fg); }
.nav form { margin: 0; }
.logo { font-weight: 650; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--good); }

/* Type */
.muted { color: var(--muted); } .small { font-size: 14px; }
h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; margin: 0 0 14px; }
h1 em { font-style: normal; color: var(--good); }
h1 a { text-decoration: none; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; display: flex; gap: 10px; align-items: baseline; }
h2 .small { font-weight: 400; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
b { font-weight: 600; }

/* Home */
.hero { padding: 64px 0 40px; max-width: 700px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 600px; }
.scan { display: flex; gap: 8px; flex-wrap: wrap; }
.scan input { flex: 1 1 240px; height: 50px; padding: 0 16px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); outline: none; transition: border-color .15s, box-shadow .15s; }
.scan input:focus { border-color: var(--muted); box-shadow: 0 0 0 3px var(--soft); }
.hero .scan button { height: 50px; padding: 0 22px; }
.hero > .muted { margin-top: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.grid4 > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.grid4 p { margin: 0; color: var(--muted); font-size: 14px; }
.small-cards { margin-top: 8px; }
.small-cards > div { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 0; }

/* Controls */
button, .btn { font: inherit; font-size: 15px; cursor: pointer; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); text-decoration: none; display: inline-block; line-height: 1.3; transition: background .15s, border-color .15s, opacity .15s; }
button:hover, .btn:hover { border-color: var(--muted); }
.scan button, button.primary, .btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.scan button:hover, button.primary:hover, .btn.primary:hover { opacity: .88; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 15px; }
button.link:hover { color: var(--fg); }
button.locked { opacity: 0.55; cursor: not-allowed; }
button.locked:hover { border-color: var(--line); }

/* Auth and notices */
.narrow { max-width: 440px; padding: 56px 0; }
.notice { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.error { color: var(--bad); }
#scan-status { display: flex; gap: 12px; align-items: center; margin-top: 16px; color: var(--muted); }
#scan-status p { margin: 0; }
#scan-status[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--good); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Report */
.report-head { padding: 40px 0 8px; }
.rings { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin: 24px 0 28px; }
.ring { --size: 88px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.ring > div { width: calc(var(--size) - 10px); height: calc(var(--size) - 10px); border-radius: 50%; background: var(--bg); display: grid; place-content: center; text-align: center; gap: 2px; }
.ring b { font-size: 24px; font-weight: 650; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ring span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.ring.big { --size: 124px; } .ring.big > div { width: calc(var(--size) - 12px); height: calc(var(--size) - 12px); } .ring.big b { font-size: 38px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 16px 0; }
.pillar ul { list-style: none; padding: 0; margin: 8px 0 0; }
.check { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; padding-top: 6px; }
.check b { font-size: 15px; }
.check p { margin: 2px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.check .fix { color: var(--fg); background: var(--soft); border-radius: 8px; padding: 8px 10px; margin-top: 8px; } .check .fix span { font-weight: 600; }
.ico { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 2px; }
.pass .ico { background: var(--good); } .warn .ico { background: var(--ok); } .fail .ico { background: var(--bad); } .info .ico { background: var(--muted); }
.code { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 13px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); color: var(--fg); resize: vertical; }

/* Leaderboard */
.tabs { display: inline-flex; gap: 2px; margin: 12px 0 20px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.tabs a:hover { color: var(--fg); }
.tabs a.active { background: var(--accent); color: var(--bg); }
.board { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
.board th, .board td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 15px; }
.board th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 500; border-top: 0; background: var(--soft); }
.board tbody tr:hover td { background: var(--soft); }
.board td a { word-break: break-all; font-weight: 500; }
.board td a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Pricing and docs */
.plans > div { display: flex; flex-direction: column; gap: 10px; }
.plans .price { font-size: 32px; font-weight: 650; letter-spacing: -0.02em; margin: 0; color: var(--fg) !important; }
.plans .price span { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; flex: 1; }
.plan-list li { margin: 4px 0; }
.buy { display: flex; flex-direction: column; gap: 8px; }
.buy input { padding: 11px 12px; font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); }
.doc { max-width: 680px; padding: 40px 0 0; }
.doc h2 { margin-top: 32px; font-size: 18px; }
.doc p, .doc li { color: var(--fg); }
.doc li { margin: 6px 0; }
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
main > section:first-child:not(.hero):not(.narrow):not(.report-head):not(.doc) { padding-top: 40px; }

/* Footer */
footer.wrap { margin-top: 72px; padding: 28px 20px 40px; border-top: 1px solid var(--line); line-height: 1.9; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }

@media (max-width: 600px) {
  .hide-sm { display: none; }
  .rings { gap: 12px; }
  .ring { --size: 80px; } .ring b { font-size: 20px; } .ring span { font-size: 10px; } .ring.big { --size: 104px; } .ring.big b { font-size: 32px; }
  .hero { padding: 40px 0 24px; }
  .nav nav { gap: 14px; font-size: 14px; }
  .pillar { padding: 16px; }
}
