.docs-body {
  background: #f6faf7;
}

.docs-header {
  background: rgba(255, 255, 255, 0.96);
}

.docs-hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid #dfe9e2;
  background:
    radial-gradient(circle at 82% 18%, rgba(6, 199, 85, 0.12), transparent 26%),
    linear-gradient(145deg, #eff8f2 0%, #ffffff 72%);
}

.docs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: 64px;
  align-items: center;
}

.docs-hero h1 {
  max-width: 820px;
  margin: 10px 0 20px;
  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.docs-lead {
  max-width: 770px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.docs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.docs-badges span {
  padding: 7px 12px;
  border: 1px solid #cce0d3;
  border-radius: 999px;
  background: #fff;
  color: var(--green-800);
  font-size: 0.76rem;
  font-weight: 700;
}

.base-url-card {
  padding: 28px;
  border: 1px solid #d5e5da;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(21, 71, 45, 0.1);
}

.live-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--green-700);
  font-size: 0.84rem;
}

.card-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.base-url-card > code {
  display: block;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 10px;
  background: #102b20;
  color: #c8f7d7;
  font-size: 0.78rem;
}

.base-url-card .copy-button {
  margin: 14px 8px 0 0;
}

.base-url-card > a {
  display: inline-block;
  margin-top: 16px;
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 700;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 60px;
  align-items: start;
  padding-top: 54px;
  padding-bottom: 100px;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.docs-sidebar strong {
  margin: 18px 0 5px;
  color: var(--ink);
  font-size: 0.72rem;
}

.docs-sidebar strong:first-child {
  margin-top: 0;
}

.docs-sidebar a {
  padding: 6px 10px;
  border-left: 2px solid transparent;
  color: #607167;
  font-size: 0.75rem;
  text-decoration: none;
}

.docs-sidebar a:hover,
.docs-sidebar a:focus-visible {
  border-left-color: var(--green-600);
  background: #eaf5ed;
  color: var(--green-800);
}

.docs-main {
  min-width: 0;
}

.docs-section {
  max-width: 980px;
  padding: 42px 0;
  border-bottom: 1px solid #dfe8e1;
  scroll-margin-top: 96px;
}

.docs-section:first-child {
  padding-top: 0;
}

.docs-section h2 {
  margin: 8px 0 16px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.25;
}

.docs-section > p,
.docs-section li,
.endpoint-card > p,
.endpoint-card details p {
  color: #4f6257;
  line-height: 1.8;
}

.notice {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid #cddfd3;
  border-left: 4px solid var(--green-600);
  border-radius: 10px;
  background: #f3faf5;
}

.notice-safety {
  border-left-color: #e3a11a;
  background: #fff9eb;
}

.notice strong {
  color: var(--ink);
}

.notice p {
  margin: 5px 0 0;
  color: #516158;
}

.code-tabs {
  display: flex;
  gap: 4px;
  margin-top: 24px;
}

.code-tab {
  padding: 9px 16px;
  border: 1px solid #cadbd0;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #edf5ef;
  color: #516158;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.code-tab.active {
  background: #102b20;
  color: #fff;
}

.code-window {
  overflow: hidden;
  border-radius: 0 14px 14px 14px;
  background: #102b20;
  box-shadow: 0 16px 35px rgba(16, 43, 32, 0.14);
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #2a4739;
  color: #a9c2b4;
  font-size: 0.7rem;
}

.code-window pre,
.playground-output {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  color: #d7f8e1;
  font: 0.73rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}

.copy-button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #bfd3c6;
  border-radius: 8px;
  background: #fff;
  color: var(--green-800);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.dark-copy {
  border-color: #456757;
  background: #1b3a2d;
  color: #d7f8e1;
}

.endpoint-card {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid #d7e4da;
  border-radius: 14px;
  background: #fff;
  scroll-margin-top: 96px;
}

.endpoint-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.endpoint-heading > code {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.endpoint-heading > span:last-child {
  margin-left: auto;
  color: #5a6e62;
  font-size: 0.76rem;
  font-weight: 700;
}

.endpoint-card details {
  margin-top: 14px;
  border-top: 1px solid #e3ebe5;
}

.endpoint-card summary {
  padding: 14px 0 2px;
  color: var(--green-800);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.compact-endpoint {
  padding: 16px 22px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid #d9e5dc;
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
  font-size: 0.74rem;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid #e3ebe5;
  color: #4f6156;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eff6f1;
  color: var(--ink);
  font-weight: 700;
}

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

td code,
.docs-section p code,
.docs-section li code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eaf3ed;
  color: #185e3d;
}

.response-example {
  margin-top: 22px;
  border-radius: 14px;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.privacy-grid article {
  padding: 20px;
  border: 1px solid #d8e5dc;
  border-radius: 12px;
  background: #fff;
}

.privacy-grid strong {
  color: var(--green-800);
}

.privacy-grid p {
  margin: 8px 0 0;
  color: #586a60;
  font-size: 0.76rem;
  line-height: 1.7;
}

.guidance-list {
  padding-left: 22px;
}

.guidance-list li + li {
  margin-top: 8px;
}

.playground-shell {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid #cfdfd4;
  border-radius: 16px;
  background: #fff;
}

.playground-shell label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 700;
}

.playground-shell textarea {
  width: 100%;
  min-height: 125px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #bcd1c3;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
}

.playground-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.playground-status {
  margin: 14px 0 8px;
  color: var(--green-700);
  font-weight: 700;
}

.playground-output {
  min-height: 130px;
  border-radius: 10px;
  background: #102b20;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.docs-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.docs-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.docs-footer a {
  color: #bfe8cf;
}

@media (max-width: 980px) {
  .docs-hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    padding: 16px;
    border: 1px solid #d6e4da;
    border-radius: 12px;
    background: #fff;
  }

  .docs-sidebar nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .docs-sidebar strong {
    grid-column: 1 / -1;
  }

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

@media (max-width: 680px) {
  .docs-hero {
    padding: 48px 0;
  }

  .docs-layout {
    gap: 30px;
    padding-top: 30px;
  }

  .docs-sidebar nav {
    grid-template-columns: 1fr 1fr;
  }

  .endpoint-heading > span:last-child {
    width: 100%;
    margin-left: 0;
  }

  .docs-next {
    align-items: flex-start;
    flex-direction: column;
  }

  .playground-shell,
  .base-url-card {
    padding: 18px;
  }
}

@media print {
  .docs-header,
  .docs-sidebar,
  .playground-section,
  .docs-next,
  .copy-button,
  .code-tabs {
    display: none;
  }

  .docs-layout {
    display: block;
    padding: 0;
  }

  .docs-section {
    break-inside: avoid;
  }
}
