/* Shared with index.html's inline theme tokens — keep these two in sync
   whenever the palette changes there. Dark is the default look regardless
   of system preference, matching the main site. */
:root {
  --blue: #0a84ff;
  --blue-dark: #409cff;
  --ink: #2c2c2e;
  --text: #f5f5f7;
  --ink-soft: #98989d;
  --bg: #000000;
  --card: #1c1c1e;
  --border: rgba(255, 255, 255, 0.14);
  --nav-bg: rgba(28, 28, 30, 0.72);
}

@media (prefers-color-scheme: light) {
  :root {
    --blue: #007AFF;
    --blue-dark: #0062cc;
    --ink: #1c1c1e;
    --text: #1c1c1e;
    --ink-soft: #6e6e73;
    --bg: #f5f5f7;
    --card: #ffffff;
    --border: #e5e5ea;
    --nav-bg: rgba(245, 245, 247, 0.86);
  }
}

html[data-theme="dark"] {
  --blue: #0a84ff;
  --blue-dark: #409cff;
  --ink: #2c2c2e;
  --text: #f5f5f7;
  --ink-soft: #98989d;
  --bg: #000000;
  --card: #1c1c1e;
  --border: rgba(255, 255, 255, 0.14);
  --nav-bg: rgba(28, 28, 30, 0.72);
}
html[data-theme="light"] {
  --blue: #007AFF;
  --blue-dark: #0062cc;
  --ink: #1c1c1e;
  --text: #1c1c1e;
  --ink-soft: #6e6e73;
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #e5e5ea;
  --nav-bg: rgba(245, 245, 247, 0.86);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 760px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }

.back-link {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

main {
  padding: 48px 0 72px;
}

.doc-header {
  margin-bottom: 32px;
}

h1 {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.updated {
  font-size: 14px;
  color: var(--ink-soft);
}

.doc-nav-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
}
.doc-nav-note a { text-decoration: underline; text-underline-offset: 2px; }

.doc h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
}
.doc h2:first-child { margin-top: 0; }

.doc h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.doc p {
  font-size: 15.5px;
  color: var(--text);
  margin-bottom: 14px;
}

.doc ul {
  margin: 0 0 14px 20px;
  font-size: 15.5px;
}
.doc li { margin-bottom: 8px; }

.doc strong { font-weight: 700; }

footer {
  padding: 32px 0 56px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}

footer .footer-links {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
}
footer .footer-links a { text-decoration: none; }
footer .footer-links a:hover { text-decoration: underline; }
