:root {
  color-scheme: light dark;
  --paper: #f7f8fa;
  --paper-raised: #ffffff;
  --sidebar: #ffffff;
  --ink: #1c1f23;
  --muted: rgba(28, 31, 35, 0.62);
  --faint: rgba(28, 31, 35, 0.46);
  --soft: rgba(28, 31, 35, 0.05);
  --line: rgba(28, 31, 35, 0.09);
  --line-strong: rgba(28, 31, 35, 0.16);
  --accent: #0064fa;
  --accent-soft: rgba(0, 100, 250, 0.08);
  --green: #00a854;
  --shadow: 0 4px 18px rgba(31, 35, 41, 0.06);
  --site-header-height: 64px;
  --search-height: 0px;
  --sticky-offset: var(--site-header-height);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111113;
    --paper-raised: #18181b;
    --sidebar: #18181b;
    --ink: #f4f4f5;
    --muted: rgba(244, 244, 245, 0.62);
    --faint: rgba(244, 244, 245, 0.46);
    --soft: rgba(244, 244, 245, 0.08);
    --line: rgba(244, 244, 245, 0.1);
    --line-strong: rgba(244, 244, 245, 0.18);
    --accent: #54a9ff;
    --accent-soft: rgba(84, 169, 255, 0.13);
    --green: #35c46a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--paper);
  font-family:
    Lato, "Helvetica Neue", Arial, Helvetica, "Microsoft YaHei", "PingFang SC",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--site-header-height);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-raised) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 16px;
}

.site-brand {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--ink);
}

.site-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.site-brand:hover img {
  transform: scale(1.08);
}

.site-brand strong {
  max-width: 180px;
  overflow: hidden;
  font-size: 1.125rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  gap: 4px;
  align-items: center;
  margin: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.site-nav-link {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.site-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.header-language,
.mobile-site-menu > summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.header-language:hover,
.mobile-site-menu > summary:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.account-links {
  display: flex;
  align-items: center;
}

.account-links a {
  min-width: 49px;
  padding: 5px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.account-login {
  border-radius: 999px 0 0 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.account-register {
  border-radius: 0 999px 999px 0;
  color: #fff;
  background: var(--accent);
}

.account-register:hover {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 86%, #000);
}

.mobile-site-menu {
  position: relative;
  display: none;
}

.mobile-site-menu > summary svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.mobile-site-menu > nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.16);
}

.mobile-site-menu nav > a {
  padding: 9px 11px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.mobile-site-menu nav > a:hover,
.mobile-site-menu nav > a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.mobile-site-menu nav > span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.mobile-site-menu nav > span a {
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.mobile-site-menu nav > span .mobile-register {
  color: #fff;
  background: var(--accent);
}

.search-bar {
  position: relative;
  z-index: 1;
  min-width: 220px;
  max-width: 760px;
  flex: 1 1 520px;
  margin: 0 clamp(12px, 2vw, 32px) 0 0;
}

.search-form {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-raised);
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}

.search-form:focus-within {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-form > svg {
  width: 21px;
  margin-left: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.search-form input {
  width: 0;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 13px 12px;
  color: var(--ink);
  background: transparent;
}

.search-form kbd {
  align-self: center;
  min-width: 25px;
  margin-right: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--paper);
  font:
    600 0.74rem/1.7 "SFMono-Regular",
    Consolas,
    monospace;
  text-align: center;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.search-suggestions a {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.search-suggestions a:last-child {
  border-bottom: 0;
}

.search-suggestions a.is-active,
.search-suggestions a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.search-suggestions a span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 920px);
  gap: clamp(20px, 3vw, 40px);
  justify-content: center;
  width: min(1360px, calc(100% - 48px));
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 28px 0 80px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--sticky-offset) + 20px);
  align-self: start;
  min-width: 0;
}

.directory-toggle {
  display: none;
}

.directory-panel {
  max-height: calc(100vh - var(--sticky-offset) - 40px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 14px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--sidebar);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.docs-directory:not([open]) > .directory-panel {
  display: block;
}

.docs-tree {
  min-width: 0;
}

.tree-section {
  border-top: 1px solid var(--line);
  padding: 14px 0 10px;
}

.tree-section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.tree-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 16px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 3px 6px;
  border-radius: 7px;
  cursor: pointer;
  user-select: none;
}

.tree-heading:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.tree-index {
  color: var(--accent);
  font:
    700 0.7rem/1 "SFMono-Regular",
    Consolas,
    monospace;
  letter-spacing: 0.06em;
}

.tree-heading strong {
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.tree-count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  font:
    700 0.68rem/1.6 "SFMono-Regular",
    Consolas,
    monospace;
  text-align: center;
}

.tree-heading svg,
.directory-toggle svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform 180ms ease;
}

.tree-section:not([open]) .tree-heading svg,
.docs-directory:not([open]) .directory-toggle svg {
  transform: rotate(-90deg);
}

.tree-children {
  position: relative;
  margin: 7px 0 0 14px;
  padding: 2px 0 2px 15px;
  border-left: 1px solid var(--line-strong);
  list-style: none;
}

.tree-children li {
  margin: 1px 0;
}

.tree-link {
  position: relative;
  display: block;
  padding: 7px 9px 7px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 520;
  line-height: 1.35;
  text-decoration: none;
}

.tree-link > span {
  position: absolute;
  top: 50%;
  left: -19px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--sidebar);
  transform: translateY(-50%);
}

.tree-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.tree-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.tree-link.is-active > span {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 17%, transparent);
}

.tree-model-children {
  margin: 1px 0 6px 17px;
  padding: 0 0 0 12px;
  border-left: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  list-style: none;
}

.tree-model-children li {
  margin: 1px 0;
}

.tree-subgroup-label {
  margin: 7px 8px 1px 29px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-model-link {
  position: relative;
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  color: color-mix(in srgb, var(--muted) 90%, var(--ink));
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1.35;
  text-decoration: none;
}

.tree-model-link::before {
  position: absolute;
  top: 50%;
  left: -13px;
  width: 9px;
  border-top: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  content: "";
}

.tree-model-link:hover {
  color: var(--accent);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.tree-model-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.reading-column {
  min-width: 0;
}

.context-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 28px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  opacity: 0.5;
}

.language-link {
  font-size: 0.86rem;
}

.document {
  min-width: 0;
  margin-top: 14px;
  padding: clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--sticky-offset) + 20px);
}

.document-header {
  max-width: 790px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-family:
    Lato, "Helvetica Neue", Arial, Helvetica, "Microsoft YaHei", "PingFang SC",
    sans-serif;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
}

h2 {
  margin-top: 2.2em;
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
}

h3 {
  margin-top: 1.8em;
  font-size: 1.25rem;
}

.direct-answer {
  max-width: 790px;
  margin: 25px 0 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 1rem;
}

.direct-answer span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.document-dates {
  color: var(--muted);
  font-size: 0.82rem;
}

.prose {
  min-width: 0;
  max-width: 790px;
  margin-top: 40px;
  overflow-wrap: anywhere;
}

.prose p,
.prose li {
  max-width: 70ch;
}

.prose h2,
.prose h3 {
  scroll-margin-top: calc(var(--sticky-offset) + 22px);
}

.prose blockquote {
  margin: 24px 0;
  padding: 2px 20px;
  border-left: 3px solid var(--green);
  color: var(--muted);
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.prose table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--paper-raised);
  font-size: 0.9rem;
  line-height: 1.55;
}

.prose th,
.prose td {
  min-width: 10rem;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th:last-child,
.prose td:last-child {
  border-right: 0;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose th {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--paper-raised));
  font-weight: 700;
}

.prose tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--ink) 2.5%, transparent);
}

.prose .align-center {
  text-align: center;
}

.prose .align-right {
  text-align: right;
}

code {
  padding: 0.12em 0.34em;
  border-radius: 5px;
  overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.88em;
}

.code-block {
  position: relative;
  overflow: auto;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #dfe7ee;
  background: #101820;
}

.code-block code {
  padding: 0;
  background: transparent;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid #526170;
  border-radius: 6px;
  padding: 5px 9px;
  color: #dfe7ee;
  background: #1c2935;
  cursor: pointer;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 790px;
  margin-top: 38px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
}

.facts-grid h2 {
  margin: 0 0 12px;
  color: var(--accent);
  font:
    800 0.72rem/1.3 Lato,
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts-grid ul {
  margin: 0;
  padding-left: 20px;
}

.topic-grid,
.section-block {
  margin-top: 54px;
}

.topic-section {
  scroll-margin-top: calc(var(--sticky-offset) + 24px);
}

.topic-section + .topic-section {
  margin-top: 64px;
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.topic-heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 24px;
}

.topic-heading > span {
  padding-top: 6px;
  color: var(--accent);
  font:
    700 0.76rem/1 "SFMono-Regular",
    Consolas,
    monospace;
  letter-spacing: 0.08em;
}

.topic-heading p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.learning-path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.link-grid a {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 20px 42px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.link-grid a:hover {
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.08);
  transform: translateY(-1px);
}

.link-grid strong {
  align-self: end;
  font-family: Lato, "Microsoft YaHei", sans-serif;
  font-size: 1.08rem;
  line-height: 1.3;
}

.link-grid a > span:not(.card-arrow) {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-arrow {
  position: absolute;
  top: 14px;
  right: 15px;
  color: var(--accent);
  font-size: 0.9rem;
}

.provider-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.provider-grid a {
  min-height: 130px;
}

.marketplace-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  text-decoration: none;
}

.marketplace-callout span {
  color: var(--muted);
  font-size: 0.85rem;
}

.marketplace-callout span:last-child {
  color: var(--green);
  font-size: 1.1rem;
}

.provider-model-catalog {
  margin-top: 42px;
}

.provider-model-catalog-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.provider-model-catalog-heading p {
  margin: 0 0 4px;
  color: var(--accent);
  font: 800 0.72rem/1.4 Lato, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.provider-model-catalog-heading h2 {
  margin: 0;
}

.provider-model-catalog-heading > time,
.provider-model-catalog-note,
.provider-model-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.provider-model-catalog-heading > time {
  flex: 0 0 auto;
  padding-bottom: 4px;
}

.provider-model-catalog-note {
  max-width: 760px;
  margin: 14px 0 20px;
  line-height: 1.65;
}

.provider-model-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.provider-model-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
}

.provider-model-group h3 {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.provider-model-group h3 a {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.provider-model-group h3 a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.provider-model-group h3 a span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--accent);
}

.provider-model-group[data-model-type="image"] h3 a span,
.provider-model-group[data-model-type="video"] h3 a span {
  background: var(--green);
}

.provider-model-group[data-model-type="audio"] h3 a span {
  background: #c06b36;
}

.provider-model-group[data-model-type="retrieval"] h3 a span {
  background: #7656b5;
}

.provider-model-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.provider-model-group li {
  min-width: 0;
  padding: 15px 16px;
}

.provider-model-group li + li {
  border-top: 1px solid var(--line);
}

.provider-model-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  justify-content: space-between;
}

.provider-model-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.provider-model-status {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  font: 700 0.65rem/1.5 Lato, sans-serif;
}

.provider-model-status.is-preview {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.provider-model-status.is-legacy {
  color: #a33b27;
  background: color-mix(in srgb, #a33b27 12%, transparent);
}

.provider-model-group li > p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.provider-model-meta {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.provider-model-facts,
.provider-model-actions {
  display: flex;
  gap: 5px 12px;
  flex-wrap: wrap;
  align-items: center;
}

.provider-model-actions {
  margin-left: auto;
}

.provider-model-actions a {
  text-decoration: none;
}

.provider-model-marketplace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
  font-size: 0.82rem;
  text-decoration: none;
}

.sources li span {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 13%, transparent);
  font:
    700 0.7rem/1.4 Lato,
    sans-serif;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.related-links,
.sources ol {
  padding-left: 20px;
}

.related-links li {
  margin: 12px 0;
}

.related-links span {
  display: block;
  color: var(--muted);
}

.primary-link {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-raised);
  text-decoration: none;
}

.search-summary {
  margin-top: 40px;
  color: var(--muted);
}

.search-results {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.search-results a {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 3px 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  text-decoration: none;
}

.search-results a span {
  grid-row: 1 / span 2;
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.search-results p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.site-footer {
  padding: 64px 24px;
  color: var(--muted);
  background: var(--paper-raised);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer-balanced-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto) minmax(120px, 1fr);
  align-items: center;
  width: min(1110px, 100%);
  margin: 0 auto;
  column-gap: 12px;
}

.site-footer-balance-spacer {
  min-width: 0;
}

.site-footer-center-content {
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.site-footer-center-content p,
.custom-footer {
  margin: 0;
}

.site-footer-copyright {
  color: var(--muted);
  line-height: 1.6;
}

.site-footer-attribution {
  margin-top: 6px !important;
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.45;
}

.site-footer-attribution a {
  color: inherit;
  text-decoration: none;
}

.site-footer-attribution a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-social {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.site-footer-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-footer-icon-link:hover,
.site-footer-icon-link:focus-visible {
  color: var(--ink);
  background: var(--soft);
}

.site-footer-icon-link svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-footer-disclosure {
  position: relative;
}

.site-footer-disclosure summary {
  list-style: none;
}

.site-footer-disclosure summary::-webkit-details-marker {
  display: none;
}

.site-footer-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  box-sizing: border-box;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.14);
}

.site-footer-x-menu {
  min-width: 160px;
  padding: 8px;
  border-radius: 10px;
}

.site-footer-x-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer-x-menu a:hover,
.site-footer-x-menu a:focus-visible {
  background: var(--soft);
}

.site-footer-x-menu img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.site-footer-telegram-menu {
  width: 176px;
  padding: 10px;
  border-radius: 12px;
}

.site-footer-telegram-menu img {
  display: block;
  width: 152px;
  height: 152px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.site-footer-telegram-menu span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
  white-space: nowrap;
}

@media (min-width: 821px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    display: grid;
    grid-template-rows: var(--site-header-height) minmax(0, 1fr);
  }

  .site-header {
    position: relative;
    top: auto;
  }

  .page-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 28px 0;
  }

  .docs-sidebar {
    position: static;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
  }

  .docs-directory {
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .directory-panel {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .reading-column {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .document,
  .prose h2,
  .prose h3,
  .topic-section {
    scroll-margin-top: 24px;
  }
}

@media (max-width: 1180px) {
  .search-bar {
    max-width: 330px;
    flex-basis: 280px;
    margin-right: 16px;
  }

  .search-form kbd {
    display: none;
  }

  .page-shell {
    grid-template-columns: 250px minmax(0, 850px);
    gap: 24px;
  }

  .provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --search-height: 62px;
    --sticky-offset: calc(var(--site-header-height) + var(--search-height));
  }

  .site-header {
    height: var(--sticky-offset);
  }

  .site-header-inner {
    align-content: flex-start;
    flex-wrap: wrap;
    height: auto;
    padding: 0;
  }

  .site-brand {
    height: var(--site-header-height);
    margin-left: 12px;
  }

  .primary-nav,
  .account-links {
    display: none;
  }

  .site-header-actions {
    height: var(--site-header-height);
    margin-left: auto;
    margin-right: 12px;
  }

  .mobile-site-menu {
    display: block;
  }

  .search-bar {
    order: 3;
    min-width: 0;
    max-width: none;
    flex: 0 0 100%;
    min-height: var(--search-height);
    margin: 0;
    padding: 9px 12px;
  }

  .search-form {
    height: 44px;
  }

  .search-form input {
    padding-top: 0;
    padding-bottom: 0;
  }

  .search-form kbd {
    display: none;
  }

  .page-shell {
    display: block;
    width: min(calc(100% - 24px), 930px);
    padding-top: 18px;
  }

  .docs-sidebar {
    position: static;
    margin-bottom: 18px;
  }

  .docs-directory {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper-raised);
  }

  .docs-directory:not([open]) > .directory-panel {
    display: none;
  }

  .directory-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
  }

  .directory-panel {
    max-height: min(68vh, 620px);
    padding: 4px 14px 20px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .document {
    padding: 30px clamp(18px, 5vw, 34px) 44px;
  }

  .link-grid,
  .learning-path-grid,
  .provider-grid {
    grid-template-columns: 1fr;
  }

  .facts-grid {
    grid-template-columns: 1fr;
  }

  .provider-model-catalog-heading {
    display: block;
  }

  .provider-model-catalog-heading > time {
    display: block;
    margin-top: 8px;
  }

  .provider-model-groups {
    grid-template-columns: 1fr;
  }

  .provider-model-actions {
    width: 100%;
    margin-left: 0;
  }

  .marketplace-callout {
    grid-template-columns: 1fr auto;
  }

  .marketplace-callout > span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .marketplace-callout > span:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  .site-footer {
    padding: 40px 20px;
  }

  .site-footer-balanced-row {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }

  .site-footer-balance-spacer {
    display: none;
  }

  .site-footer-center-content {
    grid-row: 1;
  }

  .site-footer-social {
    grid-row: 2;
    justify-self: center;
  }

  .site-footer-popover {
    right: 50%;
    transform: translateX(50%);
  }
}

@media (max-width: 520px) {
  .site-brand strong {
    display: none;
  }

  .search-form > svg {
    margin-left: 12px;
  }

  .search-form input {
    padding-right: 10px;
    font-size: 0.92rem;
  }

  .context-row {
    align-items: flex-start;
  }

  h1 {
    font-size: clamp(2rem, 10.5vw, 3rem);
  }

  .topic-section + .topic-section {
    margin-top: 50px;
    padding-top: 44px;
  }

  .link-grid a {
    min-height: 120px;
  }

  .search-results a {
    grid-template-columns: 1fr;
  }

  .search-results a span {
    grid-row: auto;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .search-bar,
  .docs-sidebar,
  .site-footer,
  .language-link {
    display: none;
  }

  .page-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .document {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
