@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/plex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/plex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/plex-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Palette borrowed from VFR sectional charts, as in the app. */
:root {
  --bg: #f2f5f9; --surface: #fff; --sunk: #e9eef5; --text: #121a27; --muted: #5a6578; --line: #d9e0ea;
  --accent: #1d5ca6; --accent-strong: #16487f; --accent-soft: #e1ecfa; --magenta: #a12d6e; --magenta-soft: #f8e4ef;
  --good: #1f7a4a; --good-soft: #dff3e7; --bad: #b23a2e; --bad-soft: #fbe3e0; --amber: #c98a00; --amber-soft: #fdf1d6;
  --hero: #0f2f57; --hero-2: #0a2240; --on-hero: #fff; --hero-muted: #c7d6ea; --hero-eyebrow: #9cc3f5;
  --shadow: 0 1px 2px rgba(15, 47, 87, .06), 0 8px 24px rgba(15, 47, 87, .08);
  --radius: 20px; --display: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1118; --surface: #161c26; --sunk: #1f2733; --text: #e8ecf2; --muted: #9aa4b5; --line: #2a3342;
    --accent: #7cb2f2; --accent-strong: #a6cbf7; --accent-soft: #1b2b40; --magenta: #ea8cc0; --magenta-soft: #3a1d2d;
    --good: #6bd096; --good-soft: #163020; --bad: #f08479; --bad-soft: #3b1d1a; --amber: #f3c14f; --amber-soft: #372b0e;
    --hero: #132a4a; --hero-2: #0b1a2f; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 "IBM Plex Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-header .btn { padding: 9px 16px; font-size: .95rem; }
@media (max-width: 860px) { .site-nav { display: none; } .site-header .btn { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem "IBM Plex Sans", system-ui, sans-serif; text-decoration: none; border-radius: 999px; padding: 14px 24px; border: 0; cursor: pointer; transition: transform .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0d1118; } }
.btn-light { background: #fff; color: #0f2f57; }
.btn-light:hover { background: #e1ecfa; }
.btn-ghost { background: transparent; color: var(--on-hero); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--on-hero); background: radial-gradient(1200px 600px at 85% 10%, #1d5ca6 0%, transparent 60%), linear-gradient(160deg, var(--hero), var(--hero-2)); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: repeating-radial-gradient(circle at 78% 42%, transparent 0 46px, rgba(156, 195, 245, .12) 46px 48px); }
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 72px 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-eyebrow); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #6bd096; box-shadow: 0 0 0 4px rgba(107, 208, 150, .25); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: #ffd66b; }
.hero .lede { font-size: 1.15rem; color: var(--hero-muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.store-note { font-size: .92rem; color: var(--hero-muted); display: flex; align-items: center; gap: 8px; }
.trust { list-style: none; padding: 0; margin: 34px 0 72px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--hero-muted); font-size: .95rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: #6bd096; flex: none; }
.hero-phones { position: relative; height: 640px; align-self: end; }
.hero-phones .phone { position: absolute; }
.hero-phones .phone:first-child { width: 290px; left: 0; top: 40px; transform: rotate(-4deg); }
.hero-phones .phone:last-child { width: 300px; right: 10px; top: 0; transform: rotate(3deg); }
@media (max-width: 920px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 48px; }
  .trust { margin-bottom: 8px; }
  .hero-phones { height: 430px; margin-inline: auto; width: min(420px, 100%); }
  .hero-phones .phone:first-child { width: 205px; top: 30px; }
  .hero-phones .phone:last-child { width: 215px; right: 0; }
}

/* Phone frame around real app screenshots */
.phone { border-radius: 44px; padding: 10px; background: #05162c; box-shadow: 0 30px 60px rgba(0, 0, 0, .35), inset 0 0 0 2px #2a4166; }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; }
@media (max-width: 920px) { .phone { border-radius: 32px; padding: 7px; } .phone img { border-radius: 26px; } }

/* Facts band */
.facts { background: var(--surface); border-bottom: 1px solid var(--line); }
.facts .container { display: grid; grid-template-columns: repeat(4, 1fr); padding: 28px 0; gap: 16px; }
.fact { display: grid; gap: 2px; }
.fact strong { font-family: var(--display); font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1; }
.fact span { color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) { .facts .container { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
section { padding: 88px 0; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: 44px; }
.section-head.center { text-align: center; margin-inline: auto; justify-items: center; }
.kicker { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.reverse .feature-media { order: -1; }
.feature-copy { display: grid; gap: 18px; }
.feature-copy p { color: var(--muted); font-size: 1.08rem; }
.feature-media { display: flex; justify-content: center; gap: 20px; }
.feature-media .phone { width: min(280px, 46%); }
.feature-media .phone:nth-child(2) { margin-top: 48px; }
.feature-media .phone:only-child { width: min(300px, 72%); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.checks svg { width: 22px; height: 22px; color: var(--good); margin-top: 3px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.reverse .feature-media { order: 0; }
  .feature + .feature { margin-top: 72px; }
}

.citation { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .92rem; justify-self: start; }

/* Topics */
.topics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.topic .weight { font-family: var(--display); font-size: 2rem; line-height: 1; }
.topic .bar { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.topic .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.topic p { color: var(--muted); font-size: .92rem; }
@media (max-width: 980px) { .topics { grid-template-columns: repeat(2, 1fr); } .topic:last-child { grid-column: 1 / -1; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: stretch; max-width: 920px; margin-inline: auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: grid; gap: 18px; align-content: start; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--accent); position: relative; }
.plan .tag { position: absolute; top: -14px; left: 32px; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .plan .tag { color: #0d1118; } }
.plan h3 { font-size: 1.35rem; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price strong { font-family: var(--display); font-size: 3.2rem; line-height: 1; }
.price span { color: var(--muted); }
.plan .btn { justify-self: start; }
.compare { max-width: 920px; margin: 28px auto 0; text-align: center; color: var(--muted); }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: grid; gap: 10px; align-content: start; }
.step::before { counter-increment: step; content: counter(step); font-family: var(--display); font-weight: 800; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; }
.step p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 16px 30px 16px 0; position: relative; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 400 1.6rem/1 system-ui; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); display: grid; gap: 10px; }

/* Final CTA */
.cta-band { color: var(--on-hero); background: linear-gradient(135deg, var(--hero), #1d5ca6); border-radius: 28px; padding: 56px 40px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.cta-band p { color: var(--hero-muted); max-width: 56ch; font-size: 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: .95rem; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h3 { font-size: 1rem; color: var(--text); margin-bottom: 10px; font-family: "IBM Plex Sans", system-ui, sans-serif; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: .88rem; }
@media (max-width: 760px) { .site-footer .container { grid-template-columns: 1fr; } }

/* Article pages (guide, privacy) */
.page-hero { background: linear-gradient(160deg, var(--hero), var(--hero-2)); color: var(--on-hero); padding: 56px 0 48px; }
.page-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.3rem); margin: 12px 0 14px; }
.page-hero p { color: var(--hero-muted); font-size: 1.12rem; max-width: 62ch; }
.crumbs { font-size: .9rem; color: var(--hero-eyebrow); }
.crumbs a { color: var(--hero-eyebrow); }
.prose { padding: 48px 0 80px; display: grid; gap: 18px; }
.prose h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-top: 26px; }
.prose h3 { margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.prose table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--sunk); font-size: .92rem; }
.prose tr:last-child td { border-bottom: 0; }
.callout { background: var(--accent-soft); border-radius: 16px; padding: 18px 20px; display: grid; gap: 8px; }
.source { font-size: .88rem; color: var(--muted); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
.toc ol { margin-top: 8px; }

/* Practice test */
.quiz-progress { position: sticky; top: 64px; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); padding: 12px 0; border-bottom: 1px solid var(--line); }
.quiz-progress .narrow { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.quiz-progress .track { flex: 1; height: 10px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.quiz-progress .fill { height: 100%; width: 0; background: var(--good); border-radius: 99px; transition: width .3s; }
.questions { display: grid; gap: 22px; padding: 32px 0 24px; counter-reset: q; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.q-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: .88rem; font-weight: 600; }
.q-meta .pill { background: var(--sunk); border-radius: 99px; padding: 3px 10px; }
.q h2 { font-size: 1.2rem; line-height: 1.35; font-family: "IBM Plex Sans", system-ui, sans-serif; font-weight: 700; }
.q figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.q figcaption { font-size: .85rem; color: var(--muted); padding: 8px 12px; }
.choices { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.choice { width: 100%; text-align: left; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover:not([disabled]) { border-color: var(--accent); }
.choice .letter { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); font-weight: 700; }
.choice.correct { border-color: var(--good); background: var(--good-soft); }
.choice.correct .letter { background: var(--good); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.wrong .letter { background: var(--bad); color: #fff; }
.choice[disabled] { cursor: default; }
.explain { display: none; gap: 8px; border-radius: 14px; padding: 16px; background: var(--sunk); }
.q.answered .explain { display: grid; }
.explain strong { font-family: var(--display); font-size: 1.15rem; }
.q.right .explain strong { color: var(--good); }
.q.missed .explain strong { color: var(--bad); }
.score-card { display: none; text-align: center; gap: 14px; justify-items: center; background: var(--surface); border: 2px solid var(--accent); border-radius: 24px; padding: 32px 24px; margin-bottom: 64px; }
.score-card.show { display: grid; }
.score-card .big { font-family: var(--display); font-size: 3.6rem; line-height: 1; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .reveal { opacity: 1; transform: none; transition: none; } }
