:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --surface: #ffffff;
  --surface-2: #f0f3ed;
  --ink: #111312;
  --muted: #5b625c;
  --faint: #8a928b;
  --line: #dce2da;
  --brand: #c7ff00;
  --green: #11633f;
  --green-2: #093828;
  --amber: #9d5b04;
  --red: #a42828;
  --code: #101713;
  --code-line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 42px rgba(20, 26, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 10px 12px;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.94);
  backdrop-filter: blur(18px);
}

.brand,
.top-actions,
.cta-row,
.artifact-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
  font-weight: 760;
}

.brand img {
  width: 130px;
  max-height: 32px;
  object-fit: contain;
  object-position: left center;
}

.brand span {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  white-space: nowrap;
}

.top-actions {
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}

.top-actions a,
.button {
  min-height: 40px;
  border-radius: 7px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.top-actions a {
  color: var(--muted);
}

.top-actions a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.primary-link,
.button.primary {
  background: var(--green-2) !important;
  color: #fff !important;
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.docs-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 282px;
  gap: 28px;
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
}

.sidebar,
.right-rail {
  position: sticky;
  top: 80px;
  height: calc(100dvh - 96px);
  overflow-y: auto;
  padding: 22px 0;
}

.sidebar-block {
  margin-bottom: 18px;
}

.sidebar label,
.rail-card span,
.eyebrow {
  display: block;
  color: var(--green);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar input {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

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

.sidebar nav a {
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--brand);
}

.content {
  min-width: 0;
  padding-bottom: 64px;
}

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

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 28px;
  align-items: end;
  min-height: calc(100dvh - 90px);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 24px;
}

.section-title {
  max-width: 720px;
  margin-bottom: 20px;
}

.section-title.row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
  letter-spacing: 0;
}

p,
li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.lead {
  max-width: 760px;
  font-size: 18px;
}

.cta-row {
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  font-size: 14px;
  font-weight: 780;
}

.callout,
.metric-card,
.env-grid article,
.endpoint-card,
.artifact-grid a,
.rail-card,
.code-panel,
table,
.steps,
.checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.callout {
  padding: 18px;
  box-shadow: var(--shadow);
}

.callout.danger {
  border-color: rgba(164, 40, 40, 0.28);
}

.callout-kicker {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 820;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.callout code {
  display: block;
  overflow-wrap: anywhere;
  border-radius: 7px;
  background: #fff4f0;
  color: var(--red);
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.callout p {
  margin: 12px 0 0;
  font-size: 14px;
}

.code-panel {
  overflow: hidden;
  background: var(--code);
  color: #e8f1e8;
}

.code-panel.compact {
  align-self: start;
}

.code-tabs {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--code-line);
}

.code-tabs span,
.tab,
.copy {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.tab,
.copy {
  cursor: pointer;
}

.tab {
  background: transparent;
  color: #b7c2b9;
}

.tab.active {
  background: rgba(199, 255, 0, 0.16);
  color: var(--brand);
}

.copy {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.copy.copied {
  background: var(--brand);
  color: #101713;
}

.code-sample {
  display: none;
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  font-size: 13px;
  line-height: 1.7;
}

.code-sample.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--ink);
  background: var(--surface-2);
}

tr:last-child td {
  border-bottom: 0;
}

.mini-stack {
  display: grid;
  gap: 12px;
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: #fff4df;
  color: var(--amber);
  font-weight: 850;
}

.metric-card strong {
  display: block;
  margin-bottom: 6px;
}

.metric-card p {
  margin-bottom: 0;
  font-size: 14px;
}

.env-grid,
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.env-grid article {
  padding: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(17, 99, 63, 0.11);
  color: var(--green);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 780;
}

.pill.dark {
  background: #111312;
  color: #fff;
}

.env-grid h3 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.endpoint-list {
  display: grid;
  gap: 10px;
}

.endpoint-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.endpoint-card > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.endpoint-card code {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 760;
}

.endpoint-card p {
  margin: 0;
  font-size: 14px;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  min-height: 30px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.method.get {
  background: #e7f6ee;
  color: var(--green);
}

.method.post {
  background: #fff4df;
  color: var(--amber);
}

.artifact-row {
  gap: 8px;
  flex-wrap: wrap;
}

.artifact-row a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.artifact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.artifact-grid a {
  display: flex;
  min-height: 120px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  text-decoration: none;
}

.artifact-grid a:hover,
.endpoint-card:hover {
  border-color: var(--green);
}

.artifact-grid strong {
  font-size: 16px;
}

.artifact-grid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.steps,
.checklist {
  margin: 0;
  padding: 18px 18px 18px 36px;
}

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

.checklist {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}

.checklist input {
  width: 18px;
  height: 18px;
}

.right-rail {
  display: grid;
  align-content: start;
  gap: 12px;
}

.rail-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.rail-card code {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.rail-card a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .docs-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .docs-shell {
    display: block;
    width: min(100% - 28px, 760px);
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px 0 0;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .sidebar nav a {
    white-space: nowrap;
  }

  .hero-section,
  .two-column,
  .env-grid,
  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .section-title.row {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 42px;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 118px;
  }

  .brand span {
    font-size: 14px;
  }

  .top-actions a {
    padding-inline: 10px;
  }

  h1 {
    font-size: 36px;
  }

  .code-sample {
    font-size: 12px;
  }
}
