:root {
  --bg: #f3faf6;
  --surface: #ffffff;
  --text: #0b141a;
  --text-muted: #5b6b62;
  --accent-dark: #0b5c4c;
  --accent: #1e8e76;
  --accent-soft: #d6ece0;
  --navy: #1c2444;
  --border: #dcece3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1, h2, .brand-name { font-family: "Manrope", -apple-system, sans-serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Sticky footer -- main grows to fill the viewport, footer only ever sits below it. */
main { flex: 1 0 auto; }
footer { flex-shrink: 0; }

/* ---------- Logo mark (reused everywhere) ---------- */
.mark { border-radius: 22%; overflow: hidden; display: block; flex-shrink: 0; }
.mark svg { display: block; width: 100%; height: 100%; }

/* ---------- Navbar ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 250, 246, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; }
.brand-name { font-size: 17px; font-weight: 800; color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; }
.nav-links a:hover { color: var(--accent-dark); }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--navy); cursor: pointer; padding: 4px 6px; }
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 8px 24px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
}

/* ---------- Hero (index) ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; text-align: center; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; z-index: 0; }
.hero-blob.one { width: 360px; height: 360px; background: var(--accent); top: -140px; left: -100px; }
.hero-blob.two { width: 300px; height: 300px; background: var(--navy); top: -80px; right: -120px; opacity: 0.18; }
.hero-inner { position: relative; z-index: 1; }
.hero-icon { width: 84px; height: 84px; margin: 0 auto 26px; box-shadow: 0 16px 32px -12px rgba(11, 92, 76, 0.4); }
.hero h1 { font-size: 34px; line-height: 1.25; margin: 0 0 16px; color: var(--navy); text-wrap: balance; }
.hero p { font-size: 16.5px; line-height: 1.6; color: var(--text-muted); margin: 0 auto 24px; max-width: 520px; }
.badge {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Referral banner (index) ---------- */
#referral-banner {
  display: none;
  margin: 0 0 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.55;
}
#referral-banner strong { color: var(--navy); }
#referral-code {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg);
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ---------- Features (index) ---------- */
.features { padding: 56px 0; }
.features h2 { text-align: center; font-size: 24px; color: var(--navy); margin: 0 0 36px; }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 680px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 20px; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 8px; font-size: 15.5px; color: var(--navy); }
.feature-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }

/* ---------- Generic page header (privacy/tos/contact) ---------- */
.page-header { padding: 48px 0 8px; text-align: center; }
.page-header h1 { font-size: 28px; color: var(--navy); margin: 0 0 10px; }
.page-header p { font-size: 15px; color: var(--text-muted); margin: 0 auto; max-width: 480px; }

/* ---------- Legal content (privacy/tos) -- same width as the rest of the site (.wrap) ---------- */
.legal-wrap { padding: 24px 0 64px; }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 30px; }
.legal-card .updated-at { margin: 0 0 22px; font-size: 12.5px; font-style: italic; color: var(--text-muted); }
.legal-card h1 { display: none; } /* the fetched card repeats its own h1 -- page-header already shows the title */
.legal-card section { margin-bottom: 20px; }
.legal-card section:last-child { margin-bottom: 0; }
.legal-card h2 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; color: var(--navy); }
/* Section bodies are Markdown, rendered server-side to real HTML (2026-09-13) -- no more
   white-space:pre-wrap (that was a plain-text-newline hack, superseded by real <p>/<ul>/<h3>). */
.legal-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.legal-card p + p { margin-top: 10px; }
.legal-card h3 { margin: 16px 0 6px; font-size: 14px; font-weight: 700; color: var(--navy); }
.legal-card ul, .legal-card ol { margin: 8px 0; padding-left: 22px; }
.legal-card li { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin-bottom: 4px; }
.legal-card strong { color: var(--text); font-weight: 700; }
.legal-loading { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 14px; }

/* ---------- Contact page ---------- */
.contact-wrap { padding: 32px 0 64px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 720px; margin: 0 auto; }
@media (min-width: 620px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 24px; text-align: center; }
.contact-icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-card h2 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.contact-card p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--text-muted); }
.contact-card a.button {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--accent-dark); color: #ffffff; font-weight: 700; font-size: 14px; text-decoration: none;
}
.contact-card a.button:hover { background: var(--accent); }

/* ---------- Delete my data ---------- */
.dmd-wrap { padding: 32px 0 64px; }
.dmd-tabs { display: flex; justify-content: center; gap: 8px; margin: 0 0 20px; }
.dmd-tab {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-weight: 700; font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.dmd-tab.active { background: var(--accent-dark); border-color: var(--accent-dark); color: #ffffff; }
.dmd-card {
  max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px 30px; text-align: center;
}
.dmd-button-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dmd-button-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.dmd-button-secondary:hover { background: var(--accent-soft); }
.dmd-button-danger { background: #b3382c; }
.dmd-button-danger:hover { background: #942e24; }
#dmd-google-button { display: flex; justify-content: center; }
.dmd-explainer { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); text-align: left; }
.dmd-explainer-row { display: flex; align-items: flex-start; gap: 14px; }
.dmd-explainer-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dmd-explainer-icon svg { width: 19px; height: 19px; }
.dmd-explainer-row p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.dmd-step-label { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.dmd-code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 32px; font-weight: 800;
  letter-spacing: 0.12em; color: var(--accent-dark); background: var(--bg); border-radius: 12px;
  padding: 14px 0; margin: 0 0 18px;
}
.dmd-instructions { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.dmd-button {
  display: inline-block; padding: 12px 26px; border-radius: 999px; border: none;
  background: var(--accent-dark); color: #ffffff; font-weight: 700; font-size: 14.5px;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.dmd-button:hover { background: var(--accent); }
.dmd-button:disabled { opacity: 0.6; cursor: default; }
.dmd-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0 0; font-size: 13.5px; color: var(--text-muted); }
.dmd-spinner {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border);
  border-top-color: var(--accent-dark); animation: dmd-spin 0.8s linear infinite;
}
@keyframes dmd-spin { to { transform: rotate(360deg); } }
.dmd-expiry { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }
.dmd-result-icon { display: block; width: 48px; height: 48px; margin: 0 auto 16px; }
.dmd-result-icon svg { width: 100%; height: 100%; }
.dmd-result-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--navy); }
.dmd-result-body { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--text-muted); }
.dmd-result-body a { color: var(--accent-dark); }
.dmd-step:last-child .dmd-result-body,
#dmd-step-confirmed .dmd-result-body { margin-bottom: 0; }

/* ---------- Footer (every page) ---------- */
footer { background: var(--navy); color: #cdd6e8; padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .brand-name { color: #ffffff; }
.footer-brand p { margin: 0; font-size: 13px; line-height: 1.6; color: #9fb0c9; max-width: 240px; }
.no-tracking-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8fd4bb; }
footer h4 { margin: 0 0 14px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #7f8fae; }
footer .footer-col a { display: block; font-size: 13.5px; color: #cdd6e8; text-decoration: none; margin-bottom: 10px; }
footer .footer-col a:hover { color: #ffffff; }
.footer-bottom { padding: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 12.5px; color: #7f8fae; }
