/* the documentation's own look, beside Rumskib's market.css (which is synced and not changed here). It follows
   docs.monotree.com (mono-docs): Aeonik headings, white page, mint for what is active, a blue link, hairline rules,
   method badges in blue, mint and red, and GitHub's dark theme for code. The portal's page is 13.5px to the rem, so
   sizes here are in px to read as mono-docs does. Dark mode is the portal's own (.dark-mode), which mono-docs lacks */
/* Inter from this site itself (no request leaves it for a font); there is no 700 file, so bold is the semibold drawn as it is */
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik'; src: url('../fonts/Aeonik-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

.docs {
    --d-ink: #060810; --d-body: #313335; --d-muted: #7e8180; --d-faint: #b1b4b3;
    --d-page: #ffffff; --d-soft: #f7f8f8; --d-soft-2: #f0f1f1; --d-line: #f0f1f1; --d-line-strong: #e5e7e7; --d-ring: rgb(6 8 16 / 0.1);
    --d-mint: #e2fee6; --d-mint-ink: #152828; --d-lime: #87ed82; --d-link: #3618eb;
    --d-blue: #2785ba; --d-blue-bg: rgb(42 145 202 / 0.1); --d-blue-ring: rgb(39 133 186 / 0.2);
    --d-red: #7c2529; --d-red-bg: rgb(175 39 47 / 0.1); --d-red-ring: rgb(124 37 41 / 0.25);
    --d-warn-bg: #fef3c7; --d-warn-ring: rgb(180 83 9 / 0.2);
    --d-code-bg: #0d1117; --d-code-bar: #161b22; --d-code-ink: #e6edf3; --d-code-muted: #8b949e;
    font-feature-settings: 'cv11';
}
.dark-mode .docs {
    --d-ink: #ecedec; --d-body: #cfd2d0; --d-muted: #979c99; --d-faint: #6c716e;
    --d-page: #151817; --d-soft: #1a1e1c; --d-soft-2: #222625; --d-line: rgb(255 255 255 / 0.07); --d-line-strong: rgb(255 255 255 / 0.12); --d-ring: rgb(255 255 255 / 0.12);
    --d-mint: #173322; --d-mint-ink: #b8f5c0; --d-link: #a99bff;
    --d-blue: #7cc4ec; --d-blue-bg: rgb(42 145 202 / 0.16); --d-blue-ring: rgb(124 196 236 / 0.25);
    --d-red: #f19a9f; --d-red-bg: rgb(175 39 47 / 0.2); --d-red-ring: rgb(241 154 159 / 0.25);
    --d-warn-bg: rgb(180 83 9 / 0.18); --d-warn-ring: rgb(251 191 36 / 0.25);
    --d-code-bg: #0b0d0c; --d-code-bar: #111413;
}

/* the frame: a white sheet inside the portal, the page itself when signed out */
.docs-sheet { background: var(--d-page); color: var(--d-ink); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--d-ring); }
.docs-heading { font-family: 'Aeonik', var(--font-sans); font-weight: 500; letter-spacing: -0.01em; color: var(--d-ink); }
.docs-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--d-muted); }
.docs-lead { font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; color: var(--d-muted); }

/* the menu down the side: section titles in capitals, items with a dot, the open one on mint */
.docs-nav-title { margin-bottom: 6px; padding: 0 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--d-ink); }
.docs-nav-item { display: flex; align-items: center; gap: 8px; border-radius: 6px; padding: 6px 8px; font-size: 13.5px; line-height: 1.3; color: var(--d-muted); transition: background-color .15s, color .15s; }
.docs-nav-item::before { content: ''; width: 4px; height: 4px; flex: none; border-radius: 9999px; background: var(--d-faint); }
.docs-nav-item:hover { background: var(--d-soft); color: var(--d-ink); }
.docs-nav-item[aria-current='page'] { background: var(--d-mint); color: var(--d-ink); font-weight: 500; }
.docs-nav-item[aria-current='page']::before { background: var(--d-ink); }
.docs-nav-sub { margin: 2px 0 4px 12px; border-left: 1px solid var(--d-line-strong); padding-left: 8px; }
.docs-nav-sub .docs-nav-item { padding: 4px 8px; font-size: 12.5px; }
.docs-nav-sub .docs-nav-item::before { display: none; }
.docs-search { display: flex; align-items: center; gap: 8px; height: 36px; border-radius: 8px; padding: 0 10px; box-shadow: inset 0 0 0 1px var(--d-ring); color: var(--d-muted); font-size: 13px; background: var(--d-page); }
.docs-search:focus-within { box-shadow: inset 0 0 0 1px var(--d-ink); color: var(--d-ink); }
.docs-kbd { border-radius: 4px; padding: 1px 6px; box-shadow: inset 0 0 0 1px var(--d-ring); font-size: 11px; color: var(--d-muted); }

/* the words of a guide (and an endpoint's description) */
.docs-prose { font-size: 15px; line-height: 1.6; letter-spacing: -0.01em; color: var(--d-body); }
.docs-prose > :first-child { margin-top: 0; }
.docs-prose h2 { margin: 48px 0 14px; font-family: 'Aeonik', var(--font-sans); font-weight: 500; font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; color: var(--d-ink); }
.docs-prose h3 { margin: 32px 0 10px; font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -0.01em; color: var(--d-ink); }
.docs-prose h4 { margin: 24px 0 8px; font-size: 15px; font-weight: 600; color: var(--d-ink); }
.docs-prose p { margin: 0 0 16px; }
.docs-prose a { color: var(--d-link); text-underline-offset: 2px; }
.docs-prose a:hover { text-decoration: underline; }
.docs-prose strong { font-weight: 600; color: var(--d-ink); }
.docs-prose ul, .docs-prose ol { margin: 0 0 16px; padding-left: 20px; }
.docs-prose ul { list-style: disc; }
.docs-prose ol { list-style: decimal; }
.docs-prose li { margin: 4px 0; }
.docs-prose li::marker { color: var(--d-faint); }
.docs-prose hr { margin: 32px 0; border: 0; border-top: 1px solid var(--d-line-strong); }
.docs-prose :not(pre) > code { border-radius: 4px; background: var(--d-soft-2); padding: 2px 6px; font-family: var(--font-mono); font-size: 0.82em; color: var(--d-ink); }
.docs-table { margin: 0 0 24px; overflow-x: auto; }
.docs-prose table { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; }
@media (max-width: 640px) { .docs-table table { min-width: 520px; } .docs-table table:has(thead th:nth-child(2):last-child), .docs-table table:has(tbody td:nth-child(2):last-child) { min-width: 0; } }
.docs-field code { overflow-wrap: anywhere; }
.docs-prose td code { white-space: nowrap; }
.docs-prose thead th { border-bottom: 1px solid var(--d-line-strong); padding: 8px 16px 8px 0; text-align: left; font-weight: 500; color: var(--d-muted); }
.docs-prose tbody td { border-bottom: 1px solid var(--d-line); padding: 8px 16px 8px 0; vertical-align: top; color: var(--d-body); }
.docs-prose blockquote { margin: 0 0 16px; border-left: 2px solid var(--d-line-strong); padding-left: 14px; color: var(--d-muted); }
.docs-prose a.docs-anchor { color: inherit; text-decoration: none; }
.docs-prose a.docs-anchor:hover::after { content: ' #'; color: var(--d-faint); }
.docs-prose h2, .docs-prose h3, [data-anchor] { scroll-margin-top: 80px; }

/* a note, a warning or a tip, from > [!NOTE], > [!WARNING] and > [!TIP] in a guide */
.docs-callout { display: flex; gap: 12px; margin: 0 0 20px; border-radius: 12px; padding: 12px 16px; font-size: 14.5px; color: var(--d-ink); background: var(--d-blue-bg); box-shadow: inset 0 0 0 1px var(--d-blue-ring); }
.docs-callout[data-tone='warn'] { background: var(--d-warn-bg); box-shadow: inset 0 0 0 1px var(--d-warn-ring); }
.docs-callout[data-tone='tip'] { background: var(--d-mint); box-shadow: inset 0 0 0 1px rgb(21 40 40 / 0.1); }
.docs-callout > span { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 9999px; background: rgb(6 8 16 / 0.06); font-size: 12px; font-weight: 600; }
.docs-callout p { margin: 0; }
.docs-callout p + p { margin-top: 6px; }

/* code: GitHub's dark theme on a 12px corner, a bar with the language (or tabs) and a copy button */
.docs-block { margin: 0 0 24px; overflow: hidden; border-radius: 12px; background: var(--d-code-bg); }
.docs-block-bar { display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px 0 14px; background: var(--d-code-bar); border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.docs-block-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--d-code-muted); }
.docs-block-tab { margin-bottom: -1px; height: 36px; border-bottom: 2px solid transparent; padding: 0 8px; font-size: 12px; font-weight: 500; color: var(--d-code-muted); }
.docs-block-tab:hover { color: var(--d-code-ink); }
.docs-block-tab[aria-selected='true'] { border-color: var(--d-lime); color: #fff; }
.docs-block-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 26px; border-radius: 6px; padding: 0 8px; font-size: 11.5px; font-weight: 500; color: var(--d-code-muted); }
.docs-block-copy:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.docs-code { margin: 0; overflow-x: auto; background: var(--d-code-bg); padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--d-code-ink); }
.docs-stack { display: flex; flex-direction: column; gap: 16px; }
.docs-stack > * { margin: 0; }
.docs-block .docs-code, .docs-prose .docs-block pre { margin: 0; border-radius: 0; }
.docs-code code { font-family: inherit; background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.docs-code .hl-keyword { color: #ff7b72; }
.docs-code .hl-property { color: #79c0ff; }
.docs-code .hl-attribute { color: #d2a8ff; }
.docs-code .hl-type { color: #ffa657; }
.docs-code .hl-generic { color: #ffa657; }
.docs-code .hl-value { color: #a5d6ff; }
.docs-code .hl-literal { color: #79c0ff; }
.docs-code .hl-number { color: #79c0ff; }
.docs-code .hl-variable { color: #ffa657; }
.docs-code .hl-comment { color: #8b949e; font-style: italic; }
.docs-code .hl-blur { filter: blur(2px); }
.docs-code .hl-strong { font-weight: 700; }
.docs-code .hl-em { font-style: italic; }
.docs-code .hl-addition { color: #7ee787; }
.docs-code .hl-deletion { color: #ffa198; }

/* an endpoint: its method as a badge and its path, as mono-docs lists them */
.docs-method { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 52px; height: 24px; border-radius: 6px; padding: 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    background: var(--d-blue-bg); color: var(--d-blue); box-shadow: inset 0 0 0 1px var(--d-blue-ring); }
.docs-method[data-method='post'] { background: var(--d-mint); color: var(--d-mint-ink); box-shadow: inset 0 0 0 1px rgb(21 40 40 / 0.15); }
.docs-method[data-method='put'], .docs-method[data-method='patch'], .docs-method[data-method='delete'] { background: var(--d-red-bg); color: var(--d-red); box-shadow: inset 0 0 0 1px var(--d-red-ring); }
.docs-method[data-method='delete'] { background: rgb(175 39 47 / 0.15); }
.docs-method-text { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--d-blue); }
.docs-method-text[data-method='post'] { color: #1f8a3b; }
.dark-mode .docs-method-text[data-method='post'] { color: var(--d-mint-ink); }
.docs-method-text[data-method='put'], .docs-method-text[data-method='patch'], .docs-method-text[data-method='delete'] { color: var(--d-red); }
.docs-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--d-line); }
.docs-row:last-child { border-bottom: 0; }

/* a list of fields (parameters, a body, a response): name and type, and what it is */
.docs-fields { border-top: 1px solid var(--d-line-strong); }
.docs-field { display: flex; gap: 16px; border-bottom: 1px solid var(--d-line); padding: 10px 0; font-size: 14px; line-height: 1.5; }
.docs-field code { font-family: var(--font-mono); }
.docs-section-title { margin: 32px 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--d-ink); }

/* small things that follow the tokens: a quiet button, a card that lifts on hover, the page's own links */
.docs-ghost { display: inline-flex; align-items: center; gap: 6px; height: 34px; border-radius: 8px; padding: 0 12px; font-size: 13px; color: var(--d-muted); box-shadow: inset 0 0 0 1px var(--d-ring); transition: color .15s, box-shadow .15s; }
.docs-ghost:hover { color: var(--d-ink); box-shadow: inset 0 0 0 1px var(--d-muted); }
.docs-dark-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; border-radius: 10px; padding: 0 18px; font-size: 14px; font-weight: 500; background: var(--d-ink); color: var(--d-page); transition: opacity .15s; }
.docs-dark-btn:hover { opacity: 0.85; }
.docs-card { position: relative; display: flex; flex-direction: column; border-radius: 16px; padding: 20px; background: var(--d-page); box-shadow: inset 0 0 0 1px var(--d-ring); transition: box-shadow .2s; }
.docs-card:hover { box-shadow: inset 0 0 0 1px var(--d-muted), 0 6px 6px -6px rgb(0 0 0 / 0.08), 0 12px 16px -8px rgb(0 0 0 / 0.1); }
.docs-card-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--d-mint); color: var(--d-mint-ink); }
.docs-link { color: var(--d-link); }
.docs-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.docs-muted { color: var(--d-muted); }
.docs-ink { color: var(--d-ink); }
.docs-toc a { display: block; border-left: 1px solid var(--d-line-strong); padding: 4px 0 4px 12px; font-size: 13px; color: var(--d-muted); }
.docs-toc a:hover { color: var(--d-ink); }
.docs-toc a[aria-current='true'] { border-color: var(--d-ink); color: var(--d-ink); font-weight: 500; }

/* a checklist ([ ] in a guide): the box in place of the bullet */
.docs-prose ul:has(> li > input[type='checkbox']) { list-style: none; padding-left: 4px; }
.docs-prose li > input[type='checkbox'] { margin-right: 8px; accent-color: var(--d-ink); }
