:root {
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: rgba(18, 28, 45, 0.12);
  --ink: #0e1525;
  --muted: #59657a;
  --accent: #1837d8;
  --accent-strong: #1027a1;
  --accent-soft: rgba(24, 55, 216, 0.1);
  --deep: #05070d;
  --sand: #f4f7fb;
  --shadow: 0 10px 28px rgba(9, 16, 31, 0.08);
  --radius: 28px;
  --radius-sm: 18px;
  --max-width: 1500px;
  --heading-font: "Segoe UI Variable Display", "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
  --body-font: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
  --mono-font: "Cascadia Code", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(24, 55, 216, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(5, 7, 13, 0.08), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
}

body::before {
  content: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: calc(100vh - 48px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(180deg, rgba(5, 7, 13, 0.98), rgba(8, 14, 28, 0.98)),
    linear-gradient(135deg, rgba(24, 55, 216, 0.22), transparent 56%);
  color: rgba(255, 248, 238, 0.92);
  box-shadow: var(--shadow);
}

.top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 248, 238, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.lang-button {
  min-width: 42px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 248, 238, 0.78);
  cursor: pointer;
  font-family: var(--mono-font);
  font-size: 0.78rem;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.lang-button:hover,
.lang-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.lang-button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--deep);
}

.brand-logo {
  display: block;
  width: min(160px, 100%);
  height: auto;
  margin: 22px 0 18px;
}

.eyebrow,
.panel-label,
.block-label,
.service-kicker,
.callout-label,
.checklist-title,
.schema-kind {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-block h1,
.hero h2,
.section-heading h3,
.endpoint-title,
.schema-head h4,
.service-card h4 {
  margin: 0;
  font-family: var(--heading-font);
}

.brand-block h1 {
  font-size: clamp(2rem, 2vw + 1.4rem, 2.8rem);
  line-height: 0.96;
}

.brand-copy,
.sidebar-panel p,
.section-intro,
.endpoint-summary,
.service-description,
.schema-description {
  color: var(--muted);
}

.sidebar .brand-copy,
.sidebar-panel p {
  color: rgba(255, 248, 238, 0.72);
}

.nav-list {
  display: grid;
  gap: 10px;
  margin: 30px 0;
}

.nav-list a,
.inline-link {
  color: inherit;
  text-decoration: none;
}

.nav-list a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 248, 238, 0.82);
  transition: background-color 180ms ease, transform 180ms ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.sidebar-panel {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 248, 238, 0.12);
}

.sidebar-panel ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.sidebar-panel li {
  display: grid;
  gap: 5px;
}

.sidebar-panel span {
  font-size: 0.88rem;
  color: rgba(255, 248, 238, 0.72);
}

code,
.endpoint-path,
.method-badge,
.service-badge,
.copy-button,
.search-box input {
  font-family: var(--mono-font);
}

.sidebar code {
  color: #fff;
  font-size: 0.8rem;
  word-break: break-word;
}

.main-content {
  display: grid;
  gap: 16px;
}

.hero,
.section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  min-height: clamp(420px, 68svh, 620px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 30px 32px;
  align-items: start;
}

.hero::after,
.section::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(24, 55, 216, 0.08), transparent 72%);
  pointer-events: none;
}

.hero-copy {
  width: 100%;
  max-width: 1180px;
}

.hero h2 {
  font-size: clamp(2.35rem, 2.6vw + 1rem, 4.35rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  max-width: 28ch;
}

.hero-body,
.lead {
  font-size: 1.02rem;
  line-height: 1.52;
  max-width: 99ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.48);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 1180px;
}

.hero-stat {
  display: grid;
  align-content: start;
  min-height: 92px;
  padding: 14px 18px 12px;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(11, 18, 34, 0.95), rgba(24, 55, 216, 0.84));
  box-shadow: 0 8px 20px rgba(10, 18, 34, 0.08);
  color: #fff;
}

.hero-stat span {
  display: block;
  font-family: var(--heading-font);
  font-size: 2.2rem;
  line-height: 0.92;
}

.hero-stat p {
  margin: 6px 0 0;
  max-width: 22ch;
  font-size: 0.92rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.76);
}

.section {
  padding: 30px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
}

.section-heading h3 {
  font-size: clamp(1.8rem, 1.5vw + 1.2rem, 2.8rem);
  line-height: 1;
}

.two-column,
.standards-grid,
.checklist-grid {
  display: grid;
  gap: 18px;
}

.two-column {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
}

.callout,
.response-note,
.checklist-card,
.timeline-card,
.service-card,
.endpoint-card,
.schema-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.callout,
.response-note {
  padding: 22px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  line-height: 1.55;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.timeline-card {
  position: relative;
  padding: 24px 20px 22px;
}

.timeline-card::before {
  content: attr(data-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.timeline-card h4 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.timeline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-card p + p {
  margin-top: 10px;
}

.timeline-meta code {
  color: var(--ink);
  font-size: 0.78rem;
  word-break: break-word;
}

.timeline-endpoint-link {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.timeline-endpoint-link code {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.timeline-endpoint-link:hover code,
.timeline-endpoint-link:focus-visible code {
  color: var(--accent-strong);
}

.standards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.standard-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.98);
}

.standard-card p {
  margin: 0;
  line-height: 1.55;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(24, 55, 216, 0.3);
}

.service-card h4 {
  margin-top: 6px;
  font-size: 1.28rem;
}

.service-meta {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 700;
}

.reference-toolbar {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.search-box {
  display: grid;
  gap: 8px;
  max-width: 440px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.86);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-2px);
  background: var(--accent);
  color: #fff;
}

.endpoint-list,
.schema-grid {
  display: grid;
  gap: 16px;
}

.reference-fallback,
.endpoint-list {
  display: grid;
  gap: 18px;
}

.reference-group {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
}

.reference-group-head h4 {
  margin: 6px 0 0;
  font-family: var(--heading-font);
  font-size: 1.3rem;
}

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

.reference-link-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

.reference-link-item strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-family: var(--mono-font);
  font-size: 0.78rem;
}

.reference-link-item span {
  font-weight: 700;
}

.reference-link-item code {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.88rem;
  word-break: break-word;
}

.endpoint-card,
.schema-card {
  padding: 24px;
}

.endpoint-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.endpoint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.endpoint-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.method-badge,
.service-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.method-badge {
  color: #fff;
}

.method-badge-get {
  background: #61affe;
}

.method-badge-post {
  background: #49cc90;
}

.method-badge-put {
  background: #fca130;
}

.method-badge-delete {
  background: #f93e3e;
}

.method-badge-patch {
  background: #50e3c2;
}

.method-badge-options {
  background: #0d5aa7;
}

.method-badge-head {
  background: #9012fe;
}

.service-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.endpoint-title {
  font-size: 1.42rem;
}

.copy-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.copy-example-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(246, 239, 227, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.example-toggle-button,
.example-format-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--mono-font);
}

.example-toggle-button {
  border: 1px solid rgba(246, 239, 227, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.example-format-button {
  border: 1px solid rgba(246, 239, 227, 0.12);
  background: transparent;
  color: rgba(246, 239, 227, 0.76);
}

.example-format-button.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(246, 239, 227, 0.22);
}

.endpoint-toggle,
.schema-modal-close,
.schema-inline-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono-font);
}

.copy-button.is-copied {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(24, 55, 216, 0.3);
}

.copy-example-button.is-copied {
  background: rgba(24, 55, 216, 0.2);
  color: #ffd8df;
  border-color: rgba(255, 216, 223, 0.24);
}

.example-format-button[hidden] {
  display: none;
}

.endpoint-card.is-collapsed .endpoint-content {
  display: none;
}

.schema-inline-button {
  min-height: 28px;
  padding: 0 10px;
  margin-left: 4px;
  color: var(--accent);
  border-color: rgba(24, 55, 216, 0.28);
  background: rgba(24, 55, 216, 0.08);
}

.endpoint-path {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(12, 18, 30, 0.98);
  color: #fff;
  font-size: 0.92rem;
  overflow-x: auto;
}

.endpoint-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.endpoint-example {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(12, 18, 30, 0.98);
  color: #f3f7ff;
}

.endpoint-example-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.endpoint-example-head-copy,
.endpoint-example-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.endpoint-example-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(246, 239, 227, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.endpoint-example-selector-label {
  color: rgba(246, 239, 227, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.endpoint-example-label {
  color: rgba(246, 239, 227, 0.82);
}

.endpoint-example.is-collapsed .endpoint-example-body {
  display: none;
}

.endpoint-example-code {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  line-height: 1.65;
  font-family: var(--mono-font);
}

.endpoint-contract {
  padding: 18px;
  border-radius: 18px;
  background: rgba(242, 246, 252, 0.92);
}

.request-meta,
.response-meta {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.55;
}

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

.schema-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.schema-head h4 {
  font-size: 1.2rem;
}

.schema-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.schema-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 32, 0.46);
}

.schema-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(85vh, 860px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: var(--shadow);
}

.schema-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.schema-modal-head h3 {
  margin: 6px 0 0;
  font-family: var(--heading-font);
  font-size: 1.9rem;
}

.schema-modal-kind,
.schema-modal-description {
  color: var(--muted);
}

.section-dark {
  color: rgba(255, 248, 238, 0.94);
  background: linear-gradient(160deg, rgba(5, 7, 13, 0.98), rgba(24, 55, 216, 0.92));
}

.section-dark .section-heading h3,
.section-dark .eyebrow,
.section-dark .checklist-title,
.section-dark code {
  color: #fff;
}

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

.checklist-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.checklist-card p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 248, 238, 0.74);
}

.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero.reveal,
.section.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    min-height: auto;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .service-grid,
  .standards-grid,
  .timeline,
  .schema-grid,
  .checklist-grid,
  .endpoint-columns,
  .two-column {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .site-shell,
  .hero,
  .section,
  .sidebar {
    padding: 18px;
  }

  .service-grid,
  .standards-grid,
  .timeline,
  .schema-grid,
  .checklist-grid,
  .endpoint-columns,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    max-width: 12ch;
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .endpoint-header {
    flex-direction: column;
  }

  .endpoint-example-head {
    align-items: start;
    flex-direction: column;
  }

  .endpoint-example-head-copy,
  .endpoint-example-actions {
    width: 100%;
  }

  .top-controls {
    align-items: flex-start;
    flex-direction: column;
  }
}
