:root {
  --ink: #142226;
  --muted: #5d7076;
  --paper: #f5f8f7;
  --panel: #ffffff;
  --line: #d6e1e0;
  --teal: #10756d;
  --teal-dark: #0d514b;
  --mint: #dff4ef;
  --amber: #a86f19;
  --code: #0b1719;
  --code-text: #dcebed;
  --shadow: 0 14px 38px rgba(20, 34, 38, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid rgba(16, 117, 109, 0.42); outline-offset: 3px; }

.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 800; }

.docs-intro { display: flex; align-items: end; justify-content: space-between; gap: 36px; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 50px; }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 0.74rem; font-weight: 850; letter-spacing: 0; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 14px; font-size: 3rem; line-height: 1.1; letter-spacing: 0; }
h2 { margin-bottom: 13px; font-size: 2rem; line-height: 1.15; letter-spacing: 0; }
.docs-intro .api-host-note { max-width: 650px; color: var(--muted); font-size: 0.9rem; }
.docs-intro p a { text-decoration: underline; text-underline-offset: 3px; }
.docs-sidebar { max-height: calc(100vh - 100px); overflow-y: auto; }
@media (max-width: 820px) { .docs-sidebar { max-height: none; } }
.docs-intro > div > p:last-child { max-width: 680px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.docs-intro .base-url { margin: 18px 0 0; color: var(--muted); font-size: 0.9rem; }
.base-url code { color: var(--teal-dark); font-weight: 750; }
.base-url code,
.endpoint-title code {
  min-width: 0;
  overflow-wrap: anywhere;
}
.release-facts { display: grid; grid-template-columns: repeat(3, minmax(116px, 1fr)); gap: 1px; min-width: 360px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.release-facts div { padding: 14px; background: var(--panel); }
.release-facts dt { margin-bottom: 5px; color: var(--muted); font-size: 0.72rem; font-weight: 750; text-transform: uppercase; }
.release-facts dd { margin: 0; font-size: 0.86rem; font-weight: 800; }

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 780px); align-items: start; gap: 68px; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 14px 0 100px; }
.docs-sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 5px; padding-right: 20px; color: var(--muted); font-size: 0.9rem; }
.docs-sidebar a { padding: 6px 10px; border-radius: 5px; }
.docs-sidebar a:hover { color: var(--teal-dark); background: var(--mint); }
.docs-sidebar span { margin: 18px 0 2px; color: var(--ink); font-size: 0.74rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.docs-content { min-width: 0; }
.docs-section { padding: 42px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.docs-section:first-child { border-top: 0; padding-top: 10px; }
.docs-section > p:not(.eyebrow) { max-width: 730px; color: var(--muted); }
.callout { display: flex; gap: 12px; margin: 24px 0; padding: 15px 17px; color: var(--teal-dark); background: var(--mint); border-left: 3px solid var(--teal); border-radius: 0 6px 6px 0; font-size: 0.92rem; }
.callout strong { min-width: 0; }
.callout.warn { color: #6f4a10; background: #fff3dc; border-left-color: var(--amber); }
.webhook-flow { display: grid; gap: 12px; margin: 24px 0; padding: 0; list-style: none; counter-reset: webhook-flow; }
.webhook-flow li { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 11px; align-items: start; padding: 13px 0; border-bottom: 1px solid var(--line); counter-increment: webhook-flow; }
.webhook-flow li::before { display: grid; place-items: center; width: 28px; height: 28px; color: var(--teal-dark); background: var(--mint); border: 1px solid #b8ddd5; border-radius: 50%; content: counter(webhook-flow); font-size: 0.74rem; font-weight: 850; }
.webhook-flow > li > strong { grid-column: 2; display: block; margin-bottom: 2px; }
.webhook-flow > li > span { grid-column: 2; min-width: 0; color: var(--muted); font-size: 0.92rem; }
.webhook-flow em { color: var(--ink); font-style: normal; font-weight: 750; }
.endpoint-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.endpoint-title code { color: var(--ink); font-size: 0.95rem; font-weight: 750; }
.method { min-width: 58px; padding: 4px 8px; border-radius: 4px; color: white; background: #48565a; font-size: 0.73rem; font-weight: 900; letter-spacing: 0; text-align: center; }
.method.get { background: #287a92; }
.method.post { background: var(--teal); }
.endpoint-meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0; }
.endpoint-meta span { padding: 6px 9px; color: var(--muted); background: #edf2f1; border-radius: 5px; font-size: 0.82rem; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
:not(pre) > code { overflow-wrap: anywhere; }
.endpoint-meta code { color: var(--ink); font-size: 0.82rem; font-weight: 700; }
.code-panel { overflow: hidden; margin-top: 24px; border: 1px solid #1e3639; border-radius: 7px; background: var(--code); box-shadow: var(--shadow); }
.code-heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; color: #9bb2b6; border-bottom: 1px solid #1e3639; font-size: 0.76rem; font-weight: 800; }
.code-heading button { padding: 4px 8px; color: #dcebed; background: transparent; border: 1px solid #456165; border-radius: 4px; cursor: pointer; font-size: 0.76rem; }
.code-heading button:hover { background: #173034; }
pre { overflow-x: auto; margin: 0; padding: 18px; color: var(--code-text); font-size: 0.8rem; line-height: 1.65; }
.error-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.error-grid div { display: grid; gap: 5px; min-height: 92px; padding: 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.error-grid code { color: var(--teal-dark); font-weight: 850; }
.error-grid span { color: var(--muted); font-size: 0.88rem; }
.docs-footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 38px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.88rem; }
.docs-footer a { color: var(--teal-dark); font-weight: 750; }
.docs-footer div { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 820px) {
  .docs-intro { align-items: start; flex-direction: column; padding: 52px 0 32px; }
  .release-facts { width: 100%; min-width: 0; }
  .docs-layout { display: block; padding-top: 4px; }
  .docs-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-bottom: 32px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
  .docs-sidebar span { display: none; }
  .docs-sidebar a { padding: 7px; font-size: 0.82rem; }
  .docs-section { padding: 34px 0; }
}

@media (max-width: 560px) {
  .docs-intro, .docs-layout, .docs-footer { width: min(100% - 28px, 1180px); }
  h1 { font-size: 2.65rem; }
  .release-facts { grid-template-columns: 1fr; }
  .docs-sidebar { grid-template-columns: 1fr; }
  .callout { flex-direction: column; gap: 4px; }
  .error-grid { grid-template-columns: 1fr; }
  pre { padding: 14px; font-size: 0.73rem; }
}
