/* ==========================================================================
   PANTHEON DOCUMENTATION DESIGN SYSTEM
   ONE-TO-ONE REPRODUCTION OF VERCEL DOCS DESIGN
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONT FAMILY & LOCAL STACKS
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Geist Sans";
  src: url("fonts/GeistVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMonoVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Geist Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

/* --------------------------------------------------------------------------
   2. COLOUR VARIABLES FOR LIGHT AND DARK THEME
   -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* Backgrounds */
  --ds-background-100: #ffffff;
  --ds-background-200: #fafafa;

  /* Gray Scale */
  --ds-gray-100: #f2f2f2;
  --ds-gray-200: #ebebeb;
  --ds-gray-300: #e6e6e6;
  --ds-gray-400: #eaeaea;
  --ds-gray-500: #c9c9c9;
  --ds-gray-600: #a8a8a8;
  --ds-gray-700: #8f8f8f;
  --ds-gray-800: #7d7d7d;
  --ds-gray-900: #4d4d4d;
  --ds-gray-1000: #171717;

  /* Gray Alpha Scale */
  --ds-gray-alpha-100: rgba(0, 0, 0, 0.05);
  --ds-gray-alpha-200: rgba(0, 0, 0, 0.08);
  --ds-gray-alpha-300: rgba(0, 0, 0, 0.10);
  --ds-gray-alpha-400: rgba(0, 0, 0, 0.08);
  --ds-gray-alpha-500: rgba(0, 0, 0, 0.21);
  --ds-gray-alpha-600: rgba(0, 0, 0, 0.24);
  --ds-gray-alpha-700: rgba(0, 0, 0, 0.44);
  --ds-gray-alpha-800: rgba(0, 0, 0, 0.51);
  --ds-gray-alpha-900: rgba(0, 0, 0, 0.70);
  --ds-gray-alpha-1000: rgba(0, 0, 0, 0.91);

  /* Blue Accent */
  --ds-blue-100: #f0f7ff;
  --ds-blue-200: #eaf4ff;
  --ds-blue-300: #e0efff;
  --ds-blue-400: #cce7ff;
  --ds-blue-500: #97ccff;
  --ds-blue-600: #51aeff;
  --ds-blue-700: #0070f7;
  --ds-blue-800: #005edc;
  --ds-blue-900: #0064e2;
  --ds-blue-1000: #002453;

  /* Amber Accent */
  --ds-amber-100: #fff6e1;
  --ds-amber-200: #fff4d4;
  --ds-amber-300: #fff1c8;
  --ds-amber-400: #ffdd84;
  --ds-amber-500: #ffc85e;
  --ds-amber-600: #ffa000;
  --ds-amber-700: #ffb200;
  --ds-amber-800: #ff9900;
  --ds-amber-900: #a64f00;
  --ds-amber-1000: #541c00;

  /* Red Accent */
  --ds-red-100: #ffeef0;
  --ds-red-200: #ffe9ea;
  --ds-red-300: #ffe4e5;
  --ds-red-400: #ffd8d7;
  --ds-red-500: #ffb5b6;
  --ds-red-600: #ff6a6e;
  --ds-red-700: #fc0035;
  --ds-red-800: #e70022;
  --ds-red-900: #d60020;
  --ds-red-1000: #46000c;

  /* Green Accent */
  --ds-green-100: #ecfdec;
  --ds-green-200: #e5fce7;
  --ds-green-300: #d3fad1;
  --ds-green-400: #b9f5bc;
  --ds-green-500: #82eb8d;
  --ds-green-600: #4ce15e;
  --ds-green-700: #28a948;
  --ds-green-800: #279141;
  --ds-green-900: #107d32;
  --ds-green-1000: #00370d;

  /* Purple Accent */
  --ds-purple-100: #f9f0ff;
  --ds-purple-200: #f9f1ff;
  --ds-purple-300: #f5e8ff;
  --ds-purple-400: #f1d9ff;
  --ds-purple-500: #dda9ff;
  --ds-purple-600: #c77dff;
  --ds-purple-700: #9f00f4;
  --ds-purple-800: #8400cd;
  --ds-purple-900: #7c00c9;
  --ds-purple-1000: #2e004d;

  /* Pink Accent */
  --ds-pink-100: #ffeaf5;
  --ds-pink-200: #ffeaf2;
  --ds-pink-300: #ffe0eb;
  --ds-pink-400: #ffd5e1;
  --ds-pink-500: #fdb3cc;
  --ds-pink-600: #f97ea7;
  --ds-pink-700: #f22782;
  --ds-pink-800: #e4106e;
  --ds-pink-900: #c41562;
  --ds-pink-1000: #460523;

  /* Shadows & Focus */
  --ds-focus-color: var(--ds-blue-900);
  --ds-focus-ring: 0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color);
  --ds-shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.04);
  --ds-shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.04);
  --ds-shadow-border: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--ds-background-200);
  --ds-shadow-border-small: 0 0 0 1px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--ds-background-200);

  /* Semantic mappings */
  --site-bg: var(--ds-background-100);
  --site-fg: var(--ds-gray-1000);
  --site-muted: var(--ds-gray-900);
  --site-border: var(--ds-gray-400);
  --site-border-subtle: var(--ds-gray-300);
  --site-card-bg: var(--ds-background-200);
  --site-code-bg: var(--ds-background-100);
  --table-header-bg: var(--ds-background-200);
  --table-row-bg: var(--ds-background-100);
  --table-divider: var(--ds-gray-400);

  /* Semantic inline tokens */
  --tok-quiet-bg: #f7f7f7;
  --tok-quiet-border: #dedede;
  --tok-quiet-fg: #3f3f46;
  --tok-blue-bg: #eff6ff;
  --tok-blue-border: #bfdbfe;
  --tok-blue-fg: #075aa5;
  --tok-purple-bg: #f7f2ff;
  --tok-purple-border: #e4d4ff;
  --tok-purple-fg: #6f2da8;
  --tok-red-bg: #fff1f2;
  --tok-red-border: #fecdd3;
  --tok-red-fg: #a91d2a;
  --tok-teal-bg: #ecfdf9;
  --tok-teal-border: #99e7db;
  --tok-teal-fg: #0b6b63;
  --tok-state-gray: #71717a;
  --tok-state-blue: #1672c4;
  --tok-state-amber: #a15c00;
  --tok-state-green: #18813d;
  --tok-state-red: #c42b38;
}

[data-theme="dark"] {
  color-scheme: dark;

  /* Backgrounds */
  --ds-background-100: #000000;
  --ds-background-200: #0a0a0a;

  /* Gray Scale */
  --ds-gray-100: #1a1a1a;
  --ds-gray-200: #1f1f1f;
  --ds-gray-300: #292929;
  --ds-gray-400: #2e2e2e;
  --ds-gray-500: #454545;
  --ds-gray-600: #878787;
  --ds-gray-700: #8f8f8f;
  --ds-gray-800: #7d7d7d;
  --ds-gray-900: #a0a0a0;
  --ds-gray-1000: #ededed;

  /* Gray Alpha Scale */
  --ds-gray-alpha-100: rgba(255, 255, 255, 0.07);
  --ds-gray-alpha-200: rgba(255, 255, 255, 0.09);
  --ds-gray-alpha-300: rgba(255, 255, 255, 0.13);
  --ds-gray-alpha-400: rgba(255, 255, 255, 0.14);
  --ds-gray-alpha-500: rgba(255, 255, 255, 0.24);
  --ds-gray-alpha-600: rgba(255, 255, 255, 0.51);
  --ds-gray-alpha-700: rgba(255, 255, 255, 0.54);
  --ds-gray-alpha-800: rgba(255, 255, 255, 0.47);
  --ds-gray-alpha-900: rgba(255, 255, 255, 0.61);
  --ds-gray-alpha-1000: rgba(255, 255, 255, 0.92);

  /* Blue Accent */
  --ds-blue-100: #06193a;
  --ds-blue-200: #022248;
  --ds-blue-300: #002f62;
  --ds-blue-400: #003771;
  --ds-blue-500: #004287;
  --ds-blue-600: #0090ff;
  --ds-blue-700: #0071f6;
  --ds-blue-800: #005fd8;
  --ds-blue-900: #50a8ff;
  --ds-blue-1000: #ebf6ff;

  /* Amber Accent */
  --ds-amber-100: #291800;
  --ds-amber-200: #331b00;
  --ds-amber-300: #4f2900;
  --ds-amber-400: #573200;
  --ds-amber-500: #6c4100;
  --ds-amber-600: #e99c00;
  --ds-amber-700: #ffb200;
  --ds-amber-800: #ff9900;
  --ds-amber-900: #ff9900;
  --ds-amber-1000: #fff3d9;

  /* Red Accent */
  --ds-red-100: #330a11;
  --ds-red-200: #440d13;
  --ds-red-300: #5d0e17;
  --ds-red-400: #6f101b;
  --ds-red-500: #88151f;
  --ds-red-600: #f32e40;
  --ds-red-700: #f13242;
  --ds-red-800: #e2162a;
  --ds-red-900: #ff5e63;
  --ds-red-1000: #ffeaed;

  /* Green Accent */
  --ds-green-100: #00250a;
  --ds-green-200: #003110;
  --ds-green-300: #003814;
  --ds-green-400: #004616;
  --ds-green-500: #00661d;
  --ds-green-600: #009431;
  --ds-green-700: #00ab3e;
  --ds-green-800: #009335;
  --ds-green-900: #00ca52;
  --ds-green-1000: #daffe5;

  /* Purple Accent */
  --ds-purple-100: #290c33;
  --ds-purple-200: #341142;
  --ds-purple-300: #47185e;
  --ds-purple-400: #541a76;
  --ds-purple-500: #642290;
  --ds-purple-600: #9440d5;
  --ds-purple-700: #9440d5;
  --ds-purple-800: #7d2bba;
  --ds-purple-900: #c472fb;
  --ds-purple-1000: #faedff;

  /* Pink Accent */
  --ds-pink-100: #310d1e;
  --ds-pink-200: #420c25;
  --ds-pink-300: #571032;
  --ds-pink-400: #5d0c34;
  --ds-pink-500: #76063f;
  --ds-pink-600: #b90056;
  --ds-pink-700: #f22782;
  --ds-pink-800: #e4106e;
  --ds-pink-900: #ff518d;
  --ds-pink-1000: #ffeaf4;

  /* Shadows & Focus */
  --ds-focus-color: var(--ds-blue-900);
  --ds-focus-ring: 0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color);
  --ds-shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.4);
  --ds-shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.4);
  --ds-shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 1px var(--ds-background-200);
  --ds-shadow-border-small: 0 0 0 1px rgba(255, 255, 255, 0.14), 0px 2px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--ds-background-200);

  /* Semantic mappings */
  --site-bg: var(--ds-background-100);
  --site-fg: var(--ds-gray-1000);
  --site-muted: var(--ds-gray-900);
  --site-border: var(--ds-gray-400);
  --site-border-subtle: var(--ds-gray-300);
  --site-card-bg: var(--ds-background-200);
  --site-code-bg: var(--ds-background-100);
  --tok-quiet-bg: #111111;
  --tok-quiet-border: #343434;
  --tok-quiet-fg: #d4d4d4;
  --tok-blue-bg: #0d1d30;
  --tok-blue-border: #214b73;
  --tok-blue-fg: #8ecbff;
  --tok-purple-bg: #20142c;
  --tok-purple-border: #55306c;
  --tok-purple-fg: #d8a8ff;
  --tok-red-bg: #2a1115;
  --tok-red-border: #5f2029;
  --tok-red-fg: #ff9ca3;
  --tok-teal-bg: #0a2725;
  --tok-teal-border: #185c55;
  --tok-teal-fg: #79e0d3;
  --tok-state-gray: #a1a1aa;
  --tok-state-blue: #66b7ff;
  --tok-state-amber: #ffc35c;
  --tok-state-green: #5fd982;
  --tok-state-red: #ff737d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ds-background-100: #000000;
    --ds-background-200: #0a0a0a;
    --ds-gray-100: #1a1a1a;
    --ds-gray-200: #1f1f1f;
    --ds-gray-300: #292929;
    --ds-gray-400: #2e2e2e;
    --ds-gray-500: #454545;
    --ds-gray-600: #878787;
    --ds-gray-700: #8f8f8f;
    --ds-gray-800: #7d7d7d;
    --ds-gray-900: #a0a0a0;
    --ds-gray-1000: #ededed;
    --ds-gray-alpha-100: rgba(255, 255, 255, 0.07);
    --ds-gray-alpha-200: rgba(255, 255, 255, 0.09);
    --ds-gray-alpha-300: rgba(255, 255, 255, 0.13);
    --ds-gray-alpha-400: rgba(255, 255, 255, 0.14);
    --ds-gray-alpha-500: rgba(255, 255, 255, 0.24);
    --ds-gray-alpha-600: rgba(255, 255, 255, 0.51);
    --ds-gray-alpha-700: rgba(255, 255, 255, 0.54);
    --ds-gray-alpha-800: rgba(255, 255, 255, 0.47);
    --ds-gray-alpha-900: rgba(255, 255, 255, 0.61);
    --ds-gray-alpha-1000: rgba(255, 255, 255, 0.92);
    --ds-blue-100: #06193a;
    --ds-blue-200: #022248;
    --ds-blue-300: #002f62;
    --ds-blue-400: #003771;
    --ds-blue-500: #004287;
    --ds-blue-600: #0090ff;
    --ds-blue-700: #0071f6;
    --ds-blue-800: #005fd8;
    --ds-blue-900: #50a8ff;
    --ds-blue-1000: #ebf6ff;
    --ds-amber-100: #291800;
    --ds-amber-200: #331b00;
    --ds-amber-300: #4f2900;
    --ds-amber-400: #573200;
    --ds-amber-500: #6c4100;
    --ds-amber-600: #e99c00;
    --ds-amber-700: #ffb200;
    --ds-amber-800: #ff9900;
    --ds-amber-900: #ff9900;
    --ds-amber-1000: #fff3d9;
    --ds-red-100: #330a11;
    --ds-red-200: #440d13;
    --ds-red-300: #5d0e17;
    --ds-red-400: #6f101b;
    --ds-red-500: #88151f;
    --ds-red-600: #f32e40;
    --ds-red-700: #f13242;
    --ds-red-800: #e2162a;
    --ds-red-900: #ff5e63;
    --ds-red-1000: #ffeaed;
    --ds-green-100: #00250a;
    --ds-green-200: #003110;
    --ds-green-300: #003814;
    --ds-green-400: #004616;
    --ds-green-500: #00661d;
    --ds-green-600: #009431;
    --ds-green-700: #00ab3e;
    --ds-green-800: #009335;
    --ds-green-900: #00ca52;
    --ds-green-1000: #daffe5;
    --ds-purple-100: #290c33;
    --ds-purple-200: #341142;
    --ds-purple-300: #47185e;
    --ds-purple-400: #541a76;
    --ds-purple-500: #642290;
    --ds-purple-600: #9440d5;
    --ds-purple-700: #9440d5;
    --ds-purple-800: #7d2bba;
    --ds-purple-900: #c472fb;
    --ds-purple-1000: #faedff;
    --ds-pink-100: #310d1e;
    --ds-pink-200: #420c25;
    --ds-pink-300: #571032;
    --ds-pink-400: #5d0c34;
    --ds-pink-500: #76063f;
    --ds-pink-600: #b90056;
    --ds-pink-700: #f22782;
    --ds-pink-800: #e4106e;
    --ds-pink-900: #ff518d;
    --ds-pink-1000: #ffeaf4;
    --ds-focus-color: var(--ds-blue-900);
    --ds-focus-ring: 0 0 0 2px var(--ds-background-100), 0 0 0 4px var(--ds-focus-color);
    --ds-shadow-xs: 0px 1px 2px rgba(0, 0, 0, 0.4);
    --ds-shadow-small: 0px 2px 2px rgba(0, 0, 0, 0.4);
    --ds-shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 1px var(--ds-background-200);
    --ds-shadow-border-small: 0 0 0 1px rgba(255, 255, 255, 0.14), 0px 2px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--ds-background-200);
    --site-bg: var(--ds-background-100);
    --site-fg: var(--ds-gray-1000);
    --site-muted: var(--ds-gray-900);
    --site-border: var(--ds-gray-400);
    --site-border-subtle: var(--ds-gray-300);
    --site-card-bg: var(--ds-background-200);
    --site-code-bg: var(--ds-background-100);
    --tok-quiet-bg: #111111;
    --tok-quiet-border: #343434;
    --tok-quiet-fg: #d4d4d4;
    --tok-blue-bg: #0d1d30;
    --tok-blue-border: #214b73;
    --tok-blue-fg: #8ecbff;
    --tok-purple-bg: #20142c;
    --tok-purple-border: #55306c;
    --tok-purple-fg: #d8a8ff;
    --tok-red-bg: #2a1115;
    --tok-red-border: #5f2029;
    --tok-red-fg: #ff9ca3;
    --tok-teal-bg: #0a2725;
    --tok-teal-border: #185c55;
    --tok-teal-fg: #79e0d3;
    --tok-state-gray: #a1a1aa;
    --tok-state-blue: #66b7ff;
    --tok-state-amber: #ffc35c;
    --tok-state-green: #5fd982;
    --tok-state-red: #ff737d;
  }
}

/* --------------------------------------------------------------------------
   3. SPACING SCALE & MEASUREMENTS
   -------------------------------------------------------------------------- */
:root {
  --header-height: 64px;
  --sidebar-width: 280px;
  --right-rail-width: 240px;
  --content-width: 720px;
  --page-max-width: 1400px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
}

/* --------------------------------------------------------------------------
   4. BORDER RADII SCALE
   -------------------------------------------------------------------------- */
:root {
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  --radius-pill: 30px;
}

/* --------------------------------------------------------------------------
   5. BASE RESET & BODY MEASURE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--site-bg);
  color: var(--site-fg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--site-bg);
  color: var(--site-fg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   6. HEADING SIZES AND WEIGHTS
   -------------------------------------------------------------------------- */
.docs-h1 {
  font-family: var(--font-sans);
  font-size: 40px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -2.4px;
  color: var(--ds-gray-1000);
  margin: 0 0 16px 0;
}

.docs-lead {
  font-size: 16px;
  line-height: 26px;
  color: var(--ds-gray-1000);
  margin: 0 0 24px 0;
  font-weight: 400;
}

.docs-prose h2 {
  font-family: var(--font-sans);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ds-gray-1000);
  margin: 48px 0 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--ds-gray-300);
}

.docs-prose h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 24px;
}

.docs-prose h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ds-gray-1000);
  margin: 32px 0 12px 0;
}

.docs-prose h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--ds-gray-1000);
  margin: 24px 0 8px 0;
}

/* --------------------------------------------------------------------------
   7. PARAGRAPH MEASURE & INLINE ELEMENTS
   -------------------------------------------------------------------------- */
.docs-prose p {
  font-size: 14px;
  line-height: 24px;
  color: var(--ds-gray-900);
  margin: 16px 0;
  max-width: var(--content-width);
}

.docs-prose ul,
.docs-prose ol {
  font-size: 14px;
  line-height: 24px;
  color: var(--ds-gray-900);
  margin: 14px 0;
  padding-left: 24px;
}

.docs-prose li {
  margin: 6px 0;
}

.docs-prose strong,
.docs-prose b {
  font-weight: 600;
  color: var(--ds-gray-1000);
}

:is(.docs-prose, .at-a-glance) code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 400;
  line-height: inherit;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--tok-quiet-bg);
  color: var(--tok-quiet-fg);
  border: 1px solid var(--tok-quiet-border);
  word-break: break-word;
}

:is(.docs-prose, .at-a-glance) .tok {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  vertical-align: baseline;
  white-space: nowrap;
  word-break: normal;
}

:is(.docs-prose, .at-a-glance) .tok-event {
  background: var(--tok-purple-bg);
  border-color: var(--tok-purple-border);
  color: var(--tok-purple-fg);
}

:is(.docs-prose, .at-a-glance) .tok-endpoint,
:is(.docs-prose, .at-a-glance) .tok-method-post {
  background: var(--tok-blue-bg);
  border-color: var(--tok-blue-border);
  color: var(--tok-blue-fg);
}

:is(.docs-prose, .at-a-glance) .tok-error,
:is(.docs-prose, .at-a-glance) .tok-method-delete {
  background: var(--tok-red-bg);
  border-color: var(--tok-red-border);
  color: var(--tok-red-fg);
}

:is(.docs-prose, .at-a-glance) .tok-literal {
  background: var(--tok-teal-bg);
  border-color: var(--tok-teal-border);
  color: var(--tok-teal-fg);
}

:is(.docs-prose, .at-a-glance) .tok-method {
  justify-content: center;
  min-width: 48px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

:is(.docs-prose, .at-a-glance) .tok-method-get {
  background: var(--ds-green-100);
  border-color: var(--ds-green-400);
  color: var(--ds-green-900);
}

:is(.docs-prose, .at-a-glance) .tok-method-put,
:is(.docs-prose, .at-a-glance) .tok-method-patch {
  background: var(--ds-amber-100);
  border-color: var(--ds-amber-400);
  color: var(--ds-amber-900);
}

:is(.docs-prose, .at-a-glance) .tok-state {
  gap: 6px;
  border-radius: var(--radius-pill);
}

:is(.docs-prose, .at-a-glance) .tok-state::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tok-state-gray);
}

:is(.docs-prose, .at-a-glance) .tok-state-running::before,
:is(.docs-prose, .at-a-glance) .tok-state-builder-preview::before { background: var(--tok-state-blue); }
:is(.docs-prose, .at-a-glance) .tok-state-waiting-for-input::before,
:is(.docs-prose, .at-a-glance) .tok-state-stopped::before,
:is(.docs-prose, .at-a-glance) .tok-state-open::before { background: var(--tok-state-amber); }
:is(.docs-prose, .at-a-glance) .tok-state-completed::before,
:is(.docs-prose, .at-a-glance) .tok-state-ready::before,
:is(.docs-prose, .at-a-glance) .tok-state-not-required::before { background: var(--tok-state-green); }
:is(.docs-prose, .at-a-glance) .tok-state-failed::before,
:is(.docs-prose, .at-a-glance) .tok-state-missing::before { background: var(--tok-state-red); }

.docs-divider {
  border: none;
  border-top: 1px solid var(--ds-gray-300);
  margin: 48px 0 32px 0;
}

/* --------------------------------------------------------------------------
   8. LINK STYLING
   -------------------------------------------------------------------------- */
.docs-prose a {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--ds-gray-alpha-600);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.docs-prose a:hover {
  text-decoration-color: currentColor;
}

/* --------------------------------------------------------------------------
   9. TOP BAR (LOGO MARK, SLASH, WORD DOCS, SECONDARY NAV, BUTTONS)
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  width: 100%;
  background: var(--site-bg);
  border-bottom: 1px solid var(--ds-gray-300);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ds-gray-1000);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-md);
  transition: opacity 0.15s ease;
}

.topbar-logo:hover {
  opacity: 0.85;
}

.topbar-brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.03em;
  color: var(--ds-gray-1000);
}

.topbar-slash {
  display: flex;
  align-items: center;
  color: var(--ds-gray-500);
}

.topbar-docs-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ds-gray-1000);
  text-decoration: none;
  transition: color 0.15s ease;
}

.topbar-docs-title:hover {
  color: var(--ds-gray-1000);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
}

.topbar-nav-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ds-gray-900);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.topbar-nav-link:hover {
  color: var(--ds-gray-1000);
  background-color: var(--ds-gray-200);
}

.topbar-nav-link.active {
  color: var(--ds-gray-1000);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
}

.topbar-btn.ghost-btn {
  background: transparent;
  color: var(--ds-gray-900);
  border: 1px solid transparent;
}

.topbar-btn.ghost-btn:hover {
  background: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.topbar-btn.ghost-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.topbar-btn.primary-btn {
  background: var(--ds-gray-1000);
  color: var(--ds-background-100);
  border: 1px solid var(--ds-gray-1000);
  box-shadow: var(--ds-shadow-xs);
}

.topbar-btn.primary-btn:hover {
  opacity: 0.9;
}

.topbar-btn.primary-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.primary-btn-icon,
.primary-btn-label-compact {
  display: none;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--ds-gray-400);
  background: var(--ds-background-100);
  color: var(--ds-gray-900);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.theme-toggle-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

/* Theme icon switching */
[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: none;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--ds-gray-400);
  background: var(--ds-background-100);
  color: var(--ds-gray-900);
  cursor: pointer;
  outline: none;
}

.mobile-menu-btn:hover {
  background: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.sidebar-mobile-header,
.sidebar-mobile-actions {
  display: none;
}

.copy-confirmed {
  color: var(--ds-green-900) !important;
  font-weight: 600 !important;
}

/* --------------------------------------------------------------------------
   10. THREE-COLUMN LAYOUT & SHELL
   -------------------------------------------------------------------------- */
.docs-layout {
  max-width: var(--page-max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  flex: 1;
}

/* Left Sidebar */
.docs-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--ds-gray-300);
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 16px 16px 32px 16px;
  background: var(--site-bg);
}

/* Sidebar Search at Top */
.sidebar-search-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.sidebar-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.sidebar-search-icon {
  position: absolute;
  left: 9px;
  color: var(--ds-gray-700);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.sidebar-search-input {
  width: 100%;
  height: 32px;
  padding: 0 38px 0 30px;
  background: var(--ds-background-100);
  border: 1px solid var(--ds-gray-400);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ds-gray-1000);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-search-input::placeholder {
  color: var(--ds-gray-700);
}

.sidebar-search-input:focus {
  border-color: var(--ds-gray-600);
  box-shadow: var(--ds-focus-ring);
}

.sidebar-search-kbd {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ds-gray-800);
  background: var(--ds-gray-200);
  border: 1px solid var(--ds-gray-400);
  border-radius: 4px;
  pointer-events: none;
}

.sidebar-search-wrapper .search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--ds-background-100);
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 340px;
  overflow-y: auto;
  z-index: 200;
  padding: 6px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ds-gray-900);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.12s ease;
}

.search-result-item:hover,
.search-result-item.selected {
  background-color: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.search-result-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--ds-gray-200);
  color: var(--ds-gray-800);
}

.search-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Uppercase-less gray section labels */
.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section-label {
  padding: 6px 8px 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ds-gray-700);
  letter-spacing: 0;
  text-transform: none;
  user-select: none;
}

.sidebar-section-items {
  list-style: none;
  margin: 2px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  position: relative;
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 8px;
  font-size: 14px;
  color: var(--ds-gray-900);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sidebar-link:hover {
  background-color: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.sidebar-link.active,
.sidebar-link[aria-current="page"] {
  background-color: var(--ds-gray-200);
  color: var(--ds-gray-1000);
  font-weight: 500;
}

.sidebar-link-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-beta-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  padding: 1px 6px;
  border-radius: 9999px;
  background: var(--ds-blue-200);
  color: var(--ds-blue-900);
  border: 1px solid var(--ds-blue-400);
  margin-left: 6px;
}

.sidebar-entry-chevron {
  flex-shrink: 0;
  margin-left: 6px;
  color: var(--ds-gray-700);
}

/* Centered Content Column */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 32px 48px 64px 48px;
  display: flex;
  justify-content: center;
}

.content-wrapper {
  max-width: var(--content-width);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.content-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .content-header-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.header-titles {
  flex: 1;
  min-width: 0;
}

.header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Right Rail TOC */
.docs-toc {
  width: var(--right-rail-width);
  min-width: var(--right-rail-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 32px 16px 32px 12px;
}

.toc-sticky-container {
  position: relative;
}

.toc-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ds-gray-800);
  margin: 0 0 12px 0;
  padding: 0;
  border: none;
}

.toc-list {
  list-style: none;
  position: relative;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--ds-gray-300);
}

.toc-item {
  position: relative;
  margin: 0;
}

.toc-link {
  display: block;
  padding: 6px 12px 6px 16px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ds-gray-800);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s ease;
}

.toc-item.sub .toc-link,
.toc-link.sub {
  padding-left: 32px;
  font-size: 12px;
}

.toc-link:hover {
  color: var(--ds-gray-1000);
}

.toc-link.active,
.toc-item.active > .toc-link {
  color: var(--ds-gray-1000);
  font-weight: 500;
}

.toc-item::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background-color 0.15s ease;
}

.toc-item.active::after {
  background: var(--ds-gray-1000);
}

/* --------------------------------------------------------------------------
   11. BUTTONS ("COPY PAGE" WITH DROPDOWN CHEVRON, ON THIS PAGE)
   -------------------------------------------------------------------------- */
.split-btn-group {
  display: inline-flex;
  position: relative;
  border-radius: 6px;
  border: 1px solid var(--ds-gray-400);
  background: var(--ds-background-100);
  box-shadow: var(--ds-shadow-xs);
}

.copy-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--ds-gray-400);
  border-radius: 6px 0 0 6px;
  color: var(--ds-gray-1000);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease;
}

.copy-page-btn:hover {
  background-color: var(--ds-gray-200);
}

.copy-page-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.split-btn-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 0 6px 6px 0;
  color: var(--ds-gray-900);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease;
}

.split-btn-chevron:hover {
  background-color: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.split-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--ds-background-100);
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 4px;
  z-index: 50;
}

.split-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ds-gray-900);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.split-menu-item:hover {
  background: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

/* --------------------------------------------------------------------------
   12. AT A GLANCE
   -------------------------------------------------------------------------- */
.at-a-glance {
  margin: 20px 0 32px;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--site-code-bg);
  max-width: 100%;
  min-width: 0;
}

.glance-title {
  margin: 0;
  padding: 0;
  border: 0;
}

.glance-list {
  display: grid;
  row-gap: 12px;
  margin: 0;
  padding: 12px;
}

.glance-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  column-gap: 16px;
  align-items: center;
  min-width: 0;
}

.glance-row dt,
.glance-row dd {
  margin: 0;
}

.glance-row dt {
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

.glance-row dd {
  min-width: 0;
  overflow: hidden;
  color: var(--site-fg);
  font-size: 14px;
  line-height: 20px;
}

.glance-token-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.glance-value-scroll {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.glance-value-scroll .tok {
  flex: 0 0 auto;
}

.glance-text {
  display: block;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  scrollbar-width: thin;
}

.glance-copy-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ds-gray-800);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.glance-copy-btn:hover {
  background: var(--ds-gray-alpha-200);
  color: var(--ds-gray-1000);
}

.glance-copy-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

/* --------------------------------------------------------------------------
   13. CODE BLOCK COMPONENT WITH COPY BUTTON
   -------------------------------------------------------------------------- */
.code-block {
  margin: 20px 0;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--site-code-bg);
  max-width: 100%;
  min-width: 0;
}

.code-block-header {
  height: 38px;
  padding: 0 12px;
  background: var(--ds-background-200);
  border-bottom: 1px solid var(--ds-gray-400);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ds-gray-900);
}

.code-block-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.code-copy-btn,
.code-wrap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ds-gray-800);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.code-copy-btn:hover,
.code-wrap-btn:hover {
  background: var(--ds-gray-alpha-200);
  color: var(--ds-gray-1000);
}

.code-copy-btn:focus-visible,
.code-wrap-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.code-wrap-btn[aria-pressed="true"] {
  background: var(--ds-gray-alpha-200);
  color: var(--ds-gray-1000);
}

.code-pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  max-width: 100%;
  background: var(--ds-background-100);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  color: var(--ds-gray-1000);
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
}

.code-pre code {
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  white-space: inherit;
}

.code-block.is-wrapped .code-pre,
.code-block.is-wrapped .code-pre code {
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block.is-wrapped .code-pre {
  overflow-x: hidden;
}

.doc-figure {
  display: block;
  margin: 16px 0 24px;
}

.doc-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
}

.doc-figure figcaption {
  margin-top: 8px;
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

/* Syntax Highlighting Tokens (Vercel Theme) */
.token {
  display: inline;
  position: relative;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: var(--ds-gray-900) !important;
}
.token.namespace {
  opacity: 0.7;
}
.token.string,
.token.attr-value {
  color: var(--ds-green-900);
}
.token.punctuation,
.token.operator {
  color: var(--ds-gray-1000);
}
.token.url,
.token.symbol,
.token.boolean,
.token.variable,
.token.constant {
  color: var(--ds-green-900);
}
.token.keyword,
.token.atrule,
.token.selector {
  color: var(--ds-pink-900);
}
.token.tag {
  color: var(--ds-green-900);
}
.token.class-name {
  color: var(--ds-green-900);
}
.token.number {
  color: var(--ds-green-900);
}
.token.property,
.token.entity,
.token.assign-left {
  color: var(--ds-red-900);
}
.token.key {
  color: var(--ds-red-900);
}
.token.parameter {
  color: var(--ds-amber-900);
}
.token.function,
.token.attr-name,
.token.regex {
  color: var(--ds-purple-900);
}
.token.builtin {
  color: var(--ds-purple-900);
}
.token.important,
.token.bold {
  font-weight: 700;
}
.token.italic {
  font-style: italic;
}
.token.deleted {
  color: var(--ds-red-900);
}
.token.inserted {
  color: var(--ds-blue-900);
}

/* ASCII Architecture Art Container */
.ascii-art {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  padding: 16px;
  background: var(--ds-background-200);
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  white-space: pre;
  color: var(--ds-gray-1000);
  margin: 20px 0;
}

/* --------------------------------------------------------------------------
   14. TABLE STYLING
   -------------------------------------------------------------------------- */
.docs-table-wrapper {
  overflow-x: auto;
  overflow-y: clip;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  border: 1px solid var(--table-divider);
  border-radius: var(--radius-xl);
  background: var(--table-row-bg);
}

table.docs-table,
.docs-prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}

.docs-prose table:not(.docs-table) {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.docs-prose thead,
table.docs-table thead {
  background-color: var(--table-header-bg);
}

.docs-prose th,
table.docs-table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ds-gray-1000);
  border: 0;
  letter-spacing: 0;
}

.docs-prose td,
table.docs-table td {
  padding: 12px 16px;
  color: var(--ds-gray-900);
  border: 0;
  vertical-align: top;
}

.docs-prose :is(th, td):not(:last-child),
table.docs-table :is(th, td):not(:last-child) {
  border-right: 1px solid var(--table-divider);
}

.docs-prose :is(thead tr, tbody tr:not(:last-child)) > :is(th, td),
table.docs-table :is(thead tr, tbody tr:not(:last-child)) > :is(th, td) {
  border-bottom: 1px solid var(--table-divider);
}

.docs-prose .token-table th:first-child,
.docs-prose .token-table td:first-child {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  white-space: nowrap;
}

.docs-prose .table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  overflow-y: clip;
  isolation: isolate;
  border: 1px solid var(--table-divider);
  border-radius: var(--radius-xl);
  background: var(--table-row-bg);
}

.docs-prose .table-wrap table {
  width: 100%;
}

.docs-prose .table-wrap code {
  white-space: nowrap;
  word-break: normal;
}

.docs-prose .table-wrap :is(th, td):first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 0;
  background: var(--table-row-bg);
  box-shadow: inset -1px 0 var(--table-divider);
}

.docs-prose .table-wrap thead th:first-child {
  z-index: 2;
  background: var(--table-header-bg);
}

.docs-prose .table-wrap thead:first-child tr:first-child th:first-child {
  border-start-start-radius: calc(var(--radius-xl) - 1px);
}

.docs-prose .table-wrap thead:first-child tr:first-child th:last-child {
  border-start-end-radius: calc(var(--radius-xl) - 1px);
}

.docs-prose .endpoints-table {
  --method-column-width: 81px;
  table-layout: auto;
}

.docs-prose .endpoints-table :is(th, td):first-child {
  width: var(--method-column-width);
  min-width: var(--method-column-width);
  max-width: var(--method-column-width);
  white-space: nowrap;
}

.docs-prose .endpoints-table :is(th, td):nth-child(2) {
  position: sticky;
  left: var(--method-column-width);
  z-index: 1;
  width: 42%;
  min-width: 360px;
  white-space: nowrap;
  border-right: 0;
  background: var(--table-row-bg);
  box-shadow: inset -1px 0 var(--table-divider);
}

.docs-prose .endpoints-table thead th:nth-child(2) {
  z-index: 2;
  background: var(--table-header-bg);
}

.docs-prose .endpoints-table :is(th, td):nth-child(3) {
  width: 100%;
  min-width: 180px;
  white-space: normal;
}

.docs-prose .endpoints-table :is(th, td):nth-child(4),
.docs-prose .endpoints-table :is(th, td):nth-child(5) {
  width: 1%;
  white-space: nowrap;
}

.docs-prose .schema-table :is(th, td):first-child {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   15. NOTE AND WARNING CALLOUTS
   -------------------------------------------------------------------------- */
.callout {
  display: block;
  gap: 14px;
  padding: 16px;
  margin: 20px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ds-blue-400);
  background-color: var(--ds-blue-100);
  color: var(--ds-gray-1000);
  font-size: 14px;
  line-height: 22px;
}

.callout p {
  margin: 0;
  color: var(--ds-gray-1000);
}

.callout-icon {
  float: left;
  margin-right: 14px;
  flex-shrink: 0;
  color: var(--ds-blue-700);
  margin-top: 2px;
}

.callout-warn,
.callout-warning {
  border-color: var(--ds-amber-400);
  background-color: var(--ds-amber-100);
}

.callout-warn .callout-icon,
.callout-warning .callout-icon {
  color: var(--ds-amber-700);
}

.callout-danger {
  border-color: var(--ds-red-400);
  background-color: var(--ds-red-100);
}

.callout-danger .callout-icon {
  color: var(--ds-red-700);
}

/* --------------------------------------------------------------------------
   16. THE STEP COMPONENT (NUMBERED STEPS WITH VERTICAL LINE)
   -------------------------------------------------------------------------- */
.steps {
  position: relative;
  margin: 32px 0 32px 0;
  padding-left: 0;
}

.step {
  position: relative;
  padding-left: 44px;
  padding-bottom: 36px;
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 0px;
  width: 1px;
  background: var(--ds-gray-400);
}

.step-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--ds-gray-400);
  background-color: var(--ds-background-100);
  color: var(--ds-gray-1000);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ds-shadow-xs);
  z-index: 1;
}

.step-content {
  min-width: 0;
}

.step-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ds-gray-1000);
}

.step-endpoint {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-900);
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   BUILDER PROMPT CARD COMPONENT (AGENT PROMPT PATTERN)
   -------------------------------------------------------------------------- */
.prompt-card {
  margin: 24px 0 32px 0;
  border: 1px solid var(--ds-gray-400);
  border-radius: 6px;
  overflow: hidden;
  background: var(--ds-background-100);
}

.prompt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--ds-background-200);
  border-bottom: 1px solid var(--ds-gray-400);
  min-height: 44px;
}

.prompt-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-1000);
}

.prompt-card-title svg {
  color: var(--ds-gray-800);
}

.prompt-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prompt-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ds-gray-900);
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.prompt-copy-btn:hover {
  background-color: var(--ds-gray-200);
  color: var(--ds-gray-1000);
}

.prompt-copy-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.prompt-card-body {
  padding: 14px 16px;
  position: relative;
}

.prompt-card-content {
  position: relative;
  overflow: hidden;
  max-height: 46px;
  transition: max-height 0.25s ease;
}

.prompt-card-content.expanded {
  max-height: 400px;
}

.prompt-card-text {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--ds-gray-900);
  word-break: break-word;
}

.prompt-card-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, transparent 35%, var(--ds-background-100) 100%);
}

.prompt-card-content.expanded .prompt-card-fade {
  display: none;
}

.prompt-card-expand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  position: relative;
}

.prompt-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid var(--ds-gray-400);
  background: var(--ds-background-100);
  color: var(--ds-gray-1000);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: background-color 0.15s ease;
  box-shadow: var(--ds-shadow-xs);
}

.prompt-expand-btn:hover {
  background-color: var(--ds-gray-200);
}

.prompt-expand-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

/* --------------------------------------------------------------------------
   17. TABS COMPONENT
   -------------------------------------------------------------------------- */
.tabs-container {
  margin: 20px 0;
}

.tab-triggers {
  display: flex;
  gap: 8px;
  box-shadow: inset 0 -1px 0 var(--ds-gray-400);
  overflow-x: auto;
  padding-bottom: 1px;
}

.tab {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ds-gray-700);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--ds-gray-1000);
}

.tab.active,
.tab[aria-selected="true"] {
  color: var(--ds-gray-1000);
  border-bottom-color: var(--ds-gray-1000);
  font-weight: 500;
}

.tab-panel {
  display: none;
  padding-top: 14px;
}

.tab-panel.active {
  display: block;
}

/* --------------------------------------------------------------------------
   18. TAGS & BADGES
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-blue {
  background-color: var(--ds-blue-200);
  color: var(--ds-blue-900);
}

.tag-green {
  background-color: var(--ds-green-200);
  color: var(--ds-green-900);
}

.tag-amber {
  background-color: var(--ds-amber-200);
  color: var(--ds-amber-900);
}

.tag-red {
  background-color: var(--ds-red-200);
  color: var(--ds-red-900);
}

.tag-purple {
  background-color: var(--ds-purple-200);
  color: var(--ds-purple-900);
}

/* Endpoint Card (API Reference) */
.endpoint-card {
  margin: 24px 0;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ds-background-100);
}

.endpoint-header {
  padding: 14px 16px;
  background: var(--ds-background-200);
  border-bottom: 1px solid var(--ds-gray-400);
  display: flex;
  align-items: center;
  gap: 12px;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ds-gray-1000);
}

.endpoint-body {
  padding: 16px;
}

.step-box {
  position: relative;
  margin: 20px 0;
  padding: 16px 20px;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  background-color: var(--ds-background-100);
}

.step-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ds-gray-900);
  background: var(--ds-gray-200);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   19. WAS THIS HELPFUL STRIP
   -------------------------------------------------------------------------- */
.feedback-section {
  display: flex;
  justify-content: center;
  margin: 36px 0;
}

.feedback-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ds-gray-400);
  background: var(--ds-background-100);
  box-shadow: var(--ds-shadow-border-small);
}

.feedback-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-900);
}

.feedback-options {
  display: flex;
  align-items: center;
  gap: 4px;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ds-gray-800);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.feedback-btn:hover {
  background-color: var(--ds-blue-200);
  color: var(--ds-blue-900);
  transform: scale(1.1);
}

.feedback-btn:focus-visible {
  box-shadow: var(--ds-focus-ring);
}

.feedback-success {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-green-900);
}

/* --------------------------------------------------------------------------
   20. PREVIOUS AND NEXT LINKS
   -------------------------------------------------------------------------- */
.page-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 20px 0;
}

.page-nav-link {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--ds-gray-400);
  border-radius: var(--radius-lg);
  text-decoration: none;
  min-width: 200px;
  max-width: 320px;
  flex: 1;
  background: var(--ds-background-100);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-nav-link:hover {
  border-color: var(--ds-gray-600);
  box-shadow: var(--ds-shadow-small);
}

.page-nav-link.next {
  text-align: right;
  margin-left: auto;
}

.page-nav-label {
  font-size: 12px;
  color: var(--ds-gray-700);
  margin-bottom: 4px;
}

.page-nav-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ds-gray-1000);
}

.page-nav-spacer {
  flex: 1;
}

/* --------------------------------------------------------------------------
   21. FOOTER
   -------------------------------------------------------------------------- */
.docs-footer {
  border-top: 1px solid var(--ds-gray-300);
  background: var(--site-bg);
  height: 48px;
  padding: 0 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--page-max-width);
  height: 47px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand,
.footer-links {
  display: flex;
  align-items: center;
}

.footer-brand {
  gap: 7px;
  color: var(--ds-gray-800);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.footer-brand:hover {
  color: var(--ds-gray-1000);
}

.footer-links {
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--ds-gray-800);
  text-decoration: none;
  transition: color 0.12s ease;
}

.footer-links a:hover {
  color: var(--ds-gray-1000);
}

/* --------------------------------------------------------------------------
   22. RESPONSIVE BREAKPOINTS (COLLAPSE UNDER 1024PX / HIDE RAIL UNDER 1280PX)
   -------------------------------------------------------------------------- */
/* Right rail hides under 1280px */
@media (max-width: 1279px) {
  .docs-toc {
    display: none !important;
  }
}

/* Left sidebar collapses behind menu button under 1024px */
@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: flex;
  }

  .topbar-nav {
    display: none;
  }

  .topbar-btn.ghost-btn {
    display: none;
  }

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, calc(100vw - 40px));
    min-width: 0;
    height: 100dvh;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
    border-right: 1px solid var(--ds-gray-400);
  }

  .docs-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-content {
    padding: 24px 20px 48px 20px;
  }

  .page-nav-row {
    flex-direction: column;
  }

  .page-nav-link {
    max-width: 100%;
    width: 100%;
  }

  .page-nav-link.next {
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  .topbar-inner {
    padding: 0 16px;
    gap: 8px;
  }

  .topbar-left,
  .topbar-right {
    min-width: 0;
  }

  .topbar-brand-name,
  .topbar-slash,
  .topbar-right > .theme-toggle-btn {
    display: none;
  }

  .topbar-logo {
    padding: 4px 2px;
  }

  .topbar-right {
    gap: 6px;
  }

  .primary-btn-label-full {
    display: none;
  }

  .primary-btn-icon,
  .primary-btn-label-compact {
    display: inline-flex;
  }

  .topbar-btn.primary-btn {
    gap: 6px;
    padding: 0 10px;
  }

  .sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    margin-bottom: 12px;
  }

  .sidebar-mobile-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-gray-1000);
  }

  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ds-gray-400);
    border-radius: var(--radius-md);
    background: var(--ds-background-100);
    color: var(--ds-gray-900);
    cursor: pointer;
  }

  .sidebar-mobile-actions {
    display: grid;
    gap: 4px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--ds-gray-300);
  }

  .sidebar-ask-link,
  .sidebar-secondary-link,
  .sidebar-theme-btn {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--ds-gray-900);
    font-family: var(--font-sans);
    font-size: 14px;
    text-decoration: none;
  }

  .sidebar-ask-link {
    font-weight: 600;
  }

  .sidebar-secondary-nav {
    display: grid;
    gap: 2px;
  }

  .sidebar-secondary-link.active {
    background: var(--ds-gray-200);
    color: var(--ds-gray-1000);
    font-weight: 500;
  }

  .sidebar-theme-btn {
    width: 100%;
    justify-content: space-between;
    cursor: pointer;
  }

  .sidebar-theme-icons {
    display: flex;
  }

  [data-theme="light"] .sidebar-theme-btn .sun-icon,
  [data-theme="dark"] .sidebar-theme-btn .moon-icon {
    display: none;
  }

  .docs-h1,
  .docs-lead,
  .docs-prose,
  .docs-prose h2,
  .docs-prose h3,
  .docs-prose h4,
  .docs-prose p,
  .docs-prose li {
    width: auto;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .docs-prose .tok {
    width: auto;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 640px) {
  .docs-lead {
    font-size: 15px;
    line-height: 24px;
  }

  .feedback-pill {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 479px) {
  .docs-h1 {
    font-size: 28px;
    line-height: 34px;
    letter-spacing: -1.5px;
  }
}

/* Horizontal overflow guards: code never escapes the content column */
pre {
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
}
.code-block pre,
.code-block-body {
  overflow-x: auto;
  max-width: 100%;
}
main,
article,
.content,
.step,
.step-card,
.step-body,
.callout,
.tabs-panel,
table {
  min-width: 0;
}
.table-wrap {
  overflow-x: auto;
  overflow-y: clip;
  width: 100%;
  max-width: 100%;
}

.step-box,
.step-content,
.step-body,
.tab-panel,
.tabs-content {
  min-width: 0;
  max-width: 100%;
}

/* Footer links wrap as the documentation bundle grows. */
.footer-inner { height: auto; min-height: 47px; flex-wrap: wrap; padding-block: 12px; }
.footer-links { flex-wrap: wrap; gap: 12px 20px; font-size: 12px; }
