/* Shared look of the document pages: a brand band on top (the landing's
   gradient and wireframe globe), the document on a paper sheet over it. */
:root {
  color-scheme: light dark;
  --bg: #f4f6f7;
  --paper: #ffffff;
  --text: #1a1d21;
  --text-secondary: #5c6470;
  --border: #e4e7eb;
  --accent: #1a9e84;
  --accent-soft: #1a9e8418;
  --chip-bg: #f1f3f5;
  --g1: #00a586;
  --g2: #00877e;
  --g3: #003845;
  --shadow: 0 18px 50px rgba(0, 40, 45, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1012;
    --paper: #15191c;
    --text: #e8eaed;
    --text-secondary: #9aa3ad;
    --border: #2a2f36;
    --accent: #2ebfa5;
    --accent-soft: #2ebfa51f;
    --chip-bg: #1d2228;
    --g1: #008f76;
    --g2: #006a63;
    --g3: #00222b;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Pulled down past the top, iOS shows what lies above the body: the band's
   top-edge colors continue there instead of the page's dark background. */
body::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 100vh;
  background: linear-gradient(90deg, var(--g1) 0%, var(--g2) 65%, color-mix(in srgb, var(--g2) 60%, var(--g3)) 100%);
  pointer-events: none;
}

.band {
  position: relative;
  overflow: hidden;
  height: 270px;
  background: linear-gradient(135deg, var(--g1) 0%, var(--g2) 60%, var(--g3) 100%);
  color: #fff;
}
.band svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.band header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px;
}
/* Tabs of all documents under the band's header; the current one filled. */
.doc-tabs {
  position: relative;
  display: flex;
  gap: 6px;
  max-width: 860px;
  margin: 0 auto;
  padding: 2px 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tabs a {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, color 0.2s ease;
}
.doc-tabs a:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.doc-tabs a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
  color: var(--g2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}
.brand img { height: 24px; width: auto; }
.lang-switch {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 3px;
}
/* A white pill that slides under the active language. */
.lang-switch .thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 30, 35, 0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), width 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.lang-switch button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease;
}
.lang-switch button.active { color: var(--g2); }
@media (prefers-reduced-motion: reduce) {
  .lang-switch .thumb, .lang-switch button { transition: none; }
}

main {
  position: relative;
  max-width: 860px;
  margin: -120px auto 0;
  padding: 0 24px;
}
article {
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 44px 56px 48px;
}
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 8px; }
.updated {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--chip-bg);
  border-radius: 8px;
  padding: 3px 10px;
  margin: 4px 0 26px;
}
h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  scroll-margin-top: 20px;
}
h2 .num { color: var(--accent); margin-right: 6px; }
p, li { font-size: 16px; }
p { margin: 0 0 14px; }
ul { padding-left: 22px; margin: 0 0 14px; }
li { margin: 7px 0; }
li::marker { color: var(--accent); }
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }
.note { background: var(--accent-soft); border-radius: 14px; padding: 14px 18px; margin: 22px 0; }

.toc {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px 12px;
  margin: 0 0 30px;
}
.toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.toc li { margin: 0 0 6px; font-size: 15px; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--accent); }
.toc .num { color: var(--accent); font-weight: 600; margin-right: 6px; }

footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 24px 44px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 14px;
}
footer nav a { color: var(--text); text-decoration: none; font-weight: 500; }
footer nav a:hover, footer nav a[aria-current="page"] { color: var(--accent); }

@media (max-width: 640px) {
  .band { height: 230px; }
  .doc-tabs { padding: 0 12px; }
  .band header { padding: 16px; }
  main { margin-top: -100px; padding: 0 12px; }
  article { padding: 28px 20px 32px; border-radius: 18px; }
  h1 { font-size: 27px; }
  h2 { font-size: 19px; margin-top: 36px; }
  .toc ol { columns: 1; }
}
