/* Shared base for the web form, the final screen and the legal pages
   (Figma 0104: Fake Form 12028-10117, Legal 12022-1598). */
@font-face { font-family: 'K2D'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/k2d-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'K2D'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/k2d-500-latin.woff2) format('woff2'); }
@font-face { font-family: 'K2D'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/k2d-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'K2D'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/k2d-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'K2D'; font-style: normal; font-weight: 800; font-display: swap; src: url(fonts/k2d-800-latin.woff2) format('woff2'); }

:root {
  --text: #121514;
  --text-2: #545b59;
  --text-3: #6b7472;
  --brand: #1f7f61;
  --brand-press: #1a6b52;
  --brand-2: #2e9c78;
  --link: #1a7357;
  --tint: #eaf6f0;
  --line: #e2e8e6;
  --border: #8a9391;
  --disabled: #e6ecea;
  --pressed: #f4f7f6;
  --error: #c62f2f;
  --scrim: rgba(18, 21, 20, .4);
  --shadow: 0 8px 24px rgba(13, 51, 38, .08);
  --shadow-cta: 0 8px 16px rgba(13, 51, 38, .14);
  --gutter: max(16px, calc((100% - 448px) / 2));
  --font: 'K2D', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
/* The page background is a left-to-right gradient, so it repeats down long pages without stretching. */
html {
  background: #ffffff linear-gradient(90deg, #edf9f7 0%, #ffffff 50%, #f6f2e7 100%);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font: 400 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
svg, img, canvas { display: block; flex: none; }
img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Primary button */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  padding: 10px 24px;
  border: 0;
  border-radius: 100px;
  background: var(--brand);
  color: #ffffff;
  font: 800 18px/23.4px var(--font);
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.cta:active { background: var(--brand-press); transform: scale(.985); }
.cta:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
/* Disabled buttons let taps through to their wrapper, which then shows what is missing. */
.cta:disabled {
  background: var(--disabled);
  color: var(--text-3);
  box-shadow: none;
  transform: none;
  pointer-events: none;
  cursor: default;
}

/* Full-height screens */
.screen { display: none; flex-direction: column; width: 100%; min-height: 100vh; min-height: 100dvh; }
.screen.is-active { display: flex; }

/* Form / Loading (12042-4274) */
.loader {
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) max(34px, env(safe-area-inset-bottom));
  text-align: center;
}
.loader-jar { width: 136px; height: 212px; }
.loader-text { display: flex; flex-direction: column; gap: 4px; }
.loader-title { font: 800 18px/23.4px var(--font); color: var(--text); }
.loader-sub { font: 400 14px/19.6px var(--font); color: var(--text-2); }

/* Legal pages (Figma: Legal, FAQ, Terms of Use, Privacy Policy, Contact Us) */
.legal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(16px, calc(env(safe-area-inset-top) + 8px)) 16px max(34px, calc(env(safe-area-inset-bottom) + 16px));
}
.legal-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  text-decoration: none;
}
.back-btn:active { background: var(--pressed); }
.back-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.legal-title { min-width: 0; font: 800 22px/28.6px var(--font); color: var(--text); }

.menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--line);
  box-shadow: var(--shadow);
  list-style: none;
}
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  background: #ffffff;
  color: var(--text);
  font: 500 16px/22.4px var(--font);
  text-decoration: none;
}
.menu-row:active { background: var(--pressed); }
.menu-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--tint);
}
.menu-label { flex: 1; min-width: 0; }

.legal-content { display: flex; flex-direction: column; gap: 12px; }
.legal-meta { display: flex; flex-direction: column; gap: 2px; font: 500 13px/18.2px var(--font); color: var(--text-3); }
.doc {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 20px 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}
.doc-section { display: flex; flex-direction: column; gap: 8px; }
.doc-section h2 { font: 800 18px/23.4px var(--font); color: var(--text); }
.doc-body { display: flex; flex-direction: column; gap: 12px; }
.doc p,
.doc li { font: 400 14px/19.6px var(--font); color: var(--text-2); overflow-wrap: break-word; }
.doc strong { font-weight: 600; color: var(--text); }
.doc a,
.faq-a a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.doc ul { display: flex; flex-direction: column; gap: 6px; list-style: none; }
.doc li { position: relative; padding-left: 16px; }
.doc li::before {
  content: '';
  position: absolute;
  left: .5px;
  top: 7.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-2);
}
.doc-details { display: flex; flex-direction: column; gap: 4px; }
/* The referral disclosure quoted in Terms §11 and Privacy §6 */
.doc .doc-callout { padding: 12px 14px; border-radius: 16px; background: var(--tint); box-shadow: inset 0 0 0 1px rgba(31, 127, 97, .12); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border-radius: 20px; background: #ffffff; box-shadow: var(--shadow); }
.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  font: 600 16px/22.4px var(--font);
  color: var(--text);
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 20px; }
.faq-q { flex: 1; min-width: 0; }
.faq-item summary svg { transition: transform .2s ease; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-a { margin-top: -8px; padding: 0 16px 16px; font: 400 14px/19.6px var(--font); color: var(--text-2); overflow-wrap: break-word; }
.faq-a strong { font-weight: 600; color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .cta, .faq-item summary svg { transition: none; }
}
