:root {
  /* Brand palette */
  --coral: #ff804d;
  --coral-hover: #f06c35;
  --coral-active: #d8571f;
  --coral-tint: #fff1eb;
  --coral-border: #ffd5c4;
  --coral-glow: rgba(255, 128, 77, 0.24);
  /* High-contrast WCAG AA text derivative (> 4.5:1 on white/paper) */
  --coral-text: #b83e0e;

  --navy: #34495e;
  --navy-dark: #243342;
  --navy-deep: #1a2530;
  --navy-light: #475f77;

  /* Neutrals - Light Theme (default) */
  --ink: #1e293b;
  --ink-secondary: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --paper: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-hover: #f8fafc;

  /* Navigation & Hero */
  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-border: rgba(226, 232, 240, 0.9);
  --hero-bg: radial-gradient(circle at 84% 18%, rgba(255, 128, 77, 0.22) 0, transparent 42%), linear-gradient(135deg, #19232d 0%, #243342 55%, #34495e 100%);
  --hero-decor: rgba(255, 128, 77, 0.16);

  /* Code Blocks */
  --code-bg: #141c24;
  --code-header: #0f161d;
  --code-border: #22303e;
  --code-text: #e2e8f0;
  --code-tab-color: #94a3b8;
  --code-tab-active-bg: var(--coral);
  --code-tab-active-text: #ffffff;

  /* Components */
  --banner-bg: #fdfefe;
  --banner-border: #d5dfe7;
  --callout-bg: #fff8f5;
  --callout-border: var(--coral);
  --pill-bg: #fff0eb;
  --pill-text: #b94719;

  --docs-btn-border: var(--navy);
  --docs-btn-color: var(--navy);
  --docs-btn-bg: var(--surface);
  --docs-btn-hover-bg: var(--navy);
  --docs-btn-hover-border: var(--navy);
  --docs-btn-hover-color: #ffffff;

  --hero-top-bg: #19232d;

  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--hero-top-bg);
  line-height: 1.58;
}

/* Dark Theme Variables */
:root[data-theme="dark"] {
  --ink: #f1f5f9;
  --ink-secondary: #cbd5e1;
  --muted: #94a3b8;
  --line: #22303e;
  --line-strong: #2e4154;
  --paper: #0b1118;
  --surface: #121a23;
  --surface-alt: #17222e;
  --surface-hover: #1c2a38;
  --coral-text: #ff9d75;

  --nav-bg: rgba(14, 21, 29, 0.9);
  --nav-border: rgba(34, 48, 62, 0.9);
  --hero-bg: radial-gradient(circle at 84% 18%, rgba(255, 128, 77, 0.18) 0, transparent 42%), linear-gradient(135deg, #090e14 0%, #111a23 55%, #1a2633 100%);
  --hero-decor: rgba(255, 128, 77, 0.12);

  --code-bg: #0d1319;
  --code-header: #080c10;
  --code-border: #1d2936;

  --banner-bg: #121a23;
  --banner-border: #283748;
  --callout-bg: rgba(255, 128, 77, 0.08);
  --callout-border: var(--coral);
  --pill-bg: rgba(255, 128, 77, 0.14);
  --pill-text: #ff9d75;

  --docs-btn-border: var(--line-strong);
  --docs-btn-color: var(--ink);
  --docs-btn-bg: var(--surface-alt);
  --docs-btn-hover-bg: var(--coral);
  --docs-btn-hover-border: var(--coral);
  --docs-btn-hover-color: #ffffff;

  --hero-top-bg: #090e14;
}

/* Auto Theme Media Query */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f5f9;
    --ink-secondary: #cbd5e1;
    --muted: #94a3b8;
    --line: #22303e;
    --line-strong: #2e4154;
    --paper: #0b1118;
    --surface: #121a23;
    --surface-alt: #17222e;
    --surface-hover: #1c2a38;
    --coral-text: #ff9d75;

    --nav-bg: rgba(14, 21, 29, 0.9);
    --nav-border: rgba(34, 48, 62, 0.9);
    --hero-bg: radial-gradient(circle at 84% 18%, rgba(255, 128, 77, 0.18) 0, transparent 42%), linear-gradient(135deg, #090e14 0%, #111a23 55%, #1a2633 100%);
    --hero-decor: rgba(255, 128, 77, 0.12);

    --code-bg: #0d1319;
    --code-header: #080c10;
    --code-border: #1d2936;

    --banner-bg: #121a23;
    --banner-border: #283748;
    --callout-bg: rgba(255, 128, 77, 0.08);
    --callout-border: var(--coral);
    --pill-bg: rgba(255, 128, 77, 0.14);
    --pill-text: #ff9d75;

    --docs-btn-border: var(--line-strong);
    --docs-btn-color: var(--ink);
    --docs-btn-bg: var(--surface-alt);
    --docs-btn-hover-bg: var(--coral);
    --docs-btn-hover-border: var(--coral);
    --docs-btn-hover-color: #ffffff;

    --hero-top-bg: #090e14;
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background-color: var(--hero-top-bg);
}
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
}

/* Seamless overscroll extension above hero */
body::before {
  content: "";
  position: absolute;
  top: -2000px;
  left: 0;
  right: 0;
  height: 2002px;
  background: var(--hero-top-bg);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--coral-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--coral-hover); }

code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code {
  font-size: .88em;
  padding: .15em .35em;
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--coral-text);
  border: 1px solid var(--line);
}
pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--code-text);
  font-size: .84rem;
  line-height: 1.65;
}
pre {
  overflow-x: auto;
  margin: 1.25rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: 12px;
  background: var(--code-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.shell { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 110; padding: .5rem 1rem; background: var(--surface); color: var(--coral-text); font-weight: 700; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Top Navigation Bar */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.top-nav.is-scrolled {
  background: rgba(17, 26, 35, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
}

/* Status Page Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .28rem .68rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #10b981;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .16s ease;
}
.status-badge:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  transform: translateY(-1px);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-green 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Pulsetic Live Status Badges */
.pulsetic-badge-slot {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.pulsetic-badge-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}
.pulsetic-badge-box {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .22rem .62rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .02em;
  text-decoration: none;
  transition: all .16s ease;
  line-height: 1;
}
.pulsetic-badge-box.online {
  background: #e9f7ef;
  border: 1px solid #c2e8d2;
  color: #1b1823;
}
.pulsetic-badge-box.online:hover {
  background: #dcf2e5;
  border-color: #a3deb8;
  transform: translateY(-1px);
}
.pulsetic-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pulsetic-indicator-dot.online {
  background: #27ae60;
  box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
  animation: pulse-green 2s infinite;
}
.pulsetic-badge-box.offline {
  background: #ffeded;
  border: 1px solid #e5e6e6;
  color: #1b1823;
}
.pulsetic-indicator-dot.offline {
  background: #ec5050;
}
.pulsetic-badge-box.investigation {
  background: #fef8ef;
  border: 1px solid #fce5ce;
  color: #1b1823;
}
.pulsetic-indicator-dot.investigation {
  background: #f2994a;
}

/* Dark mode adjustment for Pulsetic badges */
[data-theme="dark"] .pulsetic-badge-box.online {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}
[data-theme="dark"] .pulsetic-badge-box.online:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
}
[data-theme="dark"] .pulsetic-indicator-dot.online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pulsetic-badge-box.online {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
  }
  :root:not([data-theme="light"]) .pulsetic-badge-box.online:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
  }
  :root:not([data-theme="light"]) .pulsetic-indicator-dot.online {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  }
}

/* Nav Badge specific styling */
.nav-badge .pulsetic-badge-box, .nav-badge .status-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #10b981;
}
.nav-badge .pulsetic-badge-box:hover, .nav-badge .status-badge:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}
.nav-badge .pulsetic-indicator-dot.online, .nav-badge .status-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulse-green 2s infinite;
}

/* Theme Switcher Segmented Control */
.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.theme-btn svg {
  display: block;
  flex-shrink: 0;
}
.theme-btn:hover {
  color: #ffffff;
}
.theme-btn.is-active {
  background: rgba(255, 128, 77, 0.22);
  color: #ff9d75;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.theme-btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 1px;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 4.5rem;
  color: white;
  background: var(--hero-bg);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -6% -160px auto;
  width: 440px;
  height: 440px;
  border: 48px solid var(--hero-decor);
  border-radius: 50%;
  pointer-events: none;
}
.hero .shell { position: relative; z-index: 1; }

.eyebrow, .section-label {
  margin: 0 0 .45rem;
  color: var(--coral-text);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.18;
  position: relative;
}
.hero h1 { color: #ffffff; }
.hero-compact {
  padding: 6.5rem 0 2.6rem;
}
.hero-compact h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.hero-compact .lede {
  margin-bottom: 0;
}
.hero-compact .section-label {
  color: var(--coral);
}
h1 { max-width: 760px; margin: 0; font-size: clamp(2.8rem, 7vw, 4.8rem); letter-spacing: -.05em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 3.8vw, 2.5rem); letter-spacing: -.03em; }
h3 { margin: .35rem 0 .6rem; font-size: 1.22rem; letter-spacing: -.02em; }
h4 { margin: .35rem 0 .5rem; font-size: 1.05rem; font-weight: 750; }
p { max-width: 76ch; margin-top: 0; }
.lede { max-width: 660px; margin: 1rem 0 1.7rem; color: #e2e8f0; font-size: clamp(1.05rem, 2vw, 1.26rem); line-height: 1.6; }

/* Heading Anchor Links */
.heading-anchor {
  display: inline-block;
  opacity: 0;
  margin-left: .5rem;
  color: var(--coral-text);
  text-decoration: none;
  font-weight: 600;
  font-size: .82em;
  transition: opacity .15s ease, color .15s ease;
  user-select: none;
}
h2:hover .heading-anchor, h3:hover .heading-anchor, h4:hover .heading-anchor, .heading-anchor:focus {
  opacity: 0.65;
}
.heading-anchor:hover {
  opacity: 1;
  color: var(--coral-hover);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.6rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  font-size: .92rem;
  text-decoration: none;
  transition: all .16s ease;
}
.button-primary {
  color: #ffffff;
  background: var(--coral);
  box-shadow: 0 4px 14px var(--coral-glow);
}
.button-primary:hover {
  color: #ffffff;
  background: var(--coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--coral-glow);
}
.button-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.button-secondary:hover {
  color: #ffffff;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.base-url {
  display: inline-block;
  padding: .6rem .95rem;
  color: #ffe6db;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.24);
  font-size: .92rem;
}

/* Two-column Layout & Sidebar */
.layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-top: 3.5rem;
}
.sidebar {
  position: sticky;
  top: calc(64px + 1.25rem);
  padding: .85rem 0;
}
.sidebar-summary {
  display: none;
}
.nav-title {
  margin: 0 0 .6rem;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.nav-group {
  margin: .85rem 0 .2rem;
  padding: .15rem .65rem 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.sidebar nav .nav-group:first-child {
  margin-top: 0;
  padding-top: 0;
}
.sidebar nav { display: grid; gap: .2rem; }
.sidebar a {
  padding: .38rem .65rem;
  border-radius: 7px;
  color: var(--ink-secondary);
  font-size: .91rem;
  font-weight: 550;
  text-decoration: none;
  border-left: 2.5px solid transparent;
  transition: all .12s ease;
}
.sidebar a:hover {
  color: var(--coral-text);
  background: var(--surface-alt);
}
.sidebar a.is-active {
  color: var(--coral-text);
  background: var(--surface-alt);
  font-weight: 700;
  border-left-color: var(--coral);
}

main { min-width: 0; padding-bottom: 4.5rem; }
main > section { padding: 0 0 3.8rem; scroll-margin-top: calc(64px + 1.25rem); }
main > section + section { border-top: 1px solid var(--line); padding-top: 3.8rem; }

/* Callout Box */
.callout {
  margin: 1.35rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--coral);
  border-radius: 0 10px 10px 0;
  background: var(--callout-bg);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.callout.warning {
  border-left-color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
}

.pill {
  display: inline-block;
  padding: .24rem .58rem;
  border-radius: 999px;
  color: var(--pill-text);
  background: var(--pill-bg);
  font-size: .72rem;
  font-weight: 750;
  border: 1px solid rgba(255, 128, 77, 0.2);
}

.checklist { display: grid; gap: .85rem; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--coral-text);
  font-weight: 900;
  font-size: 1.05rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td {
  padding: .85rem 1.05rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--ink-secondary);
  background: var(--surface-alt);
  font-size: .76rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 750;
}
tr:last-child td { border-bottom: 0; }

/* Endpoints List */
.endpoint-list { display: grid; gap: .65rem; margin: 1.3rem 0; }
.endpoint {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  column-gap: .85rem;
  row-gap: .2rem;
  align-items: center;
  padding: .85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.endpoint:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.endpoint code {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color .15s ease;
}
.endpoint code:hover {
  color: var(--coral-text);
}
.endpoint p {
  grid-column: 2 / -1;
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.endpoint-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.endpoint-copy-btn:hover {
  color: var(--coral-text);
  border-color: var(--coral);
  background: var(--surface);
}
.method {
  display: inline-flex;
  justify-content: center;
  padding: .23rem .3rem;
  border-radius: 5px;
  color: white;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .03em;
}
.method.get { background: #2563eb; }
.method.post { background: var(--coral); }
.method.put { background: #475569; }
.method.delete { background: #dc2626; }

/* Reference Documentation Grid */
.reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.reference-grid a {
  display: grid;
  gap: .4rem;
  min-height: 125px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.reference-grid a:hover {
  color: var(--ink);
  border-color: var(--coral);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.reference-grid span { color: var(--muted); font-size: .83rem; }
.reference-grid strong { color: var(--coral-text); }

/* Footer */
footer {
  position: relative;
  padding: 1.8rem 0;
  color: #94a3b8;
  background: #0f1722;
  border-top: 1px solid #1e293b;
  font-size: .9rem;
}
footer strong { color: var(--coral); }
.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 550;
  transition: color .15s ease;
}
.footer-links a:hover {
  color: #ffffff;
}
.footer-dot {
  color: #334155;
}

/* Obfuscated Support Button */
.support-btn {
  display: inline;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--coral-text);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .15s ease;
}
.support-btn:hover {
  color: var(--coral-hover);
}
.support-btn.footer-btn {
  color: #94a3b8;
  font-weight: 550;
  text-decoration: none;
}
.support-btn.footer-btn:hover {
  color: #ffffff;
}
footer::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 2000px;
  background: #0f1722;
  pointer-events: none;
}

/* Code Examples & Tabs */
.code-example {
  margin: 1.25rem 0;
  border: 1px solid var(--code-border);
  border-radius: 13px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.code-tabs {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .5rem .75rem 0;
  border-bottom: 1px solid var(--code-border);
  background: var(--code-header);
}
.code-tabs [role="tab"] {
  appearance: none;
  padding: .46rem .85rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--code-tab-color);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  transition: all .15s ease;
}
.code-tabs [role="tab"]:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.code-tabs [role="tab"][aria-selected="true"] {
  color: #ffffff;
  background: var(--code-bg);
  border-color: var(--code-border);
  border-top: 2px solid var(--coral);
  border-bottom: 1px solid var(--code-bg);
  margin-bottom: -1px;
}
.code-tabs [role="tab"]:focus-visible, .copy-code:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.copy-code {
  margin-left: auto;
  margin-bottom: .3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all .15s ease;
}
.copy-code:hover {
  color: white;
  background: rgba(255, 128, 77, 0.22);
  border-color: var(--coral);
}
.copy-code svg { display: block; width: 14px; height: 14px; }

.code-panel { position: relative; padding: 0 !important; margin: 0 !important; border: 0 !important; outline: none; }
.code-panel .shiki { margin: 0; padding: .65rem 1.15rem; border-radius: 0; box-shadow: none; background: transparent !important; }
.code-panel pre { margin: 0; background: transparent; box-shadow: none; }

/* Base URL Highlight Banner */
.base-url-banner {
  margin: 1.15rem 0 1.65rem;
  padding: 1.2rem 1.45rem;
  border: 1.5px solid var(--banner-border);
  border-left: 5px solid var(--coral);
  border-radius: var(--radius);
  background: var(--banner-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* API Key Callout Banner */
.api-key-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 1.2rem 0 1.5rem;
  padding: 1.15rem 1.45rem;
  border: 1.5px solid var(--banner-border);
  border-left: 5px solid var(--coral);
  border-radius: var(--radius);
  background: var(--banner-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}
.api-key-banner-content {
  flex: 1 1 320px;
}
.api-key-banner-content .banner-label {
  display: block;
  margin-bottom: .35rem;
  color: var(--coral);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.api-key-banner-content p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.55;
  color: var(--ink);
}
.banner-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .6rem;
}
.banner-top-row .banner-label {
  margin-bottom: 0;
}
.banner-tag-group {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.banner-docs-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .85rem;
  border: 1.5px solid var(--docs-btn-border);
  border-radius: 8px;
  color: var(--docs-btn-color);
  background: var(--docs-btn-bg);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all .16s ease;
}
.banner-docs-button:hover {
  color: var(--docs-btn-hover-color);
  background: var(--docs-btn-hover-bg);
  border-color: var(--docs-btn-hover-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.banner-docs-button svg {
  display: inline-block;
  flex-shrink: 0;
}
.base-url-banner .banner-label {
  display: block;
  margin-bottom: .4rem;
  color: var(--coral);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.base-url-banner .banner-url {
  display: inline-block;
  padding: .5rem .9rem;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--coral);
  border: 1px solid var(--code-border);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  word-break: break-all;
}
.base-url-banner .banner-note {
  margin: .7rem 0 0;
  color: var(--ink-secondary);
  font-size: .93rem;
  line-height: 1.55;
}
.base-url-banner del {
  color: #dc2626;
  text-decoration-color: #dc2626;
  font-weight: 650;
}
.base-url-banner del code {
  color: #dc2626;
  text-decoration: line-through;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}

/* Authentication Decision Checklist & Tabs */
.auth-picker-list {
  margin: 1.15rem 0 1.35rem;
}
.auth-picker-list li {
  margin-bottom: .65rem;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.55;
}

.auth-tabs-container {
  margin: 1.6rem 0 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.auth-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .55rem .85rem 0;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.auth-tabs-nav [role="tab"] {
  appearance: none;
  padding: .65rem 1.15rem;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .91rem;
  font-weight: 750;
  transition: all .15s ease;
}

.auth-tabs-nav [role="tab"]:hover {
  color: var(--coral);
  background: var(--surface);
}

.auth-tabs-nav [role="tab"][aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  border-top: 2px solid var(--coral);
  border-bottom: 1px solid var(--surface);
  margin-bottom: -1px;
}

.auth-tabs-nav [role="tab"]:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.auth-panel {
  padding: 1.55rem 1.8rem 1.65rem;
}
.auth-panel h3 {
  margin: .6rem 0 .5rem;
  font-size: 1.3rem;
}
.auth-panel p {
  margin: .4rem 0 .9rem;
  color: var(--ink-secondary);
  font-size: .95rem;
  line-height: 1.58;
}

/* Header Preview Box */
.header-preview-box {
  margin: 1rem 0 1.15rem;
  border: 1px solid var(--code-border);
  border-radius: 11px;
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.header-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .85rem;
  background: var(--code-header);
  border-bottom: 1px solid var(--code-border);
}
.header-preview-header .copy-code {
  margin-bottom: 0;
}
.header-preview-title {
  color: #94a3b8;
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.header-preview-code {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55rem;
  padding: .85rem 1rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
  line-height: 1.55;
  word-break: break-all;
}
.header-preview-code .header-name {
  color: var(--coral);
  font-weight: 700;
  flex-shrink: 0;
}
.header-preview-code .header-val {
  color: #e2e8f0;
}

/* Responsive Styles */
@media (max-width: 820px) {
  .hero { padding: 5.5rem 0 3.2rem; }
  .hero-compact { padding: 5.5rem 0 2.4rem; }
  .layout { display: block; padding-top: 2rem; }
  .sidebar {
    position: static;
    margin-bottom: 2.2rem;
    padding: 0;
  }
  .sidebar-drawer {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  }
  .sidebar-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.15rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }
  .sidebar-summary::-webkit-details-marker { display: none; }
  .sidebar-summary .nav-title { margin: 0; }
  .drawer-chevron {
    color: var(--muted);
    transition: transform .2s ease;
  }
  .sidebar-drawer[open] .drawer-chevron {
    transform: rotate(180deg);
  }
  .sidebar-drawer nav {
    padding: .35rem .75rem .85rem;
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar nav .nav-group {
    grid-column: 1 / -1;
  }
  .reference-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-shell { height: 56px; }
  main > section { scroll-margin-top: calc(56px + 1rem); }
  .auth-tabs-nav {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: .65rem;
  }
  .auth-tabs-nav [role="tab"] {
    border-radius: 8px;
    border: 1px solid transparent;
    text-align: left;
  }
  .auth-tabs-nav [role="tab"][aria-selected="true"] {
    border-color: var(--line);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 3px solid var(--coral);
    margin-bottom: 0;
  }
  .auth-panel { padding: 1.2rem 1.1rem; }
  .footer-shell { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 1.5rem, 1180px); }
  .sidebar-drawer nav { grid-template-columns: 1fr; }
  .endpoint { grid-template-columns: 58px 1fr; }
  .endpoint-copy-btn { display: none; }
  .endpoint p { grid-column: 1 / -1; }
  .method { width: max-content; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; justify-content: center; }
}
