/* Fonts shared with the platform and Agent. Licenses live alongside the files. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-600.woff2") format("woff2");
}
@font-face {
  font-family: "VT323";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/vt323.woff2") format("woff2");
}

/* Native select retains platform keyboard, Escape and outside-click behavior. */
.ci-theme-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-inline: 0.35rem;
  font: 600 0.65rem var(--ci-body-font);
}
.ci-theme-picker[hidden] { display: none; }
.ci-theme-picker select {
  appearance: auto;
  cursor: pointer;
  min-height: 2.2rem;
  max-width: 8rem;
  padding: 0.3rem 0.35rem;
  color: var(--ci-fg);
  background: var(--ci-card);
  border: var(--ci-bw) solid var(--ci-input);
  border-radius: var(--ci-field-radius);
  font: inherit;
}
.ci-theme-swatch {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--ci-primary);
  border: 1px solid var(--ci-fg);
  border-radius: 50%;
}
.md-header__title { min-width: 0; }
@media (max-width: 44.984375em) {
  .ci-theme-label, .ci-theme-swatch { display: none; }
  .ci-theme-picker { margin-inline: 0.15rem; }
  .ci-theme-picker select { max-width: 6.4rem; }
}

/* Render the correct outlined icon without waiting for a JavaScript image swap. */
:root .md-logo img.ci-logo { display: none; }
:root:not([data-ci-preset]) .md-logo img.ci-logo--brutal,
:root[data-ci-preset="brutal"] .md-logo img.ci-logo--brutal,
:root[data-ci-preset="classic-blue"] .md-logo img.ci-logo--classic-blue,
:root[data-ci-preset="liquid"] .md-logo img.ci-logo--liquid,
:root[data-ci-preset="phosphor"] .md-logo img.ci-logo--phosphor { display: inline-block; }

/* Classic, Liquid and Phosphor have their own shapes, not Brutal offset outlines. */
:root[data-ci-preset]:not([data-ci-preset="brutal"]) {
  .md-search__form {
    border-radius: var(--ci-field-radius);
    box-shadow: inset 0 0 0 var(--ci-bw) var(--ci-input);
  }
  [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
    box-shadow: inset 0 0 0 var(--ci-bw) var(--ci-input);
  }
  [data-md-toggle="search"]:checked ~ .md-header .md-search__output {
    border-width: var(--ci-bw);
    border-top: 0;
  }
  .md-nav--primary .md-nav__item .md-nav__link--active {
    box-shadow: none;
  }
  .md-typeset h1 {
    text-transform: none;
    background: none;
    padding-bottom: 0;
    line-height: 1.25;
  }
  .md-typeset table:not([class]) th,
  .md-nav__title,
  .md-nav__item--section > .md-nav__link {
    text-transform: none;
    letter-spacing: normal;
  }
  .md-typeset pre > code,
  .md-typeset kbd,
  .md-top {
    border-width: var(--ci-bw);
  }
  .md-typeset .md-button {
    border-radius: var(--ci-button-radius);
    text-transform: none;
  }
  .md-typeset .md-button:is(:hover, :focus, :active) { transform: none; }
}

:root[data-ci-preset="liquid"] {
  .md-content__inner {
    background: color-mix(in srgb, var(--ci-card) 94%, transparent);
    backdrop-filter: blur(12px);
  }
  .md-header {
    background: color-mix(in srgb, var(--ci-header-bg) 94%, transparent);
    backdrop-filter: blur(12px);
  }
}
:root[data-ci-preset="phosphor"] {
  .md-typeset :is(h1, h2, h3, h4), .md-header__topic {
    font-weight: 400;
    letter-spacing: 0;
  }
  .md-typeset h1 { font-size: 2.25em; }
  .md-typeset h2 { font-size: 1.8em; }
  .md-nav, .md-search__input, .md-search__suggest {
    font-family: var(--ci-body-font);
  }
}

@media (forced-colors: active) {
  body, .md-content__inner, .md-header {
    background: Canvas;
    color: CanvasText;
    backdrop-filter: none;
  }
  .ci-theme-picker select { border: 1px solid ButtonText; }
  .ci-theme-swatch { display: none; }
}
