/* One stylesheet, no scripts, no fonts or anything else from other sites. Light and dark follow the system. */
:root {
  --background: #ffffff; --surface: #f6f8fa; --text: #1b1f24; --muted: #57606a; --border: #d0d7de;
  --link: #0b5cad; --accent: #0b5cad; --code: #eaeef2; --banner: #fff8c5; --banner-border: #d4a72c;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0d1117; --surface: #161b22; --text: #e6edf3; --muted: #9198a1; --border: #30363d;
    --link: #58a6ff; --accent: #58a6ff; --code: #1f2630; --banner: #2d2a14; --banner-border: #9e6a03;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--text); background: var(--background); }
a { color: var(--link); }
a:focus-visible, summary:focus-visible, pre:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--background); z-index: 10; }
.skip:focus { left: 0; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
header.top .brand { font: 700 1.35rem var(--font); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
header.top nav { display: flex; gap: 1.25rem; }
header.top nav a { color: var(--muted); text-decoration: none; }
header.top nav a:hover { color: var(--link); text-decoration: underline; }

.layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); max-width: 76rem; margin: 0 auto; gap: 2.5rem; padding: 0 1.25rem; }
nav.side { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 1.5rem 0; font-size: 0.95rem; }
nav.side h2, details.menu h2 { margin: 1.25rem 0 0.4rem; font: 600 0.78rem var(--font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
nav.side section:first-child h2 { margin-top: 0; }
nav ul { margin: 0; padding: 0; list-style: none; }
nav.side a, details.menu a { display: block; padding: 0.25rem 0.6rem; border-left: 3px solid transparent; color: var(--text); text-decoration: none; }
nav.side a:hover, details.menu a:hover { color: var(--link); }
nav.side a[aria-current="page"], details.menu a[aria-current="page"] { border-left-color: var(--accent); color: var(--link); font-weight: 600; }
details.menu { display: none; padding: 0.5rem 1.25rem; border-bottom: 1px solid var(--border); }
details.menu summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }

main { padding: 1.5rem 0 3rem; min-width: 0; max-width: 50rem; }
.banner { margin: 0 0 1.5rem; padding: 0.55rem 0.9rem; font-size: 0.9rem; background: var(--banner); border: 1px solid var(--banner-border); border-radius: 6px; }
article h1 { margin: 0 0 1rem; font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.015em; }
article h2 { margin: 2.4rem 0 0.7rem; padding-top: 0.4rem; font-size: 1.45rem; line-height: 1.3; border-top: 1px solid var(--border); }
article h3 { margin: 1.8rem 0 0.5rem; font-size: 1.15rem; }
article p, article ul, article ol, article pre, article .table, article blockquote { margin: 0 0 1rem; }
article li { margin: 0.25rem 0; }
article li > p { margin: 0.25rem 0; }
code { font: 0.88em var(--mono); padding: 0.12em 0.35em; background: var(--code); border-radius: 4px; }
pre { padding: 0.9rem 1rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; line-height: 1.5; }
pre code { padding: 0; background: none; font-size: 0.86rem; }
blockquote { padding: 0.1rem 1rem; color: var(--muted); border-left: 4px solid var(--border); }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border: 1px solid var(--border); }
th { background: var(--surface); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
img { max-width: 100%; }

nav.contents { margin: 0 0 1.5rem; padding: 0.7rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; font-size: 0.93rem; }
nav.contents p { margin: 0 0 0.3rem; font-weight: 600; color: var(--muted); }
nav.contents ul { columns: 2; column-gap: 2rem; }
nav.contents li { break-inside: avoid; margin: 0.15rem 0; }

nav.siblings { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; }
nav.siblings a { display: block; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; min-width: 11rem; }
nav.siblings a span { display: block; font-size: 0.78rem; color: var(--muted); }
nav.siblings .next { text-align: right; margin-left: auto; }
nav.siblings a:hover { border-color: var(--accent); }
.edit { font-size: 0.9rem; color: var(--muted); }
footer { padding: 1.5rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; text-align: center; }
footer p { margin: 0; }

@media (max-width: 52rem) {
  .layout { display: block; padding: 0 1rem; }
  nav.side { display: none; }
  details.menu { display: block; }
  details.menu a { padding: 0.35rem 0.6rem; }
  article h1 { font-size: 1.7rem; }
  nav.contents ul { columns: 1; }
}
@media print { header.top, nav.side, details.menu, nav.siblings, .edit, .banner { display: none; } .layout { display: block; } }

/* The reference of the admin API */
.method { display: inline-block; min-width: 3.6rem; padding: 0.05rem 0.4rem; margin-right: 0.25rem; font: 700 0.75rem var(--mono); text-align: center; color: #fff; border-radius: 4px; background: var(--muted); }
.method.get { background: #1a7f37; } .method.post { background: #0b5cad; } .method.put { background: #9a6700; } .method.patch { background: #8250df; } .method.delete { background: #cf222e; }
@media (prefers-color-scheme: dark) { .method.get { background: #2ea043; } .method.post { background: #1f6feb; } .method.put { background: #bf8700; } .method.patch { background: #a371f7; } .method.delete { background: #da3633; } }
.operation { margin: 0 0 2rem; padding: 0 0 0.5rem; }
article .operation h3 { margin: 2rem 0 0.4rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 1.1rem; }
article .operation h4 { margin: 1.2rem 0 0.4rem; font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.operation .summary { margin: 0 0 0.4rem; }
.operation .scopes { margin: 0 0 0.8rem; font-size: 0.9rem; color: var(--muted); }
.operation details { margin: 0.3rem 0 0.6rem; }
.operation summary { cursor: pointer; color: var(--link); }
.operation .variant { margin: 0.6rem 0 0.3rem; font-size: 0.85rem; color: var(--muted); }
ul.operations { padding-left: 0; list-style: none; font-size: 0.93rem; }
ul.operations li { margin: 0.2rem 0; }
ul.operations a { text-decoration: none; }
td small { display: block; color: var(--muted); }
