/* Retirement Preflight — marketing/support site
   Design tokens ported from the app's own web/src/style.css so the site and
   the product read as one thing: warm near-white ground, a single gold accent,
   color applied as rules and borders rather than fills, editorial serifs.

   Fonts are self-hosted, copied from the app's own web/public/fonts. The app
   does this because it ships offline as a packaged desktop build; the site does
   it for a different reason — loading them from the Google Fonts CDN would send
   every visitor's IP address to a third party, which would make the privacy
   page's "no third-party requests" claim untrue. Self-hosting keeps that claim
   honest and removes a render-blocking cross-origin round trip. */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lora-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/lora-600.woff2') format('woff2');
}

:root {
  --bg: #f3f2f2;
  --surface: #eae9e9;
  --surface-2: #f8f4f4;
  --text: #16150f;
  --muted: #514e4a;
  --divider: rgba(32, 31, 29, 0.26);
  --accent: #b68235;
  --accent-deep: #6b4610;
  --accent-100: #fff3e4;
  --accent-300: #facb8d;
  --pos: #35592f;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --measure: 68ch;
  --page: 1080px;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --surface: #1f1d1a;
    --surface-2: #262320;
    --text: #f1ede7;
    --muted: #b3ada3;
    --divider: rgba(233, 226, 214, 0.22);
    --accent: #e1ad66;
    --accent-deep: #facb8d;
    --accent-100: #2a2318;
    --accent-300: #6b4610;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--divider); margin: 0; }

code, .mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 0.1em 0.35em;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; }

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
section + section { border-top: 1px solid var(--divider); }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.lede { font-size: 1.2rem; color: var(--muted); }

/* ── Header ─────────────────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.wordmark {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  white-space: nowrap;
}
.wordmark .mark { color: var(--accent); }

header.site nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.94rem;
}
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 720px) {
  header.site nav { gap: 1rem; font-size: 0.86rem; }
  header.site nav a.hide-sm { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding-top: clamp(3rem, 7vw, 5.5rem); }
.hero h1 { max-width: 22ch; }
.hero .lede { max-width: 56ch; font-size: clamp(1.12rem, 2vw, 1.32rem); }

.rule-accent {
  width: 3.5rem;
  border-top: 2px solid var(--accent);
  margin: 0 0 1.75rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; margin-top: 2rem; }

.btn {
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.72em 1.5em;
  border-radius: var(--radius);
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s ease;
  cursor: pointer;
}
.btn:hover { opacity: 0.85; color: var(--bg); }

.btn.secondary { background: transparent; color: var(--text); border-color: var(--divider); }
.btn.secondary:hover { border-color: var(--text); color: var(--text); opacity: 1; }

.btn[aria-disabled='true'] {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  border-color: var(--divider);
  cursor: default;
  pointer-events: none;
}

.note-inline { font-family: var(--font-ui); font-size: 0.88rem; color: var(--muted); }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 1.5rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }

.card {
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.card h3 { margin-bottom: 0.4rem; font-size: 1.18rem; }
.card p { font-size: 0.98rem; color: var(--muted); margin-bottom: 0; max-width: none; }
.card .kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: block;
  margin-bottom: 0.6rem;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--divider); border-radius: var(--radius); }

table { border-collapse: collapse; width: 100%; font-size: 0.98rem; min-width: 480px; }
th, td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--divider); vertical-align: top; }
thead th {
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--pos); font-weight: 600; }
td.no { color: var(--muted); }

/* ── Callouts ───────────────────────────────────────────────────────────── */

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-100);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 1.5rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout p { max-width: none; }
.callout strong { color: var(--text); }

.disclaimer {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  font-size: 0.94rem;
  color: var(--muted);
}
.disclaimer p { max-width: none; }
.disclaimer > :last-child { margin-bottom: 0; }

/* ── Prose pages (support, legal) ───────────────────────────────────────── */

.prose { padding-top: clamp(2.5rem, 6vw, 4rem); }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose dl { max-width: var(--measure); }
.prose dt { font-weight: 600; margin-top: 1.2rem; }
.prose dd { margin: 0.3rem 0 0 0; color: var(--muted); }

.toc {
  font-family: var(--font-ui);
  font-size: 0.94rem;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc p { font-weight: 700; margin: 0 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
@media (max-width: 620px) { .toc ul { columns: 1; } }
.toc li { margin-bottom: 0.35rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--divider);
  padding: 3rem 0 4rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
}
footer.site .cols { display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; margin-bottom: 2.5rem; }
footer.site h4 {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 0.5rem; }
footer.site a { color: var(--text); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .legal { border-top: 1px solid var(--divider); padding-top: 1.75rem; }
footer.site .legal p { max-width: none; margin-bottom: 0.5rem; font-size: 0.86rem; }

/* ── Small utilities ────────────────────────────────────────────────────────
   These exist because the Content-Security-Policy in public/_headers sets
   style-src 'self' with no 'unsafe-inline', which blocks style="" attributes
   just as it blocks inline <script>. The pages originally carried a handful of
   one-off inline styles; rather than weaken the policy for six declarations,
   they live here as classes. Keep it that way — an inline style added later
   will not apply, and will fail silently in a way that looks like a CSS bug. */

.page-title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 3rem; }
.mb-xl { margin-bottom: 2.5rem; }
.pad-block { padding-top: 4rem; padding-bottom: 6rem; }
.flush { border-top: 0; padding-top: 0; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 0.5rem;
  z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 0.6rem 1rem; border-radius: var(--radius);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media print {
  header.site, footer.site .cols { display: none; }
  body { background: #fff; color: #000; }
}
