/* CitizenPrep — palette taken from the app: icon navy + torch gold (AppIcon),
   Theme.navy / Theme.steel backdrop gradient and Theme.flagRed (CitizenPrepApp.swift). */
:root {
  --paper: #F5F7FB;
  --paper-deep: #E7ECF5;
  --card: #FFFFFF;
  --navy: #0C2951;          /* app icon background */
  --navy-deep: #0D1F4D;     /* Theme.navy */
  --steel: #26478C;         /* Theme.steel */
  --ink: #0F2142;
  --ink-soft: rgba(15, 33, 66, .74);
  --ink-quiet: rgba(15, 33, 66, .58);
  --line: rgba(15, 33, 66, .14);
  --gold: #EBAA0A;          /* torch + stars */
  --gold-soft: #FFE7A3;
  --gold-ink: #8A5E00;      /* gold that passes contrast on white */
  --red: #B81C33;           /* Theme.flagRed */
  --green: #1D7A3A;
  --serif: ui-serif, "New York", Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 18px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.45rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  font: 600 .74rem/1.4 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.rule { width: 44px; height: 3px; background: var(--gold); border: 0; border-radius: 2px; margin: 14px 0 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section-head { max-width: 700px; margin-bottom: 40px; }
.section-head h2 { margin-top: 10px; }
.section-head .lead { margin-top: 14px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .rule { margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 247, 251, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem var(--serif); color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: none; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--navy);
  background: var(--navy); color: #fff;
  font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.topbar .btn { margin-left: auto; min-height: 38px; padding: 0 16px; font-size: .9rem; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .topbar .btn { margin-left: 8px; }
}

/* ---------- Store badges ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; }
.store { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.store__badge { height: 52px; display: flex; align-items: center; }
.store__badge img { height: 52px; width: auto; }
/* Google's badge PNG ships with transparent padding (badge ≈ 87% × 67% of the file) */
.store__badge--play { overflow: hidden; }
.store__badge--play img { height: 78px; margin: -13px -11px; max-width: none; }
.store__note { font-size: .82rem; color: var(--ink-quiet); padding-left: 2px; }
.store__note b { color: var(--ink); font-weight: 600; }

/* ---------- Hero (navy, like the app's backdrop) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--steel) 100%);
  padding: 44px 0 76px;
}
.hero::before {
  /* the icon's three gold stars, as a faint watermark */
  content: ""; position: absolute; right: -60px; top: -40px; width: 420px; height: 420px; opacity: .07;
  background: radial-gradient(circle at 50% 50%, var(--gold) 0 2px, transparent 3px) 0 0 / 28px 28px;
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.hero .wrap { position: relative; display: grid; gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { margin-top: 14px; color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { margin-top: 18px; max-width: 34em; color: rgba(255, 255, 255, .86); }
.hero .stores { margin-top: 30px; }
.hero .store__note { color: rgba(255, 255, 255, .72); }
.hero .store__note b { color: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; list-style: none; font-size: .92rem; color: rgba(255, 255, 255, .86); }
.checks li { display: flex; align-items: center; gap: 7px; }
.checks svg { flex: none; color: var(--gold); }
.hero__phones { position: relative; height: 520px; max-width: 460px; width: 100%; margin: 0 auto; }
.phone {
  position: absolute; width: 240px;
  border-radius: 38px; padding: 8px;
  background: #050B1A;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
}
.phone img { border-radius: 31px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; background: var(--navy-deep); }
.hero__phones .phone:nth-child(1) { left: 0; top: 30px; transform: rotate(-4deg); }
.hero__phones .phone:nth-child(2) { right: 0; top: 0; transform: rotate(3deg); }
.hero__seal {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  background: var(--gold); color: var(--navy-deep); border-radius: 999px;
  padding: 10px 18px; white-space: nowrap;
  font: 700 .76rem var(--sans); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6);
}
@media (max-width: 520px) {
  .hero__phones { height: 430px; }
  .phone { width: 196px; border-radius: 32px; padding: 7px; }
  .phone img { border-radius: 26px; }
}
@media (min-width: 960px) {
  .hero { padding: 68px 0 100px; }
  .hero .wrap { grid-template-columns: 1.08fr .92fr; }
  .hero__phones { height: 590px; }
  .phone { width: 262px; }
}

/* ---------- Stats band ---------- */
.stats { border-bottom: 1.5px solid var(--line); background: var(--card); }
.stats .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: 26px 12px; text-align: center; }
.stat + .stat { border-left: 1.5px solid var(--line); }
.stat:nth-child(3) { border-left: 0; }
.stat:nth-child(n+3) { border-top: 1.5px solid var(--line); }
.stat__num { font: 700 2.2rem/1 var(--serif); color: var(--navy); }
.stat__num small { font-size: .55em; color: var(--ink-quiet); font-weight: 600; }
.stat__label { margin-top: 8px; font-size: .86rem; color: var(--ink-soft); }
@media (min-width: 760px) {
  .stats .wrap { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 1.5px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 0; }
}

/* ---------- Feature cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { margin-top: 16px; }
.card p { margin-top: 8px; color: var(--ink-soft); font-size: .98rem; }
.icon-ring {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper-deep); display: grid; place-items: center; color: var(--navy);
}
.card--hero { background: var(--navy); border-color: var(--navy); color: #fff; }
.card--hero p { color: rgba(255, 255, 255, .86); }
.card--hero .icon-ring { background: var(--gold); color: var(--navy-deep); }
.card--red .icon-ring { background: var(--red); color: #fff; }

/* ---------- Spotlight rows (screenshot + copy) ---------- */
.spot { display: grid; gap: 40px; align-items: center; }
.spot + .spot { margin-top: 84px; }
.spot .phone { position: static; width: 250px; margin: 0 auto; }
.spot h2 { margin-top: 10px; }
.spot .lead { margin-top: 14px; }
@media (min-width: 860px) {
  .spot { grid-template-columns: 300px minmax(0, 1fr); gap: 64px; }
  .spot--flip { grid-template-columns: minmax(0, 1fr) 300px; }
  .spot--flip .spot__media { order: 2; }
}
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.ticks li b { color: var(--ink); }
.ticks svg { flex: none; margin-top: 4px; color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.chips li {
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line);
  font-size: .9rem; color: var(--ink);
}
.chips .live { border-color: rgba(29, 122, 58, .35); background: #EAF6EE; color: var(--green); font-weight: 600; }
.note {
  margin-top: 26px; padding: 18px 20px; border-radius: 14px;
  background: var(--card); border: 1.5px dashed var(--line); font-size: .95rem; color: var(--ink-soft);
}
.note strong { color: var(--ink); }

/* ---------- Screenshot gallery ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 20px 26px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  max-width: var(--wrap); margin: 0 auto;
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .phone { position: static; width: 100%; border-radius: 32px; padding: 7px; box-shadow: 0 18px 40px -26px rgba(12, 41, 81, .7); }
.gallery .phone img { border-radius: 26px; }
.gallery figcaption { margin-top: 14px; font-size: .92rem; text-align: center; color: var(--ink-soft); }
.gallery figcaption b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; }
@media (min-width: 1100px) { .gallery { grid-auto-columns: minmax(0, 1fr); overflow: visible; } }

/* ---------- Which test ---------- */
.tests { background: var(--card); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.versions { display: grid; gap: 18px; }
@media (min-width: 760px) { .versions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.version { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 26px 24px; background: var(--paper); }
.version--current { border-color: var(--navy); background: var(--card); box-shadow: 0 18px 40px -30px rgba(12, 41, 81, .6); }
.version__tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font: 700 .72rem var(--sans);
  letter-spacing: .08em; text-transform: uppercase; background: var(--paper-deep); color: var(--ink-soft);
}
.version--current .version__tag { background: var(--gold); color: var(--navy-deep); }
.version h3 { margin-top: 14px; font-size: 1.5rem; }
.version .who { margin-top: 6px; color: var(--ink-soft); }
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 14px; align-items: baseline; }
.facts .k { flex: none; min-width: 52px; font: 700 1.6rem/1.1 var(--serif); color: var(--navy); }
.version--current .facts .k { color: var(--red); }
.facts .v { color: var(--ink-soft); }
.facts .v b { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq details:first-child { border-top: 1.5px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 700 1.1rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-soft); }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Final CTA ---------- */
.cta { color: #fff; text-align: center; background: linear-gradient(180deg, var(--steel), var(--navy-deep)); }
.cta .wrap { padding-top: 96px; padding-bottom: 96px; }
.cta__icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 22px; box-shadow: 0 16px 36px -16px rgba(0, 0, 0, .6); }
.cta h2 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); }
.cta .lead { color: rgba(255, 255, 255, .86); margin-top: 14px; }
.cta .stores { justify-content: center; margin-top: 30px; }
.cta .store__note { color: rgba(255, 255, 255, .74); text-align: center; }
.cta .store__note b { color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 110px; font-size: .9rem; color: var(--ink-soft); }
.footer .wrap { display: grid; gap: 28px; }
@media (min-width: 820px) { .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } .footer { padding-bottom: 48px; } }
.footer h4 { margin: 0 0 10px; font: 600 .74rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .disclaimer { margin-top: 12px; font-size: .82rem; color: var(--ink-quiet); }

/* ---------- Sticky mobile CTA ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px; border-radius: 18px;
  background: var(--card); border: 1.5px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(12, 41, 81, .5);
  transform: translateY(160%); transition: transform .3s ease;
}
.dock.is-visible { transform: none; }
.dock img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dock__text { flex: 1; min-width: 0; line-height: 1.25; }
.dock__text b { display: block; font-family: var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .98rem; }
.dock__text span { display: block; font-size: .8rem; color: var(--ink-quiet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .btn { flex: none; min-height: 42px; }
@media (min-width: 820px) { .dock { display: none; } }

/* ---------- Content pages (privacy, 404) ---------- */
.page { padding: 48px 0 80px; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 10px; }
.page .meta { margin-top: 10px; color: var(--ink-quiet); font-size: .92rem; }
.page h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.page h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.page p, .page li { color: var(--ink-soft); }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 1.2em; }
.page li + li { margin-top: 6px; }
.page a { text-decoration-color: var(--gold); text-underline-offset: 3px; overflow-wrap: anywhere; }
.page strong { color: var(--ink); }
.summary { margin-top: 24px; padding: 20px 22px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.summary ul { margin: 8px 0 0; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.page table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
.page th, .page td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.page th { color: var(--ink); font-weight: 600; background: var(--paper-deep); }
