:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #18334b;
  background: #f7f7f2;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: #f7f7f2; line-height: 1.7; }
a { color: #176f83; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, code, pre { font: inherit; }

.docs-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d9e3de;
  background: rgb(247 247 242 / 94%);
  padding: 0 max(24px, calc((100% - 1180px) / 2));
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #18334b;
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand-name,
.brand-local-name {
  white-space: nowrap;
}

.brand-local-name {
  border-left: 1px solid #bfd0cf;
  padding-left: 9px;
  color: #527080;
  font-size: 12px;
  font-weight: 650;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #ec795a;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.docs-header nav { display: flex; align-items: center; gap: 22px; }
.docs-header nav a { color: #416276; font-size: 14px; font-weight: 650; text-decoration: none; }

.docs-layout {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  grid-template-columns: 190px minmax(0, 860px);
  gap: 64px;
  justify-content: center;
}

.docs-toc {
  position: sticky;
  top: 96px;
  display: flex;
  height: fit-content;
  flex-direction: column;
  gap: 7px;
  padding-top: 58px;
}

.docs-toc p { margin: 0 0 7px; color: #18334b; font-size: 13px; font-weight: 750; }
.docs-toc a { color: #607789; font-size: 13px; text-decoration: none; }
.docs-toc a:hover { color: #207c89; }

.docs-content { min-width: 0; padding: 54px 0 72px; }
.docs-content section { border-top: 1px solid #d9e3de; padding: 46px 0 8px; }
.docs-content .docs-hero { border-top: 0; padding-top: 6px; }

.eyebrow { margin: 0 0 12px; color: #278a82; font-size: 14px; font-weight: 750; }
h1, h2, h3 { color: #18334b; line-height: 1.25; letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 62px); }
h2 { margin: 0 0 20px; font-size: 27px; }
h3 { margin: 34px 0 14px; font-size: 19px; }
p { margin: 12px 0; color: #4d687a; }
.lead { max-width: 720px; margin-top: 20px; font-size: 18px; line-height: 1.75; }
.muted { color: #6a8090; font-size: 14px; }

.endpoint-summary {
  display: grid;
  margin: 34px 0 0;
  border-top: 1px solid #d9e3de;
}

.endpoint-summary div {
  display: grid;
  min-width: 0;
  grid-template-columns: 124px minmax(0, 1fr);
  border-bottom: 1px solid #d9e3de;
  padding: 15px 0;
}

.endpoint-summary dt { color: #607789; font-size: 14px; font-weight: 650; }
.endpoint-summary dd { min-width: 0; margin: 0; color: #18334b; overflow-wrap: anywhere; }

code {
  border-radius: 4px;
  background: #edf3f0;
  color: #185f69;
  padding: 1px 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

pre code { border-radius: 0; background: transparent; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; }

.notice {
  margin: 24px 0;
  border-left: 4px solid #207c89;
  border-radius: 0 6px 6px 0;
  background: #eaf4f2;
  color: #2c5664;
  padding: 14px 16px;
}

.notice--warning { border-left-color: #c66b24; background: #fff2e5; color: #74491f; }
ol, ul { color: #405d70; padding-left: 24px; }
li + li { margin-top: 8px; }

.code-block { margin: 18px 0 26px; border: 1px solid #cfdcd6; border-radius: 7px; overflow: hidden; }
.code-block__header {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #cfdcd6;
  background: #eef3f0;
  padding: 0 12px 0 15px;
  color: #405d70;
  font-size: 13px;
  font-weight: 650;
}

.code-block__header button,
.primary-copy {
  min-height: 32px;
  border: 1px solid #aac7c5;
  border-radius: 6px;
  background: #fff;
  color: #176f83;
  padding: 0 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.primary-copy { min-height: 40px; background: #207c89; color: #fff; border-color: #207c89; }
pre {
  max-width: 100%;
  margin: 0;
  background: #122536;
  color: #e8f1f2;
  padding: 18px;
  overflow: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
}

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 6px; }
.section-heading p { margin-top: 0; }
.ai-context { border: 1px solid #1d3f50; border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }

.tool-list { display: grid; min-width: 0; gap: 12px; }
.tool { width: 100%; min-width: 0; border: 1px solid #d9e3de; border-radius: 7px; background: #fff; padding: 20px; }
.tool p:last-child { margin-bottom: 0; }
.tool__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool__heading code { background: transparent; color: #18334b; padding: 0; font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.tool__heading span { flex: 0 0 auto; border-radius: 999px; background: #e6f4f0; color: #207c89; padding: 3px 8px; font-size: 12px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
th, td { border-bottom: 1px solid #d9e3de; padding: 11px 10px; text-align: left; vertical-align: top; }
th { background: #eef3f0; color: #405d70; font-size: 13px; }
td { color: #4d687a; }

.docs-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
  border-top: 1px solid #d9e3de;
  padding-top: 24px;
  color: #6a8090;
  font-size: 13px;
}

.copy-toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(340px, calc(100% - 44px));
  transform: translateY(16px);
  border-radius: 7px;
  background: #18334b;
  color: #fff;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 13px;
}

.copy-toast.is-visible { transform: translateY(0); opacity: 1; }

@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }
  .docs-header { min-height: 60px; gap: 10px; padding-inline: 16px; }
  .brand { gap: 7px; font-size: 15px; }
  .brand-local-name { padding-left: 6px; font-size: 10px; }
  .docs-header nav a:not(:last-child) { display: none; }
  .docs-layout { display: block; width: min(100% - 32px, 640px); }
  .docs-toc { display: none; }
  .docs-content { padding: 34px 0 52px; }
  .docs-content section { padding-top: 38px; }
  h1 { font-size: 40px; }
  h2 { font-size: 24px; }
  .lead { font-size: 16px; }
  .endpoint-summary div { grid-template-columns: 1fr; gap: 4px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .primary-copy { align-self: flex-start; }
  .tool { padding: 17px 15px; }
  .tool__heading { align-items: flex-start; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  pre { font-size: 12px; padding: 15px; }
  .docs-footer { align-items: flex-start; flex-direction: column; }
}

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