/*
 * One stylesheet for the whole public site.
 *
 * No webfonts and no CDN on purpose. A privacy policy that loads a third-party font
 * is making a request to a third party on behalf of someone reading about what we do
 * with their data, and the system stack renders faster anyway.
 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-raised: #ffffff;
  --border: #e3e6ea;
  --border-strong: #cfd4da;

  --text: #16191d;
  --text-soft: #5a626c;
  --text-faint: #858d97;

  /* Sampled from the logo: #0130D1 blue, #F31616 red. */
  --brand: #0130d1;
  --brand-ink: #052dbb;
  --brand-wash: #e9edfc;
  --on-brand: #ffffff;

  --accent: #f31616;
  --accent-ink: #cf1111;
  --accent-wash: #fdeaea;

  --warn-wash: #fdf4e3;
  --warn-ink: #7a5513;
  --warn-border: #e8d4a8;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px -12px rgb(16 24 40 / 14%);

  --gutter: 20px;
  --measure: 68ch;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013;
    --bg-soft: #15181d;
    --bg-raised: #171b21;
    --border: #262b33;
    --border-strong: #353c46;

    --text: #eef1f4;
    --text-soft: #a9b2bd;
    --text-faint: #7c8793;

    --brand: #7e9bff;
    --brand-ink: #a3b8ff;
    --brand-wash: #141c3d;
    --on-brand: #050c26;

    --accent: #ff6a6a;
    --accent-ink: #ff8f8f;
    --accent-wash: #2d1414;

    --warn-wash: #2a2113;
    --warn-ink: #e8c87f;
    --warn-border: #4a3c1d;

    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -12px rgb(0 0 0 / 60%);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1013;
  --bg-soft: #15181d;
  --bg-raised: #171b21;
  --border: #262b33;
  --border-strong: #353c46;
  --text: #eef1f4;
  --text-soft: #a9b2bd;
  --text-faint: #7c8793;
  --brand: #7e9bff;
  --brand-ink: #a3b8ff;
  --brand-wash: #141c3d;
  --on-brand: #050c26;
  --accent: #ff6a6a;
  --accent-ink: #ff8f8f;
  --accent-wash: #2d1414;
  --warn-wash: #2a2113;
  --warn-ink: #e8c87f;
  --warn-border: #4a3c1d;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -12px rgb(0 0 0 / 60%);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -0.021em; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2rem); }
h3 { font-size: 1.16rem; }
p  { margin: 0 0 1em; }

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.center { text-align: center; }
.muted { color: var(--text-soft); }
.small { font-size: 0.9rem; }
.mono { font-family: var(--mono); font-size: 0.92em; }

.skip {
  position: absolute; left: -9999px;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ── header ─────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-head .wrap {
  display: flex; align-items: center; gap: 16px;
  min-height: 66px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 680; letter-spacing: -0.02em; font-size: 1.04rem;
  color: var(--text); text-decoration: none; flex: 0 0 auto;
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px; height: 34px;
  /* The logo is a circular badge on a light field, so it needs no container. */
  object-fit: contain; flex: 0 0 auto;
}

/* The wordmark, set to match the logo's own two-colour lockup. */
.brand-name { letter-spacing: -0.025em; }
.brand-name i { font-style: normal; color: var(--brand); }
.brand-name b { font-weight: inherit; color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.nav a {
  color: var(--text-soft); text-decoration: none;
  padding: 7px 11px; border-radius: 8px; font-size: 0.94rem; font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }

.nav-toggle {
  margin-left: auto; display: none;
  background: none; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 0.9rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 10px var(--gutter) 16px;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav .btn { margin-top: 6px; text-align: center; }
  .nav-toggle { display: inline-block; }
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 19px; border-radius: 10px;
  font-size: 0.96rem; font-weight: 580; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background-color .15s ease, border-color .15s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-ink); color: var(--on-brand); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── sections ───────────────────────────────────────────────────────────── */

section { padding-block: clamp(52px, 7vw, 92px); }
section.tight { padding-block: clamp(36px, 5vw, 60px); }
.band { background: var(--bg-soft); border-block: 1px solid var(--border); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--brand-ink); margin-bottom: 14px;
}

.lede { font-size: clamp(1.03rem, 0.98rem + 0.3vw, 1.2rem); color: var(--text-soft); max-width: var(--measure); }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(60px, 9vw, 116px); }
.hero h1 { max-width: 19ch; }
.hero .lede { margin-bottom: 28px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-top: 52px;
}
.hero-stat {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.hero-stat dt { font-size: 0.84rem; color: var(--text-soft); margin-bottom: 6px; }
.hero-stat dd { margin: 0; font-size: 1.28rem; font-weight: 650; letter-spacing: -0.02em; }

/* ── cards ──────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); }

.card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-wash); color: var(--brand-ink);
  display: grid; place-items: center; margin-bottom: 14px;
}
.card-icon svg { width: 19px; height: 19px; }

/* ── steps ──────────────────────────────────────────────────────────────── */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: step; position: relative;
  padding-left: 52px; min-height: 36px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-wash); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 660; font-size: 0.94rem;
}
.steps h3 { margin-bottom: 4px; }
.steps p { margin-bottom: 0; color: var(--text-soft); }

/* ── tables ─────────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.4em; }

table {
  width: 100%; border-collapse: collapse; font-size: 0.94rem;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 620; font-size: 0.87rem; }
tbody tr:last-child td { border-bottom: 0; }

/* ── notices ────────────────────────────────────────────────────────────── */

.notice {
  border: 1px solid var(--warn-border); background: var(--warn-wash); color: var(--warn-ink);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 1.4em;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: inherit; }

.callout {
  border-left: 3px solid var(--brand); background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px; margin-bottom: 1.4em;
}
.callout p:last-child { margin-bottom: 0; }

/* ── legal documents ────────────────────────────────────────────────────── */

.doc { padding-block: clamp(36px, 5vw, 64px); }
.doc-head { border-bottom: 1px solid var(--border); padding-bottom: 22px; margin-bottom: 34px; }
.doc-meta { color: var(--text-faint); font-size: 0.88rem; margin: 0; }

.doc-body { max-width: var(--measure); }
.doc-body h2 { margin-top: 2em; scroll-margin-top: 80px; }
.doc-body h3 { margin-top: 1.6em; }
.doc-body ul, .doc-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc-body li { margin-bottom: 0.45em; }
.doc-body li:last-child { margin-bottom: 0; }

.toc {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 36px;
}
.toc h2 { margin: 0 0 10px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-soft); }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; font-size: 0.93rem; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-foot { border-top: 1px solid var(--border); background: var(--bg-soft); padding-block: 48px 36px; }

.foot-grid {
  display: grid; grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px; margin-bottom: 36px;
}
.foot-grid h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-soft); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--text-soft); text-decoration: none; font-size: 0.93rem; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }

.foot-bottom {
  border-top: 1px solid var(--border); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--text-faint); font-size: 0.87rem;
}

/* ── misc ───────────────────────────────────────────────────────────────── */

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-wash); color: var(--brand-ink);
  font-size: 0.78rem; font-weight: 600;
}

.logo-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.logo-strip span {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 15px; font-size: 0.88rem; color: var(--text-soft);
  background: var(--bg-raised);
}

code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px;
}

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