:root {
  --bg: #f7f5f0;
  --paper: #fff;
  --ink: #151610;
  --muted: #65675f;
  --line: #dedbd1;
  --gold: #8a711d;
  --gold2: #b8931f;
  --green: #1f6f4a;
  --blue: #285ea8;
  --code: #10120e;
  --topbar: 72px;
  --shadow: 0 18px 50px rgba(23, 24, 17, 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;
}
.site-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar);
  z-index: 1000;
  border-bottom: 1px solid rgba(21, 22, 16, 0.1);
  background: rgba(250, 249, 245, 0.95);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
}
.topbar-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: max-content;
}
.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 9px;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-copy strong {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-copy span {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 5px;
}
.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-nav a {
  font-size: 12px;
  color: #55584f;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 8px;
}
.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: #ece9e0;
  color: var(--ink);
}
.top-action {
  background: var(--ink) !important;
  color: white !important;
}
.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 9px 12px;
  font-weight: 700;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--topbar);
  left: 0;
  right: 0;
  z-index: 999;
  background: #fbfaf6;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  box-shadow: var(--shadow);
}
.mobile-nav.open {
  display: grid;
}
.mobile-nav a {
  text-decoration: none;
  padding: 12px 4px;
  border-bottom: 1px solid #ece9e0;
  font-size: 13px;
}
.page {
  padding-top: var(--topbar);
  min-height: 100vh;
}
.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  padding: 70px 0 52px;
}
.eyebrow,
.kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 800;
}
h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  margin: 14px 0 20px;
  font-weight: 600;
}
h2 {
  font-size: clamp(27px, 3vw, 38px);
  margin: 0 0 14px;
}
h3 {
  font-size: 18px;
  margin: 0 0 10px;
}
p,
li,
td,
th {
  font-size: 14px;
  line-height: 1.7;
}
p,
li {
  color: var(--muted);
}
.lead {
  font-size: 18px;
  line-height: 1.7;
  max-width: 850px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 9px;
  padding: 0 15px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 750;
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}
.grid {
  display: grid;
  gap: 14px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 28px rgba(23, 24, 17, 0.03);
}
.metric {
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.notice {
  padding: 16px 18px;
  border: 1px solid #d9cfaa;
  border-left: 4px solid var(--gold2);
  background: #f4efdf;
  border-radius: 10px;
}
.code {
  background: var(--code);
  color: #eef1e7;
  border-radius: 13px;
  padding: 18px;
  overflow: auto;
  font:
    12px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #ebe8df;
  vertical-align: top;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #55584f;
  background: #faf9f5;
}
.method {
  font:
    800 10px/1 ui-monospace,
    monospace;
  display: inline-flex;
  padding: 7px 8px;
  border-radius: 7px;
  background: #ece9e0;
}
.method.get {
  background: #e7f2eb;
  color: #1c6544;
}
.method.post {
  background: #eee8d8;
  color: #735d17;
}
.path {
  font:
    13px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: white;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d8078;
}
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s ease;
  cursor: pointer;
  font-weight: 800;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: #efede6;
}
.footer-grid {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.footer-grid h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.footer-grid a {
  display: block;
  text-decoration: none;
  color: #5c5e56;
  font-size: 12px;
  margin: 10px 0;
}
.footer-brand {
  max-width: 360px;
}
.footer-brand p {
  font-size: 12px;
}
.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid #dad6ca;
  padding: 20px 0 28px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #6a6b64;
  font-size: 11px;
}
@media (max-width: 900px) {
  .top-nav {
    display: none;
  }
  .menu-button {
    display: inline-flex;
  }
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
}
@media (max-width: 620px) {
  :root {
    --topbar: 64px;
  }
  .topbar-inner,
  .wrap,
  .footer-grid,
  .footer-bottom {
    width: calc(100% - 28px);
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .hero {
    padding: 48px 0 38px;
  }
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

.docs-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  width: min(1480px, 100%);
  margin: 0 auto;
}
.docs-side {
  position: sticky;
  top: var(--topbar);
  height: calc(100vh - var(--topbar));
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  background: #fbfaf6;
}
.docs-side h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #8a877d;
  margin: 0 0 9px;
  padding: 0 8px;
}
.docs-side a {
  display: block;
  text-decoration: none;
  padding: 8px;
  border-radius: 8px;
  color: #5d5f57;
  font-size: 12px;
  margin: 2px 0;
}
.docs-side a:hover,
.docs-side a.active {
  background: #ece9e0;
  color: var(--ink);
}
.side-group {
  margin-bottom: 24px;
}
.docs-main {
  min-width: 0;
  padding: 54px clamp(24px, 5vw, 72px) 100px;
}
.docs-main > .content {
  max-width: 980px;
}
.docs-hero {
  padding: 18px 0 38px;
}
.docs-hero h1 {
  font-size: clamp(38px, 5vw, 62px);
}
.endpoint-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px solid #e5e1d7;
  text-decoration: none;
}
.endpoint-row:hover {
  background: #fbfaf6;
}
.endpoint-row .scope {
  text-align: right;
  font-size: 10px;
  color: #77796f;
}
.endpoint-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}
.endpoint-path {
  font:
    600 18px/1.4 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.endpoint-status {
  margin-left: auto;
}
.code-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 9px;
}
.code-tab {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.code-tab.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.code-panel {
  display: none;
}
.code-panel.active {
  display: block;
}
.test-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  overflow: hidden;
}
.test-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}
.test-results {
  padding: 0 15px;
}
.test-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #ece9e0;
}
.test-result:last-child {
  border-bottom: 0;
}
.pass {
  color: var(--green);
  font-weight: 800;
}
.fail {
  color: #9c3028;
  font-weight: 800;
}
.sandbox-ribbon {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid #cfd9e9;
  background: #eaf1fb;
  border-radius: 10px;
  color: #244e83;
  font-size: 12px;
}
.search-box {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  padding: 10px 11px;
  margin-bottom: 14px;
}
.reference-shell {
  padding-top: var(--topbar);
}
.swagger-frame {
  width: min(1500px, calc(100% - 32px));
  margin: 20px auto 70px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.swagger-topnote {
  padding: 15px 18px;
  background: #eaf1fb;
  border-bottom: 1px solid #cfd9e9;
  color: #244e83;
  font-size: 12px;
}
@media (max-width: 920px) {
  .docs-layout {
    display: block;
  }
  .docs-side {
    display: none;
  }
  .docs-main {
    padding: 38px 20px 90px;
  }
  .endpoint-row {
    grid-template-columns: 62px minmax(0, 1fr);
  }
  .endpoint-row .scope {
    grid-column: 2;
    text-align: left;
  }
  .endpoint-status {
    margin-left: 0;
  }
}

.docs-side [data-doc-endpoint] {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.35;
}
.docs-side [data-doc-endpoint] .method {
  font-size: 8px;
  padding: 5px 6px;
  flex: 0 0 auto;
}

/* v1.0.11 intrinsic-size and responsive overflow hardening */
.grid > * {
  min-width: 0;
}

.card,
.notice,
.test-panel,
.sandbox-ribbon,
.docs-main,
.docs-main > .content,
.section,
.endpoint-head,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}

.endpoint-path {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

p code,
li code,
td code,
th code,
.card code,
.notice code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap {
  width: 100%;
}

.actions > * {
  min-width: 0;
  max-width: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

@media (max-width: 620px) {
  .card {
    width: 100%;
  }

  .button {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
}
