/**
 * Makes the generated API reference look like the rest of the site.
 *
 * TypeDoc ships its own palette and typography, so the reference read as a
 * different product from the guides it sits beside. This maps its theme
 * variables onto the viewer's, rather than restyling components one by one —
 * the two stay in step that way even as TypeDoc's markup changes.
 */

:root {
  --prorm-accent: #3b82f6;
  --prorm-accent-fg: #1d4ed8;

  --color-background: #ffffff;
  --color-background-secondary: #f7f8fa;
  --color-background-active: #eff6ff;
  --color-text: #1b1f24;
  --color-text-aside: #656d76;
  --color-link: var(--prorm-accent-fg);
  --color-accent: #e4e7eb;
  --color-active-menu-item: #eff6ff;
  --color-focus-outline: var(--prorm-accent);
  --color-icon-background: #ffffff;
  --color-ts-keyword: #7c3aed;
  --color-ts-interface: #0e7490;
  --color-ts-class: #1d4ed8;
  --color-ts-function: #b45309;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #111317;
    --color-background-secondary: #171a1f;
    --color-background-active: #172033;
    --color-text: #e8eaed;
    --color-text-aside: #9aa4b0;
    --color-link: #93c5fd;
    --color-accent: #272c33;
    --color-active-menu-item: #172033;
    --color-icon-background: #171a1f;
    --color-ts-keyword: #c4b5fd;
    --color-ts-interface: #67e8f9;
    --color-ts-class: #93c5fd;
    --color-ts-function: #fbbf24;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* The header, matched to the site's top bar. */
.tsd-page-toolbar {
  border-bottom: 1px solid var(--color-accent);
  background: color-mix(in srgb, var(--color-background) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
}
.tsd-page-toolbar a.title { font-weight: 700; letter-spacing: -0.01em; }

/* Panels and code, given the same shapes the guides use. */
.tsd-panel { border: 1px solid var(--color-accent); border-radius: 12px; }
pre, code {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
pre { border: 1px solid var(--color-accent); border-radius: 10px; }
:not(pre) > code {
  padding: 0.15em 0.4em; border-radius: 5px;
  background: var(--color-background-secondary);
  font-size: 0.855em;
}

/* Navigation, matched to the sidebar's pill-shaped active item. */
.tsd-navigation a { border-radius: 6px; }
.tsd-navigation a.current,
.tsd-navigation a:hover { background: var(--color-active-menu-item); }

/* The way back to the guides, injected by reference.js. */
.prorm-back {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  color: var(--color-text-aside);
  font-size: 0.8125rem; font-weight: 600; text-decoration: none;
}
.prorm-back:hover {
  background: var(--color-background-secondary);
  color: var(--color-text);
  text-decoration: none;
}
