/* Shared styling for the four pages. One file, no framework, no web fonts and
   no build step: this site exists to satisfy Apple's Support URL and Privacy
   Policy URL requirements, so it has to load instantly on a phone on bad hotel
   wifi. Everything below is system fonts and plain CSS — it stays under 4KB. */

:root {
  color-scheme: light dark;

  --bg: #f6f6f9;
  --surface: #ffffff;
  --fg: #16161d;
  --muted: #6c6c7a;
  --rule: #e7e7ee;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.08);
  --chip: #f0f0f4;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.04), 0 12px 32px -16px rgba(20, 20, 40, 0.16);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0e;
    --surface: #14141a;
    --fg: #f3f3f7;
    --muted: #9a9aab;
    --rule: #26262f;
    --accent: #55aaff;
    --accent-soft: rgba(85, 170, 255, 0.12);
    --chip: #20202a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 20px 72px;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        Roboto, system-ui, sans-serif;
  font-synthesis-weight: none;
}

/* Header — a quiet tinted band rather than a rule across the page. The radial
   tint is one gradient, which costs nothing and stops the page opening on a
   flat white rectangle. */

header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 0 36px;
  text-align: left;
}

header .app {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
}

h1 {
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.028em;
  margin: 18px 0 0;
  text-wrap: balance;
}

header .muted { margin: 10px 0 0; font-size: 17px; }

/* Navigation — pills, so the two links read as somewhere to go rather than as
   an afterthought underlined in blue. */

nav { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }

nav a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 16px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

nav a:hover { color: var(--accent); border-color: var(--accent); }

/* The article itself sits on a raised surface, which separates the reading
   column from the page without needing a border down each side. */

main {
  max-width: var(--measure);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 34px 34px;
}

h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  text-wrap: balance;
}

main > h2:first-child { border-top: 0; padding-top: 0; margin-top: 28px; }

h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 28px 0 6px;
  color: var(--fg);
}

p, li { text-wrap: pretty; }
p { margin: 0 0 16px; }

.muted { color: var(--muted); font-size: 15px; }

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

ul { padding-left: 20px; margin: 0 0 16px; }
li { margin: 7px 0; }
li::marker { color: var(--muted); }

code {
  font: 0.88em/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--chip);
  border-radius: 6px;
  padding: 3px 6px;
}

/* The one thing on each page worth reading if you read nothing else. */

.card {
  background: var(--accent-soft);
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 6px 14px 14px 6px;
  padding: 18px 20px;
  margin: 28px 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

footer {
  max-width: var(--measure);
  margin: 32px auto 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { padding: 0 14px 56px; font-size: 16px; }
  header { padding: 40px 6px 28px; }
  main { padding: 6px 22px 26px; border-radius: 16px; }
  h2 { font-size: 19px; margin-top: 36px; padding-top: 20px; }
}
