/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7f6;
  --bg-2: #eceeed;
  --fg: #141716;
  --fg-2: #4a514e;
  --fg-3: #767d7a;
  --line: #d8dcda;
  --accent: #1b7f5f;
  --accent-ink: #ffffff;
  --accent-soft: #dff0e9;
  --danger: #b3412d;
  --radius: 12px;
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1160px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101312; --bg-2: #171b19; --fg: #e8ebe9; --fg-2: #b3bab6; --fg-3: #7f8783;
    --line: #2a302d; --accent: #39b78f; --accent-ink: #0d1511; --accent-soft: #16302a; --danger: #e07a66;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.55 var(--font); color: var(--fg); background: var(--bg); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
h1, h2 { font-family: var(--display); }
h1 { font-size: clamp(2.1rem, 1.2rem + 2.6vw, 3.15rem); text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--mono); font-weight: 500; }
main > section { max-width: var(--max); margin: 0 auto; padding: 5.5rem 1.25rem; }
.section-lede { color: var(--fg-2); max-width: 56ch; margin-top: .75rem; }
.lede { color: var(--fg-2); font-size: 1.15rem; max-width: 46ch; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 500 1rem/1 var(--font); padding: .85rem 1.3rem; border-radius: var(--radius);
  border: 1px solid transparent; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--secondary:hover { border-color: var(--fg-3); }
.btn--lg { font-size: 1.05rem; padding: 1rem 1.5rem; }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10; height: 68px;
  display: flex; align-items: center; gap: 2rem; padding: 0 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) { .nav { backdrop-filter: blur(12px); } }
.nav__brand { font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--fg-2); font-size: .95rem; }
.nav__links a:hover { color: var(--fg); }
.nav__cta { padding: .6rem 1rem; font-size: .95rem; }
@media (max-width: 760px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 4rem; align-items: center;
  padding-top: 4.5rem !important; padding-bottom: 4.5rem !important;
}
.hero__copy { display: grid; gap: 1.5rem; justify-items: start; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- Scan form ---------- */
.scan {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; display: grid; gap: 1.1rem; position: relative;
}
.scan__title { font-size: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 500; font-size: .95rem; }
.field input {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: .75rem .9rem; width: 100%;
}
.field input::placeholder { color: var(--fg-3); }
.field__help, .field__error, .scan__fine { font-size: .85rem; color: var(--fg-2); }
.field__error { color: var(--danger); display: none; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid input { border-color: var(--danger); }
.scan.is-sending button[type=submit] { opacity: .6; pointer-events: none; }
.scan.is-done > :not(.scan__done) { display: none; }
.scan.is-done .scan__done { display: grid; gap: .5rem; }
.scan__done-title { font-weight: 600; font-size: 1.25rem; }
.scan__fail { color: var(--danger); font-size: .9rem; }

/* ---------- Sample report ---------- */
.report {
  margin-top: 2.5rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); padding: 2rem; display: grid; gap: 2rem;
}
.report__label { font-size: .8rem; color: var(--fg-3); }
.report__head { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; flex-wrap: wrap; }
.report__biz { font-weight: 600; font-size: 1.3rem; }
.report__meta { color: var(--fg-2); }
.score { display: grid; justify-items: end; }
.score__num { font: 500 4.5rem/1 var(--mono); color: var(--accent); letter-spacing: -0.04em; }
.score__of { font-size: .85rem; color: var(--fg-2); }
.report__grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 2rem; }
.report__grid h3 { margin-bottom: .9rem; }
.engine-list { margin: 0; display: grid; gap: .6rem; }
.engine { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.engine dt { font-weight: 500; }
.engine dd { margin: 0; color: var(--fg-2); white-space: nowrap; }
.engine--absent dd { color: var(--danger); }
.instead-list, .fix-list { margin: 0; padding-left: 1.25rem; display: grid; gap: .75rem; }
.instead-list li { color: var(--fg-2); }
.fix-list li { color: var(--fg-2); }
.fix-list strong { color: var(--fg); font-weight: 500; }
@media (max-width: 900px) { .report__grid { grid-template-columns: 1fr; } .score { justify-items: start; } }

/* ---------- How ---------- */
.how { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; }
.how__intro { position: sticky; top: 6rem; align-self: start; display: grid; gap: .75rem; }
.how__intro p { color: var(--fg-2); max-width: 34ch; }
.how__steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; }
.how__steps li { counter-increment: step; padding: 1.75rem 0 1.75rem 3.25rem; position: relative; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.how__steps li::before { content: counter(step); position: absolute; left: 0; top: 1.6rem; font: 500 1.1rem/1 var(--mono); color: var(--accent); }
.how__steps p { color: var(--fg-2); }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; gap: 2rem; } .how__intro { position: static; } }

/* ---------- Why ---------- */
.why { text-align: left; }
.why__quote { margin: 0; }
.why__quote p { font-family: var(--display); font-size: clamp(1.5rem, 1rem + 1.8vw, 2.4rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; max-width: 30ch; text-wrap: balance; }

/* ---------- Pricing ---------- */
.plans { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 1.25rem; align-items: start; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: grid; gap: 1rem; background: var(--bg); }
.plan--featured { background: var(--accent-soft); border-color: transparent; }
.plan__tag { font-size: .8rem; font-weight: 500; color: var(--accent); }
.plan__price { display: flex; align-items: baseline; gap: .5rem; }
.plan__price .mono { font-size: 2.4rem; letter-spacing: -0.03em; }
.plan__per { color: var(--fg-2); }
.plan__for { color: var(--fg-2); min-height: 3.1em; }
.plan__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; color: var(--fg-2); font-size: .95rem; }
.plan__list li::before { content: "+ "; color: var(--accent); font-family: var(--mono); }
.pricing__note { margin-top: 1.25rem; color: var(--fg-3); font-size: .9rem; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan--featured { order: -1; } }

/* ---------- FAQ ---------- */
.faq__list { margin-top: 2rem; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--fg-3); }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin-top: .75rem; color: var(--fg-2); max-width: 62ch; }

/* ---------- Final + footer ---------- */
.final { text-align: center; display: grid; gap: 1.5rem; justify-items: center; }
.footer { border-top: 1px solid var(--line); padding: 2.5rem 1.25rem; max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; color: var(--fg-2); font-size: .9rem; }
.footer__brand { font-weight: 500; color: var(--fg); }
.footer__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--fg); }

/* ---------- Motion (reveal) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero__copy > * { animation: rise .7s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: .08s; }
  .hero__copy > :nth-child(3) { animation-delay: .16s; }
  .scan { animation: rise .7s var(--ease) .2s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* ---------- Prose pages ---------- */
.prose { max-width: 720px; display: grid; gap: 1rem; }
.prose h2 { font-size: 1.3rem; margin-top: 1.5rem; }
.prose p { color: var(--fg-2); }

/* ---------- Fix artifacts (Verdict v2) ---------- */
.artifact { margin-top: .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.artifact summary { cursor: pointer; padding: .6rem .9rem; font-weight: 500; font-size: .9rem; color: var(--accent); list-style: none; }
.artifact summary::-webkit-details-marker { display: none; }
.artifact summary::before { content: "</> "; font-family: var(--mono); font-size: .8rem; }
.artifact pre { margin: 0; padding: .9rem; overflow-x: auto; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.5; }
.artifact code { font-family: var(--mono); }
.artifact__note { padding: .6rem .9rem; font-size: .85rem; color: var(--fg-2); border-top: 1px solid var(--line); }

/* ---------- Score history sparkline ---------- */
.spark-wrap { display: grid; gap: .5rem; }
.spark-wrap h3 { margin: 0; }
.spark { max-width: 100%; }
.ranks h3 { margin-bottom: .9rem; }
