:root {
  --ink: #18232d;
  --muted: #61707c;
  --subtle: #f4f7f9;
  --line: #dfe6eb;
  --brand: #1d6f8f;
  --brand-dark: #0e4f68;
  --accent: #e9f5f8;
  --code: #f1f5f7;
  --shadow: 0 18px 45px rgba(24, 35, 45, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: #fff;
  color: var(--ink);
  margin: 0;
  min-width: 320px;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select { font: inherit; }

.docs-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  height: 68px;
  padding: 0 max(22px, calc((100vw - 1440px) / 2));
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 760;
  height: 40px;
  letter-spacing: -0.02em;
  max-width: 190px;
  overflow: hidden;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  display: flex;
  flex: 0 0 112px;
  height: 28px;
  justify-content: flex-start;
  overflow: hidden;
  width: 112px;
}

.brand-logo {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.global-nav {
  display: flex;
  gap: 18px;
  margin-right: auto;
}

.global-nav a, .header-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.global-nav a:hover, .header-link:hover { color: var(--brand-dark); }

.header-actions { align-items: center; display: flex; gap: 10px; }

.header-select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  padding: 7px 26px 7px 9px;
}

.search {
  position: relative;
  width: min(230px, 24vw);
}

.search input {
  background: var(--subtle);
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  min-height: 34px;
  outline: none;
  padding: 7px 10px 7px 31px;
  width: 100%;
}

.search input:focus { background: #fff; border-color: #8fb9c8; box-shadow: 0 0 0 3px var(--accent); }
.search::before { color: var(--muted); content: "⌕"; font-size: 19px; left: 10px; position: absolute; top: 4px; z-index: 1; }

.search-results {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: none;
  left: 0;
  max-height: 410px;
  overflow: auto;
  padding: 7px;
  position: absolute;
  right: 0;
  top: 43px;
  width: min(420px, 78vw);
  z-index: 30;
}

.search-results.is-visible { display: block; }
.search-empty { color: var(--muted); font-size: 12px; padding: 13px 10px; }
.search-result { border-radius: 7px; display: block; padding: 9px 10px; }
.search-result:hover { background: var(--subtle); text-decoration: none; }
.search-result-title { color: var(--ink); display: block; font-size: 13px; font-weight: 720; }
.search-result-meta { color: var(--brand); display: block; font-size: 10px; font-weight: 750; letter-spacing: .06em; margin-top: 3px; text-transform: uppercase; }
.search-result-excerpt { color: var(--muted); display: block; font-size: 11px; line-height: 1.45; margin-top: 3px; }

.mobile-menu { background: transparent; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); display: none; padding: 7px 9px; }

.docs-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1440px;
  min-height: calc(100vh - 68px);
}

.docs-sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 22px 56px 22px;
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  overflow: auto;
}

.sidebar-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; margin: 0 0 12px; text-transform: uppercase; }
.nav-group { margin: 0 0 24px; }
.nav-group h3 { color: var(--ink); font-size: 12px; letter-spacing: -.01em; margin: 0 0 8px; }
.nav-group a { border-left: 2px solid transparent; color: var(--muted); display: block; font-size: 12px; line-height: 1.35; padding: 6px 9px; }
.nav-group a:hover { color: var(--brand-dark); text-decoration: none; }
.nav-group a[aria-current="page"] { background: var(--accent); border-left-color: var(--brand); color: var(--brand-dark); font-weight: 730; }

.docs-main { min-width: 0; padding: 0 58px 72px; }
.docs-content { margin: 0 auto; max-width: 930px; }

.eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .13em; margin: 0 0 15px; text-transform: uppercase; }
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(38px, 5vw, 68px); letter-spacing: -.065em; line-height: 1.02; margin: 0; max-width: 800px; }
.hero .lede { color: var(--muted); font-size: 19px; line-height: 1.55; margin: 22px 0 0; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.button { border: 1px solid var(--brand); border-radius: 7px; display: inline-block; font-size: 13px; font-weight: 750; padding: 10px 14px; }
.button.primary { background: var(--brand); color: #fff; }
.button.primary:hover { background: var(--brand-dark); text-decoration: none; }
.button.secondary { background: #fff; color: var(--brand-dark); }
.button.secondary:hover { background: var(--subtle); text-decoration: none; }

.callout { background: var(--accent); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; color: #244b5b; margin: 22px 0; padding: 14px 17px; }
.callout strong { color: var(--brand-dark); }
.section-heading { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 38px; }
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 10px; display: block; padding: 19px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: #a8c8d3; box-shadow: 0 10px 25px rgba(24, 35, 45, .07); text-decoration: none; transform: translateY(-1px); }
.card h3 { color: var(--ink); font-size: 15px; letter-spacing: -.02em; margin: 0 0 7px; }
.card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0; }

.prose { max-width: 850px; padding-top: 58px; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: clamp(34px, 4vw, 50px); letter-spacing: -.055em; line-height: 1.07; margin: 0 0 14px; }
.prose h2 { border-top: 1px solid var(--line); font-size: 25px; letter-spacing: -.035em; line-height: 1.18; margin: 47px 0 16px; padding-top: 27px; }
.prose h3 { font-size: 18px; letter-spacing: -.025em; margin: 28px 0 10px; }
.prose h4 { font-size: 14px; margin: 24px 0 8px; }
.prose p, .prose li { color: #3e4e59; font-size: 15px; line-height: 1.72; }
.prose p { margin: 14px 0; }
.prose ul, .prose ol { padding-left: 25px; }
.prose li { margin: 7px 0; }
.prose code { background: var(--code); border: 1px solid #e2e9ed; border-radius: 4px; color: #205a70; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; padding: 2px 5px; }
.prose pre { background: #18232d; border-radius: 9px; color: #f3f7f8; overflow: auto; padding: 17px 19px; }
.prose pre code { background: transparent; border: 0; color: inherit; padding: 0; }
.prose blockquote { border-left: 3px solid #b8cbd3; color: var(--muted); margin: 21px 0; padding: 3px 18px; }
.prose table { border-collapse: collapse; display: block; font-size: 13px; margin: 20px 0; max-width: 100%; overflow-x: auto; width: max-content; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--subtle); color: var(--ink); font-weight: 730; }
.prose img { height: auto; max-width: 100%; }

.imported-article { max-width: 900px; }
.imported-article > h1 { margin-bottom: 8px; }
.imported-article .page-meta { margin-bottom: 30px; }
.imported-article .step { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 22px 0; overflow: hidden; }
.imported-article .step-header { align-items: baseline; background: var(--subtle); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 9px; padding: 13px 17px; }
.imported-article .step-number { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.imported-article .step-title { color: var(--ink); font-size: 16px; font-weight: 750; }
.imported-article .step-content { padding: 4px 17px 17px; }
.imported-article .step-instruction, .imported-article .step-notes { color: #3e4e59; font-size: 15px; line-height: 1.72; margin: 13px 0; }
.imported-article .step-notes { background: #fff9e9; border-left: 3px solid #d9a72d; border-radius: 0 6px 6px 0; padding: 9px 12px; }
.imported-article .screenshot { margin: 18px 0 4px; text-align: center; }
.imported-article .screenshot img { border: 1px solid var(--line); border-radius: 7px; display: inline-block; }
.imported-article .article-card-grid { margin: 24px 0 10px; }
.imported-article .article-card-grid .card { height: 100%; }
.imported-article .article-card-grid .card h3 { margin-top: 0; }
.article-card-grid { display: flex; flex-direction: column; gap: 0; }
.article-card-grid .card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 18px 10px; }
.article-card-grid .card:first-child { border-top: 1px solid var(--line); }
.article-card-grid .card:hover { background: var(--subtle); border-color: var(--line); box-shadow: none; transform: none; }
.article-card-grid .card p { max-width: 760px; }

.page-meta { color: var(--muted); font-size: 12px; margin: 0 0 26px; }
.resource-header { border-bottom: 1px solid var(--line); padding: 58px 0 34px; }
.resource-header h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.055em; line-height: 1.05; margin: 0 0 13px; }
.resource-header p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; max-width: 730px; }
.operation-list { margin-top: 30px; }
.operation-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: 66px minmax(0, 1fr) auto; padding: 16px 0; }
.operation-row:hover { text-decoration: none; }
.operation-row h3 { color: var(--ink); font-size: 14px; margin: 0 0 4px; }
.operation-row p { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; }
.method { border-radius: 4px; display: inline-block; font-size: 10px; font-weight: 850; letter-spacing: .06em; padding: 5px 6px; text-align: center; }
.method.get { background: #e9f7ef; color: #197044; }
.method.post { background: #e9f2ff; color: #275c9a; }
.method.put, .method.patch { background: #fff5df; color: #8a5d09; }
.method.delete { background: #fff0f0; color: #a43b3b; }
.operation-path { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; white-space: nowrap; }

.reference-page { background: #fff; }
.reference-page .docs-header { position: sticky; }
.reference-main { min-height: calc(100vh - 68px); }
#scalar-root { min-height: calc(100vh - 68px); }
.reference-intro { background: var(--subtle); border-bottom: 1px solid var(--line); padding: 20px max(22px, calc((100vw - 1440px) / 2)); }
.reference-intro p { color: var(--muted); font-size: 13px; margin: 0; }
.reference-intro a { font-weight: 700; }

.docs-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-top: 65px; padding: 24px 0; }
.docs-footer a { color: var(--muted); }
.not-found { padding: 100px 0; }

@media (max-width: 1040px) {
  .docs-header { gap: 14px; }
  .global-nav { gap: 11px; }
  .search { width: 180px; }
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-main { padding-left: 38px; padding-right: 38px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .docs-header { height: 60px; padding: 0 15px; }
  .global-nav, .header-link, .header-actions .header-select { display: none; }
  .header-actions { margin-left: auto; }
  .search { width: min(190px, 46vw); }
  .mobile-menu { display: block; }
  .docs-layout { display: block; min-height: 0; }
  .docs-sidebar { background: #fff; border-bottom: 1px solid var(--line); border-right: 0; display: none; height: auto; padding: 20px 20px 10px; position: static; }
  body.nav-open .docs-sidebar { display: block; }
  .docs-main { padding: 0 20px 46px; }
  .hero { padding: 48px 0 34px; }
  .hero h1 { font-size: 42px; }
  .hero .lede { font-size: 17px; }
  .card-grid { grid-template-columns: 1fr; }
  .prose { padding-top: 39px; }
  .prose h2 { margin-top: 38px; }
  .operation-row { grid-template-columns: 58px minmax(0, 1fr); }
  .operation-path { display: none; }
  .reference-intro { padding: 15px 20px; }
  .brand { height: 34px; max-width: 145px; }
  .brand-mark { flex-basis: 96px; height: 24px; width: 96px; }
}

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