:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --rule: rgba(0, 0, 0, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #f5f5f7;
    --muted: #86868b;
    --accent: #2997ff;
    --rule: rgba(255, 255, 255, 0.18);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 1.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: start;
}

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 1.5rem 0 0.5rem; }
h2 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.01em; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.0625rem; margin: 1.75rem 0 0.25rem; }
p, ul { margin: 0.75rem 0; }
ul { padding-inline-start: 1.4rem; }
li { margin: 0.35rem 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.crumbs { font-weight: 600; }
.crumbs a { color: var(--fg); }
.crumbs a::before { content: "‹ "; color: var(--muted); }
[dir="rtl"] .crumbs a::before { content: "› "; }

.updated, .fineprint { color: var(--muted); font-size: 0.9375rem; }
.tagline { color: var(--muted); font-size: 1.25rem; margin-top: 0; }

.pages { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.pages a {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 980px;
  font-weight: 600;
}

footer { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }

.lang summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  width: fit-content;
}
.lang nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0;
}
.lang nav a { white-space: nowrap; }
.lang nav a[aria-current="true"] { color: var(--fg); font-weight: 600; }
