:root {
  --ink: #13201c;
  --muted: #65736e;
  --green: #007763;
  --green-deep: #075346;
  --mint: #70d6a0;
  --mint-soft: #e7f4ef;
  --paper: #fff;
  --surface: #f5f9f7;
  --line: #d9e4df;
  --line-strong: #bdcec7;
  --amber: #a96d00;
  --red: #b53b3b;
  --code: #0e1d19;
  --sidebar: 254px;
  --topbar: 68px;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 28px); }
body { margin: 0; color: var(--ink); background: var(--paper); }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
code, pre, kbd { font-family: "DM Mono", monospace; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; border-radius: 8px; color: white; background: var(--green); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.topbar {
  height: var(--topbar);
  padding: 0 24px;
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(260px, 560px) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 700; letter-spacing: -.04em; }
.brand img { width: 31px; height: 31px; object-fit: contain; }
.brand small { margin-left: 4px; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: 0; }
.search-trigger {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #75817d;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
}
.search-trigger span { font-size: 1.35rem; }
.search-trigger kbd { margin-left: auto; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; font-size: .63rem; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; font-size: .75rem; font-weight: 700; }
.topbar-actions > a { color: var(--green); }
.status-pill { padding: 7px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .68rem; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #28a85a; box-shadow: 0 0 0 4px rgba(40,168,90,.11); }
.menu-trigger { display: none; border: 0; background: transparent; font-size: 1.3rem; }

.docs-layout { padding-top: var(--topbar); display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  width: var(--sidebar);
  height: calc(100vh - var(--topbar));
  padding: 26px 20px 18px;
  position: fixed;
  top: var(--topbar);
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #fbfdfc;
}
.nav-group { margin-bottom: 24px; display: grid; gap: 2px; }
.nav-group > span { margin: 0 9px 8px; color: #8b9692; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-group a { min-height: 35px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; border-radius: 7px; color: #5c6964; font-size: .76rem; font-weight: 600; }
.nav-group a:hover { color: var(--ink); background: #edf4f1; }
.nav-group a.active { color: var(--green); background: var(--mint-soft); }
.method { padding: 4px 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font: 700 .56rem "DM Mono"; font-style: normal; letter-spacing: .03em; }
.method.get { color: #076f5d; background: #dff2ea; }
.nav-group .method { min-width: 32px; padding-inline: 0; font-size: .5rem; }
.sidebar-base { margin-top: auto; padding: 14px; display: grid; border: 1px solid var(--line); border-radius: 10px; background: white; }
.sidebar-base span { color: var(--muted); font-size: .62rem; }
.sidebar-base strong { margin-top: 3px; font-size: .75rem; }
.sidebar-base small { margin-top: 8px; color: #1b8652; font-size: .62rem; font-weight: 700; }

.docs-content { grid-column: 2; width: min(100%, 1120px); padding: 0 64px 50px; }
.doc-section { padding: 92px 0; border-bottom: 1px solid var(--line); }
.hero-section { padding-top: 88px; }
.eyebrow, .section-label { color: var(--green); font-size: .69rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin: 17px 0 24px; font-size: clamp(3.4rem, 7vw, 6rem); line-height: .99; letter-spacing: -.065em; }
h2 { max-width: 760px; margin: 13px 0 18px; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.052em; }
h3 { margin-bottom: 6px; font-size: 1rem; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.72; }
.lead { max-width: 790px; font-size: 1.12rem; }
.hero-actions { margin: 34px 0 48px; display: flex; flex-wrap: wrap; gap: 10px; }
.button { min-height: 46px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; font-size: .78rem; font-weight: 800; }
.button.primary { color: white; border-color: var(--green); background: var(--green); }
.button.primary:hover { background: var(--green-deep); }
.button.secondary:hover { border-color: var(--green); }
.base-url { padding: 17px 20px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.base-url > span { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.base-url i { width: 8px; height: 8px; border-radius: 50%; background: #28a85a; }
.base-url code { min-width: 0; overflow: hidden; color: var(--green); font-size: .78rem; text-overflow: ellipsis; }
.base-url button, .code-head button, .response-head button { border: 0; color: var(--green); background: transparent; font-size: .69rem; font-weight: 800; }
.api-facts { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.api-facts article { padding: 22px; display: grid; border: 1px solid var(--line); border-radius: 12px; }
.api-facts small { color: var(--muted); font-size: .65rem; }
.api-facts strong { margin: 8px 0 3px; font-size: .88rem; }
.api-facts span { color: #8a9691; font-size: .68rem; }

.steps { margin-top: 38px; display: grid; gap: 0; }
.steps article { padding: 23px 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 17px; border-top: 1px solid var(--line); }
.steps article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: var(--green); background: var(--mint-soft); font-size: .68rem; font-weight: 800; }
.steps p { margin: 0; }
.steps a { color: var(--green); font-weight: 700; }
.code-card { margin-top: 28px; overflow: hidden; border: 1px solid #223730; border-radius: 12px; background: var(--code); color: #dcece6; }
.code-card.compact { margin: 0; }
.code-head { min-height: 43px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.1); color: #91a59d; font-size: .68rem; }
.code-head button { color: #8de0b2; }
pre { margin: 0; overflow: auto; }
.code-card pre { padding: 21px; font-size: .76rem; line-height: 1.75; }
.split-section { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: center; gap: 65px; }
.callout { margin-top: 25px; padding: 19px; border-left: 3px solid var(--green); border-radius: 0 9px 9px 0; background: var(--mint-soft); }
.callout.warning { border-left-color: #d59d26; background: #fff8e9; }
.callout strong { font-size: .8rem; }
.callout p { margin: 5px 0 0; font-size: .77rem; }
.feature-list { margin: 25px 0 0; padding: 0; list-style: none; }
.feature-list li { padding: 12px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); font-size: .75rem; }
.feature-list span { color: var(--muted); }
.feature-list strong { text-align: right; }
.header-example { padding: 29px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.header-example small { color: var(--muted); font-size: .65rem; }
.header-example code { margin: 14px 0 18px; padding: 16px; display: block; overflow: hidden; border-radius: 8px; color: #9be2ba; background: var(--code); font-size: .68rem; text-overflow: ellipsis; }
.header-example p { margin: 0; font-size: .72rem; }

.playground-section { width: auto; margin-left: 0; padding-inline: 0; background: #f5f9f7; }
.playground { margin-top: 35px; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 15px; background: white; box-shadow: 0 20px 48px rgba(16,65,53,.08); }
.request-builder { padding: 27px; display: grid; align-content: start; gap: 17px; border-right: 1px solid var(--line); }
.builder-heading { margin-bottom: 5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.builder-heading > div { display: grid; }
.builder-heading small { color: var(--muted); font-size: .64rem; }
.builder-heading strong { margin-top: 3px; font-size: .95rem; }
.memory-badge { padding: 6px 8px; border-radius: 999px; color: var(--green); background: var(--mint-soft); font-size: .58rem; font-weight: 800; }
.request-builder label { display: grid; gap: 7px; color: #44514d; font-size: .68rem; font-weight: 700; }
.request-builder input, .request-builder select {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: white;
  font-size: .75rem;
}
.request-builder input:focus, .request-builder select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,119,99,.09); }
.key-field > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.key-field > span input { border-radius: 8px 0 0 8px; }
.key-field > span button { padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 8px 8px 0; color: var(--green); background: var(--surface); font-size: .65rem; font-weight: 800; }
.key-field small { color: #8a9691; font-size: .6rem; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.resolved-url { min-width: 0; padding: 11px; display: flex; align-items: center; gap: 9px; border-radius: 8px; background: var(--surface); }
.resolved-url code { overflow: hidden; color: var(--muted); font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.builder-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.builder-note { margin: -4px 0 0; font-size: .62rem; }
.console-panel { min-width: 0; display: grid; grid-template-rows: auto 270px auto 300px; background: var(--code); }
.console-tabs { min-height: 48px; padding: 0 15px; display: flex; align-items: center; gap: 3px; border-bottom: 1px solid rgba(255,255,255,.1); }
.console-tabs button { padding: 7px 9px; border: 0; border-radius: 6px; color: #83968e; background: transparent; font: 500 .64rem "DM Mono"; }
.console-tabs button.active { color: #b5edcc; background: rgba(117,216,160,.12); }
.console-tabs .copy-console { margin-left: auto; color: #94e0b4; }
.generated-code, .response-body { padding: 21px; color: #cfe1da; font-size: .7rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.response-head { min-height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.1); background: #13251f; }
.response-head > div { display: flex; align-items: center; gap: 9px; }
.response-head span { color: #d4e5de; font-size: .7rem; font-weight: 700; }
.response-head small { padding: 4px 6px; border-radius: 5px; color: #86dbaa; background: rgba(112,214,160,.1); font: 500 .58rem "DM Mono"; }
.response-head small.error { color: #ffadad; background: rgba(255,83,83,.12); }
.response-head button { color: #94e0b4; }
.response-body { color: #aac1b8; }

.endpoint-section { position: relative; }
.endpoint-title { margin-bottom: 25px; display: flex; align-items: center; gap: 11px; }
.endpoint-title .method { padding: 7px 9px; font-size: .63rem; }
.endpoint-title code { font-size: .79rem; }
.parameter-table { margin-top: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.parameter-table > div { min-height: 58px; padding: 13px 16px; display: grid; grid-template-columns: 170px 110px minmax(0, 1fr); align-items: center; gap: 15px; border-top: 1px solid var(--line); }
.parameter-table .table-head { min-height: 42px; border-top: 0; color: #7d8984; background: var(--surface); font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.parameter-table code { color: var(--green); font-size: .7rem; }
.parameter-table span { color: var(--muted); font-size: .68rem; }
.parameter-table p { margin: 0; font-size: .7rem; }
.schema-grid, .outcome-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.schema-grid article, .outcome-grid article { padding: 18px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.schema-grid code, .outcome-grid strong { color: var(--green); font-size: .72rem; }
.schema-grid span, .outcome-grid span { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.flow { margin-top: 30px; padding: 21px; display: flex; align-items: center; justify-content: space-between; gap: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.flow span { flex: 1; font-size: .7rem; font-weight: 700; text-align: center; }
.flow i { color: var(--green); font-style: normal; }
.timeline { margin: 32px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline article { min-width: 0; padding-right: 18px; position: relative; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 10px; }
.timeline article:not(:last-child)::after { height: 1px; position: absolute; top: 15px; right: 0; left: 31px; z-index: -1; content: ""; background: var(--line-strong); }
.timeline article > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: .57rem; font-weight: 800; }
.timeline code { color: var(--green); font-size: .68rem; }
.timeline p { margin: 5px 0 0; font-size: .65rem; }
.error-layout { margin-top: 30px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 18px; align-items: start; }
.error-layout .parameter-table { margin: 0; }
.security-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 70px; align-items: center; }
.security-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.security-list span { padding: 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--green); background: var(--surface); font-size: .69rem; font-weight: 700; }
.changelog-section article { padding: 24px 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 25px; border-top: 1px solid var(--line); }
.changelog-section time { color: var(--muted); font-size: .68rem; }
.changelog-section strong { font-size: .84rem; }
.changelog-section p { margin: 7px 0 0; font-size: .72rem; }
.docs-footer { min-height: 130px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 25px; color: var(--muted); font-size: .68rem; }
.docs-footer > div { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }
.docs-footer img { width: 25px; }
.docs-footer p { margin: 0; font-size: .68rem; }
.docs-footer a { color: var(--green); font-weight: 700; }

.search-dialog { width: min(620px, calc(100% - 28px)); max-height: min(640px, 80vh); padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 30px 80px rgba(10,30,24,.25); }
.search-dialog::backdrop { background: rgba(8,20,16,.42); backdrop-filter: blur(4px); }
.search-dialog form label { min-height: 61px; padding: 0 17px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.search-dialog form span { color: var(--green); font-size: 1.4rem; }
.search-dialog input { min-width: 0; border: 0; outline: 0; font-size: .9rem; }
.search-dialog form button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface); font-size: .58rem; }
.search-dialog > div { max-height: 500px; padding: 10px; overflow-y: auto; }
.search-result { width: 100%; padding: 13px; display: grid; gap: 3px; border: 0; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; }
.search-result:hover, .search-result:focus { background: var(--mint-soft); }
.search-result strong { font-size: .75rem; }
.search-result span { color: var(--muted); font-size: .65rem; }
.search-empty { padding: 25px; color: var(--muted); font-size: .75rem; text-align: center; }

@media (max-width: 1050px) {
  :root { --sidebar: 220px; }
  .topbar { grid-template-columns: var(--sidebar) minmax(240px, 1fr) auto; gap: 18px; }
  .docs-content { padding-inline: 38px; }
  .playground { grid-template-columns: minmax(280px, .8fr) minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .topbar { padding-inline: 16px; grid-template-columns: 1fr auto; }
  .topbar-center, .status-pill { display: none; }
  .menu-trigger { display: block; }
  .docs-layout { display: block; }
  .sidebar { width: min(310px, 88vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 16px 0 50px rgba(15,45,36,.15); }
  .sidebar.open { transform: none; }
  .docs-content { width: 100%; padding-inline: 24px; }
  .playground-section { width: auto; margin-left: 0; padding-inline: 0; }
  .playground { grid-template-columns: 1fr; }
  .request-builder { border-right: 0; border-bottom: 1px solid var(--line); }
  .split-section, .security-section { grid-template-columns: 1fr; gap: 30px; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 22px 0; }
  .error-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar-actions > a { display: none; }
  .brand small { display: none; }
  .docs-content { padding-inline: 18px; }
  .doc-section { padding: 70px 0; }
  .hero-section { padding-top: 62px; }
  h1 { font-size: clamp(2.8rem, 14vw, 4.1rem); }
  h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .base-url { grid-template-columns: 1fr auto; }
  .base-url > span { grid-column: 1 / -1; }
  .api-facts, .schema-grid, .outcome-grid { grid-template-columns: 1fr; }
  .playground-section { width: auto; margin-left: 0; padding-inline: 0; }
  .request-builder { padding: 20px; }
  .console-panel { grid-template-rows: auto 260px auto 300px; }
  .console-tabs { padding-inline: 8px; overflow-x: auto; }
  .console-tabs button { padding-inline: 7px; }
  .parameter-table { overflow-x: auto; }
  .parameter-table > div { min-width: 650px; }
  .flow { align-items: stretch; flex-direction: column; }
  .flow i { transform: rotate(90deg); text-align: center; }
  .timeline { grid-template-columns: 1fr; }
  .timeline article:not(:last-child)::after { width: 1px; height: auto; top: 31px; bottom: -22px; left: 15px; }
  .security-list { grid-template-columns: 1fr; }
  .changelog-section article { grid-template-columns: 1fr; gap: 7px; }
  .docs-footer { padding: 28px 0; grid-template-columns: 1fr; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
