:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --text: #1d2420;
  --muted: #5c6661;
  --border: #e1ddd3;
  --accent: #256a5c;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0ec;
  --pass: #2f7d4f;  --pass-bg: #e4f3e9;
  --warn: #8a5a00;  --warn-bg: #fbf0d9;
  --fail: #b0352b;  --fail-bg: #fbe5e2;
  --info: #3d5a80;  --info-bg: #e5edf6;
  --soon: #6b6f75;  --soon-bg: #eeeef0;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614; --surface: #1a201d; --surface-2: #222a26; --text: #e7ece9; --muted: #9aa6a0;
    --border: #2f3934; --accent: #5fb8a4; --accent-ink: #0d1412; --accent-soft: #1d3530;
    --pass: #6fcf94; --pass-bg: #1a3324; --warn: #e8b55a; --warn-bg: #3a2e14;
    --fail: #f08a80; --fail-bg: #3d1f1c; --info: #8fb3e0; --info-bg: #1e2b3d;
    --soon: #a3a8ae; --soon-bg: #2a2d31;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.35rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }
code, pre { font-family: var(--mono); font-size: 0.92em; }
pre { background: var(--surface-2); padding: 1rem; border-radius: 8px; overflow-x: auto; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.muted, .hint, .meta { color: var(--muted); }
.hint { font-size: 0.92rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 600; color: var(--accent); margin: 0; }
.lede { font-size: 1.15rem; color: var(--muted); }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 0.9rem; }
nav a { margin-left: 1.1rem; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: var(--text); }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--muted); font-size: 0.9rem; }

/* forms */
input[type=text], input[type=email] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.8rem 1rem; width: 100%; min-width: 0;
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, .button {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 10px; padding: 0.8rem 1.3rem;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block; white-space: nowrap;
}
button.secondary, .button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.form-error { color: var(--fail); font-weight: 500; }
.scan-form { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.inline { display: flex; gap: 0.5rem; margin: 0.3rem 0 0.6rem; }
label.check { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.95rem; }
@media (max-width: 520px) { .scan-form, .inline { flex-direction: column; } }

/* landing */
.hero { padding: 3.5rem 0 1.5rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 0.6rem; }
.group-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.5rem; }
.group-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; display: flex; gap: 0.6rem; align-items: center; }
.gid { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.8rem 1rem; margin-bottom: 0.5rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.prose li { margin-bottom: 0.4rem; }

/* pending */
.pending { text-align: center; padding: 4rem 16px; }
.spinner { width: 44px; height: 44px; margin: 0 auto 1rem; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* report header */
.report-head { display: flex; gap: 1.75rem; align-items: center; padding-top: 2.5rem; }
@media (max-width: 600px) { .report-head { flex-direction: column; align-items: flex-start; } }
.dial { position: relative; width: 132px; height: 132px; flex: none; }
.dial svg { width: 100%; height: 100%; }
.dial-track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.dial-value { fill: none; stroke-width: 12; stroke-linecap: round; stroke: var(--accent); }
.dial-poor .dial-value { stroke: var(--fail); }
.dial-fair .dial-value { stroke: var(--warn); }
.dial-good .dial-value, .dial-great .dial-value { stroke: var(--pass); }
.dial-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial-num strong { font-size: 2.4rem; line-height: 1; }
.dial-num span { color: var(--muted); font-size: 0.85rem; }
.verdict { font-weight: 700; font-size: 1.15rem; margin: 0 0 0.3rem; }
.verdict-poor { color: var(--fail); } .verdict-fair { color: var(--warn); }
.verdict-good, .verdict-great { color: var(--pass); }
.verdict-none { color: var(--muted); }
.dial-none .dial-num strong { color: var(--muted); }
.meta { font-size: 0.88rem; margin: 0; }
.callout { background: var(--info-bg); color: var(--text); border-radius: var(--radius); padding: 0.8rem 1rem; margin-top: 1.5rem; }
.callout p { margin: 0.2rem 0; }

/* fixes */
.fixes { list-style: none; padding: 0; margin: 0; }
.fixes li { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 0.5rem; }
.fixes p { margin: 0.1rem 0; }
.pts { flex: none; min-width: 3.2rem; text-align: center; font-weight: 700; color: var(--pass); background: var(--pass-bg); border-radius: 8px; padding: 0.25rem 0.4rem; height: fit-content; }
.fix-title, .check-title { font-weight: 600; }
.tag { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: 0.05rem 0.35rem; white-space: nowrap; }
.unlock { background: var(--accent-soft); border-radius: var(--radius); padding: 1.2rem; margin-top: 1rem; }
.unlock form label[for=email] { font-weight: 600; font-size: 0.92rem; }

/* scorecard */
.scorecard { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.scorecard th, .scorecard td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--border); }
.scorecard thead th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.scorecard tbody th { font-weight: 500; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.bar-cell { width: 30%; }
.bar { width: 100%; height: 8px; display: block; }
.bar-track { fill: var(--surface-2); }
.bar-value { fill: var(--accent); }
@media (max-width: 600px) {
  .scorecard thead th:nth-child(n+4), .scorecard td:nth-child(n+4) { display: none; }
}

/* checks */
details.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem; }
details.group > summary { cursor: pointer; padding: 0.8rem 1rem; display: flex; justify-content: space-between; font-weight: 600; }
.group-score { font-variant-numeric: tabular-nums; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0 1rem 0.5rem; }
details .checks { border-top: 1px solid var(--border); }
.check-row { display: flex; gap: 0.9rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.check-row:last-child { border-bottom: 0; }
.check-row p { margin: 0.1rem 0; }
.check-detail { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }
.check-fix { font-size: 0.93rem; }
.pill { flex: none; width: 6.4rem; text-align: center; font-size: 0.78rem; font-weight: 600; border-radius: 999px; padding: 0.2rem 0.5rem; margin-top: 0.1rem; }
.pill-pass { color: var(--pass); background: var(--pass-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-fail, .pill-error { color: var(--fail); background: var(--fail-bg); }
.pill-info { color: var(--info); background: var(--info-bg); }
.pill-planned, .pill-locked { color: var(--soon); background: var(--soon-bg); }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.actions form { margin: 0; }
