:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17283d;
  background: #f5f8fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #10233a;
  --muted: #62738a;
  --line: #dce5ef;
  --teal: #0f9289;
  --soft-teal: #e8f7f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  line-height: 1.65;
}

a {
  color: #087c78;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code {
  color: #125c68;
  font-size: 0.91em;
}

.topbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100% - 1220px) / 2));
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  background: var(--navy);
  color: #dce9f5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  font-size: 14px;
  font-weight: 750;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #087c78;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.brand-muted,
.topbar-note {
  color: #9fb2c7;
  font-weight: 500;
}

.topbar-note {
  font-size: 12px;
}

.hero {
  padding: 68px 24px 74px;
  background:
    radial-gradient(ellipse at 75% 0%, rgb(28 155 145 / 24%), transparent 48%),
    var(--navy);
  color: white;
}

.hero-inner {
  width: min(100%, 1220px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  color: #0d9289;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.hero .eyebrow {
  color: #57d4c7;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

h1 span {
  color: #5de0d1;
}

.hero-copy {
  max-width: 660px;
  margin-bottom: 26px;
  color: #bdcbd9;
  font-size: 16px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 15px;
  padding: 0 17px;
  border-radius: 8px;
  background: #0f9289;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.button:hover {
  background: #0c7d76;
  text-decoration: none;
}

.layout {
  display: grid;
  width: min(100% - 48px, 1220px);
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 24px;
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.sidebar-title {
  margin: 0 0 9px;
  color: #8594a7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.sidebar nav a {
  padding: 7px 10px;
  border-left: 2px solid transparent;
  color: #465970;
  font-size: 12px;
}

.sidebar nav a:hover {
  border-color: var(--teal);
  background: #eaf1f7;
  color: #17364b;
  text-decoration: none;
}

.sidebar-card {
  margin-top: 30px;
  padding: 17px;
  border: 1px solid #cfe7e4;
  border-radius: 10px;
  background: var(--soft-teal);
  font-size: 12px;
}

.sidebar-card strong {
  color: #164750;
}

.sidebar-card p {
  margin: 5px 0 11px;
  color: #536e79;
}

.sidebar-card a {
  font-weight: 700;
}

.content {
  min-width: 0;
}

.section {
  padding: 0 0 43px;
  margin: 0 0 43px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.section:last-of-type {
  border-bottom: 0;
}

h2 {
  margin-bottom: 12px;
  color: #142a42;
  font-size: clamp(25px, 3.4vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1.2;
}

h3 {
  margin: 26px 0 8px;
  color: #1d344c;
  font-size: 17px;
}

.content p,
.content li {
  color: #506177;
  font-size: 14px;
}

.content p {
  margin-bottom: 13px;
}

.architecture {
  padding: 22px;
  margin: 24px 0;
  border: 1px solid #dce5ed;
  border-radius: 13px;
  background: white;
  box-shadow: 0 8px 25px rgb(22 46 72 / 4%);
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.15fr) minmax(130px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 11px;
}

.node {
  display: grid;
  min-height: 67px;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d8e2eb;
  border-radius: 9px;
  background: #f8fafc;
}

.node strong {
  color: #243a52;
  font-size: 12px;
}

.node span {
  color: #6a7b8e;
  font-size: 10px;
  line-height: 1.4;
}

.node.engine {
  border-color: #b6e2dd;
  background: #effaf8;
}

.flow-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #087f78;
  font-size: 10px;
  font-weight: 750;
}

.flow-label b {
  font-size: 22px;
  line-height: 1;
}

.flow-label.reverse {
  justify-content: flex-start;
}

.diagram-note {
  padding-top: 9px;
  margin: 4px 0 0 !important;
  border-top: 1px solid #e8eef3;
  color: #64758a !important;
  font-size: 11px !important;
}

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.glossary div {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  border: 1px solid #e0e8ef;
  border-radius: 9px;
  background: white;
}

.glossary strong {
  color: #283e56;
  font-size: 12px;
}

.glossary span {
  color: #68788b;
  font-size: 11px;
  line-height: 1.5;
}

.steps {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.steps li {
  padding-left: 5px;
}

.steps strong {
  color: #243a52;
}

.callout {
  padding: 14px 16px;
  border-left: 3px solid #10a399;
  border-radius: 0 8px 8px 0;
  background: #eaf7f5;
  color: #385e63 !important;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  margin: 18px 0 12px;
  overflow-wrap: anywhere;
  border: 1px solid #dce5ed;
  border-radius: 9px;
  background: white;
}

.endpoint code {
  color: #233b54;
  font-size: 12px;
}

.method {
  display: inline-block;
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
}

.method.post {
  background: #e1f4ef;
  color: #13745c;
}

.method.put {
  background: #fff3d8;
  color: #8a5a00;
}

.method.get {
  background: #e4efff;
  color: #315fa0;
}

.small-note {
  color: #78889a !important;
  font-size: 12px !important;
}

.field-list {
  display: grid;
  border: 1px solid #dce5ed;
  border-radius: 9px;
  background: white;
  overflow: hidden;
}

.field-list div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f5;
}

.field-list div:last-child {
  border-bottom: 0;
}

.field-list > div > code {
  font-weight: 700;
}

.field-list span {
  color: #5d6e82;
  font-size: 12px;
}

pre {
  max-width: 100%;
  padding: 16px;
  margin: 12px 0 16px;
  overflow-x: auto;
  border: 1px solid #223a55;
  border-radius: 9px;
  background: #13283f;
  color: #e2edf7;
  font-size: 11px;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  color: inherit;
}

details {
  margin: 14px 0;
  border: 1px solid #dce5ed;
  border-radius: 8px;
  background: white;
}

summary {
  padding: 11px 14px;
  color: #25415c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

details pre {
  margin: 0 10px 10px;
}

.response {
  display: grid;
  gap: 7px;
  padding: 13px 15px;
  border: 1px solid #cce8d9;
  border-radius: 8px;
  background: #f1fbf5;
}

.response .status {
  color: #13724d;
  font-size: 11px;
  font-weight: 800;
}

.response code {
  overflow-wrap: anywhere;
  color: #355a49;
  font-size: 11px;
}

.table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid #dce5ed;
  border-radius: 9px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid #e9eef3;
  vertical-align: top;
  font-size: 11px;
}

th {
  background: #f4f7fa;
  color: #354b62;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  color: #596b7f;
}

td code {
  white-space: nowrap;
}

td .method {
  margin: 0 5px 4px 0;
}

.checklist {
  display: grid;
  gap: 9px;
  padding-left: 21px;
}

.checklist li::marker {
  color: #0d9289;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #77869a;
  font-size: 11px;
}

@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sidebar {
    position: static;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .sidebar-title {
    width: 100%;
  }

  .sidebar-card {
    display: none;
  }
}

@media (max-width: 600px) {
  .topbar {
    min-height: 60px;
    padding: 0 16px;
  }

  .topbar-note {
    display: none;
  }

  .hero {
    padding: 48px 20px 52px;
  }

  .layout {
    width: min(100% - 32px, 1220px);
    padding-top: 30px;
  }

  .architecture {
    padding: 14px;
  }

  .flow-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .flow-label {
    justify-content: center;
    padding: 4px 0;
  }

  .flow-label.reverse {
    justify-content: center;
  }

  .flow-label b {
    transform: rotate(90deg);
  }

  .glossary {
    grid-template-columns: 1fr;
  }

  .field-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .endpoint {
    align-items: flex-start;
  }

  .page-footer {
    flex-direction: column;
  }
}
