/* Colours mirror DesignTokens.swift in the iOS app (light and dark). */
:root {
  color-scheme: light dark;
  --page: #f2f2f7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-secondary: #545458;
  --rule: #e3e3e5;
  --accent: #0b6e5b;
  --accent-soft: #d9f0ec;
  --hero: #193d32;
  --on-hero: #ffffff;
  --on-hero-secondary: #d4e3dc;
  --lamp: #f2d477;
  --caution-soft: #ece3d1;
  --on-caution-soft: #5a4512;
  --radius-card: 20px;
  --radius-small: 12px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --surface: #1c1c1e;
    --text: #f2f2f7;
    --text-secondary: #aeaeb2;
    --rule: #3a3a3c;
    --accent: #4fd1b5;
    --accent-soft: #123b37;
    --hero: #1c4537;
    --caution-soft: #5a4512;
    --on-caution-soft: #f5e6c4;
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-small);
}

.skip:focus {
  top: 8px;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}

.site-nav a:hover {
  background: var(--surface);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* Content */

main {
  padding-bottom: 32px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2rem;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.375rem;
  margin: 32px 0 12px;
}

h3 {
  font-size: 1.0625rem;
  margin: 0 0 4px;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

li + li {
  margin-top: 6px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 0 0 12px;
}

.card > :last-child {
  margin-bottom: 0;
}

.hero {
  background: var(--hero);
  color: var(--on-hero);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  margin: 8px 0 16px;
}

.hero p {
  color: var(--on-hero-secondary);
}

.hero a {
  color: var(--on-hero);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-hero-secondary);
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lamp);
  flex: none;
}

.lead {
  font-size: 1.1875rem;
}

.features {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.features li {
  margin: 0;
}

.tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.muted {
  color: var(--text-secondary);
}

.notice {
  border-left: 4px solid var(--accent);
}

/* Long-form policy text */

.doc h2 {
  scroll-margin-top: 16px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 0 0 12px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
}

.doc th {
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
}

.toc ol {
  columns: 2 12rem;
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

@media (min-width: 40rem) {
  h1 {
    font-size: 2.5rem;
  }

  .hero {
    padding: 40px 36px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
