/* Zeq Health landing page. Palette and type follow the app (docs/integration-notes/d1-design.md): white and green,
   system UI face (no web fonts: CSP 'self'), rounded display face where the platform has one. No external resources.
   Contrast (WCAG 2.x): ink 16.7:1, muted 5.6:1 on white, green 5.4:1 on white, white on green 5.4:1. */
:root {
  --bg: #ffffff; --tint: #f4f8f5; --ink: #0e2219; --muted: #5b6b64; --green: #047a4b; --green-ink: #036240;
  --green-soft: #e6f5ec; --off: #7b8a83; --danger: #c2332b; --line: #d8e3dc;
  --display: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --wrap: 72rem; --pad: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; font: 1.0625rem/1.6 var(--text); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 3.75rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.65rem, 1.2rem + 2vw, 2.4rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.75rem; max-width: 24ch; }
h3 { font-size: 1.3rem; line-height: 1.25; font-weight: 750; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.08rem; line-height: 1.3; font-weight: 700; margin: 0 0 0.3rem; }
p { margin: 0 0 1rem; max-width: 66ch; }
.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.section-lead { color: var(--muted); font-size: 1.125rem; max-width: 58ch; margin-bottom: 2rem; }

/* Header */
header.top { max-width: var(--wrap); margin: 0 auto; padding: 1rem var(--pad); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font: 800 1.15rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }
header.top nav { order: 3; width: 100%; overflow-x: auto; }
header.top nav ul { list-style: none; margin: 0; padding: 0.25rem 0; display: flex; gap: 1.25rem; white-space: nowrap; }
header.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
header.top nav a:hover { color: var(--green-ink); text-decoration: underline; }
@media (min-width: 56rem) {
  header.top nav { order: 0; width: auto; margin-left: auto; }
}

main { display: block; }
.band, .hero, .final { max-width: var(--wrap); margin: 0 auto; padding: clamp(2.75rem, 6vw, 4.5rem) var(--pad); }
/* Full-bleed bands keep the same text edge as the rest of the page. */
.different, .final, footer.bottom { max-width: none; padding-left: max(var(--pad), calc((100% - var(--wrap)) / 2 + var(--pad))); padding-right: max(var(--pad), calc((100% - var(--wrap)) / 2 + var(--pad))); }

/* Hero: the one bold moment. A fasting ring, larger than the page, sweeps in behind the phone. */
.hero { display: grid; gap: 2.5rem; align-items: center; padding-top: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 56rem) { .hero { overflow-x: clip; } }
@media (min-width: 56rem) { .hero { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; } }
.hero-art { position: relative; display: grid; place-items: center; min-height: 34rem; isolation: isolate; }
@property --sweep { syntax: "<percentage>"; inherits: false; initial-value: 91%; }
.hero-ring {
  position: absolute; z-index: -1; width: min(32rem, 118vw); aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 331deg, var(--green) 0 var(--sweep), var(--green-soft) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.6rem), #000 calc(100% - 1.55rem));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.6rem), #000 calc(100% - 1.55rem));
  animation: sweep 1.6s cubic-bezier(.2,.7,.2,1) 0.2s both;
}
@keyframes sweep { from { --sweep: 0%; } to { --sweep: 91%; } }

/* Doors: the two calls to action */
.doors { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem 1.25rem; max-width: 42rem; }
@media (min-width: 36rem) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doors p { font-size: 0.92rem; color: var(--muted); margin: 0.5rem 0.25rem 0; }
.btn { white-space: nowrap; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3.4rem; padding: 0.75rem 1.25rem; border-radius: 999px; font: 700 1.02rem/1.2 var(--text); text-decoration: none; border: 2px solid var(--green); transition: background-color .15s, color .15s; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }
.btn-secondary { background: #fff; color: var(--green-ink); }
.btn-secondary:hover { background: var(--green-soft); color: var(--green-ink); }

/* Phone mockup, drawn from the app's real screen (d1-shots/iphone15-17-fast-running.png) */
.phone { width: 18.5rem; border-radius: 2.9rem; padding: 0.6rem; background: var(--ink); box-shadow: 0 2.5rem 4rem -1.5rem rgba(4, 64, 40, 0.45); }
.phone-screen { border-radius: 2.35rem; background: #fff; overflow: hidden; display: flex; flex-direction: column; padding: 1.1rem 1rem 0; font-size: 0.82rem; line-height: 1.35; }
.phone-screen p { margin: 0; }
.ph-bar { text-align: center; font: 700 1rem/1 var(--display); padding: 0.35rem 0 0.9rem; }
.ph-ring { position: relative; width: 12rem; aspect-ratio: 1; margin: 0 auto 0.75rem; display: grid; place-content: center; text-align: center; }
.ph-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--green) 0 91%, var(--green-soft) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 0.85rem), #000 calc(100% - 0.8rem)); mask: radial-gradient(farthest-side, transparent calc(100% - 0.85rem), #000 calc(100% - 0.8rem)); }
.ph-time { font: 800 2.1rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ph-target { color: var(--muted); margin-top: 0.35rem; }
.ph-btn { border-radius: 999px; text-align: center; font-weight: 700; padding: 0.7rem; }
.ph-end { background: var(--danger); color: #fff; }
.ph-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin: 0.6rem 0 0.8rem; }
.ph-ghost { border: 1.5px solid var(--danger); color: var(--danger); border-radius: 999px; padding: 0.45rem 0.7rem; font-weight: 700; }
.ph-link { color: var(--green); font-weight: 700; padding-right: 0.3rem; }
.ph-card { border: 1px solid var(--line); border-radius: 1.1rem; padding: 0.75rem 0.85rem; margin-bottom: 0.8rem; }
.ph-card-title { font-weight: 800; font-family: var(--display); margin-bottom: 0.2rem !important; }
.ph-note { color: var(--muted); font-size: 0.72rem; margin-top: 0.3rem !important; }
.ph-tabs { list-style: none; margin: 0 -1rem; padding: 0.5rem 0.4rem 0.9rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); font-size: 0.62rem; color: var(--muted); text-align: center; }
.ph-tabs li { display: grid; justify-items: center; gap: 0.2rem; padding-top: 0.2rem; }
.ph-ico { width: 1.6rem; height: 1.05rem; border-radius: 999px; display: grid; place-items: center; }
.ph-ico::after { content: ""; width: 0.75rem; height: 0.75rem; border: 2px solid currentColor; border-radius: 50%; }
.ph-tabs .on { color: var(--green-ink); font-weight: 700; }
.ph-tabs .on .ph-ico { background: var(--green-soft); width: 2.4rem; }

/* How it works: two numbered sequences */
.two { display: grid; gap: 1rem 4rem; }
@media (min-width: 48rem) { .two { grid-template-columns: 1fr 1fr; } }
.two h3 { margin-top: 1rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.6rem 3.75rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -0.15rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); font: 800 1.15rem/1 var(--display); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 1.25rem; top: 2.75rem; bottom: 0.2rem; width: 2px; background: var(--green-soft); }
.steps p { color: var(--muted); }

/* What's different underneath: the promises, each with a plain "how" line */
.different { background: var(--tint); }
.diff { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); counter-reset: diff; }
.diff li { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; }
.diff h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.diff h3::before { counter-increment: diff; content: counter(diff); display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; margin-right: 0.6rem; border-radius: 50%; background: var(--green); color: #fff; font-size: 0.95rem; vertical-align: 0.1em; }
.diff p { margin: 0 0 0.75rem; }
.diff .how-line { margin: auto 0 0; padding-top: 0.75rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: 0.95rem; }
.diff .how-line strong { color: var(--green-ink); }

/* Comparison: rows are the questions, columns the apps; the question column sticks while the table scrolls sideways */
.compare-sec { border-top: 1px solid var(--line); }
.table-wrap { position: relative; overflow-x: auto; margin: 0 0 1.25rem; -webkit-overflow-scrolling: touch; }
.compare-wrap { border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.compare-wrap:focus-visible { outline: 3px solid var(--ink); }
.scroll-hint { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
@media (min-width: 90rem) { .scroll-hint { display: none; } }
.compare { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 78rem; font-size: 0.9rem; line-height: 1.4; table-layout: fixed; }
.compare caption { text-align: left; font-weight: 700; padding: 0.9rem 1rem 0.6rem; color: var(--muted); caption-side: top; }
.compare th, .compare td { padding: 0.8rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font: 800 0.95rem/1.2 var(--display); color: var(--ink); border-bottom: 2px solid var(--ink); vertical-align: bottom; }
.compare .dim { position: sticky; left: 0; z-index: 1; width: 10.5rem; background: #fff; box-shadow: 1px 0 0 var(--line); }
.compare thead .dim { z-index: 2; }
.compare tbody .dim { font-weight: 700; }
.compare .dim small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.compare .ours { width: 13.5rem; background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
.compare thead .ours { background: var(--green); color: #fff; border-bottom-color: var(--green-ink); }
.compare td .t { display: block; font-weight: 600; }
.compare td .q { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.25rem; }
.compare .c-none { color: var(--off); font-style: italic; }
.ref { font-size: 0.75rem; margin-left: 0.15rem; white-space: nowrap; }
@media (max-width: 40rem) { .compare { min-width: 82rem; } .compare .dim { width: 8rem; } .compare .ours { width: 11.5rem; } }
.compare-note { font-size: 0.92rem; color: var(--muted); }
.compare-ours { font-weight: 600; }
.sources summary { cursor: pointer; font-weight: 700; color: var(--green-ink); padding: 0.4rem 0; }
.sources ol { font-size: 0.9rem; color: var(--muted); padding-left: 1.4rem; }
.sources li { margin-bottom: 0.3rem; overflow-wrap: anywhere; }
.sources li:target { background: var(--green-soft); }

/* Features and the engine explainer */
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.feats li { padding-top: 1rem; border-top: 3px solid var(--green-soft); }
.feats h3 { font-size: 1.1rem; margin: 0 0 0.3rem; }
.feats p { color: var(--muted); margin: 0; }
.engine, .features, .how, .safety-sec { border-top: 1px solid var(--line); }
.boundary { margin-top: 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--green); background: var(--tint); border-radius: 0 0.75rem 0.75rem 0; max-width: 60rem; }

/* Safety and sharing */
.privacy-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 56rem) { .privacy-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.share-mock { background: #fff; border: 1px solid var(--line); border-radius: 1.5rem; padding: 1.25rem 1.25rem 0.5rem; box-shadow: 0 1.5rem 3rem -1.5rem rgba(4, 64, 40, 0.3); max-width: 24rem; }
.share-title { font: 800 1.1rem/1.2 var(--display); margin-bottom: 0.5rem; }
.share-mock ul { list-style: none; margin: 0; padding: 0; }
.share-mock li { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 3.5rem; border-top: 1px solid var(--line); font-weight: 600; }
.sw { width: 3.25rem; height: 2rem; border-radius: 999px; background: var(--off); position: relative; }
.sw::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.sw-on { background: var(--green); }
.sw-on::after { left: auto; right: 0.2rem; }
.safety { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 1.5rem; background: var(--tint); border-left: 6px solid var(--green); }
.safety ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.safety li { margin-bottom: 0.35rem; }
.safety p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq h2 { margin-bottom: 1.5rem; }
.faq details { border-bottom: 1px solid var(--line); max-width: 52rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; font-weight: 700; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.6rem; height: 0.6rem; border-right: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 0.5rem; }

/* Final call to action */
.final { background: var(--green); color: #fff; }
.final h2 { color: #fff; }
.final p { color: #fff; }
.final .doors p { color: #fff; }
.final .btn-primary { background: #fff; color: var(--green-ink); border-color: #fff; }
.final .btn-primary:hover { background: var(--green-soft); }
.final .btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.final .btn-secondary:hover { background: var(--green-ink); }
.final :focus-visible { outline-color: #fff; }

/* Footer */
footer.bottom { background: var(--tint); padding: 2.5rem var(--pad) 3rem; color: var(--muted); font-size: 0.92rem; }
footer.bottom p { max-width: 70rem; }
footer .medical { color: var(--ink); font-weight: 600; }
footer.bottom nav ul { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer.bottom a { color: var(--green-ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print { header.top nav, .skip, .hero-art, .doors { display: none; } .final { background: none; color: var(--ink); } }
