:root {
  color-scheme: dark;
  --h: 165;
  --bg: oklch(.15 .028 var(--h));
  --card: oklch(.2 .032 var(--h));
  --card-2: oklch(.24 .034 var(--h));
  --ink: oklch(.14 .03 var(--h));
  --text: oklch(.96 .012 140);
  --muted: oklch(.76 .035 var(--h));
  --line: oklch(.3 .03 var(--h));
  --a1: oklch(.74 .18 25);
  --a2: oklch(.9 .16 100);
  --ok: oklch(.8 .15 150);
  --warn: oklch(.82 .15 80);
  --fail: oklch(.68 .19 25);
  --radius: 16px;
  --glow: color-mix(in oklch, var(--a2) 35%, transparent);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; scrollbar-color: oklch(.4 .05 var(--h)) var(--bg); }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in oklch, var(--a2) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, color-mix(in oklch, var(--a1) 8%, transparent), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 17px/1.6 Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--a1); color: var(--ink); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 64px);
  background: color-mix(in oklch, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in oklch, var(--line) 60%, transparent);
}

.brand { font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 18px; }
.brand span { color: var(--a2); }

.topnav { display: flex; gap: 26px; align-items: center; font-size: 14px; }
.topnav a { text-decoration: none; color: var(--muted); transition: color .15s ease; }
.topnav a:hover { color: var(--text); }

.cta-mini {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text) !important;
}
.cta-mini:hover { border-color: var(--a2); }

main { padding: 0 clamp(20px, 5vw, 64px); max-width: 1180px; margin: 0 auto; }

.hero { padding: clamp(56px, 9vw, 112px) 0 44px; max-width: 860px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  color: var(--a2);
  font-weight: 700;
  margin: 0 0 20px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.03;
  letter-spacing: -.035em;
  margin: 0 0 22px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--text) 30%, var(--a2) 65%, var(--a1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 660px; margin: 0 0 34px; }

.audit-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  background: var(--card);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 20px 60px -30px var(--glow);
}

.audit-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 20px;
  font: inherit;
  font-size: 17px;
  outline: none;
  color: var(--text);
}
.audit-form input::placeholder { color: color-mix(in oklch, var(--muted) 70%, transparent); }

.audit-form button {
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  background: linear-gradient(120deg, var(--a2), var(--a1)) 0 0/150% 100%;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background-position .3s ease, transform .15s ease;
}
.audit-form button:hover { background-position: 100% 0; }
.audit-form button:active { transform: scale(.985); }
.audit-form button:disabled { opacity: .6; cursor: progress; }

.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.examples button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.examples button:hover { border-color: var(--a2); color: var(--text); }

.hidden { display: none !important; }

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 30px;
}

.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--a2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#status-text { margin: 0; font-weight: 700; }

.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.steps li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; transition: all .3s ease; }
.steps li.done { color: var(--ink); background: var(--a2); border-color: var(--a2); }

.report { padding-bottom: 64px; }

.summary {
  display: flex;
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, color-mix(in oklch, var(--a2) 6%, transparent), transparent 45%),
    var(--card);
  box-shadow: 0 30px 80px -50px var(--glow);
  flex-wrap: wrap;
}

.gauge-wrap { display: flex; align-items: center; gap: 20px; }
.gauge { position: relative; width: 148px; height: 148px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.gauge .track { stroke: var(--line); }
.gauge .value { stroke: var(--a2); stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1), stroke .4s; }

.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.gauge-center strong { font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.gauge-center span { font-size: 12px; color: var(--muted); }

.grade-badge {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 16px;
  font-size: 27px;
  font-weight: 800;
  background: var(--card-2);
  color: var(--text);
}
.grade-badge.a { background: color-mix(in oklch, var(--ok) 24%, var(--card)); color: var(--ok); }
.grade-badge.b { background: color-mix(in oklch, var(--a2) 20%, var(--card)); color: var(--a2); }
.grade-badge.c { background: color-mix(in oklch, var(--warn) 20%, var(--card)); color: var(--warn); }
.grade-badge.d { background: color-mix(in oklch, var(--a1) 20%, var(--card)); color: var(--a1); }
.grade-badge.e, .grade-badge.f { background: color-mix(in oklch, var(--fail) 22%, var(--card)); color: var(--fail); }

.summary-text { flex: 1; min-width: 260px; }
.summary-domain { margin: 0 0 6px; font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.summary-text h2 { margin: 0 0 8px; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.025em; }
.meta-line { margin: 0 0 18px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.summary-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  border-radius: 999px;
  padding: 11px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-position .3s ease, border-color .2s ease;
}
.btn.primary { background: linear-gradient(120deg, var(--a2), var(--a1)) 0 0/150% 100%; color: var(--ink); }
.btn.primary:hover { background-position: 100% 0; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--a2); }

.counters { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 8px; font-size: 13px; color: var(--muted); }
.counters span { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in oklch, var(--card) 80%, transparent); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 16px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: color-mix(in oklch, var(--a2) 45%, var(--line)); box-shadow: 0 20px 50px -40px var(--glow); }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h3 { margin: 0 0 2px; font-size: 16px; letter-spacing: -.01em; }
.card-sub { margin: 0; font-size: 12px; color: var(--muted); }

.chip {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 17px;
  background: var(--card-2);
  color: var(--muted);
}
.chip.a { background: color-mix(in oklch, var(--ok) 22%, var(--card)); color: var(--ok); }
.chip.b { background: color-mix(in oklch, var(--a2) 18%, var(--card)); color: var(--a2); }
.chip.c { background: color-mix(in oklch, var(--warn) 18%, var(--card)); color: var(--warn); }
.chip.d { background: color-mix(in oklch, var(--a1) 18%, var(--card)); color: var(--a1); }
.chip.e, .chip.f { background: color-mix(in oklch, var(--fail) 20%, var(--card)); color: var(--fail); }

.card-items { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.card-items li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed color-mix(in oklch, var(--line) 55%, transparent);
}
.card-items li:last-child { border-bottom: 0; padding-bottom: 0; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transform: translateY(-1px); }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.fail { background: var(--fail); }
.item-main { flex: 1 1 auto; min-width: 0; }
.item-value { flex: 0 1 45%; min-width: 0; color: var(--muted); font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.item-detail { display: block; color: color-mix(in oklch, var(--muted) 70%, transparent); font-size: 12px; margin-top: 2px; }

.card.collapsed .card-items { display: none; }
.card-toggle {
  background: none; border: 0; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer; padding: 0; margin-top: 12px;
  text-decoration: underline; text-underline-offset: 2px;
}
.card-toggle:hover { color: var(--a2); }

.note {
  margin-top: 28px;
  padding: 22px 24px;
  border-left: 2px solid var(--a2);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}
.note strong { color: var(--text); }

.how, .checks, .lead-section { padding: 64px 0; border-top: 1px solid color-mix(in oklch, var(--line) 60%, transparent); }
.how h2, .checks h2, .lead-section h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin: 0 0 24px; }

.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 720px; }
.steps-list li { display: flex; gap: 18px; align-items: baseline; font-size: 17px; }
.steps-list span { color: var(--a2); font-size: 13px; font-weight: 800; letter-spacing: .1em; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.check-grid article { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: color-mix(in oklch, var(--card) 65%, transparent); }
.check-grid h3 { margin: 0 0 6px; font-size: 15px; }
.check-grid p { margin: 0; font-size: 13px; color: var(--muted); }

.lead-section p { color: var(--muted); max-width: 560px; }
.lead-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 620px; }
.lead-form input {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  outline: none;
}
.lead-form input:focus { border-color: var(--a2); }
.lead-status { font-size: 14px; color: var(--a2); min-height: 20px; }

.footer { padding: 28px clamp(20px, 5vw, 64px); border-top: 1px solid color-mix(in oklch, var(--line) 60%, transparent); font-size: 13px; color: var(--muted); }

.modal { position: fixed; inset: 0; background: color-mix(in oklch, var(--bg) 75%, transparent); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 40px 90px -40px var(--glow);
}
.modal-card h3 { margin: 0 0 4px; font-size: 20px; }
.modal-domain { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.modal-card form { display: grid; gap: 10px; }
.modal-card input {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
}
.modal-card input:focus { border-color: var(--a2); }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--text); }

@media (max-width: 720px) {
  .topnav { display: none; }
  .audit-form { border-radius: 18px; flex-direction: column; }
  .audit-form button { width: 100%; }
  .summary { flex-direction: column; align-items: flex-start; }
}

@media print {
  .topbar, .hero, .how, .checks, .lead-section, .footer, .summary-actions, .counters, .examples { display: none !important; }
  body { background: #fff; color: #111; }
  .card, .summary { background: #fff; border-color: #ccc; box-shadow: none; color: #111; }
  .card.collapsed .card-items { display: grid !important; }
  .report { padding: 0; }
}
