/* Self-hosted variable fonts (SIL Open Font License), latin subset. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/atkinson-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --ink: #0c2a17;
  --muted: #4b5d51;
  --line: #d5dcd7;
  --field: #0c2a17;
  --green: #1a7a3c;
  --green-deep: #0e5a2a;
  --error: #a32a1a;
  --display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
h1, h2, h3, p { margin: 0; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible { outline: 3px solid rgba(26, 122, 60, 0.45); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-stretch: 108%; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; color: var(--green); }
.soon { font-size: 0.95rem; line-height: 1.3; text-align: right; color: var(--muted); }

/* Display type */
h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-weight: 800; font-stretch: 112%; font-size: clamp(2.7rem, 7.4vw, 6rem); line-height: 0.98; letter-spacing: -0.035em; }
h2 { font-weight: 800; font-stretch: 108%; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.02; letter-spacing: -0.03em; }
.lede { margin-top: 24px; max-width: 40ch; font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); }

/* Hero: the phone is cropped by the bottom edge of the section */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: end; padding-top: clamp(24px, 6vw, 72px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-copy { align-self: center; padding-bottom: clamp(40px, 7vw, 96px); }

/* Signup: one joined bar */
.signup { margin-top: 36px; max-width: 520px; }
.signup-form { display: flex; flex-wrap: wrap; }
.field { flex: 1 1 220px; min-width: 0; }
.field input { width: 100%; height: 58px; padding: 0 16px; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--field); border-right: 0; border-radius: 0; }
.field input::placeholder { color: #66756b; }
.field input:focus-visible { outline: 3px solid rgba(26, 122, 60, 0.45); outline-offset: 2px; }
.btn { flex: 0 0 auto; height: 58px; padding: 0 24px; font-family: var(--body); font-weight: 700; font-size: 1.02rem; color: #fff; background: var(--green); border: 2px solid var(--green); border-radius: 0; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn:focus-visible { outline: 3px solid rgba(26, 122, 60, 0.45); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.fine { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.error { margin-top: 12px; font-size: 0.95rem; font-weight: 700; color: var(--error); }
.done { padding-left: 18px; border-left: 4px solid var(--green); }
.done strong { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 1.3rem; font-weight: 700; font-stretch: 108%; }
.done .addr { font-weight: 700; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* Phone */
.phone { position: relative; justify-self: center; width: min(300px, 100%); aspect-ratio: 300 / 610; margin-bottom: -120px; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 8px solid var(--ink); border-radius: 40px; }
.phone::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 2; width: 84px; height: 22px; background: var(--ink); border-radius: 12px; transform: translateX(-50%); }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 36px; background: #f2f2f2; }

/* App UI, drawn from the real screens */
.ui { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.3; color: #222; }
.ui-top { padding: 4px 14px 0; text-align: right; font-size: 12px; font-weight: 600; color: var(--green); }
.ui-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 8px 16px; }
.ui-hero { margin-bottom: 6px; font-size: 17px; font-weight: 600; text-align: center; color: #111; }
.ui-btn { padding: 11px; font-size: 13px; font-weight: 600; text-align: center; color: #fff; background: var(--green); border-radius: 8px; }
.ui-shortcuts { display: flex; gap: 8px; }
.ui-shortcuts span { flex: 1; padding: 8px 0; font-size: 11px; font-weight: 600; text-align: center; color: var(--green); border: 1px solid var(--green); border-radius: 8px; }
.ui-card { display: grid; gap: 8px; padding: 12px; background: #eaf5ee; border-radius: 12px; }
.ui-card-title { font-size: 12px; font-weight: 700; color: var(--green); }
.ui-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.ui-mini { padding: 6px 8px; font-size: 10px; font-weight: 600; white-space: nowrap; color: #fff; background: var(--green); border-radius: 6px; }
.ui-sub { margin-top: 2px; font-size: 11px; font-weight: 700; }
.ui-habit { display: flex; align-items: center; gap: 8px; font-size: 10px; }
.ui-habit i { flex: 0 0 14px; height: 14px; border: 1.5px solid var(--green); border-radius: 3px; }
.ui-tabs { display: flex; padding: 8px 0 12px; background: #fff; border-top: 1px solid #ddd; }
.ui-tabs span { flex: 1; font-size: 10px; text-align: center; color: #8a8a8a; }
.ui-tabs span::before { content: ""; display: block; width: 0; height: 0; margin: 0 auto 3px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid currentColor; }
.ui-tabs .on { color: var(--green); }

/* Questions a beginner asks, each answered by a piece of the real app */
.asks { padding-block: clamp(56px, 9vw, 112px) clamp(24px, 4vw, 48px); }
.asks h2 { max-width: 18ch; }
.asks-list { margin-top: clamp(32px, 5vw, 64px); }
.ask { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
.ask h3 { max-width: 16ch; font-weight: 700; font-stretch: 106%; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.06; letter-spacing: -0.025em; }
.ask h3 + p { margin-top: 16px; max-width: 36ch; font-size: 1.12rem; color: var(--muted); }
.snip { justify-self: center; width: min(300px, 100%); display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 16px; background: #f2f2f2; border-radius: 12px; }
.ui-toggle { display: flex; gap: 3px; padding: 3px; font-size: 12px; font-weight: 600; color: #555; background: #fff; border-radius: 8px; }
.ui-toggle span { flex: 1; padding: 7px; text-align: center; border-radius: 6px; }
.ui-toggle .on { color: #fff; background: var(--green); }
.ui-label { font-size: 12px; text-align: center; color: #555; }
.ui-input { padding: 11px 12px; font-size: 14px; background: #fff; border: 1px solid #ccc; border-radius: 8px; }
.ui-suggest { padding: 10px; text-align: center; background: #fff; border-radius: 8px; }
.ui-suggest small { display: block; font-size: 12px; color: var(--green); }
.ui-suggest b { font-size: 22px; color: var(--green); }
.ui-result { padding: 16px; font-size: 15px; font-weight: 700; text-align: center; color: var(--green); background: #fff; border-radius: 12px; }
.ui-chart { padding: 10px 12px 6px; background: #fff; border-radius: 12px; }
.ui-chart svg { display: block; width: 100%; height: auto; }
.ui-callout { padding: 10px 12px; font-size: 12px; color: #333; background: #fff; border-radius: 8px; }
.ch-area { fill: #eaf5ee; stroke: none; }
.ch-line { fill: none; stroke: #1a7a3c; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: #1a7a3c; stroke: none; }
.ch-label { fill: #4b5d51; font: 600 11px system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }

/* Closing block and footer share one flat field of green */
.end { margin-top: clamp(24px, 4vw, 48px); color: #fff; background: var(--green-deep); }
.close { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 80px); align-items: end; padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px); }
.close h2 { max-width: 10ch; color: #fff; font-size: clamp(2.8rem, 7vw, 5.5rem); line-height: 0.96; }
.close .lede { color: #cfe4d6; }
.close .signup { margin-top: 0; }
.close .field input { color: #fff; background: transparent; border-color: #fff; }
.close .field input::placeholder { color: #a9c7b3; }
.close .field input:focus-visible, .close .btn:focus-visible { outline-color: #fff; }
.close .btn { color: var(--green-deep); background: #fff; border-color: #fff; }
.close .btn:hover { background: #dcebe1; border-color: #dcebe1; }
.close .fine { color: #b6d3c0; }
.close .error { color: #ffc9bf; }
.close .done { border-left-color: #fff; }

.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding-block: 32px 48px; font-size: 0.95rem; color: #b6d3c0; }
.foot a { color: #fff; text-underline-offset: 3px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 12px; }
.foot .mail { margin-bottom: 8px; overflow-wrap: anywhere; }
.stores p { margin: 0; }

/* Privacy, support and guide pages */
.doc { max-width: 720px; padding-block: clamp(24px, 5vw, 56px) clamp(56px, 9vw, 112px); }
.doc h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: 1.02; }
.doc .lead { margin-top: 20px; font-size: 1.2rem; color: var(--muted); }
.doc h2 { max-width: none; margin-top: 44px; font-weight: 700; font-stretch: 104%; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; }
.doc p, .doc ul { margin-top: 14px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--green-deep); text-underline-offset: 3px; }
.doc .updated { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
.doc h3 { margin-top: 28px; font-weight: 700; font-stretch: 104%; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.crumbs { margin-bottom: 16px; font-size: 0.95rem; }
.doc .crumbs a { color: var(--muted); }
.table-wrap { margin-top: 16px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.doc caption { padding-bottom: 8px; text-align: left; font-size: 0.95rem; color: var(--muted); }
.doc th, .doc td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.doc thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.doc tbody th { font-weight: 400; }
.doc td, .doc thead th:last-child { text-align: right; }
.doc .guide-list { margin-top: 32px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.doc .guide-list li + li { margin-top: 0; }
.doc .guide-list li { border-bottom: 1px solid var(--line); }
.doc .guide-list a { display: block; padding: 24px 0; color: var(--ink); text-decoration: none; }
.doc .guide-list a:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-list strong { display: block; font-family: var(--display); font-weight: 700; font-stretch: 104%; font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.015em; }
.guide-list span { display: block; margin-top: 6px; color: var(--muted); }
.cta-box { margin-top: 56px; padding-top: 24px; border-top: 4px solid var(--green); }
.doc .cta-box h2 { margin-top: 0; font-size: 1.5rem; }
.doc .btn-link { display: inline-block; margin-top: 16px; padding: 15px 24px; font-weight: 700; color: #fff; text-decoration: none; background: var(--green); }
.doc .btn-link:hover { background: var(--green-deep); }

@media (max-width: 860px) {
  .hero, .ask, .close { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 8px; }
  .phone { margin-top: 24px; }
  .snip { justify-self: start; }
}
@media (max-width: 700px) {
  .foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 20px; }
  .signup-form { gap: 10px; }
  .field input { border-right: 2px solid var(--field); }
  .close .field input { border-right: 2px solid #fff; }
  .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
