:root {
  --admiin-green: #b1f785;
  --admiin-green-ink: #11210a;
  --admiin-blue: #126dfb;
  --admiin-purple: #8c52ff;
  --admiin-lavender: #f3eeff;
  --admiin-bg: #f6f6f6;
  --admiin-surface: #ffffff;
  --admiin-stroke: #e4e4e4;
  --admiin-text: #000000;
  --admiin-body: #575757;
  --admiin-muted: #767676;
  --admiin-code: #111c18;
  --admiin-warning: #fff6d8;
  --admiin-warning-stroke: #e0bd43;
  --page-width: 1180px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 18px 60px rgba(17, 33, 10, 0.08);
  color-scheme: light;
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--admiin-bg);
  color: var(--admiin-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: -1;
  top: -240px;
  right: -200px;
  width: 620px;
  height: 620px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(140, 82, 255, 0.14),
    rgba(18, 109, 251, 0.04) 48%,
    transparent 70%
  );
  content: '';
  pointer-events: none;
}

a {
  color: var(--admiin-purple);
  font-weight: 700;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(140, 82, 255, 0.34);
  outline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

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

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(228, 228, 228, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner,
.page-width {
  width: min(calc(100% - 40px), var(--page-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: var(--admiin-text);
  text-decoration: none;
}

.brand img {
  width: 112px;
  height: auto;
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: var(--admiin-stroke);
}

.brand-label {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.nav-scroller {
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-scroller::-webkit-scrollbar {
  display: none;
}

.main-nav {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  border-radius: 10px;
  color: #343434;
  padding: 9px 11px;
  font-size: 0.86rem;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current='page'] {
  background: var(--admiin-lavender);
  color: #4e2aa0;
}

.environment-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--admiin-stroke);
  border-radius: 12px;
  background: var(--admiin-surface);
  padding: 5px 7px 5px 10px;
}

.environment-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--admiin-green-ink);
  box-shadow: 0 0 0 4px rgba(177, 247, 133, 0.5);
}

html[data-env='prod'] .environment-dot {
  background: #ad6400;
  box-shadow: 0 0 0 4px rgba(224, 189, 67, 0.3);
}

.environment-control label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.environment-control select {
  min-width: 112px;
  border: 0;
  background: transparent;
  color: var(--admiin-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.config-error {
  border-bottom: 1px solid #e7a3a0;
  background: #fff0ef;
  color: #7d1812;
  padding: 12px 20px;
  text-align: center;
}

.config-error[hidden] {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 56px;
  align-items: center;
  padding-block: 86px 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #5b36a8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: linear-gradient(120deg, var(--admiin-blue), var(--admiin-purple));
  content: '';
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.08;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 3.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 700px;
  margin: 0 0 30px;
  color: var(--admiin-body);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admiin-stroke);
  border-radius: 12px;
  background: var(--admiin-surface);
  color: var(--admiin-text);
  padding: 11px 18px;
  font-size: 0.93rem;
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  border-color: #c8c8c8;
  text-decoration: none;
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--admiin-green);
  background: var(--admiin-green);
  color: var(--admiin-green-ink);
  box-shadow: 0 10px 28px rgba(98, 158, 60, 0.2);
}

.button-link {
  border-color: transparent;
  background: transparent;
  color: var(--admiin-purple);
}

.environment-card,
.card,
.article,
.side-panel,
.release-item,
.resource-card {
  border: 1px solid var(--admiin-stroke);
  border-radius: var(--radius-md);
  background: var(--admiin-surface);
}

.environment-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  box-shadow: var(--shadow);
}

.environment-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(120deg, var(--admiin-blue), var(--admiin-purple));
  content: '';
}

.card-label,
.meta-label {
  margin: 0 0 6px;
  color: var(--admiin-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.environment-name {
  margin: 0 0 20px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--admiin-stroke);
  padding-block: 14px;
}

.status-row:last-child {
  padding-bottom: 0;
}

.status-row span:first-child {
  color: var(--admiin-body);
  font-size: 0.84rem;
}

.status-row strong {
  max-width: 62%;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e6dbff;
  border-radius: 999px;
  background: var(--admiin-lavender);
  color: #4e2aa0;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 800;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--admiin-stroke);
  margin-bottom: 72px;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
}

.proof-item + .proof-item {
  border-left: 1px solid var(--admiin-stroke);
}

.proof-icon,
.card-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--admiin-lavender);
  color: var(--admiin-purple);
  font-weight: 800;
}

.proof-icon {
  width: 36px;
  height: 36px;
}

.proof-item strong {
  display: block;
  font-size: 0.88rem;
}

.proof-item small {
  color: var(--admiin-body);
}

.section {
  padding-block: 28px 72px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--admiin-body);
}

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

.card,
.resource-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  font-size: 1.05rem;
}

.card p,
.resource-card p {
  margin: 0 0 18px;
  color: var(--admiin-body);
  font-size: 0.93rem;
}

.card a,
.resource-card a {
  margin-top: auto;
}

.release-callout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-block: 12px 76px;
  border: 1px solid #e6dbff;
  border-radius: var(--radius-md);
  background: var(--admiin-lavender);
  padding: 22px 24px;
}

.release-callout p {
  margin: 3px 0 0;
  color: var(--admiin-body);
}

.page-hero {
  padding-block: 68px 38px;
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
  padding-bottom: 80px;
}

.article {
  min-width: 0;
  padding: clamp(24px, 5vw, 52px);
}

/* The site header is sticky, so anything an in-page anchor jumps to has to
   clear it or the heading lands underneath. */
.article :is(h2, h3)[id],
.swagger-ui .opblock-tag,
.swagger-ui .opblock {
  scroll-margin-top: 120px;
}

.article section + section {
  margin-top: 54px;
  border-top: 1px solid var(--admiin-stroke);
  padding-top: 48px;
}

.article p,
.article li {
  color: var(--admiin-body);
}

.article ol,
.article ul {
  padding-left: 1.3rem;
}

.article li + li {
  margin-top: 9px;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.side-panel li + li {
  margin-top: 8px;
}

.side-panel a {
  display: block;
  border-radius: 9px;
  color: var(--admiin-body);
  padding: 7px 9px;
  font-size: 0.88rem;
  text-decoration: none;
}

.side-panel a:hover {
  background: var(--admiin-lavender);
  color: #4e2aa0;
}

.step-list {
  display: grid;
  gap: 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: docs-step;
}

.step-list li {
  position: relative;
  min-height: 52px;
  padding-left: 68px;
  counter-increment: docs-step;
}

.step-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  background: var(--admiin-lavender);
  color: #4e2aa0;
  content: counter(docs-step, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 800;
}

.code-block {
  position: relative;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--admiin-code);
  color: #e7f3e1;
  padding: 20px;
  font-size: 0.82rem;
  line-height: 1.65;
}

.notice {
  border-left: 4px solid var(--admiin-blue);
  border-radius: 0 12px 12px 0;
  background: #edf4ff;
  color: #17335f;
  padding: 16px 18px;
}

.notice-warning {
  border-left-color: var(--admiin-warning-stroke);
  background: var(--admiin-warning);
  color: #63420b;
}

[hidden] {
  display: none !important;
}

.release-list {
  display: grid;
  gap: 16px;
  padding-bottom: 80px;
}

.release-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  padding: 28px;
}

.release-date {
  color: var(--admiin-body);
  font-size: 0.86rem;
  font-weight: 800;
}

.release-item ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
  color: var(--admiin-body);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 44px;
}

.reference-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 34px 22px;
}

.reference-intro h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.reference-intro p {
  margin: 0;
  color: var(--admiin-body);
}

.reference-shell {
  width: min(calc(100% - 40px), 1520px);
  margin: 0 auto 60px;
  overflow: hidden;
  border: 1px solid var(--admiin-stroke);
  border-radius: var(--radius-md);
  background: var(--admiin-surface);
}

#swagger-ui {
  min-height: 520px;
}

.reference-loading,
.reference-error {
  margin: 48px auto;
  max-width: 640px;
  border-radius: 14px;
  background: var(--admiin-lavender);
  color: #4e2aa0;
  padding: 22px;
  text-align: center;
}

html[data-env='prod'] .swagger-ui .auth-wrapper,
html[data-env='prod'] .swagger-ui .authorization__btn,
html[data-env='prod'] .swagger-ui .try-out,
html[data-env='prod'] .swagger-ui .execute-wrapper {
  display: none !important;
}

.swagger-ui .topbar,
.swagger-ui .information-container.wrapper {
  display: none;
}

.swagger-ui .wrapper {
  max-width: 1460px;
  padding-inline: 24px;
}

.swagger-ui .scheme-container {
  margin: 0;
  box-shadow: none;
}

.site-footer {
  border-top: 1px solid var(--admiin-stroke);
  background: var(--admiin-surface);
}

.footer-inner {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
  color: var(--admiin-body);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-block: 12px;
  }

  .nav-scroller {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 64px;
  }

  .environment-card {
    max-width: 620px;
  }

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

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

  .side-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-width,
  .reference-shell {
    width: min(calc(100% - 28px), var(--page-width));
  }

  .header-inner {
    min-height: 64px;
  }

  .brand img {
    width: 100px;
  }

  .brand-divider,
  .brand-label {
    display: none;
  }

  .environment-control {
    margin-left: auto;
  }

  .environment-control select {
    min-width: 92px;
  }

  .hero,
  .page-hero {
    padding-top: 48px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.25rem);
  }

  .proof-strip,
  .card-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .proof-item + .proof-item {
    border-top: 1px solid var(--admiin-stroke);
    border-left: 0;
  }

  .section-heading,
  .reference-intro,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .release-callout,
  .release-item {
    grid-template-columns: 1fr;
  }

  .release-callout {
    align-items: start;
  }

  .article {
    padding: 24px 20px;
  }

  .reference-shell {
    overflow: hidden;
  }

  .swagger-ui .wrapper {
    min-width: 0;
    padding-inline: 12px;
  }

  .swagger-ui .opblock-tag,
  .swagger-ui .opblock-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .swagger-ui .opblock-tag small,
  .swagger-ui .opblock-summary-description {
    flex-basis: 100%;
    margin-left: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .swagger-ui .opblock-summary-path,
  .swagger-ui .opblock-summary-path__deprecated {
    max-width: calc(100% - 94px);
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Guide page breadcrumb and related-guide links. Both sit inside the article
   column, so they inherit its width and do not need their own breakpoint. */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admiin-muted);
}

.breadcrumb a {
  color: inherit;
}

.breadcrumb [aria-current='page'] {
  color: var(--admiin-text);
}

.related-guides {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--admiin-stroke);
}

.related-guides ul {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

/* Guide tables. Wide rows scroll inside their own container rather than
   forcing the page to scroll sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--admiin-stroke);
  border-radius: var(--radius-md);
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table-scroll th,
.table-scroll td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--admiin-stroke);
}

.table-scroll thead th {
  background: var(--admiin-surface);
  font-weight: 600;
  color: var(--admiin-text);
  white-space: nowrap;
}

.table-scroll tbody tr:last-child th,
.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}
