/* docs.css — /docs, /docs/api and /docs/api/{op}. System fonts, no external assets. */

:root {
  --bg: #ffffff; --fg: #1b1b19; --muted: #66665f; --line: #e5e4dd; --soft: #f5f5f1; --code: #f3f2ed; --link: #3538cd;
  --get: #16803c; --post: #3538cd; --patch: #a15c07; --put: #a15c07; --delete: #c43737;
  color-scheme: light;
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --fg: #ececea; --muted: #9c9c96; --line: #2a2a2f; --soft: #1a1a1d; --code: #1d1d21; --link: #a5b4fc;
    --get: #4ade80; --post: #a5b4fc; --patch: #fbbf24; --put: #fbbf24; --delete: #f87171;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--link); text-underline-offset: 2px; }
code, pre { font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
:not(pre) > code { background: var(--code); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 12px 0 16px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* ---- top bar */
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap;
       padding: 10px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; color: var(--fg); text-decoration: none; }
.logo span { font-weight: 500; color: var(--muted); }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--fg); }

/* ---- layout: sidebar left on wide screens, after the content on narrow ones */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-areas: "side content"; max-width: 1180px; margin: 0 auto; }
.content { grid-area: content; padding: 28px 32px 80px; min-width: 0; max-width: 860px; }
.side { grid-area: side; position: sticky; top: 49px; align-self: start; max-height: calc(100vh - 49px); overflow-y: auto;
        padding: 24px 16px 40px 20px; border-right: 1px solid var(--line); font-size: 14px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li { margin: 2px 0; }
.side a { color: var(--muted); text-decoration: none; display: block; padding: 2px 0; }
.side a:hover, .side a[aria-current="page"] { color: var(--fg); }
.side .tag { color: var(--fg); font-weight: 600; margin-top: 8px; }
.side-ref ul { padding-left: 10px; border-left: 1px solid var(--line); }
.side-h { margin: 16px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-h:first-child { margin-top: 0; }
.jump { display: none; }

/* ---- prose */
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 22px; margin: 40px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 18px; margin: 28px 0 6px; }
h4 { font-size: 14px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
h1 + .lead, .lead { font-size: 17px; color: var(--muted); margin-top: 0; }
section[id], .op { scroll-margin-top: 64px; }
.content > section:first-of-type h2 { border-top: 0; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 8px; }

.table-wrap { overflow-x: auto; margin: 8px 0 16px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--soft); font-weight: 600; }
.fields td:first-child { white-space: nowrap; }
.req { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--delete); margin-left: 4px; }
.in, .lim, .vals { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vals code { font-size: 12px; margin-right: 2px; }

/* ---- operations */
.tag-index { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 12px 0 0; }
.tag-sec > h2 { margin-top: 48px; }
.op { padding: 4px 0 18px; border-bottom: 1px dashed var(--line); }
.op:last-child { border-bottom: 0; }
.op h3 a, .op h1 a { color: inherit; text-decoration: none; }
.op h3 a:hover { text-decoration: underline; }
.sig { margin: 6px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sig code { font-size: 14px; background: transparent; padding: 0; overflow-wrap: anywhere; }
.method { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 7px; border-radius: 5px; border: 1px solid currentColor; }
.m-get { color: var(--get); } .m-post { color: var(--post); } .m-patch { color: var(--patch); } .m-put { color: var(--put); } .m-delete { color: var(--delete); }
.meta { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.access, .mcp { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.a-public { color: var(--get); } .a-write { color: var(--patch); } .a-admin { color: var(--delete); }
.note { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content" "side"; }
  .content { padding: 20px 16px 40px; }
  .side { position: static; max-height: none; border-right: 0; border-top: 1px solid var(--line); padding: 20px 16px 48px; }
  .jump { display: inline-block; font-size: 14px; margin-bottom: 12px; }
  .bar { position: static; padding: 10px 16px; }
  section[id], .op { scroll-margin-top: 12px; }
  h1 { font-size: 25px; }
  .fields td:first-child { white-space: normal; }
}
