:root {
  color-scheme: light;
  --page: #f5f7f5;
  --surface: #fff;
  --ink: #14221d;
  --muted: #53645b;
  --action: #1b6048;
  --action-dark: #104732;
  --line: #dce3dd;
  --tint: #eaf3ed;
  --code: #142820;
  --radius: 12px;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 104px; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 16px; line-height: 1.72; }
a { color: var(--action); text-decoration-color: #7aab96; text-underline-offset: 4px; }
a:hover { color: var(--action-dark); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid #137b54; outline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 64px, 1224px); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 16px; }
.brand, .shop-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand { gap: 12px; font-weight: 750; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--action); color: white; font-size: 17px; }
.brand-label { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 550; }
.shop-link { gap: 8px; font-size: 14px; }
.skip-link { position: absolute; top: 9px; left: 16px; z-index: 20; padding: 8px 12px; background: var(--surface); border-radius: 8px; transform: translateY(-140%); }
.skip-link:focus { transform: translateY(0); }

.hero { position: relative; background: #e9f0eb; border-bottom: 1px solid #d6e0d8; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: clamp(28px, 6vw, 96px); min-height: 418px; padding-block: 64px; }
.hero-copy { animation: enter .42s ease-out both; }
@keyframes enter { from { opacity: .45; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(42px, 6.1vw, 84px); letter-spacing: -.05em; line-height: 1.1; font-weight: 780; }
.hero-copy p { max-width: 29em; margin-top: 20px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; margin-top: 28px; gap: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 7px 16px;
  border: 1px solid #b5c5bb;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  font-weight: 650;
  transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--action); }
.button:active { transform: translateY(1px); }
.button.primary { color: white; background: var(--action); border-color: var(--action); }
.button.primary:hover { background: var(--action-dark); }
.hero-request { min-width: 0; overflow: hidden; border-radius: 16px; border: 1px solid #283f32; background: var(--code); color: #edf4ed; box-shadow: 0 14px 39px #21362b1d; }
.request-head, .request-address { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid #35473d; }
.request-head { justify-content: space-between; font-size: 14px; font-weight: 650; }
.http-label { padding: 2px 8px; border-radius: 4px; background: #294c3b; color: #c5eeda; font: 700 13px/1.55 var(--mono); }
.request-address { flex-wrap: wrap; gap: 4px 10px; min-height: 48px; overflow-wrap: anywhere; color: #a8c0af; font: 13px/1.6 var(--mono); }
.request-address strong { color: #f3f7ef; font-weight: 550; }
.request-sample { position: relative; display: flex; justify-content: space-between; gap: 8px; align-items: end; padding: 20px; }
.request-sample code { padding: 0; background: none; color: #f3f7ef; font-size: 14px; white-space: pre; }
.request-sample .key { color: #bfcec4; }
.request-sample .value { color: #9edebd; }
.example-label { color: #b4c5b8; font-size: 13px; white-space: nowrap; }

.docs-grid { display: grid; grid-template-columns: 178px minmax(0, 1fr); align-items: start; column-gap: clamp(30px, 5vw, 76px); padding-block: 46px 64px; }
.index { position: sticky; top: 105px; min-width: 0; }
.index p { margin: 0 0 10px 12px; color: var(--muted); font-size: 13px; font-weight: 720; }
.index-links { display: grid; gap: 2px; }
.index a { display: flex; align-items: center; min-height: 44px; padding: 5px 12px; border-radius: 8px; color: var(--muted); font-weight: 550; font-size: 14px; text-decoration: none; }
.index a:hover, .index a[aria-current="location"] { color: var(--action-dark); background: var(--tint); }
.chapters { display: grid; gap: 20px; min-width: 0; }
section { min-width: 0; padding: clamp(22px, 3.4vw, 44px); border: 1px solid var(--line); background: var(--surface); border-radius: 16px; }
section h2 { margin-bottom: 16px; line-height: 1.2; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; }
section h3 { margin-top: 24px; margin-bottom: 8px; font-size: 18px; line-height: 1.45; }
section p + p { margin-top: 10px; }
section p, section li:not(.steps li) { max-width: 58em; }
code { padding: 2px 5px; border-radius: 4px; background: #eff4f0; color: #1d4a34; font: .85em/1.55 var(--mono); overflow-wrap: anywhere; }
.steps { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border: 0; }
.steps strong { font-weight: 720; }
.steps li span { color: var(--muted); }
.small-steps { margin-top: 10px; }
.plain-list { padding-left: 22px; margin: 12px 0; }
.plain-list li { padding-block: 3px; }

.protocols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 19px; }
.protocols a { position: relative; display: grid; align-content: start; gap: 4px; padding: 13px 26px 13px 12px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.protocols a:hover { transform: translateY(-2px); border-color: #97b3a3; background: #f6faf7; }
.protocols a span { color: var(--muted); font-size: 13px; }
.protocols .arrow { position: absolute; top: 12px; right: 10px; color: var(--action); font-size: 16px; }

.code-panel { min-width: 0; overflow: hidden; margin: 14px 0; border-radius: var(--radius); background: var(--code); color: #f1f7f1; }
.code-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 14px; min-height: 52px; border-bottom: 1px solid #35473d; color: #d5e4d9; font-size: 14px; }
.code-head button { min-width: 56px; min-height: 44px; padding: 4px 8px; border-radius: 6px; border: 1px solid #597063; background: #20392c; color: #eff5ef; font: inherit; cursor: pointer; }
.code-head button:hover { background: #2d5140; }
.code-head button:focus-visible, .code-panel pre:focus-visible { outline-color: #a7e7c5; outline-offset: -3px; }
pre { margin: 0; padding: 15px 16px 18px; max-width: 100%; overflow: auto; tab-size: 2; }
pre code { background: none; color: inherit; padding: 0; border-radius: 0; line-height: 1.55; font-size: 14px; }

.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { table-layout: fixed; border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { font-weight: 680; background: #f0f5f1; }
th:first-child { width: 45%; }
tbody tr:last-child td { border-bottom: 0; }
.callout { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; border-left: 3px solid var(--action); background: var(--tint); }
.callout strong { margin-right: 8px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.live-region { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .docs-grid { grid-template-columns: 144px minmax(0, 1fr); gap: 18px; }
  .protocols { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  html { scroll-padding-top: 86px; }
  .wrap { width: calc(100% - 32px); }
  .header-row { min-height: 58px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 31px; }
  h1 { font-size: clamp(36px, 10vw, 53px); }
  .hero-copy p { margin-top: 12px; }
  .hero-actions { margin-top: 19px; }
  .docs-grid { display: block; padding-block: 16px 40px; }
  .index { position: static; margin-bottom: 16px; }
  .index p { margin-inline-start: 0; }
  .index-links { grid-template-columns: repeat(4, max-content); gap: 3px; overflow-x: auto; }
  .index a { padding-inline: 8px; }
  .chapters { gap: 12px; }
  section { padding: 18px 14px; border-radius: var(--radius); }
  th, td { padding: 9px; }
  th:first-child { width: 43%; }
}
@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand-label { margin-left: 5px; padding-left: 7px; }
  .request-head, .request-address, .request-sample { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
