/* Adapted from apps/docs/app/globals.css and the docs components at 04e3ee750^.
   Preserve the original ISPO docs typography and spacing with green accents. */
@font-face {
  font-family: 'Geist Variable';
  src: url('/fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --dim-toolbar-contents-height: 4rem;
  --light-color-background: oklch(1 0 0);
  --light-color-background-secondary: oklch(0.97 0 0);
  --light-color-background-active: rgba(22, 101, 52, 0.08);
  --light-color-accent: oklch(0.922 0 0);
  --light-color-text: oklch(0.145 0 0);
  --light-color-text-aside: oklch(0.556 0 0);
  --light-color-link: #166534;
  --light-color-focus-outline: var(--light-color-link);
  --dark-color-background: oklch(0.145 0 0);
  --dark-color-background-secondary: oklch(0.205 0 0);
  --dark-color-background-active: rgba(134, 239, 172, 0.1);
  --dark-color-accent: oklch(1 0 0 / 10%);
  --dark-color-text: oklch(0.985 0 0);
  --dark-color-text-aside: oklch(0.708 0 0);
  --dark-color-link: #86efac;
  --dark-color-focus-outline: var(--dark-color-link);
  --font-family: 'Geist Variable', 'Inter', system-ui, sans-serif;
  --font-family-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

body { font-family: var(--font-family); font-size: 16px; line-height: 1.75; }
.container { max-width: 1600px; padding-inline: 32px; }
.tsd-page-toolbar {
  border-bottom: 1px solid var(--color-accent);
  background: color-mix(in srgb, var(--color-background) 95%, transparent);
  backdrop-filter: blur(12px);
}
.tsd-toolbar-contents { position: relative; gap: 16px; margin-inline: auto; }
.tsd-page-toolbar a.title { display: flex; align-items: center; font-size: 0; }
.tsd-page-toolbar a.title::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  background: var(--color-text);
  mask: url('/ispo-icon.svg') center / contain no-repeat;
}
#tsd-toolbar-links { margin-left: auto; font-size: 14px; }
#tsd-search-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  width: 280px;
  height: 38px;
  color: var(--color-text-aside);
  background: var(--color-background);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
#tsd-search-trigger::after { content: 'Search documentation…'; font: 14px var(--font-family); }
#tsd-search { border: 1px solid var(--color-accent); border-radius: 10px; }
#docs-theme-toggle {
  --theme-icon: url('/docs-sun.svg');
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 6px;
  color: var(--color-text);
  background: transparent;
  font-size: 0;
  cursor: pointer;
}
#docs-theme-toggle::before {
  content: '';
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  background: var(--color-background-secondary);
}
#docs-theme-toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: var(--theme-icon) center / contain no-repeat;
  pointer-events: none;
}
:root[data-theme='light'] #docs-theme-toggle { --theme-icon: url('/docs-moon.svg'); }
@media (prefers-color-scheme: light) {
  :root[data-theme='os'] #docs-theme-toggle { --theme-icon: url('/docs-moon.svg'); }
}
#docs-theme-toggle:hover::before { background: var(--color-background-active); }
#docs-theme-toggle:focus-visible {
  outline: 2px solid var(--color-focus-outline);
  outline-offset: 2px;
}

.tsd-page-title { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--color-accent); }
.tsd-page-title:has(+ .tsd-typography > h1) { display: none; }
.tsd-page-title h1 { font-size: 30px; font-weight: 700; line-height: 1.3; letter-spacing: -0.025em; }
.tsd-typography h1 { margin: 0 0 24px; font-size: 36px; font-weight: 700; line-height: 1.25; letter-spacing: -0.025em; }
.tsd-typography h2 { margin: 40px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--color-accent); font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }
.tsd-typography h3 { margin: 32px 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -0.025em; }
.tsd-typography :is(h1, h2, h3) { padding-inline: 0; }
.tsd-typography p, .tsd-typography li { color: var(--color-text-aside); line-height: 1.75; }
.tsd-typography p { margin: 16px 0; }
.tsd-typography strong { color: var(--color-text); font-weight: 600; }
.tsd-typography ul, .tsd-typography ol { padding-left: 24px; margin: 16px 0; }
.tsd-typography li + li { margin-top: 8px; }
.tsd-typography a, a[class*='tsd-kind-'] { color: var(--color-link); text-underline-offset: 3px; }
.tsd-typography pre, .tsd-signature {
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  background: var(--color-background-secondary);
  padding: 16px;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.col-content :is(h1, h2, h3, h4, .tsd-type-declaration, .tsd-parameters) { overflow-wrap: anywhere; }
.tsd-signature :is(a, span) { white-space: normal; }
.tsd-typography code { border-radius: 4px; font-size: 0.875em; }
.tsd-typography pre code { background: transparent; padding: 0; font-size: inherit; }
.tsd-typography table { width: 100%; font-size: 14px; border-collapse: collapse; margin: 24px 0; }
.tsd-typography th, .tsd-typography td { text-align: left; padding: 10px 14px; border-color: var(--color-accent); }
.tsd-typography th { font-weight: 600; }

.tsd-navigation { font-size: 14px; }
.tsd-navigation h3 { font-size: 14px; font-weight: 600; }
.tsd-navigation a { color: var(--color-text-aside); border-radius: 6px; white-space: normal; overflow-wrap: anywhere; }
.tsd-navigation a > span { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; }
.tsd-navigation a:hover { color: var(--color-text); }
.tsd-navigation a.current { color: var(--color-link); background: var(--color-background-active); font-weight: 500; }
.tsd-navigation a.current > span { color: inherit; }
.tsd-navigation a > svg { display: none; }
.tsd-navigation .tsd-nav-link { padding: 4px 8px; }
.tsd-navigation ul { margin: 0; }
.tsd-navigation details > ul { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--color-accent); }
.tsd-navigation :is(.tsd-nested-navigation, .tsd-small-nested-navigation) { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--color-accent); }
.tsd-navigation :is(.tsd-nested-navigation, .tsd-small-nested-navigation) > li > details { margin-left: 0; }
.page-menu, .page-menu h3 { font-size: 14px; }
.page-menu .tsd-navigation a { line-height: 1.6; }
footer { padding-block: 32px; max-height: none; font-size: 14px; color: var(--color-text-aside); }
footer > p { max-width: 1216px; margin-inline: auto; padding-inline: 24px; }

* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: oklch(0.556 0 0 / 0.18) transparent; }
@media (min-width: 770px) {
  .container-main { grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: 'sidebar content'; gap: 40px; --dim-container-main-margin-y: 24px; }
  .col-content { padding: 0; min-width: 0; }
  .col-sidebar { display: contents; }
  .site-menu { grid-area: sidebar; margin-top: 0; position: sticky; top: 80px; max-height: calc(100vh - 104px); overflow-y: auto; }
  .page-menu { display: none; }
}
@media (min-width: 1200px) {
  .container-main { grid-template-columns: 360px minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  .container-main { grid-template-columns: 360px minmax(0, 1fr) 208px; grid-template-areas: 'sidebar content toc'; }
  .page-menu { display: block; padding-left: 0; }
}
@media (max-width: 769px) {
  .container { padding-inline: 20px; }
  .col-content { padding-top: 24px; }
  .tsd-typography h1 { font-size: 30px; }
  .tsd-page-title h1 { font-size: 26px; }
  .tsd-member > h3 { margin-inline: 0; padding-inline: 0; }
  .col-sidebar { width: min(420px, 90vw); box-sizing: border-box; }
  #tsd-toolbar-links { display: none; }
  #tsd-search-trigger { position: static; transform: none; margin-left: auto; width: 38px; padding: 10px; }
  #tsd-search-trigger::after { content: none; }
}
