:root {
  --blue-400: #60A5FA;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-900: #1E3A8A;
  --yellow-300: #FDE047;
  --yellow-400: #FACC15;
  --amber-500: #E9B308;
  --orange-600: #D97706;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #A3A3A3;
  --gray-500: #6B7280;
  --white: #FFFFFF;
  --black: #000000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--black);
  background: var(--gray-200);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

body,
button,
input {
  font: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--blue-900);
}

.hero {
  background: var(--blue-900);
  color: var(--white);
  border-bottom: 4px solid var(--yellow-400);
}

.hero__content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--yellow-300);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: 1.55rem;
}

.subtitle {
  margin: 0.35rem 0 0.9rem;
  color: var(--gray-200);
}

.badges,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 0.34rem 0.58rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 700;
}

.badge code {
  color: var(--white);
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  max-width: 1440px;
  min-height: calc(100vh - 142px);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 0px);
  overflow-y: auto;
  border-right: 1px solid var(--gray-300);
  background: var(--white);
}

.sidebar nav {
  padding: 1rem;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li + li {
  margin-top: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  color: var(--blue-900);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible {
  border-color: var(--blue-400);
  background: rgba(96, 165, 250, 0.18);
  outline: none;
}

.nav-link.active {
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: var(--white);
}

.content {
  min-width: 0;
  padding: 1.25rem;
}

.doc-section {
  display: none;
}

.doc-section.active {
  display: block;
  animation: sectionIn 140ms ease-out;
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-section,
.endpoint-card {
  max-width: 1080px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 1.2rem;
  background: var(--white);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.section-header {
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

h2 {
  margin: 0 0 0.75rem;
  color: var(--blue-900);
  font-size: 1.35rem;
}

h3 {
  margin: 1rem 0 0.5rem;
  color: var(--blue-700);
  font-size: 1.02rem;
}

p,
li {
  color: var(--black);
}

.summary-grid,
.alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.summary-card {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0.8rem;
  background: var(--gray-200);
}

.summary-card span {
  display: block;
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--blue-900);
}

.endpoint-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.method {
  flex: 0 0 auto;
  min-width: 58px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.method-post {
  background: var(--blue-700);
  color: var(--white);
}

.method-get {
  background: var(--blue-600);
  color: var(--white);
}

.method-put {
  border-color: var(--orange-600);
  background: var(--yellow-400);
  color: var(--black);
}

.table-wrap {
  width: 100%;
  margin: 0.65rem 0 0.95rem;
  overflow-x: auto;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--gray-300);
  padding: 0.62rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

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

th {
  background: rgba(96, 165, 250, 0.18);
  color: var(--blue-900);
  font-weight: 900;
}

pre {
  max-width: 100%;
  margin: 0.55rem 0 0.95rem;
  overflow-x: auto;
  border: 1px solid var(--blue-700);
  border-radius: 8px;
  padding: 0.9rem;
  background: var(--blue-900);
  color: var(--white);
}

pre code {
  color: var(--white);
  font-size: 0.84rem;
}

.alert {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.85rem;
}

.alert h3 {
  margin-top: 0;
}

.alert-info {
  border-color: var(--blue-400);
  background: rgba(96, 165, 250, 0.14);
}

.alert-warning {
  border-color: var(--amber-500);
  background: rgba(250, 204, 21, 0.25);
}

.alert-critical {
  border-color: var(--orange-600);
  background: rgba(217, 119, 6, 0.14);
}

.alert-success {
  border-color: var(--blue-600);
  background: rgba(37, 99, 235, 0.1);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
}

.step {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-height: 4rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--white);
}

.step strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font-size: 0.82rem;
}

.step p {
  margin: 0;
}

.doc-button {
  cursor: pointer;
  border: 1px solid var(--blue-700);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 900;
}

.doc-button-secondary {
  border-color: var(--amber-500);
  background: var(--yellow-400);
  color: var(--black);
}

.doc-button:focus-visible {
  outline: 3px solid var(--yellow-300);
  outline-offset: 2px;
}

.error-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.checklist {
  display: grid;
  gap: 0.55rem;
}

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--gray-200);
}

.checklist input {
  margin-top: 0.28rem;
}

.footer {
  border-top: 1px solid var(--gray-300);
  padding: 0.85rem 1rem;
  background: var(--white);
  color: var(--gray-500);
  text-align: center;
}

@media (max-width: 1024px) {
  .layout {
    display: block;
    min-height: auto;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--gray-300);
  }

  .sidebar nav {
    padding: 0.75rem;
    overflow-x: auto;
  }

  .sidebar ul {
    display: flex;
    gap: 0.4rem;
    min-width: max-content;
  }

  .sidebar li + li {
    margin-top: 0;
  }

  .nav-link {
    white-space: nowrap;
  }

  .content {
    padding: 0.85rem;
  }
}

@media (max-width: 760px) {
  .hero__content {
    padding: 1rem;
  }

  .summary-grid,
  .alert-grid,
  .timeline,
  .error-grid {
    grid-template-columns: 1fr;
  }

  .doc-section,
  .endpoint-card {
    padding: 0.85rem;
  }

  .endpoint-card > header {
    display: grid;
  }

  table {
    min-width: 640px;
  }
}
