@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=Public+Sans:wght@400;500;600&display=swap");

:root {
  --fog: #eef2ef;
  --paper: #f8faf8;
  --ink: #17322b;
  --ink-soft: #4b5f58;
  --rule: #c7d3cd;
  --safe: #2c7a68;
  --amber: #e2a13b;
  --risk: #c2412d;
  --focus: #2c7a68;
  --on-ink: #f8faf8;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "Public Sans", "Segoe UI", Arial, sans-serif;
  --radius: 10px;
  --measure: 66ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fog: #0f1d19; --paper: #152823; --ink: #e5eee9; --ink-soft: #a7bab3;
    --rule: #2b443c; --safe: #5fbca5; --amber: #eab45a; --risk: #e8735f;
    --focus: #5fbca5; --on-ink: #0f1d19;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fog); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--safe); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); max-width: 14ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header and footer */
.site-head { padding: 20px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.brand svg { width: 28px; height: 28px; }
.site-head nav a { text-decoration: none; color: var(--ink-soft); margin-left: 20px; font-size: .95rem; }
.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 32px 0 48px; color: var(--ink-soft); font-size: .9rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }

/* Hero */
.hero { padding-top: 40px; padding-bottom: 64px; display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 1fr; padding-top: 72px; } }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); }
.hero ul.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.hero ul.facts li { padding-left: 28px; position: relative; }
.hero ul.facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 2px; background: var(--safe); }

/* Scan panel */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 24px; }
@media (min-width: 720px) { .panel { padding: 32px; } }
.switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.switch button { border: 0; background: transparent; color: var(--ink-soft); font: 500 .95rem var(--body); padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.switch button[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
label.field { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="email"], input[type="text"] {
  width: 100%; font: 400 1.1rem var(--body); color: var(--ink); background: var(--fog);
  border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px;
}
input::placeholder { color: var(--ink-soft); opacity: .7; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 20px; font-size: .95rem; color: var(--ink-soft); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--on-ink); border: 0; border-radius: 8px;
  font: 600 1.05rem var(--body); padding: 14px 22px; cursor: pointer; text-decoration: none;
}
.btn:hover { color: var(--on-ink); filter: brightness(1.15); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.full { width: 100%; }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.note { font-size: .88rem; color: var(--ink-soft); margin-top: 14px; }
.error { color: var(--risk); font-weight: 500; margin-top: 12px; }
.status { margin-top: 20px; }

/* The exposure meter: the one bold element */
.meter { margin: 8px 0 32px; }
.meter-scale { position: relative; height: 72px; }
.meter-ticks { position: absolute; inset: 0 0 26px 0; display: flex; justify-content: space-between; align-items: flex-end; }
.meter-ticks span { width: 2px; background: var(--rule); height: 30%; }
.meter-ticks span:nth-child(5n + 1) { height: 70%; background: var(--ink-soft); }
.meter-band { position: absolute; left: 0; right: 0; bottom: 20px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--safe) 0 25%, var(--amber) 25% 50%, #d9783a 50% 75%, var(--risk) 75% 100%); }
.meter-needle { position: absolute; bottom: 12px; width: 4px; height: 64px; margin-left: -2px; background: var(--ink); border-radius: 2px;
  left: 0; transition: left 1.4s cubic-bezier(.2,.8,.2,1); }
.meter-needle::after { content: ""; position: absolute; left: -6px; bottom: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); }
.meter-labels { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-soft); }
.meter-reading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.meter-reading strong { font: 700 clamp(3.5rem, 9vw, 5.5rem)/1 var(--display); }
.meter-reading .band { font: 600 1.25rem var(--display); }
@media (prefers-reduced-motion: reduce) { .meter-needle { transition: none; } }

/* Results */
.results { padding-top: 32px; padding-bottom: 32px; }
.results header p { color: var(--ink-soft); }
.grid-2 { display: grid; gap: 40px; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1.3fr 1fr; } }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { border-top: 1px solid var(--rule); padding: 24px 0; counter-increment: step; }
.step h3 { display: flex; gap: 12px; align-items: baseline; }
.step h3::before { content: counter(step); font: 700 1rem var(--display); color: var(--ink-soft); min-width: 1.2em; }
.pill { font: 600 .78rem var(--body); padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.urgent { color: var(--risk); }
.pill.important { color: #b9771f; }
.pill.recommended { color: var(--safe); }
.step ul { margin: 0 0 12px; padding-left: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.links a { font-size: .9rem; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; text-decoration: none; background: var(--paper); }
.do-it { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.do-it p { margin-bottom: 8px; }
.do-it .row { display: flex; flex-wrap: wrap; gap: 10px; }
.disclose { font-size: .8rem; color: var(--ink-soft); margin: 8px 0 0; }
details.template { margin-top: 12px; }
details.template pre { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; font: .9rem/1.5 var(--body); }
.found { list-style: none; padding: 0; margin: 0; }
.found li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.found li span { color: var(--ink-soft); font-size: .9rem; white-space: nowrap; }
.found small { display: block; color: var(--ink-soft); }
.upsell { background: var(--ink); color: var(--on-ink); border-radius: 14px; padding: 28px; margin-top: 32px; }
.upsell a.btn, .upsell button.btn { background: var(--on-ink); color: var(--ink); }
.upsell input { background: var(--paper); }
.upsell .check { color: inherit; opacity: .85; }

/* Scanning state */
.scanning { display: flex; gap: 14px; align-items: center; color: var(--ink-soft); }
.scanning .bar { flex: 1; height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.scanning .bar i { display: block; height: 100%; width: 30%; background: var(--safe); animation: sweep 1.6s ease-in-out infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .scanning .bar i { animation: none; width: 100%; opacity: .5; } }

/* How it works + legal */
.how { display: grid; gap: 32px; padding: 24px 0; }
@media (min-width: 900px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how h3 { margin-bottom: .3em; }
.how p { color: var(--ink-soft); }
.legal { max-width: 760px; padding: 24px 0; }
.legal h2 { margin-top: 1.6em; font-size: 1.35rem; }
.legal li { margin-bottom: .4em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .site-head nav { display: none; } }
