/* Chrome around the API reference only. RapiDoc styles itself from the attributes
   in api.html; this is just the page background and the slotted logo, so the
   reference does not look like a different site from the board. */

:root {
  --gold-light: #f6d471;
  --gold-deep: #c98a3e;
  --bg: #08080a;
  --ink: #fff9f9;
  --ink-dim: #a4a4ad;
  --line: #24242a;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

rapi-doc {
  width: 100%;
  height: 100vh;
}

.api-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.api-logo a img {
  display: block;
  border-radius: 5px;
  flex: 0 0 auto;
}

.api-logo a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.api-logo span:last-child {
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-left: 30px;
}

/* Fixed both ways and non-shrinking. The slot lives inside the component's own
   flex layout, which otherwise stretches the mark into a gradient bar. */
.api-mark {
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 22px;
  min-height: 22px;
  border-radius: 5px;
  background: linear-gradient(93.95deg, #f6d471 0%, #c98a3e 100%);
  color: #1b1a18;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex: 0 0 auto;
}

/* RapiDoc injects a Google Fonts stylesheet for Open Sans regardless of the
   regular-font attribute. The service's own CSP (font-src 'self') blocks it, which is
   the behaviour we want — no reader's address reaches a font CDN — and the component
   then falls back to the stack below. The only cost is one blocked-request line in
   the console, which is preferable to relaxing font-src. */
rapi-doc {
  --font-regular: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
