/* A plain document: one column, neutral colors, no decorative elements. */
:root {
  color-scheme: dark;
  --bg: #17171a;
  --text: #e4e4e7;
  --muted: #a1a1aa;
  --line: #2b2b31;
  --code: #1f1f24;
  --focus: #8e8e9a;
  --selection: #33333c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --text: #1b1b1f;
  --muted: #5f5f68;
  --line: #e2e2e6;
  --code: #f4f4f5;
  --focus: #52525e;
  --selection: #e3e3e9;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #ffffff;
    --text: #1b1b1f;
    --muted: #5f5f68;
    --line: #e2e2e6;
    --code: #f4f4f5;
    --focus: #52525e;
    --selection: #e3e3e9;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
button[hidden] { display: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--selection); }

.wrap { width: min(720px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.site-title .logo { width: 20px; height: 20px; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); text-decoration: underline; }
.theme-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
}
.theme-button:hover { color: var(--text); text-decoration: underline; }

/* Document flow */
main { padding: 56px 0 72px; }
h1 {
  margin: 0;
  font-size: clamp(25px, 3.4vw, 30px);
  line-height: 1.3;
  font-weight: 600;
  text-wrap: balance;
}
h2 { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 600; }
p, ul, dl, pre, figure { margin: 16px 0 0; }
main > figure { margin-top: 32px; }
p, ul, dl, pre { max-width: 66ch; }
p { color: var(--text); }
section { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
section[id] { scroll-margin-top: 24px; }
section > * + * { margin-top: 14px; }

.open-client {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 28px;
}
.open-client .button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.open-client .button:hover { background: var(--code); }
.open-client span { color: var(--muted); font-size: 15px; }

ul { padding-left: 22px; }
li + li { margin-top: 6px; }
li::marker { color: var(--muted); }
.doc-list { list-style: none; padding: 0; }
.doc-list li + li { margin-top: 4px; }

dl { display: grid; gap: 10px; }
dt { font-weight: 600; }
dd { margin: 0; color: var(--muted); }

code {
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--code);
  font-family: var(--mono);
  font-size: 0.9em;
}
pre {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--code);
  overflow-x: auto;
}
pre code { padding: 0; background: none; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

figure { margin: 0; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}
figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 0; color: inherit; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 560px) {
  .wrap { width: calc(100% - 40px); }
  main { padding-top: 40px; }
  section { margin-top: 44px; }
  h1 { font-size: 25px; }
}
