/* Developer docs. Colours, type and the header follow drmn.app (nichiahung/drmn-website styles.css); the rest is the
   docs layout. No web fonts and no third-party files: everything is served from /developers. */
:root {
  --ink: #202126;
  --muted: #62646b;
  --line: #dedfe3;
  --paper: #fff;
  --wash: #f6f6f7;
  --brand: #6537bc;
  --focus: #5627d3;
  --code-bg: #f6f6f7;
  color-scheme: light;
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.7; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; text-wrap: balance; }
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--focus); }
img { max-width: 100%; height: auto; }
::selection { background: #e8def8; color: #29164e; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.wrap { max-width: 1248px; margin-inline: auto; padding-inline: 36px; }
.skip { position: fixed; left: 16px; top: -100px; padding: 12px 16px; background: var(--ink); color: #fff; z-index: 10; }
.skip:focus { top: 12px; }

/* Header, as on drmn.app */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { display: flex; align-items: center; gap: 36px; min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; line-height: 1; color: inherit; text-decoration: none; }
.brand img { display: block; width: 126px; height: auto; }
.brand span { font-size: 15px; font-weight: 500; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
.main-nav { display: flex; gap: 30px; margin-left: auto; align-items: center; font-size: 14px; font-weight: 500; white-space: nowrap; }
.main-nav a, .header-actions a:not(.button) { color: inherit; text-decoration: none; }
.main-nav a:hover, .header-actions a:not(.button):hover { color: var(--brand); }
.main-nav a[aria-current="page"] { color: var(--brand); }
.header-actions { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 24px; border: 1px solid #24242b; border-radius: 5px; background: #24242b; color: #fff; font-weight: 500; font-size: 14px; line-height: 1.4; white-space: nowrap; text-decoration: none; }
.button:hover { background: #43434c; color: #fff; }
.button-small { min-height: 40px; padding: 9px 17px; font-size: 13px; }
.button-ghost { background: #fff; color: var(--ink); }
.button-ghost:hover { background: var(--wash); color: var(--ink); }

/* Docs layout: a contents column and the article */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 48px 96px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.toc p { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.toc .method { font-size: 10px; }
article { max-width: 820px; }
article > section { padding-top: 40px; }
article > section:first-child { padding-top: 0; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: .02em; }
h1 { font-size: 40px; letter-spacing: -.5px; margin-top: 8px; }
.lead { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 680px; }
h2 { font-size: 26px; margin-bottom: 16px; padding-top: 8px; border-top: 1px solid var(--line); padding-top: 32px; }
article > section:first-child h2 { border-top: 0; padding-top: 0; }
h3 { font-size: 18px; margin: 28px 0 10px; }
article p { margin: 12px 0; }
article ul, article ol { padding-left: 22px; margin: 12px 0; }
article li { margin: 4px 0; }
.note { border-left: 3px solid var(--brand); background: var(--wash); padding: 12px 16px; margin: 16px 0; font-size: 15px; }
.note p { margin: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: #1d1e22; color: #ecedf0; padding: 16px 18px; border-radius: 6px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 14px 0; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.table-scroll { overflow-x: auto; margin: 14px 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--wash); white-space: nowrap; }
td code { white-space: nowrap; }
.compare th:first-child, .compare td:first-child { color: var(--muted); font-weight: 500; white-space: nowrap; }
figure { margin: 18px 0; }
figure img { border: 1px solid var(--line); border-radius: 6px; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Endpoint reference */
.endpoint { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 32px; }
.endpoint h2 { border: 0; padding: 0; margin-bottom: 6px; font-size: 22px; }
.signature { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; margin-top: 10px; }
.method { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: #e9f3ec; color: #1d6b36; }
.method-post { background: #efe8fb; color: var(--brand); }
.scope { font-size: 13px; color: var(--muted); }

/* Footer, as on drmn.app */
.site-footer { border-top: 1px solid var(--line); padding-block: 35px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; font-size: 12px; color: var(--muted); }
.footer-inner .brand img { width: 95px; }
.footer-inner > div { margin-left: auto; display: flex; gap: 16px; }
.footer-inner a { color: inherit; }

@media (max-width: 1100px) {
  .header-inner { gap: 20px; }
  .main-nav { gap: 19px; font-size: 13px; }
  .header-actions { gap: 14px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 780px) {
  .wrap { padding-inline: 16px; }
  .site-header .header-inner { flex-wrap: wrap; padding-block: 16px 14px; gap: 14px; min-height: 0; }
  .brand img { width: 104px; }
  .header-actions { margin-left: auto; }
  .main-nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; }
  h1 { font-size: 30px; }
  .lead { font-size: 16px; }
  h2 { font-size: 22px; }
  .docs { padding-block: 28px 64px; }
  .toc ol { grid-template-columns: 1fr 1fr; }
  pre { font-size: 12.5px; padding: 14px; }
  .footer-inner > div { margin-left: 0; }
  /* Tables become one block per row: "label: value" lines instead of columns too narrow to read. */
  .stack thead { display: none; }
  .stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .stack td { display: block; padding: 2px 0; border: 0; }
  .stack td[data-label]:not([data-label=""])::before { content: attr(data-label) "："; color: var(--muted); font-size: 13px; margin-right: 4px; }
  :lang(en) .stack td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; }
  .stack td:first-child { font-weight: 600; }
  .stack td:first-child::before { display: none; }
  td code { white-space: normal; }
}
