:root {
  color-scheme: dark;
  --bg: #0c0c0e;
  --bg-raised: #141418;
  --bg-active: #26262c;
  --border: #232329;
  --border-strong: #3a3a42;
  --text: #f5f5f6;
  --text-strong: #e4e4e7;
  --text-body: #a1a1a8;
  --text-muted: #7c7c84;
  --button-bg: #f5f5f6;
  --button-bg-hover: #d4d4d8;
  --button-text: #0c0c0e;
}

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

[hidden] {
  display: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration-color: currentColor;
}

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

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Logo: filled in the current text color */
.logo {
  flex: none;
  fill: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.button:hover {
  background: var(--button-bg-hover);
}

/* Official Apple badge: don't recolor or reshape it */
.app-store {
  display: inline-block;
  border-radius: 0.6rem;
}

.app-store img {
  display: block;
  width: auto;
  height: 3.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}

.brand .logo {
  width: 1.25rem;
  height: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a:not(.button) {
  color: var(--text-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .site-nav a:not(.button) {
    display: none;
  }
}

/* Shared page hero (privacy policy) */

.hero {
  padding-top: 4rem;
  padding-bottom: 3rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--text-body);
  font-size: 0.875rem;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 40rem;
  margin: 1rem auto 0;
  font-size: 1.125rem;
  line-height: 1.55;
}

.updated {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.switch {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 2.5rem;
  padding: 0.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 0.625rem;
}

.switch button {
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--text-body);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.switch button:hover {
  color: var(--text);
}

.switch button[aria-pressed="true"] {
  background: var(--bg-active);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Long-form text (policy and articles) */

.prose {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1rem 5rem;
  font-size: 1rem;
  line-height: 1.65;
  scroll-margin-top: 1rem;
}

.prose h2 {
  margin: 3rem 0 1rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  scroll-margin-top: 1rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 1.125rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li::marker {
  color: var(--text-muted);
}

.prose li > ul {
  margin: 0.5rem 0 0;
}

.prose strong {
  color: var(--text-strong);
  font-weight: 600;
}

.prose blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--border-strong);
  color: var(--text-strong);
}

.callout {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

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

.callout-title {
  color: var(--text);
  font-weight: 600;
}

.table-wrap {
  margin: 0 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

th,
td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

td:first-child {
  min-width: 9rem;
}

address {
  font-style: normal;
}

/* Homepage */

/* Fills the screen below the header (4.5rem + 1px border). svh = the screen
   height with browser toolbars showing, so it doesn't jump while scrolling. */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4.5rem - 1px);
  min-height: calc(100svh - 4.5rem - 1px);
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
}

.home-hero .logo {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.75rem;
  color: var(--text);
}

.home-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.home-hero .lead {
  max-width: 34rem;
}

.home-hero .app-store {
  margin-top: 2rem;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  height: 100%;
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.card p {
  margin: 0;
}

.card p + p {
  margin-top: 0.75rem;
}

.steps {
  counter-reset: step;
}

.steps .card {
  counter-increment: step;
  background: transparent;
}

.steps .card::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--bg-active);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

a.card {
  display: block;
  text-decoration: none;
  transition: border-color 0.15s;
}

a.card:hover {
  border-color: var(--border-strong);
}

.card .kicker {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.card .more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.faq {
  max-width: 45rem;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 1.25rem;
}

.cta {
  padding: 4.5rem 0 5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta .logo {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.25rem;
  color: var(--text);
}

.cta h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta p {
  margin: 0.75rem auto 0;
  max-width: 30rem;
}

.cta .app-store {
  margin-top: 1.75rem;
}

/* Articles */

.article-head {
  max-width: 45rem;
  margin: 0 auto;
  padding: 3rem 1rem 2.5rem;
}

.breadcrumb {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text);
}

.article-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.article-head .lead {
  max-width: none;
  margin: 1rem 0 0;
}

.article-meta {
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.article-body {
  padding-bottom: 2rem;
}

.cta-box {
  max-width: 43rem;
  margin: 0 auto 3.5rem;
  padding: 2.25rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  text-align: center;
}

.cta-box .logo {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 1rem;
  color: var(--text);
}

.cta-box h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 600;
}

.cta-box p {
  max-width: 30rem;
  margin: 0.5rem auto 0;
}

.cta-box .app-store {
  margin-top: 1.5rem;
}

.related {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1rem 4.5rem;
}

.related h2 {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
}

/* 404 */

.not-found {
  padding: 6rem 1rem;
  text-align: center;
}

.not-found h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.25rem;
  font-weight: 600;
}

.not-found p {
  max-width: 28rem;
  margin: 1rem auto 0;
}

.not-found .button {
  margin-top: 2rem;
}

/* Footer */

.site-footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-about p {
  max-width: 20rem;
  margin: 0.75rem 0 0;
}

.footer-title {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.site-footer a:not(.brand) {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:not(.brand):hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .cards-2,
  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }

  .hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
  }

  .eyebrow {
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .lead {
    margin-top: 1.5rem;
    font-size: 1.25rem;
  }

  .home-hero {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .home-hero h1 {
    font-size: 3.5rem;
  }

  .section-head h2,
  .cta h2 {
    font-size: 2.25rem;
  }

  .article-head {
    padding-top: 4rem;
  }

  .article-head h1 {
    font-size: 2.75rem;
  }

  .prose {
    font-size: 1.125rem;
    line-height: 1.6;
  }

  .prose h2 {
    font-size: 1.875rem;
  }

  .prose h3 {
    font-size: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 2fr 1.5fr 1fr;
  }
}

@media (min-width: 960px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media print {
  .site-header,
  .switch,
  .site-footer,
  .cta-box,
  .related {
    display: none;
  }

  body {
    background: #fff;
    color: #222;
  }

  .hero h1,
  .article-head h1,
  .prose h2,
  .prose h3,
  .prose strong,
  th,
  a {
    color: #000;
  }
}
